Wireshark mailing list archives
Re: Store a string in temporary tvb buffer and read it using function proto_tree_add_item
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Thu, 18 Aug 2011 12:55:38 -0400
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.
___________________________________________________________________________ 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: Store a string in temporary tvb buffer and read it using function proto_tree_add_item Guy Harris (Aug 18)