Wireshark mailing list archives

How to format a subtree banner?


From: eymanm <eymanm () gmail com>
Date: Fri, 30 Jul 2010 17:24:03 -0400

I've defined a
static const value_string String[]  = {
  { 1, "String1" },
  { 2, "String2" }
};
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. I can create a subtree
showing the numeric part (1) by using the proto_tree_add_uint_format() and
proto_item_add_subtree() functions.

Can somebody suggest how to add the string value (String1) to the subtree
banner?

Thanks
___________________________________________________________________________
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: