DBS Etherwatch wiretap module, from Marc Milgram.
[metze/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<-t> time adjustment ]>
15 S<[ B<-h> ]>
16 I<infile>
17 I<outfile>
18 S<[ I<record#> ... ]>
19
20 =head1 DESCRIPTION
21
22 B<Editcap> is a program that reads a saved capture file and writes some
23 or all of the packets in that capture file to another capture file. 
24 B<Editcap> knows how to read B<libpcap> capture files, including those
25 of B<tcpdump>.  In addition, B<Editcap> can read capture files from
26 B<snoop> (including B<Shomiti>) and B<atmsnoop>, B<LanAlyzer>,
27 B<Sniffer> (compressed or uncompressed), Microsoft B<Network Monitor>,
28 AIX's B<iptrace>, B<NetXray>, B<Sniffer Pro>, B<Etherpeek>, B<RADCOM>'s
29 WAN/LAN analyzer, B<Lucent/Ascend> router debug output, HP-UX's
30 B<nettl>, the dump output from B<Toshiba's> ISDN routers, the output
31 from B<i4btrace> from the ISDN4BSD project, the output in B<IPLog>
32 format from the Cisco Secure Intrusion Detection System, B<pppd logs>
33 (pppdump format), the output from VMS's B<TCPIPtrace> utility, and the
34 text output from the B<DBS Etherwatch> VMS utility.  There is no need to
35 tell B<Editcap> what type of file you are reading; it will determine the
36 file type by itself.  B<Editcap> is also capable of reading any of these
37 file formats if they are compressed using gzip.  B<Editcap> recognizes
38 this directly from the file; the '.gz' extension is not required for this
39 purpose.
40
41 By default, it writes the capture file in B<libpcap> format, and writes
42 all of the packets in the capture file to the output file.  The B<-F>
43 flag can be used to specify the format in which to write the capture
44 file; it can write the file in B<libpcap> format (standard B<libpcap>
45 format, a modified format used by some patched versions of B<libpcap>,
46 the format used by Red Hat Linux 6.1, or the format used by SuSE Linux
47 6.3), B<snoop> format, uncompressed B<Sniffer> format, Microsoft
48 B<Network Monitor> 1.x format, and the format used by Windows-based
49 versions of the B<Sniffer> software.
50
51 A list of packet numbers can be specified on the command line; the
52 packets with those numbers will I<not> be written to the capture file,
53 unless the B<-r> flag is specified, in which case I<only> those packets
54 will be written to the capture file.  Ranges of packet numbers can be
55 specified as I<start>-I<end>, referring to all packets from I<start> to
56 I<end> (removing them all if B<-r> isn't specified, including them all
57 if B<-r> is specified).
58
59 If the B<-s> flag is used to specify a snapshot length, frames in the
60 input file with more captured data than the specified snapshot length
61 will have only the amount of data specified by the snapshot length
62 written to the output file.  This may be useful if the program that is
63 to read the output file cannot handle packets larger than a certain size
64 (for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6
65 appear to reject Ethernet frames larger than the standard Ethernet MTU,
66 making them incapable of handling gigabit Ethernet captures if jumbo
67 frames were used).
68
69 If the B<-t> flag is used to specify a time adjustment, the specified
70 adjustment will be applied to all selected frames in the capture file.
71 The adjustment is specified as [-]I<seconds>[I<.fractional seconds>].
72 For example, B<-t> 3600 advances the timestamp on selected frames by one
73 hour while B<-t> -0.5 reduces the timestamp on selected frames by
74 one-half second.  This feature is useful when synchronizing dumps
75 collected on different machines where the time difference between the
76 two machines is known or can be estimated.
77
78 If the B<-T> flag is used to specify an encapsulation type, the
79 encapsulation type of the output capture file will be forced to the
80 specified type, rather than being the type appropriate to the
81 encapsulation type of the input capture file.  Note that this merely
82 forces the encapsulation type of the output file to be the specified
83 type; the packet headers of the packets will not be translated from the
84 encapsulation type of the input capture file to the specified
85 encapsulation type (for example, it will not translate an Ethernet
86 capture to an FDDI capture if an Ethernet capture is read and 'B<-T
87 fddi>' is specified).
88
89 =head1 OPTIONS
90
91 =over 4
92
93 =item -F
94
95 Sets the file format of the output capture file.
96
97 =item -T
98
99 Sets the packet encapsulation type of the output capture file.
100
101 =item -r
102
103 Causes the packets whose packet numbers are specified on the command
104 line to be written to the output capture file, and no other packets to
105 be written to the output capture file.
106
107 =item -v
108
109 Causes B<editcap> to print a number of messages while it's working.
110
111 =item -s
112
113 Sets the snapshot length to use when writing the data.
114
115 =item -t
116
117 Sets the time adjustment to use on selected frames.
118
119 =item -h
120
121 Prints the version and options and exits.
122
123 =head1 SEE ALSO
124
125 L<tcpdump(8)>, L<pcap(3)>, L<ethereal(1)>, L<mergecap(1)>
126
127 =head1 NOTES
128
129 B<Editcap> is part of the B<Ethereal> distribution.  The latest version
130 of B<Ethereal> can be found at B<http://www.ethereal.com>.
131
132 =head1 AUTHORS
133
134   Original Author
135   -------- ------
136   Richard Sharpe           <sharpe@ns.aus.com>
137
138
139   Contributors
140   ------------
141   Guy Harris               <guy@alum.mit.edu>