Ethereal-dev: Re: [Ethereal-dev] packet_info v/s frame_data

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Wed, 21 Mar 2001 22:10:04 -0800
> * Does the "fd" member of "packet_info" structure always remain in
> memory?

The "fd" member of the "packet_info" structure is always in memory.

But what you probably meant to ask was "does the 'frame_data' structure
*pointed to by* the 'fd' member of the 'packet_info' structure always
remain in memory?".  The answer to that question is also "yes".

But you shouldn't be adding your own fields to it for the use of a
particular protocol; instead, use the mechanisms that were put into
Ethereal precisely for the purpose of allowing dissectors to attach
their own data to frames, as per my previous mail.

> * Who is initialising "old_len" field of "packet_info" structure again
> and again?

There is only one "packet_info" structure in Ethereal - there is *NOT*
one structure for each frame.  As such, you cannot use it to store
per-frame data.

There is one "frame_data" structure per frame, but, as per my previous
mail, you should not be adding your own fields to it for the benefit of
particular dissectors.  Use "p_add_proto_data()" and
"p_get_proto_data()" instead.