Based on a quick skim it looks like a more powerful version of the
usual if (tree) performance checks. When filtering, tree cannot be
NULL as there must be somewhere for the filtered fields to be
attached, but if you are filtering on HTTP then there is no need to
fill in the Ethernet/TCP/IP fields so they can all be skipped by
checking proto_field_is_referenced.

It doesn't appear to be much used though...

Evan

On Sat, Nov 23, 2013 at 2:23 PM,  <[email protected]> wrote:
> Is proto_field_is_references still a valid function?
>
> In looking at the intent, it either looks completely useless or should be
> used on almost all dissectors.  I was leaning more towards useless because I
> can't think of a scenario where tree (is already) != NULL, yet a dissector
> would be called without having its proto field referenced.
>
> ___________________________________________________________________________
> 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
___________________________________________________________________________
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