Ethereal-dev: Re: [Ethereal-dev] Deactivate "Apply" button if the display filter is not valid?

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 10 Feb 2004 13:32:43 -0800

On Feb 10, 2004, at 1:05 PM, Olivier Biot wrote:

I am afraid that adding this to Ethereal today will require serious
work and probably we'll need *ugh* global variables to implement this,

"This" meaning "make the Apply button active only if the filter is syntactically valid"?

BTW, note that the on-the-fly syntax checking we're now doing could cause problems if the expression you're constructing is, for example

	ip.addr == {hostname}

as it will, I assume, try compiling the current expression for each character you type or other change you make, and that involves doing a host-name-to-address lookup, and that could be *really* slow if a name server isn't responding.

| You can tell whether a filter was empty by checking whether
| "dfilter_compile()" supplied a non-null "dfilter_t" pointer - if the
| pointer it supplied was null, the filter was empty.

You'll want to add a method
gboolean dfilter_equal(dfilter_t **dfp_a, dfilter_t **dfp_b)
to epan/dfilter.[ch] which would compare the byte code of both
compiled display filters and return true if both programs are
identical.

Yes. I think Ulf was questioning whether we'd want to do so *now*, as the intent is to produce the next release this week, I think.