From 551b82484f5844544b2847f19697f67d1cf5853e Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 13 Jun 2016 15:34:16 -0400 Subject: 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 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/proto.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'epan/proto.c') 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 -- cgit v1.2.3