Ethereal-dev: Re: [Ethereal-dev] Filtering formatted items

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

From: aferen@xxxxxxxxxxxx (Andrew C. Feren)
Date: 17 Sep 2001 14:03:38 -0400
Guy Harris <gharris@xxxxxxxxx> writes:

> On Mon, Sep 17, 2001 at 01:07:54PM -0400, Andrew C. Feren wrote:
> > I noticed that I could not filter on some fields for the protocol I am
> > dissecting.  Closer inspection showed that fields
> > proto_tree_add_XXX_format, instead of proto_tree_add_item did not
> > filter correctly.
> 
> "proto_tree_add_XXX_format()" calls "proto_tree_add_XXX()", so either
> 
> 	1) "proto_tree_add_XXX()" won't let you filter either
> 
> or
> 
> 	2) you're not calling "proto_tree_add_XXX_format()" correctly.

	Well since 1 let me filter then 2 must be true, but I am not
	sure what I am doing wrong.  Here are all the relevant code
	snippets.

        [ code snipped and red face inserted ]

        Cut and paste errors will get you (me at least) everytime.
        The fifth parameter to proto_tree_add_XXX_format is "guint32
        value", but for proto_tree_add_XXX the fifth parameter is
        "gboolean little_endian".  I didn't notice it and C, being C,
        wasn't able to flag a type mismatch since the underlying types
        were the same.

        Thanks.

-- 
-Andrew Feren
 Cetacean Networks, Inc.
 Portsmouth, NH