Hi,
Iam trying for custom dissector bit wise operation octet by octet.
I have used
proto_tree_add_bits_item(my_sub_tree, hf_my_type, my_tvb, offset,6, TRUE);
This is 6 bit lenth.
..00 0010 = Message Type : FWD_CNTRL (0x02)
I can able to get the bits properly. No issues on that. i want remove
"..00 0010= " this PART and diplay only
Message Type : FWD_CNTRL (0x02)
I have tried another method using MASK
proto_tree_add_item(my_sub_tree, hf_my_type, my_tvb, offset,6, ENC_LITTLE_ENDIAN);
{ &hf_msg_typ,
{ "Message Type ", "msg_type",FT_UINT8, BASE_HEX, VALS(msg_type_vals), 0x3f, NULL, HFILL }
},</code></pre><p>This one also output as</p><pre><code> ..00 0010 = Message Type : FWD_CNTRL (0x02)</code></pre><p>How can i remove<br />
"..00 0010= " this PART and diplay only
Message Type : FWD_CNTRL (0x02)
Please Help
asked 31 May '14, 00:40

umar
26●22●24●27
accept rate: 0%
IMHO removing ..00 0010 = Message Type : FWD_CNTRL (0x02) is a bad choice the former let you see exactly which bits are beeing dissected and the meaning of the bits. If the bits allways occure in the same Place using proto_add_item with a bit mask may be a better choice than proto_tree_add_bits_item(). Just my 2 cents.