(file) Return to lslp-perl-linux.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / slp

  1 mday  1.1 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3 kumpf 1.10 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4            // The Open Group, Tivoli Systems
  5 mday  1.1  //
  6 mike  1.3  // Permission is hereby granted, free of charge, to any person obtaining a copy
  7 kumpf 1.10 // of this software and associated documentation files (the "Software"), to
  8            // deal in the Software without restriction, including without limitation the
  9            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10 mike  1.3  // sell copies of the Software, and to permit persons to whom the Software is
 11            // furnished to do so, subject to the following conditions:
 12            // 
 13 kumpf 1.10 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14 mike  1.3  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16 kumpf 1.10 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19 mike  1.3  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21 mday  1.1  //
 22            //==============================================================================
 23            //
 24            // Author: Mike Day (mdday@us.ibm.com)
 25            //
 26            //%/////////////////////////////////////////////////////////////////////////////
 27            
 28            
 29            #ifndef _LSLP_LINUX_INCLUDE_
 30            #define _LSLP_LINUX_INCLUDE_
 31            
 32            #include <signal.h>
 33            #include <stdio.h>
 34            #include <stdlib.h>
 35            #include <stdarg.h>
 36            #include <unistd.h> 
 37            #include <fcntl.h>
 38            #include <time.h>
 39            #include <sys/types.h>
 40            #include <sys/time.h>
 41            #include <pthread.h>
 42 mday  1.1  #include <semaphore.h>
 43            #include <netinet/in.h>
 44            #include <arpa/inet.h>
 45            #include <sys/ioctl.h>
 46            #include <sys/socket.h>
 47            #include <sys/stat.h>
 48 mday  1.6  #include <string.h>
 49 karl  1.5  
 50 mike  1.8  #if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_OS_TRU64)
 51            extern "C" char *strtok_r(char *, const char *, char **);
 52            # include <arpa/inet.h>
 53            # include <net/if.h>
 54 sage  1.9  #elif defined (PEGASUS_OS_TRU64) || defined(PEGASUS_OS_AIX)
 55 karl  1.5  # include <arpa/inet.h>
 56            # include <net/if.h>
 57            #else
 58 mday  1.1  #include <linux/inet.h>
 59            #include <linux/if.h>
 60 karl  1.5  #endif
 61 mday  1.1  
 62            #include <netdb.h>
 63            #include <errno.h>
 64            #include <assert.h>
 65            #include <memory.h>
 66            #include <string.h>
 67            #include <ctype.h>
 68            #include <syslog.h>
 69            
 70 mday  1.2  PEGASUS_USING_STD;
 71            
 72            PEGASUS_NAMESPACE_BEGIN
 73            
 74 mday  1.1  
 75 mday  1.4  typedef char int8; 
 76            typedef	unsigned char uint8; 
 77            typedef uint8 byte; 
 78            typedef short int16; 
 79            typedef unsigned short uint16; 
 80            typedef int int32; 
 81            typedef unsigned int uint32; 
 82            typedef long long int64; 
 83            typedef unsigned long long uint64; 
 84            typedef int BOOL; 
 85 mday  1.1  
 86            #define _LSLP_SLEEP(m) usleep((m) * 1000)
 87            #define SOCKET int
 88            
 89            #define _LSLP_CLOSESOCKET close
 90            #define _LSLP_IOCTLSOCKET ioctl
 91            #define _LSLP_INIT_NETWORK()
 92            #define _LSLP_DEINIT_NETWORK()
 93            
 94            #define _LSLP_SET_TTL(s, t)  setsockopt((s), IPPROTO_IP, IP_MULTICAST_TTL, (const char *)&(t), sizeof((t))) 
 95            
 96            #ifndef EINVAL
 97            #define EINVAL 0
 98            #endif
 99            #ifndef EWOULDBLOCK
100            #define EWOULDBLOCK 0
101            #endif
102            #define _LSLP_GETLASTERROR() errno
103            
104            #define INVALID_SOCKET -1
105            #define SOCKET_ERROR -1
106 mday  1.1  #define SD_BOTH 2
107            
108            #define FAR
109            
110            #define _LSLP_STRTOK(n, d, s) strtok_r((n), (d), (s))
111 mday  1.6    
112 mday  1.1  #define LSLP_MAXPATH FILENAME_MAX
113            #define LSLP_NEWLINE \r
114            
115            #ifndef TRUE
116            #define TRUE 1
117            #define FALSE 0
118            #endif
119            
120            
121            #define _LSLP_CTIME(t, b)  ctime_r(((const time_t *)(t)), ((char *)(b)))
122            
123 mday  1.2  PEGASUS_NAMESPACE_END
124 mday  1.1  
125            #endif /* _LSLP_LINUX_INCLUDE_ */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2