Wireshark mailing list archives
Re: query proto tree within dissector
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Fri, 23 Oct 2009 11:11:56 -0400
Fruehwirth () gmail com wrote:
Hi, my custom dissector defines some subtrees. I added custom names for packet types like described here: http://www.wireshark.org/docs/wsdg_html_chunked/ChDissectAdd.html#id4724866 -> Example 9.9. Naming the packet types. Now wireshark shows names for the type-field of packets as expected. Question: Is there a way to query the proto_tree after definition of subtries ?? <code> proto_tree_add_item(myprot_header_tree, hf_myprot_type, tvb, offset, 2, FALSE); </code> where hf_myprot_type is the field which adds naming to type-byte of the protocol Is there a way to do somethin like this: <code> get_curren_stringvalue(hf_myprot_type); </code>
As far as I know, no. You probably have to retrieve the value (using tvb_get_*()) and store it somewhere. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- query proto tree within dissector Fruehwirth (Oct 21)
- Re: query proto tree within dissector Jeff Morriss (Oct 23)