Wireshark mailing list archives
Re: How to format a subtree banner?
From: Guy Harris <guy () alum mit edu>
Date: Fri, 30 Jul 2010 15:44:41 -0700
On Jul 30, 2010, at 2:24 PM, eymanm wrote:
I've defined a static const value_string String[] = { { 1, "String1" }, { 2, "String2" } };
Presumably you mean static const value_string String[] = { { 1, "String1" }, { 2, "String2" }, { 0, NULL } }; right? You have to put a terminator - i.e., an element with a null string pointer - at the end of value_string arrays.
and can perfectly generate output, which looks like string: String1 (1) using proto_tree_add_item() function. In order to make the output a bit more user friendly, I'd prefer to have it as a subtree.
What would be in that subtree? Presumably there would be more than one value in it (a subtree with only one value is generally not that useful); is the value that's decoded with the value_string in question one of the values? If so, what are the other values? ___________________________________________________________________________ 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:
- How to format a subtree banner? eymanm (Jul 30)
- Re: How to format a subtree banner? Guy Harris (Jul 30)