xref: /dflybsd-src/include/rpc/rpcb_clnt.h (revision ce0e08e21d42c06c0014fae6b9d27144aa5109b0)
1 /*
2  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3  * unrestricted use provided that this legend is included on all tape
4  * media and as a part of the software program in whole or part.  Users
5  * may copy or modify Sun RPC without charge, but are not authorized
6  * to license or distribute it to anyone else except as part of a product or
7  * program developed by the user.
8  *
9  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
10  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
11  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
12  *
13  * Sun RPC is provided with no support and without any obligation on the
14  * part of Sun Microsystems, Inc. to assist in its use, correction,
15  * modification or enhancement.
16  *
17  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
18  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
19  * OR ANY PART THEREOF.
20  *
21  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
22  * or profits or other special, indirect and consequential damages, even if
23  * Sun has been advised of the possibility of such damages.
24  *
25  * Sun Microsystems, Inc.
26  * 2550 Garcia Avenue
27  * Mountain View, California  94043
28  *
29  *	from: @(#)rpcb_clnt.h	1.13	94/04/25 SMI
30  *	from: rpcb_clnt.h 1.3 88/12/05 SMI
31  * $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $
32  * $FreeBSD: src/include/rpc/rpcb_clnt.h,v 1.2 2002/03/23 17:24:55 imp Exp $
33  * $DragonFly$
34  */
35 /*
36  * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
37  */
38 
39 /*
40  * rpcb_clnt.h
41  * Supplies C routines to get to rpcbid services.
42  *
43  */
44 
45 /*
46  * Usage:
47  *	success = rpcb_set(program, version, nconf, address);
48  *	success = rpcb_unset(program, version, nconf);
49  *	success = rpcb_getaddr(program, version, nconf, host);
50  *	head = rpcb_getmaps(nconf, host);
51  *	clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure,
52  *		xdrargs, argsp, xdrres, resp, tout, addr_ptr)
53  *	success = rpcb_gettime(host, timep)
54  *	uaddr = rpcb_taddr2uaddr(nconf, taddr);
55  *	taddr = rpcb_uaddr2uaddr(nconf, uaddr);
56  */
57 
58 #ifndef _RPC_RPCB_CLNT_H_
59 #define	_RPC_RPCB_CLNT_H_
60 
61 
62 #include <rpc/types.h>
63 #include <rpc/rpcb_prot.h>
64 
65 __BEGIN_DECLS
66 extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
67 		       const struct netconfig  *, const struct netbuf *);
68 extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t,
69 			 const struct netconfig *);
70 extern rpcblist	*rpcb_getmaps(const struct netconfig *, const char *);
71 extern enum clnt_stat rpcb_rmtcall(const struct netconfig *,
72 				   const char *, const rpcprog_t,
73 				   const rpcvers_t, const rpcproc_t,
74 				   const xdrproc_t, const caddr_t,
75 				   const xdrproc_t, const caddr_t,
76 				   const struct timeval,
77 				   const struct netbuf *);
78 extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t,
79 			   const struct netconfig *, struct netbuf *,
80 			   const  char *);
81 extern bool_t rpcb_gettime(const char *, time_t *);
82 extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *);
83 extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
84 __END_DECLS
85 
86 #endif	/* !_RPC_RPCB_CLNT_H_ */
87