Wireshark-dev: Re: [Wireshark-dev] Autocomplete for protocol names
From: "Bahaa Naamneh" <b.naamneh@xxxxxxxxx>
Date: Sat, 25 Oct 2008 01:31:15 +0200
correction: i missed the fact that logical operation can be also preceded by other logical operation! :), so checking whether the string is preceded by logical operation won't help.

(tcp.flags.push==1) and not(tcp.flags.ack==0)


On Sat, Oct 25, 2008 at 1:08 AM, Bahaa Naamneh <b.naamneh@xxxxxxxxx> wrote:
Hi,

I think trying to figure out if the user is typing a protocol name could be easier since protocol name can only comes either at the beginning of the display filter or after logical Operation.

Display Filter syntax:
[Protocol].[String1].[String2] [Comparison operator] [Value] [Logical Operations] [Other _expression_]

So you could check whether the string you are trying to auto-complete is a protocol name or not by checking if the protocol name is preceded by logical operation or located at the beginning of the display filter.
and of course, parentheses should be taken into account.


- Bahaa



On Fri, Oct 24, 2008 at 10:37 PM, Stig Bjørlykke <stig@xxxxxxxxxxxxx> wrote:
Hi.

I have just committed a patch which enables autocomplete and
autocompletion list of protocol names in the filter entry.  But this
has some side effects, because it currently also autocompletes
operators (when typing "and" or "or") and values (typing something
like "ip.tos.precedence > 3" will popup "3comxns").

I don't know how to fix this yet, but I leave the code in so more
people can try the feature and maybe fix this issue?  I guess we could
try figure out if the user is typing an operator or a value.

Or maybe just add a preference value (turn on/off) and document this behavior?

--
Stig Bjørlykke
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
https://wireshark.org/mailman/listinfo/wireshark-dev