Wireshark mailing list archives
Re: Displaying a variable in a Dissector Protocol Tree
From: Guy Harris <guy () alum mit edu>
Date: Tue, 15 Jun 2010 14:02:45 -0700
On Jun 15, 2010, at 1:31 PM, eymanm wrote:
proto_tree_add_int(wca_tree, hf_wca_label_2_number, tvb, offset, 4, 26); When I run it, it troughs an exception: proto.c:2926: failed assertion "DISSECTOR_ASSERT_NOT_REACHED" What's wrong?
What's probably wrong is that hf_wca_label_2_number probably doesn't have one of the types required by proto_tree_add_int():
If you look in the declaration in proto.h, you find /** Add one of FT_INT8, FT_INT16, FT_INT24 or FT_INT32 to a proto_tree.
If it's not one of those four types, and you're using proto_tree_add_int(), that's an error. If it's an unsigned value, then 1) its type must be one of FT_UINT8, FT_UINT16, FT_UINT24, or FT_UINT32 and 2) you must use proto_tree_add_uint(), not proto_tree_add_int(). ___________________________________________________________________________ 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:
- Displaying a variable in a Dissector Protocol Tree Mark Eyman (Jun 14)
- Re: Displaying a variable in a Dissector Protocol Tree Guy Harris (Jun 14)
- Re: Displaying a variable in a Dissector Protocol Tree eymanm (Jun 15)
- Re: Displaying a variable in a Dissector Protocol Tree Guy Harris (Jun 15)
- Re: Displaying a variable in a Dissector Protocol Tree eymanm (Jun 15)
- Re: Displaying a variable in a Dissector Protocol Tree Bill Meier (Jun 14)
- Re: Displaying a variable in a Dissector Protocol Tree Guy Harris (Jun 14)