libcli/smb: add SMB 3.10 related defines
authorStefan Metzmacher <metze@samba.org>
Mon, 29 Sep 2014 08:14:08 +0000 (10:14 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 7 Oct 2014 20:47:04 +0000 (22:47 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/smb2_constants.h

index 91a1cd2ff84dfb5edfe9dfb485ac55e0397bea42..6b13e4f48266547ec43f37d4b8212636a995ed7f 100644 (file)
 #define SMB2_TF_NONCE          0x14 /* 16 bytes */
 #define SMB2_TF_MSG_SIZE       0x24 /*  4 bytes */
 #define SMB2_TF_RESERVED       0x28 /*  2 bytes */
-#define SMB2_TF_ALGORITHM      0x2A /*  2 bytes */
+#define SMB2_TF_FLAGS          0x2A /*  2 bytes */
+#define SMB2_TF_ALGORITHM      SMB2_TF_FLAGS /* only dialect < 0x310 */
 #define SMB2_TF_SESSION_ID     0x2C /*  8 bytes */
 
 #define SMB2_TF_HDR_SIZE       0x34 /* 52 bytes */
 
 #define SMB2_TF_MAGIC 0x424D53FD /* 0xFD 'S' 'M' 'B' */
 
-#define SMB2_ENCRYPTION_AES128_CCM     0x0001
+#define SMB2_TF_FLAGS_ENCRYPTED     0x0001
 
 /* offsets into header elements for a sync SMB2 request */
 #define SMB2_HDR_PROTOCOL_ID    0x00
                SMB2_CAP_DIRECTORY_LEASING | \
                SMB2_CAP_ENCRYPTION)
 
+/* Types of SMB2 Negotiate Contexts - only in dialect >= 0x310 */
+#define SMB2_PREAUTH_INTEGRITY_CAPABILITIES 0x0001
+#define SMB2_ENCRYPTION_CAPABILITIES        0x0002
+
+/* Values for the SMB2_PREAUTH_INTEGRITY_CAPABILITIES Context (>= 0x310) */
+#define SMB2_PREAUTH_INTEGRITY_SHA512       0x0001
+
+/* Values for the SMB2_ENCRYPTION_CAPABILITIES Context (>= 0x310) */
+#define SMB2_ENCRYPTION_AES128_CCM         0x0001 /* only in dialect >= 0x224 */
+#define SMB2_ENCRYPTION_AES128_GCM         0x0002 /* only in dialect >= 0x310 */
 
 /* SMB2 session (request) flags */
 #define SMB2_SESSION_FLAG_BINDING       0x01
+/*      SMB2_SESSION_FLAG_ENCRYPT_DATA  0x04       only in dialect >= 0x310 */
 
 /* SMB2 session (response) flags */
 #define SMB2_SESSION_FLAG_IS_GUEST       0x0001
 #define SMB2_SESSION_FLAG_IS_NULL        0x0002
 #define SMB2_SESSION_FLAG_ENCRYPT_DATA   0x0004 /* in dialect >= 0x224 */
 
+/* SMB2 tree connect (request) flags */
+#define SMB2_SHAREFLAG_CLUSTER_RECONNECT 0x0001 /* only in dialect >= 0x310 */
+
 /* SMB2 sharetype flags */
 #define SMB2_SHARE_TYPE_DISK           0x1
 #define SMB2_SHARE_TYPE_PIPE           0x2