Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

From what I understand is that you would like to combine these two? I would come up with something like this:

{ &hf_myproto_name, { "Name", "myproto.name", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } },
{ &hf_myproto_name1, { "Name", "myproto.name1", FT_UINT16, BASE_DEC, NULL, 0xFFFE, NULL, HFILL } },
{ &hf_myproto_name2, { "Name", "myproto.name2", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL } },

then use

proto_tree_add_item(..., hf_myproto_name, offset, 2, ....);
proto_tree_add_item(..., hf_myproto_name1, offset, 2, ....);
proto_tree_add_item(..., hf_myproto_name2, offset+1, 1, ....);

Although this usually makes little sense for decimal values, rather for hex values.