On Fri, Feb 13, 2009 at 08:27:54PM +0000, [email protected] wrote: > i have looked at those and it doesnt seem to be what i'm looking for. > I want to do something such as proto_tree_add_text(tree, "TEST", tvb, > 0, 0, function_call_that_returns_"TEST"() ); > > so that in the tree it will output something like TEST: TEST. however, > the first "TEST" is supposed to be an int, but i do not know how to > get around not using a static const value_string.
Try this: proto_tree_add_text(tree, "%d: TEST", tvb, 0, 0, function()); Since the value is coming from something other than the packet, put brackets around it: proto_item *pi; pi = proto_tree_add_text(tree, "%d: TEST", tvb, 0, 0, function));; PROTO_ITEM_SET_GENERATED(pi); It will then show up as: [5: TEST] Steve ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
