This is Unofficial EPICS BASE Doxygen Site
osdSock.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Saskatchewan
3 * EPICS BASE is distributed subject to a Software License Agreement found
4 * in file LICENSE that is included with this distribution.
5 \*************************************************************************/
6 
7 /*
8  * Author: Eric Norum
9  */
10 
11 #ifndef osdSockH
12 #define osdSockH
13 
14 #include <errno.h>
15 
16 #include <sys/types.h>
17 #include <sys/param.h> /* for MAXHOSTNAMELEN */
18 #include <sys/time.h>
19 #include <sys/socket.h>
20 #include <sys/ioctl.h>
21 #include <netinet/in.h>
22 #include <netinet/tcp.h>
23 #include <arpa/inet.h>
24 #include <net/if.h>
25 #include <netdb.h>
26 #include <unistd.h> /* close() and others */
27 
28 
29 typedef int SOCKET;
30 #define INVALID_SOCKET (-1)
31 #define SOCKERRNO errno
32 #define socket_ioctl(A,B,C) ioctl(A,B,C)
33 typedef int osiSockIoctl_t;
34 typedef socklen_t osiSocklen_t;
36 typedef unsigned char osiSockOptMcastTTL_t;
37 
38 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
39 
40 #define SOCK_EWOULDBLOCK EWOULDBLOCK
41 #define SOCK_ENOBUFS ENOBUFS
42 #define SOCK_ECONNRESET ECONNRESET
43 #define SOCK_ETIMEDOUT ETIMEDOUT
44 #define SOCK_EACCES EACCES
45 #define SOCK_EADDRINUSE EADDRINUSE
46 #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
47 #define SOCK_ECONNREFUSED ECONNREFUSED
48 #define SOCK_ECONNABORTED ECONNABORTED
49 #define SOCK_EINPROGRESS EINPROGRESS
50 #define SOCK_EISCONN EISCONN
51 #define SOCK_EALREADY EALREADY
52 #define SOCK_EINVAL EINVAL
53 #define SOCK_EINTR EINTR
54 #define SOCK_EPIPE EPIPE
55 #define SOCK_EMFILE EMFILE
56 #define SOCK_SHUTDOWN ESHUTDOWN
57 #define SOCK_ENOTSOCK ENOTSOCK
58 #define SOCK_EBADF EBADF
59 
60 #ifndef SHUT_RD
61 #define SHUT_RD 0
62 #endif
63 
64 #ifndef SHUT_WR
65 #define SHUT_WR 1
66 #endif
67 
68 #ifndef SHUT_RDWR
69 #define SHUT_RDWR 2
70 #endif
71 
72 #define ifreq_size(pifreq) ((pifreq)->ifr_addr.sa_len + sizeof((pifreq)->ifr_name))
73 
74 #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