Ethereal-dev: Re: [Ethereal-dev] large-file support?

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

From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Wed, 23 Jul 2003 22:03:22 -0700
Guy Harris wrote:
On Wed, Jul 23, 2003 at 00:34:08 -0700, Ben Greear wrote:

Any particular reason why tethereal does not try to open
files with O_LARGEFILE?


Because not all systems on which Ethereal/Tethereal run *have*
O_LARGEFILE, and nobody's written any code that allows it to use
O_LARGEFILE on systems that support it?

How about making -r -
read from standard-input.  Then, one could cat large files into
ethereal like that.  It may still fail at the 2G mark, but it would
be better than nothing.  This works with tcpdump, though tcpdump
cannot open a large file on it's own either.


Note also that Wiretap (which Ethereal and Tethereal use to read capture
files) currently uses "long" as the data type for offsets in files; it
uses "standard I/O library" routines such as "fread()", "fseek()", and
so on to read the files, *and* requires that file offsets be guaranteed
to have integral data types (so it can't rely on routines like
"fsetpos()" unless we can be sure that on all UNIXes *AND* on Windows an
"fpos_t" is an integral data type), so it uses "long" as that's the data
type those routines use for file offsets.  Some other scheme would be
needed in order to handle large files.

In addition, note also that it currently uses zlib to read gzipped
files, and zlib also uses "long"s as file offsets on many machines.

So one reason is "it's not as easy as somebody might think".

Fair enough, I was not sure that seeks would be needed, but if they
are, then it becomes more difficult to play with large files.

Thanks,
Ben


--
Ben Greear <greearb@xxxxxxxxxxxxxxx>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear