diff options
author | Michael Mann <mmann78@netscape.net> | 2016-06-13 15:34:16 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-13 22:20:57 +0000 |
commit | 551b82484f5844544b2847f19697f67d1cf5853e (patch) | |
tree | 5fe5fb6017c771895410936a960a55ae16025715 /epan/proto.h | |
parent | 720b47fe63d0b7971a64d02fe43e32856265b333 (diff) |
Add proto_tree_add_bitmask_list_value.
Ran across enough situations that proto_tree_add_bitmask_list couldn't
solve that it seemed necessary.
Change-Id: I6a540ac6efca76cae7c4571a84bb400538652784
Reviewed-on: https://code.wireshark.org/review/15880
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/epan/proto.h b/epan/proto.h index 30dc4af28c..019012d7ca 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -2579,6 +2579,24 @@ WS_DLL_PUBLIC void proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int len, const int **fields, const guint encoding); +/** This function will dissect a value that describe a bitmask. Similar to proto_tree_add_bitmask_list(), + but with a passed in value (presumably because it can't be retrieved directly from tvb) + @param tree the tree to append this item to + @param tvb the tv buffer of the current data + @param offset start of data in tvb + @param len number of bytes of data + @param fields an array of pointers to int that lists all the fields of the + bitmask. These fields can be either of the type FT_BOOLEAN for flags + or another integer of the same type/size as hf_hdr with a mask specified. + This array is terminated by a NULL entry. + FT_BOOLEAN bits that are set to 1 will have the name added to the expansion. + FT_integer fields that have a value_string attached will have the + matched string displayed on the expansion line. + @param value bitmask value + @return the newly created item */ +WS_DLL_PUBLIC void +proto_tree_add_bitmask_list_value(proto_tree *tree, tvbuff_t *tvb, const guint offset, + const int len, const int **fields, const guint64 value); /** This function will dissect a sequence of bytes that describe a bitmask. |