Ethereal-dev: Re: [Ethereal-dev] How to convert one file to libpcap file format?
Yiqiang Chen wrote:
(1) I need to convert one binary log file to libpcap file format, so
that I can use Ethereal to open this file and analyze the raw data in my
log file.
How to convert binary log file to libpcap file format?
I build Ethereal executable for Ethereal source code. Is there any
function which can be used to convert any file to
libpcap file format?
Convert *any* file? I suspect not - it's probably difficult to convert
a Flash animation file to libpcap format. :-)
If you mean "convert any file containing a network traffic capture to
libpcap format", then, as long as
1) the link-layer information corresponds to a link-layer type
supported by libpcap (e.g., Ethernet);
2) any additional per-packet or per-file information is either
supported by libpcap format or can be discarded from the file without
making what remains in the file unusable for your purposes;
then it shold be possible.
Ethereal's "editcap" program can be used to convert capture files from
one format to another. However, the way that's done is to add to
Ethereal's Wiretap library the ability to read the format from which
you're converting - and if you do that, then Ethereal will be able to
read your captures *without* converting the file (which also means that
you could add support even if 1) or 2) above isn't true).
What is the format of the binary log file?