Ethereal-dev: Re: [ethereal-dev] Checked in Wiretap changes to eliminate "ftell()" calls

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: Mon, 30 Aug 1999 12:52:25 -0700 (PDT)
> Does changing that code to
> 
> 	if (wth->file_encap == WTAP_ENCAP_ETHERNET) {
> 		fseek(wth->fh, 294, SEEK_CUR);
> 		wth->data_offset += 294;
> 	} else if (wth->file_encap == WTAP_ENCAP_LAPB) {
> 		fseek(wth->fh, 297, SEEK_CUR);
> 		wth->data_offset += 297;
> 	}
> 
> also work?

Well, it seems to work as well as the vanilla Ethereal 0.7.2 I have here
does...

...unfortunately, that's not very well, as it complains that the file is
truncated, and the time stamps look bogus, as does some of the data.

I note that "radcom.c" doesn't do any "pntoh[ls]()" or "pletoh[ls]()"
calls, which means it'd probably work only on a machine with the same
byte order as the machine that wrote out the data; the RADCOM boxes have
both a RISC processor and a PC in them (at least as I read the stuff on
their Web site), and if the PC is what's writing stuff out, that would
explain why the file doesn't work on the (big-endian) SPARC box I tried
it on.

I'll put "pletoh[ls]()"s in it, and see if that works better.