diff options
author | Tom Hughes <tom@compton.nu> | 2018-10-26 00:48:55 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-10-27 05:34:59 +0000 |
commit | 99c62bf79710a8fa97d368fa0b2c54b9d1cc6484 (patch) | |
tree | eac373ce0a79137259cb27ec6e3995937214b986 /doc/README.dissector | |
parent | 81dc105402698422e7c977ed016adcca78988777 (diff) |
Add support for extended 64 bit value to string matching
This adds val64_string_ext to parallel value_string_ext in the
same way that val64_string parallels value_string.
Change-Id: Iadbfc49f5a4540000ed92fd0469e8d273911e97e
Reviewed-on: https://code.wireshark.org/review/30385
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'doc/README.dissector')
-rw-r--r-- | doc/README.dissector | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index 6587f07d83..f012d281eb 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -1008,6 +1008,25 @@ macro for the 'strings' field in the header_field_info struct array, BASE_SPECIAL_VALS can also be used for val64_string. +-- val64_string_ext + +val64_string_ext is like value_string_ext, except that the integer type +used is a guint64 (instead of guint32). + +Use this macro to initialize the extended val64_string at compile time: + +static val64_string_ext val64stringname_ext = VAL64_STRING_EXT_INIT(val64stringname); + +Extended val64 strings can be created at run time by calling + val64_string_ext_new(<ptr to val64_string array>, + <total number of entries in the val64_string_array>, /* include {0, NULL} entry */ + <val64_string_name>); + +For hf[] array FT_(U)INT* fields that need a 'val64stringname_ext' struct, the +'strings' field would be set to '&val64stringname_ext'. Furthermore, the 'display' +field must be ORed with both 'BASE_EXT_STRING' and 'BASE_VAL64_STRING' +(e.g. BASE_DEC|BASE_EXT_STRING|BASE_VAL64_STRING). + -- Unit string 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. |