Ethereal-dev: Re: [Ethereal-dev] Cookbook for adding new file formats?

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

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Mon, 24 Jun 2002 08:15:20 -0500 (CDT)
On Mon, 24 Jun 2002, Guy Harris wrote:

> Unfortunately, we don't have any documentation on how to add support for
> new capture file types.
> 
> The simplest capture file reader is probably the reader for Sun's snoop,
> in "wiretap/snoop.c"; you might look at that module, if the test data
> files are binary files.
> 
> If the test files are text files, with, for example, hex dumps of packet
> data, look at "ascend-*.[chyl]", or "toshiba.c".

If the test files are text files you'd probably be better off looking at
"toshiba.c" instead of "ascend-*.[chyl]".  I used the Ascend parser as an
opportunity to play with flex/lex and yacc/bison.  It's a bit more complex
than it should be as a result.