https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7726
Michael Mann <mmann78@xxxxxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmann78@xxxxxxxxxxxx
--- Comment #6 from Michael Mann <mmann78@xxxxxxxxxxxx> 2012-09-17 10:06:29 PDT ---
(In reply to comment #5)
> (In reply to comment #3)
> > It is possible to replace proto_tree_add_boolean/text by proto_tree_add_item ?
> Sorry, I don't understand the question. What would be the advantage of doing
> that? Is there an example of proto_tree_add_item use that I should look at?
proto_tree_add_item is the "most generic" of the
proto_tree_add_[boolean|uint|float|etc] functions and doesn't require the "two
step" process of retrieving a value then setting with
proto_tree_add_[boolean|uint|float|whatever]. If you're just displaying raw
values from a packet, proto_tree_add_item is the way to go. There are hundreds
of examples of proto_tree_add_item, but one I'm familar with (that coincides
with similar functionality to what you're trying to do) is in packet-enip.c,
dissect_tcpip_config_cap().
Also note that your length fields for the boolean items should be set to the
size of the "flag" field (not always 1) so the bits can be properly identified
in the packet.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.