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] Accessing parent protocol header values in proto_tree.

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

From: "Lars Ruoff" <lars.ruoff@xxxxxxxxxxxxxxxxxx>
Date: Wed, 3 Mar 2004 17:52:27 +0100
> |I need a value that is in a lower level protocols header.
> |Example:
> |IP->UDP->RTP->H.263, from the H.263 dissector i need to know
> |the rtp.marker value stored in the RTP header;
> |which is the best way?
> |Should I search the proto_tree with a g_node_find() function,
> |or is there a better way I am missing?
>
> You may want to use the private_data member (data type: void *) of the
> packet_info struct. You can define a data structure in the RTP dissector
> source, and share that with the H.263 dissector. You have to ensure that
you
> then always initialize the private_data member of the packet_info
structure,
> so that your H.263 dissector doesn't try accessing invalid data though.

...and that data structure already exists:
see struct _rtp_info in packet-rtp.h
and it is always initialized by the rtp dissector.

Lars Ruoff.