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

Ethereal-dev: [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: Diwakar Shetty <diwakar@xxxxxxxxxxxxxx>
Date: Thu, 22 Mar 2001 09:33:13 +0600
There is some information which i get during first pass of dissector and
which I have to maintain per packet. This field will be used for later
processing and should not be modified after first pass.

**************************************************
The following code WORKS :

if (pinfo->fd->flags.visited == 0)
            pinfo->fd->old_len = tvb_length_remaining(tvb, offset);
**************************************************
The following code does NOT WORK :

if (pinfo->fd->flags.visited == 0)
            pinfo->old_len = tvb_length_remaining(tvb, offset);

After debugging we saw that pinfo->old_len was getting somehow
reinitialised to zero everytime.
**************************************************

So my two questions are :

* Does the "fd" member of "packet_info" structure always remain in
memory?

* Who is initialising "old_len" field of "packet_info" structure again
and again?  Also we had done initialisation of this field to zero in
"epan/packet.c:  blank_packetinfo();"


Thanks

Diwakar