Changeset 33d83d4 for lib/trace.c
- Timestamp:
- 11/14/06 11:49:11 (16 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:
- cab58c5
- Parents:
- b9aa767
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
rb9aa767 r33d83d4 212 212 } 213 213 214 void erf_constructor( );215 void legacy_constructor( );216 void linuxnative_constructor( );217 void pcap_constructor( );218 void pcapfile_constructor( );219 void rt_constructor( );220 void wag_constructor( );221 void duck_constructor( );214 void erf_constructor(void); 215 void legacy_constructor(void); 216 void linuxnative_constructor(void); 217 void pcap_constructor(void); 218 void pcapfile_constructor(void); 219 void rt_constructor(void); 220 void wag_constructor(void); 221 void duck_constructor(void); 222 222 223 223 /* call all the constructors if they haven't yet all been called */ 224 void trace_init(void)224 static void trace_init(void) 225 225 { 226 226 if (!formats_list) { … … 602 602 * @author Shane Alcock 603 603 * */ 604 DLLEXPORT void trace_destroy_output(libtrace_out_t *libtrace) { 604 DLLEXPORT void trace_destroy_output(libtrace_out_t *libtrace) 605 { 605 606 assert(libtrace); 606 607 libtrace->format->fin_output(libtrace); … … 609 610 } 610 611 611 DLLEXPORT libtrace_packet_t *trace_create_packet() { 612 DLLEXPORT libtrace_packet_t *trace_create_packet(void) 613 { 612 614 libtrace_packet_t *packet = 613 615 (libtrace_packet_t*)calloc(1,sizeof(libtrace_packet_t)); … … 997 999 #ifdef HAVE_BPF 998 1000 void *linkptr = 0; 999 int clen = 0;1001 unsigned int clen = 0; 1000 1002 bool free_packet_needed = false; 1001 1003 int ret; 1004 libtrace_packet_t *packet_copy = packet; 1005 1002 1006 assert(filter); 1003 1007 assert(packet); 1004 libtrace_packet_t *packet_copy = packet; 1005 1006 1007 if (libtrace_to_pcap_dlt(trace_get_link_type(packet))==~0) { 1008 1009 if (libtrace_to_pcap_dlt(trace_get_link_type(packet))==~0U) { 1008 1010 /* Copy the packet, as we don't want to trash the one we 1009 1011 * were passed in … … 1012 1014 free_packet_needed=true; 1013 1015 while (libtrace_to_pcap_dlt(trace_get_link_type(packet_copy))== 1014 ~0 ) {1016 ~0U) { 1015 1017 if (!demote_packet(packet_copy)) { 1016 trace_set_err _out(packet->trace,1018 trace_set_err(packet->trace, 1017 1019 TRACE_ERR_NO_CONVERSION, 1018 1020 "pcap does not support this format");
Note: See TracChangeset
for help on using the changeset viewer.