|
91 | 91 |
|
92 | 92 | #define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe)
|
93 | 93 | #define SMB2_TRANSFORM_PROTO_NUM cpu_to_le32(0x424d53fd)
|
| 94 | +#define SMB2_COMPRESSION_TRANSFORM_ID cpu_to_le32(0x424d53fc) |
94 | 95 |
|
95 | 96 | /*
|
96 | 97 | * SMB2 Header Definition
|
@@ -127,13 +128,15 @@ struct smb2_sync_pdu {
|
127 | 128 | #define SMB3_AES128CCM_NONCE 11
|
128 | 129 | #define SMB3_AES128GCM_NONCE 12
|
129 | 130 |
|
| 131 | +/* Transform flags (for 3.0 dialect this flag indicates CCM */ |
| 132 | +#define TRANSFORM_FLAG_ENCRYPTED 0x0001 |
130 | 133 | struct smb2_transform_hdr {
|
131 | 134 | __le32 ProtocolId; /* 0xFD 'S' 'M' 'B' */
|
132 | 135 | __u8 Signature[16];
|
133 | 136 | __u8 Nonce[16];
|
134 | 137 | __le32 OriginalMessageSize;
|
135 | 138 | __u16 Reserved1;
|
136 |
| - __le16 Flags; /* EncryptionAlgorithm */ |
| 139 | + __le16 Flags; /* EncryptionAlgorithm for 3.0, enc enabled for 3.1.1 */ |
137 | 140 | __u64 SessionId;
|
138 | 141 | } __packed;
|
139 | 142 |
|
@@ -207,6 +210,10 @@ struct smb2_error_context_rsp {
|
207 | 210 | __u8 ErrorContextData; /* ErrorDataLength long array */
|
208 | 211 | } __packed;
|
209 | 212 |
|
| 213 | +/* ErrorId values */ |
| 214 | +#define SMB2_ERROR_ID_DEFAULT 0x00000000 |
| 215 | +#define SMB2_ERROR_ID_SHARE_REDIRECT cpu_to_le32(0x72645253) /* "rdRS" */ |
| 216 | + |
210 | 217 | /* Defines for Type field below (see MS-SMB2 2.2.2.2.2.1) */
|
211 | 218 | #define MOVE_DST_IPADDR_V4 cpu_to_le32(0x00000001)
|
212 | 219 | #define MOVE_DST_IPADDR_V6 cpu_to_le32(0x00000002)
|
@@ -427,7 +434,7 @@ struct smb2_logoff_rsp {
|
427 | 434 | struct smb2_tree_connect_req {
|
428 | 435 | struct smb2_sync_hdr sync_hdr;
|
429 | 436 | __le16 StructureSize; /* Must be 9 */
|
430 |
| - __le16 Reserved; /* Flags in SMB3.1.1 */ |
| 437 | + __le16 Flags; /* Reserved MBZ for dialects prior to SMB3.1.1 */ |
431 | 438 | __le16 PathOffset;
|
432 | 439 | __le16 PathLength;
|
433 | 440 | __u8 Buffer[1]; /* variable length */
|
@@ -654,7 +661,7 @@ struct smb2_tree_disconnect_rsp {
|
654 | 661 | | FILE_WRITE_EA_LE | FILE_WRITE_ATTRIBUTES_LE)
|
655 | 662 | #define FILE_EXEC_RIGHTS_LE (FILE_EXECUTE_LE)
|
656 | 663 |
|
657 |
| -/* Impersonation Levels */ |
| 664 | +/* Impersonation Levels. See MS-WPO section 9.7 and MSDN-IMPERS */ |
658 | 665 | #define IL_ANONYMOUS cpu_to_le32(0x00000000)
|
659 | 666 | #define IL_IDENTIFICATION cpu_to_le32(0x00000001)
|
660 | 667 | #define IL_IMPERSONATION cpu_to_le32(0x00000002)
|
@@ -760,7 +767,7 @@ struct create_context {
|
760 | 767 | #define SMB2_LEASE_HANDLE_CACHING cpu_to_le32(0x02)
|
761 | 768 | #define SMB2_LEASE_WRITE_CACHING cpu_to_le32(0x04)
|
762 | 769 |
|
763 |
| -#define SMB2_LEASE_FLAG_BREAK_IN_PROGRESS cpu_to_le32(0x02) |
| 770 | +#define SMB2_LEASE_FLAG_BREAK_IN_PROGRESS cpu_to_le32(0x00000002) |
764 | 771 | #define SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET cpu_to_le32(0x00000004)
|
765 | 772 |
|
766 | 773 | #define SMB2_LEASE_KEY_SIZE 16
|
|
0 commit comments