Debian Codegraph @

modules/libcom/src/osi/os/cygwin32/osdSock.h

raw symbols SCIP
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 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /*
11 * cygwin32 specific include
12 */
13
14
15 #ifndef osdSockH
16 #define osdSockH
17
18 #include <errno.h>
19
20 #include <sys/types.h>
21 #include <sys/param.h> /* for MAXHOSTNAMELEN */
22 #include <sys/ioctl.h>
23 #include <sys/select.h>
24 #include <sys/time.h>
25 #include <netinet/in.h>
26 #include <arpa/inet.h>
27 #include <net/if.h>
28 #include <netdb.h>
29 #include <unistd.h> /* close() and others */
30 #ifndef TCP_NODELAY
31 # include <netinet/tcp.h>
32 #endif
33
34
35 typedef int SOCKET;
36 #define INVALID_SOCKET (-1)
37 #define SOCKERRNO errno
38 #define socket_ioctl(A,B,C) ioctl(A,B,C)
39 typedef int osiSockIoctl_t;
40 typedef int osiSocklen_t;
41 typedef int osiSockOptMcastLoop_t;
42 typedef int osiSockOptMcastTTL_t;
43
44 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE&&(FD)>=0)
45 #ifndef SHUT_RD
46 #define SHUT_RD 0
47 #endif
48 #ifndef SHUT_WR
49 #define SHUT_WR 1
50 #endif
51 #ifndef SHUT_RDWR
52 # define SHUT_RDWR 2
53 #endif
54
55 #define SOCK_EWOULDBLOCK EWOULDBLOCK
56 #define SOCK_ENOBUFS ENOBUFS
57 #define SOCK_ECONNRESET ECONNRESET
58 #define SOCK_ETIMEDOUT ETIMEDOUT
59 #define SOCK_EACCES EACCES
60 #define SOCK_EADDRINUSE EADDRINUSE
61 #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
62 #define SOCK_ECONNREFUSED ECONNREFUSED
63 #define SOCK_ECONNABORTED ECONNABORTED
64 #define SOCK_EINPROGRESS EINPROGRESS
65 #define SOCK_EISCONN EISCONN
66 #define SOCK_EALREADY EALREADY
67 #define SOCK_EINVAL EINVAL
68 #define SOCK_EINTR EINTR
69 #define SOCK_EPIPE EPIPE
70 #define SOCK_EMFILE EMFILE
71 #define SOCK_SHUTDOWN ESHUTDOWN
72 #define SOCK_ENOTSOCK ENOTSOCK
73 #define SOCK_EBADF EBADF
74 #define SOCK_EMSGSIZE EMSGSIZE
75
76 #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
77
78 #endif /*osdSockH*/