126219Swpaul/* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 226219Swpaul 326219Swpaul/*- 426219Swpaul * SPDX-License-Identifier: BSD-3-Clause 526219Swpaul * 6261046Smav * Copyright (c) 2009, Sun Microsystems, Inc. 7261046Smav * All rights reserved. 8261046Smav * 9261046Smav * Redistribution and use in source and binary forms, with or without 10261046Smav * modification, are permitted provided that the following conditions are met: 11261046Smav * - Redistributions of source code must retain the above copyright notice, 12261046Smav * this list of conditions and the following disclaimer. 13261046Smav * - Redistributions in binary form must reproduce the above copyright notice, 14261046Smav * this list of conditions and the following disclaimer in the documentation 15261046Smav * and/or other materials provided with the distribution. 16261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 17261046Smav * contributors may be used to endorse or promote products derived 18261046Smav * from this software without specific prior written permission. 19261046Smav * 2026219Swpaul * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 24261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30261046Smav * POSSIBILITY OF SUCH DAMAGE. 31261046Smav */ 3226219Swpaul/* 3326219Swpaul * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 3426219Swpaul */ 3526219Swpaul 3626219Swpaul/* 3726219Swpaul * rpcb_clnt.h 3826219Swpaul * Supplies C routines to get to rpcbid services. 3926219Swpaul * 4026219Swpaul */ 4126219Swpaul 4226219Swpaul/* 4326219Swpaul * Usage: 4426219Swpaul * success = rpcb_set(program, version, nconf, address); 4526219Swpaul * success = rpcb_unset(program, version, nconf); 4626219Swpaul * success = rpcb_getaddr(program, version, nconf, host); 4726219Swpaul * head = rpcb_getmaps(nconf, host); 4875094Siedowse * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, 4974462Salfred * xdrargs, argsp, xdrres, resp, tout, addr_ptr) 5026219Swpaul * success = rpcb_gettime(host, timep) 5126219Swpaul * uaddr = rpcb_taddr2uaddr(nconf, taddr); 5271579Sdeischen * taddr = rpcb_uaddr2uaddr(nconf, uaddr); 5326219Swpaul */ 5426219Swpaul 5526219Swpaul#ifndef _RPC_RPCB_CLNT_H 5626219Swpaul#define _RPC_RPCB_CLNT_H 5726219Swpaul 5826219Swpaul/* rpcb_clnt.h 1.3 88/12/05 SMI */ 5926219Swpaul 6026219Swpaul#include <rpc/types.h> 6126219Swpaul#include <rpc/rpcb_prot.h> 6226219Swpaul 6326219Swpaul__BEGIN_DECLS 6474462Salfredextern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, 6526219Swpaul const struct netconfig *, const struct netbuf *); 6626219Swpaulextern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t, 6792990Sobrien const struct netconfig *); 6826219Swpaulextern rpcblist *rpcb_getmaps(const struct netconfig *, const char *); 6992990Sobrienextern enum clnt_stat rpcb_rmtcall(const struct netconfig *, 7092990Sobrien const char *, const rpcprog_t, 7126219Swpaul const rpcvers_t, const rpcproc_t, 7290271Salfred const xdrproc_t, const caddr_t, 7390271Salfred const xdrproc_t, const caddr_t, 7426219Swpaul const struct timeval, 7526219Swpaul const struct netbuf *); 7626219Swpaulextern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, 7726219Swpaul const struct netconfig *, struct netbuf *, 7826219Swpaul const char *); 7926219Swpaulextern bool_t rpcb_gettime(const char *, time_t *); 8026219Swpaulextern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); 8126219Swpaulextern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); 8226219Swpaul__END_DECLS 8326219Swpaul 8426219Swpaul#endif /* !_RPC_RPCB_CLNT_H */ 8526219Swpaul