aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfsd/xdr3.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/nfsd/xdr3.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/nfsd/xdr3.h')
-rw-r--r--include/linux/nfsd/xdr3.h321
1 files changed, 321 insertions, 0 deletions
diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h
new file mode 100644
index 000000000000..0ae9e0ef5f68
--- /dev/null
+++ b/include/linux/nfsd/xdr3.h
@@ -0,0 +1,321 @@
1/*
2 * linux/include/linux/nfsd/xdr3.h
3 *
4 * XDR types for NFSv3 in nfsd.
5 *
6 * Copyright (C) 1996-1998, Olaf Kirch <okir@monad.swb.de>
7 */
8
9#ifndef _LINUX_NFSD_XDR3_H
10#define _LINUX_NFSD_XDR3_H
11
12#include <linux/nfsd/xdr.h>
13
14struct nfsd3_sattrargs {
15 struct svc_fh fh;
16 struct iattr attrs;
17 int check_guard;
18 time_t guardtime;
19};
20
21struct nfsd3_diropargs {
22 struct svc_fh fh;
23 char * name;
24 int len;
25};
26
27struct nfsd3_accessargs {
28 struct svc_fh fh;
29 unsigned int access;
30};
31
32struct nfsd3_readargs {
33 struct svc_fh fh;
34 __u64 offset;
35 __u32 count;
36 struct kvec vec[RPCSVC_MAXPAGES];
37 int vlen;
38};
39
40struct 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;
48};
49
50struct nfsd3_createargs {
51 struct svc_fh fh;
52 char * name;
53 int len;
54 int createmode;
55 struct iattr attrs;
56 __u32 * verf;
57};
58
59struct nfsd3_mknodargs {
60 struct svc_fh fh;
61 char * name;
62 int len;
63 __u32 ftype;
64 __u32 major, minor;
65 struct iattr attrs;
66};
67
68struct nfsd3_renameargs {
69 struct svc_fh ffh;
70 char * fname;
71 int flen;
72 struct svc_fh tfh;
73 char * tname;
74 int tlen;
75};
76
77struct nfsd3_readlinkargs {
78 struct svc_fh fh;
79 char * buffer;
80};
81
82struct nfsd3_linkargs {
83 struct svc_fh ffh;
84 struct svc_fh tfh;
85 char * tname;
86 int tlen;
87};
88
89struct nfsd3_symlinkargs {
90 struct svc_fh ffh;
91 char * fname;
92 int flen;
93 char * tname;
94 int tlen;
95 struct iattr attrs;
96};
97
98struct nfsd3_readdirargs {
99 struct svc_fh fh;
100 __u64 cookie;
101 __u32 dircount;
102 __u32 count;
103 __u32 * verf;
104 u32 * buffer;
105};
106
107struct nfsd3_commitargs {
108 struct svc_fh fh;
109 __u64 offset;
110 __u32 count;
111};
112
113struct nfsd3_attrstat {
114 __u32 status;
115 struct svc_fh fh;
116};
117
118/* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
119struct nfsd3_diropres {
120 __u32 status;
121 struct svc_fh dirfh;
122 struct svc_fh fh;
123};
124
125struct nfsd3_accessres {
126 __u32 status;
127 struct svc_fh fh;
128 __u32 access;
129};
130
131struct nfsd3_readlinkres {
132 __u32 status;
133 struct svc_fh fh;
134 __u32 len;
135};
136
137struct nfsd3_readres {
138 __u32 status;
139 struct svc_fh fh;
140 unsigned long count;
141 int eof;
142};
143
144struct nfsd3_writeres {
145 __u32 status;
146 struct svc_fh fh;
147 unsigned long count;
148 int committed;
149};
150
151struct nfsd3_renameres {
152 __u32 status;
153 struct svc_fh ffh;
154 struct svc_fh tfh;
155};
156
157struct nfsd3_linkres {
158 __u32 status;
159 struct svc_fh tfh;
160 struct svc_fh fh;
161};
162
163struct nfsd3_readdirres {
164 __u32 status;
165 struct svc_fh fh;
166 int count;
167 __u32 verf[2];
168
169 struct readdir_cd common;
170 u32 * buffer;
171 int buflen;
172 u32 * offset;
173 u32 * offset1;
174 struct svc_rqst * rqstp;
175
176};
177
178struct nfsd3_fsstatres {
179 __u32 status;
180 struct kstatfs stats;
181 __u32 invarsec;
182};
183
184struct nfsd3_fsinfores {
185 __u32 status;
186 __u32 f_rtmax;
187 __u32 f_rtpref;
188 __u32 f_rtmult;
189 __u32 f_wtmax;
190 __u32 f_wtpref;
191 __u32 f_wtmult;
192 __u32 f_dtpref;
193 __u64 f_maxfilesize;
194 __u32 f_properties;
195};
196
197struct nfsd3_pathconfres {
198 __u32 status;
199 __u32 p_link_max;
200 __u32 p_name_max;
201 __u32 p_no_trunc;
202 __u32 p_chown_restricted;
203 __u32 p_case_insensitive;
204 __u32 p_case_preserving;
205};
206
207struct nfsd3_commitres {
208 __u32 status;
209 struct svc_fh fh;
210};
211
212/* dummy type for release */
213struct nfsd3_fhandle_pair {
214 __u32 dummy;
215 struct svc_fh fh1;
216 struct svc_fh fh2;
217};
218
219/*
220 * Storage requirements for XDR arguments and results.
221 */
222union 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;
244};
245
246#define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
247
248int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
249int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *,
250 struct nfsd3_sattrargs *);
251int nfs3svc_decode_diropargs(struct svc_rqst *, u32 *,
252 struct nfsd3_diropargs *);
253int nfs3svc_decode_accessargs(struct svc_rqst *, u32 *,
254 struct nfsd3_accessargs *);
255int nfs3svc_decode_readargs(struct svc_rqst *, u32 *,
256 struct nfsd3_readargs *);
257int nfs3svc_decode_writeargs(struct svc_rqst *, u32 *,
258 struct nfsd3_writeargs *);
259int nfs3svc_decode_createargs(struct svc_rqst *, u32 *,
260 struct nfsd3_createargs *);
261int nfs3svc_decode_mkdirargs(struct svc_rqst *, u32 *,
262 struct nfsd3_createargs *);
263int nfs3svc_decode_mknodargs(struct svc_rqst *, u32 *,
264 struct nfsd3_mknodargs *);
265int nfs3svc_decode_renameargs(struct svc_rqst *, u32 *,
266 struct nfsd3_renameargs *);
267int nfs3svc_decode_readlinkargs(struct svc_rqst *, u32 *,
268 struct nfsd3_readlinkargs *);
269int nfs3svc_decode_linkargs(struct svc_rqst *, u32 *,
270 struct nfsd3_linkargs *);
271int nfs3svc_decode_symlinkargs(struct svc_rqst *, u32 *,
272 struct nfsd3_symlinkargs *);
273int nfs3svc_decode_readdirargs(struct svc_rqst *, u32 *,
274 struct nfsd3_readdirargs *);
275int nfs3svc_decode_readdirplusargs(struct svc_rqst *, u32 *,
276 struct nfsd3_readdirargs *);
277int nfs3svc_decode_commitargs(struct svc_rqst *, u32 *,
278 struct nfsd3_commitargs *);
279int nfs3svc_encode_voidres(struct svc_rqst *, u32 *, void *);
280int nfs3svc_encode_attrstat(struct svc_rqst *, u32 *,
281 struct nfsd3_attrstat *);
282int nfs3svc_encode_wccstat(struct svc_rqst *, u32 *,
283 struct nfsd3_attrstat *);
284int nfs3svc_encode_diropres(struct svc_rqst *, u32 *,
285 struct nfsd3_diropres *);
286int nfs3svc_encode_accessres(struct svc_rqst *, u32 *,
287 struct nfsd3_accessres *);
288int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *,
289 struct nfsd3_readlinkres *);
290int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *);
291int nfs3svc_encode_writeres(struct svc_rqst *, u32 *, struct nfsd3_writeres *);
292int nfs3svc_encode_createres(struct svc_rqst *, u32 *,
293 struct nfsd3_diropres *);
294int nfs3svc_encode_renameres(struct svc_rqst *, u32 *,
295 struct nfsd3_renameres *);
296int nfs3svc_encode_linkres(struct svc_rqst *, u32 *,
297 struct nfsd3_linkres *);
298int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *,
299 struct nfsd3_readdirres *);
300int nfs3svc_encode_fsstatres(struct svc_rqst *, u32 *,
301 struct nfsd3_fsstatres *);
302int nfs3svc_encode_fsinfores(struct svc_rqst *, u32 *,
303 struct nfsd3_fsinfores *);
304int nfs3svc_encode_pathconfres(struct svc_rqst *, u32 *,
305 struct nfsd3_pathconfres *);
306int nfs3svc_encode_commitres(struct svc_rqst *, u32 *,
307 struct nfsd3_commitres *);
308
309int nfs3svc_release_fhandle(struct svc_rqst *, u32 *,
310 struct nfsd3_attrstat *);
311int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *,
312 struct nfsd3_fhandle_pair *);
313int nfs3svc_encode_entry(struct readdir_cd *, const char *name,
314 int namlen, loff_t offset, ino_t ino,
315 unsigned int);
316int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name,
317 int namlen, loff_t offset, ino_t ino,
318 unsigned int);
319
320
321#endif /* _LINUX_NFSD_XDR3_H */