SMB3.1.1: correct definition for app_instance_id create contexts
[linux-2.6-microblaze.git] / fs / smbfs_common / smb2pdu.h
index ace133c..bae590e 100644 (file)
@@ -327,17 +327,18 @@ struct smb2_tree_connect_req {
 #define SMB2_SHAREFLAG_NO_CACHING                      0x00000030
 #define SHI1005_FLAGS_DFS                              0x00000001
 #define SHI1005_FLAGS_DFS_ROOT                         0x00000002
-#define SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS         0x00000100
-#define SHI1005_FLAGS_FORCE_SHARED_DELETE              0x00000200
-#define SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING          0x00000400
-#define SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM      0x00000800
-#define SHI1005_FLAGS_FORCE_LEVELII_OPLOCK             0x00001000
-#define SHI1005_FLAGS_ENABLE_HASH_V1                   0x00002000
-#define SHI1005_FLAGS_ENABLE_HASH_V2                   0x00004000
+#define SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS                0x00000100
+#define SMB2_SHAREFLAG_FORCE_SHARED_DELETE             0x00000200
+#define SMB2_SHAREFLAG_ALLOW_NAMESPACE_CACHING         0x00000400
+#define SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM     0x00000800
+#define SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK            0x00001000
+#define SMB2_SHAREFLAG_ENABLE_HASH_V1                  0x00002000
+#define SMB2_SHAREFLAG_ENABLE_HASH_V2                  0x00004000
 #define SHI1005_FLAGS_ENCRYPT_DATA                     0x00008000
 #define SMB2_SHAREFLAG_IDENTITY_REMOTING               0x00040000 /* 3.1.1 */
 #define SMB2_SHAREFLAG_COMPRESS_DATA                   0x00100000 /* 3.1.1 */
-#define SHI1005_FLAGS_ALL                              0x0014FF33
+#define SMB2_SHAREFLAG_ISOLATED_TRANSPORT              0x00200000
+#define SHI1005_FLAGS_ALL                              0x0034FF33
 
 /* Possible share capabilities */
 #define SMB2_SHARE_CAP_DFS     cpu_to_le32(0x00000008) /* all dialects */
@@ -1171,6 +1172,34 @@ struct create_posix {
        __u32   Reserved;
 } __packed;
 
+/* See MS-SMB2 2.2.13.2.3 and MS-SMB2 2.2.13.2.4 */
+struct create_durable {
+       struct create_context ccontext;
+       __u8   Name[8];
+       union {
+               __u8  Reserved[16];
+               struct {
+                       __u64 PersistentFileId;
+                       __u64 VolatileFileId;
+               } Fid;
+       } Data;
+} __packed;
+
+/* See MS-SMB2 2.2.13.2.5 */
+struct create_mxac_req {
+       struct create_context ccontext;
+       __u8   Name[8];
+       __le64 Timestamp;
+} __packed;
+
+/* See MS-SMB2 2.2.14.2.5 */
+struct create_mxac_rsp {
+       struct create_context ccontext;
+       __u8   Name[8];
+       __le32 QueryStatus;
+       __le32 MaximalAccess;
+} __packed;
+
 #define SMB2_LEASE_NONE_LE                     cpu_to_le32(0x00)
 #define SMB2_LEASE_READ_CACHING_LE             cpu_to_le32(0x01)
 #define SMB2_LEASE_HANDLE_CACHING_LE           cpu_to_le32(0x02)
@@ -1180,6 +1209,7 @@ struct create_posix {
 
 #define SMB2_LEASE_KEY_SIZE                    16
 
+/* See MS-SMB2 2.2.13.2.8 */
 struct lease_context {
        __u8 LeaseKey[SMB2_LEASE_KEY_SIZE];
        __le32 LeaseState;
@@ -1187,6 +1217,7 @@ struct lease_context {
        __le64 LeaseDuration;
 } __packed;
 
+/* See MS-SMB2 2.2.13.2.10 */
 struct lease_context_v2 {
        __u8 LeaseKey[SMB2_LEASE_KEY_SIZE];
        __le32 LeaseState;
@@ -1210,6 +1241,35 @@ struct create_lease_v2 {
        __u8   Pad[4];
 } __packed;
 
+/* See MS-SMB2 2.2.14.2.9 */
+struct create_disk_id_rsp {
+       struct create_context ccontext;
+       __u8   Name[8];
+       __le64 DiskFileId;
+       __le64 VolumeId;
+       __u8  Reserved[16];
+} __packed;
+
+/* See MS-SMB2 2.2.13.2.13 */
+struct create_app_inst_id {
+       struct create_context ccontext;
+       __u8 Name[16];
+       __le32 StructureSize; /* Must be 20 */
+       __u16 Reserved;
+       __u8 AppInstanceId[16];
+} __packed;
+
+/* See MS-SMB2 2.2.13.2.15 */
+struct create_app_inst_id_vers {
+       struct create_context ccontext;
+       __u8 Name[16];
+       __le32 StructureSize; /* Must be 24 */
+       __u16 Reserved;
+       __u32 Padding;
+       __le64 AppInstanceVersionHigh;
+       __le64 AppInstanceVersionLow;
+} __packed;
+
 /* See MS-SMB2 2.2.31 and 2.2.32 */
 struct smb2_ioctl_req {
        struct smb2_hdr hdr;