diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-03-27 06:42:03 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-04-10 20:31:37 +0000 |
commit | 043df01c5645378bd61318c20cfdbf86c8f73288 (patch) | |
tree | 83cc90c67b765746aed3394ba1d1154e9a433155 /doc | |
parent | ded9ad7017a9b04a9f63c9ea91961d19ff6b395e (diff) | |
download | wireshark-043df01c5645378bd61318c20cfdbf86c8f73288.tar.gz |
Add support for BASE_VALS_NO_UNKNOWN
BASE_VALS_NO_UNKNOWN is a special value_string value for only a single
(maybe 2) numerical value(s). If a field has the numerical value
that doesn't match anything in the value_string, just the number
is supplied for the field (no "Unknown")
Dissectors that had this use case have been converted in the patch.
Change-Id: Ie63a36cceec2fe4436938ec7e3d7f9e690d2b8d9
Reviewed-on: https://code.wireshark.org/review/20736
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.dissector | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index ac57159991..adf77ef241 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -117,7 +117,8 @@ FIELDDISPLAY --For FT_UINT{8,16,24,32,40,48,56,64} and BASE_DEC, BASE_HEX, BASE_OCT, BASE_DEC_HEX, BASE_HEX_DEC, BASE_CUSTOM, or BASE_NONE, possibly ORed with BASE_RANGE_STRING, BASE_EXT_STRING, BASE_VAL64_STRING, - BASE_ALLOW_ZERO, BASE_UNIT_STRING or BASE_NO_DISPLAY_VALUE + BASE_ALLOW_ZERO, BASE_UNIT_STRING, BASE_VALS_NO_UNKNOWN or + BASE_NO_DISPLAY_VALUE BASE_NONE may be used with a non-NULL FIELDCONVERT when the numeric value of the field itself is not of significance to @@ -949,6 +950,11 @@ indicate the end of the array). The 'strings' field would be set to If the field has a numeric rather than an enumerated type, the 'strings' field would be set to NULL. +If BASE_VALS_NO_UNKNOWN is also applied to the display bitmask, then if +the numeric value of a field doesn't match any values in the value_string +then just the numeric value is displayed (i.e. no "Unknown"). This is intended +for value_strings that may only have a single value or maybe an enumeration +for mix/max values of a field. -- Extended value strings You can also use an extended version of the value_string for faster lookups. @@ -993,9 +999,10 @@ val64_strings are like value_strings, except that the integer type used is a guint64 (instead of guint32). Instead of using the VALS() macro for the 'strings' field in the header_field_info struct array, 'VALS64()' is used. +BASE_VALS_NO_UNKNOWN can also be used for val64_string. -- Unit string -Some integer fields, of type FT_UINT* and float fiels, of type FT_FLOAT +Some integer fields, of type FT_UINT* and float fields, of type FT_FLOAT or FT_DOUBLE, need units of measurement to help convey the field value. A 'unit_name_string' structure is a way to add a unit suffix to a field. |