Ethereal-dev: [Ethereal-dev] problem in protocol item tree header field display

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ravi Kondamuru" <ravikondamuru@xxxxxxxxx>
Date: Fri, 19 May 2006 01:11:45 -0700
Hi,

I am trying to add a new dissector. I am having a problem displaying a header field in the protocol item tree.

ti = proto_tree_add_protocol_format(tree, proto_ns, tvb, 0, 0, "NS");
ns_tree = proto_item_add_subtree(ti, ett_ns);
proto_tree_add_uint(nstree, hf_ns_nicno, tvb, 0, 0, pinfo->pseudo_header->nstr.nicno);

While I can see that nicno has a value 3 while stepping through in gdb; it shows up as 0 in the actual GUI display.

static hf_register_info hf[] = {
                { &hf_ns_nicno, { "Nic", "ns.nicno", FT_UINT8, BASE_DEC,NULL, 0x0, "", HFILL } }
};

I cant figure out why the value 3 is not showing up.

Any help will be much appreciated.

thanks,
Ravi.


_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev