Ethereal-dev: Re: [Ethereal-dev] use g_hook mechanism in file.c, instead of directly calling m
Ulf Lamping wrote:
While looking at the file.c, I repeatedly ask myself two question:
1.) why do we have separate code for Ethereal and Tethereal for file and
capturing things?
Because Tethereal doesn't need to open the file in "random access
supported" mode (at some point, with a buffering mechanism to let us do
seeks within the portion of the file data that's in the buffer, we might
support non-random-access opens on pipes, so you could pipe a capture
file to Tethereal; random access to a pipe is a bit difficult :-)), and
doesn't need to maintain the linked list of frame_data structures.
Perhaps some of the file.c stuff could be common between Ethereal and
Tethereal, but most of it is Ethereal-specific (a number of routines to
do sequential scanning through packets in a file that's been read in -
but Tethereal doesn't "read in" a file, it just reads packets from the
file without remembering anything about them other than what's
remembered by dissectors).