rpc.h revision 93032
174462Salfred/* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */ 274462Salfred 31839Swollman/* 41839Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 51839Swollman * unrestricted use provided that this legend is included on all tape 61839Swollman * media and as a part of the software program in whole or part. Users 71839Swollman * may copy or modify Sun RPC without charge, but are not authorized 81839Swollman * to license or distribute it to anyone else except as part of a product or 91839Swollman * program developed by the user. 108858Srgrimes * 111839Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 1213771Smpp * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 131839Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 148858Srgrimes * 151839Swollman * Sun RPC is provided with no support and without any obligation on the 161839Swollman * part of Sun Microsystems, Inc. to assist in its use, correction, 171839Swollman * modification or enhancement. 181839Swollman * 191839Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 201839Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 211839Swollman * OR ANY PART THEREOF. 221839Swollman * 231839Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 241839Swollman * or profits or other special, indirect and consequential damages, even if 251839Swollman * Sun has been advised of the possibility of such damages. 261839Swollman * 271839Swollman * Sun Microsystems, Inc. 281839Swollman * 2550 Garcia Avenue 291839Swollman * Mountain View, California 94043 301903Swollman * 318858Srgrimes * from: @(#)rpc.h 1.9 88/02/08 SMI 321903Swollman * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC 3350473Speter * $FreeBSD: head/include/rpc/rpc.h 93032 2002-03-23 17:24:55Z imp $ 341839Swollman */ 351839Swollman 361839Swollman/* 371839Swollman * rpc.h, Just includes the billions of rpc header files necessary to 381839Swollman * do remote procedure calling. 391839Swollman * 401839Swollman * Copyright (C) 1984, Sun Microsystems, Inc. 411839Swollman */ 421903Swollman#ifndef _RPC_RPC_H 431903Swollman#define _RPC_RPC_H 441839Swollman 451839Swollman#include <rpc/types.h> /* some typedefs */ 4674462Salfred#include <sys/socket.h> 471839Swollman#include <netinet/in.h> 481839Swollman 491839Swollman/* external data representation interfaces */ 501839Swollman#include <rpc/xdr.h> /* generic (de)serializer */ 511839Swollman 521839Swollman/* Client side only authentication */ 531839Swollman#include <rpc/auth.h> /* generic authenticator (client side) */ 541839Swollman 551839Swollman/* Client side (mostly) remote procedure call */ 561839Swollman#include <rpc/clnt.h> /* generic rpc stuff */ 571839Swollman 581839Swollman/* semi-private protocol headers */ 591839Swollman#include <rpc/rpc_msg.h> /* protocol for rpc messages */ 601839Swollman#include <rpc/auth_unix.h> /* protocol for unix style cred */ 611839Swollman/* 628858Srgrimes * Uncomment-out the next line if you are building the rpc library with 631839Swollman * DES Authentication (see the README file in the secure_rpc/ directory). 641839Swollman */ 656685Sphk#include <rpc/auth_des.h> /* protocol for des style cred */ 661839Swollman 671839Swollman/* Server side only remote procedure callee */ 681839Swollman#include <rpc/svc.h> /* service manager and multiplexer */ 691839Swollman#include <rpc/svc_auth.h> /* service side authenticator */ 701839Swollman 7174462Salfred/* Portmapper client, server, and protocol headers */ 7274462Salfred#include <rpc/pmap_clnt.h> 7374462Salfred#include <rpc/pmap_prot.h> 741839Swollman 7574515Salfred#ifndef _KERNEL 7674462Salfred#include <rpc/rpcb_clnt.h> /* rpcbind interface functions */ 7774515Salfred#endif 781839Swollman 7974462Salfred#include <rpc/rpcent.h> 8074462Salfred 811903Swollman__BEGIN_DECLS 8293032Simpextern int get_myaddress(struct sockaddr_in *); 8393032Simpextern int bindresvport(int, struct sockaddr_in *); 8493032Simpextern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]), 8593032Simp xdrproc_t, xdrproc_t); 8693032Simpextern int callrpc(const char *, int, int, int, xdrproc_t, void *, 8793032Simp xdrproc_t , void *); 8893032Simpextern int getrpcport(char *, int, int, int); 8921059Speter 9093032Simpchar *taddr2uaddr(const struct netconfig *, const struct netbuf *); 9193032Simpstruct netbuf *uaddr2taddr(const struct netconfig *, const char *); 9274462Salfred 9374462Salfredstruct sockaddr; 9493032Simpextern int bindresvport_sa(int, struct sockaddr *); 951903Swollman__END_DECLS 961839Swollman 9774462Salfred/* 9874462Salfred * The following are not exported interfaces, they are for internal library 9974462Salfred * and rpcbind use only. Do not use, they may change without notice. 10074462Salfred */ 10174462Salfred__BEGIN_DECLS 10293032Simpint __rpc_nconf2fd(const struct netconfig *); 10393032Simpint __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *); 10493032Simpint __rpc_fd2sockinfo(int, struct __rpc_sockinfo *); 10593032Simpu_int __rpc_get_t_size(int, int, int); 10674462Salfred__END_DECLS 10774462Salfred 1081903Swollman#endif /* !_RPC_RPC_H */ 109