From 9ffff86e8d40e210b479bf57ff7617a2ba9d12bc Mon Sep 17 00:00:00 2001 From: Volodymyr Khomenko Date: Sun, 5 Feb 2017 21:03:04 +0200 Subject: [PATCH] RSVD dissector: minor fixes DataIn field should be three-state enum (not boolean) See https://msdn.microsoft.com/en-us/library/dn393496.aspx Fixed HandleStateShared value of QUERY_SHARED_VIRTUAL_DISK_SUPPORT reply See https://msdn.microsoft.com/en-us/library/dn409282.aspx Added VHDSET disk format (used by RSVD v2). Change-Id: I7a9528e680dd4fede7e982d98316af5ef40cff3b Reviewed-on: https://code.wireshark.org/review/19964 Reviewed-by: Alexis La Goutte Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-rsvd.c | 12 ++++++++++-- epan/dissectors/packet-smb2.c | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/epan/dissectors/packet-rsvd.c b/epan/dissectors/packet-rsvd.c index d1754ede74..f8ca511bb0 100644 --- a/epan/dissectors/packet-rsvd.c +++ b/epan/dissectors/packet-rsvd.c @@ -120,6 +120,7 @@ static const value_string rsvd_disk_type_vals[] = { static const value_string rsvd_disk_format_vals[] = { { 0x03, "VIRTUAL_STORAGE_TYPE_DEVICE_VHDX" }, + { 0x04, "VIRTUAL_STORAGE_TYPE_DEVICE_VHDSET" }, { 0, NULL } }; @@ -186,6 +187,13 @@ dissect_RSVD_GET_INITIAL_INFO(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree return offset; } +static const value_string rsvd_data_in_vals[] = { + { 0x00, "Client is requesting data from the server" }, + { 0x01, "Client is sending data to the server" }, + { 0x02, "Client is neither sending nor requesting an additional data buffer" }, + { 0, NULL } +}; + /* * Dissect a tunnelled SCSI request and call the SCSI dissector where * needed. @@ -699,8 +707,8 @@ proto_register_rsvd(void) NULL, 0, NULL, HFILL }}, { &hf_svhdx_tunnel_scsi_data_in, - { "DataIn", "rsvd.svhdx_scsi_data_in", FT_BOOLEAN, 8, - NULL, 0, NULL, HFILL }}, + { "DataIn", "rsvd.svhdx_scsi_data_in", FT_UINT8, BASE_HEX, + VALS(rsvd_data_in_vals), 0, "SCSI CDB transfer type", HFILL }}, { &hf_svhdx_tunnel_scsi_reserved2, { "Reserved2", "rsvd.svhdx_scsi_reserved2", FT_UINT8, BASE_HEX, diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 8c298fc605..9af5901d10 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -1697,7 +1697,7 @@ static const value_string smb2_ioctl_shared_virtual_disk_vals[] = { static const value_string smb2_ioctl_shared_virtual_disk_hstate_vals[] = { { 0x00, "HandleStateNone" }, { 0x01, "HandleStateFileShared" }, - { 0x02, "HandleStateShared" }, + { 0x03, "HandleStateShared" }, { 0, NULL } };