aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dfilter-test.py
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-04-14 18:07:22 +0200
committerAnders Broman <a.broman58@gmail.com>2018-04-18 03:47:02 +0000
commit1ff82572ca62096520d0c6529fcc0ecee518206d (patch)
tree51d0894d456188ceca615cb677d4f7996abe8f3f /tools/dfilter-test.py
parent4a156da068269aae75d79cd08e579754c52a0c43 (diff)
dfilter: add range support to set membership operator ("f in {x .. y}")
Allow "tcp.srcport in {1662 1663 1664}" to be abbreviated to "tcp.srcport in {1662 .. 1664}". The range operator is supported for any field value which supports the "<=" and "=>" operators and thus works for integers, IP addresses, etc. The naive mapping "tcp.srcport >= 1662 and tcp.srcport <= 1664" is not used because it does not have the intended effect with fields that have multiple occurrences (e.g. tcp.port). Each condition could be satisfied by an other value. Therefore a new DVFM instruction (ANY_IN_RANGE) is added to test the range condition against each individual field value. Bug: 14180 Change-Id: I53c2d0f9bc9d4f0ffaabde9a83442122965c95f7 Reviewed-on: https://code.wireshark.org/review/26945 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools/dfilter-test.py')
-rwxr-xr-xtools/dfilter-test.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/dfilter-test.py b/tools/dfilter-test.py
index 8c2ab1209c..61cae97b58 100755
--- a/tools/dfilter-test.py
+++ b/tools/dfilter-test.py
@@ -21,6 +21,7 @@ from dftestlib.double import testDouble
from dftestlib.integer import testInteger
from dftestlib.integer_1byte import testInteger1Byte
from dftestlib.ipv4 import testIPv4
+from dftestlib.membership import testMembership
from dftestlib.range_method import testRange
from dftestlib.scanner import testScanner
from dftestlib.string_type import testString