blob: b3d5a51e6a1b9c91e6b0e48e7caab4b7d2f09696 [file] [log] [blame]
Erik Andersene49d5ec2000-02-08 19:58:47 +00001/* vi: set sw=4 ts=4: */
Eric Andersen1c43d0c1999-11-18 07:58:07 +00002/*
Eric Andersen4aaf89f2001-03-09 22:17:59 +00003 * This file was originally generated using rpcgen.
4 * But now we edit it by hand as needed to make it
5 * shut up...
Eric Andersen1c43d0c1999-11-18 07:58:07 +00006 */
7
8#ifndef _NFSMOUNT_H_RPCGEN
9#define _NFSMOUNT_H_RPCGEN
10
11#include <rpc/rpc.h>
12
Eric Andersenda1d1e72000-07-10 23:39:44 +000013
14#ifdef __cplusplus
15extern "C" {
16#endif
17
Eric Andersen1c43d0c1999-11-18 07:58:07 +000018/*
19 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
20 * unrestricted use provided that this legend is included on all tape
21 * media and as a part of the software program in whole or part. Users
22 * may copy or modify Sun RPC without charge, but are not authorized
23 * to license or distribute it to anyone else except as part of a product or
24 * program developed by the user or with the express written consent of
25 * Sun Microsystems, Inc.
26 *
27 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
28 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
30 *
31 * Sun RPC is provided with no support and without any obligation on the
32 * part of Sun Microsystems, Inc. to assist in its use, correction,
33 * modification or enhancement.
34 *
35 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
36 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
37 * OR ANY PART THEREOF.
38 *
39 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
40 * or profits or other special, indirect and consequential damages, even if
41 * Sun has been advised of the possibility of such damages.
42 *
43 * Sun Microsystems, Inc.
44 * 2550 Garcia Avenue
45 * Mountain View, California 94043
46 */
47/*
48 * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
49 */
50
51/* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */
52#ifndef _rpcsvc_mount_h
53#define _rpcsvc_mount_h
Eric Andersenda1d1e72000-07-10 23:39:44 +000054#include <asm/types.h>
55#define MOUNTPORT 635
Eric Andersen1c43d0c1999-11-18 07:58:07 +000056#define MNTPATHLEN 1024
57#define MNTNAMLEN 255
58#define FHSIZE 32
Eric Andersenda1d1e72000-07-10 23:39:44 +000059#define FHSIZE3 64
Eric Andersen1c43d0c1999-11-18 07:58:07 +000060
61typedef char fhandle[FHSIZE];
Eric Andersen1c43d0c1999-11-18 07:58:07 +000062
Eric Andersenda1d1e72000-07-10 23:39:44 +000063typedef struct {
64 u_int fhandle3_len;
65 char *fhandle3_val;
66} fhandle3;
67
68enum mountstat3 {
69 MNT_OK = 0,
70 MNT3ERR_PERM = 1,
71 MNT3ERR_NOENT = 2,
72 MNT3ERR_IO = 5,
73 MNT3ERR_ACCES = 13,
74 MNT3ERR_NOTDIR = 20,
75 MNT3ERR_INVAL = 22,
76 MNT3ERR_NAMETOOLONG = 63,
77 MNT3ERR_NOTSUPP = 10004,
78 MNT3ERR_SERVERFAULT = 10006,
79};
80typedef enum mountstat3 mountstat3;
Eric Andersen1c43d0c1999-11-18 07:58:07 +000081
82struct fhstatus {
83 u_int fhs_status;
84 union {
85 fhandle fhs_fhandle;
86 } fhstatus_u;
87};
88typedef struct fhstatus fhstatus;
Eric Andersen1c43d0c1999-11-18 07:58:07 +000089
Eric Andersenda1d1e72000-07-10 23:39:44 +000090struct mountres3_ok {
91 fhandle3 fhandle;
92 struct {
93 u_int auth_flavours_len;
94 int *auth_flavours_val;
95 } auth_flavours;
96};
97typedef struct mountres3_ok mountres3_ok;
98
99struct mountres3 {
100 mountstat3 fhs_status;
101 union {
102 mountres3_ok mountinfo;
103 } mountres3_u;
104};
105typedef struct mountres3 mountres3;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000106
107typedef char *dirpath;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000108
109typedef char *name;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000110
111typedef struct mountbody *mountlist;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000112
113struct mountbody {
114 name ml_hostname;
115 dirpath ml_directory;
116 mountlist ml_next;
117};
118typedef struct mountbody mountbody;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000119
120typedef struct groupnode *groups;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000121
122struct groupnode {
123 name gr_name;
124 groups gr_next;
125};
126typedef struct groupnode groupnode;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000127
128typedef struct exportnode *exports;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000129
130struct exportnode {
131 dirpath ex_dir;
132 groups ex_groups;
133 exports ex_next;
134};
135typedef struct exportnode exportnode;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000136
137struct ppathcnf {
138 int pc_link_max;
139 short pc_max_canon;
140 short pc_max_input;
141 short pc_name_max;
142 short pc_path_max;
143 short pc_pipe_buf;
144 u_char pc_vdisable;
145 char pc_xxx;
146 short pc_mask[2];
147};
148typedef struct ppathcnf ppathcnf;
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000149#endif /*!_rpcsvc_mount_h*/
150
Eric Andersenda1d1e72000-07-10 23:39:44 +0000151#define MOUNTPROG 100005
152#define MOUNTVERS 1
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000153
Eric Andersenda1d1e72000-07-10 23:39:44 +0000154#define MOUNTPROC_NULL 0
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000155extern void * mountproc_null_1(void *, CLIENT *);
156extern void * mountproc_null_1_svc(void *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000157#define MOUNTPROC_MNT 1
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000158extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
159extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000160#define MOUNTPROC_DUMP 2
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000161extern mountlist * mountproc_dump_1(void *, CLIENT *);
162extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000163#define MOUNTPROC_UMNT 3
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000164extern void * mountproc_umnt_1(dirpath *, CLIENT *);
165extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000166#define MOUNTPROC_UMNTALL 4
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000167extern void * mountproc_umntall_1(void *, CLIENT *);
168extern void * mountproc_umntall_1_svc(void *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000169#define MOUNTPROC_EXPORT 5
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000170extern exports * mountproc_export_1(void *, CLIENT *);
171extern exports * mountproc_export_1_svc(void *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000172#define MOUNTPROC_EXPORTALL 6
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000173extern exports * mountproc_exportall_1(void *, CLIENT *);
174extern exports * mountproc_exportall_1_svc(void *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000175extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000176
Eric Andersenda1d1e72000-07-10 23:39:44 +0000177#define MOUNTVERS_POSIX 2
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000178
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000179extern void * mountproc_null_2(void *, CLIENT *);
180extern void * mountproc_null_2_svc(void *, struct svc_req *);
181extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
182extern fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);
183extern mountlist * mountproc_dump_2(void *, CLIENT *);
184extern mountlist * mountproc_dump_2_svc(void *, struct svc_req *);
185extern void * mountproc_umnt_2(dirpath *, CLIENT *);
186extern void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);
187extern void * mountproc_umntall_2(void *, CLIENT *);
188extern void * mountproc_umntall_2_svc(void *, struct svc_req *);
189extern exports * mountproc_export_2(void *, CLIENT *);
190extern exports * mountproc_export_2_svc(void *, struct svc_req *);
191extern exports * mountproc_exportall_2(void *, CLIENT *);
192extern exports * mountproc_exportall_2_svc(void *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000193#define MOUNTPROC_PATHCONF 7
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000194extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
195extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000196extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000197
Eric Andersenda1d1e72000-07-10 23:39:44 +0000198#define MOUNT_V3 3
199
Eric Andersenda1d1e72000-07-10 23:39:44 +0000200#define MOUNTPROC3_NULL 0
201extern void * mountproc3_null_3(void *, CLIENT *);
202extern void * mountproc3_null_3_svc(void *, struct svc_req *);
203#define MOUNTPROC3_MNT 1
204extern mountres3 * mountproc3_mnt_3(dirpath *, CLIENT *);
205extern mountres3 * mountproc3_mnt_3_svc(dirpath *, struct svc_req *);
206#define MOUNTPROC3_DUMP 2
207extern mountlist * mountproc3_dump_3(void *, CLIENT *);
208extern mountlist * mountproc3_dump_3_svc(void *, struct svc_req *);
209#define MOUNTPROC3_UMNT 3
210extern void * mountproc3_umnt_3(dirpath *, CLIENT *);
211extern void * mountproc3_umnt_3_svc(dirpath *, struct svc_req *);
212#define MOUNTPROC3_UMNTALL 4
213extern void * mountproc3_umntall_3(void *, CLIENT *);
214extern void * mountproc3_umntall_3_svc(void *, struct svc_req *);
215#define MOUNTPROC3_EXPORT 5
216extern exports * mountproc3_export_3(void *, CLIENT *);
217extern exports * mountproc3_export_3_svc(void *, struct svc_req *);
218extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
219
Eric Andersenda1d1e72000-07-10 23:39:44 +0000220/* the xdr functions */
221
Eric Andersen4aaf89f2001-03-09 22:17:59 +0000222static bool_t xdr_fhandle (XDR *, fhandle);
Eric Andersenda1d1e72000-07-10 23:39:44 +0000223extern bool_t xdr_fhandle3 (XDR *, fhandle3*);
224extern bool_t xdr_mountstat3 (XDR *, mountstat3*);
225extern bool_t xdr_fhstatus (XDR *, fhstatus*);
226extern bool_t xdr_mountres3_ok (XDR *, mountres3_ok*);
227extern bool_t xdr_mountres3 (XDR *, mountres3*);
228extern bool_t xdr_dirpath (XDR *, dirpath*);
229extern bool_t xdr_name (XDR *, name*);
230extern bool_t xdr_mountlist (XDR *, mountlist*);
231extern bool_t xdr_mountbody (XDR *, mountbody*);
232extern bool_t xdr_groups (XDR *, groups*);
233extern bool_t xdr_groupnode (XDR *, groupnode*);
234extern bool_t xdr_exports (XDR *, exports*);
235extern bool_t xdr_exportnode (XDR *, exportnode*);
236extern bool_t xdr_ppathcnf (XDR *, ppathcnf*);
237
Eric Andersenda1d1e72000-07-10 23:39:44 +0000238#ifdef __cplusplus
239}
240#endif
Eric Andersen1c43d0c1999-11-18 07:58:07 +0000241
242#endif /* !_NFSMOUNT_H_RPCGEN */