summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-09-29 10:14:08 +0200
committerJeremy Allison <jra@samba.org>2014-10-07 22:47:04 +0200
commit9d92074769a308d585404605613cf62079f779ca (patch)
tree7c4cc5dc0823a15da3cc1a6880dbb3bbb17a553d /libcli
parent6db8a556013e828423057303957c4ac3497097b0 (diff)
downloadsamba-9d92074769a308d585404605613cf62079f779ca.tar.gz
libcli/smb: add SMB 3.10 related defines
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smb2_constants.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libcli/smb/smb2_constants.h b/libcli/smb/smb2_constants.h
index 91a1cd2ff84..6b13e4f4826 100644
--- a/libcli/smb/smb2_constants.h
+++ b/libcli/smb/smb2_constants.h
@@ -28,14 +28,15 @@
#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
@@ -123,15 +124,29 @@
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