Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Problem in proto_tree_add_bitmask

From: ankit <ankitha@xxxxxxx>
Date: Mon, 19 Mar 2012 18:06:00 +0530
Hi
  I am currently working on developing of MIH protocol plugin. I am
using proto_tree_add_bitmask and getting the error in the packets as -
17:55:33          Warn Dissector bug, protocol MIH, in packet 8:
proto.c:7166: failed assertion "len * 8 == hf->display"

What may be the error?
The following is the definition of the datatype where the error occurs-

{
	&hf_event_link_detect,
	{
		"MIH LINK Detected",
		"mih.event_list.link_detect",
                FT_BOOLEAN,
                1,
                NULL,
                LINK_DETECT_MASK,
                NULL, HFILL
			}
}

and the call to the function is like this-

evt_list_tree = proto_item_add_subtree(tlv_tree, ett_event_bitmap);
proto_tree_add_bitmask(evt_list_tree, tvb, offset, hf_event_list,
ett_event_bitmap, event_fields, ENC_BIG_ENDIAN);

-->hf_event_list is defined this way-
{
	&hf_event_list,
	{
		"List of Events",
		"mih.event_list",
		FT_UINT32,
		BASE_HEX,
		NULL,
		0x0,
		NULL, HFILL
	}
},

Let me know if any extra info is required.

Regards
Ankith


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.