summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-05-15 12:20:51 -0400
committerSteve French <sfrench@us.ibm.com>2012-05-16 20:13:34 -0500
commit23db65f511e6ee98ad767833f2ec58b0568ba32b (patch)
tree3e883154e734542aed2ec6e9e77dc22d24e8a54c /fs/cifs/cifsglob.h
parent5249af32da5330c0bcaf0412a32aa30c5e93e908 (diff)
downloadlinux-stable-23db65f511e6ee98ad767833f2ec58b0568ba32b.tar.gz
linux-stable-23db65f511e6ee98ad767833f2ec58b0568ba32b.tar.bz2
linux-stable-23db65f511e6ee98ad767833f2ec58b0568ba32b.zip
cifs: add a smb_version_operations/values structures and a smb_version enum
We need a way to dispatch different operations for different versions. Behold the smb_version_operations/values structures. For now, those structures just hold the version enum value and nothing uses them. Eventually, we'll expand them to cover other operations/values as we change the callers to dispatch from here. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index a867d9923d7d..812e22ab0a49 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -150,6 +150,17 @@ struct cifs_cred {
*****************************************************************
*/
+enum smb_version {
+ Smb_1 = 1,
+};
+
+struct smb_version_operations {
+};
+
+struct smb_version_values {
+ char *version_string;
+};
+
struct smb_vol {
char *username;
char *password;
@@ -205,6 +216,8 @@ struct smb_vol {
bool sockopt_tcp_nodelay:1;
unsigned short int port;
unsigned long actimeo; /* attribute cache timeout (jiffies) */
+ struct smb_version_operations *ops;
+ struct smb_version_values *vals;
char *prepath;
struct sockaddr_storage srcaddr; /* allow binding to a local IP */
struct nls_table *local_nls;
@@ -242,6 +255,8 @@ struct TCP_Server_Info {
int srv_count; /* reference counter */
/* 15 character server name + 0x20 16th byte indicating type = srv */
char server_RFC1001_name[RFC1001_NAME_LEN_WITH_NULL];
+ struct smb_version_operations *ops;
+ struct smb_version_values *vals;
enum statusEnum tcpStatus; /* what we think the status is */
char *hostname; /* hostname portion of UNC string */
struct socket *ssocket;
@@ -1069,4 +1084,8 @@ void cifs_oplock_break(struct work_struct *work);
extern const struct slow_work_ops cifs_oplock_break_ops;
extern struct workqueue_struct *cifsiod_wq;
+/* Operations for different SMB versions */
+#define SMB1_VERSION_STRING "1.0"
+extern struct smb_version_operations smb1_operations;
+extern struct smb_version_values smb1_values;
#endif /* _CIFS_GLOB_H */