Ethereal-dev: Re: [Ethereal-dev] How to convert one file to libpcap file format?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sat, 30 Apr 2005 03:03:17 +0200
Yiqiang Chen wrote:

> Hi,
> (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?
> (2) When I caputure the packet using Ethereal, which function in
> Ethereal source code is used to save the file in libpcap format?
>
> (3) Where can I get the information or documentation for the libpcap
> file format (e.g. content of the  header, payload, ...)?
>
All of this is done in the wiretap library. This lib handles the various
file types Ethereal supports.

Have a look at that dir, the README files might be a good start.

I've never done development in wiretap myself, so I can't give you more
help here.

Regards, ULFL