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] How to extract data from earlier dissectors for the same pack

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

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Sun, 11 Mar 2001 22:25:04 +1000
At 10:02 PM 3/11/01 +1100, Ronnie Sahlberg wrote:
>
>Hi,
>
>I am playing with a dissector, however, when dissecting the packets in this
>protocol
>it would be very convenient to have access to the data extracted by
>lower-layer dissectors for
>thge same packet.
>Is this possible, and how would I access this data?
>
>Assume I dissect a layer-5 protocol, would it be possible from this
>dissector to access
>say the ip.saddr  field of the underlying ip-dissector which has already
>dissected the ip-layer?

There is a global that gives you access to this stuff ... Have a look at
the IP and TCP dissectors ...

>Something like
>ptr=find_value_in_packet(current_packet_id(),"ip.saddr");

I don't think we have gotten around to that yet.

What dissector are you doing?

>---
>second question,
>assume I would need to reset some datastructures before a capture is started
>or loaded from file,
>is there a common routine where I can add calls to my "clean up previous"
>and "prepare for new data"
>routines?
>
>best regards   ronnie s
>
>
>_______________________________________________
>Ethereal-dev mailing list
>Ethereal-dev@xxxxxxxxxxxx
>http://www.ethereal.com/mailman/listinfo/ethereal-dev
>

Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx
Samba (Team member, www.samba.org), Ethereal (Team member, www.ethereal.com)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba