Changeset 747c501
- Timestamp:
- 04/27/06 00:48:42 (15 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:
- e641bdc
- Parents:
- d97bbb2
- Location:
- lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_erf.c
re4ebf84 r747c501 382 382 383 383 static int erf_init_output(libtrace_out_t *libtrace) { 384 libtrace->format_data = calloc(1,sizeof(struct erf_format_data_out_t));384 libtrace->format_data = malloc(sizeof(struct erf_format_data_out_t)); 385 385 386 386 OPTIONS.erf.level = 0; -
lib/format_pcap.c
r91db67b r747c501 235 235 } 236 236 237 static int pcap int_pause_input(libtrace_t *libtrace)237 static int pcap_pause_input(libtrace_t *libtrace) 238 238 { 239 239 pcap_close(INPUT.pcap); … … 242 242 } 243 243 244 244 245 static int pcap_fin_input(libtrace_t *libtrace) 245 246 { 247 pcap_close(INPUT.pcap); 246 248 free(libtrace->format_data); 247 249 return 0; /* success */ … … 554 556 pcapint_config_input, /* config_input */ 555 557 pcapint_start_input, /* start_input */ 556 pcap int_pause_input, /* pause_input */558 pcap_pause_input, /* pause_input */ 557 559 pcapint_init_output, /* init_output */ 558 560 NULL, /* config_output */ -
lib/format_wag.c
r4315572b r747c501 116 116 static int wtf_init_input(struct libtrace_t *libtrace) 117 117 { 118 libtrace->format_data = malloc(sizeof(struct wag_format_data_t));118 libtrace->format_data = calloc(1,sizeof(struct wag_format_data_t)); 119 119 return 0; 120 120 } … … 133 133 134 134 static int wtf_init_output(struct libtrace_out_t *libtrace) { 135 libtrace->format_data = calloc(1,sizeof(struct wag_format_data_out_t));135 libtrace->format_data = malloc(sizeof(struct wag_format_data_out_t)); 136 136 137 137 OUTPUT.file = 0; -
lib/libtrace.h
r7fc01569 r747c501 1123 1123 DLLEXPORT int trace_bpf_filter(libtrace_filter_t *filter, 1124 1124 const libtrace_packet_t *packet); 1125 1126 /** destory of BPF filter 1127 * @param filter the filter opaque pointer 1128 * Deallocate all the resources associated with a BPF filter 1129 */ 1130 DLLEXPORT void trace_destroy_bpf(libtrace_filter_t *filter); 1125 1131 /*@}*/ 1126 1132 -
lib/trace.c
rd97bbb2 r747c501 922 922 DLLEXPORT struct libtrace_filter_t *trace_bpf_setfilter(const char *filterstring) { 923 923 #if HAVE_BPF 924 structlibtrace_filter_t *filter = (struct libtrace_filter_t*)924 libtrace_filter_t *filter = (struct libtrace_filter_t*) 925 925 malloc(sizeof(struct libtrace_filter_t)); 926 926 filter->filterstring = strdup(filterstring); … … 931 931 return 0; 932 932 #endif 933 } 934 935 DLLEXPORT void trace_destroy_bpf(libtrace_filter_t *filter) 936 { 937 free(filter->filterstring); 938 if (filter->flag) 939 pcap_freecode(&filter->filter); 940 free(filter); 933 941 } 934 942
Note: See TracChangeset
for help on using the changeset viewer.