packet-smb2: display SMB2_FLAGS_PRIORITY_MASK in the header
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Sep 2015 05:40:21 +0000 (07:40 +0200)
committerMichael Mann <mmann78@netscape.net>
Thu, 29 Oct 2015 12:26:41 +0000 (12:26 +0000)
Change-Id: I6bae88395f46de0bc4c790ca41914c75e6c98793
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/11359
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-smb2.c
epan/dissectors/packet-smb2.h

index 9386413b6159ee2153b8124d1259b0bba77e1228..cfefc6167b274d9b373b20d202710c6e8a1eea28 100644 (file)
@@ -79,6 +79,7 @@ static int hf_smb2_flags_dfs_op = -1;
 static int hf_smb2_flags_chained = -1;
 static int hf_smb2_flags_signature = -1;
 static int hf_smb2_flags_replay_operation = -1;
+static int hf_smb2_flags_priority_mask = -1;
 static int hf_smb2_chain_offset = -1;
 static int hf_smb2_security_blob = -1;
 static int hf_smb2_ioctl_in_data = -1;
@@ -1282,6 +1283,11 @@ static const true_false_string tfs_flags_replay_operation = {
        "This is NOT a replay operation"
 };
 
+static const true_false_string tfs_flags_priority_mask = {
+       "This pdu contains a PRIORITY",
+       "This pdu does NOT contain a PRIORITY1"
+};
+
 static const true_false_string tfs_cap_dfs = {
        "This host supports DFS",
        "This host does NOT support DFS"
@@ -7665,6 +7671,7 @@ dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolea
                                &hf_smb2_flags_async_cmd,
                                &hf_smb2_flags_chained,
                                &hf_smb2_flags_signature,
+                               &hf_smb2_flags_priority_mask,
                                &hf_smb2_flags_dfs_op,
                                &hf_smb2_flags_replay_operation,
                                NULL
@@ -7963,6 +7970,9 @@ proto_register_smb2(void)
                { &hf_smb2_flags_replay_operation,
                  { "Replay operation", "smb2.flags.replay", FT_BOOLEAN, 32,
                    TFS(&tfs_flags_replay_operation), SMB2_FLAGS_REPLAY_OPERATION, "Whether this is a replay operation", HFILL }},
+               { &hf_smb2_flags_priority_mask,
+                 { "Priority", "smb2.flags.priority_mask", FT_BOOLEAN, 32,
+                   TFS(&tfs_flags_priority_mask), SMB2_FLAGS_PRIORITY_MASK, "Priority Mask", HFILL }},
 
                { &hf_smb2_tree,
                  { "Tree", "smb2.tree", FT_STRING, BASE_NONE,
index ee0cbf743e3a8ba03e7ea77a75ef1cdaca7a5502..bee34fe28e5745f19af4321d63326f60b75014f7 100644 (file)
@@ -120,9 +120,18 @@ typedef struct _smb2_conv_info_t {
 #define SMB2_FLAGS_ASYNC_CMD   0x00000002
 #define SMB2_FLAGS_CHAINED     0x00000004
 #define SMB2_FLAGS_SIGNATURE   0x00000008
+#define SMB2_FLAGS_PRIORITY_MASK       0x00000070
 #define SMB2_FLAGS_DFS_OP      0x10000000
 #define SMB2_FLAGS_REPLAY_OPERATION    0x20000000
 
+#define SMB2_FLAGS_PRIORITY1    0x00000010
+#define SMB2_FLAGS_PRIORITY2    0x00000020
+#define SMB2_FLAGS_PRIORITY3    0x00000030
+#define SMB2_FLAGS_PRIORITY4    0x00000040
+#define SMB2_FLAGS_PRIORITY5    0x00000050
+#define SMB2_FLAGS_PRIORITY6    0x00000060
+#define SMB2_FLAGS_PRIORITY7    0x00000070
+
 /* SMB2 FLAG MASKS */
 #define SMB2_FLAGS_ATTR_ENCRYPTED      0x00004000
 #define SMB2_FLAGS_ATTR_INDEXED                0x00002000