Ethereal-dev: RE: [Ethereal-dev] Accessing parent protocol header values in pro to_tree.

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

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Wed, 3 Mar 2004 16:59:34 +0100
|From: manlio@xxxxxxxxx
|
|Hi all,
|
|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.

Regards,

Olivier