[PATCH] ARM: Fix VFP to use do_div()
[linux-2.6/verdex.git] / include / linux / nfsd / xdr3.h
blob21e18ce7ca63bc047b9a31be8da1700621326c15
1 /*
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>
7 */
9 #ifndef _LINUX_NFSD_XDR3_H
10 #define _LINUX_NFSD_XDR3_H
12 #include <linux/nfsd/xdr.h>
14 struct nfsd3_sattrargs {
15 struct svc_fh fh;
16 struct iattr attrs;
17 int check_guard;
18 time_t guardtime;
21 struct nfsd3_diropargs {
22 struct svc_fh fh;
23 char * name;
24 int len;
27 struct nfsd3_accessargs {
28 struct svc_fh fh;
29 unsigned int access;
32 struct nfsd3_readargs {
33 struct svc_fh fh;
34 __u64 offset;
35 __u32 count;
36 struct kvec vec[RPCSVC_MAXPAGES];
37 int vlen;
40 struct nfsd3_writeargs {
41 svc_fh fh;
42 __u64 offset;
43 __u32 count;
44 int stable;
45 int len;
46 struct kvec vec[RPCSVC_MAXPAGES];
47 int vlen;
50 struct nfsd3_createargs {
51 struct svc_fh fh;
52 char * name;
53 int len;
54 int createmode;
55 struct iattr attrs;
56 __u32 * verf;
59 struct nfsd3_mknodargs {
60 struct svc_fh fh;
61 char * name;
62 int len;
63 __u32 ftype;
64 __u32 major, minor;
65 struct iattr attrs;
68 struct nfsd3_renameargs {
69 struct svc_fh ffh;
70 char * fname;
71 int flen;
72 struct svc_fh tfh;
73 char * tname;
74 int tlen;
77 struct nfsd3_readlinkargs {
78 struct svc_fh fh;
79 char * buffer;
82 struct nfsd3_linkargs {
83 struct svc_fh ffh;
84 struct svc_fh tfh;
85 char * tname;
86 int tlen;
89 struct nfsd3_symlinkargs {
90 struct svc_fh ffh;
91 char * fname;
92 int flen;
93 char * tname;
94 int tlen;
95 struct iattr attrs;
98 struct nfsd3_readdirargs {
99 struct svc_fh fh;
100 __u64 cookie;
101 __u32 dircount;
102 __u32 count;
103 __u32 * verf;
104 u32 * buffer;
107 struct nfsd3_commitargs {
108 struct svc_fh fh;
109 __u64 offset;
110 __u32 count;
113 struct nfsd3_getaclargs {
114 struct svc_fh fh;
115 int mask;
118 struct posix_acl;
119 struct nfsd3_setaclargs {
120 struct svc_fh fh;
121 int mask;
122 struct posix_acl *acl_access;
123 struct posix_acl *acl_default;
126 struct nfsd3_attrstat {
127 __u32 status;
128 struct svc_fh fh;
131 /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
132 struct nfsd3_diropres {
133 __u32 status;
134 struct svc_fh dirfh;
135 struct svc_fh fh;
138 struct nfsd3_accessres {
139 __u32 status;
140 struct svc_fh fh;
141 __u32 access;
144 struct nfsd3_readlinkres {
145 __u32 status;
146 struct svc_fh fh;
147 __u32 len;
150 struct nfsd3_readres {
151 __u32 status;
152 struct svc_fh fh;
153 unsigned long count;
154 int eof;
157 struct nfsd3_writeres {
158 __u32 status;
159 struct svc_fh fh;
160 unsigned long count;
161 int committed;
164 struct nfsd3_renameres {
165 __u32 status;
166 struct svc_fh ffh;
167 struct svc_fh tfh;
170 struct nfsd3_linkres {
171 __u32 status;
172 struct svc_fh tfh;
173 struct svc_fh fh;
176 struct nfsd3_readdirres {
177 __u32 status;
178 struct svc_fh fh;
179 int count;
180 __u32 verf[2];
182 struct readdir_cd common;
183 u32 * buffer;
184 int buflen;
185 u32 * offset;
186 u32 * offset1;
187 struct svc_rqst * rqstp;
191 struct nfsd3_fsstatres {
192 __u32 status;
193 struct kstatfs stats;
194 __u32 invarsec;
197 struct nfsd3_fsinfores {
198 __u32 status;
199 __u32 f_rtmax;
200 __u32 f_rtpref;
201 __u32 f_rtmult;
202 __u32 f_wtmax;
203 __u32 f_wtpref;
204 __u32 f_wtmult;
205 __u32 f_dtpref;
206 __u64 f_maxfilesize;
207 __u32 f_properties;
210 struct nfsd3_pathconfres {
211 __u32 status;
212 __u32 p_link_max;
213 __u32 p_name_max;
214 __u32 p_no_trunc;
215 __u32 p_chown_restricted;
216 __u32 p_case_insensitive;
217 __u32 p_case_preserving;
220 struct nfsd3_commitres {
221 __u32 status;
222 struct svc_fh fh;
225 struct nfsd3_getaclres {
226 __u32 status;
227 struct svc_fh fh;
228 int mask;
229 struct posix_acl *acl_access;
230 struct posix_acl *acl_default;
233 /* dummy type for release */
234 struct nfsd3_fhandle_pair {
235 __u32 dummy;
236 struct svc_fh fh1;
237 struct svc_fh fh2;
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,
337 unsigned int);
338 int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name,
339 int namlen, loff_t offset, ino_t ino,
340 unsigned int);
341 /* Helper functions for NFSv3 ACL code */
342 u32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, u32 *p,
343 struct svc_fh *fhp);
344 u32 *nfs3svc_decode_fh(u32 *p, struct svc_fh *fhp);
347 #endif /* _LINUX_NFSD_XDR3_H */