Document that ranges of packet numbers can be specified.
[obnox/wireshark/wip.git] / doc / editcap.pod
1
2 =head1 NAME
3
4 Editcap - Edit and/or translate the format of capture files
5
6 =head1 SYNOPSYS
7
8 B<editcap>
9 S<[ B<-F> file format ]>
10 S<[ B<-T> encapsulation type ]>
11 S<[ B<-r> ]>
12 S<[ B<-v> ]>
13 S<[ B<-s> snaplen ]>
14 S<[ B<-h> ]>
15 I<infile>
16 I<outfile>
17 S<[ I<record#> ... ]>
18
19 =head1 DESCRIPTION
20
21 B<Editcap> is a program that reads a saved capture file and writes some
22 or all of the packets in that capture file to another capture file. 
23 B<Editcap> knows how to read B<libpcap> capture files, including those
24 of B<tcpdump>.  In addition, B<Editcap> can read capture files from
25 B<snoop> (including B<Shomiti>) and B<atmsnoop>, B<LanAlyzer>,
26 B<Sniffer> (compressed or uncompressed), Microsoft B<Network Monitor>,
27 AIX's B<iptrace>, B<NetXray>, B<Sniffer Pro>, B<RADCOM>'s WAN/LAN
28 analyzer, B<Lucent/Ascend> router debug output, HP-UX's B<nettl>, and
29 the dump output from B<Toshiba's> ISDN routers.  There is no need to
30 tell B<Editcap> what type of file you are reading; it will determine the
31 file type by itself.  B<Editcap> is also capable of reading any of these
32 file formats if they are compressed using gzip.  B<Editcap> recognizes
33 this directly from the file; the '.gz' extension is not required for
34 this purpose.
35
36 By default, it writes the capture file in B<libpcap> format, and writes
37 all of the packets in the capture file to the output file.  The B<-F>
38 flag can be used to specify the format in which to write the capture
39 file; it can write the file in B<libpcap> format (standard B<libpcap>
40 format, a modified format used by some patched versions of B<libpcap>,
41 the format used by Red Hat Linux 6.1, or the format used by SuSE Linux
42 6.3), B<snoop> format, uncompressed B<Sniffer> format, Microsoft
43 B<Network Monitor> 1.x format, and the format used by Windows-based
44 versions of the B<Sniffer> software.
45
46 A list of packet numbers can be specified on the command line; the
47 packets with those numbers will I<not> be written to the capture file,
48 unless the B<-r> flag is specified, in which case I<only> those packets
49 will be written to the capture file.  Ranges of packet numbers can be
50 specified as I<start>-I<end>, referring to all packets from I<start> to
51 I<end> (removing them all if B<-r> isn't specified, including them all
52 if B<-r> is specified).
53
54 If the B<-s> flag is used to specify a snapshot length, frames in the
55 input file with more captured data than the specified snapshot length
56 will have only the amount of data specified by the snapshot length
57 written to the output file.  This may be useful if the program that is
58 to read the output file cannot handle packets larger than a certain size
59 (for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6
60 appear to reject Ethernet frames larger than the standard Ethernet MTU,
61 making them incapable of handling gigabit Ethernet captures if jumbo
62 frames were used).
63
64 If the B<-T> flag is used to specify an encapsulation type, the
65 encapsulation type of the output capture file will be forced to the
66 specified type, rather than being the type appropriate to the
67 encapsulation type of the input capture file.  Note that this merely
68 forces the encapsulation type of the output file to be the specified
69 type; the packet headers of the packets will not be translated from the
70 encapsulation type of the input capture file to the specified
71 encapsulation type (for example, it will not translate an Ethernet
72 capture to an FDDI capture if an Ethernet capture is read and 'B<-T
73 fddi>' is specified).
74
75 =head1 OPTIONS
76
77 =over 4
78
79 =item -F
80
81 Sets the file format of the output capture file.
82
83 =item -T
84
85 Sets the packet encapsulation type of the output capture file.
86
87 =item -r
88
89 Causes the packets whose packet numbers are specified on the command
90 line to be written to the output capture file, and no other packets to
91 be written to the output capture file.
92
93 =item -v
94
95 Causes B<editcap> to print a number of messages while it's working.
96
97 =item -s
98
99 Sets the snapshot length to use when writing the data.
100
101 =item -h
102
103 Prints the version and options and exits.
104
105 =head1 SEE ALSO
106
107 L<tcpdump(8)>, L<pcap(3)>, L<ethereal(1)>
108
109 =head1 NOTES
110
111 B<Editcap> is part of the B<Ethereal> distribution.  The latest version
112 of B<Ethereal> can be found at B<http://ethereal.zing.org>.
113
114 =head1 AUTHORS
115
116   Original Author
117   -------- ------
118   Richard Sharpe           <sharpe@ns.aus.com>
119
120
121   Contributors
122   ------------
123   Guy Harris               <guy@alum.mit.edu>