aboutsummaryrefslogtreecommitdiff
path: root/nfsmount.h
diff options
context:
space:
mode:
Diffstat (limited to 'nfsmount.h')
-rw-r--r--nfsmount.h310
1 files changed, 157 insertions, 153 deletions
diff --git a/nfsmount.h b/nfsmount.h
index 64ac617c0..a12de50a1 100644
--- a/nfsmount.h
+++ b/nfsmount.h
@@ -9,6 +9,11 @@
9 9
10#include <rpc/rpc.h> 10#include <rpc/rpc.h>
11 11
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
12/* 17/*
13 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 18 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
14 * unrestricted use provided that this legend is included on all tape 19 * unrestricted use provided that this legend is included on all tape
@@ -45,19 +50,33 @@
45/* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */ 50/* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */
46#ifndef _rpcsvc_mount_h 51#ifndef _rpcsvc_mount_h
47#define _rpcsvc_mount_h 52#define _rpcsvc_mount_h
53#include <asm/types.h>
54#define MOUNTPORT 635
48#define MNTPATHLEN 1024 55#define MNTPATHLEN 1024
49#define MNTNAMLEN 255 56#define MNTNAMLEN 255
50#define FHSIZE 32 57#define FHSIZE 32
58#define FHSIZE3 64
51 59
52typedef char fhandle[FHSIZE]; 60typedef char fhandle[FHSIZE];
53#ifdef __cplusplus
54extern "C" bool_t xdr_fhandle(XDR *, fhandle);
55#elif __STDC__
56extern bool_t xdr_fhandle(XDR *, fhandle);
57#else /* Old Style C */
58bool_t xdr_fhandle();
59#endif /* Old Style C */
60 61
62typedef struct {
63 u_int fhandle3_len;
64 char *fhandle3_val;
65} fhandle3;
66
67enum mountstat3 {
68 MNT_OK = 0,
69 MNT3ERR_PERM = 1,
70 MNT3ERR_NOENT = 2,
71 MNT3ERR_IO = 5,
72 MNT3ERR_ACCES = 13,
73 MNT3ERR_NOTDIR = 20,
74 MNT3ERR_INVAL = 22,
75 MNT3ERR_NAMETOOLONG = 63,
76 MNT3ERR_NOTSUPP = 10004,
77 MNT3ERR_SERVERFAULT = 10006,
78};
79typedef enum mountstat3 mountstat3;
61 80
62struct fhstatus { 81struct fhstatus {
63 u_int fhs_status; 82 u_int fhs_status;
@@ -66,44 +85,29 @@ struct fhstatus {
66 } fhstatus_u; 85 } fhstatus_u;
67}; 86};
68typedef struct fhstatus fhstatus; 87typedef struct fhstatus fhstatus;
69#ifdef __cplusplus
70extern "C" bool_t xdr_fhstatus(XDR *, fhstatus*);
71#elif __STDC__
72extern bool_t xdr_fhstatus(XDR *, fhstatus*);
73#else /* Old Style C */
74bool_t xdr_fhstatus();
75#endif /* Old Style C */
76 88
89struct mountres3_ok {
90 fhandle3 fhandle;
91 struct {
92 u_int auth_flavours_len;
93 int *auth_flavours_val;
94 } auth_flavours;
95};
96typedef struct mountres3_ok mountres3_ok;
77 97
78typedef char *dirpath; 98struct mountres3 {
79#ifdef __cplusplus 99 mountstat3 fhs_status;
80extern "C" bool_t xdr_dirpath(XDR *, dirpath*); 100 union {
81#elif __STDC__ 101 mountres3_ok mountinfo;
82extern bool_t xdr_dirpath(XDR *, dirpath*); 102 } mountres3_u;
83#else /* Old Style C */ 103};
84bool_t xdr_dirpath(); 104typedef struct mountres3 mountres3;
85#endif /* Old Style C */
86 105
106typedef char *dirpath;
87 107
88typedef char *name; 108typedef char *name;
89#ifdef __cplusplus
90extern "C" bool_t xdr_name(XDR *, name*);
91#elif __STDC__
92extern bool_t xdr_name(XDR *, name*);
93#else /* Old Style C */
94bool_t xdr_name();
95#endif /* Old Style C */
96
97 109
98typedef struct mountbody *mountlist; 110typedef struct mountbody *mountlist;
99#ifdef __cplusplus
100extern "C" bool_t xdr_mountlist(XDR *, mountlist*);
101#elif __STDC__
102extern bool_t xdr_mountlist(XDR *, mountlist*);
103#else /* Old Style C */
104bool_t xdr_mountlist();
105#endif /* Old Style C */
106
107 111
108struct mountbody { 112struct mountbody {
109 name ml_hostname; 113 name ml_hostname;
@@ -111,48 +115,16 @@ struct mountbody {
111 mountlist ml_next; 115 mountlist ml_next;
112}; 116};
113typedef struct mountbody mountbody; 117typedef struct mountbody mountbody;
114#ifdef __cplusplus
115extern "C" bool_t xdr_mountbody(XDR *, mountbody*);
116#elif __STDC__
117extern bool_t xdr_mountbody(XDR *, mountbody*);
118#else /* Old Style C */
119bool_t xdr_mountbody();
120#endif /* Old Style C */
121
122 118
123typedef struct groupnode *groups; 119typedef struct groupnode *groups;
124#ifdef __cplusplus
125extern "C" bool_t xdr_groups(XDR *, groups*);
126#elif __STDC__
127extern bool_t xdr_groups(XDR *, groups*);
128#else /* Old Style C */
129bool_t xdr_groups();
130#endif /* Old Style C */
131
132 120
133struct groupnode { 121struct groupnode {
134 name gr_name; 122 name gr_name;
135 groups gr_next; 123 groups gr_next;
136}; 124};
137typedef struct groupnode groupnode; 125typedef struct groupnode groupnode;
138#ifdef __cplusplus
139extern "C" bool_t xdr_groupnode(XDR *, groupnode*);
140#elif __STDC__
141extern bool_t xdr_groupnode(XDR *, groupnode*);
142#else /* Old Style C */
143bool_t xdr_groupnode();
144#endif /* Old Style C */
145
146 126
147typedef struct exportnode *exports; 127typedef struct exportnode *exports;
148#ifdef __cplusplus
149extern "C" bool_t xdr_exports(XDR *, exports*);
150#elif __STDC__
151extern bool_t xdr_exports(XDR *, exports*);
152#else /* Old Style C */
153bool_t xdr_exports();
154#endif /* Old Style C */
155
156 128
157struct exportnode { 129struct exportnode {
158 dirpath ex_dir; 130 dirpath ex_dir;
@@ -160,14 +132,6 @@ struct exportnode {
160 exports ex_next; 132 exports ex_next;
161}; 133};
162typedef struct exportnode exportnode; 134typedef struct exportnode exportnode;
163#ifdef __cplusplus
164extern "C" bool_t xdr_exportnode(XDR *, exportnode*);
165#elif __STDC__
166extern bool_t xdr_exportnode(XDR *, exportnode*);
167#else /* Old Style C */
168bool_t xdr_exportnode();
169#endif /* Old Style C */
170
171 135
172struct ppathcnf { 136struct ppathcnf {
173 int pc_link_max; 137 int pc_link_max;
@@ -181,110 +145,62 @@ struct ppathcnf {
181 short pc_mask[2]; 145 short pc_mask[2];
182}; 146};
183typedef struct ppathcnf ppathcnf; 147typedef struct ppathcnf ppathcnf;
184#ifdef __cplusplus
185extern "C" bool_t xdr_ppathcnf(XDR *, ppathcnf*);
186#elif __STDC__
187extern bool_t xdr_ppathcnf(XDR *, ppathcnf*);
188#else /* Old Style C */
189bool_t xdr_ppathcnf();
190#endif /* Old Style C */
191
192#endif /*!_rpcsvc_mount_h*/ 148#endif /*!_rpcsvc_mount_h*/
193 149
194#define MOUNTPROG ((u_long)100005) 150#define MOUNTPROG 100005
195#define MOUNTVERS ((u_long)1) 151#define MOUNTVERS 1
196 152
197#ifdef __cplusplus 153#if defined(__STDC__) || defined(__cplusplus)
198#define MOUNTPROC_NULL ((u_long)0) 154#define MOUNTPROC_NULL 0
199extern "C" void * mountproc_null_1(void *, CLIENT *);
200extern "C" void * mountproc_null_1_svc(void *, struct svc_req *);
201#define MOUNTPROC_MNT ((u_long)1)
202extern "C" fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
203extern "C" fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
204#define MOUNTPROC_DUMP ((u_long)2)
205extern "C" mountlist * mountproc_dump_1(void *, CLIENT *);
206extern "C" mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
207#define MOUNTPROC_UMNT ((u_long)3)
208extern "C" void * mountproc_umnt_1(dirpath *, CLIENT *);
209extern "C" void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
210#define MOUNTPROC_UMNTALL ((u_long)4)
211extern "C" void * mountproc_umntall_1(void *, CLIENT *);
212extern "C" void * mountproc_umntall_1_svc(void *, struct svc_req *);
213#define MOUNTPROC_EXPORT ((u_long)5)
214extern "C" exports * mountproc_export_1(void *, CLIENT *);
215extern "C" exports * mountproc_export_1_svc(void *, struct svc_req *);
216#define MOUNTPROC_EXPORTALL ((u_long)6)
217extern "C" exports * mountproc_exportall_1(void *, CLIENT *);
218extern "C" exports * mountproc_exportall_1_svc(void *, struct svc_req *);
219
220#elif __STDC__
221#define MOUNTPROC_NULL ((u_long)0)
222extern void * mountproc_null_1(void *, CLIENT *); 155extern void * mountproc_null_1(void *, CLIENT *);
223extern void * mountproc_null_1_svc(void *, struct svc_req *); 156extern void * mountproc_null_1_svc(void *, struct svc_req *);
224#define MOUNTPROC_MNT ((u_long)1) 157#define MOUNTPROC_MNT 1
225extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *); 158extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
226extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *); 159extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
227#define MOUNTPROC_DUMP ((u_long)2) 160#define MOUNTPROC_DUMP 2
228extern mountlist * mountproc_dump_1(void *, CLIENT *); 161extern mountlist * mountproc_dump_1(void *, CLIENT *);
229extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *); 162extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
230#define MOUNTPROC_UMNT ((u_long)3) 163#define MOUNTPROC_UMNT 3
231extern void * mountproc_umnt_1(dirpath *, CLIENT *); 164extern void * mountproc_umnt_1(dirpath *, CLIENT *);
232extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *); 165extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
233#define MOUNTPROC_UMNTALL ((u_long)4) 166#define MOUNTPROC_UMNTALL 4
234extern void * mountproc_umntall_1(void *, CLIENT *); 167extern void * mountproc_umntall_1(void *, CLIENT *);
235extern void * mountproc_umntall_1_svc(void *, struct svc_req *); 168extern void * mountproc_umntall_1_svc(void *, struct svc_req *);
236#define MOUNTPROC_EXPORT ((u_long)5) 169#define MOUNTPROC_EXPORT 5
237extern exports * mountproc_export_1(void *, CLIENT *); 170extern exports * mountproc_export_1(void *, CLIENT *);
238extern exports * mountproc_export_1_svc(void *, struct svc_req *); 171extern exports * mountproc_export_1_svc(void *, struct svc_req *);
239#define MOUNTPROC_EXPORTALL ((u_long)6) 172#define MOUNTPROC_EXPORTALL 6
240extern exports * mountproc_exportall_1(void *, CLIENT *); 173extern exports * mountproc_exportall_1(void *, CLIENT *);
241extern exports * mountproc_exportall_1_svc(void *, struct svc_req *); 174extern exports * mountproc_exportall_1_svc(void *, struct svc_req *);
175extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
242 176
243#else /* Old Style C */ 177#else /* K&R C */
244#define MOUNTPROC_NULL ((u_long)0) 178#define MOUNTPROC_NULL 0
245extern void * mountproc_null_1(); 179extern void * mountproc_null_1();
246extern void * mountproc_null_1_svc(); 180extern void * mountproc_null_1_svc();
247#define MOUNTPROC_MNT ((u_long)1) 181#define MOUNTPROC_MNT 1
248extern fhstatus * mountproc_mnt_1(); 182extern fhstatus * mountproc_mnt_1();
249extern fhstatus * mountproc_mnt_1_svc(); 183extern fhstatus * mountproc_mnt_1_svc();
250#define MOUNTPROC_DUMP ((u_long)2) 184#define MOUNTPROC_DUMP 2
251extern mountlist * mountproc_dump_1(); 185extern mountlist * mountproc_dump_1();
252extern mountlist * mountproc_dump_1_svc(); 186extern mountlist * mountproc_dump_1_svc();
253#define MOUNTPROC_UMNT ((u_long)3) 187#define MOUNTPROC_UMNT 3
254extern void * mountproc_umnt_1(); 188extern void * mountproc_umnt_1();
255extern void * mountproc_umnt_1_svc(); 189extern void * mountproc_umnt_1_svc();
256#define MOUNTPROC_UMNTALL ((u_long)4) 190#define MOUNTPROC_UMNTALL 4
257extern void * mountproc_umntall_1(); 191extern void * mountproc_umntall_1();
258extern void * mountproc_umntall_1_svc(); 192extern void * mountproc_umntall_1_svc();
259#define MOUNTPROC_EXPORT ((u_long)5) 193#define MOUNTPROC_EXPORT 5
260extern exports * mountproc_export_1(); 194extern exports * mountproc_export_1();
261extern exports * mountproc_export_1_svc(); 195extern exports * mountproc_export_1_svc();
262#define MOUNTPROC_EXPORTALL ((u_long)6) 196#define MOUNTPROC_EXPORTALL 6
263extern exports * mountproc_exportall_1(); 197extern exports * mountproc_exportall_1();
264extern exports * mountproc_exportall_1_svc(); 198extern exports * mountproc_exportall_1_svc();
265#endif /* Old Style C */ 199extern int mountprog_1_freeresult ();
266#define MOUNTVERS_POSIX ((u_long)2) 200#endif /* K&R C */
201#define MOUNTVERS_POSIX 2
267 202
268#ifdef __cplusplus 203#if defined(__STDC__) || defined(__cplusplus)
269extern "C" void * mountproc_null_2(void *, CLIENT *);
270extern "C" void * mountproc_null_2_svc(void *, struct svc_req *);
271extern "C" fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
272extern "C" fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);
273extern "C" mountlist * mountproc_dump_2(void *, CLIENT *);
274extern "C" mountlist * mountproc_dump_2_svc(void *, struct svc_req *);
275extern "C" void * mountproc_umnt_2(dirpath *, CLIENT *);
276extern "C" void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);
277extern "C" void * mountproc_umntall_2(void *, CLIENT *);
278extern "C" void * mountproc_umntall_2_svc(void *, struct svc_req *);
279extern "C" exports * mountproc_export_2(void *, CLIENT *);
280extern "C" exports * mountproc_export_2_svc(void *, struct svc_req *);
281extern "C" exports * mountproc_exportall_2(void *, CLIENT *);
282extern "C" exports * mountproc_exportall_2_svc(void *, struct svc_req *);
283#define MOUNTPROC_PATHCONF ((u_long)7)
284extern "C" ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
285extern "C" ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
286
287#elif __STDC__
288extern void * mountproc_null_2(void *, CLIENT *); 204extern void * mountproc_null_2(void *, CLIENT *);
289extern void * mountproc_null_2_svc(void *, struct svc_req *); 205extern void * mountproc_null_2_svc(void *, struct svc_req *);
290extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *); 206extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
@@ -299,11 +215,12 @@ extern exports * mountproc_export_2(void *, CLIENT *);
299extern exports * mountproc_export_2_svc(void *, struct svc_req *); 215extern exports * mountproc_export_2_svc(void *, struct svc_req *);
300extern exports * mountproc_exportall_2(void *, CLIENT *); 216extern exports * mountproc_exportall_2(void *, CLIENT *);
301extern exports * mountproc_exportall_2_svc(void *, struct svc_req *); 217extern exports * mountproc_exportall_2_svc(void *, struct svc_req *);
302#define MOUNTPROC_PATHCONF ((u_long)7) 218#define MOUNTPROC_PATHCONF 7
303extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *); 219extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
304extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *); 220extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
221extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
305 222
306#else /* Old Style C */ 223#else /* K&R C */
307extern void * mountproc_null_2(); 224extern void * mountproc_null_2();
308extern void * mountproc_null_2_svc(); 225extern void * mountproc_null_2_svc();
309extern fhstatus * mountproc_mnt_2(); 226extern fhstatus * mountproc_mnt_2();
@@ -318,9 +235,96 @@ extern exports * mountproc_export_2();
318extern exports * mountproc_export_2_svc(); 235extern exports * mountproc_export_2_svc();
319extern exports * mountproc_exportall_2(); 236extern exports * mountproc_exportall_2();
320extern exports * mountproc_exportall_2_svc(); 237extern exports * mountproc_exportall_2_svc();
321#define MOUNTPROC_PATHCONF ((u_long)7) 238#define MOUNTPROC_PATHCONF 7
322extern ppathcnf * mountproc_pathconf_2(); 239extern ppathcnf * mountproc_pathconf_2();
323extern ppathcnf * mountproc_pathconf_2_svc(); 240extern ppathcnf * mountproc_pathconf_2_svc();
324#endif /* Old Style C */ 241extern int mountprog_2_freeresult ();
242#endif /* K&R C */
243#define MOUNT_V3 3
244
245#if defined(__STDC__) || defined(__cplusplus)
246#define MOUNTPROC3_NULL 0
247extern void * mountproc3_null_3(void *, CLIENT *);
248extern void * mountproc3_null_3_svc(void *, struct svc_req *);
249#define MOUNTPROC3_MNT 1
250extern mountres3 * mountproc3_mnt_3(dirpath *, CLIENT *);
251extern mountres3 * mountproc3_mnt_3_svc(dirpath *, struct svc_req *);
252#define MOUNTPROC3_DUMP 2
253extern mountlist * mountproc3_dump_3(void *, CLIENT *);
254extern mountlist * mountproc3_dump_3_svc(void *, struct svc_req *);
255#define MOUNTPROC3_UMNT 3
256extern void * mountproc3_umnt_3(dirpath *, CLIENT *);
257extern void * mountproc3_umnt_3_svc(dirpath *, struct svc_req *);
258#define MOUNTPROC3_UMNTALL 4
259extern void * mountproc3_umntall_3(void *, CLIENT *);
260extern void * mountproc3_umntall_3_svc(void *, struct svc_req *);
261#define MOUNTPROC3_EXPORT 5
262extern exports * mountproc3_export_3(void *, CLIENT *);
263extern exports * mountproc3_export_3_svc(void *, struct svc_req *);
264extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
265
266#else /* K&R C */
267#define MOUNTPROC3_NULL 0
268extern void * mountproc3_null_3();
269extern void * mountproc3_null_3_svc();
270#define MOUNTPROC3_MNT 1
271extern mountres3 * mountproc3_mnt_3();
272extern mountres3 * mountproc3_mnt_3_svc();
273#define MOUNTPROC3_DUMP 2
274extern mountlist * mountproc3_dump_3();
275extern mountlist * mountproc3_dump_3_svc();
276#define MOUNTPROC3_UMNT 3
277extern void * mountproc3_umnt_3();
278extern void * mountproc3_umnt_3_svc();
279#define MOUNTPROC3_UMNTALL 4
280extern void * mountproc3_umntall_3();
281extern void * mountproc3_umntall_3_svc();
282#define MOUNTPROC3_EXPORT 5
283extern exports * mountproc3_export_3();
284extern exports * mountproc3_export_3_svc();
285extern int mountprog_3_freeresult ();
286#endif /* K&R C */
287
288/* the xdr functions */
289
290#if defined(__STDC__) || defined(__cplusplus)
291extern bool_t xdr_fhandle (XDR *, fhandle);
292extern bool_t xdr_fhandle3 (XDR *, fhandle3*);
293extern bool_t xdr_mountstat3 (XDR *, mountstat3*);
294extern bool_t xdr_fhstatus (XDR *, fhstatus*);
295extern bool_t xdr_mountres3_ok (XDR *, mountres3_ok*);
296extern bool_t xdr_mountres3 (XDR *, mountres3*);
297extern bool_t xdr_dirpath (XDR *, dirpath*);
298extern bool_t xdr_name (XDR *, name*);
299extern bool_t xdr_mountlist (XDR *, mountlist*);
300extern bool_t xdr_mountbody (XDR *, mountbody*);
301extern bool_t xdr_groups (XDR *, groups*);
302extern bool_t xdr_groupnode (XDR *, groupnode*);
303extern bool_t xdr_exports (XDR *, exports*);
304extern bool_t xdr_exportnode (XDR *, exportnode*);
305extern bool_t xdr_ppathcnf (XDR *, ppathcnf*);
306
307#else /* K&R C */
308extern bool_t xdr_fhandle ();
309extern bool_t xdr_fhandle3 ();
310extern bool_t xdr_mountstat3 ();
311extern bool_t xdr_fhstatus ();
312extern bool_t xdr_mountres3_ok ();
313extern bool_t xdr_mountres3 ();
314extern bool_t xdr_dirpath ();
315extern bool_t xdr_name ();
316extern bool_t xdr_mountlist ();
317extern bool_t xdr_mountbody ();
318extern bool_t xdr_groups ();
319extern bool_t xdr_groupnode ();
320extern bool_t xdr_exports ();
321extern bool_t xdr_exportnode ();
322extern bool_t xdr_ppathcnf ();
323
324#endif /* K&R C */
325
326#ifdef __cplusplus
327}
328#endif
325 329
326#endif /* !_NFSMOUNT_H_RPCGEN */ 330#endif /* !_NFSMOUNT_H_RPCGEN */