174462Salfred/* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */ 274462Salfred 3261046Smav/*- 4261046Smav * Copyright (c) 2009, Sun Microsystems, Inc. 5261046Smav * All rights reserved. 68858Srgrimes * 7261046Smav * Redistribution and use in source and binary forms, with or without 8261046Smav * modification, are permitted provided that the following conditions are met: 9261046Smav * - Redistributions of source code must retain the above copyright notice, 10261046Smav * this list of conditions and the following disclaimer. 11261046Smav * - Redistributions in binary form must reproduce the above copyright notice, 12261046Smav * this list of conditions and the following disclaimer in the documentation 13261046Smav * and/or other materials provided with the distribution. 14261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 15261046Smav * contributors may be used to endorse or promote products derived 16261046Smav * from this software without specific prior written permission. 178858Srgrimes * 18261046Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28261046Smav * POSSIBILITY OF SUCH DAMAGE. 291839Swollman * 308858Srgrimes * from: @(#)rpc.h 1.9 88/02/08 SMI 311903Swollman * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC 3250473Speter * $FreeBSD$ 331839Swollman */ 341839Swollman 351839Swollman/* 361839Swollman * rpc.h, Just includes the billions of rpc header files necessary to 371839Swollman * do remote procedure calling. 381839Swollman * 391839Swollman * Copyright (C) 1984, Sun Microsystems, Inc. 401839Swollman */ 411903Swollman#ifndef _RPC_RPC_H 421903Swollman#define _RPC_RPC_H 431839Swollman 441839Swollman#include <rpc/types.h> /* some typedefs */ 4574462Salfred#include <sys/socket.h> 461839Swollman#include <netinet/in.h> 471839Swollman 481839Swollman/* external data representation interfaces */ 491839Swollman#include <rpc/xdr.h> /* generic (de)serializer */ 501839Swollman 511839Swollman/* Client side only authentication */ 521839Swollman#include <rpc/auth.h> /* generic authenticator (client side) */ 531839Swollman 541839Swollman/* Client side (mostly) remote procedure call */ 551839Swollman#include <rpc/clnt.h> /* generic rpc stuff */ 561839Swollman 571839Swollman/* semi-private protocol headers */ 581839Swollman#include <rpc/rpc_msg.h> /* protocol for rpc messages */ 591839Swollman#include <rpc/auth_unix.h> /* protocol for unix style cred */ 601839Swollman/* 618858Srgrimes * Uncomment-out the next line if you are building the rpc library with 621839Swollman * DES Authentication (see the README file in the secure_rpc/ directory). 631839Swollman */ 646685Sphk#include <rpc/auth_des.h> /* protocol for des style cred */ 651839Swollman 661839Swollman/* Server side only remote procedure callee */ 671839Swollman#include <rpc/svc.h> /* service manager and multiplexer */ 681839Swollman#include <rpc/svc_auth.h> /* service side authenticator */ 691839Swollman 7074462Salfred/* Portmapper client, server, and protocol headers */ 7174462Salfred#include <rpc/pmap_clnt.h> 7274462Salfred#include <rpc/pmap_prot.h> 731839Swollman 7474515Salfred#ifndef _KERNEL 7574462Salfred#include <rpc/rpcb_clnt.h> /* rpcbind interface functions */ 7674515Salfred#endif 771839Swollman 7874462Salfred#include <rpc/rpcent.h> 7974462Salfred 801903Swollman__BEGIN_DECLS 8193032Simpextern int get_myaddress(struct sockaddr_in *); 8293032Simpextern int bindresvport(int, struct sockaddr_in *); 8393032Simpextern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]), 8493032Simp xdrproc_t, xdrproc_t); 8593032Simpextern int callrpc(const char *, int, int, int, xdrproc_t, void *, 8693032Simp xdrproc_t , void *); 8793032Simpextern int getrpcport(char *, int, int, int); 8821059Speter 8993032Simpchar *taddr2uaddr(const struct netconfig *, const struct netbuf *); 9093032Simpstruct netbuf *uaddr2taddr(const struct netconfig *, const char *); 9174462Salfred 9274462Salfredstruct sockaddr; 9393032Simpextern int bindresvport_sa(int, struct sockaddr *); 941903Swollman__END_DECLS 951839Swollman 9674462Salfred/* 9774462Salfred * The following are not exported interfaces, they are for internal library 9874462Salfred * and rpcbind use only. Do not use, they may change without notice. 9974462Salfred */ 10074462Salfred__BEGIN_DECLS 10193032Simpint __rpc_nconf2fd(const struct netconfig *); 10293032Simpint __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *); 10393032Simpint __rpc_fd2sockinfo(int, struct __rpc_sockinfo *); 10493032Simpu_int __rpc_get_t_size(int, int, int); 10574462Salfred__END_DECLS 10674462Salfred 1071903Swollman#endif /* !_RPC_RPC_H */ 108