Merge pull request #43 from plieven/master
[deb_libnfs.git] / mount / libnfs-raw-mount.h
CommitLineData
763cd6e3
RS
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
e803ae57 9#include <nfsc/libnfs-zdr.h>
763cd6e3
RS
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#define MNTPATHLEN 1024
16#define MNTNAMLEN 255
17#define FHSIZE3 64
18
19typedef struct {
20 u_int fhandle3_len;
21 char *fhandle3_val;
22} fhandle3;
23
24typedef char *dirpath;
25
26typedef char *name;
27
28enum mountstat3 {
29 MNT3_OK = 0,
30 MNT3ERR_PERM = 1,
31 MNT3ERR_NOENT = 2,
32 MNT3ERR_IO = 5,
33 MNT3ERR_ACCES = 13,
34 MNT3ERR_NOTDIR = 20,
35 MNT3ERR_INVAL = 22,
36 MNT3ERR_NAMETOOLONG = 63,
37 MNT3ERR_NOTSUPP = 10004,
38 MNT3ERR_SERVERFAULT = 10006,
39};
40typedef enum mountstat3 mountstat3;
41
42typedef struct mountbody *mountlist;
43
44struct mountbody {
45 name ml_hostname;
46 dirpath ml_directory;
47 mountlist ml_next;
48};
49typedef struct mountbody mountbody;
50
51typedef struct groupnode *groups;
52
53struct groupnode {
54 name gr_name;
55 groups gr_next;
56};
57typedef struct groupnode groupnode;
58
59typedef struct exportnode *exports;
60
61struct exportnode {
62 dirpath ex_dir;
63 groups ex_groups;
64 exports ex_next;
65};
66typedef struct exportnode exportnode;
67
68struct mountres3_ok {
69 fhandle3 fhandle;
70 struct {
71 u_int auth_flavors_len;
72 int *auth_flavors_val;
73 } auth_flavors;
74};
75typedef struct mountres3_ok mountres3_ok;
76
77struct mountres3 {
78 mountstat3 fhs_status;
79 union {
80 mountres3_ok mountinfo;
81 } mountres3_u;
82};
83typedef struct mountres3 mountres3;
84
85enum mountstat1 {
86 MNT1_OK = 0,
87 MNT1ERR_PERM = 1,
88 MNT1ERR_NOENT = 2,
89 MNT1ERR_IO = 5,
90 MNT1ERR_ACCES = 13,
91 MNT1ERR_NOTDIR = 20,
92 MNT1ERR_INVAL = 22,
93 MNT1ERR_NAMETOOLONG = 63,
94 MNT1ERR_NOTSUPP = 10004,
95 MNT1ERR_SERVERFAULT = 10006,
96};
97typedef enum mountstat1 mountstat1;
98#define FHSIZE 32
99
100typedef char fhandle1[FHSIZE];
101
102struct mountres1_ok {
103 fhandle1 fhandle;
104};
105typedef struct mountres1_ok mountres1_ok;
106
107struct mountres1 {
108 mountstat1 fhs_status;
109 union {
110 mountres1_ok mountinfo;
111 } mountres1_u;
112};
113typedef struct mountres1 mountres1;
114
115#define MOUNT_PROGRAM 100005
116#define MOUNT_V1 1
117
118#if defined(__STDC__) || defined(__cplusplus)
119#define MOUNT1_NULL 0
120extern void * mount1_null_1(void *, CLIENT *);
121extern void * mount1_null_1_svc(void *, struct svc_req *);
122#define MOUNT1_MNT 1
123extern mountres1 * mount1_mnt_1(dirpath *, CLIENT *);
124extern mountres1 * mount1_mnt_1_svc(dirpath *, struct svc_req *);
125#define MOUNT1_DUMP 2
126extern mountlist * mount1_dump_1(void *, CLIENT *);
127extern mountlist * mount1_dump_1_svc(void *, struct svc_req *);
128#define MOUNT1_UMNT 3
129extern void * mount1_umnt_1(dirpath *, CLIENT *);
130extern void * mount1_umnt_1_svc(dirpath *, struct svc_req *);
131#define MOUNT1_UMNTALL 4
132extern void * mount1_umntall_1(void *, CLIENT *);
133extern void * mount1_umntall_1_svc(void *, struct svc_req *);
134#define MOUNT1_EXPORT 5
135extern exports * mount1_export_1(void *, CLIENT *);
136extern exports * mount1_export_1_svc(void *, struct svc_req *);
137extern int mount_program_1_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
138
139#else /* K&R C */
140#define MOUNT1_NULL 0
141extern void * mount1_null_1();
142extern void * mount1_null_1_svc();
143#define MOUNT1_MNT 1
144extern mountres1 * mount1_mnt_1();
145extern mountres1 * mount1_mnt_1_svc();
146#define MOUNT1_DUMP 2
147extern mountlist * mount1_dump_1();
148extern mountlist * mount1_dump_1_svc();
149#define MOUNT1_UMNT 3
150extern void * mount1_umnt_1();
151extern void * mount1_umnt_1_svc();
152#define MOUNT1_UMNTALL 4
153extern void * mount1_umntall_1();
154extern void * mount1_umntall_1_svc();
155#define MOUNT1_EXPORT 5
156extern exports * mount1_export_1();
157extern exports * mount1_export_1_svc();
158extern int mount_program_1_freeresult ();
159#endif /* K&R C */
160#define MOUNT_V3 3
161
162#if defined(__STDC__) || defined(__cplusplus)
163#define MOUNT3_NULL 0
164extern void * mount3_null_3(void *, CLIENT *);
165extern void * mount3_null_3_svc(void *, struct svc_req *);
166#define MOUNT3_MNT 1
167extern mountres3 * mount3_mnt_3(dirpath *, CLIENT *);
168extern mountres3 * mount3_mnt_3_svc(dirpath *, struct svc_req *);
169#define MOUNT3_DUMP 2
170extern mountlist * mount3_dump_3(void *, CLIENT *);
171extern mountlist * mount3_dump_3_svc(void *, struct svc_req *);
172#define MOUNT3_UMNT 3
173extern void * mount3_umnt_3(dirpath *, CLIENT *);
174extern void * mount3_umnt_3_svc(dirpath *, struct svc_req *);
175#define MOUNT3_UMNTALL 4
176extern void * mount3_umntall_3(void *, CLIENT *);
177extern void * mount3_umntall_3_svc(void *, struct svc_req *);
178#define MOUNT3_EXPORT 5
179extern exports * mount3_export_3(void *, CLIENT *);
180extern exports * mount3_export_3_svc(void *, struct svc_req *);
181extern int mount_program_3_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
182
183#else /* K&R C */
184#define MOUNT3_NULL 0
185extern void * mount3_null_3();
186extern void * mount3_null_3_svc();
187#define MOUNT3_MNT 1
188extern mountres3 * mount3_mnt_3();
189extern mountres3 * mount3_mnt_3_svc();
190#define MOUNT3_DUMP 2
191extern mountlist * mount3_dump_3();
192extern mountlist * mount3_dump_3_svc();
193#define MOUNT3_UMNT 3
194extern void * mount3_umnt_3();
195extern void * mount3_umnt_3_svc();
196#define MOUNT3_UMNTALL 4
197extern void * mount3_umntall_3();
198extern void * mount3_umntall_3_svc();
199#define MOUNT3_EXPORT 5
200extern exports * mount3_export_3();
201extern exports * mount3_export_3_svc();
202extern int mount_program_3_freeresult ();
203#endif /* K&R C */
204
205/* the zdr functions */
206
207#if defined(__STDC__) || defined(__cplusplus)
208extern bool_t zdr_fhandle3 (ZDR *, fhandle3*);
209extern bool_t zdr_dirpath (ZDR *, dirpath*);
210extern bool_t zdr_name (ZDR *, name*);
211extern bool_t zdr_mountstat3 (ZDR *, mountstat3*);
212extern bool_t zdr_mountlist (ZDR *, mountlist*);
213extern bool_t zdr_mountbody (ZDR *, mountbody*);
214extern bool_t zdr_groups (ZDR *, groups*);
215extern bool_t zdr_groupnode (ZDR *, groupnode*);
216extern bool_t zdr_exports (ZDR *, exports*);
217extern bool_t zdr_exportnode (ZDR *, exportnode*);
218extern bool_t zdr_mountres3_ok (ZDR *, mountres3_ok*);
219extern bool_t zdr_mountres3 (ZDR *, mountres3*);
220extern bool_t zdr_mountstat1 (ZDR *, mountstat1*);
221extern bool_t zdr_fhandle1 (ZDR *, fhandle1);
222extern bool_t zdr_mountres1_ok (ZDR *, mountres1_ok*);
223extern bool_t zdr_mountres1 (ZDR *, mountres1*);
224
225#else /* K&R C */
226extern bool_t zdr_fhandle3 ();
227extern bool_t zdr_dirpath ();
228extern bool_t zdr_name ();
229extern bool_t zdr_mountstat3 ();
230extern bool_t zdr_mountlist ();
231extern bool_t zdr_mountbody ();
232extern bool_t zdr_groups ();
233extern bool_t zdr_groupnode ();
234extern bool_t zdr_exports ();
235extern bool_t zdr_exportnode ();
236extern bool_t zdr_mountres3_ok ();
237extern bool_t zdr_mountres3 ();
238extern bool_t zdr_mountstat1 ();
239extern bool_t zdr_fhandle1 ();
240extern bool_t zdr_mountres1_ok ();
241extern bool_t zdr_mountres1 ();
242
243#endif /* K&R C */
244
245#ifdef __cplusplus
246}
247#endif
248
249#endif /* !_MOUNT_H_RPCGEN */