aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h109
1 files changed, 65 insertions, 44 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 787eef4d86d3..0010511083fc 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -57,10 +57,11 @@ extern int decode_negTokenInit(unsigned char *security_blob, int length,
57extern int cifs_inet_pton(int, char * source, void *dst); 57extern int cifs_inet_pton(int, char * source, void *dst);
58extern int map_smb_to_linux_error(struct smb_hdr *smb); 58extern int map_smb_to_linux_error(struct smb_hdr *smb);
59extern void header_assemble(struct smb_hdr *, char /* command */ , 59extern void header_assemble(struct smb_hdr *, char /* command */ ,
60 const struct cifsTconInfo *, int 60 const struct cifsTconInfo *, int /* specifies length
61 /* length of fixed section (word count) in two byte units */ 61 of fixed section (word count) in two byte units */
62 ); 62 );
63extern struct oplock_q_entry * AllocOplockQEntry(struct inode *, u16, struct cifsTconInfo *); 63extern struct oplock_q_entry * AllocOplockQEntry(struct inode *, u16,
64 struct cifsTconInfo *);
64extern void DeleteOplockQEntry(struct oplock_q_entry *); 65extern void DeleteOplockQEntry(struct oplock_q_entry *);
65extern struct timespec cifs_NTtimeToUnix(u64 /* utc nanoseconds since 1601 */ ); 66extern struct timespec cifs_NTtimeToUnix(u64 /* utc nanoseconds since 1601 */ );
66extern u64 cifs_UnixTimeToNT(struct timespec); 67extern u64 cifs_UnixTimeToNT(struct timespec);
@@ -88,7 +89,7 @@ extern int CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
88 89
89extern int CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, 90extern int CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
90 const char *searchName, const struct nls_table *nls_codepage, 91 const char *searchName, const struct nls_table *nls_codepage,
91 __u16 *searchHandle, struct cifs_search_info * psrch_inf); 92 __u16 *searchHandle, struct cifs_search_info * psrch_inf, int map);
92 93
93extern int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, 94extern int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
94 __u16 searchHandle, struct cifs_search_info * psrch_inf); 95 __u16 searchHandle, struct cifs_search_info * psrch_inf);
@@ -99,42 +100,42 @@ extern int CIFSFindClose(const int, struct cifsTconInfo *tcon,
99extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, 100extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
100 const unsigned char *searchName, 101 const unsigned char *searchName,
101 FILE_ALL_INFO * findData, 102 FILE_ALL_INFO * findData,
102 const struct nls_table *nls_codepage); 103 const struct nls_table *nls_codepage, int remap);
103 104
104extern int CIFSSMBUnixQPathInfo(const int xid, 105extern int CIFSSMBUnixQPathInfo(const int xid,
105 struct cifsTconInfo *tcon, 106 struct cifsTconInfo *tcon,
106 const unsigned char *searchName, 107 const unsigned char *searchName,
107 FILE_UNIX_BASIC_INFO * pFindData, 108 FILE_UNIX_BASIC_INFO * pFindData,
108 const struct nls_table *nls_codepage); 109 const struct nls_table *nls_codepage, int remap);
109 110
110extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, 111extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
111 const unsigned char *searchName, 112 const unsigned char *searchName,
112 unsigned char **targetUNCs, 113 unsigned char **targetUNCs,
113 unsigned int *number_of_UNC_in_array, 114 unsigned int *number_of_UNC_in_array,
114 const struct nls_table *nls_codepage); 115 const struct nls_table *nls_codepage, int remap);
115 116
116extern int connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo, 117extern int connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
117 const char *old_path, 118 const char *old_path,
118 const struct nls_table *nls_codepage); 119 const struct nls_table *nls_codepage, int remap);
119extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, 120extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
120 const char *old_path, const struct nls_table *nls_codepage, 121 const char *old_path,
121 unsigned int *pnum_referrals, unsigned char ** preferrals); 122 const struct nls_table *nls_codepage,
123 unsigned int *pnum_referrals,
124 unsigned char ** preferrals,
125 int remap);
122extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, 126extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon,
123 struct kstatfs *FSData, 127 struct kstatfs *FSData);
124 const struct nls_table *nls_codepage);
125extern int CIFSSMBQFSAttributeInfo(const int xid, 128extern int CIFSSMBQFSAttributeInfo(const int xid,
126 struct cifsTconInfo *tcon, 129 struct cifsTconInfo *tcon);
127 const struct nls_table *nls_codepage); 130extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon);
128extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon, 131extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon);
129 const struct nls_table *nls_codepage);
130extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon,
131 const struct nls_table *nls_codepage);
132extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, 132extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon,
133 struct kstatfs *FSData, const struct nls_table *nls_codepage); 133 struct kstatfs *FSData);
134 134
135extern int CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, 135extern int CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon,
136 const char *fileName, const FILE_BASIC_INFO * data, 136 const char *fileName, const FILE_BASIC_INFO * data,
137 const struct nls_table *nls_codepage); 137 const struct nls_table *nls_codepage,
138 int remap_special_chars);
138extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, 139extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
139 const FILE_BASIC_INFO * data, __u16 fid); 140 const FILE_BASIC_INFO * data, __u16 fid);
140#if 0 141#if 0
@@ -143,36 +144,49 @@ extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon,
143 const struct nls_table *nls_codepage); 144 const struct nls_table *nls_codepage);
144#endif /* possibly unneeded function */ 145#endif /* possibly unneeded function */
145extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, 146extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon,
146 const char *fileName, __u64 size,int setAllocationSizeFlag, 147 const char *fileName, __u64 size,
147 const struct nls_table *nls_codepage); 148 int setAllocationSizeFlag,
149 const struct nls_table *nls_codepage,
150 int remap_special_chars);
148extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, 151extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon,
149 __u64 size, __u16 fileHandle,__u32 opener_pid, int AllocSizeFlag); 152 __u64 size, __u16 fileHandle,__u32 opener_pid,
153 int AllocSizeFlag);
150extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon, 154extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon,
151 char *full_path, __u64 mode, __u64 uid, 155 char *full_path, __u64 mode, __u64 uid,
152 __u64 gid, dev_t dev, const struct nls_table *nls_codepage); 156 __u64 gid, dev_t dev,
157 const struct nls_table *nls_codepage,
158 int remap_special_chars);
153 159
154extern int CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, 160extern int CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
155 const char *newName, 161 const char *newName,
156 const struct nls_table *nls_codepage); 162 const struct nls_table *nls_codepage,
163 int remap_special_chars);
157extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, 164extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
158 const char *name, const struct nls_table *nls_codepage); 165 const char *name, const struct nls_table *nls_codepage,
166 int remap_special_chars);
159 167
160extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, 168extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon,
161 const char *name, 169 const char *name,
162 const struct nls_table *nls_codepage); 170 const struct nls_table *nls_codepage,
171 int remap_special_chars);
163extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, 172extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
164 const char *fromName, const char *toName, 173 const char *fromName, const char *toName,
165 const struct nls_table *nls_codepage); 174 const struct nls_table *nls_codepage,
175 int remap_special_chars);
166extern int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, 176extern int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon,
167 int netfid, char * target_name, const struct nls_table *nls_codepage); 177 int netfid, char * target_name,
178 const struct nls_table *nls_codepage,
179 int remap_special_chars);
168extern int CIFSCreateHardLink(const int xid, 180extern int CIFSCreateHardLink(const int xid,
169 struct cifsTconInfo *tcon, 181 struct cifsTconInfo *tcon,
170 const char *fromName, const char *toName, 182 const char *fromName, const char *toName,
171 const struct nls_table *nls_codepage); 183 const struct nls_table *nls_codepage,
184 int remap_special_chars);
172extern int CIFSUnixCreateHardLink(const int xid, 185extern int CIFSUnixCreateHardLink(const int xid,
173 struct cifsTconInfo *tcon, 186 struct cifsTconInfo *tcon,
174 const char *fromName, const char *toName, 187 const char *fromName, const char *toName,
175 const struct nls_table *nls_codepage); 188 const struct nls_table *nls_codepage,
189 int remap_special_chars);
176extern int CIFSUnixCreateSymLink(const int xid, 190extern int CIFSUnixCreateSymLink(const int xid,
177 struct cifsTconInfo *tcon, 191 struct cifsTconInfo *tcon,
178 const char *fromName, const char *toName, 192 const char *fromName, const char *toName,
@@ -192,7 +206,7 @@ extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
192 const char *fileName, const int disposition, 206 const char *fileName, const int disposition,
193 const int access_flags, const int omode, 207 const int access_flags, const int omode,
194 __u16 * netfid, int *pOplock, FILE_ALL_INFO *, 208 __u16 * netfid, int *pOplock, FILE_ALL_INFO *,
195 const struct nls_table *nls_codepage); 209 const struct nls_table *nls_codepage, int remap);
196extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, 210extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon,
197 const int smb_file_id); 211 const int smb_file_id);
198 212
@@ -211,8 +225,13 @@ extern int CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
211 const char __user *buf,const int long_op); 225 const char __user *buf,const int long_op);
212extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, 226extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
213 const unsigned char *searchName, __u64 * inode_number, 227 const unsigned char *searchName, __u64 * inode_number,
214 const struct nls_table *nls_codepage); 228 const struct nls_table *nls_codepage,
229 int remap_special_chars);
215#endif /* CONFIG_CIFS_EXPERIMENTAL */ 230#endif /* CONFIG_CIFS_EXPERIMENTAL */
231extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen,
232 const struct nls_table * codepage);
233extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen,
234 const struct nls_table * cp, int mapChars);
216 235
217extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, 236extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
218 const __u16 netfid, const __u64 len, 237 const __u16 netfid, const __u64 len,
@@ -230,7 +249,7 @@ extern void tconInfoFree(struct cifsTconInfo *);
230 249
231extern int cifs_reconnect(struct TCP_Server_Info *server); 250extern int cifs_reconnect(struct TCP_Server_Info *server);
232 251
233extern int cifs_sign_smb(struct smb_hdr *, struct cifsSesInfo *,__u32 *); 252extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *,__u32 *);
234extern int cifs_verify_signature(struct smb_hdr *, const char * mac_key, 253extern int cifs_verify_signature(struct smb_hdr *, const char * mac_key,
235 __u32 expected_sequence_number); 254 __u32 expected_sequence_number);
236extern int cifs_calculate_mac_key(char * key,const char * rn,const char * pass); 255extern int cifs_calculate_mac_key(char * key,const char * rn,const char * pass);
@@ -241,29 +260,31 @@ extern int CIFSSMBCopy(int xid,
241 const char *fromName, 260 const char *fromName,
242 const __u16 target_tid, 261 const __u16 target_tid,
243 const char *toName, const int flags, 262 const char *toName, const int flags,
244 const struct nls_table *nls_codepage); 263 const struct nls_table *nls_codepage,
264 int remap_special_chars);
245extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, 265extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
246 const int notify_subdirs,const __u16 netfid,__u32 filter, 266 const int notify_subdirs,const __u16 netfid,
247 const struct nls_table *nls_codepage); 267 __u32 filter, const struct nls_table *nls_codepage);
248extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, 268extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
249 const unsigned char *searchName, char * EAData, 269 const unsigned char *searchName, char * EAData,
250 size_t bufsize, const struct nls_table *nls_codepage); 270 size_t bufsize, const struct nls_table *nls_codepage,
271 int remap_special_chars);
251extern ssize_t CIFSSMBQueryEA(const int xid,struct cifsTconInfo * tcon, 272extern ssize_t CIFSSMBQueryEA(const int xid,struct cifsTconInfo * tcon,
252 const unsigned char * searchName,const unsigned char * ea_name, 273 const unsigned char * searchName,const unsigned char * ea_name,
253 unsigned char * ea_value, size_t buf_size, 274 unsigned char * ea_value, size_t buf_size,
254 const struct nls_table *nls_codepage); 275 const struct nls_table *nls_codepage, int remap_special_chars);
255extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, 276extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon,
256 const char *fileName, const char * ea_name, 277 const char *fileName, const char * ea_name,
257 const void * ea_value, const __u16 ea_value_len, 278 const void * ea_value, const __u16 ea_value_len,
258 const struct nls_table *nls_codepage); 279 const struct nls_table *nls_codepage, int remap_special_chars);
259extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, 280extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon,
260 const unsigned char *searchName, 281 const unsigned char *searchName,
261 char *acl_inf, const int buflen,const int acl_type, 282 char *acl_inf, const int buflen,const int acl_type,
262 const struct nls_table *nls_codepage); 283 const struct nls_table *nls_codepage, int remap_special_chars);
263extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, 284extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon,
264 const unsigned char *fileName, 285 const unsigned char *fileName,
265 const char *local_acl, const int buflen, const int acl_type, 286 const char *local_acl, const int buflen, const int acl_type,
266 const struct nls_table *nls_codepage); 287 const struct nls_table *nls_codepage, int remap_special_chars);
267int cifs_ioctl (struct inode * inode, struct file * filep, 288extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon,
268 unsigned int command, unsigned long arg); 289 const int netfid, __u64 * pExtAttrBits, __u64 *pMask);
269#endif /* _CIFSPROTO_H */ 290#endif /* _CIFSPROTO_H */