clnt.h revision 74462
174462Salfred/*	$NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $	*/
274462Salfred
31839Swollman/*
41839Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
51839Swollman * unrestricted use provided that this legend is included on all tape
61839Swollman * media and as a part of the software program in whole or part.  Users
71839Swollman * may copy or modify Sun RPC without charge, but are not authorized
81839Swollman * to license or distribute it to anyone else except as part of a product or
91839Swollman * program developed by the user.
108858Srgrimes *
111839Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
1213771Smpp * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
131839Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
148858Srgrimes *
151839Swollman * Sun RPC is provided with no support and without any obligation on the
161839Swollman * part of Sun Microsystems, Inc. to assist in its use, correction,
171839Swollman * modification or enhancement.
188858Srgrimes *
191839Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
201839Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
211839Swollman * OR ANY PART THEREOF.
228858Srgrimes *
231839Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue
241839Swollman * or profits or other special, indirect and consequential damages, even if
251839Swollman * Sun has been advised of the possibility of such damages.
268858Srgrimes *
271839Swollman * Sun Microsystems, Inc.
281839Swollman * 2550 Garcia Avenue
291839Swollman * Mountain View, California  94043
301903Swollman *
3174462Salfred *	from: @(#)clnt.h 1.31 94/04/29 SMI
321903Swollman *	from: @(#)clnt.h	2.1 88/07/29 4.0 RPCSRC
3350473Speter * $FreeBSD: head/include/rpc/clnt.h 74462 2001-03-19 12:50:13Z alfred $
341839Swollman */
351839Swollman
361839Swollman/*
371839Swollman * clnt.h - Client side remote procedure call interface.
381839Swollman *
391839Swollman * Copyright (C) 1984, Sun Microsystems, Inc.
401839Swollman */
411839Swollman
421903Swollman#ifndef _RPC_CLNT_H_
431903Swollman#define _RPC_CLNT_H_
4474462Salfred#include <rpc/clnt_stat.h>
451903Swollman#include <sys/cdefs.h>
4674462Salfred#include <netconfig.h>
4726211Swpaul#include <sys/un.h>
481839Swollman
491839Swollman/*
5074462Salfred * Well-known IPV6 RPC broadcast address.
511839Swollman */
5274462Salfred#define RPCB_MULTICAST_ADDR "ff02::202"
531839Swollman
5474462Salfred/*
5574462Salfred * the following errors are in general unrecoverable.  The caller
5674462Salfred * should give up rather than retry.
5774462Salfred */
5874462Salfred#define IS_UNRECOVERABLE_RPC(s) (((s) == RPC_AUTHERROR) || \
5974462Salfred	((s) == RPC_CANTENCODEARGS) || \
6074462Salfred	((s) == RPC_CANTDECODERES) || \
6174462Salfred	((s) == RPC_VERSMISMATCH) || \
6274462Salfred	((s) == RPC_PROCUNAVAIL) || \
6374462Salfred	((s) == RPC_PROGUNAVAIL) || \
6474462Salfred	((s) == RPC_PROGVERSMISMATCH) || \
6574462Salfred	((s) == RPC_CANTDECODEARGS))
661839Swollman
671839Swollman/*
681839Swollman * Error info.
691839Swollman */
701839Swollmanstruct rpc_err {
711839Swollman	enum clnt_stat re_status;
721839Swollman	union {
7313771Smpp		int RE_errno;		/* related system error */
741839Swollman		enum auth_stat RE_why;	/* why the auth error occurred */
751839Swollman		struct {
7674462Salfred			rpcvers_t low;	/* lowest version supported */
7774462Salfred			rpcvers_t high;	/* highest version supported */
781839Swollman		} RE_vers;
791839Swollman		struct {		/* maybe meaningful if RPC_FAILED */
8021059Speter			int32_t s1;
8121059Speter			int32_t s2;
821839Swollman		} RE_lb;		/* life boot & debugging only */
831839Swollman	} ru;
841839Swollman#define	re_errno	ru.RE_errno
851839Swollman#define	re_why		ru.RE_why
861839Swollman#define	re_vers		ru.RE_vers
871839Swollman#define	re_lb		ru.RE_lb
881839Swollman};
891839Swollman
901839Swollman
911839Swollman/*
921839Swollman * Client rpc handle.
9374462Salfred * Created by individual implementations
941839Swollman * Client is responsible for initializing auth, see e.g. auth_none.c.
951839Swollman */
9621059Spetertypedef struct __rpc_client {
971839Swollman	AUTH	*cl_auth;			/* authenticator */
981839Swollman	struct clnt_ops {
9921059Speter		/* call remote procedure */
10021059Speter		enum clnt_stat	(*cl_call) __P((struct __rpc_client *,
10174462Salfred				    rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
10221059Speter					caddr_t, struct timeval));
10321059Speter		/* abort a call */
10421059Speter		void		(*cl_abort) __P((struct __rpc_client *));
10521059Speter		/* get specific error code */
10621059Speter		void		(*cl_geterr) __P((struct __rpc_client *,
10721059Speter					struct rpc_err *));
10821059Speter		/* frees results */
10921059Speter		bool_t		(*cl_freeres) __P((struct __rpc_client *,
11021059Speter					xdrproc_t, caddr_t));
11121059Speter		/* destroy this structure */
11221059Speter		void		(*cl_destroy) __P((struct __rpc_client *));
11321059Speter		/* the ioctl() of rpc */
11421059Speter		bool_t          (*cl_control) __P((struct __rpc_client *, u_int,
11574462Salfred				    char *));
1161839Swollman	} *cl_ops;
11774462Salfred	void 			*cl_private;	/* private stuff */
11874462Salfred	char			*cl_netid;	/* network token */
11974462Salfred	char			*cl_tp;		/* device name */
1201839Swollman} CLIENT;
1211839Swollman
1221839Swollman
1231839Swollman/*
12474462Salfred * Timers used for the pseudo-transport protocol when using datagrams
12574462Salfred */
12674462Salfredstruct rpc_timers {
12774462Salfred	u_short		rt_srtt;	/* smoothed round-trip time */
12874462Salfred	u_short		rt_deviate;	/* estimated deviation */
12974462Salfred	u_long		rt_rtxcur;	/* current (backed-off) rto */
13074462Salfred};
13174462Salfred
13274462Salfred/*
13374462Salfred * Feedback values used for possible congestion and rate control
13474462Salfred */
13574462Salfred#define FEEDBACK_REXMIT1	1	/* first retransmit */
13674462Salfred#define FEEDBACK_OK		2	/* no retransmits */
13774462Salfred
13874462Salfred/* Used to set version of portmapper used in broadcast */
13974462Salfred
14074462Salfred#define CLCR_SET_LOWVERS	3
14174462Salfred#define CLCR_GET_LOWVERS	4
14274462Salfred
14374462Salfred#define RPCSMALLMSGSIZE 400	/* a more reasonable packet size */
14474462Salfred
14574462Salfred/*
1461839Swollman * client side rpc interface ops
1471839Swollman *
1481839Swollman * Parameter types are:
1491839Swollman *
1501839Swollman */
1511839Swollman
1521839Swollman/*
1531839Swollman * enum clnt_stat
1541839Swollman * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
1551839Swollman * 	CLIENT *rh;
15674462Salfred *	rpcproc_t proc;
1571839Swollman *	xdrproc_t xargs;
1581839Swollman *	caddr_t argsp;
1591839Swollman *	xdrproc_t xres;
1601839Swollman *	caddr_t resp;
1611839Swollman *	struct timeval timeout;
1621839Swollman */
16374462Salfred#define	CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
16474462Salfred	((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
16574462Salfred		(caddr_t)(void *)argsp,	xres, (caddr_t)(void *)resp, secs))
16674462Salfred#define	clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
16774462Salfred	((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
16874462Salfred		(caddr_t)(void *)argsp, xres, (caddr_t)(void *)resp, secs))
1691839Swollman
1701839Swollman/*
1711839Swollman * void
1721839Swollman * CLNT_ABORT(rh);
1731839Swollman * 	CLIENT *rh;
1741839Swollman */
1751839Swollman#define	CLNT_ABORT(rh)	((*(rh)->cl_ops->cl_abort)(rh))
1761839Swollman#define	clnt_abort(rh)	((*(rh)->cl_ops->cl_abort)(rh))
1771839Swollman
1781839Swollman/*
1791839Swollman * struct rpc_err
1801839Swollman * CLNT_GETERR(rh);
1811839Swollman * 	CLIENT *rh;
1821839Swollman */
1831839Swollman#define	CLNT_GETERR(rh,errp)	((*(rh)->cl_ops->cl_geterr)(rh, errp))
1841839Swollman#define	clnt_geterr(rh,errp)	((*(rh)->cl_ops->cl_geterr)(rh, errp))
1851839Swollman
1861839Swollman
1871839Swollman/*
1881839Swollman * bool_t
1891839Swollman * CLNT_FREERES(rh, xres, resp);
1901839Swollman * 	CLIENT *rh;
1911839Swollman *	xdrproc_t xres;
1921839Swollman *	caddr_t resp;
1931839Swollman */
1941839Swollman#define	CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
1951839Swollman#define	clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
1961839Swollman
1971839Swollman/*
1981839Swollman * bool_t
1991839Swollman * CLNT_CONTROL(cl, request, info)
2001839Swollman *      CLIENT *cl;
2011839Swollman *      u_int request;
2021839Swollman *      char *info;
2031839Swollman */
2041839Swollman#define	CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
2051839Swollman#define	clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
2061839Swollman
2071839Swollman/*
20874462Salfred * control operations that apply to both udp and tcp transports
2091839Swollman */
21074462Salfred#define CLSET_TIMEOUT		1	/* set timeout (timeval) */
21174462Salfred#define CLGET_TIMEOUT		2	/* get timeout (timeval) */
21274462Salfred#define CLGET_SERVER_ADDR	3	/* get server's address (sockaddr) */
21374462Salfred#define CLGET_FD		6	/* get connections file descriptor */
21474462Salfred#define CLGET_SVC_ADDR		7	/* get server's address (netbuf) */
21574462Salfred#define CLSET_FD_CLOSE		8	/* close fd while clnt_destroy */
21674462Salfred#define CLSET_FD_NCLOSE		9	/* Do not close fd while clnt_destroy */
21774462Salfred#define CLGET_XID 		10	/* Get xid */
21874462Salfred#define CLSET_XID		11	/* Set xid */
21974462Salfred#define CLGET_VERS		12	/* Get version number */
22074462Salfred#define CLSET_VERS		13	/* Set version number */
22174462Salfred#define CLGET_PROG		14	/* Get program number */
22274462Salfred#define CLSET_PROG		15	/* Set program number */
22374462Salfred#define CLSET_SVC_ADDR		16	/* get server's address (netbuf) */
22474462Salfred#define CLSET_PUSH_TIMOD	17	/* push timod if not already present */
22574462Salfred#define CLSET_POP_TIMOD		18	/* pop timod */
2261839Swollman/*
22774462Salfred * Connectionless only control operations
2281839Swollman */
2291839Swollman#define CLSET_RETRY_TIMEOUT 4   /* set retry timeout (timeval) */
2301839Swollman#define CLGET_RETRY_TIMEOUT 5   /* get retry timeout (timeval) */
2311839Swollman
2321839Swollman/*
2331839Swollman * void
2341839Swollman * CLNT_DESTROY(rh);
2351839Swollman * 	CLIENT *rh;
2361839Swollman */
2371839Swollman#define	CLNT_DESTROY(rh)	((*(rh)->cl_ops->cl_destroy)(rh))
2381839Swollman#define	clnt_destroy(rh)	((*(rh)->cl_ops->cl_destroy)(rh))
2391839Swollman
2401839Swollman
2411839Swollman/*
24213771Smpp * RPCTEST is a test program which is accessible on every rpc
2431839Swollman * transport/port.  It is used for testing, performance evaluation,
2441839Swollman * and network administration.
2451839Swollman */
2461839Swollman
24774462Salfred#define RPCTEST_PROGRAM		((rpcprog_t)1)
24874462Salfred#define RPCTEST_VERSION		((rpcvers_t)1)
24974462Salfred#define RPCTEST_NULL_PROC	((rpcproc_t)2)
25074462Salfred#define RPCTEST_NULL_BATCH_PROC	((rpcproc_t)3)
2511839Swollman
2521839Swollman/*
2531839Swollman * By convention, procedure 0 takes null arguments and returns them
2541839Swollman */
2551839Swollman
25674462Salfred#define NULLPROC ((rpcproc_t)0)
2571839Swollman
2581839Swollman/*
2591839Swollman * Below are the client handle creation routines for the various
2608858Srgrimes * implementations of client side rpc.  They can return NULL if a
2611839Swollman * creation failure occurs.
2621839Swollman */
2631839Swollman
2641839Swollman/*
26574462Salfred * Generic client creation routine. Supported protocols are those that
26674462Salfred * belong to the nettype namespace (/etc/netconfig).
2671839Swollman * CLIENT *
26874462Salfred * clnt_create(host, prog, vers, prot);
26974462Salfred *	const char *host; 	-- hostname
27074462Salfred *	const rpcprog_t prog;	-- program number
27174462Salfred *	const rpcvers_t vers;	-- version number
27274462Salfred *	const char *prot;	-- protocol
2731839Swollman */
2741903Swollman__BEGIN_DECLS
27574462Salfredextern CLIENT *clnt_create __P((const char *, const rpcprog_t, const rpcvers_t,
27674462Salfred				const char *));
27774462Salfred/*
27874462Salfred *
27974462Salfred * 	const char *hostname;			-- hostname
28074462Salfred *	const rpcprog_t prog;			-- program number
28174462Salfred *	const rpcvers_t vers;			-- version number
28274462Salfred *	const char *nettype;			-- network type
28374462Salfred */
2841839Swollman
2851839Swollman/*
28674462Salfred * Generic client creation routine. Supported protocols are which belong
28774462Salfred * to the nettype name space.
2881839Swollman */
28974462Salfredextern CLIENT *clnt_create_vers __P((const char *, const rpcprog_t, rpcvers_t *,
29074462Salfred				     const rpcvers_t, const rpcvers_t,
29174462Salfred				     const char *));
29274462Salfred/*
29374462Salfred *	const char *host;		-- hostname
29474462Salfred *	const rpcprog_t prog;		-- program number
29574462Salfred *	rpcvers_t *vers_out;		-- servers highest available version
29674462Salfred *	const rpcvers_t vers_low;	-- low version number
29774462Salfred *	const rpcvers_t vers_high;	-- high version number
29874462Salfred *	const char *nettype;		-- network type
29974462Salfred */
3001839Swollman
3011839Swollman
3021839Swollman/*
30374462Salfred * Generic client creation routine. It takes a netconfig structure
30474462Salfred * instead of nettype
3051839Swollman */
30674462Salfredextern CLIENT *clnt_tp_create __P((const char *, const rpcprog_t,
30774462Salfred				   const rpcvers_t, const struct netconfig *));
30874462Salfred/*
30974462Salfred *	const char *hostname;			-- hostname
31074462Salfred *	const rpcprog_t prog;			-- program number
31174462Salfred *	const rpcvers_t vers;			-- version number
31274462Salfred *	const struct netconfig *netconf; 	-- network config structure
31374462Salfred */
3141839Swollman
31574462Salfred/*
31674462Salfred * Generic TLI create routine. Only provided for compatibility.
31774462Salfred */
3181903Swollman
31974462Salfredextern CLIENT *clnt_tli_create __P((const int, const struct netconfig *,
32074462Salfred				    const struct netbuf *, const rpcprog_t,
32174462Salfred				    const rpcvers_t, const u_int, const u_int));
3221839Swollman/*
32374462Salfred *	const register int fd;		-- fd
32474462Salfred *	const struct netconfig *nconf;	-- netconfig structure
32574462Salfred *	const struct netbuf *svcaddr;		-- servers address
32674462Salfred *	const u_long prog;			-- program number
32774462Salfred *	const u_long vers;			-- version number
32874462Salfred *	const u_int sendsz;			-- send size
32974462Salfred *	const u_int recvsz;			-- recv size
3301839Swollman */
3311839Swollman
33274462Salfred/*
33374462Salfred * Low level clnt create routine for connectionful transports, e.g. tcp.
33474462Salfred */
33574462Salfredextern CLIENT *clnt_vc_create __P((const int, const struct netbuf *,
33674462Salfred				   const rpcprog_t, const rpcvers_t,
33774462Salfred				   const u_int, const u_int));
33874462Salfred/*
33974462Salfred *	const int fd;				-- open file descriptor
34074462Salfred *	const struct netbuf *svcaddr;		-- servers address
34174462Salfred *	const rpcprog_t prog;			-- program number
34274462Salfred *	const rpcvers_t vers;			-- version number
34374462Salfred *	const u_int sendsz;			-- buffer recv size
34474462Salfred *	const u_int recvsz;			-- buffer send size
34574462Salfred */
3461903Swollman
3471839Swollman/*
34874462Salfred * Low level clnt create routine for connectionless transports, e.g. udp.
34974462Salfred */
35074462Salfredextern CLIENT *clnt_dg_create __P((const int, const struct netbuf *,
35174462Salfred				   const rpcprog_t, const rpcvers_t,
35274462Salfred				   const u_int, const u_int));
35374462Salfred/*
35474462Salfred *	const int fd;				-- open file descriptor
35574462Salfred *	const struct netbuf *svcaddr;		-- servers address
35674462Salfred *	const rpcprog_t program;		-- program number
35774462Salfred *	const rpcvers_t version;		-- version number
35874462Salfred *	const u_int sendsz;			-- buffer recv size
35974462Salfred *	const u_int recvsz;			-- buffer send size
36074462Salfred */
36174462Salfred
36274462Salfred/*
36374462Salfred * Memory based rpc (for speed check and testing)
36426211Swpaul * CLIENT *
36574462Salfred * clnt_raw_create(prog, vers)
36626211Swpaul *	u_long prog;
36774462Salfred *	u_long vers;
36826211Swpaul */
36974462Salfredextern CLIENT *clnt_raw_create	__P((rpcprog_t, rpcvers_t));
37074462Salfred
37126211Swpaul__END_DECLS
37226211Swpaul
37326211Swpaul
37426211Swpaul/*
3751839Swollman * Print why creation failed
3761839Swollman */
3771903Swollman__BEGIN_DECLS
37874462Salfredextern void clnt_pcreateerror	__P((const char *));			/* stderr */
37974462Salfredextern char *clnt_spcreateerror	__P((const char *));			/* string */
3801903Swollman__END_DECLS
3811839Swollman
3821839Swollman/*
3831839Swollman * Like clnt_perror(), but is more verbose in its output
3848858Srgrimes */
3851903Swollman__BEGIN_DECLS
3861903Swollmanextern void clnt_perrno		__P((enum clnt_stat));		/* stderr */
3871903Swollmanextern char *clnt_sperrno	__P((enum clnt_stat));		/* string */
3881903Swollman__END_DECLS
3891839Swollman
3901839Swollman/*
3911839Swollman * Print an English error message, given the client error code
3921839Swollman */
3931903Swollman__BEGIN_DECLS
39474462Salfredextern void clnt_perror		__P((CLIENT *, const char *));	 	/* stderr */
39574462Salfredextern char *clnt_sperror	__P((CLIENT *, const char *));		/* string */
3961903Swollman__END_DECLS
3971839Swollman
3981903Swollman
3998858Srgrimes/*
4001839Swollman * If a creation fails, the following allows the user to figure out why.
4011839Swollman */
4021839Swollmanstruct rpc_createerr {
4031839Swollman	enum clnt_stat cf_stat;
4041839Swollman	struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
4051839Swollman};
4061839Swollman
40774462Salfred#ifdef _THREAD_SAFE
40874462Salfred__BEGIN_DECLS
40974462Salfredextern struct rpc_createerr	*__rpc_createerr __P((void));
41074462Salfred__END_DECLS
41174462Salfred#define rpc_createerr		(*(__rpc_createerr()))
41274462Salfred#else
4131839Swollmanextern struct rpc_createerr rpc_createerr;
41474462Salfred#endif /* _THREAD_SAFE */
4151839Swollman
41674462Salfred/*
41774462Salfred * The simplified interface:
41874462Salfred * enum clnt_stat
41974462Salfred * rpc_call(host, prognum, versnum, procnum, inproc, in, outproc, out, nettype)
42074462Salfred *	const char *host;
42174462Salfred *	const rpcprog_t prognum;
42274462Salfred *	const rpcvers_t versnum;
42374462Salfred *	const rpcproc_t procnum;
42474462Salfred *	const xdrproc_t inproc, outproc;
42574462Salfred *	const char *in;
42674462Salfred *	char *out;
42774462Salfred *	const char *nettype;
42874462Salfred */
42974462Salfred__BEGIN_DECLS
43074462Salfredextern enum clnt_stat rpc_call __P((const char *, const rpcprog_t,
43174462Salfred				    const rpcvers_t, const rpcproc_t,
43274462Salfred				    const xdrproc_t, const char *,
43374462Salfred				    const xdrproc_t, char *, const char *));
43474462Salfred__END_DECLS
4351839Swollman
43674462Salfred/*
43774462Salfred * RPC broadcast interface
43874462Salfred * The call is broadcasted to all locally connected nets.
43974462Salfred *
44074462Salfred * extern enum clnt_stat
44174462Salfred * rpc_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp,
44274462Salfred *			eachresult, nettype)
44374462Salfred *	const rpcprog_t		prog;		-- program number
44474462Salfred *	const rpcvers_t		vers;		-- version number
44574462Salfred *	const rpcproc_t		proc;		-- procedure number
44674462Salfred *	const xdrproc_t	xargs;		-- xdr routine for args
44774462Salfred *	caddr_t		argsp;		-- pointer to args
44874462Salfred *	const xdrproc_t	xresults;	-- xdr routine for results
44974462Salfred *	caddr_t		resultsp;	-- pointer to results
45074462Salfred *	const resultproc_t	eachresult;	-- call with each result
45174462Salfred *	const char		*nettype;	-- Transport type
45274462Salfred *
45374462Salfred * For each valid response received, the procedure eachresult is called.
45474462Salfred * Its form is:
45574462Salfred *		done = eachresult(resp, raddr, nconf)
45674462Salfred *			bool_t done;
45774462Salfred *			caddr_t resp;
45874462Salfred *			struct netbuf *raddr;
45974462Salfred *			struct netconfig *nconf;
46074462Salfred * where resp points to the results of the call and raddr is the
46174462Salfred * address if the responder to the broadcast.  nconf is the transport
46274462Salfred * on which the response was received.
46374462Salfred *
46474462Salfred * extern enum clnt_stat
46574462Salfred * rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp,
46674462Salfred *			eachresult, inittime, waittime, nettype)
46774462Salfred *	const rpcprog_t		prog;		-- program number
46874462Salfred *	const rpcvers_t		vers;		-- version number
46974462Salfred *	const rpcproc_t		proc;		-- procedure number
47074462Salfred *	const xdrproc_t	xargs;		-- xdr routine for args
47174462Salfred *	caddr_t		argsp;		-- pointer to args
47274462Salfred *	const xdrproc_t	xresults;	-- xdr routine for results
47374462Salfred *	caddr_t		resultsp;	-- pointer to results
47474462Salfred *	const resultproc_t	eachresult;	-- call with each result
47574462Salfred *	const int 		inittime;	-- how long to wait initially
47674462Salfred *	const int 		waittime;	-- maximum time to wait
47774462Salfred *	const char		*nettype;	-- Transport type
47874462Salfred */
4791839Swollman
48074462Salfredtypedef bool_t (*resultproc_t) __P((caddr_t, ...));
48174462Salfred
48274462Salfred__BEGIN_DECLS
48374462Salfredextern enum clnt_stat rpc_broadcast __P((const rpcprog_t, const rpcvers_t,
48474462Salfred					 const rpcproc_t, const xdrproc_t,
48574462Salfred					 caddr_t, const xdrproc_t, caddr_t,
48674462Salfred					 const resultproc_t, const char *));
48774462Salfredextern enum clnt_stat rpc_broadcast_exp __P((const rpcprog_t, const rpcvers_t,
48874462Salfred					     const rpcproc_t, const xdrproc_t,
48974462Salfred					     caddr_t, const xdrproc_t, caddr_t,
49074462Salfred					     const resultproc_t, const int,
49174462Salfred					     const int, const char *));
49274462Salfred__END_DECLS
49374462Salfred
49474462Salfred/* For backward compatibility */
49574462Salfred#include <rpc/clnt_soc.h>
49674462Salfred
49774462Salfred#endif /* !_RPC_CLNT_H_ */
498