Wireshark-dev: Re: [Wireshark-dev] RFC: Should ip.addr also match on ARP packets

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Wed, 16 Feb 2011 10:23:01 +0100
On Wed, Feb 16, 2011 at 12:58:54AM -0800, Guy Harris wrote:
> 
> On Feb 16, 2011, at 12:51 AM, Joerg Mayer wrote:
> 
> > I've created a small patch that will allow ip.addr to match on arp
> > requests/replies as well as the previous stuff. It comes quite handy
> > but as this kind of thing is a bit unusual I thought I'd ask first.
> > There is precedence for matching on another dissector's fields with
> > ipv6 matching on ipv4's version field.
> 
> Just out of curiosity, would a "match on any FT_IPV4 field" filter be useful, so that a packet that contains a given IPv4 address *anywhere* (or, at least, anywhere that it's an FT_IPV4 field, rather than, say, just a proto_tree_add_text() item) matches?

Ah, the art of generalizing in action again :-)
Putting the proto_tree_add_item + PROTO_ITEM_SET_HIDDEN into the
tvb_add_... code itself looks very good to me!

Ciao
 Jörg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.