Changeset 0a65ed8
- Timestamp:
- 04/24/07 14:09:33 (14 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:
- b25f4b0
- Parents:
- 2132cfb
- Location:
- tools/tracesplit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracesplit/tracesplit.1
r634089d r0a65ed8 11 11 [ \fB-e \fRunixtime | \fB--endtime=\fRunixtime] 12 12 [ \fB-m \fRmaxfiles | \fB--maxfiles=\fRmaxfiles] 13 [ \fB-S \fRsnaplen | \fB--snaplen=\fRsnaplen] 13 14 inputuri outputuri ... 14 15 .SH DESCRIPTION … … 44 45 do not create more than "maxfiles" trace files 45 46 47 .TP 48 \fB\-S\fR snaplen 49 Truncate packets to "snaplen" bytes long. 50 46 51 .SH EXAMPLES 47 52 create a 1MB erf trace of port 80 traffic. -
tools/tracesplit/tracesplit.c
r2132cfb r0a65ed8 38 38 "-m --maxfiles=n Create a maximum of n trace files\n" 39 39 "-H --libtrace-help Print libtrace runtime documentation\n" 40 "-S --snaplen Snap packets at the specified length\n" 40 41 ,argv0); 41 42 exit(1); … … 66 67 uint64_t maxfiles = UINT64_MAX; 67 68 uint64_t filescreated = 0; 69 uint16_t snaplen = 0; 68 70 69 71 if (argc<2) { … … 84 86 { "libtrace-help", 0, 0, 'H' }, 85 87 { "maxfiles", 1, 0, 'm' }, 88 { "snaplen", 1, 0, 'S' }, 86 89 { NULL, 0, 0, 0 }, 87 90 }; 88 91 89 int c=getopt_long(argc, argv, "f:c:b:s:e:i:m: H",92 int c=getopt_long(argc, argv, "f:c:b:s:e:i:m:S:H", 90 93 long_options, &option_index); 91 94 … … 107 110 break; 108 111 case 'm': maxfiles=atoi(optarg); 112 break; 113 case 'S': snaplen=atoi(optarg); 109 114 break; 110 115 case 'H': … … 142 147 if (trace_read_packet(input,packet)<1) { 143 148 break; 149 } 150 151 if (snaplen>0) { 152 trace_set_capture_length(packet,snaplen); 144 153 } 145 154
Note: See TracChangeset
for help on using the changeset viewer.