Re: problem in protocol item tree header field display

"Ravi Kondamuru" <[email protected]>
Newsgroups gmane.network.ethereal.devel
Message-ID <[email protected]>
Further investigation is showing me that the following are the values in
hfinfo:
1. hfinfo->flags = 1, indicating that it is HIDDEN.
I have no where in my declarations set hf_ns_nicno to be HIDDEN. Is that the
default setting or have I not set any flag elsewhere to make it visible?

2. hfinfo->ref_count = 0, making TRY_TO_FAKE_THIS_ITEM macro return without
setting value in proto_tree_add_uint(...)
When is the ref_count incremented?

thanks,
Ravi.

On 5/19/06, Ravi Kondamuru <[email protected]> wrote:
>
> 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
[email protected]
http://www.ethereal.com/mailman/listinfo/ethereal-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.