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