- Timestamp:
- 03/17/06 13:23:36 (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:
- ed636fb4
- Parents:
- 72cc9cc
- Location:
- tools/tracesplit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracesplit/tracesplit.c
rd56089a r5ad7ad0 106 106 input=trace_create(argv[optind]); 107 107 108 trace_start(input); 109 108 110 while(1) { 109 111 if (trace_read_packet(input,packet)<1) { … … 164 166 } 165 167 output=trace_create_output(buffer); 168 trace_start_output(output); 166 169 free(buffer); 167 170 } 168 171 169 trace_write_packet(output,packet); 172 if (trace_write_packet(output,packet)==-1) { 173 trace_perror_output(output,"write_packet"); 174 break; 175 } 170 176 } 171 177 -
tools/tracesplit/tracesplit_dir.c
r548da5c r5ad7ad0 1 2 3 1 #include "libtrace.h" 2 #include <stdio.h> 4 3 5 4 … … 48 47 break; 49 48 50 printf("%d\n", trace_get_direction(packet));51 49 switch(trace_get_direction(packet)) { 52 50 case 0: … … 56 54 return 1; 57 55 } 58 trace_write_packet(out_write, packet); 56 if (trace_write_packet(out_write, packet)==-1){ 57 trace_perror_output(in_write,"write"); 58 return 1; 59 } 59 60 break; 60 61 case 1: … … 64 65 return 1; 65 66 } 66 trace_write_packet(in_write, packet); 67 if (trace_write_packet(in_write, packet)==-1) { 68 trace_perror_output(in_write,"write"); 69 return 1; 70 } 67 71 break; 68 72 } … … 74 78 trace_destroy_output(in_write); 75 79 trace_destroy(input); 76 trace_destroy_packet( packet);80 trace_destroy_packet(&packet); 77 81 78 82 return 0;
Note: See TracChangeset
for help on using the changeset viewer.