174462Salfred/* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 274462Salfred/* $FreeBSD: releng/11.0/include/rpc/rpcb_clnt.h 258578 2013-11-25 19:04:36Z hrs $ */ 374462Salfred 4258578Shrs/*- 5258578Shrs * Copyright (c) 2009, Sun Microsystems, Inc. 6258578Shrs * All rights reserved. 7258578Shrs * 8258578Shrs * Redistribution and use in source and binary forms, with or without 9258578Shrs * modification, are permitted provided that the following conditions are met: 10258578Shrs * - Redistributions of source code must retain the above copyright notice, 11258578Shrs * this list of conditions and the following disclaimer. 12258578Shrs * - Redistributions in binary form must reproduce the above copyright notice, 13258578Shrs * this list of conditions and the following disclaimer in the documentation 14258578Shrs * and/or other materials provided with the distribution. 15258578Shrs * - Neither the name of Sun Microsystems, Inc. nor the names of its 16258578Shrs * contributors may be used to endorse or promote products derived 17258578Shrs * from this software without specific prior written permission. 18258578Shrs * 19258578Shrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20258578Shrs * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21258578Shrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22258578Shrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23258578Shrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24258578Shrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25258578Shrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26258578Shrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27258578Shrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28258578Shrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29258578Shrs * POSSIBILITY OF SUCH DAMAGE. 3074462Salfred */ 3174462Salfred/* 3274462Salfred * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 3374462Salfred */ 3474462Salfred 3574462Salfred/* 3674462Salfred * rpcb_clnt.h 3774462Salfred * Supplies C routines to get to rpcbid services. 3874462Salfred * 3974462Salfred */ 4074462Salfred 4174462Salfred/* 4274462Salfred * Usage: 4374462Salfred * success = rpcb_set(program, version, nconf, address); 4474462Salfred * success = rpcb_unset(program, version, nconf); 4574462Salfred * success = rpcb_getaddr(program, version, nconf, host); 4674462Salfred * head = rpcb_getmaps(nconf, host); 4774462Salfred * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, 4874462Salfred * xdrargs, argsp, xdrres, resp, tout, addr_ptr) 4974462Salfred * success = rpcb_gettime(host, timep) 5074462Salfred * uaddr = rpcb_taddr2uaddr(nconf, taddr); 5174462Salfred * taddr = rpcb_uaddr2uaddr(nconf, uaddr); 5274462Salfred */ 5374462Salfred 5474462Salfred#ifndef _RPC_RPCB_CLNT_H 5574462Salfred#define _RPC_RPCB_CLNT_H 5674462Salfred 5774462Salfred/* #pragma ident "@(#)rpcb_clnt.h 1.13 94/04/25 SMI" */ 5874462Salfred/* rpcb_clnt.h 1.3 88/12/05 SMI */ 5974462Salfred 6074462Salfred#include <rpc/types.h> 6174462Salfred#include <rpc/rpcb_prot.h> 6274462Salfred 6374462Salfred__BEGIN_DECLS 6493032Simpextern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, 6593032Simp const struct netconfig *, const struct netbuf *); 6693032Simpextern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t, 6793032Simp const struct netconfig *); 6893032Simpextern rpcblist *rpcb_getmaps(const struct netconfig *, const char *); 6993032Simpextern enum clnt_stat rpcb_rmtcall(const struct netconfig *, 7093032Simp const char *, const rpcprog_t, 7193032Simp const rpcvers_t, const rpcproc_t, 7293032Simp const xdrproc_t, const caddr_t, 7393032Simp const xdrproc_t, const caddr_t, 7493032Simp const struct timeval, 7593032Simp const struct netbuf *); 7693032Simpextern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, 7793032Simp const struct netconfig *, struct netbuf *, 7893032Simp const char *); 7993032Simpextern bool_t rpcb_gettime(const char *, time_t *); 8093032Simpextern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); 8193032Simpextern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); 8274462Salfred__END_DECLS 8374462Salfred 8474462Salfred#endif /* !_RPC_RPCB_CLNT_H */ 85