Imported Upstream version 1.9.4
[deb_libnfs.git] / portmap / libnfs-raw-portmap.h
1 /*
2 Copyright (c) 2014, Ronnie Sahlberg
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. 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
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON 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
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25 The views and conclusions contained in the software and documentation are those
26 of the authors and should not be interpreted as representing official policies,
27 either expressed or implied, of the FreeBSD Project.
28 */
29
30 /*
31 * Please do not edit this file.
32 * It was generated using rpcgen.
33 */
34
35 #ifndef _PORTMAP_H_RPCGEN
36 #define _PORTMAP_H_RPCGEN
37
38
39
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 #define PMAP_PORT 111
46
47 struct pmap2_mapping {
48 u_int prog;
49 u_int vers;
50 u_int prot;
51 u_int port;
52 };
53 typedef struct pmap2_mapping pmap2_mapping;
54
55 struct pmap2_call_args {
56 u_int prog;
57 u_int vers;
58 u_int proc;
59 struct {
60 u_int args_len;
61 char *args_val;
62 } args;
63 };
64 typedef struct pmap2_call_args pmap2_call_args;
65
66 struct pmap2_call_result {
67 u_int port;
68 struct {
69 u_int res_len;
70 char *res_val;
71 } res;
72 };
73 typedef struct pmap2_call_result pmap2_call_result;
74
75 struct pmap2_mapping_list {
76 pmap2_mapping map;
77 struct pmap2_mapping_list *next;
78 };
79 typedef struct pmap2_mapping_list pmap2_mapping_list;
80
81 struct pmap2_dump_result {
82 struct pmap2_mapping_list *list;
83 };
84 typedef struct pmap2_dump_result pmap2_dump_result;
85
86 struct pmap3_string_result {
87 char *addr;
88 };
89 typedef struct pmap3_string_result pmap3_string_result;
90
91 struct pmap3_mapping {
92 u_int prog;
93 u_int vers;
94 char *netid;
95 char *addr;
96 char *owner;
97 };
98 typedef struct pmap3_mapping pmap3_mapping;
99
100 struct pmap3_mapping_list {
101 pmap3_mapping map;
102 struct pmap3_mapping_list *next;
103 };
104 typedef struct pmap3_mapping_list pmap3_mapping_list;
105
106 struct pmap3_dump_result {
107 struct pmap3_mapping_list *list;
108 };
109 typedef struct pmap3_dump_result pmap3_dump_result;
110
111 struct pmap3_call_args {
112 u_int prog;
113 u_int vers;
114 u_int proc;
115 struct {
116 u_int args_len;
117 char *args_val;
118 } args;
119 };
120 typedef struct pmap3_call_args pmap3_call_args;
121
122 struct pmap3_call_result {
123 u_int port;
124 struct {
125 u_int res_len;
126 char *res_val;
127 } res;
128 };
129 typedef struct pmap3_call_result pmap3_call_result;
130
131 struct pmap3_netbuf {
132 u_int maxlen;
133 struct {
134 u_int buf_len;
135 char *buf_val;
136 } buf;
137 };
138 typedef struct pmap3_netbuf pmap3_netbuf;
139
140 #define PMAP_PROGRAM 100000
141 #define PMAP_V2 2
142
143 #if defined(__STDC__) || defined(__cplusplus)
144 #define PMAP2_NULL 0
145 extern void * pmap2_null_2(void *, CLIENT *);
146 extern void * pmap2_null_2_svc(void *, struct svc_req *);
147 #define PMAP2_SET 1
148 extern bool_t * pmap2_set_2(pmap2_mapping *, CLIENT *);
149 extern bool_t * pmap2_set_2_svc(pmap2_mapping *, struct svc_req *);
150 #define PMAP2_UNSET 2
151 extern bool_t * pmap2_unset_2(pmap2_mapping *, CLIENT *);
152 extern bool_t * pmap2_unset_2_svc(pmap2_mapping *, struct svc_req *);
153 #define PMAP2_GETPORT 3
154 extern u_int * pmap2_getport_2(pmap2_mapping *, CLIENT *);
155 extern u_int * pmap2_getport_2_svc(pmap2_mapping *, struct svc_req *);
156 #define PMAP2_DUMP 4
157 extern pmap2_dump_result * pmap2_dump_2(void *, CLIENT *);
158 extern pmap2_dump_result * pmap2_dump_2_svc(void *, struct svc_req *);
159 #define PMAP2_CALLIT 5
160 extern pmap2_call_result * pmap2_callit_2(pmap2_call_args *, CLIENT *);
161 extern pmap2_call_result * pmap2_callit_2_svc(pmap2_call_args *, struct svc_req *);
162 extern int pmap_program_2_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
163
164 #else /* K&R C */
165 #define PMAP2_NULL 0
166 extern void * pmap2_null_2();
167 extern void * pmap2_null_2_svc();
168 #define PMAP2_SET 1
169 extern bool_t * pmap2_set_2();
170 extern bool_t * pmap2_set_2_svc();
171 #define PMAP2_UNSET 2
172 extern bool_t * pmap2_unset_2();
173 extern bool_t * pmap2_unset_2_svc();
174 #define PMAP2_GETPORT 3
175 extern u_int * pmap2_getport_2();
176 extern u_int * pmap2_getport_2_svc();
177 #define PMAP2_DUMP 4
178 extern pmap2_dump_result * pmap2_dump_2();
179 extern pmap2_dump_result * pmap2_dump_2_svc();
180 #define PMAP2_CALLIT 5
181 extern pmap2_call_result * pmap2_callit_2();
182 extern pmap2_call_result * pmap2_callit_2_svc();
183 extern int pmap_program_2_freeresult ();
184 #endif /* K&R C */
185 #define PMAP_V3 3
186
187 #if defined(__STDC__) || defined(__cplusplus)
188 #define PMAP3_NULL 0
189 extern void * pmap3_null_3(void *, CLIENT *);
190 extern void * pmap3_null_3_svc(void *, struct svc_req *);
191 #define PMAP3_SET 1
192 extern bool_t * pmap3_set_3(pmap3_mapping *, CLIENT *);
193 extern bool_t * pmap3_set_3_svc(pmap3_mapping *, struct svc_req *);
194 #define PMAP3_UNSET 2
195 extern bool_t * pmap3_unset_3(pmap3_mapping *, CLIENT *);
196 extern bool_t * pmap3_unset_3_svc(pmap3_mapping *, struct svc_req *);
197 #define PMAP3_GETADDR 3
198 extern pmap3_string_result * pmap3_getaddr_3(pmap3_mapping *, CLIENT *);
199 extern pmap3_string_result * pmap3_getaddr_3_svc(pmap3_mapping *, struct svc_req *);
200 #define PMAP3_DUMP 4
201 extern pmap3_dump_result * pmap3_dump_3(void *, CLIENT *);
202 extern pmap3_dump_result * pmap3_dump_3_svc(void *, struct svc_req *);
203 #define PMAP3_CALLIT 5
204 extern pmap3_call_result * pmap3_callit_3(pmap3_call_args *, CLIENT *);
205 extern pmap3_call_result * pmap3_callit_3_svc(pmap3_call_args *, struct svc_req *);
206 #define PMAP3_GETTIME 6
207 extern u_int * pmap3_gettime_3(void *, CLIENT *);
208 extern u_int * pmap3_gettime_3_svc(void *, struct svc_req *);
209 #define PMAP3_UADDR2TADDR 7
210 extern pmap3_netbuf * pmap3_uaddr2taddr_3(char **, CLIENT *);
211 extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc(char **, struct svc_req *);
212 #define PMAP3_TADDR2UADDR 8
213 extern struct pmap3_string_result * pmap3_taddr2uaddr_3(pmap3_netbuf *, CLIENT *);
214 extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc(pmap3_netbuf *, struct svc_req *);
215 extern int pmap_program_3_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
216
217 #else /* K&R C */
218 #define PMAP3_NULL 0
219 extern void * pmap3_null_3();
220 extern void * pmap3_null_3_svc();
221 #define PMAP3_SET 1
222 extern bool_t * pmap3_set_3();
223 extern bool_t * pmap3_set_3_svc();
224 #define PMAP3_UNSET 2
225 extern bool_t * pmap3_unset_3();
226 extern bool_t * pmap3_unset_3_svc();
227 #define PMAP3_GETADDR 3
228 extern pmap3_string_result * pmap3_getaddr_3();
229 extern pmap3_string_result * pmap3_getaddr_3_svc();
230 #define PMAP3_DUMP 4
231 extern pmap3_dump_result * pmap3_dump_3();
232 extern pmap3_dump_result * pmap3_dump_3_svc();
233 #define PMAP3_CALLIT 5
234 extern pmap3_call_result * pmap3_callit_3();
235 extern pmap3_call_result * pmap3_callit_3_svc();
236 #define PMAP3_GETTIME 6
237 extern u_int * pmap3_gettime_3();
238 extern u_int * pmap3_gettime_3_svc();
239 #define PMAP3_UADDR2TADDR 7
240 extern pmap3_netbuf * pmap3_uaddr2taddr_3();
241 extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc();
242 #define PMAP3_TADDR2UADDR 8
243 extern struct pmap3_string_result * pmap3_taddr2uaddr_3();
244 extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc();
245 extern int pmap_program_3_freeresult ();
246 #endif /* K&R C */
247
248 /* the zdr functions */
249
250 #if defined(__STDC__) || defined(__cplusplus)
251 extern bool_t zdr_pmap2_mapping (ZDR *, pmap2_mapping*);
252 extern bool_t zdr_pmap2_call_args (ZDR *, pmap2_call_args*);
253 extern bool_t zdr_pmap2_call_result (ZDR *, pmap2_call_result*);
254 extern bool_t zdr_pmap2_mapping_list (ZDR *, pmap2_mapping_list*);
255 extern bool_t zdr_pmap2_dump_result (ZDR *, pmap2_dump_result*);
256 extern bool_t zdr_pmap3_string_result (ZDR *, pmap3_string_result*);
257 extern bool_t zdr_pmap3_mapping (ZDR *, pmap3_mapping*);
258 extern bool_t zdr_pmap3_mapping_list (ZDR *, pmap3_mapping_list*);
259 extern bool_t zdr_pmap3_dump_result (ZDR *, pmap3_dump_result*);
260 extern bool_t zdr_pmap3_call_args (ZDR *, pmap3_call_args*);
261 extern bool_t zdr_pmap3_call_result (ZDR *, pmap3_call_result*);
262 extern bool_t zdr_pmap3_netbuf (ZDR *, pmap3_netbuf*);
263
264 #else /* K&R C */
265 extern bool_t zdr_pmap2_mapping ();
266 extern bool_t zdr_pmap2_call_args ();
267 extern bool_t zdr_pmap2_call_result ();
268 extern bool_t zdr_pmap2_mapping_list ();
269 extern bool_t zdr_pmap2_dump_result ();
270 extern bool_t zdr_pmap3_string_result ();
271 extern bool_t zdr_pmap3_mapping ();
272 extern bool_t zdr_pmap3_mapping_list ();
273 extern bool_t zdr_pmap3_dump_result ();
274 extern bool_t zdr_pmap3_call_args ();
275 extern bool_t zdr_pmap3_call_result ();
276 extern bool_t zdr_pmap3_netbuf ();
277
278 #endif /* K&R C */
279
280 #ifdef __cplusplus
281 }
282 #endif
283
284 #endif /* !_PORTMAP_H_RPCGEN */