Blame sunrpc/rpc/rpc.h

Packit 6c4009
/*
Packit 6c4009
 * rpc.h, Just includes the billions of rpc header files necessary to
Packit 6c4009
 * do remote procedure calling.
Packit 6c4009
 *
Packit 6c4009
 * Copyright (c) 2010, Oracle America, Inc.
Packit 6c4009
 *
Packit 6c4009
 * Redistribution and use in source and binary forms, with or without
Packit 6c4009
 * modification, are permitted provided that the following conditions are
Packit 6c4009
 * met:
Packit 6c4009
 *
Packit 6c4009
 *     * Redistributions of source code must retain the above copyright
Packit 6c4009
 *       notice, this list of conditions and the following disclaimer.
Packit 6c4009
 *     * Redistributions in binary form must reproduce the above
Packit 6c4009
 *       copyright notice, this list of conditions and the following
Packit 6c4009
 *       disclaimer in the documentation and/or other materials
Packit 6c4009
 *       provided with the distribution.
Packit 6c4009
 *     * Neither the name of the "Oracle America, Inc." nor the names of its
Packit 6c4009
 *       contributors may be used to endorse or promote products derived
Packit 6c4009
 *       from this software without specific prior written permission.
Packit 6c4009
 *
Packit 6c4009
 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Packit 6c4009
 *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Packit 6c4009
 *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
Packit 6c4009
 *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
Packit 6c4009
 *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
Packit 6c4009
 *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 6c4009
 *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
Packit 6c4009
 *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Packit 6c4009
 *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
Packit 6c4009
 *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
Packit 6c4009
 *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 6c4009
 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#ifndef _RPC_RPC_H
Packit 6c4009
#define _RPC_RPC_H 1
Packit 6c4009
Packit 6c4009
#include <rpc/types.h>		/* some typedefs */
Packit 6c4009
#include <netinet/in.h>
Packit 6c4009
Packit 6c4009
/* external data representation interfaces */
Packit 6c4009
#include <rpc/xdr.h>		/* generic (de)serializer */
Packit 6c4009
Packit 6c4009
/* Client side only authentication */
Packit 6c4009
#include <rpc/auth.h>		/* generic authenticator (client side) */
Packit 6c4009
Packit 6c4009
/* Client side (mostly) remote procedure call */
Packit 6c4009
#include <rpc/clnt.h>		/* generic rpc stuff */
Packit 6c4009
Packit 6c4009
/* semi-private protocol headers */
Packit 6c4009
#include <rpc/rpc_msg.h>	/* protocol for rpc messages */
Packit 6c4009
#include <rpc/auth_unix.h>	/* protocol for unix style cred */
Packit 6c4009
#include <rpc/auth_des.h>	/* protocol for des style cred */
Packit 6c4009
Packit 6c4009
/* Server side only remote procedure callee */
Packit 6c4009
#include <rpc/svc.h>		/* service manager and multiplexer */
Packit 6c4009
#include <rpc/svc_auth.h>	/* service side authenticator */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION
Packit 6c4009
 * OF UNIX BASED ON NFSSRC.  These systems will already have the structures
Packit 6c4009
 * defined by <rpc/netdb.h> included in <netdb.h>.
Packit 6c4009
 */
Packit 6c4009
/* routines for parsing /etc/rpc */
Packit 6c4009
#include <rpc/netdb.h>		/* structures and routines to parse /etc/rpc */
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* Global variables, protected for multi-threaded applications.  */
Packit 6c4009
extern fd_set *__rpc_thread_svc_fdset (void) __attribute__ ((__const__));
Packit 6c4009
#define svc_fdset (*__rpc_thread_svc_fdset ())
Packit 6c4009
Packit 6c4009
extern struct rpc_createerr *__rpc_thread_createerr (void)
Packit 6c4009
     __attribute__ ((__const__));
Packit 6c4009
#define get_rpc_createerr() (*__rpc_thread_createerr ())
Packit 6c4009
/* The people who "engineered" RPC should bee punished for naming the
Packit 6c4009
   data structure and the variable the same.  We cannot always define the
Packit 6c4009
   macro 'rpc_createerr' because this would prevent people from defining
Packit 6c4009
   object of type 'struct rpc_createerr'.  So we leave it up to the user
Packit 6c4009
   to select transparent replacement also of this variable.  */
Packit 6c4009
#ifdef _RPC_MT_VARS
Packit 6c4009
# define rpc_createerr (*__rpc_thread_createerr ())
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
extern struct pollfd **__rpc_thread_svc_pollfd (void)
Packit 6c4009
     __attribute__ ((__const__));
Packit 6c4009
#define svc_pollfd (*__rpc_thread_svc_pollfd ())
Packit 6c4009
Packit 6c4009
extern int *__rpc_thread_svc_max_pollfd (void) __attribute__ ((__const__));
Packit 6c4009
#define svc_max_pollfd (*__rpc_thread_svc_max_pollfd ())
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* rpc/rpc.h */