1*2fe8fb19SBen Gras /* $NetBSD: rpc.h,v 1.15 2006/06/22 19:35:34 christos Exp $ */ 2*2fe8fb19SBen Gras 3*2fe8fb19SBen Gras /* 4*2fe8fb19SBen Gras * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5*2fe8fb19SBen Gras * unrestricted use provided that this legend is included on all tape 6*2fe8fb19SBen Gras * media and as a part of the software program in whole or part. Users 7*2fe8fb19SBen Gras * may copy or modify Sun RPC without charge, but are not authorized 8*2fe8fb19SBen Gras * to license or distribute it to anyone else except as part of a product or 9*2fe8fb19SBen Gras * program developed by the user. 10*2fe8fb19SBen Gras * 11*2fe8fb19SBen Gras * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 12*2fe8fb19SBen Gras * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 13*2fe8fb19SBen Gras * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 14*2fe8fb19SBen Gras * 15*2fe8fb19SBen Gras * Sun RPC is provided with no support and without any obligation on the 16*2fe8fb19SBen Gras * part of Sun Microsystems, Inc. to assist in its use, correction, 17*2fe8fb19SBen Gras * modification or enhancement. 18*2fe8fb19SBen Gras * 19*2fe8fb19SBen Gras * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 20*2fe8fb19SBen Gras * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 21*2fe8fb19SBen Gras * OR ANY PART THEREOF. 22*2fe8fb19SBen Gras * 23*2fe8fb19SBen Gras * In no event will Sun Microsystems, Inc. be liable for any lost revenue 24*2fe8fb19SBen Gras * or profits or other special, indirect and consequential damages, even if 25*2fe8fb19SBen Gras * Sun has been advised of the possibility of such damages. 26*2fe8fb19SBen Gras * 27*2fe8fb19SBen Gras * Sun Microsystems, Inc. 28*2fe8fb19SBen Gras * 2550 Garcia Avenue 29*2fe8fb19SBen Gras * Mountain View, California 94043 30*2fe8fb19SBen Gras * 31*2fe8fb19SBen Gras * from: @(#)rpc.h 1.9 88/02/08 SMI 32*2fe8fb19SBen Gras * @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC 33*2fe8fb19SBen Gras */ 34*2fe8fb19SBen Gras 35*2fe8fb19SBen Gras /* 36*2fe8fb19SBen Gras * rpc.h, Just includes the billions of rpc header files necessary to 37*2fe8fb19SBen Gras * do remote procedure calling. 38*2fe8fb19SBen Gras * 39*2fe8fb19SBen Gras * Copyright (C) 1984, Sun Microsystems, Inc. 40*2fe8fb19SBen Gras */ 41*2fe8fb19SBen Gras #ifndef _RPC_RPC_H_ 42*2fe8fb19SBen Gras #define _RPC_RPC_H_ 43*2fe8fb19SBen Gras 44*2fe8fb19SBen Gras #include <rpc/types.h> /* some typedefs */ 45*2fe8fb19SBen Gras #include <netinet/in.h> 46*2fe8fb19SBen Gras 47*2fe8fb19SBen Gras /* external data representation interfaces */ 48*2fe8fb19SBen Gras #include <rpc/xdr.h> /* generic (de)serializer */ 49*2fe8fb19SBen Gras 50*2fe8fb19SBen Gras /* Client side only authentication */ 51*2fe8fb19SBen Gras #include <rpc/auth.h> /* generic authenticator (client side) */ 52*2fe8fb19SBen Gras 53*2fe8fb19SBen Gras /* Client side (mostly) remote procedure call */ 54*2fe8fb19SBen Gras #include <rpc/clnt.h> /* generic rpc stuff */ 55*2fe8fb19SBen Gras 56*2fe8fb19SBen Gras /* semi-private protocol headers */ 57*2fe8fb19SBen Gras #include <rpc/rpc_msg.h> /* protocol for rpc messages */ 58*2fe8fb19SBen Gras #include <rpc/auth_unix.h> /* protocol for unix style cred */ 59*2fe8fb19SBen Gras /* 60*2fe8fb19SBen Gras * Uncomment-out the next line if you are building the rpc library with 61*2fe8fb19SBen Gras * DES Authentication (see the README file in the secure_rpc/ directory). 62*2fe8fb19SBen Gras */ 63*2fe8fb19SBen Gras #ifdef notdef 64*2fe8fb19SBen Gras #include <rpc/auth_des.h> /* protocol for des style cred */ 65*2fe8fb19SBen Gras #endif 66*2fe8fb19SBen Gras 67*2fe8fb19SBen Gras /* Server side only remote procedure callee */ 68*2fe8fb19SBen Gras #include <rpc/svc.h> /* service manager and multiplexer */ 69*2fe8fb19SBen Gras #include <rpc/svc_auth.h> /* service side authenticator */ 70*2fe8fb19SBen Gras 71*2fe8fb19SBen Gras /* Portmapper client, server, and protocol headers */ 72*2fe8fb19SBen Gras #include <rpc/pmap_clnt.h> 73*2fe8fb19SBen Gras #include <rpc/pmap_prot.h> 74*2fe8fb19SBen Gras 75*2fe8fb19SBen Gras #include <rpc/rpcb_clnt.h> /* rpcbind interface functions */ 76*2fe8fb19SBen Gras 77*2fe8fb19SBen Gras #include <rpc/rpcent.h> 78*2fe8fb19SBen Gras 79*2fe8fb19SBen Gras __BEGIN_DECLS 80*2fe8fb19SBen Gras extern int get_myaddress(struct sockaddr_in *); 81*2fe8fb19SBen Gras extern int bindresvport(int, struct sockaddr_in *); 82*2fe8fb19SBen Gras extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]), 83*2fe8fb19SBen Gras xdrproc_t, xdrproc_t); 84*2fe8fb19SBen Gras extern int callrpc(char *, int, int, int, xdrproc_t, char *, 85*2fe8fb19SBen Gras xdrproc_t , char *); 86*2fe8fb19SBen Gras extern int getrpcport(char *, int, int, int); 87*2fe8fb19SBen Gras 88*2fe8fb19SBen Gras char *taddr2uaddr(const struct netconfig *, const struct netbuf *); 89*2fe8fb19SBen Gras struct netbuf *uaddr2taddr(const struct netconfig *, const char *); 90*2fe8fb19SBen Gras 91*2fe8fb19SBen Gras struct sockaddr; 92*2fe8fb19SBen Gras extern int bindresvport_sa(int, struct sockaddr *); 93*2fe8fb19SBen Gras __END_DECLS 94*2fe8fb19SBen Gras 95*2fe8fb19SBen Gras /* 96*2fe8fb19SBen Gras * The following are not exported interfaces, they are for internal library 97*2fe8fb19SBen Gras * and rpcbind use only. Do not use, they may change without notice. 98*2fe8fb19SBen Gras */ 99*2fe8fb19SBen Gras __BEGIN_DECLS 100*2fe8fb19SBen Gras int __rpc_nconf2fd(const struct netconfig *); 101*2fe8fb19SBen Gras int __rpc_nconf2sockinfo(const struct netconfig *, 102*2fe8fb19SBen Gras struct __rpc_sockinfo *); 103*2fe8fb19SBen Gras int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *); 104*2fe8fb19SBen Gras int __rpc_setnodelay(int, const struct __rpc_sockinfo *); 105*2fe8fb19SBen Gras u_int __rpc_get_t_size(int, int, int); 106*2fe8fb19SBen Gras __END_DECLS 107*2fe8fb19SBen Gras 108*2fe8fb19SBen Gras #endif /* !_RPC_RPC_H_ */ 109