aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/libwireshark0.symbols1
-rw-r--r--epan/proto.c10
-rw-r--r--epan/proto.h18
3 files changed, 29 insertions, 0 deletions
diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols
index 5057ac0d06..43a61384e2 100644
--- a/debian/libwireshark0.symbols
+++ b/debian/libwireshark0.symbols
@@ -1023,6 +1023,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
proto_tree_add_bitmask@Base 1.9.1
proto_tree_add_bitmask_len@Base 1.9.1
proto_tree_add_bitmask_list@Base 1.99.4
+ proto_tree_add_bitmask_list_value@Base 2.1.0
proto_tree_add_bitmask_ret_uint64@Base 2.1.0
proto_tree_add_bitmask_text@Base 1.9.1
proto_tree_add_bitmask_value@Base 1.99.4
diff --git a/epan/proto.c b/epan/proto.c
index 1b8cae449b..7cb8039e93 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -9138,6 +9138,16 @@ proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset,
}
}
+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)
+{
+ if (tree) {
+ proto_item_add_bitmask_tree(NULL, tvb, offset, len, -1, fields,
+ BMT_NO_APPEND, FALSE, TRUE, tree, value);
+ }
+}
+
/* The same as proto_tree_add_bitmask(), but using a caller-supplied length.
* This is intended to support bitmask fields whose lengths can vary, perhaps
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.