3eaec44515d9c4112202e9e1225b28cd3961dba1
[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.
50
51 If the B<-s> flag is used to specify a snapshot length, frames in the
52 input file with more captured data than the specified snapshot length
53 will have only the amount of data specified by the snapshot length
54 written to the output file.  This may be useful if the program that is
55 to read the output file cannot handle packets larger than a certain size
56 (for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6
57 appear to reject Ethernet frames larger than the standard Ethernet MTU,
58 making them incapable of handling gigabit Ethernet captures if jumbo
59 frames were used).
60
61 If the B<-T> flag is used to specify an encapsulation type, the
62 encapsulation type of the output capture file will be forced to the
63 specified type, rather than being the type appropriate to the
64 encapsulation type of the input capture file.  Note that this merely
65 forces the encapsulation type of the output file to be the specified
66 type; the packet headers of the packets will not be translated from the
67 encapsulation type of the input capture file to the specified
68 encapsulation type (for example, it will not translate an Ethernet
69 capture to an FDDI capture if an Ethernet capture is read and 'B<-T
70 fddi>' is specified).
71
72 =head1 OPTIONS
73
74 =over 4
75
76 =item -F
77
78 Sets the file format of the output capture file.
79
80 =item -T
81
82 Sets the packet encapsulation type of the output capture file.
83
84 =item -r
85
86 Causes the packets whose packet numbers are specified on the command
87 line to be written to the output capture file, and no other packets to
88 be written to the output capture file.
89
90 =item -v
91
92 Causes B<editcap> to print a number of messages while it's working.
93
94 =item -s
95
96 Sets the snapshot length to use when writing the data.
97
98 =item -h
99
100 Prints the version and options and exits.
101
102 =head1 SEE ALSO
103
104 L<tcpdump(8)>, L<pcap(3)>, L<ethereal(1)>
105
106 =head1 NOTES
107
108 B<Editcap> is part of the B<Ethereal> distribution.  The latest version
109 of B<Ethereal> can be found at B<http://ethereal.zing.org>.
110
111 =head1 AUTHORS
112
113   Original Author
114   -------- ------
115   Richard Sharpe           <sharpe@ns.aus.com>
116
117
118   Contributors
119   ------------
120   Guy Harris               <guy@alum.mit.edu>