Wireshark-dev: Re: [Wireshark-dev] Display filters are broken in master

From: João Valverde <j@xxxxxx>
Date: Tue, 5 Apr 2022 14:51:20 +0100


On 05/04/22 14:08, Pascal Quantin wrote:
Hi all,
Le mar. 5 avr. 2022 à 14:53, John Thacker <johnthacker@xxxxxxxxx> a écrit :
On Tue, Apr 5, 2022 at 8:47 AM João Valverde <j@xxxxxx> wrote:
Maybe we should replace it with underscore because with the current lexical rules I doubt it is possible to support subtraction using "1-2" and "mac-lte".

There is not advantage to  "-" over "_" and plenty of disadvantages.

At the very least, I think something should be changed with nas-eps and nas-5gs, because all the fields in those two dissectors use underscores for filters ("nas_eps") but the protocols themselves use hyphens. ("nas-eps"). Mildly breaking change, but if 4.0 is the next release it's the time to do it.

This is not a mildly breaking change, but a major one for dissectors existing since years. If this rename happens we should register an alias (similar to what we did with bootp vs dhcp for example) to ensure backward compatibility. But this does not solve the issue raised by this new functionality breaking existing filters which is a real problem.


The alias suffers from the same problem, it won't be recognized as a lexical token in the language. The best alternative I can think of is to require spaces around arithmetic operators. I can live with that.

However I think the impact of renaming is being overstated and (at least in some cases, like NAS EPS) it clearly fixes a minor bug.

Should also improve usability because remembering which names uses hyphens and which use underscores is a hassle (partially fixed by autocomplete).

This affects 103 protocols in the tree (plus a larger number of ASN1 fields).