diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-05-15 12:20:51 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-05-16 21:13:34 -0400 |
commit | 23db65f511e6ee98ad767833f2ec58b0568ba32b (patch) | |
tree | 3e883154e734542aed2ec6e9e77dc22d24e8a54c /fs/cifs/cifsglob.h | |
parent | 5249af32da5330c0bcaf0412a32aa30c5e93e908 (diff) |
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.h | 19 |
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 { | |||
150 | ***************************************************************** | 150 | ***************************************************************** |
151 | */ | 151 | */ |
152 | 152 | ||
153 | enum smb_version { | ||
154 | Smb_1 = 1, | ||
155 | }; | ||
156 | |||
157 | struct smb_version_operations { | ||
158 | }; | ||
159 | |||
160 | struct smb_version_values { | ||
161 | char *version_string; | ||
162 | }; | ||
163 | |||
153 | struct smb_vol { | 164 | struct smb_vol { |
154 | char *username; | 165 | char *username; |
155 | char *password; | 166 | char *password; |
@@ -205,6 +216,8 @@ struct smb_vol { | |||
205 | bool sockopt_tcp_nodelay:1; | 216 | bool sockopt_tcp_nodelay:1; |
206 | unsigned short int port; | 217 | unsigned short int port; |
207 | unsigned long actimeo; /* attribute cache timeout (jiffies) */ | 218 | unsigned long actimeo; /* attribute cache timeout (jiffies) */ |
219 | struct smb_version_operations *ops; | ||
220 | struct smb_version_values *vals; | ||
208 | char *prepath; | 221 | char *prepath; |
209 | struct sockaddr_storage srcaddr; /* allow binding to a local IP */ | 222 | struct sockaddr_storage srcaddr; /* allow binding to a local IP */ |
210 | struct nls_table *local_nls; | 223 | struct nls_table *local_nls; |
@@ -242,6 +255,8 @@ struct TCP_Server_Info { | |||
242 | int srv_count; /* reference counter */ | 255 | int srv_count; /* reference counter */ |
243 | /* 15 character server name + 0x20 16th byte indicating type = srv */ | 256 | /* 15 character server name + 0x20 16th byte indicating type = srv */ |
244 | char server_RFC1001_name[RFC1001_NAME_LEN_WITH_NULL]; | 257 | char server_RFC1001_name[RFC1001_NAME_LEN_WITH_NULL]; |
258 | struct smb_version_operations *ops; | ||
259 | struct smb_version_values *vals; | ||
245 | enum statusEnum tcpStatus; /* what we think the status is */ | 260 | enum statusEnum tcpStatus; /* what we think the status is */ |
246 | char *hostname; /* hostname portion of UNC string */ | 261 | char *hostname; /* hostname portion of UNC string */ |
247 | struct socket *ssocket; | 262 | struct socket *ssocket; |
@@ -1069,4 +1084,8 @@ void cifs_oplock_break(struct work_struct *work); | |||
1069 | extern const struct slow_work_ops cifs_oplock_break_ops; | 1084 | extern const struct slow_work_ops cifs_oplock_break_ops; |
1070 | extern struct workqueue_struct *cifsiod_wq; | 1085 | extern struct workqueue_struct *cifsiod_wq; |
1071 | 1086 | ||
1087 | /* Operations for different SMB versions */ | ||
1088 | #define SMB1_VERSION_STRING "1.0" | ||
1089 | extern struct smb_version_operations smb1_operations; | ||
1090 | extern struct smb_version_values smb1_values; | ||
1072 | #endif /* _CIFS_GLOB_H */ | 1091 | #endif /* _CIFS_GLOB_H */ |