smb2-dissector: teach new ENCRYPT_DATA smb2 share flag
authorMichael Adam <obnox@samba.org>
Fri, 2 Mar 2012 18:44:16 +0000 (19:44 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 2 Mar 2012 18:44:53 +0000 (19:44 +0100)
epan/dissectors/packet-smb2.c

index e4dc92b..a6725c6 100644 (file)
@@ -259,6 +259,7 @@ static int hf_smb2_share_flags_access_based_dir_enum = -1;
 static int hf_smb2_share_flags_force_levelii_oplock = -1;
 static int hf_smb2_share_flags_enable_hash_v1 = -1;
 static int hf_smb2_share_flags_enable_hash_v2 = -1;
+static int hf_smb2_share_flags_encrypt_data = -1;
 static int hf_smb2_share_caching = -1;
 static int hf_smb2_share_caps = -1;
 static int hf_smb2_share_caps_dfs = -1;
@@ -2069,6 +2070,7 @@ static const value_string share_cache_vals[] = {
 #define SHARE_FLAGS_force_levelii_oplock       0x00001000
 #define SHARE_FLAGS_enable_hash_v1             0x00002000
 #define SHARE_FLAGS_enable_hash_v2             0x00004000
+#define SHARE_FLAGS_encrypt_data               0x00008000
 
 static int
 dissect_smb2_share_flags(proto_tree *tree, tvbuff_t *tvb, int offset)
@@ -2083,6 +2085,7 @@ dissect_smb2_share_flags(proto_tree *tree, tvbuff_t *tvb, int offset)
                &hf_smb2_share_flags_force_levelii_oplock,
                &hf_smb2_share_flags_enable_hash_v1,
                &hf_smb2_share_flags_enable_hash_v2,
+               &hf_smb2_share_flags_encrypt_data,
                NULL
        };
        proto_item *item;
@@ -7313,6 +7316,10 @@ proto_register_smb2(void)
                { "Enable hash V2", "smb2.share_flags.enable_hash_v2", FT_BOOLEAN, 32,
                NULL, SHARE_FLAGS_enable_hash_v2, "The share supports hash generation V2 for branch cache retrieval of data (see also section 2.2.31.2 of MS-SMB2)", HFILL }},
 
+       { &hf_smb2_share_flags_encrypt_data,
+               { "Encrypt Data", "smb2.share_flags.encrypt_data", FT_BOOLEAN, 32,
+               NULL, SHARE_FLAGS_encrypt_data, "The share supports encryption of data", HFILL }},
+
        { &hf_smb2_share_caching,
                { "Caching policy", "smb2.share.caching", FT_UINT32, BASE_HEX,
                VALS(share_cache_vals), 0, NULL, HFILL }},