📄 editcap.html
字号:
Content-type: text/html
<HTML><HEAD><TITLE>Manpage of EDITCAP</TITLE>
</HEAD><BODY>
<H1>EDITCAP</H1>
Section: The Ethereal Network Analyzer
(1)<BR>Updated: 0.8.16<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
Editcap - Edit and/or translate the format of capture files
<A NAME="lbAC"> </A>
<H2>SYNOPSYS</H2>
<A NAME="ixAAC"></A>
<B>editcap</B>
[ <B>-F</B> file format ]
[ <B>-T</B> encapsulation type ]
[ <B>-r</B> ]
[ <B>-v</B> ]
[ <B>-s</B> snaplen ]
[ <B>-h</B> ]
<I>infile</I>
<I>outfile</I>
[ <I>record#</I> ... ]
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<A NAME="ixAAD"></A>
<B>Editcap</B> is a program that reads a saved capture file and writes some
or all of the packets in that capture file to another capture file.
<B>Editcap</B> knows how to read <B>libpcap</B> capture files, including those
of <B>tcpdump</B>. In addition, <B>Editcap</B> can read capture files from
<B>snoop</B> (including <B>Shomiti</B>) and <B>atmsnoop</B>, <B>LanAlyzer</B>,
<B>Sniffer</B> (compressed or uncompressed), Microsoft <B>Network Monitor</B>,
<FONT SIZE="-1">AIX</FONT>'s <B>iptrace</B>, <B>NetXray</B>, <B>Sniffer Pro</B>, <B></B><FONT SIZE="-1"><B>RADCOM</B></FONT><B></B>'s <FONT SIZE="-1">WAN/LAN</FONT>
analyzer, <B>Lucent/Ascend</B> router debug output, <FONT SIZE="-1">HP-UX</FONT>'s <B>nettl</B>, and
the dump output from <B>Toshiba's</B> <FONT SIZE="-1">ISDN</FONT> routers. There is no need to
tell <B>Editcap</B> what type of file you are reading; it will determine the
file type by itself. <B>Editcap</B> is also capable of reading any of these
file formats if they are compressed using gzip. <B>Editcap</B> recognizes
this directly from the file; the '.gz' extension is not required for
this purpose.
<P>
By default, it writes the capture file in <B>libpcap</B> format, and writes
all of the packets in the capture file to the output file. The <B>-F</B>
flag can be used to specify the format in which to write the capture
file; it can write the file in <B>libpcap</B> format (standard <B>libpcap</B>
format, a modified format used by some patched versions of <B>libpcap</B>,
the format used by Red Hat Linux 6.1, or the format used by SuSE Linux
6.3), <B>snoop</B> format, uncompressed <B>Sniffer</B> format, Microsoft
<B>Network Monitor</B> 1.x format, and the format used by Windows-based
versions of the <B>Sniffer</B> software.
<P>
A list of packet numbers can be specified on the command line; the
packets with those numbers will <I>not</I> be written to the capture file,
unless the <B>-r</B> flag is specified, in which case <I>only</I> those packets
will be written to the capture file. Ranges of packet numbers can be
specified as <I>start</I>-<I>end</I>, referring to all packets from <I>start</I> to
<I>end</I> (removing them all if <B>-r</B> isn't specified, including them all
if <B>-r</B> is specified).
<P>
If the <B>-s</B> flag is used to specify a snapshot length, frames in the
input file with more captured data than the specified snapshot length
will have only the amount of data specified by the snapshot length
written to the output file. This may be useful if the program that is
to 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.6
appear to reject Ethernet frames larger than the standard Ethernet <FONT SIZE="-1">MTU</FONT>,
making them incapable of handling gigabit Ethernet captures if jumbo
frames were used).
<P>
If the <B>-T</B> flag is used to specify an encapsulation type, the
encapsulation type of the output capture file will be forced to the
specified type, rather than being the type appropriate to the
encapsulation type of the input capture file. Note that this merely
forces the encapsulation type of the output file to be the specified
type; the packet headers of the packets will not be translated from the
encapsulation type of the input capture file to the specified
encapsulation type (for example, it will not translate an Ethernet
capture to an <FONT SIZE="-1">FDDI</FONT> capture if an Ethernet capture is read and '<B>-T
fddi</B>' is specified).
<A NAME="lbAE"> </A>
<H2>OPTIONS</H2>
<A NAME="ixAAE"></A>
<BR>
<DL COMPACT>
<DT>-F<DD>
<A NAME="ixAAF"></A>
Sets the file format of the output capture file.
<BR>
<DT>-T<DD>
<A NAME="ixAAG"></A>
Sets the packet encapsulation type of the output capture file.
<BR>
<DT>-r<DD>
<A NAME="ixAAH"></A>
Causes the packets whose packet numbers are specified on the command
line to be written to the output capture file, and no other packets to
be written to the output capture file.
<BR>
<DT>-v<DD>
<A NAME="ixAAI"></A>
Causes <B>editcap</B> to print a number of messages while it's working.
<BR>
<DT>-s<DD>
<A NAME="ixAAJ"></A>
Sets the snapshot length to use when writing the data.
<BR>
<DT>-h<DD>
<A NAME="ixAAK"></A>
Prints the version and options and exits.
</DL>
<A NAME="lbAF"> </A>
<H2>SEE ALSO</H2>
<A NAME="ixAAL"></A>
<I><A HREF="http://localhost/cgi-bin/man/man2html?8+tcpdump">tcpdump</A></I>(8), <I><A HREF="http://localhost/cgi-bin/man/man2html?3+pcap">pcap</A></I>(3), <I><A HREF="http://localhost/cgi-bin/man/man2html?1+ethereal">ethereal</A></I>(1)
<A NAME="lbAG"> </A>
<H2>NOTES</H2>
<A NAME="ixAAM"></A>
<B>Editcap</B> is part of the <B>Ethereal</B> distribution. The latest version
of <B>Ethereal</B> can be found at <B><A HREF="http://www.ethereal.com">http://www.ethereal.com</A></B>.
<A NAME="lbAH"> </A>
<H2>AUTHORS</H2>
<A NAME="ixAAN"></A>
<PRE>
Original Author
-------- ------
Richard Sharpe <<A HREF="mailto:sharpe@ns.aus.com">sharpe@ns.aus.com</A>>
</PRE>
<PRE>
Contributors
------------
Guy Harris <<A HREF="mailto:guy@alum.mit.edu">guy@alum.mit.edu</A>>
</PRE>
<P>
<HR>
<A NAME="index"> </A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSYS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">SEE ALSO</A><DD>
<DT><A HREF="#lbAG">NOTES</A><DD>
<DT><A HREF="#lbAH">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: GMT, March 09, 2001
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -