2 * linux/include/linux/nfsd/xdr3.h
4 * XDR types for NFSv3 in nfsd.
6 * Copyright (C) 1996-1998, Olaf Kirch <okir@monad.swb.de>
9 #ifndef _LINUX_NFSD_XDR3_H
10 #define _LINUX_NFSD_XDR3_H
12 #include <linux/nfsd/xdr.h>
14 struct nfsd3_sattrargs {
21 struct nfsd3_diropargs {
27 struct nfsd3_accessargs {
32 struct nfsd3_readargs {
36 struct kvec vec[RPCSVC_MAXPAGES];
40 struct nfsd3_writeargs {
46 struct kvec vec[RPCSVC_MAXPAGES];
50 struct nfsd3_createargs {
59 struct nfsd3_mknodargs {
68 struct nfsd3_renameargs {
77 struct nfsd3_readlinkargs {
82 struct nfsd3_linkargs {
89 struct nfsd3_symlinkargs {
98 struct nfsd3_readdirargs {
107 struct nfsd3_commitargs {
113 struct nfsd3_getaclargs {
119 struct nfsd3_setaclargs {
122 struct posix_acl *acl_access;
123 struct posix_acl *acl_default;
126 struct nfsd3_attrstat {
132 /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
133 struct nfsd3_diropres {
139 struct nfsd3_accessres {
145 struct nfsd3_readlinkres {
151 struct nfsd3_readres {
158 struct nfsd3_writeres {
165 struct nfsd3_renameres {
171 struct nfsd3_linkres {
177 struct nfsd3_readdirres {
183 struct readdir_cd common;
188 struct svc_rqst * rqstp;
192 struct nfsd3_fsstatres {
194 struct kstatfs stats;
198 struct nfsd3_fsinfores {
211 struct nfsd3_pathconfres {
216 __u32 p_chown_restricted;
217 __u32 p_case_insensitive;
218 __u32 p_case_preserving;
221 struct nfsd3_commitres {
226 struct nfsd3_getaclres {
230 struct posix_acl *acl_access;
231 struct posix_acl *acl_default;
234 /* dummy type for release */
235 struct nfsd3_fhandle_pair {
242 * Storage requirements for XDR arguments and results.
244 union nfsd3_xdrstore {
245 struct nfsd3_sattrargs sattrargs;
246 struct nfsd3_diropargs diropargs;
247 struct nfsd3_readargs readargs;
248 struct nfsd3_writeargs writeargs;
249 struct nfsd3_createargs createargs;
250 struct nfsd3_renameargs renameargs;
251 struct nfsd3_linkargs linkargs;
252 struct nfsd3_symlinkargs symlinkargs;
253 struct nfsd3_readdirargs readdirargs;
254 struct nfsd3_diropres diropres;
255 struct nfsd3_accessres accessres;
256 struct nfsd3_readlinkres readlinkres;
257 struct nfsd3_readres readres;
258 struct nfsd3_writeres writeres;
259 struct nfsd3_renameres renameres;
260 struct nfsd3_linkres linkres;
261 struct nfsd3_readdirres readdirres;
262 struct nfsd3_fsstatres fsstatres;
263 struct nfsd3_fsinfores fsinfores;
264 struct nfsd3_pathconfres pathconfres;
265 struct nfsd3_commitres commitres;
266 struct nfsd3_getaclres getaclres;
269 #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
271 int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
272 int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *,
273 struct nfsd3_sattrargs *);
274 int nfs3svc_decode_diropargs(struct svc_rqst *, u32 *,
275 struct nfsd3_diropargs *);
276 int nfs3svc_decode_accessargs(struct svc_rqst *, u32 *,
277 struct nfsd3_accessargs *);
278 int nfs3svc_decode_readargs(struct svc_rqst *, u32 *,
279 struct nfsd3_readargs *);
280 int nfs3svc_decode_writeargs(struct svc_rqst *, u32 *,
281 struct nfsd3_writeargs *);
282 int nfs3svc_decode_createargs(struct svc_rqst *, u32 *,
283 struct nfsd3_createargs *);
284 int nfs3svc_decode_mkdirargs(struct svc_rqst *, u32 *,
285 struct nfsd3_createargs *);
286 int nfs3svc_decode_mknodargs(struct svc_rqst *, u32 *,
287 struct nfsd3_mknodargs *);
288 int nfs3svc_decode_renameargs(struct svc_rqst *, u32 *,
289 struct nfsd3_renameargs *);
290 int nfs3svc_decode_readlinkargs(struct svc_rqst *, u32 *,
291 struct nfsd3_readlinkargs *);
292 int nfs3svc_decode_linkargs(struct svc_rqst *, u32 *,
293 struct nfsd3_linkargs *);
294 int nfs3svc_decode_symlinkargs(struct svc_rqst *, u32 *,
295 struct nfsd3_symlinkargs *);
296 int nfs3svc_decode_readdirargs(struct svc_rqst *, u32 *,
297 struct nfsd3_readdirargs *);
298 int nfs3svc_decode_readdirplusargs(struct svc_rqst *, u32 *,
299 struct nfsd3_readdirargs *);
300 int nfs3svc_decode_commitargs(struct svc_rqst *, u32 *,
301 struct nfsd3_commitargs *);
302 int nfs3svc_encode_voidres(struct svc_rqst *, u32 *, void *);
303 int nfs3svc_encode_attrstat(struct svc_rqst *, u32 *,
304 struct nfsd3_attrstat *);
305 int nfs3svc_encode_wccstat(struct svc_rqst *, u32 *,
306 struct nfsd3_attrstat *);
307 int nfs3svc_encode_diropres(struct svc_rqst *, u32 *,
308 struct nfsd3_diropres *);
309 int nfs3svc_encode_accessres(struct svc_rqst *, u32 *,
310 struct nfsd3_accessres *);
311 int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *,
312 struct nfsd3_readlinkres *);
313 int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *);
314 int nfs3svc_encode_writeres(struct svc_rqst *, u32 *, struct nfsd3_writeres *);
315 int nfs3svc_encode_createres(struct svc_rqst *, u32 *,
316 struct nfsd3_diropres *);
317 int nfs3svc_encode_renameres(struct svc_rqst *, u32 *,
318 struct nfsd3_renameres *);
319 int nfs3svc_encode_linkres(struct svc_rqst *, u32 *,
320 struct nfsd3_linkres *);
321 int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *,
322 struct nfsd3_readdirres *);
323 int nfs3svc_encode_fsstatres(struct svc_rqst *, u32 *,
324 struct nfsd3_fsstatres *);
325 int nfs3svc_encode_fsinfores(struct svc_rqst *, u32 *,
326 struct nfsd3_fsinfores *);
327 int nfs3svc_encode_pathconfres(struct svc_rqst *, u32 *,
328 struct nfsd3_pathconfres *);
329 int nfs3svc_encode_commitres(struct svc_rqst *, u32 *,
330 struct nfsd3_commitres *);
332 int nfs3svc_release_fhandle(struct svc_rqst *, u32 *,
333 struct nfsd3_attrstat *);
334 int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *,
335 struct nfsd3_fhandle_pair *);
336 int nfs3svc_encode_entry(struct readdir_cd *, const char *name,
337 int namlen, loff_t offset, ino_t ino,
339 int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name,
340 int namlen, loff_t offset, ino_t ino,
342 /* Helper functions for NFSv3 ACL code */
343 u32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, u32 *p,
345 u32 *nfs3svc_decode_fh(u32 *p, struct svc_fh *fhp);
348 #endif /* _LINUX_NFSD_XDR3_H */