Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:04

0001 /* @(#)types.h  2.3 88/08/15 4.0 RPCSRC */
0002 /*
0003  * Copyright (c) 2010, Oracle America, Inc.
0004  *
0005  * All rights reserved.
0006  *
0007  * Redistribution and use in source and binary forms, with or without
0008  * modification, are permitted provided that the following conditions are met:
0009  *
0010  *     * Redistributions of source code must retain the above copyright
0011  *       notice, this list of conditions and the following disclaimer.
0012  *
0013  *     * Redistributions in binary form must reproduce the above copyright
0014  *       notice, this list of conditions and the following disclaimer in
0015  *       the documentation and/or other materials provided with the
0016  *       distribution.
0017  *
0018  *     * Neither the name of the “Oracle America, Inc.” nor the names of
0019  *       its contributors may be used to endorse or promote products
0020  *       derived from this software without specific prior written permission.
0021  *
0022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
0023  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
0024  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
0025  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0026  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
0028  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
0029  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
0030  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
0031  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0032  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0033  */
0034 /*      @(#)types.h 1.18 87/07/24 SMI      */
0035 
0036 /*
0037  * Rpc additions to <sys/types.h>
0038  */
0039 #ifndef GSSRPC_TYPES_H
0040 #define GSSRPC_TYPES_H
0041 
0042 #include <sys/types.h>
0043 
0044 #include <sys/select.h>
0045 #include <sys/time.h>
0046 #include <unistd.h>
0047 
0048 /*
0049  * Try to get MAXHOSTNAMELEN from somewhere.
0050  */
0051 #include <sys/param.h>
0052 /* #include <netdb.h> */
0053 
0054 /* Get htonl(), ntohl(), etc. */
0055 #include <netinet/in.h>
0056 
0057 #include <stdlib.h>
0058 #include <stdint.h>
0059 #include <limits.h>
0060 
0061 #ifndef GSSRPC__BEGIN_DECLS
0062 #ifdef __cplusplus
0063 #define GSSRPC__BEGIN_DECLS extern "C" {
0064 #define GSSRPC__END_DECLS   }
0065 #else
0066 #define GSSRPC__BEGIN_DECLS
0067 #define GSSRPC__END_DECLS
0068 #endif
0069 #endif
0070 
0071 GSSRPC__BEGIN_DECLS
0072 
0073 #if defined(CHAR_BIT) && CHAR_BIT != 8
0074 #error "Bytes must be exactly 8 bits."
0075 #endif
0076 
0077 /* Define if we need to fake up some BSD type aliases. */
0078 #ifndef GSSRPC__BSD_TYPEALIASES /* Allow application to override. */
0079 /* #undef GSSRPC__BSD_TYPEALIASES */
0080 #endif
0081 #if GSSRPC__BSD_TYPEALIASES
0082 typedef unsigned char   u_char;
0083 typedef unsigned short  u_short;
0084 typedef unsigned int    u_int;
0085 typedef unsigned long   u_long;
0086 #endif
0087 
0088 typedef uint32_t    rpcprog_t;
0089 typedef uint32_t    rpcvers_t;
0090 typedef uint32_t    rpcprot_t;
0091 typedef uint32_t    rpcproc_t;
0092 typedef uint32_t    rpcport_t;
0093 typedef int32_t     rpc_inline_t;
0094 
0095 /* This is for rpc/netdb.h */
0096 #define STRUCT_RPCENT_IN_RPC_NETDB_H
0097 
0098 typedef int bool_t;
0099 typedef int enum_t;
0100 #ifndef FALSE
0101 #   define  FALSE   (0)
0102 #endif
0103 #ifndef TRUE
0104 #   define  TRUE    (1)
0105 #endif
0106 /* XXX namespace */
0107 #define __dontcare__    -1
0108 #ifndef NULL
0109 #   define NULL 0
0110 #endif
0111 
0112 /*
0113  * The below should probably be internal-only, but seem to be
0114  * traditionally exported in RPC implementations.
0115  */
0116 #define mem_alloc(bsize)    malloc(bsize)
0117 #define mem_free(ptr, bsize)    free(ptr)
0118 
0119 #ifndef INADDR_LOOPBACK
0120 #define       INADDR_LOOPBACK         (uint32_t)0x7F000001
0121 #endif
0122 #ifndef MAXHOSTNAMELEN
0123 #define        MAXHOSTNAMELEN  64
0124 #endif
0125 
0126 GSSRPC__END_DECLS
0127 
0128 #include <gssrpc/rename.h>
0129 
0130 #endif /* !defined(GSSRPC_TYPES_H) */