aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r--fs/cifs/smb2pdu.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index b08a277df896..ef8dae213f60 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -148,4 +148,43 @@ struct smb2_err_rsp {
148 __u8 ErrorData[1]; /* variable length */ 148 __u8 ErrorData[1]; /* variable length */
149} __packed; 149} __packed;
150 150
151struct smb2_negotiate_req {
152 struct smb2_hdr hdr;
153 __le16 StructureSize; /* Must be 36 */
154 __le16 DialectCount;
155 __le16 SecurityMode;
156 __le16 Reserved; /* MBZ */
157 __le32 Capabilities;
158 __u8 ClientGUID[16]; /* MBZ */
159 __le64 ClientStartTime; /* MBZ */
160 __le16 Dialects[2]; /* variable length */
161} __packed;
162
163/* SecurityMode flags */
164#define SMB2_NEGOTIATE_SIGNING_ENABLED 0x0001
165#define SMB2_NEGOTIATE_SIGNING_REQUIRED 0x0002
166/* Capabilities flags */
167#define SMB2_GLOBAL_CAP_DFS 0x00000001
168#define SMB2_GLOBAL_CAP_LEASING 0x00000002 /* Resp only New to SMB2.1 */
169#define SMB2_GLOBAL_CAP_LARGE_MTU 0X00000004 /* Resp only New to SMB2.1 */
170
171struct smb2_negotiate_rsp {
172 struct smb2_hdr hdr;
173 __le16 StructureSize; /* Must be 65 */
174 __le16 SecurityMode;
175 __le16 DialectRevision;
176 __le16 Reserved; /* MBZ */
177 __u8 ServerGUID[16];
178 __le32 Capabilities;
179 __le32 MaxTransactSize;
180 __le32 MaxReadSize;
181 __le32 MaxWriteSize;
182 __le64 SystemTime; /* MBZ */
183 __le64 ServerStartTime;
184 __le16 SecurityBufferOffset;
185 __le16 SecurityBufferLength;
186 __le32 Reserved2; /* may be any value, ignore */
187 __u8 Buffer[1]; /* variable length GSS security buffer */
188} __packed;
189
151#endif /* _SMB2PDU_H */ 190#endif /* _SMB2PDU_H */