aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.h
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2013-06-25 01:20:49 -0400
committerSteve French <smfrench@gmail.com>2013-06-26 18:31:29 -0400
commit4a72dafa19ba77a2fb77ae676f8e3a0d6077c37c (patch)
tree036805a2dd4080dd833fdfa41a79e18562fd5042 /fs/cifs/smb2pdu.h
parent2b80d049eb6dd08431f63fc0c5ce78567648a033 (diff)
SMB2 FSCTL and IOCTL worker function
This worker function is needed to send SMB2 fsctl (and ioctl) requests including: validating negotiation info (secure negotiate) querying the servers network interfaces copy offload (refcopy) Followon patches for the above three will use this. This patch also does general validation of the response. In the future, as David Disseldorp notes, for the copychunk ioctl case, we will want to enhance the response processing to allow returning the chunk request limits to the caller (even though the server returns an error, in that case we would return data that the caller could use - see 2.2.32.1). See MS-SMB2 Section 2.2.31 for more details on format of fsctl. Acked-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r--fs/cifs/smb2pdu.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 0ef06ec24a06..f31043b26bd3 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -497,6 +497,29 @@ struct copychunk_ioctl {
497 __u32 Reserved2; 497 __u32 Reserved2;
498} __packed; 498} __packed;
499 499
500/* Response and Request are the same format */
501struct validate_negotiate_info {
502 __le32 Capabilities;
503 __u8 Guid[SMB2_CLIENT_GUID_SIZE];
504 __le16 SecurityMode;
505 __le16 DialectCount;
506 __le16 Dialect[1];
507} __packed;
508
509#define RSS_CAPABLE 0x00000001
510#define RDMA_CAPABLE 0x00000002
511
512struct network_interface_info_ioctl_rsp {
513 __le32 Next; /* next interface. zero if this is last one */
514 __le32 IfIndex;
515 __le32 Capability; /* RSS or RDMA Capable */
516 __le32 Reserved;
517 __le64 LinkSpeed;
518 char SockAddr_Storage[128];
519} __packed;
520
521#define NO_FILE_ID 0xFFFFFFFFFFFFFFFFULL /* general ioctls to srv not to file */
522
500struct smb2_ioctl_req { 523struct smb2_ioctl_req {
501 struct smb2_hdr hdr; 524 struct smb2_hdr hdr;
502 __le16 StructureSize; /* Must be 57 */ 525 __le16 StructureSize; /* Must be 57 */