From 23db65f511e6ee98ad767833f2ec58b0568ba32b Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 15 May 2012 12:20:51 -0400 Subject: 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 Signed-off-by: Pavel Shilovsky --- fs/cifs/cifsglob.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'fs/cifs/cifsglob.h') 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 */ -- cgit v1.2.3