Ethereal-dev: Re: [ethereal-dev] Filtering on strings ...

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Fri, 8 Sep 2000 02:14:35 -0400
On Fri, Sep 08, 2000 at 04:24:51PM +0900, Richard Sharpe wrote:
> Hi,
> 
> can we filter on strings?

Only in the most basic way. The dfilter code does strcmp() calls,
and you can test for equality.
 
> Ie, if there is a:
> 
>   MAIL From: <fred@xxxxxxxx>
> 
> in the SMTP stream, and it has been dissected, can I set up a field
> smtp.header.from and filter on it? Eg:
> 
>   smtp.header.from == "fred@xxxxxxxx"

Yes, if smtp.header.from really is "fred@xxxxxxxx", that will work.
If it is "<fread@xxxxxxxx>", the string comparison won't work.
There is so far no substring capability. 

--gilbert