Imported Upstream version 1.9.4
[deb_libnfs.git] / mount / libnfs-raw-mount.h
CommitLineData
f1f22dbf
RRS
1/*
2Copyright (c) 2014, Ronnie Sahlberg
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
81. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
102. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25The views and conclusions contained in the software and documentation are those
26of the authors and should not be interpreted as representing official policies,
27either expressed or implied, of the FreeBSD Project.
28*/
29
ee872606
RRS
30/*
31 * Please do not edit this file.
32 * It was generated using rpcgen.
33 */
34
35#ifndef _MOUNT_H_RPCGEN
36#define _MOUNT_H_RPCGEN
37
f1f22dbf
RRS
38
39
ee872606
RRS
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45#define MNTPATHLEN 1024
46#define MNTNAMLEN 255
47#define FHSIZE3 64
48
49typedef struct {
50 u_int fhandle3_len;
51 char *fhandle3_val;
52} fhandle3;
53
54typedef char *dirpath;
55
56typedef char *name;
57
58enum mountstat3 {
59 MNT3_OK = 0,
60 MNT3ERR_PERM = 1,
61 MNT3ERR_NOENT = 2,
62 MNT3ERR_IO = 5,
63 MNT3ERR_ACCES = 13,
64 MNT3ERR_NOTDIR = 20,
65 MNT3ERR_INVAL = 22,
66 MNT3ERR_NAMETOOLONG = 63,
67 MNT3ERR_NOTSUPP = 10004,
68 MNT3ERR_SERVERFAULT = 10006,
69};
70typedef enum mountstat3 mountstat3;
71
72typedef struct mountbody *mountlist;
73
74struct mountbody {
75 name ml_hostname;
76 dirpath ml_directory;
77 mountlist ml_next;
78};
79typedef struct mountbody mountbody;
80
81typedef struct groupnode *groups;
82
83struct groupnode {
84 name gr_name;
85 groups gr_next;
86};
87typedef struct groupnode groupnode;
88
89typedef struct exportnode *exports;
90
91struct exportnode {
92 dirpath ex_dir;
93 groups ex_groups;
94 exports ex_next;
95};
96typedef struct exportnode exportnode;
97
98struct mountres3_ok {
99 fhandle3 fhandle;
100 struct {
101 u_int auth_flavors_len;
102 int *auth_flavors_val;
103 } auth_flavors;
104};
105typedef struct mountres3_ok mountres3_ok;
106
107struct mountres3 {
108 mountstat3 fhs_status;
109 union {
110 mountres3_ok mountinfo;
111 } mountres3_u;
112};
113typedef struct mountres3 mountres3;
114
115enum mountstat1 {
116 MNT1_OK = 0,
117 MNT1ERR_PERM = 1,
118 MNT1ERR_NOENT = 2,
119 MNT1ERR_IO = 5,
120 MNT1ERR_ACCES = 13,
121 MNT1ERR_NOTDIR = 20,
122 MNT1ERR_INVAL = 22,
123 MNT1ERR_NAMETOOLONG = 63,
124 MNT1ERR_NOTSUPP = 10004,
125 MNT1ERR_SERVERFAULT = 10006,
126};
127typedef enum mountstat1 mountstat1;
128#define FHSIZE 32
129
130typedef char fhandle1[FHSIZE];
131
132struct mountres1_ok {
133 fhandle1 fhandle;
134};
135typedef struct mountres1_ok mountres1_ok;
136
137struct mountres1 {
138 mountstat1 fhs_status;
139 union {
140 mountres1_ok mountinfo;
141 } mountres1_u;
142};
143typedef struct mountres1 mountres1;
144
145#define MOUNT_PROGRAM 100005
146#define MOUNT_V1 1
147
148#if defined(__STDC__) || defined(__cplusplus)
149#define MOUNT1_NULL 0
150extern void * mount1_null_1(void *, CLIENT *);
151extern void * mount1_null_1_svc(void *, struct svc_req *);
152#define MOUNT1_MNT 1
153extern mountres1 * mount1_mnt_1(dirpath *, CLIENT *);
154extern mountres1 * mount1_mnt_1_svc(dirpath *, struct svc_req *);
155#define MOUNT1_DUMP 2
156extern mountlist * mount1_dump_1(void *, CLIENT *);
157extern mountlist * mount1_dump_1_svc(void *, struct svc_req *);
158#define MOUNT1_UMNT 3
159extern void * mount1_umnt_1(dirpath *, CLIENT *);
160extern void * mount1_umnt_1_svc(dirpath *, struct svc_req *);
161#define MOUNT1_UMNTALL 4
162extern void * mount1_umntall_1(void *, CLIENT *);
163extern void * mount1_umntall_1_svc(void *, struct svc_req *);
164#define MOUNT1_EXPORT 5
165extern exports * mount1_export_1(void *, CLIENT *);
166extern exports * mount1_export_1_svc(void *, struct svc_req *);
167extern int mount_program_1_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
168
169#else /* K&R C */
170#define MOUNT1_NULL 0
171extern void * mount1_null_1();
172extern void * mount1_null_1_svc();
173#define MOUNT1_MNT 1
174extern mountres1 * mount1_mnt_1();
175extern mountres1 * mount1_mnt_1_svc();
176#define MOUNT1_DUMP 2
177extern mountlist * mount1_dump_1();
178extern mountlist * mount1_dump_1_svc();
179#define MOUNT1_UMNT 3
180extern void * mount1_umnt_1();
181extern void * mount1_umnt_1_svc();
182#define MOUNT1_UMNTALL 4
183extern void * mount1_umntall_1();
184extern void * mount1_umntall_1_svc();
185#define MOUNT1_EXPORT 5
186extern exports * mount1_export_1();
187extern exports * mount1_export_1_svc();
188extern int mount_program_1_freeresult ();
189#endif /* K&R C */
190#define MOUNT_V3 3
191
192#if defined(__STDC__) || defined(__cplusplus)
193#define MOUNT3_NULL 0
194extern void * mount3_null_3(void *, CLIENT *);
195extern void * mount3_null_3_svc(void *, struct svc_req *);
196#define MOUNT3_MNT 1
197extern mountres3 * mount3_mnt_3(dirpath *, CLIENT *);
198extern mountres3 * mount3_mnt_3_svc(dirpath *, struct svc_req *);
199#define MOUNT3_DUMP 2
200extern mountlist * mount3_dump_3(void *, CLIENT *);
201extern mountlist * mount3_dump_3_svc(void *, struct svc_req *);
202#define MOUNT3_UMNT 3
203extern void * mount3_umnt_3(dirpath *, CLIENT *);
204extern void * mount3_umnt_3_svc(dirpath *, struct svc_req *);
205#define MOUNT3_UMNTALL 4
206extern void * mount3_umntall_3(void *, CLIENT *);
207extern void * mount3_umntall_3_svc(void *, struct svc_req *);
208#define MOUNT3_EXPORT 5
209extern exports * mount3_export_3(void *, CLIENT *);
210extern exports * mount3_export_3_svc(void *, struct svc_req *);
211extern int mount_program_3_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
212
213#else /* K&R C */
214#define MOUNT3_NULL 0
215extern void * mount3_null_3();
216extern void * mount3_null_3_svc();
217#define MOUNT3_MNT 1
218extern mountres3 * mount3_mnt_3();
219extern mountres3 * mount3_mnt_3_svc();
220#define MOUNT3_DUMP 2
221extern mountlist * mount3_dump_3();
222extern mountlist * mount3_dump_3_svc();
223#define MOUNT3_UMNT 3
224extern void * mount3_umnt_3();
225extern void * mount3_umnt_3_svc();
226#define MOUNT3_UMNTALL 4
227extern void * mount3_umntall_3();
228extern void * mount3_umntall_3_svc();
229#define MOUNT3_EXPORT 5
230extern exports * mount3_export_3();
231extern exports * mount3_export_3_svc();
232extern int mount_program_3_freeresult ();
233#endif /* K&R C */
234
235/* the zdr functions */
236
237#if defined(__STDC__) || defined(__cplusplus)
238extern bool_t zdr_fhandle3 (ZDR *, fhandle3*);
239extern bool_t zdr_dirpath (ZDR *, dirpath*);
240extern bool_t zdr_name (ZDR *, name*);
241extern bool_t zdr_mountstat3 (ZDR *, mountstat3*);
242extern bool_t zdr_mountlist (ZDR *, mountlist*);
243extern bool_t zdr_mountbody (ZDR *, mountbody*);
244extern bool_t zdr_groups (ZDR *, groups*);
245extern bool_t zdr_groupnode (ZDR *, groupnode*);
246extern bool_t zdr_exports (ZDR *, exports*);
247extern bool_t zdr_exportnode (ZDR *, exportnode*);
248extern bool_t zdr_mountres3_ok (ZDR *, mountres3_ok*);
249extern bool_t zdr_mountres3 (ZDR *, mountres3*);
250extern bool_t zdr_mountstat1 (ZDR *, mountstat1*);
251extern bool_t zdr_fhandle1 (ZDR *, fhandle1);
252extern bool_t zdr_mountres1_ok (ZDR *, mountres1_ok*);
253extern bool_t zdr_mountres1 (ZDR *, mountres1*);
254
255#else /* K&R C */
256extern bool_t zdr_fhandle3 ();
257extern bool_t zdr_dirpath ();
258extern bool_t zdr_name ();
259extern bool_t zdr_mountstat3 ();
260extern bool_t zdr_mountlist ();
261extern bool_t zdr_mountbody ();
262extern bool_t zdr_groups ();
263extern bool_t zdr_groupnode ();
264extern bool_t zdr_exports ();
265extern bool_t zdr_exportnode ();
266extern bool_t zdr_mountres3_ok ();
267extern bool_t zdr_mountres3 ();
268extern bool_t zdr_mountstat1 ();
269extern bool_t zdr_fhandle1 ();
270extern bool_t zdr_mountres1_ok ();
271extern bool_t zdr_mountres1 ();
272
273#endif /* K&R C */
274
275#ifdef __cplusplus
276}
277#endif
278
279#endif /* !_MOUNT_H_RPCGEN */