nfsmount.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * This file was originally generated using rpcgen.
  4. * But now we edit it by hand as needed to make it
  5. * shut up...
  6. */
  7. #ifndef _NFSMOUNT_H_RPCGEN
  8. #define _NFSMOUNT_H_RPCGEN
  9. #include <rpc/rpc.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. /*
  14. * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  15. * unrestricted use provided that this legend is included on all tape
  16. * media and as a part of the software program in whole or part. Users
  17. * may copy or modify Sun RPC without charge, but are not authorized
  18. * to license or distribute it to anyone else except as part of a product or
  19. * program developed by the user or with the express written consent of
  20. * Sun Microsystems, Inc.
  21. *
  22. * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  23. * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  24. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  25. *
  26. * Sun RPC is provided with no support and without any obligation on the
  27. * part of Sun Microsystems, Inc. to assist in its use, correction,
  28. * modification or enhancement.
  29. *
  30. * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  31. * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  32. * OR ANY PART THEREOF.
  33. *
  34. * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  35. * or profits or other special, indirect and consequential damages, even if
  36. * Sun has been advised of the possibility of such damages.
  37. *
  38. * Sun Microsystems, Inc.
  39. * 2550 Garcia Avenue
  40. * Mountain View, California 94043
  41. */
  42. /*
  43. * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
  44. */
  45. /* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */
  46. #ifndef _rpcsvc_mount_h
  47. #define _rpcsvc_mount_h
  48. #include <asm/types.h>
  49. #define MOUNTPORT 635
  50. #define MNTPATHLEN 1024
  51. #define MNTNAMLEN 255
  52. #define FHSIZE 32
  53. #define FHSIZE3 64
  54. typedef char fhandle[FHSIZE];
  55. typedef struct {
  56. unsigned int fhandle3_len;
  57. char *fhandle3_val;
  58. } fhandle3;
  59. enum mountstat3 {
  60. MNT_OK = 0,
  61. MNT3ERR_PERM = 1,
  62. MNT3ERR_NOENT = 2,
  63. MNT3ERR_IO = 5,
  64. MNT3ERR_ACCES = 13,
  65. MNT3ERR_NOTDIR = 20,
  66. MNT3ERR_INVAL = 22,
  67. MNT3ERR_NAMETOOLONG = 63,
  68. MNT3ERR_NOTSUPP = 10004,
  69. MNT3ERR_SERVERFAULT = 10006,
  70. };
  71. typedef enum mountstat3 mountstat3;
  72. struct fhstatus {
  73. unsigned int fhs_status;
  74. union {
  75. fhandle fhs_fhandle;
  76. } fhstatus_u;
  77. };
  78. typedef struct fhstatus fhstatus;
  79. struct mountres3_ok {
  80. fhandle3 fhandle;
  81. struct {
  82. unsigned int auth_flavours_len;
  83. int *auth_flavours_val;
  84. } auth_flavours;
  85. };
  86. typedef struct mountres3_ok mountres3_ok;
  87. struct mountres3 {
  88. mountstat3 fhs_status;
  89. union {
  90. mountres3_ok mountinfo;
  91. } mountres3_u;
  92. };
  93. typedef struct mountres3 mountres3;
  94. typedef char *dirpath;
  95. typedef char *name;
  96. typedef struct mountbody *mountlist;
  97. struct mountbody {
  98. name ml_hostname;
  99. dirpath ml_directory;
  100. mountlist ml_next;
  101. };
  102. typedef struct mountbody mountbody;
  103. typedef struct groupnode *groups;
  104. struct groupnode {
  105. name gr_name;
  106. groups gr_next;
  107. };
  108. typedef struct groupnode groupnode;
  109. typedef struct exportnode *exports;
  110. struct exportnode {
  111. dirpath ex_dir;
  112. groups ex_groups;
  113. exports ex_next;
  114. };
  115. typedef struct exportnode exportnode;
  116. struct ppathcnf {
  117. int pc_link_max;
  118. short pc_max_canon;
  119. short pc_max_input;
  120. short pc_name_max;
  121. short pc_path_max;
  122. short pc_pipe_buf;
  123. u_char pc_vdisable;
  124. char pc_xxx;
  125. short pc_mask[2];
  126. };
  127. typedef struct ppathcnf ppathcnf;
  128. #endif /*!_rpcsvc_mount_h*/
  129. #define MOUNTPROG 100005
  130. #define MOUNTVERS 1
  131. #define MOUNTPROC_NULL 0
  132. extern void * mountproc_null_1(void *, CLIENT *);
  133. extern void * mountproc_null_1_svc(void *, struct svc_req *);
  134. #define MOUNTPROC_MNT 1
  135. extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
  136. extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
  137. #define MOUNTPROC_DUMP 2
  138. extern mountlist * mountproc_dump_1(void *, CLIENT *);
  139. extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
  140. #define MOUNTPROC_UMNT 3
  141. extern void * mountproc_umnt_1(dirpath *, CLIENT *);
  142. extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
  143. #define MOUNTPROC_UMNTALL 4
  144. extern void * mountproc_umntall_1(void *, CLIENT *);
  145. extern void * mountproc_umntall_1_svc(void *, struct svc_req *);
  146. #define MOUNTPROC_EXPORT 5
  147. extern exports * mountproc_export_1(void *, CLIENT *);
  148. extern exports * mountproc_export_1_svc(void *, struct svc_req *);
  149. #define MOUNTPROC_EXPORTALL 6
  150. extern exports * mountproc_exportall_1(void *, CLIENT *);
  151. extern exports * mountproc_exportall_1_svc(void *, struct svc_req *);
  152. extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  153. #define MOUNTVERS_POSIX 2
  154. extern void * mountproc_null_2(void *, CLIENT *);
  155. extern void * mountproc_null_2_svc(void *, struct svc_req *);
  156. extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
  157. extern fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);
  158. extern mountlist * mountproc_dump_2(void *, CLIENT *);
  159. extern mountlist * mountproc_dump_2_svc(void *, struct svc_req *);
  160. extern void * mountproc_umnt_2(dirpath *, CLIENT *);
  161. extern void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);
  162. extern void * mountproc_umntall_2(void *, CLIENT *);
  163. extern void * mountproc_umntall_2_svc(void *, struct svc_req *);
  164. extern exports * mountproc_export_2(void *, CLIENT *);
  165. extern exports * mountproc_export_2_svc(void *, struct svc_req *);
  166. extern exports * mountproc_exportall_2(void *, CLIENT *);
  167. extern exports * mountproc_exportall_2_svc(void *, struct svc_req *);
  168. #define MOUNTPROC_PATHCONF 7
  169. extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
  170. extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
  171. extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  172. #define MOUNT_V3 3
  173. #define MOUNTPROC3_NULL 0
  174. extern void * mountproc3_null_3(void *, CLIENT *);
  175. extern void * mountproc3_null_3_svc(void *, struct svc_req *);
  176. #define MOUNTPROC3_MNT 1
  177. extern mountres3 * mountproc3_mnt_3(dirpath *, CLIENT *);
  178. extern mountres3 * mountproc3_mnt_3_svc(dirpath *, struct svc_req *);
  179. #define MOUNTPROC3_DUMP 2
  180. extern mountlist * mountproc3_dump_3(void *, CLIENT *);
  181. extern mountlist * mountproc3_dump_3_svc(void *, struct svc_req *);
  182. #define MOUNTPROC3_UMNT 3
  183. extern void * mountproc3_umnt_3(dirpath *, CLIENT *);
  184. extern void * mountproc3_umnt_3_svc(dirpath *, struct svc_req *);
  185. #define MOUNTPROC3_UMNTALL 4
  186. extern void * mountproc3_umntall_3(void *, CLIENT *);
  187. extern void * mountproc3_umntall_3_svc(void *, struct svc_req *);
  188. #define MOUNTPROC3_EXPORT 5
  189. extern exports * mountproc3_export_3(void *, CLIENT *);
  190. extern exports * mountproc3_export_3_svc(void *, struct svc_req *);
  191. extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  192. /* the xdr functions */
  193. static bool_t xdr_fhandle (XDR *, fhandle);
  194. extern bool_t xdr_fhandle3 (XDR *, fhandle3*);
  195. extern bool_t xdr_mountstat3 (XDR *, mountstat3*);
  196. extern bool_t xdr_fhstatus (XDR *, fhstatus*);
  197. extern bool_t xdr_mountres3_ok (XDR *, mountres3_ok*);
  198. extern bool_t xdr_mountres3 (XDR *, mountres3*);
  199. extern bool_t xdr_dirpath (XDR *, dirpath*);
  200. extern bool_t xdr_name (XDR *, name*);
  201. extern bool_t xdr_mountlist (XDR *, mountlist*);
  202. extern bool_t xdr_mountbody (XDR *, mountbody*);
  203. extern bool_t xdr_groups (XDR *, groups*);
  204. extern bool_t xdr_groupnode (XDR *, groupnode*);
  205. extern bool_t xdr_exports (XDR *, exports*);
  206. extern bool_t xdr_exportnode (XDR *, exportnode*);
  207. extern bool_t xdr_ppathcnf (XDR *, ppathcnf*);
  208. #ifdef __cplusplus
  209. }
  210. #endif
  211. #endif /* !_NFSMOUNT_H_RPCGEN */