Warning, /network/kio-extras/nfs/rpc_nfs3_prot.x is written in an unsupported language. File is not indexed.
0001 /* 0002 * To compile this file into the proper files: 0003 * rpcgen -C -N nfs.x 0004 * rpcgen -C -N -m nfs.x > programs.c 0005 * rpcgen -C -N -s tcp nfs.x > run_example.c 0006 * rpcgen -C -N -Ss nfs.x > server_template.c 0007 * rm nfs_clnt.c nfs_svc.c 0008 * mv nfs_xdr.c xdr.c 0009 */ 0010 0011 const PROGRAM = 100003; 0012 const VERSION = 3; 0013 const NFS3_FHSIZE = 64; 0014 const NFS3_COOKIEVERFSIZE = 8; 0015 const NFS3_CREATEVERFSIZE = 8; 0016 const NFS3_WRITEVERFSIZE = 8; 0017 0018 %#if defined(HAVE_XDR_U_INT64_T) 0019 %#define xdr_uint64_t xdr_u_int64_t 0020 %#elif !defined(HAVE_XDR_UINT64_T) 0021 %#if defined(HAVE_XDR_U_HYPER) 0022 %#define xdr_uint64_t xdr_u_hyper 0023 %#define xdr_int64_t xdr_hyper 0024 %#elif defined(HAVE_XDR_U_LONGLONG_T) 0025 %#define xdr_uint64_t xdr_u_longlong_t 0026 %#define xdr_int64_t xdr_longlong_t 0027 %#endif 0028 %#endif 0029 0030 typedef uint64_t uint64; 0031 typedef int64_t int64; 0032 typedef unsigned long uint32; 0033 typedef long int32; 0034 typedef string filename3<>; 0035 typedef string nfspath3<>; 0036 typedef uint64 fileid3; 0037 typedef uint64 cookie3; 0038 typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; 0039 typedef opaque createverf3[NFS3_CREATEVERFSIZE]; 0040 typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; 0041 typedef uint32 uid3; 0042 typedef uint32 gid3; 0043 typedef uint64 size3; 0044 typedef uint64 offset3; 0045 typedef uint32 mode3; 0046 typedef uint32 count3; 0047 0048 enum nfsstat3 { 0049 NFS3_OK = 0, 0050 NFS3ERR_PERM = 1, 0051 NFS3ERR_NOENT = 2, 0052 NFS3ERR_IO = 5, 0053 NFS3ERR_NXIO = 6, 0054 NFS3ERR_ACCES = 13, 0055 NFS3ERR_EXIST = 17, 0056 NFS3ERR_XDEV = 18, 0057 NFS3ERR_NODEV = 19, 0058 NFS3ERR_NOTDIR = 20, 0059 NFS3ERR_ISDIR = 21, 0060 NFS3ERR_INVAL = 22, 0061 NFS3ERR_FBIG = 27, 0062 NFS3ERR_NOSPC = 28, 0063 NFS3ERR_ROFS = 30, 0064 NFS3ERR_MLINK = 31, 0065 NFS3ERR_NAMETOOLONG = 63, 0066 NFS3ERR_NOTEMPTY = 66, 0067 NFS3ERR_DQUOT = 69, 0068 NFS3ERR_STALE = 70, 0069 NFS3ERR_REMOTE = 71, 0070 NFS3ERR_BADHANDLE = 10001, 0071 0072 NFS3ERR_NOT_SYNC = 10002, 0073 NFS3ERR_BAD_COOKIE = 10003, 0074 NFS3ERR_NOTSUPP = 10004, 0075 NFS3ERR_TOOSMALL = 10005, 0076 NFS3ERR_SERVERFAULT = 10006, 0077 NFS3ERR_BADTYPE = 10007, 0078 NFS3ERR_JUKEBOX = 10008 0079 }; 0080 0081 enum ftype3 { 0082 NF3REG = 1, 0083 NF3DIR = 2, 0084 NF3BLK = 3, 0085 NF3CHR = 4, 0086 NF3LNK = 5, 0087 NF3SOCK = 6, 0088 NF3FIFO = 7 0089 }; 0090 0091 struct specdata3 { 0092 uint32 specdata1; 0093 uint32 specdata2; 0094 }; 0095 0096 struct nfs_fh3 { 0097 opaque data<NFS3_FHSIZE>; 0098 }; 0099 0100 struct nfstime3 { 0101 uint32 seconds; 0102 uint32 nseconds; 0103 }; 0104 0105 struct fattr3 { 0106 ftype3 type; 0107 mode3 mode; 0108 uint32 nlink; 0109 uid3 uid; 0110 gid3 gid; 0111 size3 size; 0112 size3 used; 0113 specdata3 rdev; 0114 uint64 fsid; 0115 fileid3 fileid; 0116 nfstime3 atime; 0117 nfstime3 mtime; 0118 nfstime3 ctime; 0119 }; 0120 0121 union post_op_attr switch (bool attributes_follow) { 0122 case TRUE: 0123 fattr3 attributes; 0124 case FALSE: 0125 void; 0126 }; 0127 0128 struct wcc_attr { 0129 size3 size; 0130 nfstime3 mtime; 0131 nfstime3 ctime; 0132 }; 0133 0134 union pre_op_attr switch (bool attributes_follow) { 0135 case TRUE: 0136 wcc_attr attributes; 0137 case FALSE: 0138 void; 0139 }; 0140 0141 struct wcc_data { 0142 pre_op_attr before; 0143 post_op_attr after; 0144 }; 0145 0146 union post_op_fh3 switch (bool handle_follows) { 0147 case TRUE: 0148 nfs_fh3 handle; 0149 case FALSE: 0150 void; 0151 }; 0152 0153 enum time_how { 0154 DONT_CHANGE = 0, 0155 SET_TO_SERVER_TIME = 1, 0156 SET_TO_CLIENT_TIME = 2 0157 }; 0158 0159 union set_mode3 switch (bool set_it) { 0160 case TRUE: 0161 mode3 mode; 0162 default: 0163 void; 0164 }; 0165 0166 union set_uid3 switch (bool set_it) { 0167 case TRUE: 0168 uid3 uid; 0169 default: 0170 void; 0171 }; 0172 0173 union set_gid3 switch (bool set_it) { 0174 case TRUE: 0175 gid3 gid; 0176 default: 0177 void; 0178 }; 0179 0180 union set_size3 switch (bool set_it) { 0181 case TRUE: 0182 size3 size; 0183 default: 0184 void; 0185 }; 0186 0187 union set_atime switch (time_how set_it) { 0188 case SET_TO_CLIENT_TIME: 0189 nfstime3 atime; 0190 default: 0191 void; 0192 }; 0193 0194 union set_mtime switch (time_how set_it) { 0195 case SET_TO_CLIENT_TIME: 0196 nfstime3 mtime; 0197 default: 0198 void; 0199 }; 0200 0201 struct sattr3 { 0202 set_mode3 mode; 0203 set_uid3 uid; 0204 set_gid3 gid; 0205 set_size3 size; 0206 set_atime atime; 0207 set_mtime mtime; 0208 0209 }; 0210 0211 struct diropargs3 { 0212 nfs_fh3 dir; 0213 filename3 name; 0214 }; 0215 0216 0217 program NFS_PROGRAM { 0218 version NFS_V3 { 0219 0220 void 0221 NFSPROC3_NULL(void) = 0; 0222 0223 GETATTR3res 0224 NFSPROC3_GETATTR(GETATTR3args) = 1; 0225 0226 SETATTR3res 0227 NFSPROC3_SETATTR(SETATTR3args) = 2; 0228 0229 LOOKUP3res 0230 NFSPROC3_LOOKUP(LOOKUP3args) = 3; 0231 0232 ACCESS3res 0233 NFSPROC3_ACCESS(ACCESS3args) = 4; 0234 0235 READLINK3res 0236 NFSPROC3_READLINK(READLINK3args) = 5; 0237 0238 READ3res 0239 NFSPROC3_READ(READ3args) = 6; 0240 0241 WRITE3res 0242 NFSPROC3_WRITE(WRITE3args) = 7; 0243 0244 CREATE3res 0245 NFSPROC3_CREATE(CREATE3args) = 8; 0246 0247 MKDIR3res 0248 NFSPROC3_MKDIR(MKDIR3args) = 9; 0249 0250 SYMLINK3res 0251 NFSPROC3_SYMLINK(SYMLINK3args) = 10; 0252 0253 MKNOD3res 0254 NFSPROC3_MKNOD(MKNOD3args) = 11; 0255 0256 REMOVE3res 0257 NFSPROC3_REMOVE(REMOVE3args) = 12; 0258 0259 RMDIR3res 0260 NFSPROC3_RMDIR(RMDIR3args) = 13; 0261 0262 RENAME3res 0263 NFSPROC3_RENAME(RENAME3args) = 14; 0264 0265 LINK3res 0266 NFSPROC3_LINK(LINK3args) = 15; 0267 0268 READDIR3res 0269 NFSPROC3_READDIR(READDIR3args) = 16; 0270 0271 READDIRPLUS3res 0272 NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17; 0273 0274 FSSTAT3res 0275 NFSPROC3_FSSTAT(FSSTAT3args) = 18; 0276 0277 FSINFO3res 0278 NFSPROC3_FSINFO(FSINFO3args) = 19; 0279 0280 PATHCONF3res 0281 NFSPROC3_PATHCONF(PATHCONF3args) = 20; 0282 0283 COMMIT3res 0284 NFSPROC3_COMMIT(COMMIT3args) = 21; 0285 0286 } = 3; 0287 } = 100003; 0288 0289 struct GETATTR3args { 0290 nfs_fh3 object; 0291 }; 0292 0293 struct GETATTR3resok { 0294 fattr3 obj_attributes; 0295 }; 0296 0297 union GETATTR3res switch (nfsstat3 status) { 0298 case NFS3_OK: 0299 GETATTR3resok resok; 0300 default: 0301 void; 0302 }; 0303 0304 union sattrguard3 switch (bool check) { 0305 case TRUE: 0306 nfstime3 obj_ctime; 0307 case FALSE: 0308 void; 0309 }; 0310 0311 struct SETATTR3args { 0312 nfs_fh3 object; 0313 sattr3 new_attributes; 0314 sattrguard3 guard; 0315 }; 0316 0317 struct SETATTR3resok { 0318 wcc_data obj_wcc; 0319 }; 0320 0321 struct SETATTR3resfail { 0322 wcc_data obj_wcc; 0323 }; 0324 0325 union SETATTR3res switch (nfsstat3 status) { 0326 case NFS3_OK: 0327 SETATTR3resok resok; 0328 default: 0329 SETATTR3resfail resfail; 0330 }; 0331 0332 struct LOOKUP3args { 0333 diropargs3 what; 0334 }; 0335 0336 struct LOOKUP3resok { 0337 nfs_fh3 object; 0338 post_op_attr obj_attributes; 0339 post_op_attr dir_attributes; 0340 }; 0341 0342 struct LOOKUP3resfail { 0343 post_op_attr dir_attributes; 0344 }; 0345 0346 union LOOKUP3res switch (nfsstat3 status) { 0347 case NFS3_OK: 0348 LOOKUP3resok resok; 0349 default: 0350 LOOKUP3resfail resfail; 0351 }; 0352 0353 0354 const ACCESS3_READ = 0x0001; 0355 const ACCESS3_LOOKUP = 0x0002; 0356 const ACCESS3_MODIFY = 0x0004; 0357 const ACCESS3_EXTEND = 0x0008; 0358 const ACCESS3_DELETE = 0x0010; 0359 const ACCESS3_EXECUTE = 0x0020; 0360 0361 struct ACCESS3args { 0362 nfs_fh3 object; 0363 uint32 access; 0364 }; 0365 0366 struct ACCESS3resok { 0367 post_op_attr obj_attributes; 0368 uint32 access; 0369 }; 0370 0371 struct ACCESS3resfail { 0372 post_op_attr obj_attributes; 0373 }; 0374 0375 union ACCESS3res switch (nfsstat3 status) { 0376 case NFS3_OK: 0377 ACCESS3resok resok; 0378 default: 0379 ACCESS3resfail resfail; 0380 }; 0381 0382 struct READLINK3args { 0383 nfs_fh3 symlink; 0384 }; 0385 0386 struct READLINK3resok { 0387 post_op_attr symlink_attributes; 0388 nfspath3 data; 0389 }; 0390 0391 struct READLINK3resfail { 0392 post_op_attr symlink_attributes; 0393 }; 0394 0395 union READLINK3res switch (nfsstat3 status) { 0396 case NFS3_OK: 0397 READLINK3resok resok; 0398 default: 0399 READLINK3resfail resfail; 0400 }; 0401 0402 struct READ3args { 0403 nfs_fh3 file; 0404 offset3 offset; 0405 count3 count; 0406 }; 0407 0408 struct READ3resok { 0409 post_op_attr file_attributes; 0410 count3 count; 0411 bool eof; 0412 opaque data<>; 0413 }; 0414 0415 struct READ3resfail { 0416 post_op_attr file_attributes; 0417 }; 0418 0419 union READ3res switch (nfsstat3 status) { 0420 case NFS3_OK: 0421 READ3resok resok; 0422 default: 0423 READ3resfail resfail; 0424 }; 0425 0426 enum stable_how { 0427 UNSTABLE = 0, 0428 DATA_SYNC = 1, 0429 FILE_SYNC = 2 0430 }; 0431 0432 struct WRITE3args { 0433 nfs_fh3 file; 0434 offset3 offset; 0435 count3 count; 0436 stable_how stable; 0437 opaque data<>; 0438 }; 0439 0440 struct WRITE3resok { 0441 wcc_data file_wcc; 0442 count3 count; 0443 stable_how committed; 0444 writeverf3 verf; 0445 }; 0446 0447 struct WRITE3resfail { 0448 wcc_data file_wcc; 0449 }; 0450 0451 union WRITE3res switch (nfsstat3 status) { 0452 case NFS3_OK: 0453 WRITE3resok resok; 0454 default: 0455 WRITE3resfail resfail; 0456 }; 0457 0458 0459 enum createmode3 { 0460 UNCHECKED = 0, 0461 GUARDED = 1, 0462 EXCLUSIVE = 2 0463 }; 0464 0465 union createhow3 switch (createmode3 mode) { 0466 case UNCHECKED: 0467 case GUARDED: 0468 sattr3 obj_attributes; 0469 case EXCLUSIVE: 0470 createverf3 verf; 0471 }; 0472 0473 struct CREATE3args { 0474 diropargs3 where; 0475 createhow3 how; 0476 }; 0477 0478 struct CREATE3resok { 0479 post_op_fh3 obj; 0480 post_op_attr obj_attributes; 0481 wcc_data dir_wcc; 0482 }; 0483 0484 struct CREATE3resfail { 0485 wcc_data dir_wcc; 0486 }; 0487 0488 union CREATE3res switch (nfsstat3 status) { 0489 case NFS3_OK: 0490 CREATE3resok resok; 0491 default: 0492 CREATE3resfail resfail; 0493 }; 0494 0495 0496 struct MKDIR3args { 0497 diropargs3 where; 0498 sattr3 attributes; 0499 }; 0500 0501 struct MKDIR3resok { 0502 post_op_fh3 obj; 0503 post_op_attr obj_attributes; 0504 wcc_data dir_wcc; 0505 }; 0506 0507 struct MKDIR3resfail { 0508 wcc_data dir_wcc; 0509 }; 0510 0511 union MKDIR3res switch (nfsstat3 status) { 0512 case NFS3_OK: 0513 MKDIR3resok resok; 0514 default: 0515 MKDIR3resfail resfail; 0516 }; 0517 0518 0519 struct symlinkdata3 { 0520 sattr3 symlink_attributes; 0521 nfspath3 symlink_data; 0522 }; 0523 0524 struct SYMLINK3args { 0525 diropargs3 where; 0526 symlinkdata3 symlink; 0527 }; 0528 0529 struct SYMLINK3resok { 0530 post_op_fh3 obj; 0531 post_op_attr obj_attributes; 0532 wcc_data dir_wcc; 0533 }; 0534 0535 struct SYMLINK3resfail { 0536 wcc_data dir_wcc; 0537 }; 0538 0539 union SYMLINK3res switch (nfsstat3 status) { 0540 case NFS3_OK: 0541 SYMLINK3resok resok; 0542 default: 0543 SYMLINK3resfail resfail; 0544 }; 0545 0546 0547 struct devicedata3 { 0548 sattr3 dev_attributes; 0549 specdata3 spec; 0550 }; 0551 0552 union mknoddata3 switch (ftype3 type) { 0553 case NF3CHR: 0554 case NF3BLK: 0555 devicedata3 device; 0556 case NF3SOCK: 0557 case NF3FIFO: 0558 sattr3 pipe_attributes; 0559 default: 0560 void; 0561 }; 0562 0563 struct MKNOD3args { 0564 diropargs3 where; 0565 mknoddata3 what; 0566 }; 0567 0568 struct MKNOD3resok { 0569 post_op_fh3 obj; 0570 post_op_attr obj_attributes; 0571 wcc_data dir_wcc; 0572 }; 0573 0574 struct MKNOD3resfail { 0575 wcc_data dir_wcc; 0576 }; 0577 0578 union MKNOD3res switch (nfsstat3 status) { 0579 case NFS3_OK: 0580 MKNOD3resok resok; 0581 default: 0582 MKNOD3resfail resfail; 0583 }; 0584 0585 struct REMOVE3args { 0586 diropargs3 object; 0587 }; 0588 0589 struct REMOVE3resok { 0590 wcc_data dir_wcc; 0591 }; 0592 0593 struct REMOVE3resfail { 0594 wcc_data dir_wcc; 0595 }; 0596 0597 union REMOVE3res switch (nfsstat3 status) { 0598 case NFS3_OK: 0599 REMOVE3resok resok; 0600 default: 0601 REMOVE3resfail resfail; 0602 }; 0603 0604 0605 struct RMDIR3args { 0606 diropargs3 object; 0607 }; 0608 0609 struct RMDIR3resok { 0610 wcc_data dir_wcc; 0611 }; 0612 0613 struct RMDIR3resfail { 0614 wcc_data dir_wcc; 0615 }; 0616 0617 union RMDIR3res switch (nfsstat3 status) { 0618 case NFS3_OK: 0619 RMDIR3resok resok; 0620 default: 0621 RMDIR3resfail resfail; 0622 }; 0623 0624 struct RENAME3args { 0625 diropargs3 from; 0626 diropargs3 to; 0627 }; 0628 0629 struct RENAME3resok { 0630 wcc_data fromdir_wcc; 0631 wcc_data todir_wcc; 0632 }; 0633 0634 struct RENAME3resfail { 0635 wcc_data fromdir_wcc; 0636 wcc_data todir_wcc; 0637 }; 0638 0639 union RENAME3res switch (nfsstat3 status) { 0640 case NFS3_OK: 0641 RENAME3resok resok; 0642 default: 0643 RENAME3resfail resfail; 0644 }; 0645 0646 struct LINK3args { 0647 nfs_fh3 file; 0648 diropargs3 link; 0649 }; 0650 0651 struct LINK3resok { 0652 post_op_attr file_attributes; 0653 wcc_data linkdir_wcc; 0654 }; 0655 0656 struct LINK3resfail { 0657 post_op_attr file_attributes; 0658 wcc_data linkdir_wcc; 0659 }; 0660 0661 union LINK3res switch (nfsstat3 status) { 0662 case NFS3_OK: 0663 0664 LINK3resok resok; 0665 default: 0666 LINK3resfail resfail; 0667 }; 0668 0669 struct READDIR3args { 0670 nfs_fh3 dir; 0671 cookie3 cookie; 0672 cookieverf3 cookieverf; 0673 count3 count; 0674 }; 0675 0676 struct entry3 { 0677 fileid3 fileid; 0678 filename3 name; 0679 cookie3 cookie; 0680 entry3 *nextentry; 0681 }; 0682 0683 struct dirlist3 { 0684 entry3 *entries; 0685 bool eof; 0686 }; 0687 0688 struct READDIR3resok { 0689 post_op_attr dir_attributes; 0690 cookieverf3 cookieverf; 0691 dirlist3 reply; 0692 }; 0693 0694 struct READDIR3resfail { 0695 post_op_attr dir_attributes; 0696 }; 0697 0698 union READDIR3res switch (nfsstat3 status) { 0699 case NFS3_OK: 0700 READDIR3resok resok; 0701 default: 0702 READDIR3resfail resfail; 0703 }; 0704 0705 struct READDIRPLUS3args { 0706 nfs_fh3 dir; 0707 cookie3 cookie; 0708 cookieverf3 cookieverf; 0709 count3 dircount; 0710 count3 maxcount; 0711 }; 0712 0713 struct entryplus3 { 0714 fileid3 fileid; 0715 filename3 name; 0716 cookie3 cookie; 0717 post_op_attr name_attributes; 0718 post_op_fh3 name_handle; 0719 entryplus3 *nextentry; 0720 }; 0721 0722 struct dirlistplus3 { 0723 entryplus3 *entries; 0724 bool eof; 0725 }; 0726 0727 struct READDIRPLUS3resok { 0728 post_op_attr dir_attributes; 0729 cookieverf3 cookieverf; 0730 dirlistplus3 reply; 0731 }; 0732 0733 struct READDIRPLUS3resfail { 0734 post_op_attr dir_attributes; 0735 }; 0736 0737 union READDIRPLUS3res switch (nfsstat3 status) { 0738 case NFS3_OK: 0739 READDIRPLUS3resok resok; 0740 default: 0741 READDIRPLUS3resfail resfail; 0742 }; 0743 0744 struct FSSTAT3args { 0745 nfs_fh3 fsroot; 0746 }; 0747 0748 struct FSSTAT3resok { 0749 post_op_attr obj_attributes; 0750 size3 tbytes; 0751 size3 fbytes; 0752 size3 abytes; 0753 size3 tfiles; 0754 size3 ffiles; 0755 size3 afiles; 0756 uint32 invarsec; 0757 }; 0758 0759 struct FSSTAT3resfail { 0760 post_op_attr obj_attributes; 0761 }; 0762 0763 union FSSTAT3res switch (nfsstat3 status) { 0764 case NFS3_OK: 0765 FSSTAT3resok resok; 0766 default: 0767 FSSTAT3resfail resfail; 0768 }; 0769 0770 const FSF3_LINK = 0x0001; 0771 const FSF3_SYMLINK = 0x0002; 0772 const FSF3_HOMOGENEOUS = 0x0008; 0773 const FSF3_CANSETTIME = 0x0010; 0774 0775 struct FSINFO3args { 0776 nfs_fh3 fsroot; 0777 }; 0778 0779 struct FSINFO3resok { 0780 post_op_attr obj_attributes; 0781 uint32 rtmax; 0782 uint32 rtpref; 0783 uint32 rtmult; 0784 uint32 wtmax; 0785 uint32 wtpref; 0786 uint32 wtmult; 0787 uint32 dtpref; 0788 0789 size3 maxfilesize; 0790 nfstime3 time_delta; 0791 uint32 properties; 0792 }; 0793 0794 struct FSINFO3resfail { 0795 post_op_attr obj_attributes; 0796 }; 0797 0798 union FSINFO3res switch (nfsstat3 status) { 0799 case NFS3_OK: 0800 FSINFO3resok resok; 0801 default: 0802 FSINFO3resfail resfail; 0803 }; 0804 0805 struct PATHCONF3args { 0806 nfs_fh3 object; 0807 }; 0808 0809 struct PATHCONF3resok { 0810 post_op_attr obj_attributes; 0811 uint32 linkmax; 0812 uint32 name_max; 0813 bool no_trunc; 0814 bool chown_restricted; 0815 bool case_insensitive; 0816 bool case_preserving; 0817 }; 0818 0819 struct PATHCONF3resfail { 0820 post_op_attr obj_attributes; 0821 }; 0822 0823 union PATHCONF3res switch (nfsstat3 status) { 0824 case NFS3_OK: 0825 PATHCONF3resok resok; 0826 default: 0827 PATHCONF3resfail resfail; 0828 }; 0829 0830 struct COMMIT3args { 0831 nfs_fh3 file; 0832 offset3 offset; 0833 count3 count; 0834 }; 0835 0836 struct COMMIT3resok { 0837 wcc_data file_wcc; 0838 writeverf3 verf; 0839 }; 0840 0841 struct COMMIT3resfail { 0842 wcc_data file_wcc; 0843 }; 0844 0845 union COMMIT3res switch (nfsstat3 status) { 0846 case NFS3_OK: 0847 COMMIT3resok resok; 0848 default: 0849 COMMIT3resfail resfail; 0850 }; 0851 0852 0853 const MNTPATHLEN3 = 1024; /* Maximum bytes in a path name */ 0854 const MNTNAMLEN3 = 255; /* Maximum bytes in a name */ 0855 const FHSIZE3 = 64; /* Maximum bytes in a V3 file handle */ 0856 0857 typedef opaque fhandle3<FHSIZE3>; 0858 typedef string dirpath3<MNTPATHLEN3>; 0859 typedef string name3<MNTNAMLEN3>; 0860 0861 enum mountstat3 { 0862 MNT3_OK = 0, /* no error */ 0863 MNT3ERR_PERM = 1, /* Not owner */ 0864 MNT3ERR_NOENT = 2, /* No such file or directory */ 0865 MNT3ERR_IO = 5, /* I/O error */ 0866 MNT3ERR_ACCES = 13, /* Permission denied */ 0867 MNT3ERR_NOTDIR = 20, /* Not a directory */ 0868 MNT3ERR_INVAL = 22, /* Invalid argument */ 0869 MNT3ERR_NAMETOOLONG = 63, /* Filename too long */ 0870 MNT3ERR_NOTSUPP = 10004, /* Operation not supported */ 0871 MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */ 0872 }; 0873 0874 0875 program MOUNT_PROGRAM { 0876 version MOUNT_V3 { 0877 void MOUNTPROC3_NULL(void) = 0; 0878 mountres3 MOUNTPROC3_MNT(dirpath3) = 1; 0879 mountlist3 MOUNTPROC3_DUMP(void) = 2; 0880 void MOUNTPROC3_UMNT(dirpath3) = 3; 0881 void MOUNTPROC3_UMNTALL(void) = 4; 0882 exports3 MOUNTPROC3_EXPORT(void) = 5; 0883 } = 3; 0884 } = 100005; 0885 0886 struct mountres3_ok { 0887 fhandle3 fhandle; 0888 int auth_flavors<>; 0889 }; 0890 0891 union mountres3 switch (mountstat3 fhs_status) { 0892 case MNT3_OK: 0893 mountres3_ok mountinfo; 0894 default: 0895 void; 0896 }; 0897 0898 typedef struct mountbody3 *mountlist3; 0899 0900 struct mountbody3 { 0901 name3 ml_hostname; 0902 dirpath3 ml_directory; 0903 mountlist3 ml_next; 0904 }; 0905 0906 0907 typedef struct groupnode3 *groups3; 0908 0909 struct groupnode3 { 0910 name3 gr_name; 0911 groups3 gr_next; 0912 }; 0913 0914 typedef struct exportnode3 *exports3; 0915 0916 struct exportnode3 { 0917 dirpath3 ex_dir; 0918 groups3 ex_groups; 0919 exports3 ex_next; 0920 };