This is Unofficial EPICS BASE Doxygen Site
osdSock.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /*
11  * Solaris specific socket include
12  */
13 
14 #ifndef osdSockH
15 #define osdSockH
16 
17 #include <errno.h>
18 
19 #include <sys/types.h>
20 #include <sys/param.h> /* for MAXHOSTNAMELEN */
21 #include <sys/time.h>
22 #include <sys/socket.h>
23 #include <sys/ioctl.h>
24 #include <sys/filio.h>
25 #include <sys/sockio.h>
26 #include <netinet/in.h>
27 #include <netinet/tcp.h>
28 #include <arpa/inet.h>
29 #include <net/if.h>
30 #include <netdb.h>
31 #include <unistd.h> /* close() and others */
32 
33 
34 typedef int SOCKET;
35 #define INVALID_SOCKET (-1)
36 #define SOCKERRNO errno
37 #define socket_ioctl(A,B,C) ioctl(A,B,C)
38 typedef int osiSockIoctl_t;
39 
40 #if SOLARIS > 6 || defined ( _SOCKLEN_T )
41  typedef uint32_t osiSocklen_t;
42 #else
43  typedef int osiSocklen_t;
44 #endif
45 typedef char osiSockOptMcastLoop_t;
46 typedef unsigned char osiSockOptMcastTTL_t;
47 
48 #define DOES_NOT_ACCEPT_ZERO_LENGTH_UDP
49 
50 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE&&(FD)>=0)
51 
52 #define SOCK_EWOULDBLOCK EWOULDBLOCK
53 #define SOCK_ENOBUFS ENOBUFS
54 #define SOCK_ECONNRESET ECONNRESET
55 #define SOCK_ETIMEDOUT ETIMEDOUT
56 #define SOCK_EACCES EACCES
57 #define SOCK_EADDRINUSE EADDRINUSE
58 #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
59 #define SOCK_ECONNREFUSED ECONNREFUSED
60 #define SOCK_ECONNABORTED ECONNABORTED
61 #define SOCK_EINPROGRESS EINPROGRESS
62 #define SOCK_EISCONN EISCONN
63 #define SOCK_EALREADY EALREADY
64 #define SOCK_EINVAL EINVAL
65 #define SOCK_EINTR EINTR
66 #define SOCK_EPIPE EPIPE
67 #define SOCK_EMFILE EMFILE
68 #define SOCK_SHUTDOWN ESHUTDOWN
69 #define SOCK_ENOTSOCK ENOTSOCK
70 #define SOCK_EBADF EBADF
71 
72 #ifndef SHUT_RD
73 # define SHUT_RD 0
74 #endif
75 
76 #ifndef SHUT_WR
77 # define SHUT_WR 1
78 #endif
79 
80 #ifndef SHUT_RDWR
81 # define SHUT_RDWR 2
82 #endif
83 
84 #ifndef INADDR_NONE
85 # define INADDR_NONE (0xffffffff)
86 #endif
87 
88 #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
89 
90 #endif /*osdSockH*/
int osiSocklen_t
Definition: osdSock.h:36
int osiSockOptMcastLoop_t
Definition: osdSock.h:37
int osiSockIoctl_t
Definition: osdSock.h:35
int SOCKET
Definition: osdSock.h:31
int osiSockOptMcastTTL_t
Definition: osdSock.h:38