Ethereal-dev: Re: [ethereal-dev] Patch to remove pseudo-header from "frame_data" structure

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Tue, 2 May 2000 12:01:31 -0500
On Mon, May 01, 2000 at 01:34:27AM -0500, Guy Harris wrote:
> 
> 
> This patch removes the pseudo-header from the "frame_data" structure, to
> reduce the memory use for those structures (which is probably
> significant for very large capture files).

Great!
 
> 
> Pushing more of the "seek and read" function into Wiretap might also
> make it easier to add support for new forms of compression (e.g., for
> reading compressed Sniffer files, or reading bzip2'ed files as per Doug
> Nazar's comment a while ago).

Yes, that approach is cleaner.
 
> I've tested it on most capture file types; I have no nettl files on
> which to test it, so I was unable to test that.
> 
>  - patch

I've tested it on the files I have; they all work. I too don't have
a nettl file available.

BTW,

I noticed the addition of the "pseudo_header" argument to
dissect_packet() and to a few other dissectors. Once I start merging in
my changes for "tvbuff", I'm going to provide a new struct called "dissection"
which contains information that is relevant for all dissectors of a single
frame but is not needed in frame_data. This includes:

	pi
	cinfo (moved from frame_data)
	pseudo_header (your new addition)

The call to a dissector will then look like:

	dissect_packet(tvbuff, tree, dissection)

I might put 'tree' into dissection as well.

--gilbert