summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-smb-direct.c
diff options
context:
space:
mode:
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 */