1 #ifndef _NFS3_PROT_H_RPCGEN
2 #define _NFS3_PROT_H_RPCGEN
14 typedef u_quad_t uint64;
21 #define NFS3_FHSIZE 64
22 #define NFS3_COOKIEVERFSIZE 8
23 #define NFS3_CREATEVERFSIZE 8
24 #define NFS3_WRITEVERFSIZE 8
26 typedef char *filename3;
28 typedef char *nfspath3;
30 typedef char cookieverf3[NFS3_COOKIEVERFSIZE];
32 typedef char createverf3[NFS3_CREATEVERFSIZE];
34 typedef char writeverf3[NFS3_WRITEVERFSIZE];
53 NFS3ERR_NAMETOOLONG = 63,
54 NFS3ERR_NOTEMPTY = 66,
58 NFS3ERR_BADHANDLE = 10001,
59 NFS3ERR_NOT_SYNC = 10002,
60 NFS3ERR_BAD_COOKIE = 10003,
61 NFS3ERR_NOTSUPP = 10004,
62 NFS3ERR_TOOSMALL = 10005,
63 NFS3ERR_SERVERFAULT = 10006,
64 NFS3ERR_BADTYPE = 10007,
65 NFS3ERR_JUKEBOX = 10008,
66 NFS3ERR_FPRINTNOTFOUND = 10009,
67 NFS3ERR_ABORTED = 10010,
69 typedef enum nfsstat3 nfsstat3;
80 typedef enum ftype3 ftype3;
86 typedef struct specdata3 specdata3;
94 typedef struct nfs_fh3 nfs_fh3;
100 typedef struct nfstime3 nfstime3;
117 typedef struct fattr3 fattr3;
119 struct post_op_attr {
125 typedef struct post_op_attr post_op_attr;
132 typedef struct wcc_attr wcc_attr;
140 typedef struct pre_op_attr pre_op_attr;
146 typedef struct wcc_data wcc_data;
154 typedef struct post_op_fh3 post_op_fh3;
162 typedef struct set_uint32 set_uint32;
170 typedef struct set_uint64 set_uint64;
174 SET_TO_SERVER_TIME = 1,
175 SET_TO_CLIENT_TIME = 2,
177 typedef enum time_how time_how;
185 typedef struct set_time set_time;
195 typedef struct sattr3 sattr3;
201 typedef struct diropargs3 diropargs3;
205 post_op_attr obj_attributes;
208 typedef struct diropres3ok diropres3ok;
217 typedef struct diropres3 diropres3;
225 typedef struct wccstat3 wccstat3;
233 typedef struct getattr3res getattr3res;
241 typedef struct sattrguard3 sattrguard3;
243 struct setattr3args {
245 sattr3 new_attributes;
248 typedef struct setattr3args setattr3args;
250 struct lookup3resok {
252 post_op_attr obj_attributes;
253 post_op_attr dir_attributes;
255 typedef struct lookup3resok lookup3resok;
261 post_op_attr resfail;
264 typedef struct lookup3res lookup3res;
265 #define ACCESS3_READ 0x0001
266 #define ACCESS3_LOOKUP 0x0002
267 #define ACCESS3_MODIFY 0x0004
268 #define ACCESS3_EXTEND 0x0008
269 #define ACCESS3_DELETE 0x0010
270 #define ACCESS3_EXECUTE 0x0020
276 typedef struct access3args access3args;
278 struct access3resok {
279 post_op_attr obj_attributes;
282 typedef struct access3resok access3resok;
288 post_op_attr resfail;
291 typedef struct access3res access3res;
293 struct readlink3resok {
294 post_op_attr symlink_attributes;
297 typedef struct readlink3resok readlink3resok;
299 struct readlink3res {
302 readlink3resok resok;
303 post_op_attr resfail;
306 typedef struct readlink3res readlink3res;
313 typedef struct read3args read3args;
316 post_op_attr file_attributes;
324 typedef struct read3resok read3resok;
330 post_op_attr resfail;
333 typedef struct read3res read3res;
340 typedef enum stable_how stable_how;
352 typedef struct write3args write3args;
357 stable_how committed;
360 typedef struct write3resok write3resok;
369 typedef struct write3res write3res;
376 typedef enum createmode3 createmode3;
381 sattr3 obj_attributes;
385 typedef struct createhow3 createhow3;
391 typedef struct create3args create3args;
397 typedef struct mkdir3args mkdir3args;
399 struct symlinkdata3 {
400 sattr3 symlink_attributes;
401 nfspath3 symlink_data;
403 typedef struct symlinkdata3 symlinkdata3;
405 struct symlink3args {
407 symlinkdata3 symlink;
409 typedef struct symlink3args symlink3args;
412 sattr3 dev_attributes;
415 typedef struct devicedata3 devicedata3;
421 sattr3 pipe_attributes;
424 typedef struct mknoddata3 mknoddata3;
430 typedef struct mknod3args mknod3args;
436 typedef struct rename3args rename3args;
439 wcc_data fromdir_wcc;
442 typedef struct rename3wcc rename3wcc;
450 typedef struct rename3res rename3res;
456 typedef struct link3args link3args;
459 post_op_attr file_attributes;
460 wcc_data linkdir_wcc;
462 typedef struct link3wcc link3wcc;
470 typedef struct link3res link3res;
472 struct readdir3args {
475 cookieverf3 cookieverf;
478 typedef struct readdir3args readdir3args;
484 struct entry3 *nextentry;
486 typedef struct entry3 entry3;
492 typedef struct dirlist3 dirlist3;
494 struct readdir3resok {
495 post_op_attr dir_attributes;
496 cookieverf3 cookieverf;
499 typedef struct readdir3resok readdir3resok;
505 post_op_attr resfail;
508 typedef struct readdir3res readdir3res;
510 struct readdirplus3args {
513 cookieverf3 cookieverf;
517 typedef struct readdirplus3args readdirplus3args;
523 post_op_attr name_attributes;
524 post_op_fh3 name_handle;
525 struct entryplus3 *nextentry;
527 typedef struct entryplus3 entryplus3;
529 struct dirlistplus3 {
533 typedef struct dirlistplus3 dirlistplus3;
535 struct readdirplus3resok {
536 post_op_attr dir_attributes;
537 cookieverf3 cookieverf;
540 typedef struct readdirplus3resok readdirplus3resok;
542 struct readdirplus3res {
545 readdirplus3resok resok;
546 post_op_attr resfail;
549 typedef struct readdirplus3res readdirplus3res;
551 struct fsstat3resok {
552 post_op_attr obj_attributes;
561 typedef struct fsstat3resok fsstat3resok;
567 post_op_attr resfail;
570 typedef struct fsstat3res fsstat3res;
571 #define FSF3_LINK 0x0001
572 #define FSF3_SYMLINK 0x0002
573 #define FSF3_HOMOGENEOUS 0x0008
574 #define FSF3_CANSETTIME 0x0010
576 struct fsinfo3resok {
577 post_op_attr obj_attributes;
589 typedef struct fsinfo3resok fsinfo3resok;
595 post_op_attr resfail;
598 typedef struct fsinfo3res fsinfo3res;
600 struct pathconf3resok {
601 post_op_attr obj_attributes;
605 bool_t chown_restricted;
606 bool_t case_insensitive;
607 bool_t case_preserving;
609 typedef struct pathconf3resok pathconf3resok;
611 struct pathconf3res {
614 pathconf3resok resok;
615 post_op_attr resfail;
618 typedef struct pathconf3res pathconf3res;
625 typedef struct commit3args commit3args;
627 struct commit3resok {
631 typedef struct commit3resok commit3resok;
640 typedef struct commit3res commit3res;
642 #define NFS_PROGRAM 100003
645 #define NFSPROC3_NULL 0
646 extern void * nfsproc3_null_3_svc(void *, struct svc_req *);
647 #define NFSPROC3_GETATTR 1
648 extern getattr3res * nfsproc3_getattr_3_svc(nfs_fh3 *, struct svc_req *);
649 #define NFSPROC3_SETATTR 2
650 extern wccstat3 * nfsproc3_setattr_3_svc(setattr3args *, struct svc_req *);
651 #define NFSPROC3_LOOKUP 3
652 extern lookup3res * nfsproc3_lookup_3_svc(diropargs3 *, struct svc_req *);
653 #define NFSPROC3_ACCESS 4
654 extern access3res * nfsproc3_access_3_svc(access3args *, struct svc_req *);
655 #define NFSPROC3_READLINK 5
656 extern readlink3res * nfsproc3_readlink_3_svc(nfs_fh3 *, struct svc_req *);
657 #define NFSPROC3_READ 6
658 extern read3res * nfsproc3_read_3_svc(read3args *, struct svc_req *);
659 #define NFSPROC3_WRITE 7
660 extern write3res * nfsproc3_write_3_svc(write3args *, struct svc_req *);
661 #define NFSPROC3_CREATE 8
662 extern diropres3 * nfsproc3_create_3_svc(create3args *, struct svc_req *);
663 #define NFSPROC3_MKDIR 9
664 extern diropres3 * nfsproc3_mkdir_3_svc(mkdir3args *, struct svc_req *);
665 #define NFSPROC3_SYMLINK 10
666 extern diropres3 * nfsproc3_symlink_3_svc(symlink3args *, struct svc_req *);
667 #define NFSPROC3_MKNOD 11
668 extern diropres3 * nfsproc3_mknod_3_svc(mknod3args *, struct svc_req *);
669 #define NFSPROC3_REMOVE 12
670 extern wccstat3 * nfsproc3_remove_3_svc(diropargs3 *, struct svc_req *);
671 #define NFSPROC3_RMDIR 13
672 extern wccstat3 * nfsproc3_rmdir_3_svc(diropargs3 *, struct svc_req *);
673 #define NFSPROC3_RENAME 14
674 extern rename3res * nfsproc3_rename_3_svc(rename3args *, struct svc_req *);
675 #define NFSPROC3_LINK 15
676 extern link3res * nfsproc3_link_3_svc(link3args *, struct svc_req *);
677 #define NFSPROC3_READDIR 16
678 extern readdir3res * nfsproc3_readdir_3_svc(readdir3args *, struct svc_req *);
679 #define NFSPROC3_READDIRPLUS 17
680 extern readdirplus3res * nfsproc3_readdirplus_3_svc(readdirplus3args *, struct svc_req *);
681 #define NFSPROC3_FSSTAT 18
682 extern fsstat3res * nfsproc3_fsstat_3_svc(nfs_fh3 *, struct svc_req *);
683 #define NFSPROC3_FSINFO 19
684 extern fsinfo3res * nfsproc3_fsinfo_3_svc(nfs_fh3 *, struct svc_req *);
685 #define NFSPROC3_PATHCONF 20
686 extern pathconf3res * nfsproc3_pathconf_3_svc(nfs_fh3 *, struct svc_req *);
687 #define NFSPROC3_COMMIT 21
688 extern commit3res * nfsproc3_commit_3_svc(commit3args *, struct svc_req *);
689 extern int nfs_program_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
691 /* the xdr functions */
693 extern bool_t xdr_uint64 (XDR *, uint64*);
694 extern bool_t xdr_int64 (XDR *, int64*);
695 extern bool_t xdr_uint32 (XDR *, uint32*);
696 extern bool_t xdr_int32 (XDR *, int32*);
697 extern bool_t xdr_filename3 (XDR *, filename3*);
698 extern bool_t xdr_nfspath3 (XDR *, nfspath3*);
699 extern bool_t xdr_cookieverf3 (XDR *, cookieverf3);
700 extern bool_t xdr_createverf3 (XDR *, createverf3);
701 extern bool_t xdr_writeverf3 (XDR *, writeverf3);
702 extern bool_t xdr_nfsstat3 (XDR *, nfsstat3*);
703 extern bool_t xdr_ftype3 (XDR *, ftype3*);
704 extern bool_t xdr_specdata3 (XDR *, specdata3*);
705 extern bool_t xdr_nfs_fh3 (XDR *, nfs_fh3*);
706 extern bool_t xdr_nfstime3 (XDR *, nfstime3*);
707 extern bool_t xdr_fattr3 (XDR *, fattr3*);
708 extern bool_t xdr_post_op_attr (XDR *, post_op_attr*);
709 extern bool_t xdr_wcc_attr (XDR *, wcc_attr*);
710 extern bool_t xdr_pre_op_attr (XDR *, pre_op_attr*);
711 extern bool_t xdr_wcc_data (XDR *, wcc_data*);
712 extern bool_t xdr_post_op_fh3 (XDR *, post_op_fh3*);
713 extern bool_t xdr_set_uint32 (XDR *, set_uint32*);
714 extern bool_t xdr_set_uint64 (XDR *, set_uint64*);
715 extern bool_t xdr_time_how (XDR *, time_how*);
716 extern bool_t xdr_set_time (XDR *, set_time*);
717 extern bool_t xdr_sattr3 (XDR *, sattr3*);
718 extern bool_t xdr_diropargs3 (XDR *, diropargs3*);
719 extern bool_t xdr_diropres3ok (XDR *, diropres3ok*);
720 extern bool_t xdr_diropres3 (XDR *, diropres3*);
721 extern bool_t xdr_wccstat3 (XDR *, wccstat3*);
722 extern bool_t xdr_getattr3res (XDR *, getattr3res*);
723 extern bool_t xdr_sattrguard3 (XDR *, sattrguard3*);
724 extern bool_t xdr_setattr3args (XDR *, setattr3args*);
725 extern bool_t xdr_lookup3resok (XDR *, lookup3resok*);
726 extern bool_t xdr_lookup3res (XDR *, lookup3res*);
727 extern bool_t xdr_access3args (XDR *, access3args*);
728 extern bool_t xdr_access3resok (XDR *, access3resok*);
729 extern bool_t xdr_access3res (XDR *, access3res*);
730 extern bool_t xdr_readlink3resok (XDR *, readlink3resok*);
731 extern bool_t xdr_readlink3res (XDR *, readlink3res*);
732 extern bool_t xdr_read3args (XDR *, read3args*);
733 extern bool_t xdr_read3resok (XDR *, read3resok*);
734 extern bool_t xdr_read3res (XDR *, read3res*);
735 extern bool_t xdr_stable_how (XDR *, stable_how*);
736 extern bool_t xdr_write3args (XDR *, write3args*);
737 extern bool_t xdr_write3resok (XDR *, write3resok*);
738 extern bool_t xdr_write3res (XDR *, write3res*);
739 extern bool_t xdr_createmode3 (XDR *, createmode3*);
740 extern bool_t xdr_createhow3 (XDR *, createhow3*);
741 extern bool_t xdr_create3args (XDR *, create3args*);
742 extern bool_t xdr_mkdir3args (XDR *, mkdir3args*);
743 extern bool_t xdr_symlinkdata3 (XDR *, symlinkdata3*);
744 extern bool_t xdr_symlink3args (XDR *, symlink3args*);
745 extern bool_t xdr_devicedata3 (XDR *, devicedata3*);
746 extern bool_t xdr_mknoddata3 (XDR *, mknoddata3*);
747 extern bool_t xdr_mknod3args (XDR *, mknod3args*);
748 extern bool_t xdr_rename3args (XDR *, rename3args*);
749 extern bool_t xdr_rename3wcc (XDR *, rename3wcc*);
750 extern bool_t xdr_rename3res (XDR *, rename3res*);
751 extern bool_t xdr_link3args (XDR *, link3args*);
752 extern bool_t xdr_link3wcc (XDR *, link3wcc*);
753 extern bool_t xdr_link3res (XDR *, link3res*);
754 extern bool_t xdr_readdir3args (XDR *, readdir3args*);
755 extern bool_t xdr_entry3 (XDR *, entry3*);
756 extern bool_t xdr_dirlist3 (XDR *, dirlist3*);
757 extern bool_t xdr_readdir3resok (XDR *, readdir3resok*);
758 extern bool_t xdr_readdir3res (XDR *, readdir3res*);
759 extern bool_t xdr_readdirplus3args (XDR *, readdirplus3args*);
760 extern bool_t xdr_entryplus3 (XDR *, entryplus3*);
761 extern bool_t xdr_dirlistplus3 (XDR *, dirlistplus3*);
762 extern bool_t xdr_readdirplus3resok (XDR *, readdirplus3resok*);
763 extern bool_t xdr_readdirplus3res (XDR *, readdirplus3res*);
764 extern bool_t xdr_fsstat3resok (XDR *, fsstat3resok*);
765 extern bool_t xdr_fsstat3res (XDR *, fsstat3res*);
766 extern bool_t xdr_fsinfo3resok (XDR *, fsinfo3resok*);
767 extern bool_t xdr_fsinfo3res (XDR *, fsinfo3res*);
768 extern bool_t xdr_pathconf3resok (XDR *, pathconf3resok*);
769 extern bool_t xdr_pathconf3res (XDR *, pathconf3res*);
770 extern bool_t xdr_commit3args (XDR *, commit3args*);
771 extern bool_t xdr_commit3resok (XDR *, commit3resok*);
772 extern bool_t xdr_commit3res (XDR *, commit3res*);
778 #endif /* !_NFS3_PROT_H_RPCGEN */