1 |
148 |
jeremybenn |
/*
|
2 |
|
|
* Please do not edit this file.
|
3 |
|
|
* It was generated using rpcgen.
|
4 |
|
|
*/
|
5 |
|
|
|
6 |
|
|
#ifndef _RPCB_PROT_H_RPCGEN
|
7 |
|
|
#define _RPCB_PROT_H_RPCGEN
|
8 |
|
|
|
9 |
|
|
#include <rpc/rpc.h>
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
#ifdef __cplusplus
|
13 |
|
|
extern "C" {
|
14 |
|
|
#endif
|
15 |
|
|
|
16 |
|
|
/*
|
17 |
|
|
* $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $
|
18 |
|
|
*
|
19 |
|
|
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
20 |
|
|
* unrestricted use provided that this legend is included on all tape
|
21 |
|
|
* media and as a part of the software program in whole or part. Users
|
22 |
|
|
* may copy or modify Sun RPC without charge, but are not authorized
|
23 |
|
|
* to license or distribute it to anyone else except as part of a product or
|
24 |
|
|
* program developed by the user.
|
25 |
|
|
*
|
26 |
|
|
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
27 |
|
|
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
28 |
|
|
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
29 |
|
|
*
|
30 |
|
|
* Sun RPC is provided with no support and without any obligation on the
|
31 |
|
|
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
32 |
|
|
* modification or enhancement.
|
33 |
|
|
*
|
34 |
|
|
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
35 |
|
|
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
36 |
|
|
* OR ANY PART THEREOF.
|
37 |
|
|
*
|
38 |
|
|
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
39 |
|
|
* or profits or other special, indirect and consequential damages, even if
|
40 |
|
|
* Sun has been advised of the possibility of such damages.
|
41 |
|
|
*
|
42 |
|
|
* Sun Microsystems, Inc.
|
43 |
|
|
* 2550 Garcia Avenue
|
44 |
|
|
* Mountain View, California 94043
|
45 |
|
|
*/
|
46 |
|
|
/*
|
47 |
|
|
* Copyright (c) 1988 by Sun Microsystems, Inc.
|
48 |
|
|
*/
|
49 |
|
|
/* from rpcb_prot.x */
|
50 |
|
|
|
51 |
|
|
/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */
|
52 |
|
|
|
53 |
|
|
#ifndef _KERNEL
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
/*
|
57 |
|
|
* The following procedures are supported by the protocol in version 3:
|
58 |
|
|
*
|
59 |
|
|
* RPCBPROC_NULL() returns ()
|
60 |
|
|
* takes nothing, returns nothing
|
61 |
|
|
*
|
62 |
|
|
* RPCBPROC_SET(rpcb) returns (bool_t)
|
63 |
|
|
* TRUE is success, FALSE is failure. Registers the tuple
|
64 |
|
|
* [prog, vers, address, owner, netid].
|
65 |
|
|
* Finds out owner and netid information on its own.
|
66 |
|
|
*
|
67 |
|
|
* RPCBPROC_UNSET(rpcb) returns (bool_t)
|
68 |
|
|
* TRUE is success, FALSE is failure. Un-registers tuple
|
69 |
|
|
* [prog, vers, netid]. addresses is ignored.
|
70 |
|
|
* If netid is NULL, unregister all.
|
71 |
|
|
*
|
72 |
|
|
* RPCBPROC_GETADDR(rpcb) returns (string).
|
73 |
|
|
* 0 is failure. Otherwise returns the universal address where the
|
74 |
|
|
* triple [prog, vers, netid] is registered. Ignore address and owner.
|
75 |
|
|
*
|
76 |
|
|
* RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
|
77 |
|
|
* used to dump the entire rpcbind maps
|
78 |
|
|
*
|
79 |
|
|
* RPCBPROC_CALLIT(rpcb_rmtcallargs)
|
80 |
|
|
* RETURNS (rpcb_rmtcallres);
|
81 |
|
|
* Calls the procedure on the remote machine. If it is not registered,
|
82 |
|
|
* this procedure is quiet; i.e. it does not return error information!!!
|
83 |
|
|
* This routine only passes null authentication parameters.
|
84 |
|
|
* It has no interface to xdr routines for RPCBPROC_CALLIT.
|
85 |
|
|
*
|
86 |
|
|
* RPCBPROC_GETTIME() returns (int).
|
87 |
|
|
* Gets the remote machines time
|
88 |
|
|
*
|
89 |
|
|
* RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
|
90 |
|
|
* Returns the netbuf address from universal address.
|
91 |
|
|
*
|
92 |
|
|
* RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
|
93 |
|
|
* Returns the universal address from netbuf address.
|
94 |
|
|
*
|
95 |
|
|
* END OF RPCBIND VERSION 3 PROCEDURES
|
96 |
|
|
*/
|
97 |
|
|
/*
|
98 |
|
|
* Except for RPCBPROC_CALLIT, the procedures above are carried over to
|
99 |
|
|
* rpcbind version 4. Those below are added or modified for version 4.
|
100 |
|
|
* NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
|
101 |
|
|
* AS RPCBPROC_CALLIT.
|
102 |
|
|
*
|
103 |
|
|
* RPCBPROC_BCAST(rpcb_rmtcallargs)
|
104 |
|
|
* RETURNS (rpcb_rmtcallres);
|
105 |
|
|
* Calls the procedure on the remote machine. If it is not registered,
|
106 |
|
|
* this procedure IS quiet; i.e. it DOES NOT return error information!!!
|
107 |
|
|
* This routine should be used for broadcasting and nothing else.
|
108 |
|
|
*
|
109 |
|
|
* RPCBPROC_GETVERSADDR(rpcb) returns (string).
|
110 |
|
|
* 0 is failure. Otherwise returns the universal address where the
|
111 |
|
|
* triple [prog, vers, netid] is registered. Ignore address and owner.
|
112 |
|
|
* Same as RPCBPROC_GETADDR except that if the given version number
|
113 |
|
|
* is not available, the address is not returned.
|
114 |
|
|
*
|
115 |
|
|
* RPCBPROC_INDIRECT(rpcb_rmtcallargs)
|
116 |
|
|
* RETURNS (rpcb_rmtcallres);
|
117 |
|
|
* Calls the procedure on the remote machine. If it is not registered,
|
118 |
|
|
* this procedure is NOT quiet; i.e. it DOES return error information!!!
|
119 |
|
|
* as any normal application would expect.
|
120 |
|
|
*
|
121 |
|
|
* RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
|
122 |
|
|
* Same as RPCBPROC_GETADDR except that it returns a list of all the
|
123 |
|
|
* addresses registered for the combination (prog, vers) (for all
|
124 |
|
|
* transports).
|
125 |
|
|
*
|
126 |
|
|
* RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
|
127 |
|
|
* Returns the statistics about the kind of requests received by rpcbind.
|
128 |
|
|
*/
|
129 |
|
|
|
130 |
|
|
/*
|
131 |
|
|
* A mapping of (program, version, network ID) to address
|
132 |
|
|
*/
|
133 |
|
|
|
134 |
|
|
struct rpcb {
|
135 |
|
|
rpcprog_t r_prog;
|
136 |
|
|
rpcvers_t r_vers;
|
137 |
|
|
char *r_netid;
|
138 |
|
|
char *r_addr;
|
139 |
|
|
char *r_owner;
|
140 |
|
|
};
|
141 |
|
|
typedef struct rpcb rpcb;
|
142 |
|
|
|
143 |
|
|
typedef rpcb RPCB;
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
/*
|
147 |
|
|
* A list of mappings
|
148 |
|
|
*
|
149 |
|
|
* Below are two definitions for the rpcblist structure. This is done because
|
150 |
|
|
* xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
|
151 |
|
|
* struct rpcblist * that rpcgen would produce. One version of the rpcblist
|
152 |
|
|
* structure (actually called rp__list) is used with rpcgen, and the other is
|
153 |
|
|
* defined only in the header file for compatibility with the specified
|
154 |
|
|
* interface.
|
155 |
|
|
*/
|
156 |
|
|
|
157 |
|
|
struct rp__list {
|
158 |
|
|
rpcb rpcb_map;
|
159 |
|
|
struct rp__list *rpcb_next;
|
160 |
|
|
};
|
161 |
|
|
typedef struct rp__list rp__list;
|
162 |
|
|
|
163 |
|
|
typedef rp__list *rpcblist_ptr;
|
164 |
|
|
|
165 |
|
|
typedef struct rp__list rpcblist;
|
166 |
|
|
typedef struct rp__list RPCBLIST;
|
167 |
|
|
|
168 |
|
|
#ifndef __cplusplus
|
169 |
|
|
struct rpcblist {
|
170 |
|
|
RPCB rpcb_map;
|
171 |
|
|
struct rpcblist *rpcb_next;
|
172 |
|
|
};
|
173 |
|
|
#endif
|
174 |
|
|
|
175 |
|
|
#ifdef __cplusplus
|
176 |
|
|
extern "C" {
|
177 |
|
|
#endif
|
178 |
|
|
extern bool_t xdr_rpcblist(XDR *, rpcblist**);
|
179 |
|
|
#ifdef __cplusplus
|
180 |
|
|
}
|
181 |
|
|
#endif
|
182 |
|
|
|
183 |
|
|
|
184 |
|
|
/*
|
185 |
|
|
* Arguments of remote calls
|
186 |
|
|
*/
|
187 |
|
|
|
188 |
|
|
struct rpcb_rmtcallargs {
|
189 |
|
|
rpcprog_t prog;
|
190 |
|
|
rpcvers_t vers;
|
191 |
|
|
rpcproc_t proc;
|
192 |
|
|
struct {
|
193 |
|
|
u_int args_len;
|
194 |
|
|
char *args_val;
|
195 |
|
|
} args;
|
196 |
|
|
};
|
197 |
|
|
typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
|
198 |
|
|
|
199 |
|
|
/*
|
200 |
|
|
* Client-side only representation of rpcb_rmtcallargs structure.
|
201 |
|
|
*
|
202 |
|
|
* The routine that XDRs the rpcb_rmtcallargs structure must deal with the
|
203 |
|
|
* opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to
|
204 |
|
|
* be passed the XDR routine that knows the args' structure. This routine
|
205 |
|
|
* doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
|
206 |
|
|
* the application being called already knows the args structure. So we use a
|
207 |
|
|
* different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
|
208 |
|
|
* includes the args' XDR routine.
|
209 |
|
|
*/
|
210 |
|
|
struct r_rpcb_rmtcallargs {
|
211 |
|
|
rpcprog_t prog;
|
212 |
|
|
rpcvers_t vers;
|
213 |
|
|
rpcproc_t proc;
|
214 |
|
|
struct {
|
215 |
|
|
u_int args_len;
|
216 |
|
|
char *args_val;
|
217 |
|
|
} args;
|
218 |
|
|
xdrproc_t xdr_args; /* encodes args */
|
219 |
|
|
};
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
/*
|
223 |
|
|
* Results of the remote call
|
224 |
|
|
*/
|
225 |
|
|
|
226 |
|
|
struct rpcb_rmtcallres {
|
227 |
|
|
char *addr;
|
228 |
|
|
struct {
|
229 |
|
|
u_int results_len;
|
230 |
|
|
char *results_val;
|
231 |
|
|
} results;
|
232 |
|
|
};
|
233 |
|
|
typedef struct rpcb_rmtcallres rpcb_rmtcallres;
|
234 |
|
|
|
235 |
|
|
/*
|
236 |
|
|
* Client-side only representation of rpcb_rmtcallres structure.
|
237 |
|
|
*/
|
238 |
|
|
struct r_rpcb_rmtcallres {
|
239 |
|
|
char *addr;
|
240 |
|
|
struct {
|
241 |
|
|
u_int32_t results_len;
|
242 |
|
|
char *results_val;
|
243 |
|
|
} results;
|
244 |
|
|
xdrproc_t xdr_res; /* decodes results */
|
245 |
|
|
};
|
246 |
|
|
|
247 |
|
|
/*
|
248 |
|
|
* rpcb_entry contains a merged address of a service on a particular
|
249 |
|
|
* transport, plus associated netconfig information. A list of rpcb_entrys
|
250 |
|
|
* is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used
|
251 |
|
|
* in r_nc_* fields.
|
252 |
|
|
*/
|
253 |
|
|
|
254 |
|
|
struct rpcb_entry {
|
255 |
|
|
char *r_maddr;
|
256 |
|
|
char *r_nc_netid;
|
257 |
|
|
u_int r_nc_semantics;
|
258 |
|
|
char *r_nc_protofmly;
|
259 |
|
|
char *r_nc_proto;
|
260 |
|
|
};
|
261 |
|
|
typedef struct rpcb_entry rpcb_entry;
|
262 |
|
|
|
263 |
|
|
/*
|
264 |
|
|
* A list of addresses supported by a service.
|
265 |
|
|
*/
|
266 |
|
|
|
267 |
|
|
struct rpcb_entry_list {
|
268 |
|
|
rpcb_entry rpcb_entry_map;
|
269 |
|
|
struct rpcb_entry_list *rpcb_entry_next;
|
270 |
|
|
};
|
271 |
|
|
typedef struct rpcb_entry_list rpcb_entry_list;
|
272 |
|
|
|
273 |
|
|
typedef rpcb_entry_list *rpcb_entry_list_ptr;
|
274 |
|
|
|
275 |
|
|
/*
|
276 |
|
|
* rpcbind statistics
|
277 |
|
|
*/
|
278 |
|
|
|
279 |
|
|
#define rpcb_highproc_2 RPCBPROC_CALLIT
|
280 |
|
|
#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
|
281 |
|
|
#define rpcb_highproc_4 RPCBPROC_GETSTAT
|
282 |
|
|
#define RPCBSTAT_HIGHPROC 13
|
283 |
|
|
#define RPCBVERS_STAT 3
|
284 |
|
|
#define RPCBVERS_4_STAT 2
|
285 |
|
|
#define RPCBVERS_3_STAT 1
|
286 |
|
|
#define RPCBVERS_2_STAT 0
|
287 |
|
|
|
288 |
|
|
/* Link list of all the stats about getport and getaddr */
|
289 |
|
|
|
290 |
|
|
struct rpcbs_addrlist {
|
291 |
|
|
rpcprog_t prog;
|
292 |
|
|
rpcvers_t vers;
|
293 |
|
|
int success;
|
294 |
|
|
int failure;
|
295 |
|
|
char *netid;
|
296 |
|
|
struct rpcbs_addrlist *next;
|
297 |
|
|
};
|
298 |
|
|
typedef struct rpcbs_addrlist rpcbs_addrlist;
|
299 |
|
|
|
300 |
|
|
/* Link list of all the stats about rmtcall */
|
301 |
|
|
|
302 |
|
|
struct rpcbs_rmtcalllist {
|
303 |
|
|
rpcprog_t prog;
|
304 |
|
|
rpcvers_t vers;
|
305 |
|
|
rpcproc_t proc;
|
306 |
|
|
int success;
|
307 |
|
|
int failure;
|
308 |
|
|
int indirect;
|
309 |
|
|
char *netid;
|
310 |
|
|
struct rpcbs_rmtcalllist *next;
|
311 |
|
|
};
|
312 |
|
|
typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
|
313 |
|
|
|
314 |
|
|
typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
|
315 |
|
|
|
316 |
|
|
typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
|
317 |
|
|
|
318 |
|
|
typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
|
319 |
|
|
|
320 |
|
|
struct rpcb_stat {
|
321 |
|
|
rpcbs_proc info;
|
322 |
|
|
int setinfo;
|
323 |
|
|
int unsetinfo;
|
324 |
|
|
rpcbs_addrlist_ptr addrinfo;
|
325 |
|
|
rpcbs_rmtcalllist_ptr rmtinfo;
|
326 |
|
|
};
|
327 |
|
|
typedef struct rpcb_stat rpcb_stat;
|
328 |
|
|
|
329 |
|
|
/*
|
330 |
|
|
* One rpcb_stat structure is returned for each version of rpcbind
|
331 |
|
|
* being monitored.
|
332 |
|
|
*/
|
333 |
|
|
|
334 |
|
|
typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
|
335 |
|
|
|
336 |
|
|
/*
|
337 |
|
|
* We don't define netbuf in RPCL, since it would contain structure member
|
338 |
|
|
* names that would conflict with the definition of struct netbuf in
|
339 |
|
|
* <tiuser.h>. Instead we merely declare the XDR routine xdr_netbuf() here,
|
340 |
|
|
* and implement it ourselves in rpc/rpcb_prot.c.
|
341 |
|
|
*/
|
342 |
|
|
#ifdef __cplusplus
|
343 |
|
|
extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *);
|
344 |
|
|
|
345 |
|
|
#else /* __STDC__ */
|
346 |
|
|
extern bool_t xdr_netbuf(XDR *, struct netbuf *);
|
347 |
|
|
|
348 |
|
|
#endif
|
349 |
|
|
|
350 |
|
|
#define RPCBVERS_3 RPCBVERS
|
351 |
|
|
#define RPCBVERS_4 RPCBVERS4
|
352 |
|
|
|
353 |
|
|
#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock"
|
354 |
|
|
|
355 |
|
|
#else /* ndef _KERNEL */
|
356 |
|
|
#ifdef __cplusplus
|
357 |
|
|
extern "C" {
|
358 |
|
|
#endif
|
359 |
|
|
|
360 |
|
|
/*
|
361 |
|
|
* A mapping of (program, version, network ID) to address
|
362 |
|
|
*/
|
363 |
|
|
struct rpcb {
|
364 |
|
|
rpcprog_t r_prog; /* program number */
|
365 |
|
|
rpcvers_t r_vers; /* version number */
|
366 |
|
|
char *r_netid; /* network id */
|
367 |
|
|
char *r_addr; /* universal address */
|
368 |
|
|
char *r_owner; /* owner of the mapping */
|
369 |
|
|
};
|
370 |
|
|
typedef struct rpcb RPCB;
|
371 |
|
|
|
372 |
|
|
/*
|
373 |
|
|
* A list of mappings
|
374 |
|
|
*/
|
375 |
|
|
struct rpcblist {
|
376 |
|
|
RPCB rpcb_map;
|
377 |
|
|
struct rpcblist *rpcb_next;
|
378 |
|
|
};
|
379 |
|
|
typedef struct rpcblist RPCBLIST;
|
380 |
|
|
typedef struct rpcblist *rpcblist_ptr;
|
381 |
|
|
|
382 |
|
|
/*
|
383 |
|
|
* Remote calls arguments
|
384 |
|
|
*/
|
385 |
|
|
struct rpcb_rmtcallargs {
|
386 |
|
|
rpcprog_t prog; /* program number */
|
387 |
|
|
rpcvers_t vers; /* version number */
|
388 |
|
|
rpcproc_t proc; /* procedure number */
|
389 |
|
|
u_int32_t arglen; /* arg len */
|
390 |
|
|
caddr_t args_ptr; /* argument */
|
391 |
|
|
xdrproc_t xdr_args; /* XDR routine for argument */
|
392 |
|
|
};
|
393 |
|
|
typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
|
394 |
|
|
|
395 |
|
|
/*
|
396 |
|
|
* Remote calls results
|
397 |
|
|
*/
|
398 |
|
|
struct rpcb_rmtcallres {
|
399 |
|
|
char *addr_ptr; /* remote universal address */
|
400 |
|
|
u_int32_t resultslen; /* results length */
|
401 |
|
|
caddr_t results_ptr; /* results */
|
402 |
|
|
xdrproc_t xdr_results; /* XDR routine for result */
|
403 |
|
|
};
|
404 |
|
|
typedef struct rpcb_rmtcallres rpcb_rmtcallres;
|
405 |
|
|
|
406 |
|
|
struct rpcb_entry {
|
407 |
|
|
char *r_maddr;
|
408 |
|
|
char *r_nc_netid;
|
409 |
|
|
unsigned int r_nc_semantics;
|
410 |
|
|
char *r_nc_protofmly;
|
411 |
|
|
char *r_nc_proto;
|
412 |
|
|
};
|
413 |
|
|
typedef struct rpcb_entry rpcb_entry;
|
414 |
|
|
|
415 |
|
|
/*
|
416 |
|
|
* A list of addresses supported by a service.
|
417 |
|
|
*/
|
418 |
|
|
|
419 |
|
|
struct rpcb_entry_list {
|
420 |
|
|
rpcb_entry rpcb_entry_map;
|
421 |
|
|
struct rpcb_entry_list *rpcb_entry_next;
|
422 |
|
|
};
|
423 |
|
|
typedef struct rpcb_entry_list rpcb_entry_list;
|
424 |
|
|
|
425 |
|
|
typedef rpcb_entry_list *rpcb_entry_list_ptr;
|
426 |
|
|
|
427 |
|
|
/*
|
428 |
|
|
* rpcbind statistics
|
429 |
|
|
*/
|
430 |
|
|
|
431 |
|
|
#define rpcb_highproc_2 RPCBPROC_CALLIT
|
432 |
|
|
#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
|
433 |
|
|
#define rpcb_highproc_4 RPCBPROC_GETSTAT
|
434 |
|
|
#define RPCBSTAT_HIGHPROC 13
|
435 |
|
|
#define RPCBVERS_STAT 3
|
436 |
|
|
#define RPCBVERS_4_STAT 2
|
437 |
|
|
#define RPCBVERS_3_STAT 1
|
438 |
|
|
#define RPCBVERS_2_STAT 0
|
439 |
|
|
|
440 |
|
|
/* Link list of all the stats about getport and getaddr */
|
441 |
|
|
|
442 |
|
|
struct rpcbs_addrlist {
|
443 |
|
|
rpcprog_t prog;
|
444 |
|
|
rpcvers_t vers;
|
445 |
|
|
int success;
|
446 |
|
|
int failure;
|
447 |
|
|
char *netid;
|
448 |
|
|
struct rpcbs_addrlist *next;
|
449 |
|
|
};
|
450 |
|
|
typedef struct rpcbs_addrlist rpcbs_addrlist;
|
451 |
|
|
|
452 |
|
|
/* Link list of all the stats about rmtcall */
|
453 |
|
|
|
454 |
|
|
struct rpcbs_rmtcalllist {
|
455 |
|
|
rpcprog_t prog;
|
456 |
|
|
rpcvers_t vers;
|
457 |
|
|
rpcproc_t proc;
|
458 |
|
|
int success;
|
459 |
|
|
int failure;
|
460 |
|
|
int indirect;
|
461 |
|
|
char *netid;
|
462 |
|
|
struct rpcbs_rmtcalllist *next;
|
463 |
|
|
};
|
464 |
|
|
typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
|
465 |
|
|
|
466 |
|
|
typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
|
467 |
|
|
|
468 |
|
|
typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
|
469 |
|
|
|
470 |
|
|
typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
|
471 |
|
|
|
472 |
|
|
struct rpcb_stat {
|
473 |
|
|
rpcbs_proc info;
|
474 |
|
|
int setinfo;
|
475 |
|
|
int unsetinfo;
|
476 |
|
|
rpcbs_addrlist_ptr addrinfo;
|
477 |
|
|
rpcbs_rmtcalllist_ptr rmtinfo;
|
478 |
|
|
};
|
479 |
|
|
typedef struct rpcb_stat rpcb_stat;
|
480 |
|
|
|
481 |
|
|
/*
|
482 |
|
|
* One rpcb_stat structure is returned for each version of rpcbind
|
483 |
|
|
* being monitored.
|
484 |
|
|
*/
|
485 |
|
|
|
486 |
|
|
typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
|
487 |
|
|
|
488 |
|
|
#ifdef __cplusplus
|
489 |
|
|
}
|
490 |
|
|
#endif
|
491 |
|
|
|
492 |
|
|
#endif /* ndef _KERNEL */
|
493 |
|
|
|
494 |
|
|
#define RPCBPROG 100000
|
495 |
|
|
#define RPCBVERS 3
|
496 |
|
|
|
497 |
|
|
#if defined(__STDC__) || defined(__cplusplus)
|
498 |
|
|
#define RPCBPROC_SET 1
|
499 |
|
|
extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *);
|
500 |
|
|
extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *);
|
501 |
|
|
#define RPCBPROC_UNSET 2
|
502 |
|
|
extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *);
|
503 |
|
|
extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *);
|
504 |
|
|
#define RPCBPROC_GETADDR 3
|
505 |
|
|
extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *);
|
506 |
|
|
extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *);
|
507 |
|
|
#define RPCBPROC_DUMP 4
|
508 |
|
|
extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *);
|
509 |
|
|
extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *);
|
510 |
|
|
#define RPCBPROC_CALLIT 5
|
511 |
|
|
extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *);
|
512 |
|
|
extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *);
|
513 |
|
|
#define RPCBPROC_GETTIME 6
|
514 |
|
|
extern u_int * rpcbproc_gettime_3(void *, CLIENT *);
|
515 |
|
|
extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *);
|
516 |
|
|
#define RPCBPROC_UADDR2TADDR 7
|
517 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *);
|
518 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *);
|
519 |
|
|
#define RPCBPROC_TADDR2UADDR 8
|
520 |
|
|
extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *);
|
521 |
|
|
extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *);
|
522 |
|
|
extern int rpcbprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
523 |
|
|
|
524 |
|
|
#else /* K&R C */
|
525 |
|
|
#define RPCBPROC_SET 1
|
526 |
|
|
extern bool_t * rpcbproc_set_3();
|
527 |
|
|
extern bool_t * rpcbproc_set_3_svc();
|
528 |
|
|
#define RPCBPROC_UNSET 2
|
529 |
|
|
extern bool_t * rpcbproc_unset_3();
|
530 |
|
|
extern bool_t * rpcbproc_unset_3_svc();
|
531 |
|
|
#define RPCBPROC_GETADDR 3
|
532 |
|
|
extern char ** rpcbproc_getaddr_3();
|
533 |
|
|
extern char ** rpcbproc_getaddr_3_svc();
|
534 |
|
|
#define RPCBPROC_DUMP 4
|
535 |
|
|
extern rpcblist_ptr * rpcbproc_dump_3();
|
536 |
|
|
extern rpcblist_ptr * rpcbproc_dump_3_svc();
|
537 |
|
|
#define RPCBPROC_CALLIT 5
|
538 |
|
|
extern rpcb_rmtcallres * rpcbproc_callit_3();
|
539 |
|
|
extern rpcb_rmtcallres * rpcbproc_callit_3_svc();
|
540 |
|
|
#define RPCBPROC_GETTIME 6
|
541 |
|
|
extern u_int * rpcbproc_gettime_3();
|
542 |
|
|
extern u_int * rpcbproc_gettime_3_svc();
|
543 |
|
|
#define RPCBPROC_UADDR2TADDR 7
|
544 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_3();
|
545 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_3_svc();
|
546 |
|
|
#define RPCBPROC_TADDR2UADDR 8
|
547 |
|
|
extern char ** rpcbproc_taddr2uaddr_3();
|
548 |
|
|
extern char ** rpcbproc_taddr2uaddr_3_svc();
|
549 |
|
|
extern int rpcbprog_3_freeresult ();
|
550 |
|
|
#endif /* K&R C */
|
551 |
|
|
#define RPCBVERS4 4
|
552 |
|
|
|
553 |
|
|
#if defined(__STDC__) || defined(__cplusplus)
|
554 |
|
|
extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *);
|
555 |
|
|
extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *);
|
556 |
|
|
extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *);
|
557 |
|
|
extern bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *);
|
558 |
|
|
extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *);
|
559 |
|
|
extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *);
|
560 |
|
|
extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *);
|
561 |
|
|
extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *);
|
562 |
|
|
#define RPCBPROC_BCAST RPCBPROC_CALLIT
|
563 |
|
|
extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *);
|
564 |
|
|
extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *);
|
565 |
|
|
extern u_int * rpcbproc_gettime_4(void *, CLIENT *);
|
566 |
|
|
extern u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *);
|
567 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *);
|
568 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *);
|
569 |
|
|
extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *);
|
570 |
|
|
extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *);
|
571 |
|
|
#define RPCBPROC_GETVERSADDR 9
|
572 |
|
|
extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *);
|
573 |
|
|
extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *);
|
574 |
|
|
#define RPCBPROC_INDIRECT 10
|
575 |
|
|
extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *);
|
576 |
|
|
extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *);
|
577 |
|
|
#define RPCBPROC_GETADDRLIST 11
|
578 |
|
|
extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *);
|
579 |
|
|
extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *);
|
580 |
|
|
#define RPCBPROC_GETSTAT 12
|
581 |
|
|
extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *);
|
582 |
|
|
extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *);
|
583 |
|
|
extern int rpcbprog_4_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
|
584 |
|
|
|
585 |
|
|
#else /* K&R C */
|
586 |
|
|
extern bool_t * rpcbproc_set_4();
|
587 |
|
|
extern bool_t * rpcbproc_set_4_svc();
|
588 |
|
|
extern bool_t * rpcbproc_unset_4();
|
589 |
|
|
extern bool_t * rpcbproc_unset_4_svc();
|
590 |
|
|
extern char ** rpcbproc_getaddr_4();
|
591 |
|
|
extern char ** rpcbproc_getaddr_4_svc();
|
592 |
|
|
extern rpcblist_ptr * rpcbproc_dump_4();
|
593 |
|
|
extern rpcblist_ptr * rpcbproc_dump_4_svc();
|
594 |
|
|
#define RPCBPROC_BCAST RPCBPROC_CALLIT
|
595 |
|
|
extern rpcb_rmtcallres * rpcbproc_bcast_4();
|
596 |
|
|
extern rpcb_rmtcallres * rpcbproc_bcast_4_svc();
|
597 |
|
|
extern u_int * rpcbproc_gettime_4();
|
598 |
|
|
extern u_int * rpcbproc_gettime_4_svc();
|
599 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_4();
|
600 |
|
|
extern struct netbuf * rpcbproc_uaddr2taddr_4_svc();
|
601 |
|
|
extern char ** rpcbproc_taddr2uaddr_4();
|
602 |
|
|
extern char ** rpcbproc_taddr2uaddr_4_svc();
|
603 |
|
|
#define RPCBPROC_GETVERSADDR 9
|
604 |
|
|
extern char ** rpcbproc_getversaddr_4();
|
605 |
|
|
extern char ** rpcbproc_getversaddr_4_svc();
|
606 |
|
|
#define RPCBPROC_INDIRECT 10
|
607 |
|
|
extern rpcb_rmtcallres * rpcbproc_indirect_4();
|
608 |
|
|
extern rpcb_rmtcallres * rpcbproc_indirect_4_svc();
|
609 |
|
|
#define RPCBPROC_GETADDRLIST 11
|
610 |
|
|
extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4();
|
611 |
|
|
extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc();
|
612 |
|
|
#define RPCBPROC_GETSTAT 12
|
613 |
|
|
extern rpcb_stat * rpcbproc_getstat_4();
|
614 |
|
|
extern rpcb_stat * rpcbproc_getstat_4_svc();
|
615 |
|
|
extern int rpcbprog_4_freeresult ();
|
616 |
|
|
#endif /* K&R C */
|
617 |
|
|
|
618 |
|
|
/* the xdr functions */
|
619 |
|
|
|
620 |
|
|
#if defined(__STDC__) || defined(__cplusplus)
|
621 |
|
|
extern bool_t xdr_rpcb (XDR *, rpcb*);
|
622 |
|
|
extern bool_t xdr_rp__list (XDR *, rp__list*);
|
623 |
|
|
extern bool_t xdr_rpcblist_ptr (XDR *, rpcblist_ptr*);
|
624 |
|
|
extern bool_t xdr_rpcb_rmtcallargs (XDR *, rpcb_rmtcallargs*);
|
625 |
|
|
extern bool_t xdr_rpcb_rmtcallres (XDR *, rpcb_rmtcallres*);
|
626 |
|
|
extern bool_t xdr_rpcb_entry (XDR *, rpcb_entry*);
|
627 |
|
|
extern bool_t xdr_rpcb_entry_list (XDR *, rpcb_entry_list*);
|
628 |
|
|
extern bool_t xdr_rpcb_entry_list_ptr (XDR *, rpcb_entry_list_ptr*);
|
629 |
|
|
extern bool_t xdr_rpcbs_addrlist (XDR *, rpcbs_addrlist*);
|
630 |
|
|
extern bool_t xdr_rpcbs_rmtcalllist (XDR *, rpcbs_rmtcalllist*);
|
631 |
|
|
extern bool_t xdr_rpcbs_proc (XDR *, rpcbs_proc);
|
632 |
|
|
extern bool_t xdr_rpcbs_addrlist_ptr (XDR *, rpcbs_addrlist_ptr*);
|
633 |
|
|
extern bool_t xdr_rpcbs_rmtcalllist_ptr (XDR *, rpcbs_rmtcalllist_ptr*);
|
634 |
|
|
extern bool_t xdr_rpcb_stat (XDR *, rpcb_stat*);
|
635 |
|
|
extern bool_t xdr_rpcb_stat_byvers (XDR *, rpcb_stat_byvers);
|
636 |
|
|
|
637 |
|
|
#else /* K&R C */
|
638 |
|
|
extern bool_t xdr_rpcb ();
|
639 |
|
|
extern bool_t xdr_rp__list ();
|
640 |
|
|
extern bool_t xdr_rpcblist_ptr ();
|
641 |
|
|
extern bool_t xdr_rpcb_rmtcallargs ();
|
642 |
|
|
extern bool_t xdr_rpcb_rmtcallres ();
|
643 |
|
|
extern bool_t xdr_rpcb_entry ();
|
644 |
|
|
extern bool_t xdr_rpcb_entry_list ();
|
645 |
|
|
extern bool_t xdr_rpcb_entry_list_ptr ();
|
646 |
|
|
extern bool_t xdr_rpcbs_addrlist ();
|
647 |
|
|
extern bool_t xdr_rpcbs_rmtcalllist ();
|
648 |
|
|
extern bool_t xdr_rpcbs_proc ();
|
649 |
|
|
extern bool_t xdr_rpcbs_addrlist_ptr ();
|
650 |
|
|
extern bool_t xdr_rpcbs_rmtcalllist_ptr ();
|
651 |
|
|
extern bool_t xdr_rpcb_stat ();
|
652 |
|
|
extern bool_t xdr_rpcb_stat_byvers ();
|
653 |
|
|
|
654 |
|
|
#endif /* K&R C */
|
655 |
|
|
|
656 |
|
|
#ifdef __cplusplus
|
657 |
|
|
}
|
658 |
|
|
#endif
|
659 |
|
|
|
660 |
|
|
#endif /* !_RPCB_PROT_H_RPCGEN */
|