1 /* $Id: nfs3_prot.x,v 1.17 2002/10/11 19:13:00 kaminsky Exp $ */
3 typedef unsigned hyper uint64;
5 typedef unsigned int uint32;
8 const NFS3_FHSIZE = 64;
9 const NFS3_COOKIEVERFSIZE = 8;
10 const NFS3_CREATEVERFSIZE = 8;
11 const NFS3_WRITEVERFSIZE = 8;
13 typedef string filename3<>;
14 typedef string nfspath3<>;
15 typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE];
16 typedef opaque createverf3[NFS3_CREATEVERFSIZE];
17 typedef opaque writeverf3[NFS3_WRITEVERFSIZE];
36 NFS3ERR_NAMETOOLONG = 63,
37 NFS3ERR_NOTEMPTY = 66,
41 NFS3ERR_BADHANDLE = 10001,
42 NFS3ERR_NOT_SYNC = 10002,
43 NFS3ERR_BAD_COOKIE = 10003,
44 NFS3ERR_NOTSUPP = 10004,
45 NFS3ERR_TOOSMALL = 10005,
46 NFS3ERR_SERVERFAULT = 10006,
47 NFS3ERR_BADTYPE = 10007,
48 NFS3ERR_JUKEBOX = 10008,
49 NFS3ERR_FPRINTNOTFOUND = 10009,
50 NFS3ERR_ABORTED = 10010
69 opaque data<NFS3_FHSIZE>;
93 union post_op_attr switch (bool present) {
106 union pre_op_attr switch (bool present) {
118 union post_op_fh3 switch (bool present) {
125 union set_uint32 switch (bool set) {
132 union set_uint64 switch (bool set) {
141 SET_TO_SERVER_TIME = 1,
142 SET_TO_CLIENT_TIME = 2
145 union set_time switch (time_how set) {
146 case SET_TO_CLIENT_TIME:
168 post_op_attr obj_attributes;
172 union diropres3 switch (nfsstat3 status) {
176 wcc_data resfail; /* Directory attributes */
179 union wccstat3 switch (nfsstat3 status) {
180 #ifndef UNION_ONLY_DEFAULT
183 #endif /* !UNION_ONLY_DEFAULT */
188 union getattr3res switch (nfsstat3 status) {
195 union sattrguard3 switch (bool check) {
202 struct setattr3args {
204 sattr3 new_attributes;
208 struct lookup3resok {
210 post_op_attr obj_attributes;
211 post_op_attr dir_attributes;
214 union lookup3res switch (nfsstat3 status) {
218 post_op_attr resfail; /* Directory attributes */
221 const ACCESS3_READ = 0x0001;
222 const ACCESS3_LOOKUP = 0x0002;
223 const ACCESS3_MODIFY = 0x0004;
224 const ACCESS3_EXTEND = 0x0008;
225 const ACCESS3_DELETE = 0x0010;
226 const ACCESS3_EXECUTE = 0x0020;
233 struct access3resok {
234 post_op_attr obj_attributes;
238 union access3res switch (nfsstat3 status) {
242 post_op_attr resfail;
245 struct readlink3resok {
246 post_op_attr symlink_attributes;
250 union readlink3res switch (nfsstat3 status) {
252 readlink3resok resok;
254 post_op_attr resfail;
264 post_op_attr file_attributes;
270 union read3res switch (nfsstat3 status) {
274 post_op_attr resfail;
294 stable_how committed;
298 union write3res switch (nfsstat3 status) {
311 union createhow3 switch (createmode3 mode) {
314 sattr3 obj_attributes;
329 struct symlinkdata3 {
330 sattr3 symlink_attributes;
331 nfspath3 symlink_data;
334 struct symlink3args {
336 symlinkdata3 symlink;
340 sattr3 dev_attributes;
344 union mknoddata3 switch (ftype3 type) {
350 sattr3 pipe_attributes;
366 wcc_data fromdir_wcc;
370 union rename3res switch (nfsstat3 status) {
371 #ifndef UNION_ONLY_DEFAULT
374 #endif /* !UNION_ONLY_DEFAULT */
385 post_op_attr file_attributes;
386 wcc_data linkdir_wcc;
389 union link3res switch (nfsstat3 status) {
390 #ifndef UNION_ONLY_DEFAULT
393 #endif /* !UNION_ONLY_DEFAULT */
398 struct readdir3args {
401 cookieverf3 cookieverf;
417 struct readdir3resok {
418 post_op_attr dir_attributes;
419 cookieverf3 cookieverf;
423 union readdir3res switch (nfsstat3 status) {
427 post_op_attr resfail;
430 struct readdirplus3args {
433 cookieverf3 cookieverf;
442 post_op_attr name_attributes;
443 post_op_fh3 name_handle;
444 entryplus3 *nextentry;
447 struct dirlistplus3 {
452 struct readdirplus3resok {
453 post_op_attr dir_attributes;
454 cookieverf3 cookieverf;
458 union readdirplus3res switch (nfsstat3 status) {
460 readdirplus3resok resok;
462 post_op_attr resfail;
465 struct fsstat3resok {
466 post_op_attr obj_attributes;
476 union fsstat3res switch (nfsstat3 status) {
480 post_op_attr resfail;
483 const FSF3_LINK = 0x0001;
484 const FSF3_SYMLINK = 0x0002;
485 const FSF3_HOMOGENEOUS = 0x0008;
486 const FSF3_CANSETTIME = 0x0010;
488 struct fsinfo3resok {
489 post_op_attr obj_attributes;
502 union fsinfo3res switch (nfsstat3 status) {
506 post_op_attr resfail;
509 struct pathconf3resok {
510 post_op_attr obj_attributes;
514 bool chown_restricted;
515 bool case_insensitive;
516 bool case_preserving;
519 union pathconf3res switch (nfsstat3 status) {
521 pathconf3resok resok;
523 post_op_attr resfail;
532 struct commit3resok {
537 union commit3res switch (nfsstat3 status) {
544 program NFS_PROGRAM {
547 NFSPROC3_NULL (void) = 0;
550 NFSPROC3_GETATTR (nfs_fh3) = 1;
553 NFSPROC3_SETATTR (setattr3args) = 2;
556 NFSPROC3_LOOKUP (diropargs3) = 3;
559 NFSPROC3_ACCESS (access3args) = 4;
562 NFSPROC3_READLINK (nfs_fh3) = 5;
565 NFSPROC3_READ (read3args) = 6;
568 NFSPROC3_WRITE (write3args) = 7;
571 NFSPROC3_CREATE (create3args) = 8;
574 NFSPROC3_MKDIR (mkdir3args) = 9;
577 NFSPROC3_SYMLINK (symlink3args) = 10;
580 NFSPROC3_MKNOD (mknod3args) = 11;
583 NFSPROC3_REMOVE (diropargs3) = 12;
586 NFSPROC3_RMDIR (diropargs3) = 13;
589 NFSPROC3_RENAME (rename3args) = 14;
592 NFSPROC3_LINK (link3args) = 15;
595 NFSPROC3_READDIR (readdir3args) = 16;
598 NFSPROC3_READDIRPLUS (readdirplus3args) = 17;
601 NFSPROC3_FSSTAT (nfs_fh3) = 18;
604 NFSPROC3_FSINFO (nfs_fh3) = 19;
607 NFSPROC3_PATHCONF (nfs_fh3) = 20;
610 NFSPROC3_COMMIT (commit3args) = 21;