aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-29 15:58:56 -0500
committerMichael Mann <mmann78@netscape.net>2014-12-08 01:13:02 +0000
commite172ebb3b4a15fb55f698eff5df33a29b1a8f249 (patch)
tree9fea7f58b7b877300013e0a734bba58c68ab60d3 /epan/proto.h
parent75cdf9201eefb8da2952afc36021bbbd9d9eecf1 (diff)
Add proto_tree_add_bitmask_with_flags.
It's proto_tree_add_bitmask with the ability to control the data appended to header. Change-Id: Icce97437ba7cfc9158ec204a837da8db8138424a Reviewed-on: https://code.wireshark.org/review/5533 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 70ffa5607d..490c415a33 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -2185,6 +2185,32 @@ proto_tree_add_bitmask(proto_tree *tree, tvbuff_t *tvb, const guint offset,
const int hf_hdr, const gint ett, const int **fields, const guint encoding);
/** This function will dissect a sequence of bytes that describe a bitmask.
+* This has "filterable" bitmask header functionality of proto_tree_add_bitmask
+* with the ability to control what data is appended to the header like
+* proto_tree_add_bitmask_text
+ @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 hf_hdr an 8/16/24/32 bit integer that describes the bitmask to be dissected.
+ This field will form an expansion under which the individual fields of the
+ bitmask is dissected and displayed.
+ This field must be of the type FT_[U]INT{8|16|24|32}.
+ @param ett subtree index
+ @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 encoding big or little endian byte representation (ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN/ENC_HOST_ENDIAN)
+ @param flags bitmask field using BMT_NO_* flags to determine behavior
+ @return the newly created item */
+WS_DLL_PUBLIC proto_item *
+proto_tree_add_bitmask_with_flags(proto_tree *tree, tvbuff_t *tvb, const guint offset,
+ const int hf_hdr, const gint ett, const int **fields, const guint encoding, const int flags);
+
+/** This function will dissect a sequence of bytes that describe a bitmask.
@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