aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2017-10-17 16:27:26 +0200
committerMichael Mann <mmann78@netscape.net>2017-10-17 16:01:31 +0000
commitf6915bef29bd3a2f452ace0a3b3f47255fd041b6 (patch)
treea1b240e832a22695b7b5bab808032ecd9d51d0b1
parenta8a0d5ff98e008a11ea9851f4bb09bd3663e248b (diff)
SMB2: rename QUERY_INFO buffer input fields and parse Reserved field
Since the packet has an output and input buffer, having a field just called "size" or "offset" was confusing. Change-Id: Iadb45fa50e6ea6ffaa7c3b041704837641f64ab6 Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-on: https://code.wireshark.org/review/23958 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-smb2.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index a13ebc2..4953692 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -130,8 +130,8 @@ static int hf_smb2_max_ioctl_in_size = -1;
static int hf_smb2_max_ioctl_out_size = -1;
static int hf_smb2_flags = -1;
static int hf_smb2_required_buffer_size = -1;
-static int hf_smb2_getinfo_size = -1;
-static int hf_smb2_getinfo_offset = -1;
+static int hf_smb2_getinfo_input_size = -1;
+static int hf_smb2_getinfo_input_offset = -1;
static int hf_smb2_getinfo_additional = -1;
static int hf_smb2_getinfo_flags = -1;
static int hf_smb2_setinfo_size = -1;
@@ -4727,12 +4727,15 @@ dissect_smb2_getinfo_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
/* offset */
- offset_item = proto_tree_add_item_ret_uint(tree, hf_smb2_getinfo_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &getinfo_offset);
- /* XXX - check that the two reserved bytes are zero? */
- offset += 4;
+ offset_item = proto_tree_add_item_ret_uint(tree, hf_smb2_getinfo_input_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN, &getinfo_offset);
+ offset += 2;
+
+ /* reserved */
+ proto_tree_add_item(tree, hf_smb2_reserved, tvb, offset, 2, ENC_NA);
+ offset += 2;
/* size */
- proto_tree_add_item_ret_uint(tree, hf_smb2_getinfo_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &getinfo_size);
+ proto_tree_add_item_ret_uint(tree, hf_smb2_getinfo_input_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &getinfo_size);
offset += 4;
/* parameters */
@@ -9588,13 +9591,13 @@ proto_register_smb2(void)
NULL, 0, NULL, HFILL }
},
- { &hf_smb2_getinfo_size,
- { "Getinfo Size", "smb2.getinfo_size", FT_UINT32, BASE_DEC,
+ { &hf_smb2_getinfo_input_size,
+ { "Getinfo Input Size", "smb2.getinfo_input_size", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }
},
- { &hf_smb2_getinfo_offset,
- { "Getinfo Offset", "smb2.getinfo_offset", FT_UINT16, BASE_HEX,
+ { &hf_smb2_getinfo_input_offset,
+ { "Getinfo Input Offset", "smb2.getinfo_input_offset", FT_UINT16, BASE_HEX,
NULL, 0, NULL, HFILL }
},