4 editcap - Edit and/or translate the format of capture files
9 S<[ B<-F> file format ]>
10 S<[ B<-T> encapsulation type ]>
14 S<[ B<-t> time adjustment ]>
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<RADCOM>'s WAN/LAN
29 analyzer, B<Lucent/Ascend> router debug output, HP-UX's B<nettl>, and
30 the dump output from B<Toshiba's> ISDN routers. There is no need to
31 tell B<Editcap> what type of file you are reading; it will determine the
32 file type by itself. B<Editcap> is also capable of reading any of these
33 file formats if they are compressed using gzip. B<Editcap> recognizes
34 this directly from the file; the '.gz' extension is not required for
37 By default, it writes the capture file in B<libpcap> format, and writes
38 all of the packets in the capture file to the output file. The B<-F>
39 flag can be used to specify the format in which to write the capture
40 file; it can write the file in B<libpcap> format (standard B<libpcap>
41 format, a modified format used by some patched versions of B<libpcap>,
42 the format used by Red Hat Linux 6.1, or the format used by SuSE Linux
43 6.3), B<snoop> format, uncompressed B<Sniffer> format, Microsoft
44 B<Network Monitor> 1.x format, and the format used by Windows-based
45 versions of the B<Sniffer> software.
47 A list of packet numbers can be specified on the command line; the
48 packets with those numbers will I<not> be written to the capture file,
49 unless the B<-r> flag is specified, in which case I<only> those packets
50 will be written to the capture file. Ranges of packet numbers can be
51 specified as I<start>-I<end>, referring to all packets from I<start> to
52 I<end> (removing them all if B<-r> isn't specified, including them all
53 if B<-r> is specified).
55 If the B<-s> flag is used to specify a snapshot length, frames in the
56 input file with more captured data than the specified snapshot length
57 will have only the amount of data specified by the snapshot length
58 written to the output file. This may be useful if the program that is
59 to read the output file cannot handle packets larger than a certain size
60 (for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6
61 appear to reject Ethernet frames larger than the standard Ethernet MTU,
62 making them incapable of handling gigabit Ethernet captures if jumbo
65 If the B<-t> flag is used to specify a time adjustment, the specified
66 adjustment will be applied to all selected frames in the capture file.
67 The adjustment is specified as [-]I<seconds>[I<.fractional seconds>].
68 For example, B<-t> 3600 advances the timestamp on selected frames by one
69 hour while B<-t> -0.5 reduces the timestamp on selected frames by
70 one-half second. This feature is useful when synchronizing dumps
71 collected on different machines where the time difference between the
72 two machines is known or can be estimated.
74 If the B<-T> flag is used to specify an encapsulation type, the
75 encapsulation type of the output capture file will be forced to the
76 specified type, rather than being the type appropriate to the
77 encapsulation type of the input capture file. Note that this merely
78 forces the encapsulation type of the output file to be the specified
79 type; the packet headers of the packets will not be translated from the
80 encapsulation type of the input capture file to the specified
81 encapsulation type (for example, it will not translate an Ethernet
82 capture to an FDDI capture if an Ethernet capture is read and 'B<-T
91 Sets the file format of the output capture file.
95 Sets the packet encapsulation type of the output capture file.
99 Causes the packets whose packet numbers are specified on the command
100 line to be written to the output capture file, and no other packets to
101 be written to the output capture file.
105 Causes B<editcap> to print a number of messages while it's working.
109 Sets the snapshot length to use when writing the data.
113 Sets the time adjustment to use on selected frames.
117 Prints the version and options and exits.
121 L<tcpdump(8)>, L<pcap(3)>, L<ethereal(1)>, L<mergecap(1)>
125 B<Editcap> is part of the B<Ethereal> distribution. The latest version
126 of B<Ethereal> can be found at B<http://www.ethereal.com>.
132 Richard Sharpe <sharpe@ns.aus.com>
137 Guy Harris <guy@alum.mit.edu>