rpcb_clnt.h revision 261046
1177633Sdfr/* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 2177633Sdfr/* $FreeBSD: stable/10/sys/rpc/rpcb_clnt.h 261046 2014-01-22 23:45:27Z mav $ */ 3177633Sdfr 4261046Smav/*- 5261046Smav * Copyright (c) 2009, Sun Microsystems, Inc. 6261046Smav * All rights reserved. 7261046Smav * 8261046Smav * Redistribution and use in source and binary forms, with or without 9261046Smav * modification, are permitted provided that the following conditions are met: 10261046Smav * - Redistributions of source code must retain the above copyright notice, 11261046Smav * this list of conditions and the following disclaimer. 12261046Smav * - Redistributions in binary form must reproduce the above copyright notice, 13261046Smav * this list of conditions and the following disclaimer in the documentation 14261046Smav * and/or other materials provided with the distribution. 15261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 16261046Smav * contributors may be used to endorse or promote products derived 17261046Smav * from this software without specific prior written permission. 18177633Sdfr * 19261046Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29261046Smav * POSSIBILITY OF SUCH DAMAGE. 30177633Sdfr */ 31177633Sdfr/* 32177633Sdfr * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 33177633Sdfr */ 34177633Sdfr 35177633Sdfr/* 36177633Sdfr * rpcb_clnt.h 37177633Sdfr * Supplies C routines to get to rpcbid services. 38177633Sdfr * 39177633Sdfr */ 40177633Sdfr 41177633Sdfr/* 42177633Sdfr * Usage: 43177633Sdfr * success = rpcb_set(program, version, nconf, address); 44177633Sdfr * success = rpcb_unset(program, version, nconf); 45177633Sdfr * success = rpcb_getaddr(program, version, nconf, host); 46177633Sdfr * head = rpcb_getmaps(nconf, host); 47177633Sdfr * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, 48177633Sdfr * xdrargs, argsp, xdrres, resp, tout, addr_ptr) 49177633Sdfr * success = rpcb_gettime(host, timep) 50177633Sdfr * uaddr = rpcb_taddr2uaddr(nconf, taddr); 51177633Sdfr * taddr = rpcb_uaddr2uaddr(nconf, uaddr); 52177633Sdfr */ 53177633Sdfr 54177633Sdfr#ifndef _RPC_RPCB_CLNT_H 55177633Sdfr#define _RPC_RPCB_CLNT_H 56177633Sdfr 57177633Sdfr/* #pragma ident "@(#)rpcb_clnt.h 1.13 94/04/25 SMI" */ 58177633Sdfr/* rpcb_clnt.h 1.3 88/12/05 SMI */ 59177633Sdfr 60177633Sdfr#include <rpc/types.h> 61177633Sdfr#ifndef _KERNEL 62177633Sdfr#include <rpc/rpcb_prot.h> 63177633Sdfr#endif 64177633Sdfr 65177633Sdfr__BEGIN_DECLS 66177633Sdfrextern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, 67177633Sdfr const struct netconfig *, const struct netbuf *); 68177633Sdfrextern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t, 69177633Sdfr const struct netconfig *); 70177633Sdfr#ifndef _KERNEL 71177633Sdfrextern rpcblist *rpcb_getmaps(const struct netconfig *, const char *); 72177633Sdfrextern enum clnt_stat rpcb_rmtcall(const struct netconfig *, 73177633Sdfr const char *, const rpcprog_t, 74177633Sdfr const rpcvers_t, const rpcproc_t, 75177633Sdfr const xdrproc_t, const caddr_t, 76177633Sdfr const xdrproc_t, const caddr_t, 77177633Sdfr const struct timeval, 78177633Sdfr const struct netbuf *); 79177633Sdfrextern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, 80177633Sdfr const struct netconfig *, struct netbuf *, 81177633Sdfr const char *); 82177633Sdfrextern bool_t rpcb_gettime(const char *, time_t *); 83177633Sdfrextern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); 84177633Sdfrextern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); 85177633Sdfr#endif 86177633Sdfr__END_DECLS 87177633Sdfr 88177633Sdfr#endif /* !_RPC_RPCB_CLNT_H */ 89