diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2020-04-04 22:16:40 +0100 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2020-04-05 17:40:21 +0000 |
commit | ec781e9749c1329efb6a288668a1809b9d418ec0 (patch) | |
tree | 2f63a2fcfa17e5cdf956ba2770679f10c05ab910 /doc | |
parent | 361f82fe5a0f511f3bfab0185b102767f106eb65 (diff) |
proto: Add a debug check to sanity-check range_string
Check is enabled by #ifdef ENABLE_CHECK_FILTER
Remaining issues found by this check are fixed here,
along with a documentation note that the entries
are checked in order and the first match is used.
The only issue not yet fixed is in packet-isup.c,
where the spec was not available to me.
Change-Id: Ife747cda9b91a265bc2b81ce0a53f55f3389919e
Reviewed-on: https://code.wireshark.org/review/36708
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.dissector | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index 8e93e9c8e9..7887b45ac6 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -1173,7 +1173,10 @@ For fields of that type, you would declare an array of "range_string"s: }; If INTVAL_MIN equals INTVAL_MAX for a given entry the range_string -behavior collapses to the one of value_string. +behavior collapses to the one of value_string. Note that each range_string +within the array is tested in order, so any 'catch-all' entries need to come +after specific individual entries. + For FT_(U)INT* fields that need a 'range_string' struct, the 'strings' field would be set to 'RVALS(rvalstringname)'. Furthermore, 'display' field must be ORed with 'BASE_RANGE_STRING' (e.g. BASE_DEC|BASE_RANGE_STRING). |