Changeset 63b9bd4
- Timestamp:
- 04/27/07 23:01:31 (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:
- cbce651
- Parents:
- 466aed6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracesplit/tracesplit_dir.c
r171cc28 r63b9bd4 1 1 #include "libtrace.h" 2 2 #include <stdio.h> 3 #include <inttypes.h> 3 4 5 static uint64_t ignored = 0; 4 6 5 7 static struct libtrace_out_t *create_output(char *uri) { 6 8 struct libtrace_out_t *output = NULL; 7 libtrace_err_t trace_err;8 9 output = trace_create_output(uri); 9 10 if (trace_is_err_output(output)) { … … 54 55 55 56 switch(trace_get_direction(packet)) { 56 case 0:57 case TRACE_DIR_INCOMING: 57 58 if (!out_write) { 58 59 out_write = create_output(argv[3]); … … 65 66 } 66 67 break; 67 case 1:68 case TRACE_DIR_OUTGOING: 68 69 if (!in_write) { 69 70 in_write = create_output(argv[2]); … … 76 77 } 77 78 break; 79 default: 80 ignored++; 78 81 } 79 82 … … 85 88 trace_destroy(input); 86 89 trace_destroy_packet(packet); 90 91 if (ignored) 92 fprintf(stderr,"warning: Ignored %" PRIu64 " packets with unknown directions\n", 93 ignored); 87 94 88 95 return 0;
Note: See TracChangeset
for help on using the changeset viewer.