dfilter: Add synctatic sugar for "not in" test

This commit is contained in:
João Valverde 2021-10-18 18:31:59 +01:00 committed by Wireshark GitLab Utility
parent f4ec1656cf
commit 31d04f9ee7
2 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,7 @@ The following features are new (or have been significantly updated) since versio
"ip.addr != 1.1.1.1" will work as expected (the result is the same as typing "ip.src != 1.1.1.1 and ip.dst != 1.1.1.1"). This avoids the
contradiction (a == b and a != b) being true.
** Use the syntax "a ~= b" or "a any_ne b" to recover the previous (inconsistent with ==) logic for not equal.
** Adds support for the syntax "a not in b" as a synonym for "not a in b".
* Corrected calculation of mean jitter in RTP Stream Analysis dialog and IAX2 Stram Analysis dialog

View File

@ -239,6 +239,13 @@ relation_test(T) ::= entity(E) TEST_IN set(S).
T = stnode_new_test(TEST_OP_IN, E, S);
}
relation_test(T) ::= entity(E) TEST_NOT TEST_IN set(S).
{
stnode_t *R = stnode_new_test(TEST_OP_IN, E, S);
T = stnode_new_test(TEST_OP_NOT, R, NULL);
}
set(S) ::= LBRACE set_list(L) RBRACE.
{
S = stnode_new(STTYPE_SET, L);