]> git.decadent.org.uk Git - nfs-utils.git/blob - support/export/mount.h
Merge branch 'sid'
[nfs-utils.git] / support / export / mount.h
1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5
6 #ifndef _MOUNT_H_RPCGEN
7 #define _MOUNT_H_RPCGEN
8
9 #include <rpc/rpc.h>
10
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /*
17  * Copyright (c) 2009, Sun Microsystems, Inc.
18  * All rights reserved.
19  *
20  * Redistribution and use in source and binary forms, with or without
21  * modification, are permitted provided that the following conditions are met:
22  * - Redistributions of source code must retain the above copyright notice,
23  *   this list of conditions and the following disclaimer.
24  * - Redistributions in binary form must reproduce the above copyright notice,
25  *   this list of conditions and the following disclaimer in the documentation
26  *   and/or other materials provided with the distribution.
27  * - Neither the name of Sun Microsystems, Inc. nor the names of its
28  *   contributors may be used to endorse or promote products derived
29  *   from this software without specific prior written permission.
30  *
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
35  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGE.
42  */
43 /*
44  * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
45  */
46
47 /* from @(#)mount.x     1.3 91/03/11 TIRPC 1.0 */
48 #ifndef _rpcsvc_mount_h
49 #define _rpcsvc_mount_h
50 #include <memory.h>
51 #define MNTPATHLEN 1024
52 #define MNTNAMLEN 255
53 #define FHSIZE 32
54
55 typedef char fhandle[FHSIZE];
56
57 struct fhstatus {
58         u_int fhs_status;
59         union {
60                 fhandle fhs_fhandle;
61         } fhstatus_u;
62 };
63 typedef struct fhstatus fhstatus;
64
65 typedef char *dirpath;
66
67 typedef char *name;
68
69 typedef struct mountbody *mountlist;
70
71 struct mountbody {
72         name ml_hostname;
73         dirpath ml_directory;
74         mountlist ml_next;
75 };
76 typedef struct mountbody mountbody;
77
78 typedef struct groupnode *groups;
79
80 struct groupnode {
81         name gr_name;
82         groups gr_next;
83 };
84 typedef struct groupnode groupnode;
85
86 typedef struct exportnode *exports;
87
88 struct exportnode {
89         dirpath ex_dir;
90         groups ex_groups;
91         exports ex_next;
92 };
93 typedef struct exportnode exportnode;
94
95 struct ppathcnf {
96         int pc_link_max;
97         short pc_max_canon;
98         short pc_max_input;
99         short pc_name_max;
100         short pc_path_max;
101         short pc_pipe_buf;
102         u_char pc_vdisable;
103         char pc_xxx;
104         short pc_mask[2];
105 };
106 typedef struct ppathcnf ppathcnf;
107 #define FHSIZE3 64
108
109 typedef struct {
110         u_int fhandle3_len;
111         char *fhandle3_val;
112 } fhandle3;
113
114 enum mountstat3 {
115         MNT_OK = 0,
116         MNT3ERR_PERM = 1,
117         MNT3ERR_NOENT = 2,
118         MNT3ERR_IO = 5,
119         MNT3ERR_ACCES = 13,
120         MNT3ERR_NOTDIR = 20,
121         MNT3ERR_INVAL = 22,
122         MNT3ERR_NAMETOOLONG = 63,
123         MNT3ERR_NOTSUPP = 10004,
124         MNT3ERR_SERVERFAULT = 10006,
125 };
126 typedef enum mountstat3 mountstat3;
127
128 struct mountres3_ok {
129         fhandle3 fhandle;
130         struct {
131                 u_int auth_flavors_len;
132                 int *auth_flavors_val;
133         } auth_flavors;
134 };
135 typedef struct mountres3_ok mountres3_ok;
136
137 struct mountres3 {
138         mountstat3 fhs_status;
139         union {
140                 mountres3_ok mountinfo;
141         } mountres3_u;
142 };
143 typedef struct mountres3 mountres3;
144 #endif /*!_rpcsvc_mount_h*/
145
146 #define MOUNTPROG 100005
147 #define MOUNTVERS 1
148
149 #if defined(__STDC__) || defined(__cplusplus)
150 #define MOUNTPROC_NULL 0
151 extern  void * mountproc_null_1(void *, CLIENT *);
152 extern  void * mountproc_null_1_svc(void *, struct svc_req *);
153 #define MOUNTPROC_MNT 1
154 extern  fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
155 extern  fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
156 #define MOUNTPROC_DUMP 2
157 extern  mountlist * mountproc_dump_1(void *, CLIENT *);
158 extern  mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
159 #define MOUNTPROC_UMNT 3
160 extern  void * mountproc_umnt_1(dirpath *, CLIENT *);
161 extern  void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
162 #define MOUNTPROC_UMNTALL 4
163 extern  void * mountproc_umntall_1(void *, CLIENT *);
164 extern  void * mountproc_umntall_1_svc(void *, struct svc_req *);
165 #define MOUNTPROC_EXPORT 5
166 extern  exports * mountproc_export_1(void *, CLIENT *);
167 extern  exports * mountproc_export_1_svc(void *, struct svc_req *);
168 #define MOUNTPROC_EXPORTALL 6
169 extern  exports * mountproc_exportall_1(void *, CLIENT *);
170 extern  exports * mountproc_exportall_1_svc(void *, struct svc_req *);
171 extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
172
173 #else /* K&R C */
174 #define MOUNTPROC_NULL 0
175 extern  void * mountproc_null_1();
176 extern  void * mountproc_null_1_svc();
177 #define MOUNTPROC_MNT 1
178 extern  fhstatus * mountproc_mnt_1();
179 extern  fhstatus * mountproc_mnt_1_svc();
180 #define MOUNTPROC_DUMP 2
181 extern  mountlist * mountproc_dump_1();
182 extern  mountlist * mountproc_dump_1_svc();
183 #define MOUNTPROC_UMNT 3
184 extern  void * mountproc_umnt_1();
185 extern  void * mountproc_umnt_1_svc();
186 #define MOUNTPROC_UMNTALL 4
187 extern  void * mountproc_umntall_1();
188 extern  void * mountproc_umntall_1_svc();
189 #define MOUNTPROC_EXPORT 5
190 extern  exports * mountproc_export_1();
191 extern  exports * mountproc_export_1_svc();
192 #define MOUNTPROC_EXPORTALL 6
193 extern  exports * mountproc_exportall_1();
194 extern  exports * mountproc_exportall_1_svc();
195 extern int mountprog_1_freeresult ();
196 #endif /* K&R C */
197 #define MOUNTVERS_POSIX 2
198
199 #if defined(__STDC__) || defined(__cplusplus)
200 extern  void * mountproc_null_2(void *, CLIENT *);
201 extern  void * mountproc_null_2_svc(void *, struct svc_req *);
202 extern  fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
203 extern  fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);
204 extern  mountlist * mountproc_dump_2(void *, CLIENT *);
205 extern  mountlist * mountproc_dump_2_svc(void *, struct svc_req *);
206 extern  void * mountproc_umnt_2(dirpath *, CLIENT *);
207 extern  void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);
208 extern  void * mountproc_umntall_2(void *, CLIENT *);
209 extern  void * mountproc_umntall_2_svc(void *, struct svc_req *);
210 extern  exports * mountproc_export_2(void *, CLIENT *);
211 extern  exports * mountproc_export_2_svc(void *, struct svc_req *);
212 extern  exports * mountproc_exportall_2(void *, CLIENT *);
213 extern  exports * mountproc_exportall_2_svc(void *, struct svc_req *);
214 #define MOUNTPROC_PATHCONF 7
215 extern  ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);
216 extern  ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);
217 extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
218
219 #else /* K&R C */
220 extern  void * mountproc_null_2();
221 extern  void * mountproc_null_2_svc();
222 extern  fhstatus * mountproc_mnt_2();
223 extern  fhstatus * mountproc_mnt_2_svc();
224 extern  mountlist * mountproc_dump_2();
225 extern  mountlist * mountproc_dump_2_svc();
226 extern  void * mountproc_umnt_2();
227 extern  void * mountproc_umnt_2_svc();
228 extern  void * mountproc_umntall_2();
229 extern  void * mountproc_umntall_2_svc();
230 extern  exports * mountproc_export_2();
231 extern  exports * mountproc_export_2_svc();
232 extern  exports * mountproc_exportall_2();
233 extern  exports * mountproc_exportall_2_svc();
234 #define MOUNTPROC_PATHCONF 7
235 extern  ppathcnf * mountproc_pathconf_2();
236 extern  ppathcnf * mountproc_pathconf_2_svc();
237 extern int mountprog_2_freeresult ();
238 #endif /* K&R C */
239 #define MOUNTVERS_NFSV3 3
240
241 #if defined(__STDC__) || defined(__cplusplus)
242 #define MOUNTPROC3_NULL 0
243 extern  void * mountproc3_null_3(void *, CLIENT *);
244 extern  void * mountproc3_null_3_svc(void *, struct svc_req *);
245 #define MOUNTPROC3_MNT 1
246 extern  mountres3 * mountproc3_mnt_3(dirpath *, CLIENT *);
247 extern  mountres3 * mountproc3_mnt_3_svc(dirpath *, struct svc_req *);
248 #define MOUNTPROC3_DUMP 2
249 extern  mountlist * mountproc3_dump_3(void *, CLIENT *);
250 extern  mountlist * mountproc3_dump_3_svc(void *, struct svc_req *);
251 #define MOUNTPROC3_UMNT 3
252 extern  void * mountproc3_umnt_3(dirpath *, CLIENT *);
253 extern  void * mountproc3_umnt_3_svc(dirpath *, struct svc_req *);
254 #define MOUNTPROC3_UMNTALL 4
255 extern  void * mountproc3_umntall_3(void *, CLIENT *);
256 extern  void * mountproc3_umntall_3_svc(void *, struct svc_req *);
257 #define MOUNTPROC3_EXPORT 5
258 extern  exports * mountproc3_export_3(void *, CLIENT *);
259 extern  exports * mountproc3_export_3_svc(void *, struct svc_req *);
260 extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
261
262 #else /* K&R C */
263 #define MOUNTPROC3_NULL 0
264 extern  void * mountproc3_null_3();
265 extern  void * mountproc3_null_3_svc();
266 #define MOUNTPROC3_MNT 1
267 extern  mountres3 * mountproc3_mnt_3();
268 extern  mountres3 * mountproc3_mnt_3_svc();
269 #define MOUNTPROC3_DUMP 2
270 extern  mountlist * mountproc3_dump_3();
271 extern  mountlist * mountproc3_dump_3_svc();
272 #define MOUNTPROC3_UMNT 3
273 extern  void * mountproc3_umnt_3();
274 extern  void * mountproc3_umnt_3_svc();
275 #define MOUNTPROC3_UMNTALL 4
276 extern  void * mountproc3_umntall_3();
277 extern  void * mountproc3_umntall_3_svc();
278 #define MOUNTPROC3_EXPORT 5
279 extern  exports * mountproc3_export_3();
280 extern  exports * mountproc3_export_3_svc();
281 extern int mountprog_3_freeresult ();
282 #endif /* K&R C */
283
284 /* the xdr functions */
285
286 #if defined(__STDC__) || defined(__cplusplus)
287 extern  bool_t xdr_fhandle (XDR *, fhandle);
288 extern  bool_t xdr_fhstatus (XDR *, fhstatus*);
289 extern  bool_t xdr_dirpath (XDR *, dirpath*);
290 extern  bool_t xdr_name (XDR *, name*);
291 extern  bool_t xdr_mountlist (XDR *, mountlist*);
292 extern  bool_t xdr_mountbody (XDR *, mountbody*);
293 extern  bool_t xdr_groups (XDR *, groups*);
294 extern  bool_t xdr_groupnode (XDR *, groupnode*);
295 extern  bool_t xdr_exports (XDR *, exports*);
296 extern  bool_t xdr_exportnode (XDR *, exportnode*);
297 extern  bool_t xdr_ppathcnf (XDR *, ppathcnf*);
298 extern  bool_t xdr_fhandle3 (XDR *, fhandle3*);
299 extern  bool_t xdr_mountstat3 (XDR *, mountstat3*);
300 extern  bool_t xdr_mountres3_ok (XDR *, mountres3_ok*);
301 extern  bool_t xdr_mountres3 (XDR *, mountres3*);
302
303 #else /* K&R C */
304 extern bool_t xdr_fhandle ();
305 extern bool_t xdr_fhstatus ();
306 extern bool_t xdr_dirpath ();
307 extern bool_t xdr_name ();
308 extern bool_t xdr_mountlist ();
309 extern bool_t xdr_mountbody ();
310 extern bool_t xdr_groups ();
311 extern bool_t xdr_groupnode ();
312 extern bool_t xdr_exports ();
313 extern bool_t xdr_exportnode ();
314 extern bool_t xdr_ppathcnf ();
315 extern bool_t xdr_fhandle3 ();
316 extern bool_t xdr_mountstat3 ();
317 extern bool_t xdr_mountres3_ok ();
318 extern bool_t xdr_mountres3 ();
319
320 #endif /* K&R C */
321
322 #ifdef __cplusplus
323 }
324 #endif
325
326 #endif /* !_MOUNT_H_RPCGEN */