Blame view
fs/nfsd/xdr3.h
8.08 KB
1da177e4c Linux-2.6.12-rc2 |
1 |
/* |
1da177e4c Linux-2.6.12-rc2 |
2 3 4 5 6 7 8 |
* XDR types for NFSv3 in nfsd. * * Copyright (C) 1996-1998, Olaf Kirch <okir@monad.swb.de> */ #ifndef _LINUX_NFSD_XDR3_H #define _LINUX_NFSD_XDR3_H |
9a74af213 nfsd: Move privat... |
9 |
#include "xdr.h" |
1da177e4c Linux-2.6.12-rc2 |
10 11 12 13 14 15 16 17 18 19 20 |
struct nfsd3_sattrargs { struct svc_fh fh; struct iattr attrs; int check_guard; time_t guardtime; }; struct nfsd3_diropargs { struct svc_fh fh; char * name; |
29d5e5553 NFSD: File name l... |
21 |
unsigned int len; |
1da177e4c Linux-2.6.12-rc2 |
22 23 24 25 26 27 28 29 30 31 32 |
}; struct nfsd3_accessargs { struct svc_fh fh; unsigned int access; }; struct nfsd3_readargs { struct svc_fh fh; __u64 offset; __u32 count; |
1da177e4c Linux-2.6.12-rc2 |
33 34 35 36 37 38 39 40 |
int vlen; }; struct nfsd3_writeargs { svc_fh fh; __u64 offset; __u32 count; int stable; |
0ba7536d5 [PATCH] knfsd: Fi... |
41 |
__u32 len; |
1da177e4c Linux-2.6.12-rc2 |
42 43 44 45 46 47 |
int vlen; }; struct nfsd3_createargs { struct svc_fh fh; char * name; |
29d5e5553 NFSD: File name l... |
48 |
unsigned int len; |
1da177e4c Linux-2.6.12-rc2 |
49 50 |
int createmode; struct iattr attrs; |
91f07168c [PATCH] xdr annot... |
51 |
__be32 * verf; |
1da177e4c Linux-2.6.12-rc2 |
52 53 54 55 56 |
}; struct nfsd3_mknodargs { struct svc_fh fh; char * name; |
29d5e5553 NFSD: File name l... |
57 |
unsigned int len; |
1da177e4c Linux-2.6.12-rc2 |
58 59 60 61 62 63 64 65 |
__u32 ftype; __u32 major, minor; struct iattr attrs; }; struct nfsd3_renameargs { struct svc_fh ffh; char * fname; |
29d5e5553 NFSD: File name l... |
66 |
unsigned int flen; |
1da177e4c Linux-2.6.12-rc2 |
67 68 |
struct svc_fh tfh; char * tname; |
29d5e5553 NFSD: File name l... |
69 |
unsigned int tlen; |
1da177e4c Linux-2.6.12-rc2 |
70 71 72 73 74 75 76 77 78 79 80 |
}; struct nfsd3_readlinkargs { struct svc_fh fh; char * buffer; }; struct nfsd3_linkargs { struct svc_fh ffh; struct svc_fh tfh; char * tname; |
29d5e5553 NFSD: File name l... |
81 |
unsigned int tlen; |
1da177e4c Linux-2.6.12-rc2 |
82 83 84 85 86 |
}; struct nfsd3_symlinkargs { struct svc_fh ffh; char * fname; |
29d5e5553 NFSD: File name l... |
87 |
unsigned int flen; |
1da177e4c Linux-2.6.12-rc2 |
88 |
char * tname; |
48b4ba3fd NFSD: Path name l... |
89 |
unsigned int tlen; |
1da177e4c Linux-2.6.12-rc2 |
90 91 92 93 94 95 96 97 |
struct iattr attrs; }; struct nfsd3_readdirargs { struct svc_fh fh; __u64 cookie; __u32 dircount; __u32 count; |
91f07168c [PATCH] xdr annot... |
98 99 |
__be32 * verf; __be32 * buffer; |
1da177e4c Linux-2.6.12-rc2 |
100 101 102 103 104 105 106 |
}; struct nfsd3_commitargs { struct svc_fh fh; __u64 offset; __u32 count; }; |
a257cdd0e [PATCH] NFSD: Add... |
107 108 109 110 111 112 113 114 115 116 117 118 |
struct nfsd3_getaclargs { struct svc_fh fh; int mask; }; struct posix_acl; struct nfsd3_setaclargs { struct svc_fh fh; int mask; struct posix_acl *acl_access; struct posix_acl *acl_default; }; |
1da177e4c Linux-2.6.12-rc2 |
119 |
struct nfsd3_attrstat { |
91f07168c [PATCH] xdr annot... |
120 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
121 |
struct svc_fh fh; |
a334de286 [PATCH] knfsd: ch... |
122 |
struct kstat stat; |
1da177e4c Linux-2.6.12-rc2 |
123 124 125 126 |
}; /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */ struct nfsd3_diropres { |
91f07168c [PATCH] xdr annot... |
127 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
128 129 130 131 132 |
struct svc_fh dirfh; struct svc_fh fh; }; struct nfsd3_accessres { |
91f07168c [PATCH] xdr annot... |
133 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
134 135 |
struct svc_fh fh; __u32 access; |
4f4a4fadd nfsd: handle vfs_... |
136 |
struct kstat stat; |
1da177e4c Linux-2.6.12-rc2 |
137 138 139 |
}; struct nfsd3_readlinkres { |
91f07168c [PATCH] xdr annot... |
140 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
141 142 143 144 145 |
struct svc_fh fh; __u32 len; }; struct nfsd3_readres { |
91f07168c [PATCH] xdr annot... |
146 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
147 148 149 150 151 152 |
struct svc_fh fh; unsigned long count; int eof; }; struct nfsd3_writeres { |
91f07168c [PATCH] xdr annot... |
153 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
154 155 156 157 158 159 |
struct svc_fh fh; unsigned long count; int committed; }; struct nfsd3_renameres { |
91f07168c [PATCH] xdr annot... |
160 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
161 162 163 164 165 |
struct svc_fh ffh; struct svc_fh tfh; }; struct nfsd3_linkres { |
91f07168c [PATCH] xdr annot... |
166 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
167 168 169 170 171 |
struct svc_fh tfh; struct svc_fh fh; }; struct nfsd3_readdirres { |
91f07168c [PATCH] xdr annot... |
172 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
173 |
struct svc_fh fh; |
068c34c0c nfsd: fix encode_... |
174 175 176 |
/* Just to save kmalloc on every readdirplus entry (svc_fh is a * little large for the stack): */ struct svc_fh scratch; |
1da177e4c Linux-2.6.12-rc2 |
177 |
int count; |
91f07168c [PATCH] xdr annot... |
178 |
__be32 verf[2]; |
1da177e4c Linux-2.6.12-rc2 |
179 180 |
struct readdir_cd common; |
91f07168c [PATCH] xdr annot... |
181 |
__be32 * buffer; |
1da177e4c Linux-2.6.12-rc2 |
182 |
int buflen; |
91f07168c [PATCH] xdr annot... |
183 184 |
__be32 * offset; __be32 * offset1; |
1da177e4c Linux-2.6.12-rc2 |
185 186 187 188 189 |
struct svc_rqst * rqstp; }; struct nfsd3_fsstatres { |
91f07168c [PATCH] xdr annot... |
190 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
191 192 193 194 195 |
struct kstatfs stats; __u32 invarsec; }; struct nfsd3_fsinfores { |
91f07168c [PATCH] xdr annot... |
196 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
197 198 199 200 201 202 203 204 205 206 207 208 |
__u32 f_rtmax; __u32 f_rtpref; __u32 f_rtmult; __u32 f_wtmax; __u32 f_wtpref; __u32 f_wtmult; __u32 f_dtpref; __u64 f_maxfilesize; __u32 f_properties; }; struct nfsd3_pathconfres { |
91f07168c [PATCH] xdr annot... |
209 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
210 211 212 213 214 215 216 217 218 |
__u32 p_link_max; __u32 p_name_max; __u32 p_no_trunc; __u32 p_chown_restricted; __u32 p_case_insensitive; __u32 p_case_preserving; }; struct nfsd3_commitres { |
91f07168c [PATCH] xdr annot... |
219 |
__be32 status; |
1da177e4c Linux-2.6.12-rc2 |
220 221 |
struct svc_fh fh; }; |
a257cdd0e [PATCH] NFSD: Add... |
222 |
struct nfsd3_getaclres { |
91f07168c [PATCH] xdr annot... |
223 |
__be32 status; |
a257cdd0e [PATCH] NFSD: Add... |
224 225 226 227 |
struct svc_fh fh; int mask; struct posix_acl *acl_access; struct posix_acl *acl_default; |
4f4a4fadd nfsd: handle vfs_... |
228 |
struct kstat stat; |
a257cdd0e [PATCH] NFSD: Add... |
229 |
}; |
1da177e4c Linux-2.6.12-rc2 |
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
/* dummy type for release */ struct nfsd3_fhandle_pair { __u32 dummy; struct svc_fh fh1; struct svc_fh fh2; }; /* * Storage requirements for XDR arguments and results. */ union nfsd3_xdrstore { struct nfsd3_sattrargs sattrargs; struct nfsd3_diropargs diropargs; struct nfsd3_readargs readargs; struct nfsd3_writeargs writeargs; struct nfsd3_createargs createargs; struct nfsd3_renameargs renameargs; struct nfsd3_linkargs linkargs; struct nfsd3_symlinkargs symlinkargs; struct nfsd3_readdirargs readdirargs; struct nfsd3_diropres diropres; struct nfsd3_accessres accessres; struct nfsd3_readlinkres readlinkres; struct nfsd3_readres readres; struct nfsd3_writeres writeres; struct nfsd3_renameres renameres; struct nfsd3_linkres linkres; struct nfsd3_readdirres readdirres; struct nfsd3_fsstatres fsstatres; struct nfsd3_fsinfores fsinfores; struct nfsd3_pathconfres pathconfres; struct nfsd3_commitres commitres; |
a257cdd0e [PATCH] NFSD: Add... |
262 |
struct nfsd3_getaclres getaclres; |
1da177e4c Linux-2.6.12-rc2 |
263 264 265 |
}; #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore) |
91f07168c [PATCH] xdr annot... |
266 267 |
int nfs3svc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *); int nfs3svc_decode_sattrargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
268 |
struct nfsd3_sattrargs *); |
91f07168c [PATCH] xdr annot... |
269 |
int nfs3svc_decode_diropargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
270 |
struct nfsd3_diropargs *); |
91f07168c [PATCH] xdr annot... |
271 |
int nfs3svc_decode_accessargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
272 |
struct nfsd3_accessargs *); |
91f07168c [PATCH] xdr annot... |
273 |
int nfs3svc_decode_readargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
274 |
struct nfsd3_readargs *); |
91f07168c [PATCH] xdr annot... |
275 |
int nfs3svc_decode_writeargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
276 |
struct nfsd3_writeargs *); |
91f07168c [PATCH] xdr annot... |
277 |
int nfs3svc_decode_createargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
278 |
struct nfsd3_createargs *); |
91f07168c [PATCH] xdr annot... |
279 |
int nfs3svc_decode_mkdirargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
280 |
struct nfsd3_createargs *); |
91f07168c [PATCH] xdr annot... |
281 |
int nfs3svc_decode_mknodargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
282 |
struct nfsd3_mknodargs *); |
91f07168c [PATCH] xdr annot... |
283 |
int nfs3svc_decode_renameargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
284 |
struct nfsd3_renameargs *); |
91f07168c [PATCH] xdr annot... |
285 |
int nfs3svc_decode_readlinkargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
286 |
struct nfsd3_readlinkargs *); |
91f07168c [PATCH] xdr annot... |
287 |
int nfs3svc_decode_linkargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
288 |
struct nfsd3_linkargs *); |
91f07168c [PATCH] xdr annot... |
289 |
int nfs3svc_decode_symlinkargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
290 |
struct nfsd3_symlinkargs *); |
91f07168c [PATCH] xdr annot... |
291 |
int nfs3svc_decode_readdirargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
292 |
struct nfsd3_readdirargs *); |
91f07168c [PATCH] xdr annot... |
293 |
int nfs3svc_decode_readdirplusargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
294 |
struct nfsd3_readdirargs *); |
91f07168c [PATCH] xdr annot... |
295 |
int nfs3svc_decode_commitargs(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
296 |
struct nfsd3_commitargs *); |
91f07168c [PATCH] xdr annot... |
297 298 |
int nfs3svc_encode_voidres(struct svc_rqst *, __be32 *, void *); int nfs3svc_encode_attrstat(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
299 |
struct nfsd3_attrstat *); |
91f07168c [PATCH] xdr annot... |
300 |
int nfs3svc_encode_wccstat(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
301 |
struct nfsd3_attrstat *); |
91f07168c [PATCH] xdr annot... |
302 |
int nfs3svc_encode_diropres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
303 |
struct nfsd3_diropres *); |
91f07168c [PATCH] xdr annot... |
304 |
int nfs3svc_encode_accessres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
305 |
struct nfsd3_accessres *); |
91f07168c [PATCH] xdr annot... |
306 |
int nfs3svc_encode_readlinkres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
307 |
struct nfsd3_readlinkres *); |
91f07168c [PATCH] xdr annot... |
308 309 310 |
int nfs3svc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd3_readres *); int nfs3svc_encode_writeres(struct svc_rqst *, __be32 *, struct nfsd3_writeres *); int nfs3svc_encode_createres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
311 |
struct nfsd3_diropres *); |
91f07168c [PATCH] xdr annot... |
312 |
int nfs3svc_encode_renameres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
313 |
struct nfsd3_renameres *); |
91f07168c [PATCH] xdr annot... |
314 |
int nfs3svc_encode_linkres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
315 |
struct nfsd3_linkres *); |
91f07168c [PATCH] xdr annot... |
316 |
int nfs3svc_encode_readdirres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
317 |
struct nfsd3_readdirres *); |
91f07168c [PATCH] xdr annot... |
318 |
int nfs3svc_encode_fsstatres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
319 |
struct nfsd3_fsstatres *); |
91f07168c [PATCH] xdr annot... |
320 |
int nfs3svc_encode_fsinfores(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
321 |
struct nfsd3_fsinfores *); |
91f07168c [PATCH] xdr annot... |
322 |
int nfs3svc_encode_pathconfres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
323 |
struct nfsd3_pathconfres *); |
91f07168c [PATCH] xdr annot... |
324 |
int nfs3svc_encode_commitres(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
325 |
struct nfsd3_commitres *); |
91f07168c [PATCH] xdr annot... |
326 |
int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
327 |
struct nfsd3_attrstat *); |
91f07168c [PATCH] xdr annot... |
328 |
int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *, |
1da177e4c Linux-2.6.12-rc2 |
329 |
struct nfsd3_fhandle_pair *); |
a0ad13ef6 [PATCH] knfsd: Fi... |
330 331 |
int nfs3svc_encode_entry(void *, const char *name, int namlen, loff_t offset, u64 ino, |
1da177e4c Linux-2.6.12-rc2 |
332 |
unsigned int); |
a0ad13ef6 [PATCH] knfsd: Fi... |
333 334 |
int nfs3svc_encode_entry_plus(void *, const char *name, int namlen, loff_t offset, u64 ino, |
1da177e4c Linux-2.6.12-rc2 |
335 |
unsigned int); |
a257cdd0e [PATCH] NFSD: Add... |
336 |
/* Helper functions for NFSv3 ACL code */ |
91f07168c [PATCH] xdr annot... |
337 |
__be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, |
a257cdd0e [PATCH] NFSD: Add... |
338 |
struct svc_fh *fhp); |
91f07168c [PATCH] xdr annot... |
339 |
__be32 *nfs3svc_decode_fh(__be32 *p, struct svc_fh *fhp); |
1da177e4c Linux-2.6.12-rc2 |
340 341 342 |
#endif /* _LINUX_NFSD_XDR3_H */ |