22 #ifndef UV_WIN_WINSOCK_H_
23 #define UV_WIN_WINSOCK_H_
37 #ifndef SO_UPDATE_CONNECT_CONTEXT
38 # define SO_UPDATE_CONNECT_CONTEXT 0x7010
42 # define TCP_KEEPALIVE 3
46 # define IPV6_V6ONLY 27
50 # define IPV6_HOPLIMIT 21
53 #ifndef SIO_BASE_HANDLE
54 # define SIO_BASE_HANDLE 0x48000022
57 #ifndef MCAST_JOIN_SOURCE_GROUP
58 # define MCAST_JOIN_SOURCE_GROUP 45
61 #ifndef MCAST_LEAVE_SOURCE_GROUP
62 # define MCAST_LEAVE_SOURCE_GROUP 46
69 #ifndef TDI_RECEIVE_NORMAL
70 #define TDI_RECEIVE_BROADCAST 0x00000004
71 #define TDI_RECEIVE_MULTICAST 0x00000008
72 #define TDI_RECEIVE_PARTIAL 0x00000010
73 #define TDI_RECEIVE_NORMAL 0x00000020
74 #define TDI_RECEIVE_EXPEDITED 0x00000040
75 #define TDI_RECEIVE_PEEK 0x00000080
76 #define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100
77 #define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200
78 #define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400
79 #define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800
80 #define TDI_RECEIVE_CONTROL_INFO 0x00001000
81 #define TDI_RECEIVE_FORCE_INDICATION 0x00002000
82 #define TDI_RECEIVE_NO_PUSH 0x00004000
92 #define AFD_NO_FAST_IO 0x00000001
93 #define AFD_OVERLAPPED 0x00000002
94 #define AFD_IMMEDIATE 0x00000004
96 #define AFD_POLL_RECEIVE_BIT 0
97 #define AFD_POLL_RECEIVE (1 << AFD_POLL_RECEIVE_BIT)
98 #define AFD_POLL_RECEIVE_EXPEDITED_BIT 1
99 #define AFD_POLL_RECEIVE_EXPEDITED (1 << AFD_POLL_RECEIVE_EXPEDITED_BIT)
100 #define AFD_POLL_SEND_BIT 2
101 #define AFD_POLL_SEND (1 << AFD_POLL_SEND_BIT)
102 #define AFD_POLL_DISCONNECT_BIT 3
103 #define AFD_POLL_DISCONNECT (1 << AFD_POLL_DISCONNECT_BIT)
104 #define AFD_POLL_ABORT_BIT 4
105 #define AFD_POLL_ABORT (1 << AFD_POLL_ABORT_BIT)
106 #define AFD_POLL_LOCAL_CLOSE_BIT 5
107 #define AFD_POLL_LOCAL_CLOSE (1 << AFD_POLL_LOCAL_CLOSE_BIT)
108 #define AFD_POLL_CONNECT_BIT 6
109 #define AFD_POLL_CONNECT (1 << AFD_POLL_CONNECT_BIT)
110 #define AFD_POLL_ACCEPT_BIT 7
111 #define AFD_POLL_ACCEPT (1 << AFD_POLL_ACCEPT_BIT)
112 #define AFD_POLL_CONNECT_FAIL_BIT 8
113 #define AFD_POLL_CONNECT_FAIL (1 << AFD_POLL_CONNECT_FAIL_BIT)
114 #define AFD_POLL_QOS_BIT 9
115 #define AFD_POLL_QOS (1 << AFD_POLL_QOS_BIT)
116 #define AFD_POLL_GROUP_QOS_BIT 10
117 #define AFD_POLL_GROUP_QOS (1 << AFD_POLL_GROUP_QOS_BIT)
119 #define AFD_NUM_POLL_EVENTS 11
120 #define AFD_POLL_ALL ((1 << AFD_NUM_POLL_EVENTS) - 1)
139 #define _AFD_CONTROL_CODE(operation, method) \
140 ((FSCTL_AFD_BASE) << 12 | (operation << 2) | method)
142 #define FSCTL_AFD_BASE FILE_DEVICE_NETWORK
144 #define AFD_RECEIVE 5
145 #define AFD_RECEIVE_DATAGRAM 6
148 #define IOCTL_AFD_RECEIVE \
149 _AFD_CONTROL_CODE(AFD_RECEIVE, METHOD_NEITHER)
151 #define IOCTL_AFD_RECEIVE_DATAGRAM \
152 _AFD_CONTROL_CODE(AFD_RECEIVE_DATAGRAM, METHOD_NEITHER)
154 #define IOCTL_AFD_POLL \
155 _AFD_CONTROL_CODE(AFD_POLL, METHOD_BUFFERED)
157 #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
158 typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
167 struct _IP_ADAPTER_UNICAST_ADDRESS_XP *Next;
168 SOCKET_ADDRESS Address;
169 IP_PREFIX_ORIGIN PrefixOrigin;
170 IP_SUFFIX_ORIGIN SuffixOrigin;
171 IP_DAD_STATE DadState;
173 ULONG PreferredLifetime;
175 } IP_ADAPTER_UNICAST_ADDRESS_XP,*PIP_ADAPTER_UNICAST_ADDRESS_XP;
177 typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
185 struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next;
186 SOCKET_ADDRESS Address;
187 IP_PREFIX_ORIGIN PrefixOrigin;
188 IP_SUFFIX_ORIGIN SuffixOrigin;
189 IP_DAD_STATE DadState;
191 ULONG PreferredLifetime;
193 UINT8 OnLinkPrefixLength;
194 } IP_ADAPTER_UNICAST_ADDRESS_LH,*PIP_ADAPTER_UNICAST_ADDRESS_LH;
199 struct sockaddr_storage* storage);
struct sockaddr * Address
int uv__convert_to_localhost_if_unspecified(const struct sockaddr *addr, struct sockaddr_storage *storage)
struct _AFD_RECV_INFO * PAFD_RECV_INFO
struct _AFD_RECV_DATAGRAM_INFO * PAFD_RECV_DATAGRAM_INFO
struct _AFD_RECV_DATAGRAM_INFO AFD_RECV_DATAGRAM_INFO
struct _AFD_RECV_INFO AFD_RECV_INFO