1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 27 /* All Rights Reserved */ 28 /* 29 * Portions of this source code were derived from Berkeley 30 * 4.3 BSD under license from the Regents of the University of 31 * California. 32 */ 33 34 /* 35 * rpcb_clnt.h 36 * Supplies C routines to get to rpcbind services. 37 */ 38 39 /* 40 * Usage: 41 * success = rpcb_set(program, version, nconf, address); 42 * success = rpcb_unset(program, version, nconf); 43 * success = rpcb_getaddr(program, version, nconf, host); 44 * head = rpcb_getmaps(nconf, host); 45 * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, 46 * xdrargs, argsp, xdrres, resp, tout, addr_ptr) 47 * success = rpcb_gettime(host, timep) 48 * uaddr = rpcb_taddr2uaddr(nconf, taddr); 49 * taddr = rpcb_uaddr2uaddr(nconf, uaddr); 50 */ 51 52 #ifndef _RPC_RPCB_CLNT_H 53 #define _RPC_RPCB_CLNT_H 54 55 #pragma ident "%Z%%M% %I% %E% SMI" 56 57 #include <rpc/types.h> 58 #include <rpc/rpcb_prot.h> 59 #include <sys/netconfig.h> 60 61 #ifdef __cplusplus 62 extern "C" { 63 #endif 64 65 #ifdef __STDC__ 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 *, const char *, 72 const rpcprog_t, const rpcvers_t, const rpcproc_t, const xdrproc_t, 73 const caddr_t, const xdrproc_t, const caddr_t, 74 const struct timeval, struct netbuf *); 75 extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, 76 const struct netconfig *, struct netbuf *, const char *); 77 extern bool_t rpcb_gettime(const char *, time_t *); 78 extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); 79 extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); 80 #else 81 extern bool_t rpcb_set(); 82 extern bool_t rpcb_unset(); 83 extern rpcblist *rpcb_getmaps(); 84 extern enum clnt_stat rpcb_rmtcall(); 85 extern bool_t rpcb_getaddr(); 86 extern bool_t rpcb_gettime(); 87 extern char *rpcb_taddr2uaddr(); 88 extern struct netbuf *rpcb_uaddr2taddr(); 89 #endif 90 91 #ifdef __cplusplus 92 } 93 #endif 94 95 #endif /* !_RPC_RPCB_CLNT_H */ 96