diff options
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 23655de2f4a4..e16a2c473003 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fs/cifs/cifsglob.h | 2 | * fs/cifs/cifsglob.h |
3 | * | 3 | * |
4 | * Copyright (C) International Business Machines Corp., 2002,2006 | 4 | * Copyright (C) International Business Machines Corp., 2002,2007 |
5 | * Author(s): Steve French (sfrench@us.ibm.com) | 5 | * Author(s): Steve French (sfrench@us.ibm.com) |
6 | * Jeremy Allison (jra@samba.org) | 6 | * Jeremy Allison (jra@samba.org) |
7 | * | 7 | * |
@@ -14,7 +14,7 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
16 | * the GNU Lesser General Public License for more details. | 16 | * the GNU Lesser General Public License for more details. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | #include <linux/in.h> | 19 | #include <linux/in.h> |
20 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #define MAX_TREE_SIZE 2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1 | 29 | #define MAX_TREE_SIZE 2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1 |
30 | #define MAX_SERVER_SIZE 15 | 30 | #define MAX_SERVER_SIZE 15 |
31 | #define MAX_SHARE_SIZE 64 /* used to be 20 - this should still be enough */ | 31 | #define MAX_SHARE_SIZE 64 /* used to be 20, this should still be enough */ |
32 | #define MAX_USERNAME_SIZE 32 /* 32 is to allow for 15 char names + null | 32 | #define MAX_USERNAME_SIZE 32 /* 32 is to allow for 15 char names + null |
33 | termination then *2 for unicode versions */ | 33 | termination then *2 for unicode versions */ |
34 | #define MAX_PASSWORD_SIZE 16 | 34 | #define MAX_PASSWORD_SIZE 16 |
@@ -38,13 +38,13 @@ | |||
38 | /* | 38 | /* |
39 | * MAX_REQ is the maximum number of requests that WE will send | 39 | * MAX_REQ is the maximum number of requests that WE will send |
40 | * on one socket concurently. It also matches the most common | 40 | * on one socket concurently. It also matches the most common |
41 | * value of max multiplex returned by servers. We may | 41 | * value of max multiplex returned by servers. We may |
42 | * eventually want to use the negotiated value (in case | 42 | * eventually want to use the negotiated value (in case |
43 | * future servers can handle more) when we are more confident that | 43 | * future servers can handle more) when we are more confident that |
44 | * we will not have problems oveloading the socket with pending | 44 | * we will not have problems oveloading the socket with pending |
45 | * write data. | 45 | * write data. |
46 | */ | 46 | */ |
47 | #define CIFS_MAX_REQ 50 | 47 | #define CIFS_MAX_REQ 50 |
48 | 48 | ||
49 | #define SERVER_NAME_LENGTH 15 | 49 | #define SERVER_NAME_LENGTH 15 |
50 | #define SERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1) | 50 | #define SERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1) |
@@ -120,13 +120,13 @@ struct TCP_Server_Info { | |||
120 | struct sockaddr_in sockAddr; | 120 | struct sockaddr_in sockAddr; |
121 | struct sockaddr_in6 sockAddr6; | 121 | struct sockaddr_in6 sockAddr6; |
122 | } addr; | 122 | } addr; |
123 | wait_queue_head_t response_q; | 123 | wait_queue_head_t response_q; |
124 | wait_queue_head_t request_q; /* if more than maxmpx to srvr must block*/ | 124 | wait_queue_head_t request_q; /* if more than maxmpx to srvr must block*/ |
125 | struct list_head pending_mid_q; | 125 | struct list_head pending_mid_q; |
126 | void *Server_NlsInfo; /* BB - placeholder for future NLS info */ | 126 | void *Server_NlsInfo; /* BB - placeholder for future NLS info */ |
127 | unsigned short server_codepage; /* codepage for the server */ | 127 | unsigned short server_codepage; /* codepage for the server */ |
128 | unsigned long ip_address; /* IP addr for the server if known */ | 128 | unsigned long ip_address; /* IP addr for the server if known */ |
129 | enum protocolEnum protocolType; | 129 | enum protocolEnum protocolType; |
130 | char versionMajor; | 130 | char versionMajor; |
131 | char versionMinor; | 131 | char versionMinor; |
132 | unsigned svlocal:1; /* local server or remote */ | 132 | unsigned svlocal:1; /* local server or remote */ |
@@ -166,7 +166,7 @@ struct TCP_Server_Info { | |||
166 | /* | 166 | /* |
167 | * The following is our shortcut to user information. We surface the uid, | 167 | * The following is our shortcut to user information. We surface the uid, |
168 | * and name. We always get the password on the fly in case it | 168 | * and name. We always get the password on the fly in case it |
169 | * has changed. We also hang a list of sessions owned by this user off here. | 169 | * has changed. We also hang a list of sessions owned by this user off here. |
170 | */ | 170 | */ |
171 | struct cifsUidInfo { | 171 | struct cifsUidInfo { |
172 | struct list_head userList; | 172 | struct list_head userList; |
@@ -197,11 +197,11 @@ struct cifsSesInfo { | |||
197 | int Suid; /* remote smb uid */ | 197 | int Suid; /* remote smb uid */ |
198 | uid_t linux_uid; /* local Linux uid */ | 198 | uid_t linux_uid; /* local Linux uid */ |
199 | int capabilities; | 199 | int capabilities; |
200 | char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for | 200 | char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for |
201 | TCP names - will ipv6 and sctp addresses fit? */ | 201 | TCP names - will ipv6 and sctp addresses fit? */ |
202 | char userName[MAX_USERNAME_SIZE + 1]; | 202 | char userName[MAX_USERNAME_SIZE + 1]; |
203 | char * domainName; | 203 | char *domainName; |
204 | char * password; | 204 | char *password; |
205 | }; | 205 | }; |
206 | /* no more than one of the following three session flags may be set */ | 206 | /* no more than one of the following three session flags may be set */ |
207 | #define CIFS_SES_NT4 1 | 207 | #define CIFS_SES_NT4 1 |
@@ -213,7 +213,7 @@ struct cifsSesInfo { | |||
213 | #define CIFS_SES_LANMAN 8 | 213 | #define CIFS_SES_LANMAN 8 |
214 | /* | 214 | /* |
215 | * there is one of these for each connection to a resource on a particular | 215 | * there is one of these for each connection to a resource on a particular |
216 | * session | 216 | * session |
217 | */ | 217 | */ |
218 | struct cifsTconInfo { | 218 | struct cifsTconInfo { |
219 | struct list_head cifsConnectionList; | 219 | struct list_head cifsConnectionList; |
@@ -291,9 +291,9 @@ struct cifs_search_info { | |||
291 | __u16 entries_in_buffer; | 291 | __u16 entries_in_buffer; |
292 | __u16 info_level; | 292 | __u16 info_level; |
293 | __u32 resume_key; | 293 | __u32 resume_key; |
294 | char * ntwrk_buf_start; | 294 | char *ntwrk_buf_start; |
295 | char * srch_entries_start; | 295 | char *srch_entries_start; |
296 | char * presume_name; | 296 | char *presume_name; |
297 | unsigned int resume_name_len; | 297 | unsigned int resume_name_len; |
298 | unsigned endOfSearch:1; | 298 | unsigned endOfSearch:1; |
299 | unsigned emptyDir:1; | 299 | unsigned emptyDir:1; |
@@ -309,15 +309,15 @@ struct cifsFileInfo { | |||
309 | __u16 netfid; /* file id from remote */ | 309 | __u16 netfid; /* file id from remote */ |
310 | /* BB add lock scope info here if needed */ ; | 310 | /* BB add lock scope info here if needed */ ; |
311 | /* lock scope id (0 if none) */ | 311 | /* lock scope id (0 if none) */ |
312 | struct file * pfile; /* needed for writepage */ | 312 | struct file *pfile; /* needed for writepage */ |
313 | struct inode * pInode; /* needed for oplock break */ | 313 | struct inode *pInode; /* needed for oplock break */ |
314 | struct mutex lock_mutex; | 314 | struct mutex lock_mutex; |
315 | struct list_head llist; /* list of byte range locks we have. */ | 315 | struct list_head llist; /* list of byte range locks we have. */ |
316 | unsigned closePend:1; /* file is marked to close */ | 316 | unsigned closePend:1; /* file is marked to close */ |
317 | unsigned invalidHandle:1; /* file closed via session abend */ | 317 | unsigned invalidHandle:1; /* file closed via session abend */ |
318 | atomic_t wrtPending; /* handle in use - defer close */ | 318 | atomic_t wrtPending; /* handle in use - defer close */ |
319 | struct semaphore fh_sem; /* prevents reopen race after dead ses*/ | 319 | struct semaphore fh_sem; /* prevents reopen race after dead ses*/ |
320 | char * search_resume_name; /* BB removeme BB */ | 320 | char *search_resume_name; /* BB removeme BB */ |
321 | struct cifs_search_info srch_inf; | 321 | struct cifs_search_info srch_inf; |
322 | }; | 322 | }; |
323 | 323 | ||
@@ -327,7 +327,7 @@ struct cifsFileInfo { | |||
327 | 327 | ||
328 | struct cifsInodeInfo { | 328 | struct cifsInodeInfo { |
329 | struct list_head lockList; | 329 | struct list_head lockList; |
330 | /* BB add in lists for dirty pages - i.e. write caching info for oplock */ | 330 | /* BB add in lists for dirty pages i.e. write caching info for oplock */ |
331 | struct list_head openFileList; | 331 | struct list_head openFileList; |
332 | int write_behind_rc; | 332 | int write_behind_rc; |
333 | __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */ | 333 | __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */ |
@@ -381,9 +381,9 @@ static inline void cifs_stats_bytes_read(struct cifsTconInfo *tcon, | |||
381 | } | 381 | } |
382 | #else | 382 | #else |
383 | 383 | ||
384 | #define cifs_stats_inc(field) do {} while(0) | 384 | #define cifs_stats_inc(field) do {} while (0) |
385 | #define cifs_stats_bytes_written(tcon, bytes) do {} while(0) | 385 | #define cifs_stats_bytes_written(tcon, bytes) do {} while (0) |
386 | #define cifs_stats_bytes_read(tcon, bytes) do {} while(0) | 386 | #define cifs_stats_bytes_read(tcon, bytes) do {} while (0) |
387 | 387 | ||
388 | #endif | 388 | #endif |
389 | 389 | ||
@@ -410,8 +410,8 @@ struct mid_q_entry { | |||
410 | 410 | ||
411 | struct oplock_q_entry { | 411 | struct oplock_q_entry { |
412 | struct list_head qhead; | 412 | struct list_head qhead; |
413 | struct inode * pinode; | 413 | struct inode *pinode; |
414 | struct cifsTconInfo * tcon; | 414 | struct cifsTconInfo *tcon; |
415 | __u16 netfid; | 415 | __u16 netfid; |
416 | }; | 416 | }; |
417 | 417 | ||
@@ -426,7 +426,7 @@ struct dir_notify_req { | |||
426 | __u16 netfid; | 426 | __u16 netfid; |
427 | __u32 filter; /* CompletionFilter (for multishot) */ | 427 | __u32 filter; /* CompletionFilter (for multishot) */ |
428 | int multishot; | 428 | int multishot; |
429 | struct file * pfile; | 429 | struct file *pfile; |
430 | }; | 430 | }; |
431 | 431 | ||
432 | #define MID_FREE 0 | 432 | #define MID_FREE 0 |
@@ -464,7 +464,7 @@ require use of the stronger protocol */ | |||
464 | #define CIFSSEC_MUST_LANMAN 0x10010 | 464 | #define CIFSSEC_MUST_LANMAN 0x10010 |
465 | #define CIFSSEC_MUST_PLNTXT 0x20020 | 465 | #define CIFSSEC_MUST_PLNTXT 0x20020 |
466 | #define CIFSSEC_MASK 0x37037 /* current flags supported if weak */ | 466 | #define CIFSSEC_MASK 0x37037 /* current flags supported if weak */ |
467 | #else | 467 | #else |
468 | #define CIFSSEC_MASK 0x07007 /* flags supported if no weak config */ | 468 | #define CIFSSEC_MASK 0x07007 /* flags supported if no weak config */ |
469 | #endif /* WEAK_PW_HASH */ | 469 | #endif /* WEAK_PW_HASH */ |
470 | #define CIFSSEC_MUST_SEAL 0x40040 /* not supported yet */ | 470 | #define CIFSSEC_MUST_SEAL 0x40040 /* not supported yet */ |
@@ -502,7 +502,7 @@ require use of the stronger protocol */ | |||
502 | * ---------- | 502 | * ---------- |
503 | * sesSem operations on smb session | 503 | * sesSem operations on smb session |
504 | * tconSem operations on tree connection | 504 | * tconSem operations on tree connection |
505 | * fh_sem file handle reconnection operations | 505 | * fh_sem file handle reconnection operations |
506 | * | 506 | * |
507 | ****************************************************************************/ | 507 | ****************************************************************************/ |
508 | 508 | ||
@@ -515,7 +515,7 @@ require use of the stronger protocol */ | |||
515 | /* | 515 | /* |
516 | * The list of servers that did not respond with NT LM 0.12. | 516 | * The list of servers that did not respond with NT LM 0.12. |
517 | * This list helps improve performance and eliminate the messages indicating | 517 | * This list helps improve performance and eliminate the messages indicating |
518 | * that we had a communications error talking to the server in this list. | 518 | * that we had a communications error talking to the server in this list. |
519 | */ | 519 | */ |
520 | /* Feature not supported */ | 520 | /* Feature not supported */ |
521 | /* GLOBAL_EXTERN struct servers_not_supported *NotSuppList; */ | 521 | /* GLOBAL_EXTERN struct servers_not_supported *NotSuppList; */ |
@@ -568,12 +568,12 @@ GLOBAL_EXTERN atomic_t midCount; | |||
568 | /* Misc globals */ | 568 | /* Misc globals */ |
569 | GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions | 569 | GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions |
570 | to be established on existing mount if we | 570 | to be established on existing mount if we |
571 | have the uid/password or Kerberos credential | 571 | have the uid/password or Kerberos credential |
572 | or equivalent for current user */ | 572 | or equivalent for current user */ |
573 | GLOBAL_EXTERN unsigned int oplockEnabled; | 573 | GLOBAL_EXTERN unsigned int oplockEnabled; |
574 | GLOBAL_EXTERN unsigned int experimEnabled; | 574 | GLOBAL_EXTERN unsigned int experimEnabled; |
575 | GLOBAL_EXTERN unsigned int lookupCacheEnabled; | 575 | GLOBAL_EXTERN unsigned int lookupCacheEnabled; |
576 | GLOBAL_EXTERN unsigned int extended_security; /* if on, session setup sent | 576 | GLOBAL_EXTERN unsigned int extended_security; /* if on, session setup sent |
577 | with more secure ntlmssp2 challenge/resp */ | 577 | with more secure ntlmssp2 challenge/resp */ |
578 | GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */ | 578 | GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */ |
579 | GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/ | 579 | GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/ |