Wireshark-commits: [Wireshark-commits] master-2.6 c46bc41: dfilter: add range support to set member
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c46bc41d8dc88b13ad3457901130ff199122e144
Submitter: Stig Bjørlykke (stig@xxxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark
Commits:
c46bc41 by Peter Wu (peter@xxxxxxxxxxxxx):
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@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
(cherry picked from commit 1ff82572ca62096520d0c6529fcc0ecee518206d)
[Peter: resolved release notes conflicts by appending the entry]
Reviewed-on: https://code.wireshark.org/review/26998
Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
Actions performed:
from df466cc Qt: fix remaining CaptureEvent signal connections
adds c46bc41 dfilter: add range support to set membership operator ("f in {x .. y}")
Summary of changes:
doc/wireshark-filter.pod | 10 ++++
docbook/release-notes.asciidoc | 3 ++
docbook/wsug_src/WSUG_chapter_work.asciidoc | 17 ++++++
epan/dfilter/dfvm.c | 46 ++++++++++++++++
epan/dfilter/dfvm.h | 3 +-
epan/dfilter/gencode.c | 84 +++++++++++++++++++----------
epan/dfilter/grammar.lemon | 15 ++++++
epan/dfilter/scanner.l | 2 +
epan/dfilter/semcheck.c | 28 ++++++++--
epan/dfilter/sttype-set.c | 13 ++++-
epan/dfilter/sttype-set.h | 3 ++
tools/dfilter-test.py | 1 +
tools/dftestlib/membership.py | 42 +++++++++++++++
13 files changed, 235 insertions(+), 32 deletions(-)
create mode 100644 tools/dftestlib/membership.py