1177633Sdfr/*
2177633Sdfr * Please do not edit this file.
3177633Sdfr * It was generated using rpcgen.
4177633Sdfr */
5177633Sdfr
6177633Sdfr#ifndef _RPCB_PROT_H_RPCGEN
7177633Sdfr#define	_RPCB_PROT_H_RPCGEN
8177633Sdfr
9177633Sdfr#include <rpc/rpc.h>
10177633Sdfr
11177633Sdfr#ifdef __cplusplus
12177633Sdfrextern "C" {
13177633Sdfr#endif
14177633Sdfr
15261057Smav/*-
16261057Smav * Copyright (c) 2009, Sun Microsystems, Inc.
17261057Smav * All rights reserved.
18177633Sdfr *
19261057Smav * Redistribution and use in source and binary forms, with or without
20261057Smav * modification, are permitted provided that the following conditions are met:
21261057Smav * - Redistributions of source code must retain the above copyright notice,
22261057Smav *   this list of conditions and the following disclaimer.
23261057Smav * - Redistributions in binary form must reproduce the above copyright notice,
24261057Smav *   this list of conditions and the following disclaimer in the documentation
25261057Smav *   and/or other materials provided with the distribution.
26261057Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its
27261057Smav *   contributors may be used to endorse or promote products derived
28261057Smav *   from this software without specific prior written permission.
29177633Sdfr *
30261057Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31261057Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32261057Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33261057Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
34261057Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35261057Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36261057Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37261057Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38261057Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39261057Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40261057Smav * POSSIBILITY OF SUCH DAMAGE.
41177633Sdfr *
42261057Smav * $FreeBSD$
43177633Sdfr */
44177633Sdfr/*
45177633Sdfr * Copyright (c) 1988 by Sun Microsystems, Inc.
46177633Sdfr */
47177633Sdfr/* from rpcb_prot.x */
48177633Sdfr
49177633Sdfr/* #pragma ident	"@(#)rpcb_prot.x	1.5	94/04/29 SMI" */
50177633Sdfr
51177633Sdfr#ifndef _KERNEL
52177633Sdfr
53177633Sdfr
54177633Sdfr/*
55177633Sdfr * The following procedures are supported by the protocol in version 3:
56177633Sdfr *
57177633Sdfr * RPCBPROC_NULL() returns ()
58177633Sdfr * 	takes nothing, returns nothing
59177633Sdfr *
60177633Sdfr * RPCBPROC_SET(rpcb) returns (bool_t)
61177633Sdfr * 	TRUE is success, FALSE is failure.  Registers the tuple
62177633Sdfr *	[prog, vers, address, owner, netid].
63177633Sdfr *	Finds out owner and netid information on its own.
64177633Sdfr *
65177633Sdfr * RPCBPROC_UNSET(rpcb) returns (bool_t)
66177633Sdfr *	TRUE is success, FALSE is failure.  Un-registers tuple
67177633Sdfr *	[prog, vers, netid].  addresses is ignored.
68177633Sdfr *	If netid is NULL, unregister all.
69177633Sdfr *
70177633Sdfr * RPCBPROC_GETADDR(rpcb) returns (string).
71177633Sdfr *	0 is failure.  Otherwise returns the universal address where the
72177633Sdfr *	triple [prog, vers, netid] is registered.  Ignore address and owner.
73177633Sdfr *
74177633Sdfr * RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
75177633Sdfr *	used to dump the entire rpcbind maps
76177633Sdfr *
77177633Sdfr * RPCBPROC_CALLIT(rpcb_rmtcallargs)
78177633Sdfr * 	RETURNS (rpcb_rmtcallres);
79177633Sdfr * 	Calls the procedure on the remote machine.  If it is not registered,
80177633Sdfr *	this procedure is quiet; i.e. it does not return error information!!!
81177633Sdfr *	This routine only passes null authentication parameters.
82177633Sdfr *	It has no interface to xdr routines for RPCBPROC_CALLIT.
83177633Sdfr *
84177633Sdfr * RPCBPROC_GETTIME() returns (int).
85177633Sdfr *	Gets the remote machines time
86177633Sdfr *
87177633Sdfr * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
88177633Sdfr *	Returns the netbuf address from universal address.
89177633Sdfr *
90177633Sdfr * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
91177633Sdfr *	Returns the universal address from netbuf address.
92177633Sdfr *
93177633Sdfr * END OF RPCBIND VERSION 3 PROCEDURES
94177633Sdfr */
95177633Sdfr/*
96177633Sdfr * Except for RPCBPROC_CALLIT, the procedures above are carried over to
97177633Sdfr * rpcbind version 4.  Those below are added or modified for version 4.
98177633Sdfr * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
99177633Sdfr * AS RPCBPROC_CALLIT.
100177633Sdfr *
101177633Sdfr * RPCBPROC_BCAST(rpcb_rmtcallargs)
102177633Sdfr * 	RETURNS (rpcb_rmtcallres);
103177633Sdfr * 	Calls the procedure on the remote machine.  If it is not registered,
104177633Sdfr *	this procedure IS quiet; i.e. it DOES NOT return error information!!!
105177633Sdfr *	This routine should be used for broadcasting and nothing else.
106177633Sdfr *
107177633Sdfr * RPCBPROC_GETVERSADDR(rpcb) returns (string).
108177633Sdfr *	0 is failure.  Otherwise returns the universal address where the
109177633Sdfr *	triple [prog, vers, netid] is registered.  Ignore address and owner.
110177633Sdfr *	Same as RPCBPROC_GETADDR except that if the given version number
111177633Sdfr *	is not available, the address is not returned.
112177633Sdfr *
113177633Sdfr * RPCBPROC_INDIRECT(rpcb_rmtcallargs)
114177633Sdfr * 	RETURNS (rpcb_rmtcallres);
115177633Sdfr * 	Calls the procedure on the remote machine.  If it is not registered,
116177633Sdfr *	this procedure is NOT quiet; i.e. it DOES return error information!!!
117177633Sdfr * 	as any normal application would expect.
118177633Sdfr *
119177633Sdfr * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
120177633Sdfr *	Same as RPCBPROC_GETADDR except that it returns a list of all the
121177633Sdfr *	addresses registered for the combination (prog, vers) (for all
122177633Sdfr *	transports).
123177633Sdfr *
124177633Sdfr * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
125177633Sdfr *	Returns the statistics about the kind of requests received by rpcbind.
126177633Sdfr */
127177633Sdfr
128177633Sdfr/*
129177633Sdfr * A mapping of (program, version, network ID) to address
130177633Sdfr */
131177633Sdfr
132177633Sdfrstruct rpcb {
133177633Sdfr	rpcprog_t r_prog;
134177633Sdfr	rpcvers_t r_vers;
135177633Sdfr	char *r_netid;
136177633Sdfr	char *r_addr;
137177633Sdfr	char *r_owner;
138177633Sdfr};
139177633Sdfrtypedef struct rpcb rpcb;
140177633Sdfr
141177633Sdfrtypedef rpcb RPCB;
142177633Sdfr
143177633Sdfr
144177633Sdfr/*
145177633Sdfr * A list of mappings
146177633Sdfr *
147177633Sdfr * Below are two definitions for the rpcblist structure.  This is done because
148177633Sdfr * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
149177633Sdfr * struct rpcblist * that rpcgen would produce.  One version of the rpcblist
150177633Sdfr * structure (actually called rp__list) is used with rpcgen, and the other is
151177633Sdfr * defined only in the header file for compatibility with the specified
152177633Sdfr * interface.
153177633Sdfr */
154177633Sdfr
155177633Sdfrstruct rp__list {
156177633Sdfr	rpcb rpcb_map;
157177633Sdfr	struct rp__list *rpcb_next;
158177633Sdfr};
159177633Sdfrtypedef struct rp__list rp__list;
160177633Sdfr
161177633Sdfrtypedef rp__list *rpcblist_ptr;
162177633Sdfr
163177633Sdfrtypedef struct rp__list rpcblist;
164177633Sdfrtypedef struct rp__list RPCBLIST;
165177633Sdfr
166177633Sdfr#ifndef __cplusplus
167177633Sdfrstruct rpcblist {
168177633Sdfr RPCB rpcb_map;
169177633Sdfr struct rpcblist *rpcb_next;
170177633Sdfr};
171177633Sdfr#endif
172177633Sdfr
173177633Sdfr#ifdef __cplusplus
174177633Sdfrextern "C" {
175177633Sdfr#endif
176177633Sdfrextern bool_t xdr_rpcblist(XDR *, rpcblist**);
177177633Sdfr#ifdef __cplusplus
178177633Sdfr}
179177633Sdfr#endif
180177633Sdfr
181177633Sdfr
182177633Sdfr/*
183177633Sdfr * Arguments of remote calls
184177633Sdfr */
185177633Sdfr
186177633Sdfrstruct rpcb_rmtcallargs {
187177633Sdfr	rpcprog_t prog;
188177633Sdfr	rpcvers_t vers;
189177633Sdfr	rpcproc_t proc;
190177633Sdfr	struct {
191177633Sdfr		u_int args_len;
192177633Sdfr		char *args_val;
193177633Sdfr	} args;
194177633Sdfr};
195177633Sdfrtypedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
196177633Sdfr
197177633Sdfr/*
198177633Sdfr * Client-side only representation of rpcb_rmtcallargs structure.
199177633Sdfr *
200177633Sdfr * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
201177633Sdfr * opaque arguments in the "args" structure.  xdr_rpcb_rmtcallargs() needs to
202177633Sdfr * be passed the XDR routine that knows the args' structure.  This routine
203177633Sdfr * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
204177633Sdfr * the application being called already knows the args structure.  So we use a
205177633Sdfr * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
206177633Sdfr * includes the args' XDR routine.
207177633Sdfr */
208177633Sdfrstruct r_rpcb_rmtcallargs {
209177633Sdfr rpcprog_t prog;
210177633Sdfr rpcvers_t vers;
211177633Sdfr rpcproc_t proc;
212177633Sdfr struct {
213177633Sdfr u_int args_len;
214177633Sdfr char *args_val;
215177633Sdfr } args;
216177633Sdfr xdrproc_t xdr_args; /* encodes args */
217177633Sdfr};
218177633Sdfr
219177633Sdfr
220177633Sdfr/*
221177633Sdfr * Results of the remote call
222177633Sdfr */
223177633Sdfr
224177633Sdfrstruct rpcb_rmtcallres {
225177633Sdfr	char *addr;
226177633Sdfr	struct {
227177633Sdfr		u_int results_len;
228177633Sdfr		char *results_val;
229177633Sdfr	} results;
230177633Sdfr};
231177633Sdfrtypedef struct rpcb_rmtcallres rpcb_rmtcallres;
232177633Sdfr
233177633Sdfr/*
234177633Sdfr * Client-side only representation of rpcb_rmtcallres structure.
235177633Sdfr */
236177633Sdfrstruct r_rpcb_rmtcallres {
237177633Sdfr char *addr;
238177633Sdfr struct {
239177633Sdfr uint32_t results_len;
240177633Sdfr char *results_val;
241177633Sdfr } results;
242177633Sdfr xdrproc_t xdr_res; /* decodes results */
243177633Sdfr};
244177633Sdfr
245177633Sdfr/*
246177633Sdfr * rpcb_entry contains a merged address of a service on a particular
247177633Sdfr * transport, plus associated netconfig information.  A list of rpcb_entrys
248177633Sdfr * is returned by RPCBPROC_GETADDRLIST.  See netconfig.h for values used
249177633Sdfr * in r_nc_* fields.
250177633Sdfr */
251177633Sdfr
252177633Sdfrstruct rpcb_entry {
253177633Sdfr	char *r_maddr;
254177633Sdfr	char *r_nc_netid;
255177633Sdfr	u_int r_nc_semantics;
256177633Sdfr	char *r_nc_protofmly;
257177633Sdfr	char *r_nc_proto;
258177633Sdfr};
259177633Sdfrtypedef struct rpcb_entry rpcb_entry;
260177633Sdfr
261177633Sdfr/*
262177633Sdfr * A list of addresses supported by a service.
263177633Sdfr */
264177633Sdfr
265177633Sdfrstruct rpcb_entry_list {
266177633Sdfr	rpcb_entry rpcb_entry_map;
267177633Sdfr	struct rpcb_entry_list *rpcb_entry_next;
268177633Sdfr};
269177633Sdfrtypedef struct rpcb_entry_list rpcb_entry_list;
270177633Sdfr
271177633Sdfrtypedef rpcb_entry_list *rpcb_entry_list_ptr;
272177633Sdfr
273177633Sdfr/*
274177633Sdfr * rpcbind statistics
275177633Sdfr */
276177633Sdfr
277177633Sdfr#define	rpcb_highproc_2 RPCBPROC_CALLIT
278177633Sdfr#define	rpcb_highproc_3 RPCBPROC_TADDR2UADDR
279177633Sdfr#define	rpcb_highproc_4 RPCBPROC_GETSTAT
280177633Sdfr#define	RPCBSTAT_HIGHPROC 13
281177633Sdfr#define	RPCBVERS_STAT 3
282177633Sdfr#define	RPCBVERS_4_STAT 2
283177633Sdfr#define	RPCBVERS_3_STAT 1
284177633Sdfr#define	RPCBVERS_2_STAT 0
285177633Sdfr
286177633Sdfr/* Link list of all the stats about getport and getaddr */
287177633Sdfr
288177633Sdfrstruct rpcbs_addrlist {
289177633Sdfr	rpcprog_t prog;
290177633Sdfr	rpcvers_t vers;
291177633Sdfr	int success;
292177633Sdfr	int failure;
293177633Sdfr	char *netid;
294177633Sdfr	struct rpcbs_addrlist *next;
295177633Sdfr};
296177633Sdfrtypedef struct rpcbs_addrlist rpcbs_addrlist;
297177633Sdfr
298177633Sdfr/* Link list of all the stats about rmtcall */
299177633Sdfr
300177633Sdfrstruct rpcbs_rmtcalllist {
301177633Sdfr	rpcprog_t prog;
302177633Sdfr	rpcvers_t vers;
303177633Sdfr	rpcproc_t proc;
304177633Sdfr	int success;
305177633Sdfr	int failure;
306177633Sdfr	int indirect;
307177633Sdfr	char *netid;
308177633Sdfr	struct rpcbs_rmtcalllist *next;
309177633Sdfr};
310177633Sdfrtypedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
311177633Sdfr
312177633Sdfrtypedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
313177633Sdfr
314177633Sdfrtypedef rpcbs_addrlist *rpcbs_addrlist_ptr;
315177633Sdfr
316177633Sdfrtypedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
317177633Sdfr
318177633Sdfrstruct rpcb_stat {
319177633Sdfr	rpcbs_proc info;
320177633Sdfr	int setinfo;
321177633Sdfr	int unsetinfo;
322177633Sdfr	rpcbs_addrlist_ptr addrinfo;
323177633Sdfr	rpcbs_rmtcalllist_ptr rmtinfo;
324177633Sdfr};
325177633Sdfrtypedef struct rpcb_stat rpcb_stat;
326177633Sdfr
327177633Sdfr/*
328177633Sdfr * One rpcb_stat structure is returned for each version of rpcbind
329177633Sdfr * being monitored.
330177633Sdfr */
331177633Sdfr
332177633Sdfrtypedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
333177633Sdfr
334177633Sdfr/*
335177633Sdfr * We don't define netbuf in RPCL, since it would contain structure member
336177633Sdfr * names that would conflict with the definition of struct netbuf in
337177633Sdfr * <tiuser.h>.  Instead we merely declare the XDR routine xdr_netbuf() here,
338177633Sdfr * and implement it ourselves in rpc/rpcb_prot.c.
339177633Sdfr */
340177633Sdfr#ifdef __cplusplus
341177633Sdfrextern "C" bool_t xdr_netbuf(XDR *, struct netbuf *);
342177633Sdfr
343177633Sdfr#else /* __STDC__ */
344177633Sdfrextern bool_t xdr_netbuf(XDR *, struct netbuf *);
345177633Sdfr
346177633Sdfr#endif
347177633Sdfr
348177633Sdfr#define RPCBVERS_3 RPCBVERS
349177633Sdfr#define RPCBVERS_4 RPCBVERS4
350177633Sdfr
351177633Sdfr#else /* ndef _KERNEL */
352177633Sdfr#ifdef __cplusplus
353177633Sdfrextern "C" {
354177633Sdfr#endif
355177633Sdfr
356177633Sdfr/*
357177633Sdfr * A mapping of (program, version, network ID) to address
358177633Sdfr */
359177633Sdfrstruct rpcb {
360177633Sdfr rpcprog_t r_prog; /* program number */
361177633Sdfr rpcvers_t r_vers; /* version number */
362177633Sdfr char *r_netid; /* network id */
363177633Sdfr char *r_addr; /* universal address */
364177633Sdfr char *r_owner; /* owner of the mapping */
365177633Sdfr};
366177633Sdfrtypedef struct rpcb RPCB;
367177633Sdfr
368177633Sdfr/*
369177633Sdfr * A list of mappings
370177633Sdfr */
371177633Sdfrstruct rpcblist {
372177633Sdfr RPCB rpcb_map;
373177633Sdfr struct rpcblist *rpcb_next;
374177633Sdfr};
375177633Sdfrtypedef struct rpcblist RPCBLIST;
376177633Sdfrtypedef struct rpcblist *rpcblist_ptr;
377177633Sdfr
378177633Sdfr/*
379177633Sdfr * Remote calls arguments
380177633Sdfr */
381177633Sdfrstruct rpcb_rmtcallargs {
382177633Sdfr rpcprog_t prog; /* program number */
383177633Sdfr rpcvers_t vers; /* version number */
384177633Sdfr rpcproc_t proc; /* procedure number */
385177633Sdfr uint32_t arglen; /* arg len */
386177633Sdfr caddr_t args_ptr; /* argument */
387177633Sdfr xdrproc_t xdr_args; /* XDR routine for argument */
388177633Sdfr};
389177633Sdfrtypedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
390177633Sdfr
391177633Sdfr/*
392177633Sdfr * Remote calls results
393177633Sdfr */
394177633Sdfrstruct rpcb_rmtcallres {
395177633Sdfr char *addr_ptr; /* remote universal address */
396177633Sdfr uint32_t resultslen; /* results length */
397177633Sdfr caddr_t results_ptr; /* results */
398177633Sdfr xdrproc_t xdr_results; /* XDR routine for result */
399177633Sdfr};
400177633Sdfrtypedef struct rpcb_rmtcallres rpcb_rmtcallres;
401177633Sdfr
402177633Sdfrstruct rpcb_entry {
403177633Sdfr char *r_maddr;
404177633Sdfr char *r_nc_netid;
405177633Sdfr unsigned int r_nc_semantics;
406177633Sdfr char *r_nc_protofmly;
407177633Sdfr char *r_nc_proto;
408177633Sdfr};
409177633Sdfrtypedef struct rpcb_entry rpcb_entry;
410177633Sdfr
411177633Sdfr/*
412177633Sdfr * A list of addresses supported by a service.
413177633Sdfr */
414177633Sdfr
415177633Sdfrstruct rpcb_entry_list {
416177633Sdfr rpcb_entry rpcb_entry_map;
417177633Sdfr struct rpcb_entry_list *rpcb_entry_next;
418177633Sdfr};
419177633Sdfrtypedef struct rpcb_entry_list rpcb_entry_list;
420177633Sdfr
421177633Sdfrtypedef rpcb_entry_list *rpcb_entry_list_ptr;
422177633Sdfr
423177633Sdfr/*
424177633Sdfr * rpcbind statistics
425177633Sdfr */
426177633Sdfr
427177633Sdfr#define rpcb_highproc_2 RPCBPROC_CALLIT
428177633Sdfr#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
429177633Sdfr#define rpcb_highproc_4 RPCBPROC_GETSTAT
430177633Sdfr#define RPCBSTAT_HIGHPROC 13
431177633Sdfr#define RPCBVERS_STAT 3
432177633Sdfr#define RPCBVERS_4_STAT 2
433177633Sdfr#define RPCBVERS_3_STAT 1
434177633Sdfr#define RPCBVERS_2_STAT 0
435177633Sdfr
436177633Sdfr/* Link list of all the stats about getport and getaddr */
437177633Sdfr
438177633Sdfrstruct rpcbs_addrlist {
439177633Sdfr rpcprog_t prog;
440177633Sdfr rpcvers_t vers;
441177633Sdfr int success;
442177633Sdfr int failure;
443177633Sdfr char *netid;
444177633Sdfr struct rpcbs_addrlist *next;
445177633Sdfr};
446177633Sdfrtypedef struct rpcbs_addrlist rpcbs_addrlist;
447177633Sdfr
448177633Sdfr/* Link list of all the stats about rmtcall */
449177633Sdfr
450177633Sdfrstruct rpcbs_rmtcalllist {
451177633Sdfr rpcprog_t prog;
452177633Sdfr rpcvers_t vers;
453177633Sdfr rpcproc_t proc;
454177633Sdfr int success;
455177633Sdfr int failure;
456177633Sdfr int indirect;
457177633Sdfr char *netid;
458177633Sdfr struct rpcbs_rmtcalllist *next;
459177633Sdfr};
460177633Sdfrtypedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
461177633Sdfr
462177633Sdfrtypedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
463177633Sdfr
464177633Sdfrtypedef rpcbs_addrlist *rpcbs_addrlist_ptr;
465177633Sdfr
466177633Sdfrtypedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
467177633Sdfr
468177633Sdfrstruct rpcb_stat {
469177633Sdfr rpcbs_proc info;
470177633Sdfr int setinfo;
471177633Sdfr int unsetinfo;
472177633Sdfr rpcbs_addrlist_ptr addrinfo;
473177633Sdfr rpcbs_rmtcalllist_ptr rmtinfo;
474177633Sdfr};
475177633Sdfrtypedef struct rpcb_stat rpcb_stat;
476177633Sdfr
477177633Sdfr/*
478177633Sdfr * One rpcb_stat structure is returned for each version of rpcbind
479177633Sdfr * being monitored.
480177633Sdfr */
481177633Sdfr
482177633Sdfrtypedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
483177633Sdfr
484177633Sdfr#ifdef __cplusplus
485177633Sdfr}
486177633Sdfr#endif
487177633Sdfr
488177633Sdfr#endif /* ndef _KERNEL */
489177633Sdfr
490177633Sdfr#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock"
491177633Sdfr
492177633Sdfr#define	RPCBPROG ((unsigned long)(100000))
493177633Sdfr#define	RPCBVERS ((unsigned long)(3))
494177633Sdfr
495177633Sdfrextern  void rpcbprog_3(struct svc_req *rqstp, SVCXPRT *transp);
496177633Sdfr#define	RPCBPROC_SET ((unsigned long)(1))
497177633Sdfrextern  bool_t * rpcbproc_set_3(RPCB *, CLIENT *);
498177633Sdfrextern  bool_t * rpcbproc_set_3_svc(RPCB *, struct svc_req *);
499177633Sdfr#define	RPCBPROC_UNSET ((unsigned long)(2))
500177633Sdfrextern  bool_t * rpcbproc_unset_3(RPCB *, CLIENT *);
501177633Sdfrextern  bool_t * rpcbproc_unset_3_svc(RPCB *, struct svc_req *);
502177633Sdfr#define	RPCBPROC_GETADDR ((unsigned long)(3))
503177633Sdfrextern  char ** rpcbproc_getaddr_3(RPCB *, CLIENT *);
504177633Sdfrextern  char ** rpcbproc_getaddr_3_svc(RPCB *, struct svc_req *);
505177633Sdfr#define	RPCBPROC_DUMP ((unsigned long)(4))
506177633Sdfrextern  rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *);
507177633Sdfrextern  rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *);
508177633Sdfr#define	RPCBPROC_CALLIT ((unsigned long)(5))
509177633Sdfrextern  rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *);
510177633Sdfrextern  rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *);
511177633Sdfr#define	RPCBPROC_GETTIME ((unsigned long)(6))
512177633Sdfrextern  u_int * rpcbproc_gettime_3(void *, CLIENT *);
513177633Sdfrextern  u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *);
514177633Sdfr#define	RPCBPROC_UADDR2TADDR ((unsigned long)(7))
515177633Sdfrextern  struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *);
516177633Sdfrextern  struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *);
517177633Sdfr#define	RPCBPROC_TADDR2UADDR ((unsigned long)(8))
518177633Sdfrextern  char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *);
519177633Sdfrextern  char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *);
520177633Sdfrextern int rpcbprog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
521177633Sdfr#define	RPCBVERS4 ((unsigned long)(4))
522177633Sdfr
523177633Sdfrextern  void rpcbprog_4(struct svc_req *rqstp, SVCXPRT *transp);
524177633Sdfrextern  bool_t * rpcbproc_set_4(RPCB *, CLIENT *);
525177633Sdfrextern  bool_t * rpcbproc_set_4_svc(RPCB *, struct svc_req *);
526177633Sdfrextern  bool_t * rpcbproc_unset_4(RPCB *, CLIENT *);
527177633Sdfrextern  bool_t * rpcbproc_unset_4_svc(RPCB *, struct svc_req *);
528177633Sdfrextern  char ** rpcbproc_getaddr_4(RPCB *, CLIENT *);
529177633Sdfrextern  char ** rpcbproc_getaddr_4_svc(RPCB *, struct svc_req *);
530177633Sdfrextern  rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *);
531177633Sdfrextern  rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *);
532177633Sdfr#define	RPCBPROC_BCAST ((unsigned long)(RPCBPROC_CALLIT))
533177633Sdfrextern  rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *);
534177633Sdfrextern  rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *);
535177633Sdfrextern  u_int * rpcbproc_gettime_4(void *, CLIENT *);
536177633Sdfrextern  u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *);
537177633Sdfrextern  struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *);
538177633Sdfrextern  struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *);
539177633Sdfrextern  char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *);
540177633Sdfrextern  char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *);
541177633Sdfr#define	RPCBPROC_GETVERSADDR ((unsigned long)(9))
542177633Sdfrextern  char ** rpcbproc_getversaddr_4(RPCB *, CLIENT *);
543177633Sdfrextern  char ** rpcbproc_getversaddr_4_svc(RPCB *, struct svc_req *);
544177633Sdfr#define	RPCBPROC_INDIRECT ((unsigned long)(10))
545177633Sdfrextern  rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *);
546177633Sdfrextern  rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *);
547177633Sdfr#define	RPCBPROC_GETADDRLIST ((unsigned long)(11))
548177633Sdfrextern  rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(RPCB *, CLIENT *);
549177633Sdfrextern  rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(RPCB *, struct svc_req *);
550177633Sdfr#define	RPCBPROC_GETSTAT ((unsigned long)(12))
551177633Sdfrextern  rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *);
552177633Sdfrextern  rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *);
553177633Sdfrextern int rpcbprog_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
554177633Sdfr
555177633Sdfr/* the xdr functions */
556177633Sdfrextern  bool_t xdr_rpcb(XDR *, RPCB *);
557177633Sdfr#ifndef _KERNEL
558177633Sdfrextern  bool_t xdr_rp__list(XDR *, rp__list*);
559177633Sdfr#endif
560177633Sdfrextern  bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*);
561177633Sdfrextern  bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*);
562177633Sdfrextern  bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*);
563177633Sdfrextern  bool_t xdr_rpcb_entry(XDR *, rpcb_entry*);
564177633Sdfrextern  bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*);
565177633Sdfrextern  bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*);
566177633Sdfrextern  bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*);
567177633Sdfrextern  bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*);
568177633Sdfrextern  bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc);
569177633Sdfrextern  bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*);
570177633Sdfrextern  bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*);
571177633Sdfrextern  bool_t xdr_rpcb_stat(XDR *, rpcb_stat*);
572177633Sdfrextern  bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers);
573177633Sdfr
574177633Sdfr#ifdef __cplusplus
575177633Sdfr}
576177633Sdfr#endif
577177633Sdfr
578177633Sdfr#endif /* !_RPCB_PROT_H_RPCGEN */
579