ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-users: Re: [Ethereal-users] Ethereal version 0.9.1 - foreign file format conversion

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 27 Feb 2002 01:37:28 -0800
On Wed, Feb 27, 2002 at 01:24:54AM -0800, sachindeo.v.chavan@xxxxxxxxxxxxxx wrote:
> I'm unable  to find the ethereal source code.

	http://www.ethereal.com/download.html#sources

It's a gzipped tar file, so you may need the Cygwin tools:

	http://sources.redhat.com/cygwin/

to unpacket it.

> I'm unable to open wiretap.dll in VC++ editor?.

It's a binary file, so that's not surprising.  You want the source code.

> And what lines should I write in wiretap library?

You'd create a file in the "wiretap" directory with a name such as
"tla.c".  It'd contain:

	A "tla_open()" routine, which takes a "wtap *" and an "int *" as
	arguments.   "wtap" is a structure defined in "wtap-int.h",
	which refers to an open capture file, and the "wtap *" points to
	the structure for the file being opened.

	That routine would try to read from the file (using the
	"file_read()" routine, defined in the wiretap code) enough
	information from the file to determine whether it's a Tektronix
	logic analyzer file (if, for example, those files start with a
	"signature" or "magic number" in the form of a standard constant
	value, it could check that signature) and, if it is, then set up
	other items in the "wtap" structure - including a possible
	private data structure containing information specific to that
	file format.

	If the attempt to open the file succeeds, it'd return 1.

	If the attempt to open the file finds that it's not a Tektronix
	logic analyzer file, it'd return 0.

	If it gets an error, it'd return -1 and set the "int" pointed to
	by the second argument to an error indication.

and:

	a "tla_read()" routine, which takes a "wtap *", an "int *", and
	a "long *" as arguments.

	That routine reads the next packet record from the file.

See some of the other files in that directory for examples.

> Should I just mention our file format?

If you send me a description of the file format - and some sample files,
for testing - I can write "tla.c" for you.