aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb-direct.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-01 00:18:41 -0500
committerAnders Broman <a.broman58@gmail.com>2014-12-01 12:18:44 +0000
commite77507b0eac903e74389ef1bf2dfa51d4cf00aad (patch)
treed9a99ae5315842fd1d3cc957c8adac50a779e5ed /epan/dissectors/packet-smb-direct.c
parent542439e64aef746512a5a8d3835e49805087c706 (diff)
Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-smb-direct.c')
-rw-r--r--epan/dissectors/packet-smb-direct.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/epan/dissectors/packet-smb-direct.c b/epan/dissectors/packet-smb-direct.c
index 6d6c8aba18..7eccb96ef9 100644
--- a/epan/dissectors/packet-smb-direct.c
+++ b/epan/dissectors/packet-smb-direct.c
@@ -213,15 +213,16 @@ dissect_smb_direct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
proto_tree *data_tree = NULL;
int offset = 0;
guint32 status = 0;
- guint16 flags = 0;
- proto_tree *flags_tree = NULL;
- proto_item *flags_item = NULL;
guint32 remaining_length = 0;
guint32 data_offset = 0;
guint32 data_length = 0;
guint rlen = tvb_reported_length(tvb);
gint len = 0;
tvbuff_t *next_tvb = NULL;
+ static const int * flags[] = {
+ &hf_smb_direct_flags_response_requested,
+ NULL
+ };
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMBDirect");
col_clear(pinfo->cinfo, COL_INFO);
@@ -354,12 +355,8 @@ dissect_smb_direct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- flags = tvb_get_letohs(tvb, offset);
- flags_item = proto_tree_add_item(data_tree, hf_smb_direct_flags,
- tvb, offset, 2, ENC_LITTLE_ENDIAN);
- flags_tree = proto_item_add_subtree(flags_item, ett_smb_direct_flags);
- proto_tree_add_boolean(flags_tree, hf_smb_direct_flags_response_requested,
- tvb, offset, 2, flags);
+ proto_tree_add_bitmask(tree, tvb, offset, hf_smb_direct_flags,
+ ett_smb_direct_flags, flags, ENC_LITTLE_ENDIAN);
offset += 2;
/* 2 bytes reserved */