MAN page from RedHat 7.X ethereal-0.8.20-1.i386.rpm


Section: The Ethereal Network Analyzer (1)
Updated: 0.8.20


editcap - Edit and/or translate the format of capture files 


editcap-F file format ][ -T encapsulation type ][ -r ][ -v ][ -s snaplen ][ -t time adjustment ][ -h ]infileoutfilerecord# ... ] 


Editcap is a program that reads a saved capture file and writes someor all of the packets in that capture file to another capture file. Editcap knows how to read libpcap capture files, including thoseof tcpdump. In addition, Editcap can read capture files fromsnoop (including Shomiti) and atmsnoop, LanAlyzer,Sniffer (compressed or uncompressed), Microsoft Network Monitor,AIX's iptrace, NetXray, Sniffer Pro, RADCOM's WAN/LANanalyzer, Lucent/Ascend router debug output, HP-UX's nettl, andthe dump output from Toshiba's ISDN routers. There is no need totell Editcap what type of file you are reading; it will determine thefile type by itself. Editcap is also capable of reading any of thesefile formats if they are compressed using gzip. Editcap recognizesthis directly from the file; the '.gz' extension is not required forthis purpose.

By default, it writes the capture file in libpcap format, and writesall of the packets in the capture file to the output file. The -Fflag can be used to specify the format in which to write the capturefile; it can write the file in libpcap format (standard libpcapformat, a modified format used by some patched versions of libpcap,the format used by Red Hat Linux 6.1, or the format used by SuSE Linux6.3), snoop format, uncompressed Sniffer format, MicrosoftNetwork Monitor 1.x format, and the format used by Windows-basedversions of the Sniffer software.

A list of packet numbers can be specified on the command line; thepackets with those numbers will not be written to the capture file,unless the -r flag is specified, in which case only those packetswill be written to the capture file. Ranges of packet numbers can bespecified as start-end, referring to all packets from start toend (removing them all if -r isn't specified, including them allif -r is specified).

If the -s flag is used to specify a snapshot length, frames in theinput file with more captured data than the specified snapshot lengthwill have only the amount of data specified by the snapshot lengthwritten to the output file. This may be useful if the program that isto read the output file cannot handle packets larger than a certain size(for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6appear to reject Ethernet frames larger than the standard Ethernet MTU,making them incapable of handling gigabit Ethernet captures if jumboframes were used).

If the -t flag is used to specify a time adjustment, the specifiedadjustment will be applied to all selected frames in the capture file.The adjustment is specified as [-]seconds[.fractional seconds].For example, -t 3600 advances the timestamp on selected frames by onehour while -t -0.5 reduces the timestamp on selected frames byone-half second. This feature is useful when synchronizing dumpscollected on different machines where the time difference between thetwo machines is known or can be estimated.

If the -T flag is used to specify an encapsulation type, theencapsulation type of the output capture file will be forced to thespecified type, rather than being the type appropriate to theencapsulation type of the input capture file. Note that this merelyforces the encapsulation type of the output file to be the specifiedtype; the packet headers of the packets will not be translated from theencapsulation type of the input capture file to the specifiedencapsulation type (for example, it will not translate an Ethernetcapture to an FDDI capture if an Ethernet capture is read and '-Tfddi' is specified). 


Sets the file format of the output capture file.
Sets the packet encapsulation type of the output capture file.
Causes the packets whose packet numbers are specified on the commandline to be written to the output capture file, and no other packets tobe written to the output capture file.
Causes editcap to print a number of messages while it's working.
Sets the snapshot length to use when writing the data.
Sets the time adjustment to use on selected frames.
Prints the version and options and exits.


tcpdump(8), pcap(3), ethereal(1), mergecap(1) 


Editcap is part of the Ethereal distribution. The latest versionof Ethereal can be found at 


  Original Author  -------- ------  Richard Sharpe           <>
  Contributors  ------------  Guy Harris               <>




This document was created byman2html,using the manual pages.