Ethereal-users: Re: [Ethereal-users] Display filter Problems

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: Sat, 22 Dec 2001 13:49:59 -0800
On Sat, Dec 22, 2001 at 01:40:06PM -0500, Eugene Spiker wrote:
> My current problem is that when I define a display filter through the
> Edit/Display Filter menu box (filter name "test" filter string "ip.addr
> eq 192.168.10.1") and then apply it using the filter line option box
> (entering "test") it generates the following error "Unexpected end of
> filter string". If I enter the string (ip.addr eq 192.168.10.1) directly
> into the filter line box it works just fine.
> 
> Any suggestions on what I am doing wrong?

What you're doing wrong is assuming that if you have a filter with a
given name, you can use that filter's name as a filter expression.

That's not supported (and supporting it would make the filter-handling
code more complicated, as it'd have to prevent you from giving filters
names that are valid tokens in filter expressions; otherwise, if, for
example, you had a filter named "sctp" that was

	ip.addr eq 192.168.10.1

how would it know whether a filter expression of "sctp" meant "show only
packets with SCTP in them" or "show only packet with an IP address of
192.168.10.1 in them"?).

To use a filter you've saved with a name, you have to click the
"Filter:" button to pop up the "Display Filter" dialog box, select the
filter from the list of filters, and click "OK".