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_attrstat
{
118 /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
119 struct nfsd3_diropres
{
125 struct nfsd3_accessres
{
131 struct nfsd3_readlinkres
{
137 struct nfsd3_readres
{
144 struct nfsd3_writeres
{
151 struct nfsd3_renameres
{
157 struct nfsd3_linkres
{
163 struct nfsd3_readdirres
{
169 struct readdir_cd common
;
174 struct svc_rqst
* rqstp
;
178 struct nfsd3_fsstatres
{
180 struct kstatfs stats
;
184 struct nfsd3_fsinfores
{
197 struct nfsd3_pathconfres
{
202 __u32 p_chown_restricted
;
203 __u32 p_case_insensitive
;
204 __u32 p_case_preserving
;
207 struct nfsd3_commitres
{
212 /* dummy type for release */
213 struct nfsd3_fhandle_pair
{
220 * Storage requirements for XDR arguments and results.
222 union nfsd3_xdrstore
{
223 struct nfsd3_sattrargs sattrargs
;
224 struct nfsd3_diropargs diropargs
;
225 struct nfsd3_readargs readargs
;
226 struct nfsd3_writeargs writeargs
;
227 struct nfsd3_createargs createargs
;
228 struct nfsd3_renameargs renameargs
;
229 struct nfsd3_linkargs linkargs
;
230 struct nfsd3_symlinkargs symlinkargs
;
231 struct nfsd3_readdirargs readdirargs
;
232 struct nfsd3_diropres diropres
;
233 struct nfsd3_accessres accessres
;
234 struct nfsd3_readlinkres readlinkres
;
235 struct nfsd3_readres readres
;
236 struct nfsd3_writeres writeres
;
237 struct nfsd3_renameres renameres
;
238 struct nfsd3_linkres linkres
;
239 struct nfsd3_readdirres readdirres
;
240 struct nfsd3_fsstatres fsstatres
;
241 struct nfsd3_fsinfores fsinfores
;
242 struct nfsd3_pathconfres pathconfres
;
243 struct nfsd3_commitres commitres
;
246 #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
248 int nfs3svc_decode_fhandle(struct svc_rqst
*, u32
*, struct nfsd_fhandle
*);
249 int nfs3svc_decode_sattrargs(struct svc_rqst
*, u32
*,
250 struct nfsd3_sattrargs
*);
251 int nfs3svc_decode_diropargs(struct svc_rqst
*, u32
*,
252 struct nfsd3_diropargs
*);
253 int nfs3svc_decode_accessargs(struct svc_rqst
*, u32
*,
254 struct nfsd3_accessargs
*);
255 int nfs3svc_decode_readargs(struct svc_rqst
*, u32
*,
256 struct nfsd3_readargs
*);
257 int nfs3svc_decode_writeargs(struct svc_rqst
*, u32
*,
258 struct nfsd3_writeargs
*);
259 int nfs3svc_decode_createargs(struct svc_rqst
*, u32
*,
260 struct nfsd3_createargs
*);
261 int nfs3svc_decode_mkdirargs(struct svc_rqst
*, u32
*,
262 struct nfsd3_createargs
*);
263 int nfs3svc_decode_mknodargs(struct svc_rqst
*, u32
*,
264 struct nfsd3_mknodargs
*);
265 int nfs3svc_decode_renameargs(struct svc_rqst
*, u32
*,
266 struct nfsd3_renameargs
*);
267 int nfs3svc_decode_readlinkargs(struct svc_rqst
*, u32
*,
268 struct nfsd3_readlinkargs
*);
269 int nfs3svc_decode_linkargs(struct svc_rqst
*, u32
*,
270 struct nfsd3_linkargs
*);
271 int nfs3svc_decode_symlinkargs(struct svc_rqst
*, u32
*,
272 struct nfsd3_symlinkargs
*);
273 int nfs3svc_decode_readdirargs(struct svc_rqst
*, u32
*,
274 struct nfsd3_readdirargs
*);
275 int nfs3svc_decode_readdirplusargs(struct svc_rqst
*, u32
*,
276 struct nfsd3_readdirargs
*);
277 int nfs3svc_decode_commitargs(struct svc_rqst
*, u32
*,
278 struct nfsd3_commitargs
*);
279 int nfs3svc_encode_voidres(struct svc_rqst
*, u32
*, void *);
280 int nfs3svc_encode_attrstat(struct svc_rqst
*, u32
*,
281 struct nfsd3_attrstat
*);
282 int nfs3svc_encode_wccstat(struct svc_rqst
*, u32
*,
283 struct nfsd3_attrstat
*);
284 int nfs3svc_encode_diropres(struct svc_rqst
*, u32
*,
285 struct nfsd3_diropres
*);
286 int nfs3svc_encode_accessres(struct svc_rqst
*, u32
*,
287 struct nfsd3_accessres
*);
288 int nfs3svc_encode_readlinkres(struct svc_rqst
*, u32
*,
289 struct nfsd3_readlinkres
*);
290 int nfs3svc_encode_readres(struct svc_rqst
*, u32
*, struct nfsd3_readres
*);
291 int nfs3svc_encode_writeres(struct svc_rqst
*, u32
*, struct nfsd3_writeres
*);
292 int nfs3svc_encode_createres(struct svc_rqst
*, u32
*,
293 struct nfsd3_diropres
*);
294 int nfs3svc_encode_renameres(struct svc_rqst
*, u32
*,
295 struct nfsd3_renameres
*);
296 int nfs3svc_encode_linkres(struct svc_rqst
*, u32
*,
297 struct nfsd3_linkres
*);
298 int nfs3svc_encode_readdirres(struct svc_rqst
*, u32
*,
299 struct nfsd3_readdirres
*);
300 int nfs3svc_encode_fsstatres(struct svc_rqst
*, u32
*,
301 struct nfsd3_fsstatres
*);
302 int nfs3svc_encode_fsinfores(struct svc_rqst
*, u32
*,
303 struct nfsd3_fsinfores
*);
304 int nfs3svc_encode_pathconfres(struct svc_rqst
*, u32
*,
305 struct nfsd3_pathconfres
*);
306 int nfs3svc_encode_commitres(struct svc_rqst
*, u32
*,
307 struct nfsd3_commitres
*);
309 int nfs3svc_release_fhandle(struct svc_rqst
*, u32
*,
310 struct nfsd3_attrstat
*);
311 int nfs3svc_release_fhandle2(struct svc_rqst
*, u32
*,
312 struct nfsd3_fhandle_pair
*);
313 int nfs3svc_encode_entry(struct readdir_cd
*, const char *name
,
314 int namlen
, loff_t offset
, ino_t ino
,
316 int nfs3svc_encode_entry_plus(struct readdir_cd
*, const char *name
,
317 int namlen
, loff_t offset
, ino_t ino
,
321 #endif /* _LINUX_NFSD_XDR3_H */