18360efbdSAlfred Perlstein /* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 28360efbdSAlfred Perlstein /* $FreeBSD$ */ 38360efbdSAlfred Perlstein 4*2e322d37SHiroki Sato /*- 5*2e322d37SHiroki Sato * Copyright (c) 2009, Sun Microsystems, Inc. 6*2e322d37SHiroki Sato * All rights reserved. 78360efbdSAlfred Perlstein * 8*2e322d37SHiroki Sato * Redistribution and use in source and binary forms, with or without 9*2e322d37SHiroki Sato * modification, are permitted provided that the following conditions are met: 10*2e322d37SHiroki Sato * - Redistributions of source code must retain the above copyright notice, 11*2e322d37SHiroki Sato * this list of conditions and the following disclaimer. 12*2e322d37SHiroki Sato * - Redistributions in binary form must reproduce the above copyright notice, 13*2e322d37SHiroki Sato * this list of conditions and the following disclaimer in the documentation 14*2e322d37SHiroki Sato * and/or other materials provided with the distribution. 15*2e322d37SHiroki Sato * - Neither the name of Sun Microsystems, Inc. nor the names of its 16*2e322d37SHiroki Sato * contributors may be used to endorse or promote products derived 17*2e322d37SHiroki Sato * from this software without specific prior written permission. 188360efbdSAlfred Perlstein * 19*2e322d37SHiroki Sato * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20*2e322d37SHiroki Sato * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21*2e322d37SHiroki Sato * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22*2e322d37SHiroki Sato * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23*2e322d37SHiroki Sato * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24*2e322d37SHiroki Sato * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25*2e322d37SHiroki Sato * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26*2e322d37SHiroki Sato * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27*2e322d37SHiroki Sato * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28*2e322d37SHiroki Sato * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29*2e322d37SHiroki Sato * POSSIBILITY OF SUCH DAMAGE. 308360efbdSAlfred Perlstein */ 318360efbdSAlfred Perlstein /* 328360efbdSAlfred Perlstein * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 338360efbdSAlfred Perlstein */ 348360efbdSAlfred Perlstein 358360efbdSAlfred Perlstein /* 368360efbdSAlfred Perlstein * rpcb_clnt.h 378360efbdSAlfred Perlstein * Supplies C routines to get to rpcbid services. 388360efbdSAlfred Perlstein * 398360efbdSAlfred Perlstein */ 408360efbdSAlfred Perlstein 418360efbdSAlfred Perlstein /* 428360efbdSAlfred Perlstein * Usage: 438360efbdSAlfred Perlstein * success = rpcb_set(program, version, nconf, address); 448360efbdSAlfred Perlstein * success = rpcb_unset(program, version, nconf); 458360efbdSAlfred Perlstein * success = rpcb_getaddr(program, version, nconf, host); 468360efbdSAlfred Perlstein * head = rpcb_getmaps(nconf, host); 478360efbdSAlfred Perlstein * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, 488360efbdSAlfred Perlstein * xdrargs, argsp, xdrres, resp, tout, addr_ptr) 498360efbdSAlfred Perlstein * success = rpcb_gettime(host, timep) 508360efbdSAlfred Perlstein * uaddr = rpcb_taddr2uaddr(nconf, taddr); 518360efbdSAlfred Perlstein * taddr = rpcb_uaddr2uaddr(nconf, uaddr); 528360efbdSAlfred Perlstein */ 538360efbdSAlfred Perlstein 548360efbdSAlfred Perlstein #ifndef _RPC_RPCB_CLNT_H 558360efbdSAlfred Perlstein #define _RPC_RPCB_CLNT_H 568360efbdSAlfred Perlstein 578360efbdSAlfred Perlstein /* #pragma ident "@(#)rpcb_clnt.h 1.13 94/04/25 SMI" */ 588360efbdSAlfred Perlstein /* rpcb_clnt.h 1.3 88/12/05 SMI */ 598360efbdSAlfred Perlstein 608360efbdSAlfred Perlstein #include <rpc/types.h> 618360efbdSAlfred Perlstein #include <rpc/rpcb_prot.h> 628360efbdSAlfred Perlstein 638360efbdSAlfred Perlstein __BEGIN_DECLS 64bb28f3c2SWarner Losh extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, 65bb28f3c2SWarner Losh const struct netconfig *, const struct netbuf *); 66bb28f3c2SWarner Losh extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t, 67bb28f3c2SWarner Losh const struct netconfig *); 68bb28f3c2SWarner Losh extern rpcblist *rpcb_getmaps(const struct netconfig *, const char *); 69bb28f3c2SWarner Losh extern enum clnt_stat rpcb_rmtcall(const struct netconfig *, 708360efbdSAlfred Perlstein const char *, const rpcprog_t, 718360efbdSAlfred Perlstein const rpcvers_t, const rpcproc_t, 728360efbdSAlfred Perlstein const xdrproc_t, const caddr_t, 738360efbdSAlfred Perlstein const xdrproc_t, const caddr_t, 748360efbdSAlfred Perlstein const struct timeval, 75bb28f3c2SWarner Losh const struct netbuf *); 76bb28f3c2SWarner Losh extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, 778360efbdSAlfred Perlstein const struct netconfig *, struct netbuf *, 78bb28f3c2SWarner Losh const char *); 79bb28f3c2SWarner Losh extern bool_t rpcb_gettime(const char *, time_t *); 80bb28f3c2SWarner Losh extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); 81bb28f3c2SWarner Losh extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); 828360efbdSAlfred Perlstein __END_DECLS 838360efbdSAlfred Perlstein 848360efbdSAlfred Perlstein #endif /* !_RPC_RPCB_CLNT_H */ 85