summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-12-27 16:12:43 +0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-07-24 21:54:55 +0400
commitec2e4523fdba88317e06d0c7a88af3a0860447fc (patch)
tree474781811d075dfb2e01345911fd0ff585f2d64a /fs/cifs/cifsglob.h
parent3792c1732878822ebf5a1c7e83e23453b9bbb698 (diff)
downloadlinux-3.10-ec2e4523fdba88317e06d0c7a88af3a0860447fc.tar.gz
linux-3.10-ec2e4523fdba88317e06d0c7a88af3a0860447fc.tar.bz2
linux-3.10-ec2e4523fdba88317e06d0c7a88af3a0860447fc.zip
CIFS: Add capability to send SMB2 negotiate message
and add negotiate request type to let set_credits know that we are only on negotiate stage and no need to make a decision about disabling echos and oplocks. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 480b6385a9b..2d48f880b13 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -313,6 +313,12 @@ get_rfc1002_length(void *buf)
return be32_to_cpu(*((__be32 *)buf));
}
+static inline void
+inc_rfc1001_len(void *buf, int count)
+{
+ be32_add_cpu((__be32 *)buf, count);
+}
+
struct TCP_Server_Info {
struct list_head tcp_ses_list;
struct list_head smb_ses_list;
@@ -393,6 +399,10 @@ struct TCP_Server_Info {
atomic_t in_send; /* requests trying to send */
atomic_t num_waiters; /* blocked waiting to get in sendrecv */
#endif
+#ifdef CONFIG_CIFS_SMB2
+ unsigned int max_read;
+ unsigned int max_write;
+#endif /* CONFIG_CIFS_SMB2 */
};
static inline unsigned int
@@ -986,7 +996,8 @@ static inline void free_dfs_info_array(struct dfs_info3_param *param,
/* Type of request operation */
#define CIFS_ECHO_OP 0x080 /* echo request */
#define CIFS_OBREAK_OP 0x0100 /* oplock break request */
-#define CIFS_OP_MASK 0x0180 /* mask request type */
+#define CIFS_NEG_OP 0x0200 /* negotiate request */
+#define CIFS_OP_MASK 0x0380 /* mask request type */
/* Security Flags: indicate type of session setup needed */
#define CIFSSEC_MAY_SIGN 0x00001