Rev 423 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
423 | giacomo | 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 | |||
14 | struct nfsd3_sattrargs { |
||
15 | struct svc_fh fh; |
||
16 | struct iattr attrs; |
||
17 | int check_guard; |
||
18 | time_t guardtime; |
||
19 | }; |
||
20 | |||
21 | struct nfsd3_diropargs { |
||
22 | struct svc_fh fh; |
||
23 | char * name; |
||
24 | int len; |
||
25 | }; |
||
26 | |||
27 | struct nfsd3_accessargs { |
||
28 | struct svc_fh fh; |
||
29 | unsigned int access; |
||
30 | }; |
||
31 | |||
32 | struct nfsd3_readargs { |
||
33 | struct svc_fh fh; |
||
34 | __u64 offset; |
||
35 | __u32 count; |
||
36 | struct iovec vec[RPCSVC_MAXPAGES]; |
||
37 | int vlen; |
||
38 | }; |
||
39 | |||
40 | struct nfsd3_writeargs { |
||
41 | svc_fh fh; |
||
42 | __u64 offset; |
||
43 | __u32 count; |
||
44 | int stable; |
||
45 | int len; |
||
46 | struct iovec vec[RPCSVC_MAXPAGES]; |
||
47 | int vlen; |
||
48 | }; |
||
49 | |||
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; |
||
57 | }; |
||
58 | |||
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; |
||
66 | }; |
||
67 | |||
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; |
||
75 | }; |
||
76 | |||
77 | struct nfsd3_readlinkargs { |
||
78 | struct svc_fh fh; |
||
79 | char * buffer; |
||
80 | }; |
||
81 | |||
82 | struct nfsd3_linkargs { |
||
83 | struct svc_fh ffh; |
||
84 | struct svc_fh tfh; |
||
85 | char * tname; |
||
86 | int tlen; |
||
87 | }; |
||
88 | |||
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; |
||
96 | }; |
||
97 | |||
98 | struct nfsd3_readdirargs { |
||
99 | struct svc_fh fh; |
||
100 | __u64 cookie; |
||
101 | __u32 dircount; |
||
102 | __u32 count; |
||
103 | __u32 * verf; |
||
104 | u32 * buffer; |
||
105 | }; |
||
106 | |||
107 | struct nfsd3_commitargs { |
||
108 | struct svc_fh fh; |
||
109 | __u64 offset; |
||
110 | __u32 count; |
||
111 | }; |
||
112 | |||
113 | struct nfsd3_attrstat { |
||
114 | __u32 status; |
||
115 | struct svc_fh fh; |
||
116 | }; |
||
117 | |||
118 | /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */ |
||
119 | struct nfsd3_diropres { |
||
120 | __u32 status; |
||
121 | struct svc_fh dirfh; |
||
122 | struct svc_fh fh; |
||
123 | }; |
||
124 | |||
125 | struct nfsd3_accessres { |
||
126 | __u32 status; |
||
127 | struct svc_fh fh; |
||
128 | __u32 access; |
||
129 | }; |
||
130 | |||
131 | struct nfsd3_readlinkres { |
||
132 | __u32 status; |
||
133 | struct svc_fh fh; |
||
134 | __u32 len; |
||
135 | }; |
||
136 | |||
137 | struct nfsd3_readres { |
||
138 | __u32 status; |
||
139 | struct svc_fh fh; |
||
140 | unsigned long count; |
||
141 | int eof; |
||
142 | }; |
||
143 | |||
144 | struct nfsd3_writeres { |
||
145 | __u32 status; |
||
146 | struct svc_fh fh; |
||
147 | unsigned long count; |
||
148 | int committed; |
||
149 | }; |
||
150 | |||
151 | struct nfsd3_renameres { |
||
152 | __u32 status; |
||
153 | struct svc_fh ffh; |
||
154 | struct svc_fh tfh; |
||
155 | }; |
||
156 | |||
157 | struct nfsd3_linkres { |
||
158 | __u32 status; |
||
159 | struct svc_fh tfh; |
||
160 | struct svc_fh fh; |
||
161 | }; |
||
162 | |||
163 | struct 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 | struct svc_rqst * rqstp; |
||
174 | |||
175 | }; |
||
176 | |||
177 | struct nfsd3_fsstatres { |
||
178 | __u32 status; |
||
179 | struct kstatfs stats; |
||
180 | __u32 invarsec; |
||
181 | }; |
||
182 | |||
183 | struct nfsd3_fsinfores { |
||
184 | __u32 status; |
||
185 | __u32 f_rtmax; |
||
186 | __u32 f_rtpref; |
||
187 | __u32 f_rtmult; |
||
188 | __u32 f_wtmax; |
||
189 | __u32 f_wtpref; |
||
190 | __u32 f_wtmult; |
||
191 | __u32 f_dtpref; |
||
192 | __u64 f_maxfilesize; |
||
193 | __u32 f_properties; |
||
194 | }; |
||
195 | |||
196 | struct nfsd3_pathconfres { |
||
197 | __u32 status; |
||
198 | __u32 p_link_max; |
||
199 | __u32 p_name_max; |
||
200 | __u32 p_no_trunc; |
||
201 | __u32 p_chown_restricted; |
||
202 | __u32 p_case_insensitive; |
||
203 | __u32 p_case_preserving; |
||
204 | }; |
||
205 | |||
206 | struct nfsd3_commitres { |
||
207 | __u32 status; |
||
208 | struct svc_fh fh; |
||
209 | }; |
||
210 | |||
211 | /* dummy type for release */ |
||
212 | struct nfsd3_fhandle_pair { |
||
213 | __u32 dummy; |
||
214 | struct svc_fh fh1; |
||
215 | struct svc_fh fh2; |
||
216 | }; |
||
217 | |||
218 | /* |
||
219 | * Storage requirements for XDR arguments and results. |
||
220 | */ |
||
221 | union nfsd3_xdrstore { |
||
222 | struct nfsd3_sattrargs sattrargs; |
||
223 | struct nfsd3_diropargs diropargs; |
||
224 | struct nfsd3_readargs readargs; |
||
225 | struct nfsd3_writeargs writeargs; |
||
226 | struct nfsd3_createargs createargs; |
||
227 | struct nfsd3_renameargs renameargs; |
||
228 | struct nfsd3_linkargs linkargs; |
||
229 | struct nfsd3_symlinkargs symlinkargs; |
||
230 | struct nfsd3_readdirargs readdirargs; |
||
231 | struct nfsd3_diropres diropres; |
||
232 | struct nfsd3_accessres accessres; |
||
233 | struct nfsd3_readlinkres readlinkres; |
||
234 | struct nfsd3_readres readres; |
||
235 | struct nfsd3_writeres writeres; |
||
236 | struct nfsd3_renameres renameres; |
||
237 | struct nfsd3_linkres linkres; |
||
238 | struct nfsd3_readdirres readdirres; |
||
239 | struct nfsd3_fsstatres fsstatres; |
||
240 | struct nfsd3_fsinfores fsinfores; |
||
241 | struct nfsd3_pathconfres pathconfres; |
||
242 | struct nfsd3_commitres commitres; |
||
243 | }; |
||
244 | |||
245 | #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore) |
||
246 | |||
247 | int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); |
||
248 | int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *, |
||
249 | struct nfsd3_sattrargs *); |
||
250 | int nfs3svc_decode_diropargs(struct svc_rqst *, u32 *, |
||
251 | struct nfsd3_diropargs *); |
||
252 | int nfs3svc_decode_accessargs(struct svc_rqst *, u32 *, |
||
253 | struct nfsd3_accessargs *); |
||
254 | int nfs3svc_decode_readargs(struct svc_rqst *, u32 *, |
||
255 | struct nfsd3_readargs *); |
||
256 | int nfs3svc_decode_writeargs(struct svc_rqst *, u32 *, |
||
257 | struct nfsd3_writeargs *); |
||
258 | int nfs3svc_decode_createargs(struct svc_rqst *, u32 *, |
||
259 | struct nfsd3_createargs *); |
||
260 | int nfs3svc_decode_mkdirargs(struct svc_rqst *, u32 *, |
||
261 | struct nfsd3_createargs *); |
||
262 | int nfs3svc_decode_mknodargs(struct svc_rqst *, u32 *, |
||
263 | struct nfsd3_mknodargs *); |
||
264 | int nfs3svc_decode_renameargs(struct svc_rqst *, u32 *, |
||
265 | struct nfsd3_renameargs *); |
||
266 | int nfs3svc_decode_readlinkargs(struct svc_rqst *, u32 *, |
||
267 | struct nfsd3_readlinkargs *); |
||
268 | int nfs3svc_decode_linkargs(struct svc_rqst *, u32 *, |
||
269 | struct nfsd3_linkargs *); |
||
270 | int nfs3svc_decode_symlinkargs(struct svc_rqst *, u32 *, |
||
271 | struct nfsd3_symlinkargs *); |
||
272 | int nfs3svc_decode_readdirargs(struct svc_rqst *, u32 *, |
||
273 | struct nfsd3_readdirargs *); |
||
274 | int nfs3svc_decode_readdirplusargs(struct svc_rqst *, u32 *, |
||
275 | struct nfsd3_readdirargs *); |
||
276 | int nfs3svc_decode_commitargs(struct svc_rqst *, u32 *, |
||
277 | struct nfsd3_commitargs *); |
||
278 | int nfs3svc_encode_voidres(struct svc_rqst *, u32 *, void *); |
||
279 | int nfs3svc_encode_attrstat(struct svc_rqst *, u32 *, |
||
280 | struct nfsd3_attrstat *); |
||
281 | int nfs3svc_encode_wccstat(struct svc_rqst *, u32 *, |
||
282 | struct nfsd3_attrstat *); |
||
283 | int nfs3svc_encode_diropres(struct svc_rqst *, u32 *, |
||
284 | struct nfsd3_diropres *); |
||
285 | int nfs3svc_encode_accessres(struct svc_rqst *, u32 *, |
||
286 | struct nfsd3_accessres *); |
||
287 | int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *, |
||
288 | struct nfsd3_readlinkres *); |
||
289 | int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *); |
||
290 | int nfs3svc_encode_writeres(struct svc_rqst *, u32 *, struct nfsd3_writeres *); |
||
291 | int nfs3svc_encode_createres(struct svc_rqst *, u32 *, |
||
292 | struct nfsd3_diropres *); |
||
293 | int nfs3svc_encode_renameres(struct svc_rqst *, u32 *, |
||
294 | struct nfsd3_renameres *); |
||
295 | int nfs3svc_encode_linkres(struct svc_rqst *, u32 *, |
||
296 | struct nfsd3_linkres *); |
||
297 | int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *, |
||
298 | struct nfsd3_readdirres *); |
||
299 | int nfs3svc_encode_fsstatres(struct svc_rqst *, u32 *, |
||
300 | struct nfsd3_fsstatres *); |
||
301 | int nfs3svc_encode_fsinfores(struct svc_rqst *, u32 *, |
||
302 | struct nfsd3_fsinfores *); |
||
303 | int nfs3svc_encode_pathconfres(struct svc_rqst *, u32 *, |
||
304 | struct nfsd3_pathconfres *); |
||
305 | int nfs3svc_encode_commitres(struct svc_rqst *, u32 *, |
||
306 | struct nfsd3_commitres *); |
||
307 | |||
308 | int nfs3svc_release_fhandle(struct svc_rqst *, u32 *, |
||
309 | struct nfsd3_attrstat *); |
||
310 | int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *, |
||
311 | struct nfsd3_fhandle_pair *); |
||
312 | int nfs3svc_encode_entry(struct readdir_cd *, const char *name, |
||
313 | int namlen, loff_t offset, ino_t ino, |
||
314 | unsigned int); |
||
315 | int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, |
||
316 | int namlen, loff_t offset, ino_t ino, |
||
317 | unsigned int); |
||
318 | |||
319 | |||
320 | #endif /* _LINUX_NFSD_XDR3_H */ |