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 {
131 /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
132 struct nfsd3_diropres {
138 struct nfsd3_accessres {
144 struct nfsd3_readlinkres {
150 struct nfsd3_readres {
157 struct nfsd3_writeres {
164 struct nfsd3_renameres {
170 struct nfsd3_linkres {
176 struct nfsd3_readdirres {
182 struct readdir_cd common;
187 struct svc_rqst * rqstp;
191 struct nfsd3_fsstatres {
193 struct kstatfs stats;
197 struct nfsd3_fsinfores {
210 struct nfsd3_pathconfres {
215 __u32 p_chown_restricted;
216 __u32 p_case_insensitive;
217 __u32 p_case_preserving;
220 struct nfsd3_commitres {
225 struct nfsd3_getaclres {
229 struct posix_acl *acl_access;
230 struct posix_acl *acl_default;
233 /* dummy type for release */
234 struct nfsd3_fhandle_pair {
241 * Storage requirements for XDR arguments and results.
243 union nfsd3_xdrstore {
244 struct nfsd3_sattrargs sattrargs;
245 struct nfsd3_diropargs diropargs;
246 struct nfsd3_readargs readargs;
247 struct nfsd3_writeargs writeargs;
248 struct nfsd3_createargs createargs;
249 struct nfsd3_renameargs renameargs;
250 struct nfsd3_linkargs linkargs;
251 struct nfsd3_symlinkargs symlinkargs;
252 struct nfsd3_readdirargs readdirargs;
253 struct nfsd3_diropres diropres;
254 struct nfsd3_accessres accessres;
255 struct nfsd3_readlinkres readlinkres;
256 struct nfsd3_readres readres;
257 struct nfsd3_writeres writeres;
258 struct nfsd3_renameres renameres;
259 struct nfsd3_linkres linkres;
260 struct nfsd3_readdirres readdirres;
261 struct nfsd3_fsstatres fsstatres;
262 struct nfsd3_fsinfores fsinfores;
263 struct nfsd3_pathconfres pathconfres;
264 struct nfsd3_commitres commitres;
265 struct nfsd3_getaclres getaclres;
268 #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
270 int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
271 int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *,
272 struct nfsd3_sattrargs *);
273 int nfs3svc_decode_diropargs(struct svc_rqst *, u32 *,
274 struct nfsd3_diropargs *);
275 int nfs3svc_decode_accessargs(struct svc_rqst *, u32 *,
276 struct nfsd3_accessargs *);
277 int nfs3svc_decode_readargs(struct svc_rqst *, u32 *,
278 struct nfsd3_readargs *);
279 int nfs3svc_decode_writeargs(struct svc_rqst *, u32 *,
280 struct nfsd3_writeargs *);
281 int nfs3svc_decode_createargs(struct svc_rqst *, u32 *,
282 struct nfsd3_createargs *);
283 int nfs3svc_decode_mkdirargs(struct svc_rqst *, u32 *,
284 struct nfsd3_createargs *);
285 int nfs3svc_decode_mknodargs(struct svc_rqst *, u32 *,
286 struct nfsd3_mknodargs *);
287 int nfs3svc_decode_renameargs(struct svc_rqst *, u32 *,
288 struct nfsd3_renameargs *);
289 int nfs3svc_decode_readlinkargs(struct svc_rqst *, u32 *,
290 struct nfsd3_readlinkargs *);
291 int nfs3svc_decode_linkargs(struct svc_rqst *, u32 *,
292 struct nfsd3_linkargs *);
293 int nfs3svc_decode_symlinkargs(struct svc_rqst *, u32 *,
294 struct nfsd3_symlinkargs *);
295 int nfs3svc_decode_readdirargs(struct svc_rqst *, u32 *,
296 struct nfsd3_readdirargs *);
297 int nfs3svc_decode_readdirplusargs(struct svc_rqst *, u32 *,
298 struct nfsd3_readdirargs *);
299 int nfs3svc_decode_commitargs(struct svc_rqst *, u32 *,
300 struct nfsd3_commitargs *);
301 int nfs3svc_encode_voidres(struct svc_rqst *, u32 *, void *);
302 int nfs3svc_encode_attrstat(struct svc_rqst *, u32 *,
303 struct nfsd3_attrstat *);
304 int nfs3svc_encode_wccstat(struct svc_rqst *, u32 *,
305 struct nfsd3_attrstat *);
306 int nfs3svc_encode_diropres(struct svc_rqst *, u32 *,
307 struct nfsd3_diropres *);
308 int nfs3svc_encode_accessres(struct svc_rqst *, u32 *,
309 struct nfsd3_accessres *);
310 int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *,
311 struct nfsd3_readlinkres *);
312 int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *);
313 int nfs3svc_encode_writeres(struct svc_rqst *, u32 *, struct nfsd3_writeres *);
314 int nfs3svc_encode_createres(struct svc_rqst *, u32 *,
315 struct nfsd3_diropres *);
316 int nfs3svc_encode_renameres(struct svc_rqst *, u32 *,
317 struct nfsd3_renameres *);
318 int nfs3svc_encode_linkres(struct svc_rqst *, u32 *,
319 struct nfsd3_linkres *);
320 int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *,
321 struct nfsd3_readdirres *);
322 int nfs3svc_encode_fsstatres(struct svc_rqst *, u32 *,
323 struct nfsd3_fsstatres *);
324 int nfs3svc_encode_fsinfores(struct svc_rqst *, u32 *,
325 struct nfsd3_fsinfores *);
326 int nfs3svc_encode_pathconfres(struct svc_rqst *, u32 *,
327 struct nfsd3_pathconfres *);
328 int nfs3svc_encode_commitres(struct svc_rqst *, u32 *,
329 struct nfsd3_commitres *);
331 int nfs3svc_release_fhandle(struct svc_rqst *, u32 *,
332 struct nfsd3_attrstat *);
333 int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *,
334 struct nfsd3_fhandle_pair *);
335 int nfs3svc_encode_entry(struct readdir_cd *, const char *name,
336 int namlen, loff_t offset, ino_t ino,
338 int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name,
339 int namlen, loff_t offset, ino_t ino,
341 /* Helper functions for NFSv3 ACL code */
342 u32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, u32 *p,
344 u32 *nfs3svc_decode_fh(u32 *p, struct svc_fh *fhp);
347 #endif /* _LINUX_NFSD_XDR3_H */