Ethereal-dev: Re: [Ethereal-dev] Wiretap patch to add Visual Networks file type

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 4 Dec 2001 14:30:53 -0800 (PST)
> This patch adds support to wiretap for Visual Networks traffic capture
> files.

Checked in.

> A sample HTTP capture file is also included.  The code
> has been tested Linux on an Intel platform.  I don't have
> access to a big-endian machine to test that all of the bytes
> were swapped correctly in all places.  If anyone can verify
> this, please drop me a note.

Yes, it read fine on a Solaris/SPARC machine here (SPARC is big-endian).

However, you were swapping bytes incorrectly in the routine to *write* a
Visual Networks file - you were byte-swapping the values to be stored in
the "encap_hint" field, but that's a one-byte field, so it doesn't need
to be byte-swapped, and byte-swapping the values with "htoles()" puts 0
in the lower byte, meaning the value would always be set to 0 on a
big-endian platform.

> Please let me know if I need to submit any other files.
> Makefile.am seemed to be the only build file that changed.

No, you also need to change "Makefile.nmake", so that it builds with
Visual C++ as well.  (I've checked that change in.)