Add myself for packaging copyright and some minor tweaks
[deb_libnfs.git] / portmap / libnfs-raw-portmap.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 _PORTMAP_H_RPCGEN
36#define _PORTMAP_H_RPCGEN
37
38
39
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45#define PMAP_PORT 111
46
f1f22dbf 47struct pmap2_mapping {
ee872606
RRS
48 u_int prog;
49 u_int vers;
50 u_int prot;
51 u_int port;
52};
f1f22dbf 53typedef struct pmap2_mapping pmap2_mapping;
ee872606 54
f1f22dbf 55struct pmap2_call_args {
ee872606
RRS
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};
f1f22dbf 64typedef struct pmap2_call_args pmap2_call_args;
ee872606 65
f1f22dbf 66struct pmap2_call_result {
ee872606
RRS
67 u_int port;
68 struct {
69 u_int res_len;
70 char *res_val;
71 } res;
72};
f1f22dbf
RRS
73typedef struct pmap2_call_result pmap2_call_result;
74
75struct pmap2_mapping_list {
76 pmap2_mapping map;
77 struct pmap2_mapping_list *next;
78};
79typedef struct pmap2_mapping_list pmap2_mapping_list;
80
81struct pmap2_dump_result {
82 struct pmap2_mapping_list *list;
83};
84typedef struct pmap2_dump_result pmap2_dump_result;
85
86struct pmap3_string_result {
87 char *addr;
88};
89typedef struct pmap3_string_result pmap3_string_result;
90
91struct pmap3_mapping {
92 u_int prog;
93 u_int vers;
94 char *netid;
95 char *addr;
96 char *owner;
97};
98typedef struct pmap3_mapping pmap3_mapping;
99
100struct pmap3_mapping_list {
101 pmap3_mapping map;
102 struct pmap3_mapping_list *next;
103};
104typedef struct pmap3_mapping_list pmap3_mapping_list;
105
106struct pmap3_dump_result {
107 struct pmap3_mapping_list *list;
108};
109typedef struct pmap3_dump_result pmap3_dump_result;
ee872606 110
f1f22dbf
RRS
111struct 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};
120typedef struct pmap3_call_args pmap3_call_args;
121
122struct pmap3_call_result {
123 u_int port;
124 struct {
125 u_int res_len;
126 char *res_val;
127 } res;
ee872606 128};
f1f22dbf 129typedef struct pmap3_call_result pmap3_call_result;
ee872606 130
f1f22dbf
RRS
131struct pmap3_netbuf {
132 u_int maxlen;
133 struct {
134 u_int buf_len;
135 char *buf_val;
136 } buf;
ee872606 137};
f1f22dbf 138typedef struct pmap3_netbuf pmap3_netbuf;
ee872606
RRS
139
140#define PMAP_PROGRAM 100000
141#define PMAP_V2 2
142
143#if defined(__STDC__) || defined(__cplusplus)
f1f22dbf
RRS
144#define PMAP2_NULL 0
145extern void * pmap2_null_2(void *, CLIENT *);
146extern void * pmap2_null_2_svc(void *, struct svc_req *);
147#define PMAP2_SET 1
148extern bool_t * pmap2_set_2(pmap2_mapping *, CLIENT *);
149extern bool_t * pmap2_set_2_svc(pmap2_mapping *, struct svc_req *);
150#define PMAP2_UNSET 2
151extern bool_t * pmap2_unset_2(pmap2_mapping *, CLIENT *);
152extern bool_t * pmap2_unset_2_svc(pmap2_mapping *, struct svc_req *);
153#define PMAP2_GETPORT 3
154extern u_int * pmap2_getport_2(pmap2_mapping *, CLIENT *);
155extern u_int * pmap2_getport_2_svc(pmap2_mapping *, struct svc_req *);
156#define PMAP2_DUMP 4
157extern pmap2_dump_result * pmap2_dump_2(void *, CLIENT *);
158extern pmap2_dump_result * pmap2_dump_2_svc(void *, struct svc_req *);
159#define PMAP2_CALLIT 5
160extern pmap2_call_result * pmap2_callit_2(pmap2_call_args *, CLIENT *);
161extern pmap2_call_result * pmap2_callit_2_svc(pmap2_call_args *, struct svc_req *);
ee872606
RRS
162extern int pmap_program_2_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
163
164#else /* K&R C */
f1f22dbf
RRS
165#define PMAP2_NULL 0
166extern void * pmap2_null_2();
167extern void * pmap2_null_2_svc();
168#define PMAP2_SET 1
169extern bool_t * pmap2_set_2();
170extern bool_t * pmap2_set_2_svc();
171#define PMAP2_UNSET 2
172extern bool_t * pmap2_unset_2();
173extern bool_t * pmap2_unset_2_svc();
174#define PMAP2_GETPORT 3
175extern u_int * pmap2_getport_2();
176extern u_int * pmap2_getport_2_svc();
177#define PMAP2_DUMP 4
178extern pmap2_dump_result * pmap2_dump_2();
179extern pmap2_dump_result * pmap2_dump_2_svc();
180#define PMAP2_CALLIT 5
181extern pmap2_call_result * pmap2_callit_2();
182extern pmap2_call_result * pmap2_callit_2_svc();
ee872606
RRS
183extern int pmap_program_2_freeresult ();
184#endif /* K&R C */
f1f22dbf
RRS
185#define PMAP_V3 3
186
187#if defined(__STDC__) || defined(__cplusplus)
188#define PMAP3_NULL 0
189extern void * pmap3_null_3(void *, CLIENT *);
190extern void * pmap3_null_3_svc(void *, struct svc_req *);
191#define PMAP3_SET 1
192extern bool_t * pmap3_set_3(pmap3_mapping *, CLIENT *);
193extern bool_t * pmap3_set_3_svc(pmap3_mapping *, struct svc_req *);
194#define PMAP3_UNSET 2
195extern bool_t * pmap3_unset_3(pmap3_mapping *, CLIENT *);
196extern bool_t * pmap3_unset_3_svc(pmap3_mapping *, struct svc_req *);
197#define PMAP3_GETADDR 3
198extern pmap3_string_result * pmap3_getaddr_3(pmap3_mapping *, CLIENT *);
199extern pmap3_string_result * pmap3_getaddr_3_svc(pmap3_mapping *, struct svc_req *);
200#define PMAP3_DUMP 4
201extern pmap3_dump_result * pmap3_dump_3(void *, CLIENT *);
202extern pmap3_dump_result * pmap3_dump_3_svc(void *, struct svc_req *);
203#define PMAP3_CALLIT 5
204extern pmap3_call_result * pmap3_callit_3(pmap3_call_args *, CLIENT *);
205extern pmap3_call_result * pmap3_callit_3_svc(pmap3_call_args *, struct svc_req *);
206#define PMAP3_GETTIME 6
207extern u_int * pmap3_gettime_3(void *, CLIENT *);
208extern u_int * pmap3_gettime_3_svc(void *, struct svc_req *);
209#define PMAP3_UADDR2TADDR 7
210extern pmap3_netbuf * pmap3_uaddr2taddr_3(char **, CLIENT *);
211extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc(char **, struct svc_req *);
212#define PMAP3_TADDR2UADDR 8
213extern struct pmap3_string_result * pmap3_taddr2uaddr_3(pmap3_netbuf *, CLIENT *);
214extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc(pmap3_netbuf *, struct svc_req *);
215extern int pmap_program_3_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
216
217#else /* K&R C */
218#define PMAP3_NULL 0
219extern void * pmap3_null_3();
220extern void * pmap3_null_3_svc();
221#define PMAP3_SET 1
222extern bool_t * pmap3_set_3();
223extern bool_t * pmap3_set_3_svc();
224#define PMAP3_UNSET 2
225extern bool_t * pmap3_unset_3();
226extern bool_t * pmap3_unset_3_svc();
227#define PMAP3_GETADDR 3
228extern pmap3_string_result * pmap3_getaddr_3();
229extern pmap3_string_result * pmap3_getaddr_3_svc();
230#define PMAP3_DUMP 4
231extern pmap3_dump_result * pmap3_dump_3();
232extern pmap3_dump_result * pmap3_dump_3_svc();
233#define PMAP3_CALLIT 5
234extern pmap3_call_result * pmap3_callit_3();
235extern pmap3_call_result * pmap3_callit_3_svc();
236#define PMAP3_GETTIME 6
237extern u_int * pmap3_gettime_3();
238extern u_int * pmap3_gettime_3_svc();
239#define PMAP3_UADDR2TADDR 7
240extern pmap3_netbuf * pmap3_uaddr2taddr_3();
241extern pmap3_netbuf * pmap3_uaddr2taddr_3_svc();
242#define PMAP3_TADDR2UADDR 8
243extern struct pmap3_string_result * pmap3_taddr2uaddr_3();
244extern struct pmap3_string_result * pmap3_taddr2uaddr_3_svc();
245extern int pmap_program_3_freeresult ();
246#endif /* K&R C */
ee872606
RRS
247
248/* the zdr functions */
249
250#if defined(__STDC__) || defined(__cplusplus)
f1f22dbf
RRS
251extern bool_t zdr_pmap2_mapping (ZDR *, pmap2_mapping*);
252extern bool_t zdr_pmap2_call_args (ZDR *, pmap2_call_args*);
253extern bool_t zdr_pmap2_call_result (ZDR *, pmap2_call_result*);
254extern bool_t zdr_pmap2_mapping_list (ZDR *, pmap2_mapping_list*);
255extern bool_t zdr_pmap2_dump_result (ZDR *, pmap2_dump_result*);
256extern bool_t zdr_pmap3_string_result (ZDR *, pmap3_string_result*);
257extern bool_t zdr_pmap3_mapping (ZDR *, pmap3_mapping*);
258extern bool_t zdr_pmap3_mapping_list (ZDR *, pmap3_mapping_list*);
259extern bool_t zdr_pmap3_dump_result (ZDR *, pmap3_dump_result*);
260extern bool_t zdr_pmap3_call_args (ZDR *, pmap3_call_args*);
261extern bool_t zdr_pmap3_call_result (ZDR *, pmap3_call_result*);
262extern bool_t zdr_pmap3_netbuf (ZDR *, pmap3_netbuf*);
ee872606
RRS
263
264#else /* K&R C */
f1f22dbf
RRS
265extern bool_t zdr_pmap2_mapping ();
266extern bool_t zdr_pmap2_call_args ();
267extern bool_t zdr_pmap2_call_result ();
268extern bool_t zdr_pmap2_mapping_list ();
269extern bool_t zdr_pmap2_dump_result ();
270extern bool_t zdr_pmap3_string_result ();
271extern bool_t zdr_pmap3_mapping ();
272extern bool_t zdr_pmap3_mapping_list ();
273extern bool_t zdr_pmap3_dump_result ();
274extern bool_t zdr_pmap3_call_args ();
275extern bool_t zdr_pmap3_call_result ();
276extern bool_t zdr_pmap3_netbuf ();
ee872606
RRS
277
278#endif /* K&R C */
279
280#ifdef __cplusplus
281}
282#endif
283
284#endif /* !_PORTMAP_H_RPCGEN */