]> git.ipfire.org Git - thirdparty/glibc.git/blame - sunrpc/rpc/rpc.h
Once again change RPC copyright notices.
[thirdparty/glibc.git] / sunrpc / rpc / rpc.h
CommitLineData
28f540f4 1/*
a7ab6ec8
UD
2 * rpc.h, Just includes the billions of rpc header files necessary to
3 * do remote procedure calling.
ab09b221 4 *
a7ab6ec8 5 * Copyright (c) 2010, Oracle America, Inc.
ab09b221 6 *
a7ab6ec8
UD
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
9 * met:
cb636bb2 10 *
a7ab6ec8
UD
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials
16 * provided with the distribution.
17 * * Neither the name of the "Oracle America, Inc." nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
cb636bb2 20 *
a7ab6ec8
UD
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
28 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28f540f4 33 */
5107cf1d
UD
34
35#ifndef _RPC_RPC_H
36#define _RPC_RPC_H 1
28f540f4
RM
37
38#include <rpc/types.h> /* some typedefs */
39#include <netinet/in.h>
40
41/* external data representation interfaces */
42#include <rpc/xdr.h> /* generic (de)serializer */
43
44/* Client side only authentication */
45#include <rpc/auth.h> /* generic authenticator (client side) */
46
47/* Client side (mostly) remote procedure call */
48#include <rpc/clnt.h> /* generic rpc stuff */
49
50/* semi-private protocol headers */
51#include <rpc/rpc_msg.h> /* protocol for rpc messages */
52#include <rpc/auth_unix.h> /* protocol for unix style cred */
510ca033 53#include <rpc/auth_des.h> /* protocol for des style cred */
28f540f4
RM
54
55/* Server side only remote procedure callee */
56#include <rpc/svc.h> /* service manager and multiplexer */
57#include <rpc/svc_auth.h> /* service side authenticator */
58
59/*
60 * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION
61 * OF UNIX BASED ON NFSSRC. These systems will already have the structures
62 * defined by <rpc/netdb.h> included in <netdb.h>.
63 */
64/* routines for parsing /etc/rpc */
65#include <rpc/netdb.h> /* structures and routines to parse /etc/rpc */
66
a854060c 67__BEGIN_DECLS
543cf8a9
UD
68
69/* Global variables, protected for multi-threaded applications. */
70extern fd_set *__rpc_thread_svc_fdset (void) __attribute__ ((__const__));
71#define svc_fdset (*__rpc_thread_svc_fdset ())
72
73extern struct rpc_createerr *__rpc_thread_createerr (void)
74 __attribute__ ((__const__));
75#define get_rpc_createerr() (*__rpc_thread_createerr ())
76/* The people who "engineered" RPC should bee punished for naming the
77 data structure and the variable the same. We cannot always define the
78 macro 'rpc_createerr' because this would prevent people from defining
79 object of type 'struct rpc_createerr'. So we leave it up to the user
80 to select transparent replacement also of this variable. */
81#ifdef _RPC_MT_VARS
82# define rpc_createerr (*__rpc_thread_createerr ())
83#endif
84
85extern struct pollfd **__rpc_thread_svc_pollfd (void)
86 __attribute__ ((__const__));
87#define svc_pollfd (*__rpc_thread_svc_pollfd ())
88
89extern int *__rpc_thread_svc_max_pollfd (void) __attribute__ ((__const__));
90#define svc_max_pollfd (*__rpc_thread_svc_max_pollfd ())
91
a854060c
AJ
92__END_DECLS
93
5107cf1d 94#endif /* rpc/rpc.h */