Changeset 00c1935 for lib/trace.c
- Timestamp:
- 02/25/05 11:22:04 (17 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 627dbe9
- Parents:
- aca3ff4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r68667ee r00c1935 815 815 * you should call trace_get_link_type() to find out what type of link layer this is 816 816 */ 817 void *trace_get_link( struct libtrace_packet_t *packet) {817 void *trace_get_link(const struct libtrace_packet_t *packet) { 818 818 void *ethptr = 0; 819 819 … … 1096 1096 * @author Daniel Lawson 1097 1097 */ 1098 uint64_t trace_get_erf_timestamp( struct libtrace_packet_t *packet) {1098 uint64_t trace_get_erf_timestamp(const struct libtrace_packet_t *packet) { 1099 1099 uint64_t timestamp = 0; 1100 1100 dag_record_t *erfptr = 0; … … 1138 1138 * @author Perry Lorier 1139 1139 */ 1140 struct timeval trace_get_timeval( struct libtrace_packet_t *packet) {1140 struct timeval trace_get_timeval(const struct libtrace_packet_t *packet) { 1141 1141 struct timeval tv; 1142 1142 #if HAVE_PCAP … … 1179 1179 * @author Perry Lorier 1180 1180 */ 1181 double trace_get_seconds( struct libtrace_packet_t *packet) {1181 double trace_get_seconds(const struct libtrace_packet_t *packet) { 1182 1182 uint64_t ts; 1183 1183 ts = trace_get_erf_timestamp(packet); … … 1196 1196 * This is sometimes called the "snaplen". 1197 1197 */ 1198 int trace_get_capture_length( struct libtrace_packet_t *packet) {1198 int trace_get_capture_length(const struct libtrace_packet_t *packet) { 1199 1199 dag_record_t *erfptr = 0; 1200 1200 #if HAVE_PCAP … … 1242 1242 * not be the same as the Capture Len. 1243 1243 */ 1244 int trace_get_wire_length( struct libtrace_packet_t *packet){1244 int trace_get_wire_length(const struct libtrace_packet_t *packet){ 1245 1245 dag_record_t *erfptr = 0; 1246 1246 #if HAVE_PCAP … … 1282 1282 * @author Daniel Lawson 1283 1283 */ 1284 libtrace_linktype_t trace_get_link_type( struct libtrace_packet_t *packet ) {1284 libtrace_linktype_t trace_get_link_type(const struct libtrace_packet_t *packet ) { 1285 1285 dag_record_t *erfptr = 0; 1286 1286 #if HAVE_PCAP … … 1328 1328 * @author Perry Lorier 1329 1329 */ 1330 uint8_t *trace_get_source_mac( struct libtrace_packet_t *packet) {1330 uint8_t *trace_get_source_mac(const struct libtrace_packet_t *packet) { 1331 1331 void *link = trace_get_link(packet); 1332 1332 struct ieee_802_11_header *wifi = link; … … 1351 1351 * @author Perry Lorier 1352 1352 */ 1353 uint8_t *trace_get_destination_mac( struct libtrace_packet_t *packet) {1353 uint8_t *trace_get_destination_mac(const struct libtrace_packet_t *packet) { 1354 1354 void *link = trace_get_link(packet); 1355 1355 struct ieee_802_11_header *wifi = link; … … 1566 1566 * @author Daniel Lawson 1567 1567 */ 1568 int8_t trace_get_direction( struct libtrace_packet_t *packet) {1568 int8_t trace_get_direction(const struct libtrace_packet_t *packet) { 1569 1569 1570 1570 int8_t direction;
Note: See TracChangeset
for help on using the changeset viewer.