Commit | Line | Data |
---|---|---|
a0c4ea7d RS |
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 | ||
763cd6e3 RS |
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 | ||
ea283cd7 | 38 | #include <nfsc/libnfs-zdr.h> |
8ae943f6 | 39 | |
763cd6e3 RS |
40 | |
41 | #ifdef __cplusplus | |
42 | extern "C" { | |
43 | #endif | |
44 | ||
45 | #define PMAP_PORT 111 | |
46 | ||
4edd7830 | 47 | struct pmap2_mapping { |
763cd6e3 RS |
48 | u_int prog; |
49 | u_int vers; | |
50 | u_int prot; | |
51 | u_int port; | |
52 | }; | |
4edd7830 | 53 | typedef struct pmap2_mapping pmap2_mapping; |
763cd6e3 | 54 | |
4edd7830 | 55 | struct pmap2_call_args { |
763cd6e3 RS |
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 | }; | |
4edd7830 | 64 | typedef struct pmap2_call_args pmap2_call_args; |
763cd6e3 | 65 | |
4edd7830 | 66 | struct pmap2_call_result { |
763cd6e3 RS |
67 | u_int port; |
68 | struct { | |
69 | u_int res_len; | |
70 | char *res_val; | |
71 | } res; | |
72 | }; | |
4edd7830 | 73 | typedef struct pmap2_call_result pmap2_call_result; |
763cd6e3 | 74 | |
4edd7830 RS |
75 | struct pmap2_mapping_list { |
76 | pmap2_mapping map; | |
77 | struct pmap2_mapping_list *next; | |
8ae943f6 | 78 | }; |
4edd7830 | 79 | typedef struct pmap2_mapping_list pmap2_mapping_list; |
8ae943f6 | 80 | |
4edd7830 RS |
81 | struct pmap2_dump_result { |
82 | struct pmap2_mapping_list *list; | |
8ae943f6 | 83 | }; |
4edd7830 RS |
84 | typedef struct pmap2_dump_result pmap2_dump_result; |
85 | ||
24f45c54 | 86 | struct pmap3_string_result { |
7fbedfde RS |
87 | char *addr; |
88 | }; | |
24f45c54 | 89 | typedef struct pmap3_string_result pmap3_string_result; |
7fbedfde | 90 | |
4edd7830 RS |
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; | |
8ae943f6 | 110 | |
b71f7e82 RS |
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 | ||
729266a7 RS |
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 | ||
763cd6e3 RS |
140 | #define PMAP_PROGRAM 100000 |
141 | #define PMAP_V2 2 | |
142 | ||
143 | #if defined(__STDC__) || defined(__cplusplus) | |
0f0e352f | 144 | #define PMAP2_NULL 0 |
ef1f8699 | 145 | extern void * pmap2_null_2(void *, void *); |
0f0e352f RS |
146 | extern void * pmap2_null_2_svc(void *, struct svc_req *); |
147 | #define PMAP2_SET 1 | |
af8d37c8 RS |
148 | extern uint32_t * pmap2_set_2(pmap2_mapping *, void *); |
149 | extern uint32_t * pmap2_set_2_svc(pmap2_mapping *, struct svc_req *); | |
0f0e352f | 150 | #define PMAP2_UNSET 2 |
af8d37c8 RS |
151 | extern uint32_t * pmap2_unset_2(pmap2_mapping *, void *); |
152 | extern uint32_t * pmap2_unset_2_svc(pmap2_mapping *, struct svc_req *); | |
0f0e352f | 153 | #define PMAP2_GETPORT 3 |
ef1f8699 | 154 | extern u_int * pmap2_getport_2(pmap2_mapping *, void *); |
4edd7830 | 155 | extern u_int * pmap2_getport_2_svc(pmap2_mapping *, struct svc_req *); |
0f0e352f | 156 | #define PMAP2_DUMP 4 |
ef1f8699 | 157 | extern pmap2_dump_result * pmap2_dump_2(void *, void *); |
4edd7830 | 158 | extern pmap2_dump_result * pmap2_dump_2_svc(void *, struct svc_req *); |
0f0e352f | 159 | #define PMAP2_CALLIT 5 |
ef1f8699 | 160 | extern pmap2_call_result * pmap2_callit_2(pmap2_call_args *, void *); |
4edd7830 | 161 | extern pmap2_call_result * pmap2_callit_2_svc(pmap2_call_args *, struct svc_req *); |
d663ff20 | 162 | extern int pmap_program_2_freeresult (void *, zdrproc_t, caddr_t); |
763cd6e3 RS |
163 | |
164 | #else /* K&R C */ | |
0f0e352f RS |
165 | #define PMAP2_NULL 0 |
166 | extern void * pmap2_null_2(); | |
167 | extern void * pmap2_null_2_svc(); | |
168 | #define PMAP2_SET 1 | |
af8d37c8 RS |
169 | extern uint32_t * pmap2_set_2(); |
170 | extern uint32_t * pmap2_set_2_svc(); | |
0f0e352f | 171 | #define PMAP2_UNSET 2 |
af8d37c8 RS |
172 | extern uint32_t * pmap2_unset_2(); |
173 | extern uint32_t * pmap2_unset_2_svc(); | |
0f0e352f RS |
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 | |
4edd7830 RS |
178 | extern pmap2_dump_result * pmap2_dump_2(); |
179 | extern pmap2_dump_result * pmap2_dump_2_svc(); | |
0f0e352f | 180 | #define PMAP2_CALLIT 5 |
4edd7830 RS |
181 | extern pmap2_call_result * pmap2_callit_2(); |
182 | extern pmap2_call_result * pmap2_callit_2_svc(); | |
763cd6e3 RS |
183 | extern int pmap_program_2_freeresult (); |
184 | #endif /* K&R C */ | |
4edd7830 RS |
185 | #define PMAP_V3 3 |
186 | ||
187 | #if defined(__STDC__) || defined(__cplusplus) | |
188 | #define PMAP3_NULL 0 | |
ef1f8699 | 189 | extern void * pmap3_null_3(void *, void *); |
4edd7830 | 190 | extern void * pmap3_null_3_svc(void *, struct svc_req *); |
d731e94c | 191 | #define PMAP3_SET 1 |
af8d37c8 RS |
192 | extern uint32_t * pmap3_set_3(pmap3_mapping *, void *); |
193 | extern uint32_t * pmap3_set_3_svc(pmap3_mapping *, struct svc_req *); | |
d731e94c | 194 | #define PMAP3_UNSET 2 |
af8d37c8 RS |
195 | extern uint32_t * pmap3_unset_3(pmap3_mapping *, void *); |
196 | extern uint32_t * pmap3_unset_3_svc(pmap3_mapping *, struct svc_req *); | |
7fbedfde | 197 | #define PMAP3_GETADDR 3 |
ef1f8699 | 198 | extern pmap3_string_result * pmap3_getaddr_3(pmap3_mapping *, void *); |
24f45c54 | 199 | extern pmap3_string_result * pmap3_getaddr_3_svc(pmap3_mapping *, struct svc_req *); |
4edd7830 | 200 | #define PMAP3_DUMP 4 |
ef1f8699 | 201 | extern pmap3_dump_result * pmap3_dump_3(void *, void *); |
4edd7830 | 202 | extern pmap3_dump_result * pmap3_dump_3_svc(void *, struct svc_req *); |
b71f7e82 | 203 | #define PMAP3_CALLIT 5 |
ef1f8699 | 204 | extern pmap3_call_result * pmap3_callit_3(pmap3_call_args *, void *); |
b71f7e82 | 205 | extern pmap3_call_result * pmap3_callit_3_svc(pmap3_call_args *, struct svc_req *); |
5245608a | 206 | #define PMAP3_GETTIME 6 |
ef1f8699 | 207 | extern u_int * pmap3_gettime_3(void *, void *); |
5245608a | 208 | extern u_int * pmap3_gettime_3_svc(void *, struct svc_req *); |
729266a7 | 209 | #define PMAP3_UADDR2TADDR 7 |
ef1f8699 | 210 | extern pmap3_netbuf * pmap3_uaddr2taddr_3(char **, void *); |
729266a7 | 211 | extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc(char **, struct svc_req *); |
29258a73 | 212 | #define PMAP3_TADDR2UADDR 8 |
ef1f8699 | 213 | extern struct pmap3_string_result * pmap3_taddr2uaddr_3(pmap3_netbuf *, void *); |
24f45c54 | 214 | extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc(pmap3_netbuf *, struct svc_req *); |
d663ff20 | 215 | extern int pmap_program_3_freeresult (void *, zdrproc_t, caddr_t); |
4edd7830 RS |
216 | |
217 | #else /* K&R C */ | |
218 | #define PMAP3_NULL 0 | |
219 | extern void * pmap3_null_3(); | |
220 | extern void * pmap3_null_3_svc(); | |
d731e94c | 221 | #define PMAP3_SET 1 |
af8d37c8 RS |
222 | extern uint32_t * pmap3_set_3(); |
223 | extern uint32_t * pmap3_set_3_svc(); | |
d731e94c | 224 | #define PMAP3_UNSET 2 |
af8d37c8 RS |
225 | extern uint32_t * pmap3_unset_3(); |
226 | extern uint32_t * pmap3_unset_3_svc(); | |
7fbedfde | 227 | #define PMAP3_GETADDR 3 |
24f45c54 RS |
228 | extern pmap3_string_result * pmap3_getaddr_3(); |
229 | extern pmap3_string_result * pmap3_getaddr_3_svc(); | |
4edd7830 RS |
230 | #define PMAP3_DUMP 4 |
231 | extern pmap3_dump_result * pmap3_dump_3(); | |
232 | extern pmap3_dump_result * pmap3_dump_3_svc(); | |
b71f7e82 RS |
233 | #define PMAP3_CALLIT 5 |
234 | extern pmap3_call_result * pmap3_callit_3(); | |
235 | extern pmap3_call_result * pmap3_callit_3_svc(); | |
5245608a RS |
236 | #define PMAP3_GETTIME 6 |
237 | extern u_int * pmap3_gettime_3(); | |
238 | extern u_int * pmap3_gettime_3_svc(); | |
729266a7 RS |
239 | #define PMAP3_UADDR2TADDR 7 |
240 | extern pmap3_netbuf * pmap3_uaddr2taddr_3(); | |
241 | extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc(); | |
29258a73 | 242 | #define PMAP3_TADDR2UADDR 8 |
24f45c54 RS |
243 | extern struct pmap3_string_result * pmap3_taddr2uaddr_3(); |
244 | extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc(); | |
4edd7830 RS |
245 | extern int pmap_program_3_freeresult (); |
246 | #endif /* K&R C */ | |
763cd6e3 RS |
247 | |
248 | /* the zdr functions */ | |
249 | ||
250 | #if defined(__STDC__) || defined(__cplusplus) | |
af8d37c8 RS |
251 | extern uint32_t zdr_pmap2_mapping (ZDR *, pmap2_mapping*); |
252 | extern uint32_t zdr_pmap2_call_args (ZDR *, pmap2_call_args*); | |
253 | extern uint32_t zdr_pmap2_call_result (ZDR *, pmap2_call_result*); | |
254 | extern uint32_t zdr_pmap2_mapping_list (ZDR *, pmap2_mapping_list*); | |
255 | extern uint32_t zdr_pmap2_dump_result (ZDR *, pmap2_dump_result*); | |
256 | extern uint32_t zdr_pmap3_string_result (ZDR *, pmap3_string_result*); | |
257 | extern uint32_t zdr_pmap3_mapping (ZDR *, pmap3_mapping*); | |
258 | extern uint32_t zdr_pmap3_mapping_list (ZDR *, pmap3_mapping_list*); | |
259 | extern uint32_t zdr_pmap3_dump_result (ZDR *, pmap3_dump_result*); | |
260 | extern uint32_t zdr_pmap3_call_args (ZDR *, pmap3_call_args*); | |
261 | extern uint32_t zdr_pmap3_call_result (ZDR *, pmap3_call_result*); | |
262 | extern uint32_t zdr_pmap3_netbuf (ZDR *, pmap3_netbuf*); | |
763cd6e3 RS |
263 | |
264 | #else /* K&R C */ | |
af8d37c8 RS |
265 | extern uint32_t zdr_pmap2_mapping (); |
266 | extern uint32_t zdr_pmap2_call_args (); | |
267 | extern uint32_t zdr_pmap2_call_result (); | |
268 | extern uint32_t zdr_pmap2_mapping_list (); | |
269 | extern uint32_t zdr_pmap2_dump_result (); | |
270 | extern uint32_t zdr_pmap3_string_result (); | |
271 | extern uint32_t zdr_pmap3_mapping (); | |
272 | extern uint32_t zdr_pmap3_mapping_list (); | |
273 | extern uint32_t zdr_pmap3_dump_result (); | |
274 | extern uint32_t zdr_pmap3_call_args (); | |
275 | extern uint32_t zdr_pmap3_call_result (); | |
276 | extern uint32_t zdr_pmap3_netbuf (); | |
763cd6e3 RS |
277 | |
278 | #endif /* K&R C */ | |
279 | ||
280 | #ifdef __cplusplus | |
281 | } | |
282 | #endif | |
283 | ||
284 | #endif /* !_PORTMAP_H_RPCGEN */ |