Ethereal-dev: Re: [Ethereal-dev] Bug in the filtering system ?

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 9 Jul 2004 00:26:23 -0700
On Fri, Jul 09, 2004 at 07:01:10AM +0000, Sid Sid wrote:
> PRES dissector really does call ACSE dissector

Not necessarily, because...

> because I can see ACSE information in detail window

...the columns, and the detail window information, are *not* generated
by the same call to the dissectors.

The columns are generated by the first pass through the file; every
packet is read, in sequence, but the protocol tree isn't necessarily
generated (if a filter is being applied, it is, but in some other cases,
it isn't).

> The problem is that the next line for some reason does not work in case of 
> empty filter :
> 
> 	if (check_col(pinfo->cinfo, COL_PROTOCOL))
> 		col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACSE");
> as far as line:
> 		/*  set up type of pdu */
>   	if (check_col(pinfo->cinfo, COL_INFO))
> 		col_add_str(pinfo->cinfo, COL_INFO,			val_to_str(session->spdu_type, 
> ses_vals, "Unknown pdu type (0x%02x)"));
> 
> So I guess if( check_col(.. )) returns FALSE ?

No.  "check_col()" does not know whether a filter is being applied.