Wireshark mailing list archives
Re: [Wireshark-dev] Store a string in temporary tvb buffer and read it using function proto_tree_add_item
From: Chris Maynard <Chris.Maynard () gtech com>
Date: Thu, 18 Aug 2011 17:15:23 +0000 (UTC)
Jeff Morriss <jeff.morriss.ws@...> writes:
On 08/18/2011 12:41 PM, Mrunal Upadhyay wrote:Dear All, Is there a way to store a string in a temporary tvb buffer and then in the dissection logic use this tvb buffer in the in order to read this temporary string using function proto_tree_add_item and assign it to one of the filter fields.Sure, use tvb_new_real_data() to create a TVB which points to some memory. Do be aware that the memory has to stick around for a while so you may also need to use tvb_set_free_cb() so you can know when to free it.
I don't know, but my guess is that you probably don't really want to do that. Try looking at the proto_tree_add_string*() functions instead. ___________________________________________________________________________ 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:
- Store a string in temporary tvb buffer and read it using function proto_tree_add_item Mrunal Upadhyay (Aug 18)
- Re: Store a string in temporary tvb buffer and read it using function proto_tree_add_item Jeff Morriss (Aug 18)
- Re: [Wireshark-dev] Store a string in temporary tvb buffer and read it using function proto_tree_add_item Chris Maynard (Aug 18)
- Re: Store a string in temporary tvb buffer and read it using function proto_tree_add_item Guy Harris (Aug 18)
- Re: Store a string in temporary tvb buffer and read it using function proto_tree_add_item Jeff Morriss (Aug 18)