ReactOS  0.4.14-dev-608-gd495a4f
winsock2.h
Go to the documentation of this file.
1 #pragma once
2 
3 #if !(defined _WINSOCK2API_ || defined _WINSOCKAPI_)
4 #define _WINSOCK2API_
5 #define _WINSOCKAPI_ /* to prevent later inclusion of winsock.h */
6 
7 #define _GNU_H_WINDOWS32_SOCKETS
8 
9 #if (!defined(_WIN64) && !defined(WIN32))
10 #include <pshpack4.h>
11 #define _NEED_POPPACK
12 #endif
13 
14 #ifndef INCL_WINSOCK_API_PROTOTYPES
15 #define INCL_WINSOCK_API_PROTOTYPES 1
16 #endif
17 
18 #ifndef INCL_WINSOCK_API_TYPEDEFS
19 #define INCL_WINSOCK_API_TYPEDEFS 0
20 #endif
21 
22 #ifndef _INC_WINDOWS
23 #include <windows.h>
24 #endif
25 
26 #if !defined(MAKEWORD)
27 #define MAKEWORD(low,high) ((WORD)(((BYTE)(low)) | ((WORD)((BYTE)(high))) << 8))
28 #endif
29 
30 #ifndef WINSOCK_VERSION
31 #define WINSOCK_VERSION MAKEWORD(2,2)
32 #endif
33 
34 #ifndef WINSOCK_API_LINKAGE
35 #ifdef DECLSPEC_IMPORT
36 #define WINSOCK_API_LINKAGE DECLSPEC_IMPORT
37 #else
38 #define WINSOCK_API_LINKAGE
39 #endif
40 #endif
41 
42 #if defined(__LP64__) || (!defined(_M_AMD64) && defined(__WINESRC__))
43 #if !defined(__ROS_LONG64__)
44 #define __ROS_LONG64__
45 #endif
46 #endif
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 /* Names common to Winsock1.1 and Winsock2 */
53 #if !defined ( _BSDTYPES_DEFINED )
54 /* also defined in gmon.h and in cygwin's sys/types */
55 typedef unsigned char u_char;
56 typedef unsigned short u_short;
57 typedef unsigned int u_int;
58 #ifndef __ROS_LONG64__
59 typedef unsigned long u_long;
60 #else
61 typedef unsigned int u_long;
62 #endif
63 #define _BSDTYPES_DEFINED
64 #endif /* ! def _BSDTYPES_DEFINED */
65 
66 #if(_WIN32_WINNT >= 0x0501)
67 typedef unsigned __int64 u_int64;
68 #endif /* (_WIN32_WINNT >= 0x0501) */
69 
70 #include <ws2def.h>
71 
72 typedef UINT_PTR SOCKET;
73 
74 #ifndef FD_SETSIZE
75 #define FD_SETSIZE 64
76 #endif
77 
78 #ifndef _SYS_TYPES_FD_SET
79 
80 /* fd_set may be defined by the newlib <sys/types.h>
81  * if __USE_W32_SOCKETS not defined.
82  */
83 #ifdef fd_set
84 #undef fd_set
85 #endif
86 
87 typedef struct fd_set {
90 } fd_set;
91 
92 extern int PASCAL FAR __WSAFDIsSet(SOCKET,fd_set FAR*);
93 
94 #ifndef FD_CLR
95 #define FD_CLR(fd, set) do { \
96  u_int __i; \
97  for (__i = 0; __i < ((fd_set FAR*)(set))->fd_count ; __i++) { \
98  if (((fd_set FAR*)(set))->fd_array[__i] == fd) { \
99  while (__i < ((fd_set FAR*)(set))->fd_count-1) { \
100  ((fd_set FAR*)(set))->fd_array[__i] = \
101  ((fd_set FAR*)(set))->fd_array[__i+1]; \
102  __i++; \
103  } \
104  ((fd_set FAR*)(set))->fd_count--; \
105  break; \
106  } \
107  } \
108 } while(0)
109 #endif
110 
111 #ifndef FD_SET
112 /* this differs from the define in winsock.h and in cygwin sys/types.h */
113 #define FD_SET(fd, set) do { \
114  u_int __i; \
115  for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \
116  if (((fd_set FAR *)(set))->fd_array[__i] == (fd)) { \
117  break; \
118  } \
119  } \
120  if (__i == ((fd_set FAR *)(set))->fd_count) { \
121  if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) { \
122  ((fd_set FAR *)(set))->fd_array[__i] = (fd); \
123  ((fd_set FAR *)(set))->fd_count++; \
124  } \
125  } \
126 } while(0)
127 #endif
128 
129 #ifndef FD_ZERO
130 #define FD_ZERO(set) (((fd_set FAR*)(set))->fd_count=0)
131 #endif
132 
133 #ifndef FD_ISSET
134 #define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set FAR*)(set))
135 #endif
136 
137 #elif !defined (USE_SYS_TYPES_FD_SET)
138 #warning "fd_set and associated macros have been defined in sys/types. \
139  This may cause runtime problems with W32 sockets"
140 #endif /* ndef _SYS_TYPES_FD_SET */
141 
142 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
143 
144 #ifndef _TIMEVAL_DEFINED
145 
146 /* also in sys/time.h */
147 #define _TIMEVAL_DEFINED
148 #define _STRUCT_TIMEVAL
149 struct timeval {
150  LONG tv_sec;
151  LONG tv_usec;
152 };
153 
154 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
155 
156 #define timercmp(tvp, uvp, cmp) \
157  (((tvp)->tv_sec != (uvp)->tv_sec) ? \
158  ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
159  ((tvp)->tv_usec cmp (uvp)->tv_usec))
160 
161 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
162 
163 #endif /* _TIMEVAL_DEFINED */
164 
165 #define h_addr h_addr_list[0]
166 
167 struct hostent {
168  char *h_name;
169  char **h_aliases;
170  short h_addrtype;
171  short h_length;
172  char **h_addr_list;
173 };
174 
175 struct linger {
178 };
179 
180 #define FIONBIO _IOW('f', 126, u_long)
181 
182 struct netent {
183  char * n_name;
184  char **n_aliases;
185  short n_addrtype;
186  u_long n_net;
187 };
188 
189 struct servent {
190  char FAR *s_name;
191  char FAR **s_aliases;
192 #ifdef _WIN64
193  char FAR *s_proto;
194  short s_port;
195 #else
196  short s_port;
197  char FAR *s_proto;
198 #endif
199 };
200 
201 struct protoent {
202  char *p_name;
203  char **p_aliases;
204  short p_proto;
205 };
206 
207 #define SOMAXCONN 0x7fffffff
208 
209 #define MSG_OOB 1
210 #define MSG_PEEK 2
211 #define MSG_DONTROUTE 4
212 #if(_WIN32_WINNT >= 0x0502)
213 #define MSG_WAITALL 8
214 #endif
215 
216 #define h_errno WSAGetLastError()
217 #define HOST_NOT_FOUND WSAHOST_NOT_FOUND
218 #define TRY_AGAIN WSATRY_AGAIN
219 #define NO_RECOVERY WSANO_RECOVERY
220 #define NO_DATA WSANO_DATA
221 #define NO_ADDRESS WSANO_ADDRESS
222 
223 #endif /* !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__)) */
224 
225 #define FIONREAD _IOR('f', 127, u_long)
226 #define FIOASYNC _IOW('f', 125, u_long)
227 #define SIOCSHIWAT _IOW('s', 0, u_long)
228 #define SIOCGHIWAT _IOR('s', 1, u_long)
229 #define SIOCSLOWAT _IOW('s', 2, u_long)
230 #define SIOCGLOWAT _IOR('s', 3, u_long)
231 #define SIOCATMARK _IOR('s', 7, u_long)
232 
233 #define IMPLINK_IP 155
234 #define IMPLINK_LOWEXPER 156
235 #define IMPLINK_HIGHEXPER 158
236 
237 #define ADDR_ANY INADDR_ANY
238 
239 #define WSADESCRIPTION_LEN 256
240 #define WSASYS_STATUS_LEN 128
241 
242 #define INVALID_SOCKET (SOCKET)(~0)
243 
244 #define SOCKET_ERROR (-1)
245 
246 #define FROM_PROTOCOL_INFO (-1)
247 
248 #define SO_PROTOCOL_INFOA 0x2004
249 #define SO_PROTOCOL_INFOW 0x2005
250 #ifdef UNICODE
251 #define SO_PROTOCOL_INFO SO_PROTOCOL_INFOW
252 #else
253 #define SO_PROTOCOL_INFO SO_PROTOCOL_INFOA
254 #endif
255 #define PVD_CONFIG 0x3001
256 
257 #define PF_UNSPEC AF_UNSPEC
258 #define PF_UNIX AF_UNIX
259 #define PF_INET AF_INET
260 #define PF_IMPLINK AF_IMPLINK
261 #define PF_PUP AF_PUP
262 #define PF_CHAOS AF_CHAOS
263 #define PF_NS AF_NS
264 #define PF_IPX AF_IPX
265 #define PF_ISO AF_ISO
266 #define PF_OSI AF_OSI
267 #define PF_ECMA AF_ECMA
268 #define PF_DATAKIT AF_DATAKIT
269 #define PF_CCITT AF_CCITT
270 #define PF_SNA AF_SNA
271 #define PF_DECnet AF_DECnet
272 #define PF_DLI AF_DLI
273 #define PF_LAT AF_LAT
274 #define PF_HYLINK AF_HYLINK
275 #define PF_APPLETALK AF_APPLETALK
276 #define PF_VOICEVIEW AF_VOICEVIEW
277 #define PF_FIREFOX AF_FIREFOX
278 #define PF_UNKNOWN1 AF_UNKNOWN1
279 #define PF_BAN AF_BAN
280 #define PF_ATM AF_ATM
281 #define PF_INET6 AF_INET6
282 #if(_WIN32_WINNT >= 0x0600)
283 #define PF_BTH AF_BTH
284 #endif
285 #define PF_MAX AF_MAX
286 
287 #define MSG_PARTIAL 0x8000
288 #define MSG_INTERRUPT 0x10
289 #define MSG_MAXIOVLEN 16
290 
291 #define MAXGETHOSTSTRUCT 1024
292 
293 #define FD_READ_BIT 0
294 #define FD_READ (1 << FD_READ_BIT)
295 #define FD_WRITE_BIT 1
296 #define FD_WRITE (1 << FD_WRITE_BIT)
297 #define FD_OOB_BIT 2
298 #define FD_OOB (1 << FD_OOB_BIT)
299 #define FD_ACCEPT_BIT 3
300 #define FD_ACCEPT (1 << FD_ACCEPT_BIT)
301 #define FD_CONNECT_BIT 4
302 #define FD_CONNECT (1 << FD_CONNECT_BIT)
303 #define FD_CLOSE_BIT 5
304 #define FD_CLOSE (1 << FD_CLOSE_BIT)
305 #define FD_QOS_BIT 6
306 #define FD_QOS (1 << FD_QOS_BIT)
307 #define FD_GROUP_QOS_BIT 7
308 #define FD_GROUP_QOS (1 << FD_GROUP_QOS_BIT)
309 #define FD_ROUTING_INTERFACE_CHANGE_BIT 8
310 #define FD_ROUTING_INTERFACE_CHANGE (1 << FD_ROUTING_INTERFACE_CHANGE_BIT)
311 #define FD_ADDRESS_LIST_CHANGE_BIT 9
312 #define FD_ADDRESS_LIST_CHANGE (1 << FD_ADDRESS_LIST_CHANGE_BIT)
313 #define FD_MAX_EVENTS 10
314 #define FD_ALL_EVENTS ((1 << FD_MAX_EVENTS) - 1)
315 
316 #ifndef WSABASEERR
317 
318 #define WSABASEERR 10000
319 #define WSAEINTR (WSABASEERR+4)
320 #define WSAEBADF (WSABASEERR+9)
321 #define WSAEACCES (WSABASEERR+13)
322 #define WSAEFAULT (WSABASEERR+14)
323 #define WSAEINVAL (WSABASEERR+22)
324 #define WSAEMFILE (WSABASEERR+24)
325 #define WSAEWOULDBLOCK (WSABASEERR+35)
326 #define WSAEINPROGRESS (WSABASEERR+36)
327 #define WSAEALREADY (WSABASEERR+37)
328 #define WSAENOTSOCK (WSABASEERR+38)
329 #define WSAEDESTADDRREQ (WSABASEERR+39)
330 #define WSAEMSGSIZE (WSABASEERR+40)
331 #define WSAEPROTOTYPE (WSABASEERR+41)
332 #define WSAENOPROTOOPT (WSABASEERR+42)
333 #define WSAEPROTONOSUPPORT (WSABASEERR+43)
334 #define WSAESOCKTNOSUPPORT (WSABASEERR+44)
335 #define WSAEOPNOTSUPP (WSABASEERR+45)
336 #define WSAEPFNOSUPPORT (WSABASEERR+46)
337 #define WSAEAFNOSUPPORT (WSABASEERR+47)
338 #define WSAEADDRINUSE (WSABASEERR+48)
339 #define WSAEADDRNOTAVAIL (WSABASEERR+49)
340 #define WSAENETDOWN (WSABASEERR+50)
341 #define WSAENETUNREACH (WSABASEERR+51)
342 #define WSAENETRESET (WSABASEERR+52)
343 #define WSAECONNABORTED (WSABASEERR+53)
344 #define WSAECONNRESET (WSABASEERR+54)
345 #define WSAENOBUFS (WSABASEERR+55)
346 #define WSAEISCONN (WSABASEERR+56)
347 #define WSAENOTCONN (WSABASEERR+57)
348 #define WSAESHUTDOWN (WSABASEERR+58)
349 #define WSAETOOMANYREFS (WSABASEERR+59)
350 #define WSAETIMEDOUT (WSABASEERR+60)
351 #define WSAECONNREFUSED (WSABASEERR+61)
352 #define WSAELOOP (WSABASEERR+62)
353 #define WSAENAMETOOLONG (WSABASEERR+63)
354 #define WSAEHOSTDOWN (WSABASEERR+64)
355 #define WSAEHOSTUNREACH (WSABASEERR+65)
356 #define WSAENOTEMPTY (WSABASEERR+66)
357 #define WSAEPROCLIM (WSABASEERR+67)
358 #define WSAEUSERS (WSABASEERR+68)
359 #define WSAEDQUOT (WSABASEERR+69)
360 #define WSAESTALE (WSABASEERR+70)
361 #define WSAEREMOTE (WSABASEERR+71)
362 #define WSASYSNOTREADY (WSABASEERR+91)
363 #define WSAVERNOTSUPPORTED (WSABASEERR+92)
364 #define WSANOTINITIALISED (WSABASEERR+93)
365 #define WSAEDISCON (WSABASEERR+101)
366 #define WSAENOMORE (WSABASEERR+102)
367 #define WSAECANCELLED (WSABASEERR+103)
368 #define WSAEINVALIDPROCTABLE (WSABASEERR+104)
369 #define WSAEINVALIDPROVIDER (WSABASEERR+105)
370 #define WSAEPROVIDERFAILEDINIT (WSABASEERR+106)
371 #define WSASYSCALLFAILURE (WSABASEERR+107)
372 #define WSASERVICE_NOT_FOUND (WSABASEERR+108)
373 #define WSATYPE_NOT_FOUND (WSABASEERR+109)
374 #define WSA_E_NO_MORE (WSABASEERR+110)
375 #define WSA_E_CANCELLED (WSABASEERR+111)
376 #define WSAEREFUSED (WSABASEERR+112)
377 #define WSAHOST_NOT_FOUND (WSABASEERR+1001)
378 #define WSATRY_AGAIN (WSABASEERR+1002)
379 #define WSANO_RECOVERY (WSABASEERR+1003)
380 #define WSANO_DATA (WSABASEERR+1004)
381 #define WSA_QOS_RECEIVERS (WSABASEERR + 1005)
382 #define WSA_QOS_SENDERS (WSABASEERR + 1006)
383 #define WSA_QOS_NO_SENDERS (WSABASEERR + 1007)
384 #define WSA_QOS_NO_RECEIVERS (WSABASEERR + 1008)
385 #define WSA_QOS_REQUEST_CONFIRMED (WSABASEERR + 1009)
386 #define WSA_QOS_ADMISSION_FAILURE (WSABASEERR + 1010)
387 #define WSA_QOS_POLICY_FAILURE (WSABASEERR + 1011)
388 #define WSA_QOS_BAD_STYLE (WSABASEERR + 1012)
389 #define WSA_QOS_BAD_OBJECT (WSABASEERR + 1013)
390 #define WSA_QOS_TRAFFIC_CTRL_ERROR (WSABASEERR + 1014)
391 #define WSA_QOS_GENERIC_ERROR (WSABASEERR + 1015)
392 #define WSA_QOS_ESERVICETYPE (WSABASEERR + 1016)
393 #define WSA_QOS_EFLOWSPEC (WSABASEERR + 1017)
394 #define WSA_QOS_EPROVSPECBUF (WSABASEERR + 1018)
395 #define WSA_QOS_EFILTERSTYLE (WSABASEERR + 1019)
396 #define WSA_QOS_EFILTERTYPE (WSABASEERR + 1020)
397 #define WSA_QOS_EFILTERCOUNT (WSABASEERR + 1021)
398 #define WSA_QOS_EOBJLENGTH (WSABASEERR + 1022)
399 #define WSA_QOS_EFLOWCOUNT (WSABASEERR + 1023)
400 #define WSA_QOS_EUNKOWNPSOBJ (WSABASEERR + 1024)
401 #define WSA_QOS_EPOLICYOBJ (WSABASEERR + 1025)
402 #define WSA_QOS_EFLOWDESC (WSABASEERR + 1026)
403 #define WSA_QOS_EPSFLOWSPEC (WSABASEERR + 1027)
404 #define WSA_QOS_EPSFILTERSPEC (WSABASEERR + 1028)
405 #define WSA_QOS_ESDMODEOBJ (WSABASEERR + 1029)
406 #define WSA_QOS_ESHAPERATEOBJ (WSABASEERR + 1030)
407 #define WSA_QOS_RESERVED_PETYPE (WSABASEERR + 1031)
408 
409 #endif /* !WSABASEERR */
410 
411 #define WSANO_ADDRESS WSANO_DATA
412 
413 #define CF_ACCEPT 0x0000
414 #define CF_REJECT 0x0001
415 #define CF_DEFER 0x0002
416 #define SD_RECEIVE 0x00
417 #define SD_SEND 0x01
418 #define SD_BOTH 0x02
419 
420 #define SG_UNCONSTRAINED_GROUP 0x01
421 #define SG_CONSTRAINED_GROUP 0x02
422 
423 #define MAX_PROTOCOL_CHAIN 7
424 
425 #define BASE_PROTOCOL 1
426 #define LAYERED_PROTOCOL 0
427 
428 #define WSAPROTOCOL_LEN 255
429 
430 #define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
431 #define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
432 #define PFL_HIDDEN 0x00000004
433 #define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
434 #define PFL_NETWORKDIRECT_PROVIDER 0x00000010
435 
436 #define XP1_CONNECTIONLESS 0x00000001
437 #define XP1_GUARANTEED_DELIVERY 0x00000002
438 #define XP1_GUARANTEED_ORDER 0x00000004
439 #define XP1_MESSAGE_ORIENTED 0x00000008
440 #define XP1_PSEUDO_STREAM 0x00000010
441 #define XP1_GRACEFUL_CLOSE 0x00000020
442 #define XP1_EXPEDITED_DATA 0x00000040
443 #define XP1_CONNECT_DATA 0x00000080
444 #define XP1_DISCONNECT_DATA 0x00000100
445 #define XP1_SUPPORT_BROADCAST 0x00000200
446 #define XP1_SUPPORT_MULTIPOINT 0x00000400
447 #define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
448 #define XP1_MULTIPOINT_DATA_PLANE 0x00001000
449 #define XP1_QOS_SUPPORTED 0x00002000
450 #define XP1_INTERRUPT 0x00004000
451 #define XP1_UNI_SEND 0x00008000
452 #define XP1_UNI_RECV 0x00010000
453 #define XP1_IFS_HANDLES 0x00020000
454 #define XP1_PARTIAL_MESSAGE 0x00040000
455 #define XP1_SAN_SUPPORT_SDP 0x00080000
456 
457 #define BIGENDIAN 0x0000
458 #define LITTLEENDIAN 0x0001
459 
460 #define SECURITY_PROTOCOL_NONE 0x0000
461 
462 #define JL_SENDER_ONLY 0x01
463 #define JL_RECEIVER_ONLY 0x02
464 #define JL_BOTH 0x04
465 
466 #define WSA_FLAG_OVERLAPPED 0x01
467 #define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
468 #define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
469 #define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
470 #define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
471 #define WSA_FLAG_ACCESS_SYSTEM_SECURITY 0x40
472 
473 #define TH_NETDEV 0x00000001
474 #define TH_TAPI 0x00000002
475 
476 #define SERVICE_MULTIPLE 0x00000001
477 
478 #define RES_UNUSED_1 0x00000001
479 #define RES_FLUSH_CACHE 0x00000002
480 #ifndef RES_SERVICE
481 #define RES_SERVICE 0x00000004
482 #endif
483 
484 #define SERVICE_TYPE_VALUE_IPXPORTA "IpxSocket"
485 #define SERVICE_TYPE_VALUE_IPXPORTW L"IpxSocket"
486 #define SERVICE_TYPE_VALUE_SAPIDA "SapId"
487 #define SERVICE_TYPE_VALUE_SAPIDW L"SapId"
488 
489 #define SERVICE_TYPE_VALUE_TCPPORTA "TcpPort"
490 #define SERVICE_TYPE_VALUE_TCPPORTW L"TcpPort"
491 
492 #define SERVICE_TYPE_VALUE_UDPPORTA "UdpPort"
493 #define SERVICE_TYPE_VALUE_UDPPORTW L"UdpPort"
494 
495 #define SERVICE_TYPE_VALUE_OBJECTIDA "ObjectId"
496 #define SERVICE_TYPE_VALUE_OBJECTIDW L"ObjectId"
497 
498 #ifdef UNICODE
499 #define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDW
500 #define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTW
501 #define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTW
502 #define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDW
503 #else
504 #define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDA
505 #define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTA
506 #define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTA
507 #define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDA
508 #endif
509 
510 #define LUP_DEEP 0x0001
511 #define LUP_CONTAINERS 0x0002
512 #define LUP_NOCONTAINERS 0x0004
513 #define LUP_NEAREST 0x0008
514 #define LUP_RETURN_NAME 0x0010
515 #define LUP_RETURN_TYPE 0x0020
516 #define LUP_RETURN_VERSION 0x0040
517 #define LUP_RETURN_COMMENT 0x0080
518 #define LUP_RETURN_ADDR 0x0100
519 #define LUP_RETURN_BLOB 0x0200
520 #define LUP_RETURN_ALIASES 0x0400
521 #define LUP_RETURN_QUERY_STRING 0x0800
522 #define LUP_RETURN_ALL 0x0FF0
523 #define LUP_RES_SERVICE 0x8000
524 #define LUP_FLUSHCACHE 0x1000
525 #define LUP_FLUSHPREVIOUS 0x2000
526 #define LUP_NON_AUTHORITATIVE 0x4000
527 #define LUP_SECURE 0x8000
528 #define LUP_RETURN_PREFERRED_NAMES 0x10000
529 #define LUP_ADDRCONFIG 0x00100000
530 #define LUP_DUAL_ADDR 0x00200000
531 #define LUP_FILESERVER 0x00400000
532 
533 #define RESULT_IS_ALIAS 0x0001
534 #if(_WIN32_WINNT >= 0x0501)
535 #define RESULT_IS_ADDED 0x0010
536 #define RESULT_IS_CHANGED 0x0020
537 #define RESULT_IS_DELETED 0x0040
538 #endif
539 
540 #ifndef s_addr
541 
542 #define s_addr S_un.S_addr
543 #define s_host S_un.S_un_b.s_b2
544 #define s_net S_un.S_un_b.s_b1
545 #define s_imp S_un.S_un_w.s_w2
546 #define s_impno S_un.S_un_b.s_b4
547 #define s_lh S_un.S_un_b.s_b3
548 
549 typedef struct in_addr {
550  union {
551  struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
552  struct { u_short s_w1,s_w2; } S_un_w;
553  u_long S_addr;
554  } S_un;
555 } IN_ADDR, *PIN_ADDR;
556 
557 #endif /* s_addr */
558 
559 typedef struct WSAData {
560  WORD wVersion;
562 #ifdef _WIN64
563  unsigned short iMaxSockets;
564  unsigned short iMaxUdpDg;
565  char FAR *lpVendorInfo;
568 #else
571  unsigned short iMaxSockets;
572  unsigned short iMaxUdpDg;
574 #endif
575 } WSADATA, FAR *LPWSADATA;
576 
577 struct sockproto {
580 };
581 
582 #ifdef WIN32
583 
584 #define WSAAPI FAR PASCAL
585 #define WSAEVENT HANDLE
586 #define LPWSAEVENT LPHANDLE
587 #define WSAOVERLAPPED OVERLAPPED
588 typedef struct _OVERLAPPED *LPWSAOVERLAPPED;
589 #define WSA_IO_PENDING (ERROR_IO_PENDING)
590 #define WSA_IO_INCOMPLETE (ERROR_IO_INCOMPLETE)
591 #define WSA_INVALID_HANDLE (ERROR_INVALID_HANDLE)
592 #define WSA_INVALID_PARAMETER (ERROR_INVALID_PARAMETER)
593 #define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
594 #define WSA_OPERATION_ABORTED (ERROR_OPERATION_ABORTED)
595 #define WSA_INVALID_EVENT ((WSAEVENT)NULL)
596 #define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
597 #define WSA_WAIT_FAILED ((DWORD)-1L)
598 #define WSA_WAIT_EVENT_0 (WAIT_OBJECT_0)
599 #define WSA_WAIT_IO_COMPLETION (WAIT_IO_COMPLETION)
600 #define WSA_WAIT_TIMEOUT (WAIT_TIMEOUT)
601 #define WSA_INFINITE (INFINITE)
602 
603 #else /* WIN16 */
604 
605 #define WSAAPI FAR PASCAL
606 typedef DWORD WSAEVENT, FAR * LPWSAEVENT;
607 
608 typedef struct _WSAOVERLAPPED {
609  DWORD Internal;
610  DWORD InternalHigh;
611  DWORD Offset;
612  DWORD OffsetHigh;
615 
616 #define WSA_IO_PENDING (WSAEWOULDBLOCK)
617 #define WSA_IO_INCOMPLETE (WSAEWOULDBLOCK)
618 #define WSA_INVALID_HANDLE (WSAENOTSOCK)
619 #define WSA_INVALID_PARAMETER (WSAEINVAL)
620 #define WSA_NOT_ENOUGH_MEMORY (WSAENOBUFS)
621 #define WSA_OPERATION_ABORTED (WSAEINTR)
622 
623 #define WSA_INVALID_EVENT ((WSAEVENT)NULL)
624 #define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
625 #define WSA_WAIT_FAILED ((DWORD)-1L)
626 #define WSA_WAIT_EVENT_0 ((DWORD)0)
627 #define WSA_WAIT_TIMEOUT ((DWORD)0x102L)
628 #define WSA_INFINITE ((DWORD)-1L)
629 
630 #endif /* WIN32 */
631 
632 #include <qos.h>
633 
634 typedef struct _QualityOfService {
638 } QOS, *LPQOS;
639 
640 typedef unsigned int GROUP;
641 
642 typedef struct _WSANETWORKEVENTS {
646 
647 #ifndef GUID_DEFINED
648 #include <guiddef.h>
649 #endif
650 
651 typedef struct _WSAPROTOCOLCHAIN {
652  int ChainLen;
655 
656 typedef struct _WSAPROTOCOL_INFOA {
665  int iVersion;
678 
679 typedef struct _WSAPROTOCOL_INFOW {
688  int iVersion;
701 
702 #ifdef UNICODE
705 #else
708 #endif
709 
710 typedef int
712  IN LPWSABUF lpCallerId,
713  IN LPWSABUF lpCallerData,
714  IN OUT LPQOS lpSQOS,
715  IN OUT LPQOS lpGQOS,
716  IN LPWSABUF lpCalleeId,
717  IN LPWSABUF lpCalleeData,
718  OUT GROUP FAR *g,
719  IN DWORD_PTR dwCallbackData);
720 
721 typedef void
723  IN DWORD dwError,
724  IN DWORD cbTransferred,
726  IN DWORD dwFlags);
727 
728 #if(_WIN32_WINNT >= 0x0501)
729 
730 #define SIO_NSP_NOTIFY_CHANGE _WSAIOW(IOC_WS2,25)
731 
732 typedef enum _WSACOMPLETIONTYPE {
733  NSP_NOTIFY_IMMEDIATELY = 0,
734  NSP_NOTIFY_HWND,
735  NSP_NOTIFY_EVENT,
736  NSP_NOTIFY_PORT,
737  NSP_NOTIFY_APC
738 } WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, *LPWSACOMPLETIONTYPE;
739 
740 typedef struct _WSACOMPLETION {
741  WSACOMPLETIONTYPE Type;
742  union {
743  struct {
744  HWND hWnd;
745  UINT uMsg;
746  WPARAM context;
747  } WindowMessage;
748  struct {
750  } Event;
751  struct {
753  LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
754  } Apc;
755  struct {
757  HANDLE hPort;
758  ULONG_PTR Key;
759  } Port;
760  } Parameters;
761 } WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION;
762 
763 #endif /* (_WIN32_WINNT >= 0x0501) */
764 
765 #ifndef __BLOB_T_DEFINED /* also in wtypes.h and nspapi.h */
766 #define __BLOB_T_DEFINED
767 /* wine is using a diff define */
768 #ifndef _tagBLOB_DEFINED
769 #define _tagBLOB_DEFINED
770 #define _BLOB_DEFINED
771 #define _LPBLOB_DEFINED
772 
773 typedef struct _BLOB {
774  ULONG cbSize;
775 #ifdef MIDL_PASS
776  [size_is(cbSize)] BYTE *pBlobData;
777 #else
779 #endif
780 } BLOB,*PBLOB,*LPBLOB;
781 
782 #endif /* _tagBLOB_DEFINED */
783 
784 #endif /* __BLOB_T_DEFINED */
785 
786 typedef struct _AFPROTOCOLS {
790 
791 typedef enum _WSAEcomparator {
795 
796 typedef struct _WSAVersion {
800 
801 typedef struct _WSAQuerySetA {
818 
820 typedef struct _WSAQuerySetW {
821  _Field_range_(>=,sizeof(struct _WSAQuerySetW)) DWORD dwSize;
822  LPWSTR lpszServiceInstanceName;
823  LPGUID lpServiceClassId;
824  LPWSAVERSION lpVersion;
825  LPWSTR lpszComment;
826  DWORD dwNameSpace;
827  LPGUID lpNSProviderId;
828  LPWSTR lpszContext;
829  DWORD dwNumberOfProtocols;
830  _Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols;
831  LPWSTR lpszQueryString;
832  DWORD dwNumberOfCsAddrs;
833  _Field_size_(dwNumberOfCsAddrs) LPCSADDR_INFO lpcsaBuffer;
834  DWORD dwOutputFlags;
835  LPBLOB lpBlob;
837 
838 typedef struct _WSAQuerySet2A {
854 
855 typedef struct _WSAQuerySet2W {
871 
872 #ifdef UNICODE
873 typedef WSAQUERYSETW WSAQUERYSET;
879 #else
886 #endif /* UNICODE */
887 
888 typedef enum _WSAESETSERVICEOP {
893 
894 typedef struct _WSANSClassInfoA {
901 
902 typedef struct _WSANSClassInfoW {
909 
910 #ifdef UNICODE
914 #else
918 #endif
919 
920 typedef struct _WSAServiceClassInfoA {
926 
927 typedef struct _WSAServiceClassInfoW {
933 
934 #ifdef UNICODE
938 #else
942 #endif
943 
944 typedef struct _WSANAMESPACE_INFOA {
951 
952 typedef struct _WSANAMESPACE_INFOW {
959 
960 typedef struct _WSANAMESPACE_INFOEXA {
968 
969 typedef struct _WSANAMESPACE_INFOEXW {
977 
978 #ifdef UNICODE
985 #else
992 #endif /* UNICODE */
993 
994 #if(_WIN32_WINNT >= 0x0600)
995 
996 #define POLLRDNORM 0x0100
997 #define POLLRDBAND 0x0200
998 #define POLLIN (POLLRDNORM | POLLRDBAND)
999 #define POLLPRI 0x0400
1000 
1001 #define POLLWRNORM 0x0010
1002 #define POLLOUT (POLLWRNORM)
1003 #define POLLWRBAND 0x0020
1004 
1005 #define POLLERR 0x0001
1006 #define POLLHUP 0x0002
1007 #define POLLNVAL 0x0004
1008 
1009 typedef struct pollfd {
1010  SOCKET fd;
1011  SHORT events;
1012  SHORT revents;
1013 } WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD;
1014 
1015 #endif /* (_WIN32_WINNT >= 0x0600) */
1016 
1017 #if INCL_WINSOCK_API_TYPEDEFS
1018 
1020 typedef SOCKET
1021 (WSAAPI *LPFN_ACCEPT)(
1022  _In_ SOCKET s,
1023  _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr,
1024  _Inout_opt_ int FAR *addrlen);
1025 
1026 typedef int
1027 (WSAAPI *LPFN_BIND)(
1028  _In_ SOCKET s,
1029  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1030  _In_ int namelen);
1031 
1032 typedef int
1033 (WSAAPI *LPFN_CLOSESOCKET)(
1034  _In_ SOCKET s);
1035 
1036 typedef int
1037 (WSAAPI *LPFN_CONNECT)(
1038  _In_ SOCKET s,
1039  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1040  _In_ int namelen);
1041 
1042 typedef int
1043 (WSAAPI *LPFN_IOCTLSOCKET)(
1044  _In_ SOCKET s,
1045  _In_ long cmd,
1046  _Inout_ u_long FAR *argp);
1047 
1048 typedef int
1049 (WSAAPI *LPFN_GETPEERNAME)(
1050  _In_ SOCKET s,
1052  _Inout_ int FAR *namelen);
1053 
1054 typedef int
1055 (WSAAPI *LPFN_GETSOCKNAME)(
1056  _In_ SOCKET s,
1058  _Inout_ int FAR *namelen);
1059 
1060 typedef int
1061 (WSAAPI *LPFN_GETSOCKOPT)(
1062  _In_ SOCKET s,
1063  _In_ int level,
1064  _In_ int optname,
1065  _Out_writes_bytes_(*optlen) char FAR *optval,
1066  _Inout_ int FAR *optlen);
1067 
1068 typedef u_long
1069 (WSAAPI *LPFN_HTONL)(
1070  _In_ u_long hostlong);
1071 
1072 typedef u_short
1073 (WSAAPI *LPFN_HTONS)(
1074  _In_ u_short hostshort);
1075 
1076 typedef unsigned long
1077 (WSAAPI *LPFN_INET_ADDR)(
1078  _In_ const char FAR *cp);
1079 
1080 typedef char FAR *
1081 (WSAAPI *LPFN_INET_NTOA)(
1082  _In_ struct in_addr in);
1083 
1084 typedef int
1085 (WSAAPI *LPFN_LISTEN)(
1086  _In_ SOCKET s,
1087  _In_ int backlog);
1088 
1089 typedef u_long
1090 (WSAAPI *LPFN_NTOHL)(
1091  _In_ u_long netlong);
1092 
1093 typedef u_short
1094 (WSAAPI *LPFN_NTOHS)(
1095  _In_ u_short netshort);
1096 
1097 typedef int
1098 (WSAAPI *LPFN_RECV)(
1099  _In_ SOCKET s,
1100  _Out_writes_bytes_to_(len, return) char FAR *buf,
1101  _In_ int len,
1102  _In_ int flags);
1103 
1104 typedef int
1105 (WSAAPI *LPFN_RECVFROM)(
1106  _In_ SOCKET s,
1107  _Out_writes_bytes_to_(len, return) char FAR *buf,
1108  _In_ int len,
1109  _In_ int flags,
1110  _Out_writes_bytes_to_opt_(*fromlen, *fromlen) struct sockaddr FAR *from,
1111  _Inout_opt_ int FAR * fromlen);
1112 
1113 typedef int
1114 (WSAAPI *LPFN_SELECT)(
1115  _In_ int nfds,
1116  _Inout_opt_ fd_set FAR *readfds,
1117  _Inout_opt_ fd_set FAR *writefds,
1118  _Inout_opt_ fd_set FAR *exceptfds,
1119  _In_opt_ const struct timeval FAR *timeout);
1120 
1121 typedef int
1122 (WSAAPI *LPFN_SEND)(
1123  _In_ SOCKET s,
1124  _In_reads_bytes_(len) const char FAR *buf,
1125  _In_ int len,
1126  _In_ int flags);
1127 
1128 typedef int
1129 (WSAAPI *LPFN_SENDTO)(
1130  _In_ SOCKET s,
1131  _In_reads_bytes_(len) const char FAR *buf,
1132  _In_ int len,
1133  _In_ int flags,
1134  _In_reads_bytes_(tolen) const struct sockaddr FAR *to,
1135  _In_ int tolen);
1136 
1137 typedef int
1138 (WSAAPI *LPFN_SETSOCKOPT)(
1139  _In_ SOCKET s,
1140  _In_ int level,
1141  _In_ int optname,
1142  _In_reads_bytes_(optlen) const char FAR *optval,
1143  _In_ int optlen);
1144 
1145 typedef int
1146 (WSAAPI *LPFN_SHUTDOWN)(
1147  _In_ SOCKET s,
1148  _In_ int how);
1149 
1151 typedef SOCKET
1152 (WSAAPI *LPFN_SOCKET)(
1153  _In_ int af,
1154  _In_ int type,
1155  _In_ int protocol);
1156 
1157 typedef struct hostent FAR *
1158 (WSAAPI *LPFN_GETHOSTBYADDR)(
1159  _In_reads_bytes_(len) const char FAR *addr,
1160  _In_ int len,
1161  _In_ int type);
1162 
1163 typedef struct hostent FAR *
1164 (WSAAPI *LPFN_GETHOSTBYNAME)(
1165  _In_ const char FAR *name);
1166 
1167 typedef int
1168 (WSAAPI *LPFN_GETHOSTNAME)(
1170  _In_ int namelen);
1171 
1172 typedef struct servent FAR *
1173 (WSAAPI *LPFN_GETSERVBYPORT)(
1174  _In_ int port,
1175  _In_opt_z_ const char FAR *proto);
1176 
1177 typedef struct servent FAR *
1178 (WSAAPI *LPFN_GETSERVBYNAME)(
1179  _In_z_ const char FAR *name,
1180  _In_opt_z_ const char FAR *proto);
1181 
1182 typedef struct protoent FAR *
1183 (WSAAPI *LPFN_GETPROTOBYNUMBER)(
1184  _In_ int number);
1185 
1186 typedef struct protoent FAR *
1187 (WSAAPI *LPFN_GETPROTOBYNAME)(
1188  _In_z_ const char FAR *name);
1189 
1191 typedef int
1192 (WSAAPI *LPFN_WSASTARTUP)(
1193  _In_ WORD wVersionRequired,
1194  _Out_ LPWSADATA lpWSAData);
1195 
1196 typedef int
1197 (WSAAPI *LPFN_WSACLEANUP)(void);
1198 
1199 typedef void
1200 (WSAAPI *LPFN_WSASETLASTERROR)(
1201  _In_ int iError);
1202 
1203 typedef int
1204 (WSAAPI *LPFN_WSAGETLASTERROR)(void);
1205 
1206 typedef BOOL
1207 (WSAAPI *LPFN_WSAISBLOCKING)(void);
1208 
1209 typedef int
1210 (WSAAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
1211 
1212 typedef FARPROC
1213 (WSAAPI *LPFN_WSASETBLOCKINGHOOK)(
1214  _In_ FARPROC lpBlockFunc);
1215 
1216 typedef int
1217 (WSAAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
1218 
1219 typedef HANDLE
1220 (WSAAPI *LPFN_WSAASYNCGETSERVBYNAME)(
1221  _In_ HWND hWnd,
1222  _In_ u_int wMsg,
1223  _In_z_ const char FAR *name,
1224  _In_z_ const char FAR *proto,
1225  _Out_writes_bytes_(buflen) char FAR *buf,
1226  _In_ int buflen);
1227 
1228 typedef HANDLE
1229 (WSAAPI *LPFN_WSAASYNCGETSERVBYPORT)(
1230  _In_ HWND hWnd,
1231  _In_ u_int wMsg,
1232  _In_ int port,
1233  _In_ const char FAR *proto,
1234  _Out_writes_bytes_(buflen) char FAR *buf,
1235  _In_ int buflen);
1236 
1237 typedef HANDLE
1238 (WSAAPI *LPFN_WSAASYNCGETPROTOBYNAME)(
1239  _In_ HWND hWnd,
1240  _In_ u_int wMsg,
1241  _In_z_ const char FAR *name,
1242  _Out_writes_bytes_(buflen) char FAR *buf,
1243  _In_ int buflen);
1244 
1245 typedef HANDLE
1246 (WSAAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(
1247  _In_ HWND hWnd,
1248  _In_ u_int wMsg,
1249  _In_ int number,
1250  _Out_writes_bytes_(buflen) char FAR *buf,
1251  _In_ int buflen);
1252 
1253 typedef HANDLE
1254 (WSAAPI *LPFN_WSAASYNCGETHOSTBYNAME)(
1255  _In_ HWND hWnd,
1256  _In_ u_int wMsg,
1257  _In_z_ const char FAR *name,
1258  _Out_writes_bytes_(buflen) char FAR *buf,
1259  _In_ int buflen);
1260 
1261 typedef HANDLE
1262 (WSAAPI *LPFN_WSAASYNCGETHOSTBYADDR)(
1263  _In_ HWND hWnd,
1264  _In_ u_int wMsg,
1265  _In_reads_bytes_(len) const char FAR *addr,
1266  _In_ int len,
1267  _In_ int type,
1268  _Out_writes_bytes_(buflen) char FAR *buf,
1269  _In_ int buflen);
1270 
1271 typedef int
1272 (WSAAPI *LPFN_WSACANCELASYNCREQUEST)(
1273  _In_ HANDLE hAsyncTaskHandle);
1274 
1275 typedef int
1276 (WSAAPI *LPFN_WSAASYNCSELECT)(
1277  _In_ SOCKET s,
1278  _In_ HWND hWnd,
1279  _In_ u_int wMsg,
1280  _In_ long lEvent);
1281 
1283 typedef SOCKET
1284 (WSAAPI *LPFN_WSAACCEPT)(
1285  _In_ SOCKET s,
1286  _Out_writes_bytes_to_opt_(*addrlen,*addrlen) struct sockaddr FAR *addr,
1287  _Inout_opt_ LPINT addrlen,
1288  _In_opt_ LPCONDITIONPROC lpfnCondition,
1289  _In_opt_ DWORD_PTR dwCallbackData);
1290 
1291 typedef BOOL
1292 (WSAAPI *LPFN_WSACLOSEEVENT)(
1293  _In_ WSAEVENT hEvent);
1294 
1295 typedef int
1296 (WSAAPI *LPFN_WSACONNECT)(
1297  _In_ SOCKET s,
1298  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1299  _In_ int namelen,
1300  _In_opt_ LPWSABUF lpCallerData,
1301  _Out_opt_ LPWSABUF lpCalleeData,
1302  _In_opt_ LPQOS lpSQOS,
1303  _In_opt_ LPQOS lpGQOS);
1304 
1305 typedef WSAEVENT
1306 (WSAAPI *LPFN_WSACREATEEVENT)(void);
1307 
1308 typedef int
1309 (WSAAPI *LPFN_WSADUPLICATESOCKETA)(
1310  _In_ SOCKET s,
1311  _In_ DWORD dwProcessId,
1312  _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo);
1313 
1314 typedef int
1315 (WSAAPI *LPFN_WSADUPLICATESOCKETW)(
1316  _In_ SOCKET s,
1317  _In_ DWORD dwProcessId,
1318  _Out_ LPWSAPROTOCOL_INFOW lpProtocolInfo);
1319 
1320 #ifdef UNICODE
1321 #define LPFN_WSADUPLICATESOCKET LPFN_WSADUPLICATESOCKETW
1322 #else
1323 #define LPFN_WSADUPLICATESOCKET LPFN_WSADUPLICATESOCKETA
1324 #endif
1325 
1326 typedef int
1327 (WSAAPI *LPFN_WSAENUMNETWORKEVENTS)(
1328  _In_ SOCKET s,
1329  _In_ WSAEVENT hEventObject,
1330  _Out_ LPWSANETWORKEVENTS lpNetworkEvents);
1331 
1332 typedef int
1333 (WSAAPI *LPFN_WSAENUMPROTOCOLSA)(
1334  _In_opt_ LPINT lpiProtocols,
1337 
1338 typedef int
1339 (WSAAPI *LPFN_WSAENUMPROTOCOLSW)(
1340  _In_opt_ LPINT lpiProtocols,
1343 
1344 #ifdef UNICODE
1345 #define LPFN_WSAENUMPROTOCOLS LPFN_WSAENUMPROTOCOLSW
1346 #else
1347 #define LPFN_WSAENUMPROTOCOLS LPFN_WSAENUMPROTOCOLSA
1348 #endif
1349 
1350 typedef int
1351 (WSAAPI *LPFN_WSAEVENTSELECT)(
1352  _In_ SOCKET s,
1353  _In_opt_ WSAEVENT hEventObject,
1354  _In_ long lNetworkEvents);
1355 
1356 typedef BOOL
1357 (WSAAPI *LPFN_WSAGETOVERLAPPEDRESULT)(
1358  _In_ SOCKET s,
1360  _Out_ LPDWORD lpcbTransfer,
1361  _In_ BOOL fWait,
1362  _Out_ LPDWORD lpdwFlags);
1363 
1364 typedef BOOL
1365 (WSAAPI *LPFN_WSAGETQOSBYNAME)(
1366  IN SOCKET s,
1367  IN LPWSABUF lpQOSName,
1368  OUT LPQOS lpQOS);
1369 
1370 typedef int
1371 (WSAAPI *LPFN_WSAHTONL)(
1372  _In_ SOCKET s,
1373  _In_ u_long hostlong,
1374  _Out_ u_long FAR *lpnetlong);
1375 
1376 typedef int
1377 (WSAAPI *LPFN_WSAHTONS)(
1378  _In_ SOCKET s,
1379  _In_ u_short hostshort,
1380  _Out_ u_short FAR *lpnetshort);
1381 
1382 typedef int
1383 (WSAAPI *LPFN_WSAIOCTL)(
1384  _In_ SOCKET s,
1386  _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer,
1387  _In_ DWORD cbInBuffer,
1388  _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer,
1389  _In_ DWORD cbOutBuffer,
1390  _Out_ LPDWORD lpcbBytesReturned,
1392  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1393 
1394 typedef SOCKET
1395 (WSAAPI *LPFN_WSAJOINLEAF)(
1396  _In_ SOCKET s,
1397  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1398  _In_ int namelen,
1399  _In_opt_ LPWSABUF lpCallerData,
1400  _Out_opt_ LPWSABUF lpCalleeData,
1401  _In_opt_ LPQOS lpSQOS,
1402  _In_opt_ LPQOS lpGQOS,
1403  _In_ DWORD dwFlags);
1404 
1405 typedef int
1406 (WSAAPI *LPFN_WSANTOHL)(
1407  _In_ SOCKET s,
1408  _In_ u_long netlong,
1409  _Out_ u_long FAR *lphostlong);
1410 
1411 typedef int
1412 (WSAAPI *LPFN_WSANTOHS)(
1413  _In_ SOCKET s,
1414  _In_ u_short netshort,
1415  _Out_ u_short FAR *lphostshort);
1416 
1417 typedef int
1418 (WSAAPI *LPFN_WSARECV)(
1419  _In_ SOCKET s,
1420  _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
1421  _In_ DWORD dwBufferCount,
1422  _Out_opt_ LPDWORD lpNumberOfBytesRecvd,
1423  _Inout_ LPDWORD lpFlags,
1425  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1426 
1427 typedef int
1428 (WSAAPI *LPFN_WSARECVDISCONNECT)(
1429  _In_ SOCKET s,
1430  __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData);
1431 
1432 typedef int
1433 (WSAAPI *LPFN_WSARECVFROM)(
1434  _In_ SOCKET s,
1435  _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
1436  _In_ DWORD dwBufferCount,
1437  _Out_opt_ LPDWORD lpNumberOfBytesRecvd,
1438  _Inout_ LPDWORD lpFlags,
1439  _Out_writes_bytes_to_opt_(*lpFromlen,*lpFromlen) struct sockaddr FAR *lpFrom,
1440  _Inout_opt_ LPINT lpFromlen,
1442  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1443 
1444 typedef BOOL
1445 (WSAAPI *LPFN_WSARESETEVENT)(
1446  _In_ WSAEVENT hEvent);
1447 
1448 typedef int
1449 (WSAAPI *LPFN_WSASEND)(
1450  _In_ SOCKET s,
1451  _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
1452  _In_ DWORD dwBufferCount,
1453  _Out_opt_ LPDWORD lpNumberOfBytesSent,
1454  _In_ DWORD dwFlags,
1456  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1457 
1458 typedef int
1459 (WSAAPI *LPFN_WSASENDDISCONNECT)(
1460  _In_ SOCKET s,
1461  _In_opt_ LPWSABUF lpOutboundDisconnectData);
1462 
1463 typedef int
1464 (WSAAPI *LPFN_WSASENDTO)(
1465  _In_ SOCKET s,
1466  _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
1467  _In_ DWORD dwBufferCount,
1468  _Out_opt_ LPDWORD lpNumberOfBytesSent,
1469  _In_ DWORD dwFlags,
1470  _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo,
1471  _In_ int iTolen,
1473  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1474 
1475 typedef BOOL
1476 (WSAAPI *LPFN_WSASETEVENT)(
1477  _In_ WSAEVENT hEvent);
1478 
1480 typedef SOCKET
1481 (WSAAPI *LPFN_WSASOCKETA)(
1482  _In_ int af,
1483  _In_ int type,
1484  _In_ int protocol,
1485  _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
1486  _In_ GROUP g,
1487  _In_ DWORD dwFlags);
1488 
1490 typedef SOCKET
1491 (WSAAPI *LPFN_WSASOCKETW)(
1492  _In_ int af,
1493  _In_ int type,
1494  _In_ int protocol,
1495  _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
1496  _In_ GROUP g,
1497  _In_ DWORD dwFlags);
1498 
1499 #ifdef UNICODE
1500 #define LPFN_WSASOCKET LPFN_WSASOCKETW
1501 #else
1502 #define LPFN_WSASOCKET LPFN_WSASOCKETA
1503 #endif
1504 
1505 typedef DWORD
1506 (WSAAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)(
1507  _In_ DWORD cEvents,
1508  _In_reads_(cEvents) const WSAEVENT FAR *lphEvents,
1509  _In_ BOOL fWaitAll,
1511  _In_ BOOL fAlertable);
1512 
1513 typedef INT
1514 (WSAAPI *LPFN_WSAADDRESSTOSTRINGA)(
1515  _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress,
1516  _In_ DWORD dwAddressLength,
1517  _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
1518  _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPSTR lpszAddressString,
1519  _Inout_ LPDWORD lpdwAddressStringLength);
1520 
1521 typedef INT
1522 (WSAAPI *LPFN_WSAADDRESSTOSTRINGW)(
1523  _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress,
1524  _In_ DWORD dwAddressLength,
1525  _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
1526  _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPWSTR lpszAddressString,
1527  _Inout_ LPDWORD lpdwAddressStringLength);
1528 
1529 #ifdef UNICODE
1530 #define LPFN_WSAADDRESSTOSTRING LPFN_WSAADDRESSTOSTRINGW
1531 #else
1532 #define LPFN_WSAADDRESSTOSTRING LPFN_WSAADDRESSTOSTRINGA
1533 #endif
1534 
1535 typedef INT
1536 (WSAAPI *LPFN_WSASTRINGTOADDRESSA)(
1537  _In_ LPSTR AddressString,
1539  _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
1540  _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress,
1541  _Inout_ LPINT lpAddressLength);
1542 
1543 typedef INT
1544 (WSAAPI *LPFN_WSASTRINGTOADDRESSW)(
1545  _In_ LPWSTR AddressString,
1547  _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
1548  _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress,
1549  _Inout_ LPINT lpAddressLength);
1550 
1551 #ifdef UNICODE
1552 #define LPFN_WSASTRINGTOADDRESS LPFN_WSASTRINGTOADDRESSW
1553 #else
1554 #define LPFN_WSASTRINGTOADDRESS LPFN_WSASTRINGTOADDRESSA
1555 #endif
1556 
1557 typedef INT
1558 (WSAAPI *LPFN_WSALOOKUPSERVICEBEGINA)(
1559  _In_ LPWSAQUERYSETA lpqsRestrictions,
1560  _In_ DWORD dwControlFlags,
1561  _Out_ LPHANDLE lphLookup);
1562 
1563 typedef INT
1564 (WSAAPI *LPFN_WSALOOKUPSERVICEBEGINW)(
1565  _In_ LPWSAQUERYSETW lpqsRestrictions,
1566  _In_ DWORD dwControlFlags,
1567  _Out_ LPHANDLE lphLookup);
1568 
1569 #ifdef UNICODE
1570 #define LPFN_WSALOOKUPSERVICEBEGIN LPFN_WSALOOKUPSERVICEBEGINW
1571 #else
1572 #define LPFN_WSALOOKUPSERVICEBEGIN LPFN_WSALOOKUPSERVICEBEGINA
1573 #endif
1574 
1575 typedef INT
1576 (WSAAPI *LPFN_WSALOOKUPSERVICENEXTA)(
1577  _In_ HANDLE hLookup,
1578  _In_ DWORD dwControlFlags,
1581 
1582 typedef INT
1583 (WSAAPI *LPFN_WSALOOKUPSERVICENEXTW)(
1584  _In_ HANDLE hLookup,
1585  _In_ DWORD dwControlFlags,
1588 
1589 #ifdef UNICODE
1590 #define LPFN_WSALOOKUPSERVICENEXT LPFN_WSALOOKUPSERVICENEXTW
1591 #else
1592 #define LPFN_WSALOOKUPSERVICENEXT LPFN_WSALOOKUPSERVICENEXTA
1593 #endif
1594 
1595 typedef INT
1596 (WSAAPI *LPFN_WSALOOKUPSERVICEEND)(
1597  _In_ HANDLE hLookup);
1598 
1599 typedef INT
1600 (WSAAPI *LPFN_WSAINSTALLSERVICECLASSA)(
1601  _In_ LPWSASERVICECLASSINFOA lpServiceClassInfo);
1602 
1603 typedef INT
1604 (WSAAPI *LPFN_WSAINSTALLSERVICECLASSW)(
1605  _In_ LPWSASERVICECLASSINFOW lpServiceClassInfo);
1606 
1607 #ifdef UNICODE
1608 #define LPFN_WSAINSTALLSERVICECLASS LPFN_WSAINSTALLSERVICECLASSW
1609 #else
1610 #define LPFN_WSAINSTALLSERVICECLASS LPFN_WSAINSTALLSERVICECLASSA
1611 #endif
1612 
1613 typedef INT
1614 (WSAAPI *LPFN_WSAREMOVESERVICECLASS)(
1615  _In_ LPGUID lpServiceClassId);
1616 
1617 typedef INT
1618 (WSAAPI *LPFN_WSAGETSERVICECLASSINFOA)(
1619  _In_ LPGUID lpProviderId,
1620  _In_ LPGUID lpServiceClassId,
1621  _Inout_ LPDWORD lpdwBufSize,
1622  _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo);
1623 
1624 typedef INT
1625 (WSAAPI *LPFN_WSAGETSERVICECLASSINFOW)(
1626  _In_ LPGUID lpProviderId,
1627  _In_ LPGUID lpServiceClassId,
1628  _Inout_ LPDWORD lpdwBufSize,
1629  _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOW lpServiceClassInfo);
1630 
1631 #ifdef UNICODE
1632 #define LPFN_WSAGETSERVICECLASSINFO LPFN_WSAGETSERVICECLASSINFOW
1633 #else
1634 #define LPFN_WSAGETSERVICECLASSINFO LPFN_WSAGETSERVICECLASSINFOA
1635 #endif
1636 
1637 typedef INT
1638 (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)(
1641 
1642 typedef INT
1643 (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSW)(
1646 
1647 #ifdef UNICODE
1648 #define LPFN_WSAENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSW
1649 #else
1650 #define LPFN_WSAENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSA
1651 #endif
1652 
1653 typedef INT
1654 (WSAAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(
1655  _In_ LPGUID lpServiceClassId,
1658 
1659 typedef INT
1660 (WSAAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(
1661  _In_ LPGUID lpServiceClassId,
1664 
1665 #ifdef UNICODE
1666 #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW
1667 #else
1668 #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA
1669 #endif
1670 
1671 typedef INT
1672 (WSAAPI *LPFN_WSASETSERVICEA)(
1673  _In_ LPWSAQUERYSETA lpqsRegInfo,
1674  _In_ WSAESETSERVICEOP essoperation,
1675  _In_ DWORD dwControlFlags);
1676 
1677 typedef INT
1678 (WSAAPI *LPFN_WSASETSERVICEW)(
1679  _In_ LPWSAQUERYSETW lpqsRegInfo,
1680  _In_ WSAESETSERVICEOP essoperation,
1681  _In_ DWORD dwControlFlags);
1682 
1683 #ifdef UNICODE
1684 #define LPFN_WSASETSERVICE LPFN_WSASETSERVICEW
1685 #else
1686 #define LPFN_WSASETSERVICE LPFN_WSASETSERVICEA
1687 #endif
1688 
1689 typedef INT
1690 (WSAAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(
1691  _Inout_ LPHANDLE lpNotificationHandle,
1693  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1694 
1695 #if(_WIN32_WINNT >= 0x0501)
1696 typedef INT
1697 (WSAAPI *LPFN_WSANSPIOCTL)(
1698  _In_ HANDLE hLookup,
1699  _In_ DWORD dwControlCode,
1700  _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer,
1701  _In_ DWORD cbInBuffer,
1702  _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer,
1703  _In_ DWORD cbOutBuffer,
1704  _Out_ LPDWORD lpcbBytesReturned,
1705  _In_opt_ LPWSACOMPLETION lpCompletion);
1706 #endif /* (_WIN32_WINNT >= 0x0501) */
1707 
1708 #if (_WIN32_WINNT >= 0x0600)
1709 
1710 typedef INT
1711 (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSEXA)(
1714 
1715 typedef INT
1716 (WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSEXW)(
1719 
1720 #ifdef UNICODE
1721 #define LPFN_WSAENUMNAMESPACEPROVIDERSEX LPFN_WSAENUMNAMESPACEPROVIDERSEXW
1722 #else
1723 #define LPFN_WSAENUMNAMESPACEPROVIDERSEX LPFN_WSAENUMNAMESPACEPROVIDERSEXA
1724 #endif
1725 
1726 #endif /* (_WIN32_WINNT >= 0x600) */
1727 
1728 #endif /* INCL_WINSOCK_API_TYPEDEFS */
1729 
1730 #if INCL_WINSOCK_API_PROTOTYPES
1731 
1734 SOCKET
1735 WSAAPI
1736 accept(
1737  _In_ SOCKET s,
1738  _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr,
1739  _Inout_opt_ int FAR *addrlen);
1740 
1742 int
1743 WSAAPI
1744 bind(
1745  _In_ SOCKET s,
1746  _In_reads_bytes_(namelen) const struct sockaddr FAR *addr,
1747  _In_ int namelen);
1748 
1750 int
1751 WSAAPI
1752 closesocket(
1753  _In_ SOCKET s);
1754 
1756 int
1757 WSAAPI
1758 connect(
1759  _In_ SOCKET s,
1760  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1761  _In_ int namelen);
1762 
1764 int
1765 WSAAPI
1766 ioctlsocket(
1767  _In_ SOCKET s,
1768  _In_ long cmd,
1769  _Inout_ u_long FAR *argp);
1770 
1772 int
1773 WSAAPI
1774 getpeername(
1775  _In_ SOCKET s,
1777  _Inout_ int FAR *namelen);
1778 
1780 int
1781 WSAAPI
1782 getsockname(
1783  _In_ SOCKET s,
1785  _Inout_ int FAR *namelen);
1786 
1788 int
1789 WSAAPI
1790 getsockopt(
1791  _In_ SOCKET s,
1792  _In_ int level,
1793  _In_ int optname,
1794  _Out_writes_bytes_(*optlen) char FAR *optval,
1795  _Inout_ int FAR *optlen);
1796 
1798 u_long
1799 WSAAPI
1800 htonl(
1801  IN u_long hostlong);
1802 
1804 u_short
1805 WSAAPI
1806 htons(
1807  _In_ u_short hostshort);
1808 
1810 unsigned long
1811 WSAAPI
1812 inet_addr(
1813  _In_z_ const char FAR *cp);
1814 
1816 char FAR *
1817 WSAAPI
1818 inet_ntoa(
1819  _In_ struct in_addr in);
1820 
1822 int
1823 WSAAPI
1824 listen(
1825  _In_ SOCKET s,
1826  _In_ int backlog);
1827 
1829 u_long
1830 WSAAPI
1831 ntohl(
1832  _In_ u_long netlong);
1833 
1835 u_short
1836 WSAAPI
1837 ntohs(
1838  _In_ u_short netshort);
1839 
1841 int
1842 WSAAPI
1843 recv(
1844  _In_ SOCKET s,
1846  _In_ int len,
1847  _In_ int flags);
1848 
1850 int
1851 WSAAPI
1852 recvfrom(
1853  _In_ SOCKET s,
1855  _In_ int len,
1856  _In_ int flags,
1857  _Out_writes_bytes_to_opt_(*fromlen, *fromlen) struct sockaddr FAR *from,
1858  _Inout_opt_ int FAR *fromlen);
1859 
1861 int
1862 WSAAPI
1863 select(
1864  _In_ int nfds,
1865  _Inout_opt_ fd_set FAR *readfds,
1866  _Inout_opt_ fd_set FAR *writefds,
1867  _Inout_opt_ fd_set FAR *exceptfds,
1868  _In_opt_ const struct timeval FAR *timeout);
1869 
1871 int
1872 WSAAPI
1873 send(
1874  _In_ SOCKET s,
1875  _In_reads_bytes_(len) const char FAR *buf,
1876  _In_ int len,
1877  _In_ int flags);
1878 
1880 int
1881 WSAAPI
1882 sendto(
1883  _In_ SOCKET s,
1884  _In_reads_bytes_(len) const char FAR *buf,
1885  _In_ int len,
1886  _In_ int flags,
1887  _In_reads_bytes_(tolen) const struct sockaddr FAR *to,
1888  _In_ int tolen);
1889 
1891 int
1892 WSAAPI
1893 setsockopt(
1894  _In_ SOCKET s,
1895  _In_ int level,
1896  _In_ int optname,
1897  _In_reads_bytes_opt_(optlen) const char FAR *optval,
1898  _In_ int optlen);
1899 
1901 int
1902 WSAAPI
1903 shutdown(
1904  _In_ SOCKET s,
1905  _In_ int how);
1906 
1909 SOCKET
1910 WSAAPI
1911 socket(
1912  _In_ int af,
1913  _In_ int type,
1914  _In_ int protocol);
1915 
1917 struct hostent FAR *
1918 WSAAPI
1920  _In_reads_bytes_(len) const char FAR *addr,
1921  _In_ int len,
1922  _In_ int type);
1923 
1925 struct hostent FAR *
1926 WSAAPI
1928  _In_z_ const char FAR *name);
1929 
1931 int
1932 WSAAPI
1933 gethostname(
1935  _In_ int namelen);
1936 
1938 struct servent FAR *
1939 WSAAPI
1941  _In_ int port,
1942  _In_opt_z_ const char FAR *proto);
1943 
1945 struct servent FAR *
1946 WSAAPI
1948  _In_z_ const char FAR *name,
1949  _In_opt_z_ const char FAR *proto);
1950 
1952 struct protoent FAR *
1953 WSAAPI
1955  _In_ int number);
1956 
1958 struct protoent FAR *
1959 WSAAPI
1961  _In_z_ const char FAR *name);
1962 
1965 int
1966 WSAAPI
1967 WSAStartup(
1968  _In_ WORD wVersionRequired,
1969  _Out_ LPWSADATA lpWSAData);
1970 
1972 int
1973 WSAAPI
1974 WSACleanup(void);
1975 
1977 void
1978 WSAAPI
1980  _In_ int iError);
1981 
1983 int
1984 WSAAPI
1985 WSAGetLastError(void);
1986 
1988 BOOL
1989 WSAAPI
1990 WSAIsBlocking(void);
1991 
1993 int
1994 WSAAPI
1995 WSAUnhookBlockingHook(void);
1996 
1998 FARPROC
1999 WSAAPI
2001  _In_ FARPROC lpBlockFunc);
2002 
2004 int
2005 WSAAPI
2006 WSACancelBlockingCall(void);
2007 
2009 HANDLE
2010 WSAAPI
2012  _In_ HWND hWnd,
2013  _In_ u_int wMsg,
2014  _In_z_ const char FAR *name,
2015  _In_z_ const char FAR *proto,
2016  _Out_writes_bytes_(buflen) char FAR *buf,
2017  _In_ int buflen);
2018 
2020 HANDLE
2021 WSAAPI
2023  _In_ HWND hWnd,
2024  _In_ u_int wMsg,
2025  _In_ int port,
2026  _In_ const char FAR *proto,
2027  _Out_writes_bytes_(buflen) char FAR *buf,
2028  _In_ int buflen);
2029 
2031 HANDLE
2032 WSAAPI
2034  _In_ HWND hWnd,
2035  _In_ u_int wMsg,
2036  _In_z_ const char FAR *name,
2037  _Out_writes_bytes_(buflen) char FAR *buf,
2038  _In_ int buflen);
2039 
2041 HANDLE
2042 WSAAPI
2044  _In_ HWND hWnd,
2045  _In_ u_int wMsg,
2046  _In_ int number,
2047  _Out_writes_bytes_(buflen) char FAR *buf,
2048  _In_ int buflen);
2049 
2051 HANDLE
2052 WSAAPI
2054  _In_ HWND hWnd,
2055  _In_ u_int wMsg,
2056  _In_z_ const char FAR *name,
2057  _Out_writes_bytes_(buflen) char FAR *buf,
2058  _In_ int buflen);
2059 
2061 HANDLE
2062 WSAAPI
2064  _In_ HWND hWnd,
2065  _In_ u_int wMsg,
2066  _In_reads_bytes_(len) const char FAR *addr,
2067  _In_ int len,
2068  _In_ int type,
2069  _Out_writes_bytes_(buflen) char FAR *buf,
2070  _In_ int buflen);
2071 
2073 int
2074 WSAAPI
2076  _In_ HANDLE hAsyncTaskHandle);
2077 
2079 int
2080 WSAAPI
2082  _In_ SOCKET s,
2083  _In_ HWND hWnd,
2084  _In_ u_int wMsg,
2085  _In_ long lEvent);
2086 
2089 SOCKET
2090 WSAAPI
2091 WSAAccept(
2092  _In_ SOCKET s,
2093  _Out_writes_bytes_to_opt_(*addrlen,*addrlen) struct sockaddr FAR *addr,
2094  _Inout_opt_ LPINT addrlen,
2095  _In_opt_ LPCONDITIONPROC lpfnCondition,
2096  _In_opt_ DWORD_PTR dwCallbackData);
2097 
2099 BOOL
2100 WSAAPI
2102  _In_ WSAEVENT hEvent);
2103 
2105 int
2106 WSAAPI
2107 WSAConnect(
2108  _In_ SOCKET s,
2109  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
2110  _In_ int namelen,
2111  _In_opt_ LPWSABUF lpCallerData,
2112  _Out_opt_ LPWSABUF lpCalleeData,
2113  _In_opt_ LPQOS lpSQOS,
2114  _In_opt_ LPQOS lpGQOS);
2115 
2116 #ifdef UNICODE
2117 #define WSAConnectByName WSAConnectByNameW
2118 #else
2119 #define WSAConnectByName WSAConnectByNameA
2120 #endif
2121 
2122 BOOL
2123 PASCAL
2125  _In_ SOCKET s,
2126  _In_ LPWSTR nodename,
2127  _In_ LPWSTR servicename,
2128  _Inout_opt_ LPDWORD LocalAddressLength,
2129  _Out_writes_bytes_to_opt_(*LocalAddressLength,*LocalAddressLength) LPSOCKADDR LocalAddress,
2130  _Inout_opt_ LPDWORD RemoteAddressLength,
2131  _Out_writes_bytes_to_opt_(*RemoteAddressLength,*RemoteAddressLength) LPSOCKADDR RemoteAddress,
2132  _In_opt_ const struct timeval *timeout,
2134 
2135 BOOL
2136 PASCAL
2138  _In_ SOCKET s,
2139  _In_ LPCSTR nodename,
2140  _In_ LPCSTR servicename,
2141  _Inout_opt_ LPDWORD LocalAddressLength,
2142  _Out_writes_bytes_to_opt_(*LocalAddressLength,*LocalAddressLength) LPSOCKADDR LocalAddress,
2143  _Inout_opt_ LPDWORD RemoteAddressLength,
2144  _Out_writes_bytes_to_opt_(*RemoteAddressLength,*RemoteAddressLength) LPSOCKADDR RemoteAddress,
2145  _In_opt_ const struct timeval *timeout,
2147 
2148 BOOL
2149 PASCAL
2151  _In_ SOCKET s,
2152  _In_ PSOCKET_ADDRESS_LIST SocketAddress,
2153  _Inout_opt_ LPDWORD LocalAddressLength,
2154  _Out_writes_bytes_to_opt_(*LocalAddressLength,*LocalAddressLength) LPSOCKADDR LocalAddress,
2155  _Inout_opt_ LPDWORD RemoteAddressLength,
2156  _Out_writes_bytes_to_opt_(*RemoteAddressLength,*RemoteAddressLength) LPSOCKADDR RemoteAddress,
2157  _In_opt_ const struct timeval *timeout,
2159 
2161 WSAEVENT
2162 WSAAPI
2163 WSACreateEvent(void);
2164 
2166 int
2167 WSAAPI
2169  _In_ SOCKET s,
2170  _In_ DWORD dwProcessId,
2171  _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo);
2172 
2174 int
2175 WSAAPI
2177  _In_ SOCKET s,
2178  _In_ DWORD dwProcessId,
2179  _Out_ LPWSAPROTOCOL_INFOW lpProtocolInfo);
2180 
2181 #ifdef UNICODE
2182 #define WSADuplicateSocket WSADuplicateSocketW
2183 #else
2184 #define WSADuplicateSocket WSADuplicateSocketA
2185 #endif
2186 
2188 int
2189 WSAAPI
2191  _In_ SOCKET s,
2192  _In_ WSAEVENT hEventObject,
2193  _Out_ LPWSANETWORKEVENTS lpNetworkEvents);
2194 
2196 int
2197 WSAAPI
2199  _In_opt_ LPINT lpiProtocols,
2202 
2204 int
2205 WSAAPI
2207  _In_opt_ LPINT lpiProtocols,
2210 
2211 #ifdef UNICODE
2212 #define WSAEnumProtocols WSAEnumProtocolsW
2213 #else
2214 #define WSAEnumProtocols WSAEnumProtocolsA
2215 #endif
2216 
2218 int
2219 WSAAPI
2221  _In_ SOCKET s,
2222  _In_opt_ WSAEVENT hEventObject,
2223  _In_ long lNetworkEvents);
2224 
2226 BOOL
2227 WSAAPI
2229  _In_ SOCKET s,
2231  _Out_ LPDWORD lpcbTransfer,
2232  _In_ BOOL fWait,
2233  _Out_ LPDWORD lpdwFlags);
2234 
2236 BOOL
2237 WSAAPI
2239  _In_ SOCKET s,
2240  _In_ LPWSABUF lpQOSName,
2241  _Out_ LPQOS lpQOS);
2242 
2244 int
2245 WSAAPI
2246 WSAHtonl(
2247  _In_ SOCKET s,
2248  _In_ u_long hostlong,
2249  _Out_ u_long FAR *lpnetlong);
2250 
2252 int
2253 WSAAPI
2254 WSAHtons(
2255  _In_ SOCKET s,
2256  _In_ u_short hostshort,
2257  _Out_ u_short FAR *lpnetshort);
2258 
2260 int
2261 WSAAPI
2262 WSAIoctl(
2263  _In_ SOCKET s,
2265  _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer,
2266  _In_ DWORD cbInBuffer,
2267  _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer,
2268  _In_ DWORD cbOutBuffer,
2269  _Out_ LPDWORD lpcbBytesReturned,
2271  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2272 
2274 SOCKET
2275 WSAAPI
2276 WSAJoinLeaf(
2277  _In_ SOCKET s,
2278  _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
2279  _In_ int namelen,
2280  _In_opt_ LPWSABUF lpCallerData,
2281  _Out_opt_ LPWSABUF lpCalleeData,
2282  _In_opt_ LPQOS lpSQOS,
2283  _In_opt_ LPQOS lpGQOS,
2284  _In_ DWORD dwFlags);
2285 
2287 int
2288 WSAAPI
2289 WSANtohl(
2290  _In_ SOCKET s,
2291  _In_ u_long netlong,
2292  _Out_ u_long FAR *lphostlong);
2293 
2295 int
2296 WSAAPI
2297 WSANtohs(
2298  _In_ SOCKET s,
2299  _In_ u_short netshort,
2300  _Out_ u_short FAR *lphostshort);
2301 
2303 int
2304 WSAAPI
2305 WSARecv(
2306  _In_ SOCKET s,
2307  _In_reads_(dwBufferCount) __out_data_source(NETWORK) LPWSABUF lpBuffers,
2308  _In_ DWORD dwBufferCount,
2309  _Out_opt_ LPDWORD lpNumberOfBytesRecvd,
2310  _Inout_ LPDWORD lpFlags,
2312  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2313 
2315 int
2316 WSAAPI
2318  _In_ SOCKET s,
2319  _In_opt_ __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData);
2320 
2322 int
2323 WSAAPI
2324 WSARecvFrom(
2325  _In_ SOCKET s,
2326  _In_reads_(dwBufferCount) __out_data_source(NETWORK) LPWSABUF lpBuffers,
2327  _In_ DWORD dwBufferCount,
2328  _Out_opt_ LPDWORD lpNumberOfBytesRecvd,
2329  _Inout_ LPDWORD lpFlags,
2330  _Out_writes_bytes_to_opt_(*lpFromlen,*lpFromlen) struct sockaddr FAR *lpFrom,
2331  _Inout_opt_ LPINT lpFromlen,
2333  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2334 
2336 BOOL
2337 WSAAPI
2339  _In_ WSAEVENT hEvent);
2340 
2342 int
2343 WSAAPI
2345  _In_ SOCKET s,
2346  _In_opt_ LPWSABUF lpOutboundDisconnectData);
2347 
2349 int
2350 WSAAPI
2351 WSASend(
2352  _In_ SOCKET s,
2353  _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
2354  _In_ DWORD dwBufferCount,
2355  _Out_opt_ LPDWORD lpNumberOfBytesSent,
2356  _In_ DWORD dwFlags,
2358  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2359 
2361 int
2362 WSAAPI
2363 WSASendTo(
2364  _In_ SOCKET s,
2365  _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
2366  _In_ DWORD dwBufferCount,
2367  _Out_opt_ LPDWORD lpNumberOfBytesSent,
2368  _In_ DWORD dwFlags,
2369  _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo,
2370  _In_ int iTolen,
2372  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2373 
2375 BOOL
2376 WSAAPI
2377 WSASetEvent(
2378  _In_ WSAEVENT hEvent);
2379 
2382 SOCKET
2383 WSAAPI
2384 WSASocketA(
2385  _In_ int af,
2386  _In_ int type,
2387  _In_ int protocol,
2388  _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
2389  _In_ GROUP g,
2390  _In_ DWORD dwFlags);
2391 
2394 SOCKET
2395 WSAAPI
2396 WSASocketW(
2397  _In_ int af,
2398  _In_ int type,
2399  _In_ int protocol,
2400  _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
2401  _In_ GROUP g,
2402  _In_ DWORD dwFlags);
2403 
2404 #ifdef UNICODE
2405 #define WSASocket WSASocketW
2406 #else
2407 #define WSASocket WSASocketA
2408 #endif
2409 
2411 DWORD
2412 WSAAPI
2414  _In_ DWORD cEvents,
2415  _In_reads_(cEvents) const WSAEVENT FAR *lphEvents,
2416  _In_ BOOL fWaitAll,
2418  _In_ BOOL fAlertable);
2419 
2421 INT
2422 WSAAPI
2424  _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress,
2425  _In_ DWORD dwAddressLength,
2426  _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
2427  _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPSTR lpszAddressString,
2428  _Inout_ LPDWORD lpdwAddressStringLength);
2429 
2431 INT
2432 WSAAPI
2434  _In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress,
2435  _In_ DWORD dwAddressLength,
2436  _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
2437  _Out_writes_to_(*lpdwAddressStringLength,*lpdwAddressStringLength) LPWSTR lpszAddressString,
2438  _Inout_ LPDWORD lpdwAddressStringLength);
2439 
2440 #ifdef UNICODE
2441 #define WSAAddressToString WSAAddressToStringW
2442 #else
2443 #define WSAAddressToString WSAAddressToStringA
2444 #endif
2445 
2447 INT
2448 WSAAPI
2450  _In_ LPSTR AddressString,
2452  _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
2453  _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress,
2454  _Inout_ LPINT lpAddressLength);
2455 
2457 INT
2458 WSAAPI
2460  _In_ LPWSTR AddressString,
2462  _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
2463  _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress,
2464  _Inout_ LPINT lpAddressLength);
2465 
2466 #ifdef UNICODE
2467 #define WSAStringToAddress WSAStringToAddressW
2468 #else
2469 #define WSAStringToAddress WSAStringToAddressA
2470 #endif
2471 
2473 INT
2474 WSAAPI
2476  _In_ LPWSAQUERYSETA lpqsRestrictions,
2477  _In_ DWORD dwControlFlags,
2478  _Out_ LPHANDLE lphLookup);
2479 
2481 INT
2482 WSAAPI
2484  _In_ LPWSAQUERYSETW lpqsRestrictions,
2485  _In_ DWORD dwControlFlags,
2486  _Out_ LPHANDLE lphLookup);
2487 
2488 #ifdef UNICODE
2489 #define WSALookupServiceBegin WSALookupServiceBeginW
2490 #else
2491 #define WSALookupServiceBegin WSALookupServiceBeginA
2492 #endif
2493 
2495 INT
2496 WSAAPI
2498  _In_ HANDLE hLookup,
2499  _In_ DWORD dwControlFlags,
2502 
2504 INT
2505 WSAAPI
2507  _In_ HANDLE hLookup,
2508  _In_ DWORD dwControlFlags,
2511 
2512 #ifdef UNICODE
2513 #define WSALookupServiceNext WSALookupServiceNextW
2514 #else
2515 #define WSALookupServiceNext WSALookupServiceNextA
2516 #endif
2517 
2519 INT
2520 WSAAPI
2522  _In_ HANDLE hLookup);
2523 
2525 INT
2526 WSAAPI
2528  _In_ LPWSASERVICECLASSINFOA lpServiceClassInfo);
2529 
2531 INT
2532 WSAAPI
2534  _In_ LPWSASERVICECLASSINFOW lpServiceClassInfo);
2535 
2536 #ifdef UNICODE
2537 #define WSAInstallServiceClass WSAInstallServiceClassW
2538 #else
2539 #define WSAInstallServiceClass WSAInstallServiceClassA
2540 #endif
2541 
2543 INT
2544 WSAAPI
2546  _In_ LPGUID lpServiceClassId);
2547 
2549 INT
2550 WSAAPI
2552  _In_ LPGUID lpProviderId,
2553  _In_ LPGUID lpServiceClassId,
2554  _Inout_ LPDWORD lpdwBufSize,
2555  _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo);
2556 
2558 INT
2559 WSAAPI
2561  _In_ LPGUID lpProviderId,
2562  _In_ LPGUID lpServiceClassId,
2563  _Inout_ LPDWORD lpdwBufSize,
2564  _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOW lpServiceClassInfo);
2565 
2566 #ifdef UNICODE
2567 #define WSAGetServiceClassInfo WSAGetServiceClassInfoW
2568 #else
2569 #define WSAGetServiceClassInfo WSAGetServiceClassInfoA
2570 #endif
2571 
2573 INT
2574 WSAAPI
2578 
2580 INT
2581 WSAAPI
2585 
2586 #ifdef UNICODE
2587 #define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
2588 #else
2589 #define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersA
2590 #endif
2591 
2592 _Success_(return == 0)
2594 INT
2595 WSAAPI
2597  _In_ LPGUID lpServiceClassId,
2600 
2601 _Success_(return == 0)
2603 INT
2604 WSAAPI
2606  _In_ LPGUID lpServiceClassId,
2609 
2610 #ifdef UNICODE
2611 #define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdW
2612 #else
2613 #define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdA
2614 #endif
2615 
2617 INT
2618 WSAAPI
2620  _In_ LPWSAQUERYSETA lpqsRegInfo,
2621  _In_ WSAESETSERVICEOP essoperation,
2622  _In_ DWORD dwControlFlags);
2623 
2625 INT
2626 WSAAPI
2628  _In_ LPWSAQUERYSETW lpqsRegInfo,
2629  _In_ WSAESETSERVICEOP essoperation,
2630  _In_ DWORD dwControlFlags);
2631 
2632 #ifdef UNICODE
2633 #define WSASetService WSASetServiceW
2634 #else
2635 #define WSASetService WSASetServiceA
2636 #endif
2637 
2639 INT
2640 WSAAPI
2642  _Inout_ LPHANDLE lpNotificationHandle,
2644  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2645 
2646 #if(_WIN32_WINNT >= 0x0501)
2648 INT
2649 WSAAPI
2650 WSANSPIoctl(
2651  _In_ HANDLE hLookup,
2652  _In_ DWORD dwControlCode,
2653  _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer,
2654  _In_ DWORD cbInBuffer,
2655  _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer,
2656  _In_ DWORD cbOutBuffer,
2657  _Out_ LPDWORD lpcbBytesReturned,
2658  _In_opt_ LPWSACOMPLETION lpCompletion);
2659 #endif /* (_WIN32_WINNT >= 0x0501) */
2660 
2661 #if(_WIN32_WINNT >= 0x0600)
2662 
2664 int
2665 WSAAPI
2666 WSASendMsg(
2667  _In_ SOCKET Handle,
2668  _In_ LPWSAMSG lpMsg,
2669  _In_ DWORD dwFlags,
2670  _Out_opt_ LPDWORD lpNumberOfBytesSent,
2672  _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2673 
2675 INT
2676 WSAAPI
2677 WSAEnumNameSpaceProvidersExA(
2680 
2682 INT
2683 WSAAPI
2684 WSAEnumNameSpaceProvidersExW(
2687 
2688 #ifdef UNICODE
2689 #define WSAEnumNameSpaceProvidersEx WSAEnumNameSpaceProvidersExW
2690 #else
2691 #define WSAEnumNameSpaceProvidersEx WSAEnumNameSpaceProvidersExA
2692 #endif
2693 
2695 int
2696 WSAAPI
2697 WSAPoll(
2698  _Inout_ LPWSAPOLLFD fdArray,
2699  _In_ ULONG fds,
2700  _In_ INT timeout);
2701 
2702 #endif /* (_WIN32_WINNT >= 0x0600) */
2703 
2704 #endif /* INCL_WINSOCK_API_PROTOTYPES */
2705 
2707 typedef struct linger LINGER;
2708 typedef struct linger *PLINGER;
2709 typedef struct linger FAR *LPLINGER;
2710 typedef struct fd_set FD_SET;
2711 typedef struct fd_set *PFD_SET;
2712 typedef struct fd_set FAR *LPFD_SET;
2713 typedef struct hostent HOSTENT;
2714 typedef struct hostent *PHOSTENT;
2715 typedef struct hostent FAR *LPHOSTENT;
2716 typedef struct servent SERVENT;
2717 typedef struct servent *PSERVENT;
2718 typedef struct servent FAR *LPSERVENT;
2719 typedef struct protoent PROTOENT;
2720 typedef struct protoent *PPROTOENT;
2721 typedef struct protoent FAR *LPPROTOENT;
2722 typedef struct timeval TIMEVAL;
2723 typedef struct timeval *PTIMEVAL;
2724 typedef struct timeval FAR *LPTIMEVAL;
2725 
2726 #define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error)
2727 #define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error)
2728 #define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam)
2729 #define WSAGETASYNCERROR(lParam) HIWORD(lParam)
2730 #define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
2731 #define WSAGETSELECTERROR(lParam) HIWORD(lParam)
2732 
2733 #ifdef __cplusplus
2734 }
2735 #endif
2736 
2737 #ifdef _NEED_POPPACK
2738 #include <poppack.h>
2739 #endif
2740 
2741 /* FIXME :
2742 #if(_WIN32_WINNT >= 0x0501)
2743 #ifdef IPV6STRICT
2744 #include <wsipv6ok.h>
2745 #endif
2746 #endif */
2747 
2748 #endif /* !(defined _WINSOCK2API_ || defined _WINSOCKAPI_) */
_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI WSASocketA(_In_ int af, _In_ int type, _In_ int protocol, _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, _In_ GROUP g, _In_ DWORD dwFlags)
struct _WSAQuerySet2A * PWSAQUERYSET2A
_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI socket(_In_ int af, _In_ int type, _In_ int protocol)
WINSOCK_API_LINKAGE int WSAAPI WSAEnumProtocolsW(_In_opt_ LPINT lpiProtocols, _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) LPWSAPROTOCOL_INFOW lpProtocolBuffer, _Inout_ LPDWORD lpdwBufferLength)
DWORD dwProviderFlags
Definition: winsock2.h:684
Definition: winsock.h:66
WINSOCK_API_LINKAGE u_short WSAAPI htons(_In_ u_short hostshort)
WSANAMESPACE_INFOEXA WSANAMESPACE_INFOEX
Definition: winsock2.h:989
SOCKET fd_array[FD_SETSIZE]
Definition: winsock.h:68
LPWSANSCLASSINFOA lpClassInfos
Definition: winsock2.h:924
WINSOCK_API_LINKAGE unsigned long WSAAPI inet_addr(_In_z_ const char FAR *cp)
struct _WSANSClassInfoA WSANSCLASSINFOA
CPPORT Port[4]
Definition: headless.c:34
u_char s_b2
Definition: tcpip.h:129
DWORD dwServiceFlags2
Definition: winsock2.h:681
LPWSANSCLASSINFOA LPWSANSCLASSINFO
Definition: winsock2.h:917
GLint level
Definition: gl.h:1546
#define IN
Definition: typedefs.h:38
int(CALLBACK * LPCONDITIONPROC)(IN LPWSABUF lpCallerId, IN LPWSABUF lpCallerData, IN OUT LPQOS lpSQOS, IN OUT LPQOS lpGQOS, IN LPWSABUF lpCalleeId, IN LPWSABUF lpCalleeData, OUT GROUP FAR *g, IN DWORD_PTR dwCallbackData)
Definition: winsock2.h:711
return
Definition: dirsup.c:529
#define _In_opt_z_
Definition: no_sal2.h:221
char ** h_addr_list
Definition: winsock.h:138
struct _WSANAMESPACE_INFOW WSANAMESPACE_INFOW
#define _Must_inspect_result_
Definition: no_sal2.h:314
#define WSAPROTOCOL_LEN
Definition: winsock2.h:428
IN PCO_ADDRESS_FAMILY AddressFamily
Definition: ndis.h:1906
#define MAX_PROTOCOL_CHAIN
Definition: winsock2.h:423
struct _WSAPROTOCOLCHAIN WSAPROTOCOLCHAIN
WINSOCK_API_LINKAGE FARPROC WSAAPI WSASetBlockingHook(_In_ FARPROC lpBlockFunc)
DWORD dwVersion
Definition: winsock2.h:797
WINSOCK_API_LINKAGE struct servent FAR *WSAAPI getservbyname(_In_z_ const char FAR *name, _In_opt_z_ const char FAR *proto)
struct _WSANSClassInfoW * PWSANSCLASSINFOW
u_short s_w1
Definition: tcpip.h:130
LPSTR lpszQueryString
Definition: winsock2.h:848
#define FD_MAX_EVENTS
Definition: winsock2.h:313
DWORD dwNumberOfCsAddrs
Definition: winsock2.h:849
INT WSPAPI WSANSPIoctl(HANDLE hLookup, DWORD dwControlCode, LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, LPWSACOMPLETION lpCompletion)
Definition: rnr.c:570
WINSOCK_API_LINKAGE int WSAAPI WSAEventSelect(_In_ SOCKET s, _In_opt_ WSAEVENT hEventObject, _In_ long lNetworkEvents)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG Key
Definition: fatprocs.h:2697
WINSOCK_API_LINKAGE BOOL WSAAPI WSAResetEvent(_In_ WSAEVENT hEvent)
union in_addr::@1005 S_un
unsigned long u_long
Definition: linux.h:269
WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetProtoByName(_In_ HWND hWnd, _In_ u_int wMsg, _In_z_ const char FAR *name, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
struct timeval * PTIMEVAL
Definition: winsock2.h:2723
struct _WSAQuerySet2W WSAQUERYSET2W
Type
Definition: Type.h:6
WINSOCK_API_LINKAGE int WSAAPI sendto(_In_ SOCKET s, _In_reads_bytes_(len) const char FAR *buf, _In_ int len, _In_ int flags, _In_reads_bytes_(tolen) const struct sockaddr FAR *to, _In_ int tolen)
DWORD dwServiceFlags3
Definition: winsock2.h:659
struct WSAData * LPWSADATA
BOOL PASCAL WSAConnectByNameW(_In_ SOCKET s, _In_ LPWSTR nodename, _In_ LPWSTR servicename, _Inout_opt_ LPDWORD LocalAddressLength, _Out_writes_bytes_to_opt_(*LocalAddressLength, *LocalAddressLength) LPSOCKADDR LocalAddress, _Inout_opt_ LPDWORD RemoteAddressLength, _Out_writes_bytes_to_opt_(*RemoteAddressLength, *RemoteAddressLength) LPSOCKADDR RemoteAddress, _In_opt_ const struct timeval *timeout, _Reserved_ LPWSAOVERLAPPED Reserved)
#define _Out_writes_bytes_to_(size, count)
Definition: no_sal2.h:374
struct _WSAVersion * LPWSAVERSION
LPBLOB lpBlob
Definition: winsock2.h:869
WINSOCK_API_LINKAGE u_long WSAAPI htonl(IN u_long hostlong)
LPWSTR lpszServiceClassName
Definition: winsock2.h:929
struct _AFPROTOCOLS AFPROTOCOLS
#define _Out_writes_bytes_to_opt_(size, count)
Definition: no_sal2.h:375
Definition: http.c:7098
DWORD dwValueType
Definition: winsock2.h:897
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
WINSOCK_API_LINKAGE INT WSAAPI WSAProviderConfigChange(_Inout_ LPHANDLE lpNotificationHandle, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
Definition: ftp_var.h:139
_Must_inspect_result_ WINSOCK_API_LINKAGE int WSAAPI WSAStartup(_In_ WORD wVersionRequired, _Out_ LPWSADATA lpWSAData)
DWORD dwSize
Definition: winsock2.h:802
struct _WSANSClassInfoW WSANSCLASSINFOW
WORD wVersion
Definition: winsock.h:517
DWORD ChainEntries[MAX_PROTOCOL_CHAIN]
Definition: winsock2.h:653
WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetServByName(_In_ HWND hWnd, _In_ u_int wMsg, _In_z_ const char FAR *name, _In_z_ const char FAR *proto, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
_Success_(return==0) WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassNameByClassIdA(_In_ LPGUID lpServiceClassId
WINSOCK_API_LINKAGE INT WSAAPI WSARemoveServiceClass(_In_ LPGUID lpServiceClassId)
WINSOCK_API_LINKAGE int WSAAPI connect(_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *name, _In_ int namelen)
char * h_name
Definition: winsock.h:134
u_short l_linger
Definition: winsock.h:143
#define _In_reads_(size)
Definition: no_sal2.h:228
char CHAR
Definition: xmlstorage.h:175
_Field_size_bytes_(cbSize) BYTE *pBlobData
#define _In_reads_bytes_opt_(size)
Definition: no_sal2.h:230
#define WSAEVENT
Definition: winsock2.h:585
LPWSAVERSION lpVersion
Definition: winsock2.h:841
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceBeginW(_In_ LPWSAQUERYSETW lpqsRestrictions, _In_ DWORD dwControlFlags, _Out_ LPHANDLE lphLookup)
WINSOCK_API_LINKAGE int WSAAPI WSACleanup(void)
Definition: startup.c:60
LPWSAPROTOCOL_INFOA LPWSAPROTOCOL_INFO
Definition: winsock2.h:707
unsigned long tv_sec
Definition: linux.h:1738
#define INT
Definition: polytest.cpp:20
struct sockaddr_in FAR * LPSOCKADDR_IN
Definition: winsock2.h:2706
WINSOCK_API_LINKAGE SOCKET WSAAPI WSAJoinLeaf(_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *name, _In_ int namelen, _In_opt_ LPWSABUF lpCallerData, _Out_opt_ LPWSABUF lpCalleeData, _In_opt_ LPQOS lpSQOS, _In_opt_ LPQOS lpGQOS, _In_ DWORD dwFlags)
DWORD dwValueType
Definition: winsock2.h:905
WINSOCK_API_LINKAGE int WSAAPI recvfrom(_In_ SOCKET s, _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, _In_ int len, _In_ int flags, _Out_writes_bytes_to_opt_(*fromlen, *fromlen) struct sockaddr FAR *from, _Inout_opt_ int FAR *fromlen)
#define CALLBACK
Definition: compat.h:27
PWSASERVICECLASSINFOA PWSASERVICECLASSINFO
Definition: winsock2.h:940
WSAQUERYSET2A WSAQUERYSET2
Definition: winsock2.h:883
HWND hWnd
Definition: settings.c:17
char ** h_aliases
Definition: winsock.h:135
WINSOCK_API_LINKAGE int WSAAPI setsockopt(_In_ SOCKET s, _In_ int level, _In_ int optname, _In_reads_bytes_opt_(optlen) const char FAR *optval, _In_ int optlen)
DWORD dwNameSpace
Definition: winsock2.h:860
WINSOCK_API_LINKAGE int WSAAPI WSASendTo(_In_ SOCKET s, _In_reads_(dwBufferCount) LPWSABUF lpBuffers, _In_ DWORD dwBufferCount, _Out_opt_ LPDWORD lpNumberOfBytesSent, _In_ DWORD dwFlags, _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo, _In_ int iTolen, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
struct _WSANSClassInfoA * LPWSANSCLASSINFOA
DWORD dwServiceFlags3
Definition: winsock2.h:682
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
WINSOCK_API_LINKAGE WSAEVENT WSAAPI WSACreateEvent(void)
Definition: event.c:42
WINSOCK_API_LINKAGE struct protoent FAR *WSAAPI getprotobynumber(_In_ int number)
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(_In_ HANDLE hLookup)
struct _WSANETWORKEVENTS WSANETWORKEVENTS
LPCSADDR_INFO lpcsaBuffer
Definition: winsock2.h:850
WINSOCK_API_LINKAGE int WSAAPI select(_In_ int nfds, _Inout_opt_ fd_set FAR *readfds, _Inout_opt_ fd_set FAR *writefds, _Inout_opt_ fd_set FAR *exceptfds, _In_opt_ const struct timeval FAR *timeout)
char * cmd
Definition: vfdcmd.c:85
WINSOCK_API_LINKAGE struct hostent FAR *WSAAPI gethostbyname(_In_z_ const char FAR *name)
enum _WSAEcomparator WSAECOMPARATOR
LPWSAQUERYSET2A LPWSAQUERYSET2
Definition: winsock2.h:885
Definition: dhcpd.h:245
UINT_PTR WPARAM
Definition: windef.h:207
LPWSAVERSION lpVersion
Definition: winsock2.h:858
WINSOCK_API_LINKAGE int WSAAPI WSADuplicateSocketW(_In_ SOCKET s, _In_ DWORD dwProcessId, _Out_ LPWSAPROTOCOL_INFOW lpProtocolInfo)
struct in_addr * PIN_ADDR
PWSANAMESPACE_INFOA PWSANAMESPACE_INFO
Definition: winsock2.h:987
WINSOCK_API_LINKAGE INT WSAAPI WSAStringToAddressA(_In_ LPSTR AddressString, _In_ INT AddressFamily, _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, _Out_writes_bytes_to_(*lpAddressLength, *lpAddressLength) LPSOCKADDR lpAddress, _Inout_ LPINT lpAddressLength)
LPWSTR lpszQueryString
Definition: winsock2.h:865
char FAR * s_proto
Definition: winsock2.h:197
unsigned short iMaxUdpDg
Definition: winsock.h:529
DWORD dwNameSpace
Definition: winsock2.h:807
LPWSTR lpszComment
Definition: winsock2.h:859
Definition: nspapi.h:57
char * LPSTR
Definition: xmlstorage.h:182
INT WSAAPI WSAGetServiceClassNameByClassIdW(IN LPGUID lpServiceClassId, OUT LPWSTR lpszServiceClassName, IN OUT LPDWORD lpdwBufferLength)
Definition: rnr.c:672
WINSOCK_API_LINKAGE BOOL WSAAPI WSAGetOverlappedResult(_In_ SOCKET s, _In_ LPWSAOVERLAPPED lpOverlapped, _Out_ LPDWORD lpcbTransfer, _In_ BOOL fWait, _Out_ LPDWORD lpdwFlags)
LPWSANSCLASSINFOW lpClassInfos
Definition: winsock2.h:931
WINSOCK_API_LINKAGE int WSAAPI ioctlsocket(_In_ SOCKET s, _In_ long cmd, _Inout_ u_long FAR *argp)
WINSOCK_API_LINKAGE struct protoent FAR *WSAAPI getprotobyname(_In_z_ const char FAR *name)
#define BOOL
Definition: nt_native.h:43
GLint namelen
Definition: glext.h:7232
#define _Out_writes_to_(size, count)
Definition: no_sal2.h:378
_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI WSAAccept(_In_ SOCKET s, _Out_writes_bytes_to_opt_(*addrlen, *addrlen) struct sockaddr FAR *addr, _Inout_opt_ LPINT addrlen, _In_opt_ LPCONDITIONPROC lpfnCondition, _In_opt_ DWORD_PTR dwCallbackData)
u_int fd_count
Definition: winsock.h:67
#define DWORD
Definition: nt_native.h:44
WINSOCK_API_LINKAGE int WSAAPI WSAUnhookBlockingHook(void)
Definition: bhook.c:130
u_short sp_protocol
Definition: winsock.h:541
int32_t INT
Definition: typedefs.h:56
GLbitfield GLuint64 timeout
Definition: glext.h:7164
DWORD dwNumberOfCsAddrs
Definition: winsock2.h:866
DWORD dwNameSpace
Definition: winsock2.h:896
#define _In_opt_
Definition: no_sal2.h:213
enum _WSAEcomparator * LPWSAECOMPARATOR
WSASERVICECLASSINFOA WSASERVICECLASSINFO
Definition: winsock2.h:939
static HANDLE hEvent
Definition: comm.c:54
struct _BLOB BLOB
WINSOCK_API_LINKAGE int WSAAPI WSARecv(_In_ SOCKET s, _In_reads_(dwBufferCount) __out_data_source(NETWORK) LPWSABUF lpBuffers, _In_ DWORD dwBufferCount, _Out_opt_ LPDWORD lpNumberOfBytesRecvd, _Inout_ LPDWORD lpFlags, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
WINSOCK_API_LINKAGE int WSAAPI gethostname(_Out_writes_bytes_(namelen) char FAR *name, _In_ int namelen)
BYTE * pBlobData
Definition: nspapi.h:59
uint32_t ULONG_PTR
Definition: typedefs.h:63
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceBeginA(_In_ LPWSAQUERYSETA lpqsRestrictions, _In_ DWORD dwControlFlags, _Out_ LPHANDLE lphLookup)
u_char s_b1
Definition: tcpip.h:129
WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetProtoByNumber(_In_ HWND hWnd, _In_ u_int wMsg, _In_ int number, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
DWORD dwServiceFlags2
Definition: winsock2.h:658
WSAPROTOCOL_INFOA WSAPROTOCOL_INFO
Definition: winsock2.h:706
DWORD dwServiceFlags4
Definition: winsock2.h:683
WINSOCK_API_LINKAGE int WSAAPI WSACancelAsyncRequest(_In_ HANDLE hAsyncTaskHandle)
_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI WSASocketW(_In_ int af, _In_ int type, _In_ int protocol, _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, _In_ GROUP g, _In_ DWORD dwFlags)
WINSOCK_API_LINKAGE INT WSAAPI WSAInstallServiceClassW(_In_ LPWSASERVICECLASSINFOW lpServiceClassInfo)
LPBLOB lpBlob
Definition: winsock2.h:816
short events
Definition: linux.h:1869
enum _WSAESETSERVICEOP * LPWSAESETSERVICEOP
struct fd_set FAR * LPFD_SET
Definition: winsock2.h:2712
struct protoent FAR * LPPROTOENT
Definition: winsock2.h:2721
struct linger FAR * LPLINGER
Definition: winsock2.h:2709
LPWSAVERSION lpVersion
Definition: winsock2.h:805
WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetHostByAddr(_In_ HWND hWnd, _In_ u_int wMsg, _In_reads_bytes_(len) const char FAR *addr, _In_ int len, _In_ int type, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
struct servent FAR * LPSERVENT
Definition: winsock2.h:2718
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
DWORD dwNumberOfProtocols
Definition: winsock2.h:846
DWORD dwCatalogEntryId
Definition: winsock2.h:686
unsigned int BOOL
Definition: ntddk_ex.h:94
LPWSTR lpszIdentifier
Definition: winsock2.h:957
struct _WSAQuerySet2A WSAQUERYSET2A
WINSOCK_API_LINKAGE int WSAAPI WSADuplicateSocketA(_In_ SOCKET s, _In_ DWORD dwProcessId, _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo)
long LONG
Definition: pedump.c:60
LPSTR lpszContext
Definition: winsock2.h:845
LPWSAQUERYSETA LPWSAQUERYSET
Definition: winsock2.h:882
static size_t double number
Definition: printf.c:69
short SHORT
Definition: pedump.c:59
WINSOCK_API_LINKAGE INT WSAAPI WSASetServiceA(_In_ LPWSAQUERYSETA lpqsRegInfo, _In_ WSAESETSERVICEOP essoperation, _In_ DWORD dwControlFlags)
u_short sp_family
Definition: winsock.h:540
struct servent * PSERVENT
Definition: winsock2.h:2717
struct fd_set * PFD_SET
Definition: winsock2.h:2711
#define FAR
Definition: guiddef.h:36
DWORD dwCatalogEntryId
Definition: winsock2.h:663
WSANAMESPACE_INFOA WSANAMESPACE_INFO
Definition: winsock2.h:986
struct _WSAPROTOCOL_INFOW WSAPROTOCOL_INFOW
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
struct _WSANSClassInfoA * PWSANSCLASSINFOA
LPSTR lpszComment
Definition: winsock2.h:842
short h_length
Definition: winsock.h:137
LPAFPROTOCOLS lpafpProtocols
Definition: winsock2.h:847
struct WSAData WSADATA
short p_proto
Definition: winsock.h:173
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextW(_In_ HANDLE hLookup, _In_ DWORD dwControlFlags, _Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) LPWSAQUERYSETW lpqsResults)
WINSOCK_API_LINKAGE struct hostent FAR *WSAAPI gethostbyaddr(_In_reads_bytes_(len) const char FAR *addr, _In_ int len, _In_ int type)
struct _WSANAMESPACE_INFOA * PWSANAMESPACE_INFOA
#define _Out_writes_bytes_opt_(a)
Definition: btrfs_drv.h:193
u_char s_b3
Definition: tcpip.h:129
unsigned long tv_usec
Definition: linux.h:1739
WINSOCK_API_LINKAGE int WSAAPI WSARecvDisconnect(_In_ SOCKET s, _In_opt_ __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData)
LPWSTR lpszName
Definition: winsock2.h:903
enum _WSAEcomparator * PWSAECOMPARATOR
WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassInfoW(_In_ LPGUID lpProviderId, _In_ LPGUID lpServiceClassId, _Inout_ LPDWORD lpdwBufSize, _Out_writes_bytes_to_(*lpdwBufSize, *lpdwBufSize) LPWSASERVICECLASSINFOW lpServiceClassInfo)
struct _WSAPROTOCOL_INFOW * LPWSAPROTOCOL_INFOW
#define _Out_writes_bytes_(size)
Definition: no_sal2.h:370
* LPWSAQUERYSETW
Definition: winsock2.h:836
DWORD dwNumberOfProtocols
Definition: winsock2.h:863
#define _Out_
Definition: no_sal2.h:323
WINSOCK_API_LINKAGE int WSAAPI WSAHtonl(_In_ SOCKET s, _In_ u_long hostlong, _Out_ u_long FAR *lpnetlong)
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
DWORD dwSize
Definition: winsock2.h:839
struct _OVERLAPPED * LPWSAOVERLAPPED
Definition: winsock2.h:588
LPWSANAMESPACE_INFOA LPWSANAMESPACE_INFO
Definition: winsock2.h:988
struct _WSANAMESPACE_INFOEXW * LPWSANAMESPACE_INFOEXW
const char * LPCSTR
Definition: xmlstorage.h:183
char szSystemStatus[WSASYS_STATUS_LEN+1]
Definition: winsock.h:527
u_short l_onoff
Definition: winsock.h:142
WINSOCK_API_LINKAGE int WSAAPI WSACancelBlockingCall(void)
Definition: bhook.c:23
struct _WSANAMESPACE_INFOEXA WSANAMESPACE_INFOEXA
PWSAQUERYSET2A PWSAQUERYSET2
Definition: winsock2.h:884
#define WINSOCK_API_LINKAGE
Definition: winsock2.h:36
struct _WSAQuerySet2W * PWSAQUERYSET2W
struct _QualityOfService * LPQOS
WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetHostByName(_In_ HWND hWnd, _In_ u_int wMsg, _In_z_ const char FAR *name, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
WINSOCK_API_LINKAGE int WSAAPI WSAEnumProtocolsA(_In_opt_ LPINT lpiProtocols, _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) LPWSAPROTOCOL_INFOA lpProtocolBuffer, _Inout_ LPDWORD lpdwBufferLength)
_Out_writes_bytes_to_ lpdwBufferLength LPSTR lpszServiceClassName
Definition: winsock2.h:2598
_Out_writes_bytes_to_ lpdwBufferLength LPSTR _Inout_ LPDWORD lpdwBufferLength
Definition: winsock2.h:2598
#define FD_SETSIZE
Definition: winsock.h:50
WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersA(_Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_(*lpdwBufferLength, *lpdwBufferLength) LPWSANAMESPACE_INFOA lpnspBuffer)
struct _WSAPROTOCOL_INFOA * LPWSAPROTOCOL_INFOA
DWORD dwNameSpace
Definition: winsock2.h:843
WINSOCK_API_LINKAGE BOOL WSAAPI WSAGetQOSByName(_In_ SOCKET s, _In_ LPWSABUF lpQOSName, _Out_ LPQOS lpQOS)
#define _Out_opt_
Definition: no_sal2.h:339
_In_ HANDLE Handle
Definition: extypes.h:390
GLboolean GLboolean g
Definition: glext.h:6204
DWORD dwProviderReserved
Definition: winsock2.h:698
#define _Field_size_(size)
Definition: no_sal2.h:189
WSANSCLASSINFOA WSANSCLASSINFO
Definition: winsock2.h:915
struct _WSANAMESPACE_INFOEXW * PWSANAMESPACE_INFOEXW
WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersW(_Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_(*lpdwBufferLength, *lpdwBufferLength) LPWSANAMESPACE_INFOW lpnspBuffer)
struct _WSAQuerySetA * LPWSAQUERYSETA
DWORD dwOutputFlags
Definition: winsock2.h:815
struct _WSAQuerySetA * PWSAQUERYSETA
unsigned short iMaxSockets
Definition: winsock.h:528
_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI accept(_In_ SOCKET s, _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr, _Inout_opt_ int FAR *addrlen)
BOOL PASCAL WSAConnectByNameA(_In_ SOCKET s, _In_ LPCSTR nodename, _In_ LPCSTR servicename, _Inout_opt_ LPDWORD LocalAddressLength, _Out_writes_bytes_to_opt_(*LocalAddressLength, *LocalAddressLength) LPSOCKADDR LocalAddress, _Inout_opt_ LPDWORD RemoteAddressLength, _Out_writes_bytes_to_opt_(*RemoteAddressLength, *RemoteAddressLength) LPSOCKADDR RemoteAddress, _In_opt_ const struct timeval *timeout, _Reserved_ LPWSAOVERLAPPED Reserved)
struct _WSANAMESPACE_INFOEXW WSANAMESPACE_INFOEXW
WINSOCK_API_LINKAGE INT WSAAPI WSASetServiceW(_In_ LPWSAQUERYSETW lpqsRegInfo, _In_ WSAESETSERVICEOP essoperation, _In_ DWORD dwControlFlags)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WINSOCK_API_LINKAGE int WSAAPI WSANtohl(_In_ SOCKET s, _In_ u_long netlong, _Out_ u_long FAR *lphostlong)
CHAR szProtocol[WSAPROTOCOL_LEN+1]
Definition: winsock2.h:676
struct _WSAServiceClassInfoA * LPWSASERVICECLASSINFOA
ULONG cbSize
Definition: nspapi.h:58
Definition: tcpip.h:125
struct _WSAPROTOCOLCHAIN * LPWSAPROTOCOLCHAIN
DWORD dwOutputFlags
Definition: winsock2.h:868
enum _WSAESETSERVICEOP WSAESETSERVICEOP
WINSOCK_API_LINKAGE struct servent FAR *WSAAPI getservbyport(_In_ int port, _In_opt_z_ const char FAR *proto)
char ** n_aliases
Definition: winsock.h:153
u_long n_net
Definition: winsock.h:155
unsigned int GROUP
Definition: winsock2.h:640
WINSOCK_API_LINKAGE int WSAAPI WSARecvFrom(_In_ SOCKET s, _In_reads_(dwBufferCount) __out_data_source(NETWORK) LPWSABUF lpBuffers, _In_ DWORD dwBufferCount, _Out_opt_ LPDWORD lpNumberOfBytesRecvd, _Inout_ LPDWORD lpFlags, _Out_writes_bytes_to_opt_(*lpFromlen, *lpFromlen) struct sockaddr FAR *lpFrom, _Inout_opt_ LPINT lpFromlen, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
WINSOCK_API_LINKAGE INT WSAAPI WSAAddressToStringA(_In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress, _In_ DWORD dwAddressLength, _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo, _Out_writes_to_(*lpdwAddressStringLength, *lpdwAddressStringLength) LPSTR lpszAddressString, _Inout_ LPDWORD lpdwAddressStringLength)
unsigned short WORD
Definition: ntddk_ex.h:93
#define _Field_range_(min, max)
Definition: no_sal2.h:188
PVOID HANDLE
Definition: typedefs.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _BLOB * PBLOB
WINSOCK_API_LINKAGE int WSAAPI getsockopt(_In_ SOCKET s, _In_ int level, _In_ int optname, _Out_writes_bytes_(*optlen) char FAR *optval, _Inout_ int FAR *optlen)
WINSOCK_API_LINKAGE int WSAAPI shutdown(_In_ SOCKET s, _In_ int how)
WINSOCK_API_LINKAGE void WSAAPI WSASetLastError(_In_ int iError)
LPWSTR lpszServiceInstanceName
Definition: winsock2.h:857
Definition: qos.h:45
#define _Inout_
Definition: no_sal2.h:244
Definition: linux.h:1867
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
WINSOCK_API_LINKAGE INT WSAAPI WSAAddressToStringW(_In_reads_bytes_(dwAddressLength) LPSOCKADDR lpsaAddress, _In_ DWORD dwAddressLength, _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, _Out_writes_to_(*lpdwAddressStringLength, *lpdwAddressStringLength) LPWSTR lpszAddressString, _Inout_ LPDWORD lpdwAddressStringLength)
unsigned short u_short
Definition: types.h:81
char * lpVendorInfo
Definition: winsock.h:530
WINSOCK_API_LINKAGE int WSAAPI recv(_In_ SOCKET s, _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, _In_ int len, _In_ int flags)
struct hostent FAR * LPHOSTENT
Definition: winsock2.h:2715
GLbitfield flags
Definition: glext.h:7161
char FAR * s_name
Definition: winsock2.h:190
FLOWSPEC ReceivingFlowspec
Definition: winsock2.h:636
_In_ _In_opt_ _Out_writes_bytes_to_opt_ lpdwBufferLength __out_data_source(NETWORK) LPVOID
WINSOCK_API_LINKAGE int WSAAPI getsockname(_In_ SOCKET s, _Out_writes_bytes_to_(*namelen, *namelen) struct sockaddr FAR *name, _Inout_ int FAR *namelen)
BOOL PASCAL WSAConnectByList(_In_ SOCKET s, _In_ PSOCKET_ADDRESS_LIST SocketAddress, _Inout_opt_ LPDWORD LocalAddressLength, _Out_writes_bytes_to_opt_(*LocalAddressLength, *LocalAddressLength) LPSOCKADDR LocalAddress, _Inout_opt_ LPDWORD RemoteAddressLength, _Out_writes_bytes_to_opt_(*RemoteAddressLength, *RemoteAddressLength) LPSOCKADDR RemoteAddress, _In_opt_ const struct timeval *timeout, _Reserved_ LPWSAOVERLAPPED Reserved)
DWORD dwValueSize
Definition: winsock2.h:898
#define _Reserved_
Definition: no_sal2.h:573
struct _WSAServiceClassInfoW * LPWSASERVICECLASSINFOW
WINSOCK_API_LINKAGE int WSAAPI send(_In_ SOCKET s, _In_reads_bytes_(len) const char FAR *buf, _In_ int len, _In_ int flags)
LPSTR lpszServiceClassName
Definition: winsock2.h:922
GLenum const GLvoid * addr
Definition: glext.h:9621
WSAPROTOCOLCHAIN ProtocolChain
Definition: winsock2.h:687
_In_ PPCI_DEVICE_PRESENCE_PARAMETERS Parameters
Definition: iotypes.h:872
WINSOCK_API_LINKAGE int WSAAPI WSAIoctl(_In_ SOCKET s, _In_ DWORD dwIoControlCode, _In_reads_bytes_opt_(cbInBuffer) LPVOID lpvInBuffer, _In_ DWORD cbInBuffer, _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbBytesReturned) LPVOID lpvOutBuffer, _In_ DWORD cbOutBuffer, _Out_ LPDWORD lpcbBytesReturned, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
WINSOCK_API_LINKAGE BOOL WSAAPI WSAIsBlocking(void)
Definition: bhook.c:65
struct timeval FAR * LPTIMEVAL
Definition: winsock2.h:2724
WSAQUERYSETW
Definition: winsock2.h:836
char * n_name
Definition: winsock.h:152
struct _WSANAMESPACE_INFOEXA * LPWSANAMESPACE_INFOEXA
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
FLOWSPEC SendingFlowspec
Definition: winsock2.h:635
struct _WSAQuerySetA WSAQUERYSETA
HANDLE lEvent
Definition: tftpd.cpp:56
GLenum GLsizei len
Definition: glext.h:6722
LPGUID lpNSProviderId
Definition: winsock2.h:808
PWSAQUERYSETA PWSAQUERYSET
Definition: winsock2.h:881
unsigned char BYTE
Definition: mem.h:68
GLdouble s
Definition: gl.h:2039
struct in_addr IN_ADDR
WINSOCK_API_LINKAGE int WSAAPI WSASend(_In_ SOCKET s, _In_reads_(dwBufferCount) LPWSABUF lpBuffers, _In_ DWORD dwBufferCount, _Out_opt_ LPDWORD lpNumberOfBytesSent, _In_ DWORD dwFlags, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
#define LPWSAEVENT
Definition: winsock2.h:586
WINSOCK_API_LINKAGE int WSAAPI WSASendDisconnect(_In_ SOCKET s, _In_opt_ LPWSABUF lpOutboundDisconnectData)
#define PASCAL
Definition: windef.h:133
uint32_t DWORD_PTR
Definition: typedefs.h:63
LPWSASERVICECLASSINFOA LPWSASERVICECLASSINFO
Definition: winsock2.h:941
struct _WSAVersion * PWSAVERSION
struct hostent * PHOSTENT
Definition: winsock2.h:2714
char szDescription[WSADESCRIPTION_LEN+1]
Definition: winsock.h:526
LPGUID lpNSProviderId
Definition: winsock2.h:844
INT WSAAPI WSAGetServiceClassNameByClassIdA(IN LPGUID lpServiceClassId, OUT LPSTR lpszServiceClassName, IN OUT LPDWORD lpdwBufferLength)
Definition: rnr.c:658
#define _In_reads_bytes_(size)
Definition: no_sal2.h:229
WSAPROTOCOLCHAIN ProtocolChain
Definition: winsock2.h:664
struct _WSAServiceClassInfoA WSASERVICECLASSINFOA
struct _WSANAMESPACE_INFOW * PWSANAMESPACE_INFOW
short n_addrtype
Definition: winsock.h:154
struct _WSAServiceClassInfoW WSASERVICECLASSINFOW
LPVOID lpValue
Definition: winsock2.h:899
PWSANSCLASSINFOA PWSANSCLASSINFO
Definition: winsock2.h:916
struct _WSAQuerySet2A * LPWSAQUERYSET2A
INT iProtocol
Definition: winsock2.h:788
u_long S_addr
Definition: tcpip.h:131
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextA(_In_ HANDLE hLookup, _In_ DWORD dwControlFlags, _Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_(*lpdwBufferLength, *lpdwBufferLength) LPWSAQUERYSETA lpqsResults)
short h_addrtype
Definition: winsock.h:136
#define _In_
Definition: no_sal2.h:204
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
struct _WSANETWORKEVENTS * LPWSANETWORKEVENTS
_WSAESETSERVICEOP
Definition: winsock2.h:888
struct _WSANAMESPACE_INFOA * LPWSANAMESPACE_INFOA
struct _WSAPROTOCOL_INFOA WSAPROTOCOL_INFOA
struct _BLOB * LPBLOB
int iErrorCode[FD_MAX_EVENTS]
Definition: winsock2.h:644
int fd
Definition: linux.h:1868
_WSAEcomparator
Definition: winsock2.h:791
DWORD dwNumberOfCsAddrs
Definition: winsock2.h:813
DWORD dwProviderFlags
Definition: winsock2.h:661
LPBLOB lpBlob
Definition: winsock2.h:852
WINSOCK_API_LINKAGE int WSAAPI getpeername(_In_ SOCKET s, _Out_writes_bytes_to_(*namelen, *namelen) struct sockaddr FAR *name, _Inout_ int FAR *namelen)
LPSTR lpszQueryString
Definition: winsock2.h:812
WINSOCK_API_LINKAGE int WSAAPI WSANtohs(_In_ SOCKET s, _In_ u_short netshort, _Out_ u_short FAR *lphostshort)
int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *)
WINSOCK_API_LINKAGE int WSAAPI listen(_In_ SOCKET s, _In_ int backlog)
DWORD dwServiceFlags1
Definition: winsock2.h:680
* PWSAQUERYSETW
Definition: winsock2.h:836
GLuint in
Definition: glext.h:9616
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
Definition: mswsock.h:90
char ** p_aliases
Definition: winsock.h:172
WINSOCK_API_LINKAGE int WSAAPI closesocket(_In_ SOCKET s)
UINT32 u_int
Definition: types.h:82
#define _In_z_
Definition: no_sal2.h:239
WINSOCK_API_LINKAGE BOOL WSAAPI WSACloseEvent(_In_ WSAEVENT hEvent)
#define WSADESCRIPTION_LEN
Definition: winsock2.h:239
WINSOCK_API_LINKAGE DWORD WSAAPI WSAWaitForMultipleEvents(_In_ DWORD cEvents, _In_reads_(cEvents) const WSAEVENT FAR *lphEvents, _In_ BOOL fWaitAll, _In_ DWORD dwTimeout, _In_ BOOL fAlertable)
#define WSAAPI
Definition: winsock2.h:584
WINSOCK_API_LINKAGE int WSAAPI WSAHtons(_In_ SOCKET s, _In_ u_short hostshort, _Out_ u_short FAR *lpnetshort)
#define long
Definition: qsort.c:33
short s_port
Definition: winsock.h:165
WINSOCK_API_LINKAGE int WSAAPI WSAAsyncSelect(_In_ SOCKET s, _In_ HWND hWnd, _In_ u_int wMsg, _In_ long lEvent)
u_char s_b4
Definition: tcpip.h:129
struct _WSAServiceClassInfoA * PWSASERVICECLASSINFOA
WSABUF ProviderSpecific
Definition: winsock2.h:637
WSAECOMPARATOR ecHow
Definition: winsock2.h:798
struct _WSANAMESPACE_INFOEXA * PWSANAMESPACE_INFOEXA
WINSOCK_API_LINKAGE int WSAAPI WSAEnumNetworkEvents(_In_ SOCKET s, _In_ WSAEVENT hEventObject, _Out_ LPWSANETWORKEVENTS lpNetworkEvents)
unsigned int UINT
Definition: ndis.h:50
WSAQUERYSETA WSAQUERYSET
Definition: winsock2.h:880
WINSOCK_API_LINKAGE INT WSAAPI WSAInstallServiceClassA(_In_ LPWSASERVICECLASSINFOA lpServiceClassInfo)
struct _WSANSClassInfoW * LPWSANSCLASSINFOW
INT iAddressFamily
Definition: winsock2.h:787
short revents
Definition: linux.h:1870
LPSTR lpszServiceInstanceName
Definition: winsock2.h:840
LPGUID lpNSProviderId
Definition: winsock2.h:861
#define WSAOVERLAPPED
Definition: winsock2.h:587
DWORD dwProviderReserved
Definition: winsock2.h:675
WINSOCK_API_LINKAGE u_short WSAAPI ntohs(_In_ u_short netshort)
_Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols
DWORD dwSize
Definition: winsock2.h:856
struct in_addr::@1005::@1006 S_un_b
POINT cp
Definition: magnifier.c:59
Definition: name.c:38
UINT_PTR SOCKET
Definition: winsock2.h:72
#define OUT
Definition: typedefs.h:39
struct fd_set fd_set
struct _WSAVersion WSAVERSION
void(CALLBACK * LPWSAOVERLAPPED_COMPLETION_ROUTINE)(IN DWORD dwError, IN DWORD cbTransferred, IN LPWSAOVERLAPPED lpOverlapped, IN DWORD dwFlags)
Definition: winsock2.h:722
LPSTR lpszComment
Definition: winsock2.h:806
struct _WSAQuerySet2W * LPWSAQUERYSET2W
uint32_t * LPDWORD
Definition: typedefs.h:57
char * s_proto
Definition: winsock.h:166
WINSOCK_API_LINKAGE char FAR *WSAAPI inet_ntoa(_In_ struct in_addr in)
WINSOCK_API_LINKAGE int WSAAPI WSAGetLastError(void)
Definition: dllmain.c:112
unsigned int ULONG
Definition: retypes.h:1
WINSOCK_API_LINKAGE int WSAAPI WSAConnect(_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *name, _In_ int namelen, _In_opt_ LPWSABUF lpCallerData, _Out_opt_ LPWSABUF lpCalleeData, _In_opt_ LPQOS lpSQOS, _In_opt_ LPQOS lpGQOS)
LPGUID lpServiceClassId
Definition: winsock2.h:804
_Struct_size_bytes_(dwSize) typedef struct _WSAQuerySetW
Definition: winsock2.h:819
struct protoent * PPROTOENT
Definition: winsock2.h:2720
DWORD dwNameSpace
Definition: winsock2.h:904
struct linger * PLINGER
Definition: winsock2.h:2708
WORD wHighVersion
Definition: winsock.h:518
WCHAR szProtocol[WSAPROTOCOL_LEN+1]
Definition: winsock2.h:699
WINSOCK_API_LINKAGE int WSAAPI bind(_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *addr, _In_ int namelen)
UINT_PTR SOCKET
Definition: winsock.h:47
char FAR ** s_aliases
Definition: winsock2.h:191
struct _AFPROTOCOLS * PAFPROTOCOLS
WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassInfoA(_In_ LPGUID lpProviderId, _In_ LPGUID lpServiceClassId, _Inout_ LPDWORD lpdwBufSize, _Out_writes_bytes_to_(*lpdwBufSize, *lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo)
struct _AFPROTOCOLS * LPAFPROTOCOLS
LPWSANAMESPACE_INFOEXA LPWSANAMESPACE_INFOEX
Definition: winsock2.h:991
WINSOCK_API_LINKAGE HANDLE WSAAPI WSAAsyncGetServByPort(_In_ HWND hWnd, _In_ u_int wMsg, _In_ int port, _In_ const char FAR *proto, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
LPWSTR lpszContext
Definition: winsock2.h:862
WCHAR * LPWSTR
Definition: xmlstorage.h:184
struct in_addr::@1005::@1007 S_un_w
WINSOCK_API_LINKAGE INT WSAAPI WSAStringToAddressW(_In_ LPWSTR AddressString, _In_ INT AddressFamily, _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo, _Out_writes_bytes_to_(*lpAddressLength, *lpAddressLength) LPSOCKADDR lpAddress, _Inout_ LPINT lpAddressLength)
CardRegion * from
Definition: spigame.cpp:19
struct _QualityOfService QOS
UCHAR u_char
Definition: types.h:80
PWSANAMESPACE_INFOEXA PWSANAMESPACE_INFOEX
Definition: winsock2.h:990
#define WSASYS_STATUS_LEN
Definition: winsock2.h:240
char FAR * lpVendorInfo
Definition: winsock2.h:573
USHORT port
Definition: uri.c:228
DWORD dwServiceFlags1
Definition: winsock2.h:657
DWORD dwNumberOfProtocols
Definition: winsock2.h:810
LPSTR lpszServiceInstanceName
Definition: winsock2.h:803
WINSOCK_API_LINKAGE u_long WSAAPI ntohl(_In_ u_long netlong)
WINSOCK_API_LINKAGE BOOL WSAAPI WSASetEvent(_In_ WSAEVENT hEvent)
_Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols
LPVOID lpValue
Definition: winsock2.h:907
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
DWORD dwOutputFlags
Definition: winsock2.h:851
int(* FARPROC)()
Definition: compat.h:28
DWORD dwServiceFlags4
Definition: winsock2.h:660
#define NETWORK
Definition: config.h:292
#define __int64
Definition: basetyps.h:16
struct _WSAServiceClassInfoW * PWSASERVICECLASSINFOW
DWORD dwValueSize
Definition: winsock2.h:906
LPSTR lpszContext
Definition: winsock2.h:809
#define _Inout_opt_
Definition: no_sal2.h:258
u_short s_w2
Definition: tcpip.h:130
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Definition: wsk.h:170
char * p_name
Definition: winsock.h:171
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
int * LPINT
Definition: windef.h:178
enum _WSAESETSERVICEOP * PWSAESETSERVICEOP
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
Definition: wsk.h:170
struct _WSANAMESPACE_INFOW * LPWSANAMESPACE_INFOW
_In_ DWORD dwIoControlCode
Definition: winddi.h:1700
struct _WSANAMESPACE_INFOA WSANAMESPACE_INFOA
GLuint const GLchar * name
Definition: glext.h:6031