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

Wireshark-dev: Re: [Wireshark-dev] Is it possible to add the actual data (80 bytes) to the prot

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 22 Sep 2006 16:22:46 -0700

On Sep 21, 2006, at 3:50 PM, Bill Fassler wrote:

Ya know how the first branch of the plugin tree highlights the entire packet, the header, data and everything? Well, my superiors (who is everybody in the world it seems) insist that I add a final branch that highlights the actual data packet (in this case - an 80 byte audio packet). Everything I have tried throws a failed assertion.

Here is the last working branch:
proto_tree_add_item(vppn_tree, hf_channel_data, tvb, offset, 2, FALSE);

Here is a few of the many worthless things I've tried: (I do not declare hf_audio_data in the protocol field array)

That might be the problem. If you're going to use proto_tree_add_item(), you *HAVE* to supply an hf_ value, and that value *HAS* to be associated with a registered field.

If you want to put something into the protocol tree as an item that's not a named field, you have to use proto_tree_add_text().