xref: /openbsd/include/rpc/rpc.h (revision db3296cf)
1 /*	$OpenBSD: rpc.h,v 1.10 2002/02/17 19:42:21 millert Exp $	*/
2 /*	$NetBSD: rpc.h,v 1.5 1994/12/04 01:15:30 cgd Exp $	*/
3 
4 /*
5  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6  * unrestricted use provided that this legend is included on all tape
7  * media and as a part of the software program in whole or part.  Users
8  * may copy or modify Sun RPC without charge, but are not authorized
9  * to license or distribute it to anyone else except as part of a product or
10  * program developed by the user.
11  *
12  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
13  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
14  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
15  *
16  * Sun RPC is provided with no support and without any obligation on the
17  * part of Sun Microsystems, Inc. to assist in its use, correction,
18  * modification or enhancement.
19  *
20  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
21  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
22  * OR ANY PART THEREOF.
23  *
24  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
25  * or profits or other special, indirect and consequential damages, even if
26  * Sun has been advised of the possibility of such damages.
27  *
28  * Sun Microsystems, Inc.
29  * 2550 Garcia Avenue
30  * Mountain View, California  94043
31  *
32  *	from: @(#)rpc.h 1.9 88/02/08 SMI
33  *	@(#)rpc.h	2.4 89/07/11 4.0 RPCSRC
34  */
35 
36 /*
37  * rpc.h, Just includes the billions of rpc header files necessary to
38  * do remote procedure calling.
39  *
40  * Copyright (C) 1984, Sun Microsystems, Inc.
41  */
42 #ifndef _RPC_RPC_H
43 #define _RPC_RPC_H
44 
45 #include <rpc/types.h>		/* some typedefs */
46 #include <netinet/in.h>
47 
48 /* external data representation interfaces */
49 #include <rpc/xdr.h>		/* generic (de)serializer */
50 
51 /* Client side only authentication */
52 #include <rpc/auth.h>		/* generic authenticator (client side) */
53 
54 /* Client side (mostly) remote procedure call */
55 #include <rpc/clnt.h>		/* generic rpc stuff */
56 
57 /* Client side (mostly) pmap functions */
58 #include <rpc/pmap_clnt.h>	/* generic pmap stuff */
59 
60 /* semi-private protocol headers */
61 #include <rpc/rpc_msg.h>	/* protocol for rpc messages */
62 #include <rpc/auth_unix.h>	/* protocol for unix style cred */
63 /*
64  *  Uncomment-out the next line if you are building the rpc library with
65  *  DES Authentication (see the README file in the secure_rpc/ directory).
66  */
67 #ifdef notdef
68 #include <rpc/auth_des.h>	/* protocol for des style cred */
69 #endif
70 
71 /* Server side only remote procedure callee */
72 #include <rpc/svc.h>		/* service manager and multiplexer */
73 #include <rpc/svc_auth.h>	/* service side authenticator */
74 
75 /*
76  * COMMENT OUT THE NEXT INCLUDE (or add to the #ifndef) IF RUNNING ON
77  * A VERSION OF UNIX THAT USES SUN'S NFS SOURCE.  These systems will
78  * already have the structures defined by <rpc/netdb.h> included in <netdb.h>.
79  */
80 /* routines for parsing /etc/rpc */
81 
82 struct rpcent {
83       char    *r_name;        /* name of server for this rpc program */
84       char    **r_aliases;    /* alias list */
85       int     r_number;       /* rpc program number */
86 };
87 
88 __BEGIN_DECLS
89 extern struct rpcent *getrpcbyname(char *);
90 extern struct rpcent *getrpcbynumber(int);
91 extern struct rpcent *getrpcent(void);
92 extern void setrpcent(int);
93 extern void endrpcent(void);
94 
95 extern int get_myaddress(struct sockaddr_in *);
96 extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
97 	xdrproc_t, xdrproc_t);
98 extern int callrpc(char *, int, int, int, xdrproc_t, char *,
99 	xdrproc_t , char *);
100 extern int getrpcport(char *, int, int, int);
101 
102 extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
103 
104 extern int _rpc_dtablesize(void);
105 
106 __END_DECLS
107 
108 #endif /* !_RPC_RPC_H */
109