I am working on refining a dissector and need to make sure the tree I'm passed actually points to the field I intend. This code may be called either before or after the packet is dissected. To do this I'm using code like this:

if (PNODE_FINFO(tree)->hfinfo->id == hf_myproto_specialfield)
{  /* do stuff... */ }

I don't like to reach that deep into the hfinfo data structure, but it seems that the only alternative that would work would be to call proto_find_finfo(tree, hf_myproto_specialfield) but that's not really what I want and incurs a much larger runtime penalty than is really needed. Is there a better way to do this?

Ed
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:[email protected]?subject=unsubscribe

Reply via email to