diff options
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 103 |
1 files changed, 61 insertions, 42 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index b486ba738d95..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, | |||
57 | extern int cifs_inet_pton(int, char * source, void *dst); | 57 | extern int cifs_inet_pton(int, char * source, void *dst); |
58 | extern int map_smb_to_linux_error(struct smb_hdr *smb); | 58 | extern int map_smb_to_linux_error(struct smb_hdr *smb); |
59 | extern void header_assemble(struct smb_hdr *, char /* command */ , | 59 | extern 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 | ); |
63 | extern struct oplock_q_entry * AllocOplockQEntry(struct inode *, u16, struct cifsTconInfo *); | 63 | extern struct oplock_q_entry * AllocOplockQEntry(struct inode *, u16, |
64 | struct cifsTconInfo *); | ||
64 | extern void DeleteOplockQEntry(struct oplock_q_entry *); | 65 | extern void DeleteOplockQEntry(struct oplock_q_entry *); |
65 | extern struct timespec cifs_NTtimeToUnix(u64 /* utc nanoseconds since 1601 */ ); | 66 | extern struct timespec cifs_NTtimeToUnix(u64 /* utc nanoseconds since 1601 */ ); |
66 | extern u64 cifs_UnixTimeToNT(struct timespec); | 67 | extern u64 cifs_UnixTimeToNT(struct timespec); |
@@ -88,7 +89,7 @@ extern int CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
88 | 89 | ||
89 | extern int CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, | 90 | extern 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 | ||
93 | extern int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, | 94 | extern 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, | |||
99 | extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, | 100 | extern 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 | ||
104 | extern int CIFSSMBUnixQPathInfo(const int xid, | 105 | extern 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 | ||
110 | extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, | 111 | extern 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 | ||
116 | extern int connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo, | 117 | extern 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); |
119 | extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, | 120 | extern 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); | ||
122 | extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, | 126 | extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, |
123 | struct kstatfs *FSData, | 127 | struct kstatfs *FSData); |
124 | const struct nls_table *nls_codepage); | ||
125 | extern int CIFSSMBQFSAttributeInfo(const int xid, | 128 | extern int CIFSSMBQFSAttributeInfo(const int xid, |
126 | struct cifsTconInfo *tcon, | 129 | struct cifsTconInfo *tcon); |
127 | const struct nls_table *nls_codepage); | 130 | extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon); |
128 | extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon, | 131 | extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon); |
129 | const struct nls_table *nls_codepage); | ||
130 | extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon, | ||
131 | const struct nls_table *nls_codepage); | ||
132 | extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, | 132 | extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, |
133 | struct kstatfs *FSData, const struct nls_table *nls_codepage); | 133 | struct kstatfs *FSData); |
134 | 134 | ||
135 | extern int CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, | 135 | extern 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); | ||
138 | extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | 139 | extern 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 */ |
145 | extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, | 146 | extern 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); | ||
148 | extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, | 151 | extern 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); | ||
150 | extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon, | 154 | extern 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 | ||
154 | extern int CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, | 160 | extern 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); | ||
157 | extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, | 164 | extern 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 | ||
160 | extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, | 168 | extern 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); | ||
163 | extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, | 172 | extern 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); | ||
166 | extern int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, | 176 | extern 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); | ||
168 | extern int CIFSCreateHardLink(const int xid, | 180 | extern 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); | ||
172 | extern int CIFSUnixCreateHardLink(const int xid, | 185 | extern 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); | ||
176 | extern int CIFSUnixCreateSymLink(const int xid, | 190 | extern 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); |
196 | extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, | 210 | extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, |
197 | const int smb_file_id); | 211 | const int smb_file_id); |
198 | 212 | ||
@@ -211,10 +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); |
212 | extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, | 226 | extern 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); | ||
230 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
215 | extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen, | 231 | extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen, |
216 | const struct nls_table * codepage); | 232 | const struct nls_table * codepage); |
217 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 233 | extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, |
234 | const struct nls_table * cp, int mapChars); | ||
218 | 235 | ||
219 | extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | 236 | extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, |
220 | const __u16 netfid, const __u64 len, | 237 | const __u16 netfid, const __u64 len, |
@@ -243,29 +260,31 @@ extern int CIFSSMBCopy(int xid, | |||
243 | const char *fromName, | 260 | const char *fromName, |
244 | const __u16 target_tid, | 261 | const __u16 target_tid, |
245 | const char *toName, const int flags, | 262 | const char *toName, const int flags, |
246 | const struct nls_table *nls_codepage); | 263 | const struct nls_table *nls_codepage, |
264 | int remap_special_chars); | ||
247 | extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, | 265 | extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, |
248 | const int notify_subdirs,const __u16 netfid,__u32 filter, | 266 | const int notify_subdirs,const __u16 netfid, |
249 | const struct nls_table *nls_codepage); | 267 | __u32 filter, const struct nls_table *nls_codepage); |
250 | extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, | 268 | extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, |
251 | const unsigned char *searchName, char * EAData, | 269 | const unsigned char *searchName, char * EAData, |
252 | size_t bufsize, const struct nls_table *nls_codepage); | 270 | size_t bufsize, const struct nls_table *nls_codepage, |
271 | int remap_special_chars); | ||
253 | extern ssize_t CIFSSMBQueryEA(const int xid,struct cifsTconInfo * tcon, | 272 | extern ssize_t CIFSSMBQueryEA(const int xid,struct cifsTconInfo * tcon, |
254 | const unsigned char * searchName,const unsigned char * ea_name, | 273 | const unsigned char * searchName,const unsigned char * ea_name, |
255 | unsigned char * ea_value, size_t buf_size, | 274 | unsigned char * ea_value, size_t buf_size, |
256 | const struct nls_table *nls_codepage); | 275 | const struct nls_table *nls_codepage, int remap_special_chars); |
257 | extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, | 276 | extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, |
258 | const char *fileName, const char * ea_name, | 277 | const char *fileName, const char * ea_name, |
259 | const void * ea_value, const __u16 ea_value_len, | 278 | const void * ea_value, const __u16 ea_value_len, |
260 | const struct nls_table *nls_codepage); | 279 | const struct nls_table *nls_codepage, int remap_special_chars); |
261 | extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, | 280 | extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, |
262 | const unsigned char *searchName, | 281 | const unsigned char *searchName, |
263 | char *acl_inf, const int buflen,const int acl_type, | 282 | char *acl_inf, const int buflen,const int acl_type, |
264 | const struct nls_table *nls_codepage); | 283 | const struct nls_table *nls_codepage, int remap_special_chars); |
265 | extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, | 284 | extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, |
266 | const unsigned char *fileName, | 285 | const unsigned char *fileName, |
267 | const char *local_acl, const int buflen, const int acl_type, | 286 | const char *local_acl, const int buflen, const int acl_type, |
268 | const struct nls_table *nls_codepage); | 287 | const struct nls_table *nls_codepage, int remap_special_chars); |
269 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, | 288 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, |
270 | const int netfid, __u64 * pExtAttrBits, __u64 *pMask); | 289 | const int netfid, __u64 * pExtAttrBits, __u64 *pMask); |
271 | #endif /* _CIFSPROTO_H */ | 290 | #endif /* _CIFSPROTO_H */ |