Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Autocomplete for protocol names

From: "Bahaa Naamneh" <b.naamneh@xxxxxxxxx>
Date: Sat, 25 Oct 2008 01:08:18 +0200
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