Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

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: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 23 Jul 2003 02:36:06 -0700
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?

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".