ReactOS 0.4.15-dev-5666-gc548b97
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
49extern "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 */
55typedef unsigned char u_char;
56typedef unsigned short u_short;
57typedef unsigned int u_int;
58#ifndef __ROS_LONG64__
59typedef unsigned long u_long;
60#else
61typedef unsigned int u_long;
62#endif
63#define _BSDTYPES_DEFINED
64#endif /* ! def _BSDTYPES_DEFINED */
65
66#if(_WIN32_WINNT >= 0x0501)
67typedef unsigned __int64 u_int64;
68#endif /* (_WIN32_WINNT >= 0x0501) */
69
70#include <ws2def.h>
71
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
87typedef struct fd_set {
91
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
149struct timeval {
150 LONG tv_sec;
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
167struct hostent {
168 char *h_name;
169 char **h_aliases;
170 short h_addrtype;
171 short h_length;
172 char **h_addr_list;
173};
174
175struct linger {
178};
179
180#define FIONBIO _IOW('f', 126, u_long)
181
182struct netent {
183 char * n_name;
184 char **n_aliases;
185 short n_addrtype;
187};
188
189struct servent {
190 char FAR *s_name;
192#ifdef _WIN64
193 char FAR *s_proto;
194 short s_port;
195#else
196 short s_port;
198#endif
199};
200
201struct 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
549typedef struct in_addr {
550 union {
552 struct { u_short s_w1,s_w2; } S_un_w;
556
557#endif /* s_addr */
558
559typedef struct WSAData {
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
576
577struct sockproto {
580};
581
582#ifdef WIN32
583
584#define WSAAPI FAR PASCAL
585#define WSAEVENT HANDLE
586#define LPWSAEVENT LPHANDLE
587#define WSAOVERLAPPED OVERLAPPED
588typedef 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
607
608typedef struct _WSAOVERLAPPED {
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
634typedef struct _QualityOfService {
639
640typedef unsigned int GROUP;
641
642typedef struct _WSANETWORKEVENTS {
646
647#ifndef GUID_DEFINED
648#include <guiddef.h>
649#endif
650
651typedef struct _WSAPROTOCOLCHAIN {
655
656typedef struct _WSAPROTOCOL_INFOA {
678
679typedef struct _WSAPROTOCOL_INFOW {
701
702#ifdef UNICODE
705#else
708#endif
709
710typedef 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
721typedef void
723 IN DWORD dwError,
724 IN DWORD cbTransferred,
727
728#if(_WIN32_WINNT >= 0x0501)
729
730#define SIO_NSP_NOTIFY_CHANGE _WSAIOW(IOC_WS2,25)
731
732typedef 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
740typedef struct _WSACOMPLETION {
741 WSACOMPLETIONTYPE Type;
742 union {
743 struct {
744 HWND hWnd;
745 UINT uMsg;
747 } WindowMessage;
748 struct {
750 } Event;
751 struct {
753 LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
754 } Apc;
755 struct {
757 HANDLE hPort;
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
773typedef struct _BLOB {
775#ifdef MIDL_PASS
776 [size_is(cbSize)] BYTE *pBlobData;
777#else
779#endif
781
782#endif /* _tagBLOB_DEFINED */
783
784#endif /* __BLOB_T_DEFINED */
785
786typedef struct _AFPROTOCOLS {
790
791typedef enum _WSAEcomparator {
795
796typedef struct _WSAVersion {
800
801typedef struct _WSAQuerySetA {
818
820typedef 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
838typedef struct _WSAQuerySet2A {
854
855typedef struct _WSAQuerySet2W {
871
872#ifdef UNICODE
879#else
886#endif /* UNICODE */
887
888typedef enum _WSAESETSERVICEOP {
893
894typedef struct _WSANSClassInfoA {
901
902typedef struct _WSANSClassInfoW {
909
910#ifdef UNICODE
914#else
918#endif
919
920typedef struct _WSAServiceClassInfoA {
926
927typedef struct _WSAServiceClassInfoW {
933
934#ifdef UNICODE
938#else
942#endif
943
944typedef struct _WSANAMESPACE_INFOA {
951
952typedef struct _WSANAMESPACE_INFOW {
959
960typedef struct _WSANAMESPACE_INFOEXA {
968
969typedef 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
1009typedef 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
1020typedef 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
1026typedef int
1027(WSAAPI *LPFN_BIND)(
1028 _In_ SOCKET s,
1029 _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1030 _In_ int namelen);
1031
1032typedef int
1033(WSAAPI *LPFN_CLOSESOCKET)(
1034 _In_ SOCKET s);
1035
1036typedef int
1037(WSAAPI *LPFN_CONNECT)(
1038 _In_ SOCKET s,
1039 _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1040 _In_ int namelen);
1041
1042typedef int
1043(WSAAPI *LPFN_IOCTLSOCKET)(
1044 _In_ SOCKET s,
1045 _In_ long cmd,
1046 _Inout_ u_long FAR *argp);
1047
1048typedef int
1049(WSAAPI *LPFN_GETPEERNAME)(
1050 _In_ SOCKET s,
1052 _Inout_ int FAR *namelen);
1053
1054typedef int
1055(WSAAPI *LPFN_GETSOCKNAME)(
1056 _In_ SOCKET s,
1058 _Inout_ int FAR *namelen);
1059
1060typedef 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
1068typedef u_long
1069(WSAAPI *LPFN_HTONL)(
1070 _In_ u_long hostlong);
1071
1072typedef u_short
1073(WSAAPI *LPFN_HTONS)(
1074 _In_ u_short hostshort);
1075
1076typedef unsigned long
1077(WSAAPI *LPFN_INET_ADDR)(
1078 _In_ const char FAR *cp);
1079
1080typedef char FAR *
1081(WSAAPI *LPFN_INET_NTOA)(
1082 _In_ struct in_addr in);
1083
1084typedef int
1085(WSAAPI *LPFN_LISTEN)(
1086 _In_ SOCKET s,
1087 _In_ int backlog);
1088
1089typedef u_long
1090(WSAAPI *LPFN_NTOHL)(
1091 _In_ u_long netlong);
1092
1093typedef u_short
1094(WSAAPI *LPFN_NTOHS)(
1095 _In_ u_short netshort);
1096
1097typedef 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
1104typedef 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
1113typedef 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
1121typedef 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
1128typedef 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
1137typedef 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
1145typedef int
1146(WSAAPI *LPFN_SHUTDOWN)(
1147 _In_ SOCKET s,
1148 _In_ int how);
1149
1151typedef SOCKET
1152(WSAAPI *LPFN_SOCKET)(
1153 _In_ int af,
1154 _In_ int type,
1155 _In_ int protocol);
1156
1157typedef 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
1163typedef struct hostent FAR *
1164(WSAAPI *LPFN_GETHOSTBYNAME)(
1165 _In_ const char FAR *name);
1166
1167typedef int
1168(WSAAPI *LPFN_GETHOSTNAME)(
1170 _In_ int namelen);
1171
1172typedef struct servent FAR *
1173(WSAAPI *LPFN_GETSERVBYPORT)(
1174 _In_ int port,
1175 _In_opt_z_ const char FAR *proto);
1176
1177typedef struct servent FAR *
1178(WSAAPI *LPFN_GETSERVBYNAME)(
1179 _In_z_ const char FAR *name,
1180 _In_opt_z_ const char FAR *proto);
1181
1182typedef struct protoent FAR *
1183(WSAAPI *LPFN_GETPROTOBYNUMBER)(
1184 _In_ int number);
1185
1186typedef struct protoent FAR *
1187(WSAAPI *LPFN_GETPROTOBYNAME)(
1188 _In_z_ const char FAR *name);
1189
1191typedef int
1192(WSAAPI *LPFN_WSASTARTUP)(
1193 _In_ WORD wVersionRequired,
1194 _Out_ LPWSADATA lpWSAData);
1195
1196typedef int
1197(WSAAPI *LPFN_WSACLEANUP)(void);
1198
1199typedef void
1200(WSAAPI *LPFN_WSASETLASTERROR)(
1201 _In_ int iError);
1202
1203typedef int
1204(WSAAPI *LPFN_WSAGETLASTERROR)(void);
1205
1206typedef BOOL
1207(WSAAPI *LPFN_WSAISBLOCKING)(void);
1208
1209typedef int
1210(WSAAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
1211
1212typedef FARPROC
1213(WSAAPI *LPFN_WSASETBLOCKINGHOOK)(
1214 _In_ FARPROC lpBlockFunc);
1215
1216typedef int
1217(WSAAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
1218
1219typedef 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
1228typedef 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
1237typedef 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
1245typedef 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
1253typedef 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
1261typedef 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
1271typedef int
1272(WSAAPI *LPFN_WSACANCELASYNCREQUEST)(
1273 _In_ HANDLE hAsyncTaskHandle);
1274
1275typedef int
1276(WSAAPI *LPFN_WSAASYNCSELECT)(
1277 _In_ SOCKET s,
1278 _In_ HWND hWnd,
1279 _In_ u_int wMsg,
1280 _In_ long lEvent);
1281
1283typedef 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
1291typedef BOOL
1292(WSAAPI *LPFN_WSACLOSEEVENT)(
1294
1295typedef 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
1305typedef WSAEVENT
1306(WSAAPI *LPFN_WSACREATEEVENT)(void);
1307
1308typedef int
1309(WSAAPI *LPFN_WSADUPLICATESOCKETA)(
1310 _In_ SOCKET s,
1311 _In_ DWORD dwProcessId,
1312 _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo);
1313
1314typedef 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
1326typedef int
1327(WSAAPI *LPFN_WSAENUMNETWORKEVENTS)(
1328 _In_ SOCKET s,
1329 _In_ WSAEVENT hEventObject,
1330 _Out_ LPWSANETWORKEVENTS lpNetworkEvents);
1331
1332typedef int
1333(WSAAPI *LPFN_WSAENUMPROTOCOLSA)(
1334 _In_opt_ LPINT lpiProtocols,
1337
1338typedef 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
1350typedef int
1351(WSAAPI *LPFN_WSAEVENTSELECT)(
1352 _In_ SOCKET s,
1353 _In_opt_ WSAEVENT hEventObject,
1354 _In_ long lNetworkEvents);
1355
1356typedef BOOL
1357(WSAAPI *LPFN_WSAGETOVERLAPPEDRESULT)(
1358 _In_ SOCKET s,
1360 _Out_ LPDWORD lpcbTransfer,
1361 _In_ BOOL fWait,
1362 _Out_ LPDWORD lpdwFlags);
1363
1364typedef BOOL
1365(WSAAPI *LPFN_WSAGETQOSBYNAME)(
1366 IN SOCKET s,
1367 IN LPWSABUF lpQOSName,
1368 OUT LPQOS lpQOS);
1369
1370typedef int
1371(WSAAPI *LPFN_WSAHTONL)(
1372 _In_ SOCKET s,
1373 _In_ u_long hostlong,
1374 _Out_ u_long FAR *lpnetlong);
1375
1376typedef int
1377(WSAAPI *LPFN_WSAHTONS)(
1378 _In_ SOCKET s,
1379 _In_ u_short hostshort,
1380 _Out_ u_short FAR *lpnetshort);
1381
1382typedef 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
1394typedef 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,
1404
1405typedef int
1406(WSAAPI *LPFN_WSANTOHL)(
1407 _In_ SOCKET s,
1408 _In_ u_long netlong,
1409 _Out_ u_long FAR *lphostlong);
1410
1411typedef int
1412(WSAAPI *LPFN_WSANTOHS)(
1413 _In_ SOCKET s,
1414 _In_ u_short netshort,
1415 _Out_ u_short FAR *lphostshort);
1416
1417typedef 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
1427typedef int
1428(WSAAPI *LPFN_WSARECVDISCONNECT)(
1429 _In_ SOCKET s,
1430 __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData);
1431
1432typedef 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
1444typedef BOOL
1445(WSAAPI *LPFN_WSARESETEVENT)(
1447
1448typedef int
1449(WSAAPI *LPFN_WSASEND)(
1450 _In_ SOCKET s,
1451 _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
1452 _In_ DWORD dwBufferCount,
1453 _Out_opt_ LPDWORD lpNumberOfBytesSent,
1456 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1457
1458typedef int
1459(WSAAPI *LPFN_WSASENDDISCONNECT)(
1460 _In_ SOCKET s,
1461 _In_opt_ LPWSABUF lpOutboundDisconnectData);
1462
1463typedef int
1464(WSAAPI *LPFN_WSASENDTO)(
1465 _In_ SOCKET s,
1466 _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
1467 _In_ DWORD dwBufferCount,
1468 _Out_opt_ LPDWORD lpNumberOfBytesSent,
1470 _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo,
1471 _In_ int iTolen,
1473 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1474
1475typedef BOOL
1476(WSAAPI *LPFN_WSASETEVENT)(
1478
1480typedef 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,
1488
1490typedef 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,
1498
1499#ifdef UNICODE
1500#define LPFN_WSASOCKET LPFN_WSASOCKETW
1501#else
1502#define LPFN_WSASOCKET LPFN_WSASOCKETA
1503#endif
1504
1505typedef 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
1513typedef 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
1521typedef 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
1535typedef 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
1543typedef 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
1557typedef INT
1558(WSAAPI *LPFN_WSALOOKUPSERVICEBEGINA)(
1559 _In_ LPWSAQUERYSETA lpqsRestrictions,
1560 _In_ DWORD dwControlFlags,
1561 _Out_ LPHANDLE lphLookup);
1562
1563typedef 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
1575typedef INT
1576(WSAAPI *LPFN_WSALOOKUPSERVICENEXTA)(
1577 _In_ HANDLE hLookup,
1578 _In_ DWORD dwControlFlags,
1581
1582typedef 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
1595typedef INT
1596(WSAAPI *LPFN_WSALOOKUPSERVICEEND)(
1597 _In_ HANDLE hLookup);
1598
1599typedef INT
1600(WSAAPI *LPFN_WSAINSTALLSERVICECLASSA)(
1601 _In_ LPWSASERVICECLASSINFOA lpServiceClassInfo);
1602
1603typedef 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
1613typedef INT
1614(WSAAPI *LPFN_WSAREMOVESERVICECLASS)(
1615 _In_ LPGUID lpServiceClassId);
1616
1617typedef 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
1624typedef 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
1637typedef INT
1638(WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)(
1641
1642typedef 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
1653typedef INT
1654(WSAAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(
1655 _In_ LPGUID lpServiceClassId,
1658
1659typedef 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
1671typedef INT
1672(WSAAPI *LPFN_WSASETSERVICEA)(
1673 _In_ LPWSAQUERYSETA lpqsRegInfo,
1674 _In_ WSAESETSERVICEOP essoperation,
1675 _In_ DWORD dwControlFlags);
1676
1677typedef 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
1689typedef INT
1690(WSAAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(
1691 _Inout_ LPHANDLE lpNotificationHandle,
1693 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
1694
1695#if(_WIN32_WINNT >= 0x0501)
1696typedef 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
1710typedef INT
1711(WSAAPI *LPFN_WSAENUMNAMESPACEPROVIDERSEXA)(
1714
1715typedef 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
1734SOCKET
1735WSAAPI
1737 _In_ SOCKET s,
1738 _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr,
1739 _Inout_opt_ int FAR *addrlen);
1740
1742int
1743WSAAPI
1745 _In_ SOCKET s,
1746 _In_reads_bytes_(namelen) const struct sockaddr FAR *addr,
1747 _In_ int namelen);
1748
1750int
1751WSAAPI
1753 _In_ SOCKET s);
1754
1756int
1757WSAAPI
1759 _In_ SOCKET s,
1760 _In_reads_bytes_(namelen) const struct sockaddr FAR *name,
1761 _In_ int namelen);
1762
1764int
1765WSAAPI
1767 _In_ SOCKET s,
1768 _In_ long cmd,
1769 _Inout_ u_long FAR *argp);
1770
1772int
1773WSAAPI
1775 _In_ SOCKET s,
1777 _Inout_ int FAR *namelen);
1778
1780int
1781WSAAPI
1783 _In_ SOCKET s,
1785 _Inout_ int FAR *namelen);
1786
1788int
1789WSAAPI
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
1798u_long
1799WSAAPI
1801 IN u_long hostlong);
1802
1804u_short
1805WSAAPI
1807 _In_ u_short hostshort);
1808
1810unsigned long
1811WSAAPI
1813 _In_z_ const char FAR *cp);
1814
1816char FAR *
1817WSAAPI
1819 _In_ struct in_addr in);
1820
1822int
1823WSAAPI
1825 _In_ SOCKET s,
1826 _In_ int backlog);
1827
1829u_long
1830WSAAPI
1832 _In_ u_long netlong);
1833
1835u_short
1836WSAAPI
1838 _In_ u_short netshort);
1839
1841int
1842WSAAPI
1844 _In_ SOCKET s,
1846 _In_ int len,
1847 _In_ int flags);
1848
1850int
1851WSAAPI
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
1861int
1862WSAAPI
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
1871int
1872WSAAPI
1874 _In_ SOCKET s,
1875 _In_reads_bytes_(len) const char FAR *buf,
1876 _In_ int len,
1877 _In_ int flags);
1878
1880int
1881WSAAPI
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
1891int
1892WSAAPI
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
1901int
1902WSAAPI
1904 _In_ SOCKET s,
1905 _In_ int how);
1906
1909SOCKET
1910WSAAPI
1912 _In_ int af,
1913 _In_ int type,
1914 _In_ int protocol);
1915
1917struct hostent FAR *
1918WSAAPI
1920 _In_reads_bytes_(len) const char FAR *addr,
1921 _In_ int len,
1922 _In_ int type);
1923
1925struct hostent FAR *
1926WSAAPI
1928 _In_z_ const char FAR *name);
1929
1931int
1932WSAAPI
1935 _In_ int namelen);
1936
1938struct servent FAR *
1939WSAAPI
1941 _In_ int port,
1942 _In_opt_z_ const char FAR *proto);
1943
1945struct servent FAR *
1946WSAAPI
1948 _In_z_ const char FAR *name,
1949 _In_opt_z_ const char FAR *proto);
1950
1952struct protoent FAR *
1953WSAAPI
1955 _In_ int number);
1956
1958struct protoent FAR *
1959WSAAPI
1961 _In_z_ const char FAR *name);
1962
1965int
1966WSAAPI
1968 _In_ WORD wVersionRequired,
1969 _Out_ LPWSADATA lpWSAData);
1970
1972int
1973WSAAPI
1974WSACleanup(void);
1975
1977void
1978WSAAPI
1980 _In_ int iError);
1981
1983int
1984WSAAPI
1985WSAGetLastError(void);
1986
1988BOOL
1989WSAAPI
1990WSAIsBlocking(void);
1991
1993int
1994WSAAPI
1996
1998FARPROC
1999WSAAPI
2001 _In_ FARPROC lpBlockFunc);
2002
2004int
2005WSAAPI
2007
2009HANDLE
2010WSAAPI
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
2020HANDLE
2021WSAAPI
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
2031HANDLE
2032WSAAPI
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
2041HANDLE
2042WSAAPI
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
2051HANDLE
2052WSAAPI
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
2061HANDLE
2062WSAAPI
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
2073int
2074WSAAPI
2076 _In_ HANDLE hAsyncTaskHandle);
2077
2079int
2080WSAAPI
2082 _In_ SOCKET s,
2083 _In_ HWND hWnd,
2084 _In_ u_int wMsg,
2085 _In_ long lEvent);
2086
2089SOCKET
2090WSAAPI
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
2099BOOL
2100WSAAPI
2103
2105int
2106WSAAPI
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
2122BOOL
2123PASCAL
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
2135BOOL
2136PASCAL
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
2148BOOL
2149PASCAL
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
2162WSAAPI
2163WSACreateEvent(void);
2164
2166int
2167WSAAPI
2169 _In_ SOCKET s,
2170 _In_ DWORD dwProcessId,
2171 _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo);
2172
2174int
2175WSAAPI
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
2188int
2189WSAAPI
2191 _In_ SOCKET s,
2192 _In_ WSAEVENT hEventObject,
2193 _Out_ LPWSANETWORKEVENTS lpNetworkEvents);
2194
2196int
2197WSAAPI
2199 _In_opt_ LPINT lpiProtocols,
2202
2204int
2205WSAAPI
2207 _In_opt_ LPINT lpiProtocols,
2210
2211#ifdef UNICODE
2212#define WSAEnumProtocols WSAEnumProtocolsW
2213#else
2214#define WSAEnumProtocols WSAEnumProtocolsA
2215#endif
2216
2218int
2219WSAAPI
2221 _In_ SOCKET s,
2222 _In_opt_ WSAEVENT hEventObject,
2223 _In_ long lNetworkEvents);
2224
2226BOOL
2227WSAAPI
2229 _In_ SOCKET s,
2231 _Out_ LPDWORD lpcbTransfer,
2232 _In_ BOOL fWait,
2233 _Out_ LPDWORD lpdwFlags);
2234
2236BOOL
2237WSAAPI
2239 _In_ SOCKET s,
2240 _In_ LPWSABUF lpQOSName,
2241 _Out_ LPQOS lpQOS);
2242
2244int
2245WSAAPI
2247 _In_ SOCKET s,
2248 _In_ u_long hostlong,
2249 _Out_ u_long FAR *lpnetlong);
2250
2252int
2253WSAAPI
2255 _In_ SOCKET s,
2256 _In_ u_short hostshort,
2257 _Out_ u_short FAR *lpnetshort);
2258
2260int
2261WSAAPI
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
2274SOCKET
2275WSAAPI
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,
2285
2287int
2288WSAAPI
2290 _In_ SOCKET s,
2291 _In_ u_long netlong,
2292 _Out_ u_long FAR *lphostlong);
2293
2295int
2296WSAAPI
2298 _In_ SOCKET s,
2299 _In_ u_short netshort,
2300 _Out_ u_short FAR *lphostshort);
2301
2303int
2304WSAAPI
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
2315int
2316WSAAPI
2318 _In_ SOCKET s,
2319 _In_opt_ __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData);
2320
2322int
2323WSAAPI
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
2336BOOL
2337WSAAPI
2340
2342int
2343WSAAPI
2345 _In_ SOCKET s,
2346 _In_opt_ LPWSABUF lpOutboundDisconnectData);
2347
2349int
2350WSAAPI
2352 _In_ SOCKET s,
2353 _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
2354 _In_ DWORD dwBufferCount,
2355 _Out_opt_ LPDWORD lpNumberOfBytesSent,
2358 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2359
2361int
2362WSAAPI
2364 _In_ SOCKET s,
2365 _In_reads_(dwBufferCount) LPWSABUF lpBuffers,
2366 _In_ DWORD dwBufferCount,
2367 _Out_opt_ LPDWORD lpNumberOfBytesSent,
2369 _In_reads_bytes_opt_(iTolen) const struct sockaddr FAR *lpTo,
2370 _In_ int iTolen,
2372 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2373
2375BOOL
2376WSAAPI
2379
2382SOCKET
2383WSAAPI
2385 _In_ int af,
2386 _In_ int type,
2387 _In_ int protocol,
2388 _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
2389 _In_ GROUP g,
2391
2394SOCKET
2395WSAAPI
2397 _In_ int af,
2398 _In_ int type,
2399 _In_ int protocol,
2400 _In_opt_ LPWSAPROTOCOL_INFOW lpProtocolInfo,
2401 _In_ GROUP g,
2403
2404#ifdef UNICODE
2405#define WSASocket WSASocketW
2406#else
2407#define WSASocket WSASocketA
2408#endif
2409
2411DWORD
2412WSAAPI
2414 _In_ DWORD cEvents,
2415 _In_reads_(cEvents) const WSAEVENT FAR *lphEvents,
2416 _In_ BOOL fWaitAll,
2418 _In_ BOOL fAlertable);
2419
2421INT
2422WSAAPI
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
2431INT
2432WSAAPI
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
2447INT
2448WSAAPI
2450 _In_ LPSTR AddressString,
2452 _In_opt_ LPWSAPROTOCOL_INFOA lpProtocolInfo,
2453 _Out_writes_bytes_to_(*lpAddressLength,*lpAddressLength) LPSOCKADDR lpAddress,
2454 _Inout_ LPINT lpAddressLength);
2455
2457INT
2458WSAAPI
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
2473INT
2474WSAAPI
2476 _In_ LPWSAQUERYSETA lpqsRestrictions,
2477 _In_ DWORD dwControlFlags,
2478 _Out_ LPHANDLE lphLookup);
2479
2481INT
2482WSAAPI
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
2495INT
2496WSAAPI
2498 _In_ HANDLE hLookup,
2499 _In_ DWORD dwControlFlags,
2502
2504INT
2505WSAAPI
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
2519INT
2520WSAAPI
2522 _In_ HANDLE hLookup);
2523
2525INT
2526WSAAPI
2528 _In_ LPWSASERVICECLASSINFOA lpServiceClassInfo);
2529
2531INT
2532WSAAPI
2534 _In_ LPWSASERVICECLASSINFOW lpServiceClassInfo);
2535
2536#ifdef UNICODE
2537#define WSAInstallServiceClass WSAInstallServiceClassW
2538#else
2539#define WSAInstallServiceClass WSAInstallServiceClassA
2540#endif
2541
2543INT
2544WSAAPI
2546 _In_ LPGUID lpServiceClassId);
2547
2549INT
2550WSAAPI
2552 _In_ LPGUID lpProviderId,
2553 _In_ LPGUID lpServiceClassId,
2554 _Inout_ LPDWORD lpdwBufSize,
2555 _Out_writes_bytes_to_(*lpdwBufSize,*lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo);
2556
2558INT
2559WSAAPI
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
2573INT
2574WSAAPI
2578
2580INT
2581WSAAPI
2585
2586#ifdef UNICODE
2587#define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
2588#else
2589#define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersA
2590#endif
2591
2592_Success_(return == 0)
2594INT
2595WSAAPI
2597 _In_ LPGUID lpServiceClassId,
2600
2601_Success_(return == 0)
2603INT
2604WSAAPI
2606 _In_ LPGUID lpServiceClassId,
2609
2610#ifdef UNICODE
2611#define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdW
2612#else
2613#define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdA
2614#endif
2615
2617INT
2618WSAAPI
2620 _In_ LPWSAQUERYSETA lpqsRegInfo,
2621 _In_ WSAESETSERVICEOP essoperation,
2622 _In_ DWORD dwControlFlags);
2623
2625INT
2626WSAAPI
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
2639INT
2640WSAAPI
2642 _Inout_ LPHANDLE lpNotificationHandle,
2644 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2645
2646#if(_WIN32_WINNT >= 0x0501)
2648INT
2649WSAAPI
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
2664int
2665WSAAPI
2666WSASendMsg(
2668 _In_ LPWSAMSG lpMsg,
2670 _Out_opt_ LPDWORD lpNumberOfBytesSent,
2672 _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2673
2675INT
2676WSAAPI
2677WSAEnumNameSpaceProvidersExA(
2680
2682INT
2683WSAAPI
2684WSAEnumNameSpaceProvidersExW(
2687
2688#ifdef UNICODE
2689#define WSAEnumNameSpaceProvidersEx WSAEnumNameSpaceProvidersExW
2690#else
2691#define WSAEnumNameSpaceProvidersEx WSAEnumNameSpaceProvidersExA
2692#endif
2693
2695int
2696WSAAPI
2697WSAPoll(
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
2707typedef struct linger LINGER;
2708typedef struct linger *PLINGER;
2709typedef struct linger FAR *LPLINGER;
2710typedef struct fd_set FD_SET;
2711typedef struct fd_set *PFD_SET;
2712typedef struct fd_set FAR *LPFD_SET;
2713typedef struct hostent HOSTENT;
2714typedef struct hostent *PHOSTENT;
2715typedef struct hostent FAR *LPHOSTENT;
2716typedef struct servent SERVENT;
2717typedef struct servent *PSERVENT;
2718typedef struct servent FAR *LPSERVENT;
2719typedef struct protoent PROTOENT;
2720typedef struct protoent *PPROTOENT;
2721typedef struct protoent FAR *LPPROTOENT;
2722typedef struct timeval TIMEVAL;
2723typedef struct timeval *PTIMEVAL;
2724typedef 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_) */
Type
Definition: Type.h:7
HWND hWnd
Definition: settings.c:17
#define __int64
Definition: basetyps.h:16
return
Definition: dirsup.c:529
UINT32 u_int
Definition: types.h:82
unsigned short u_short
Definition: types.h:81
int(* FARPROC)()
Definition: compat.h:36
#define CALLBACK
Definition: compat.h:35
#define FAR
Definition: zlib.h:34
USHORT port
Definition: uri.c:228
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned long u_long
Definition: linux.h:269
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
ULONG Handle
Definition: gdb_input.c:15
GLint level
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
GLint namelen
Definition: glext.h:7232
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint in
Definition: glext.h:9616
GLbitfield flags
Definition: glext.h:7161
GLenum const GLvoid * addr
Definition: glext.h:9621
GLboolean GLboolean g
Definition: glext.h:6204
GLenum GLsizei len
Definition: glext.h:6722
CPPORT Port[4]
Definition: headless.c:35
#define inet_addr(cp)
Definition: inet.h:98
#define inet_ntoa(addr)
Definition: inet.h:100
unsigned int ULONG
Definition: retypes.h:1
POINT cp
Definition: magnifier.c:59
#define htons(x)
Definition: module.h:213
#define ntohl(x)
Definition: module.h:203
#define ntohs(x)
Definition: module.h:208
#define htonl(x)
Definition: module.h:212
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static unsigned int number
Definition: dsound.c:1479
static HANDLE hEvent
Definition: comm.c:54
#define _Out_opt_
Definition: ms_sal.h:346
#define _Success_(expr)
Definition: ms_sal.h:259
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_
Definition: ms_sal.h:378
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
#define _Out_writes_bytes_to_(size, count)
Definition: ms_sal.h:360
#define _Field_size_(size)
Definition: ms_sal.h:593
#define _In_z_
Definition: ms_sal.h:313
#define _In_opt_z_
Definition: ms_sal.h:314
#define _Struct_size_bytes_(size)
Definition: ms_sal.h:591
#define _Inout_opt_
Definition: ms_sal.h:379
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _Field_range_(min, max)
Definition: ms_sal.h:609
#define _Out_writes_bytes_to_opt_(size, count)
Definition: ms_sal.h:361
#define _In_
Definition: ms_sal.h:308
#define _In_reads_bytes_opt_(size)
Definition: ms_sal.h:322
#define _In_opt_
Definition: ms_sal.h:309
#define _Reserved_
Definition: ms_sal.h:295
#define _Out_writes_to_(size, count)
Definition: ms_sal.h:355
#define _Out_writes_bytes_opt_(size)
Definition: ms_sal.h:351
#define _In_reads_(size)
Definition: ms_sal.h:319
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
Definition: mswsock.h:93
#define ioctlsocket
Definition: ncftp.h:481
#define closesocket
Definition: ncftp.h:477
unsigned int UINT
Definition: ndis.h:50
IN PCO_ADDRESS_FAMILY AddressFamily
Definition: ndis.h:1906
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
short SHORT
Definition: pedump.c:59
long LONG
Definition: pedump.c:60
#define INT
Definition: polytest.cpp:20
#define long
Definition: qsort.c:33
INT WSAAPI WSAGetServiceClassNameByClassIdW(IN LPGUID lpServiceClassId, OUT LPWSTR lpszServiceClassName, IN OUT LPDWORD lpdwBufferLength)
Definition: rnr.c:672
INT WSAAPI WSAGetServiceClassNameByClassIdA(IN LPGUID lpServiceClassId, OUT LPSTR lpszServiceClassName, IN OUT LPDWORD lpdwBufferLength)
Definition: rnr.c:658
INT WSPAPI WSANSPIoctl(HANDLE hLookup, DWORD dwControlCode, LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, LPWSACOMPLETION lpCompletion)
Definition: rnr.c:570
#define NETWORK
Definition: config.h:328
#define __out_data_source(src_sym)
Definition: specstrings.h:349
CardRegion * from
Definition: spigame.cpp:19
char szDescription[WSADESCRIPTION_LEN+1]
Definition: winsock.h:526
unsigned short iMaxUdpDg
Definition: winsock.h:529
char * lpVendorInfo
Definition: winsock.h:530
char FAR * lpVendorInfo
Definition: winsock2.h:573
char szSystemStatus[WSASYS_STATUS_LEN+1]
Definition: winsock.h:527
WORD wVersion
Definition: winsock.h:517
WORD wHighVersion
Definition: winsock.h:518
unsigned short iMaxSockets
Definition: winsock.h:528
INT iAddressFamily
Definition: winsock2.h:787
INT iProtocol
Definition: winsock2.h:788
Definition: nspapi.h:57
ULONG cbSize
Definition: nspapi.h:58
BYTE * pBlobData
Definition: nspapi.h:59
_Field_size_bytes_(cbSize) BYTE *pBlobData
WSABUF ProviderSpecific
Definition: winsock2.h:637
FLOWSPEC SendingFlowspec
Definition: winsock2.h:635
FLOWSPEC ReceivingFlowspec
Definition: winsock2.h:636
LPWSTR lpszIdentifier
Definition: winsock2.h:957
int iErrorCode[FD_MAX_EVENTS]
Definition: winsock2.h:644
LPVOID lpValue
Definition: winsock2.h:899
DWORD dwValueSize
Definition: winsock2.h:898
DWORD dwNameSpace
Definition: winsock2.h:896
DWORD dwValueType
Definition: winsock2.h:897
LPWSTR lpszName
Definition: winsock2.h:903
LPVOID lpValue
Definition: winsock2.h:907
DWORD dwValueSize
Definition: winsock2.h:906
DWORD dwValueType
Definition: winsock2.h:905
DWORD dwNameSpace
Definition: winsock2.h:904
DWORD Offset
Definition: winsock2.h:611
DWORD InternalHigh
Definition: winsock2.h:610
WSAEVENT hEvent
Definition: winsock2.h:613
DWORD Internal
Definition: winsock2.h:609
DWORD OffsetHigh
Definition: winsock2.h:612
DWORD ChainEntries[MAX_PROTOCOL_CHAIN]
Definition: winsock2.h:653
DWORD dwServiceFlags2
Definition: winsock2.h:658
DWORD dwServiceFlags1
Definition: winsock2.h:657
DWORD dwServiceFlags4
Definition: winsock2.h:660
DWORD dwProviderFlags
Definition: winsock2.h:661
DWORD dwServiceFlags3
Definition: winsock2.h:659
DWORD dwCatalogEntryId
Definition: winsock2.h:663
DWORD dwProviderReserved
Definition: winsock2.h:675
CHAR szProtocol[WSAPROTOCOL_LEN+1]
Definition: winsock2.h:676
WSAPROTOCOLCHAIN ProtocolChain
Definition: winsock2.h:664
DWORD dwServiceFlags3
Definition: winsock2.h:682
WCHAR szProtocol[WSAPROTOCOL_LEN+1]
Definition: winsock2.h:699
DWORD dwServiceFlags2
Definition: winsock2.h:681
DWORD dwCatalogEntryId
Definition: winsock2.h:686
DWORD dwServiceFlags4
Definition: winsock2.h:683
DWORD dwServiceFlags1
Definition: winsock2.h:680
DWORD dwProviderReserved
Definition: winsock2.h:698
DWORD dwProviderFlags
Definition: winsock2.h:684
WSAPROTOCOLCHAIN ProtocolChain
Definition: winsock2.h:687
LPBLOB lpBlob
Definition: winsock2.h:852
DWORD dwNumberOfProtocols
Definition: winsock2.h:846
LPGUID lpNSProviderId
Definition: winsock2.h:844
LPSTR lpszServiceInstanceName
Definition: winsock2.h:840
LPSTR lpszContext
Definition: winsock2.h:845
LPSTR lpszComment
Definition: winsock2.h:842
LPWSAVERSION lpVersion
Definition: winsock2.h:841
DWORD dwOutputFlags
Definition: winsock2.h:851
LPSTR lpszQueryString
Definition: winsock2.h:848
LPAFPROTOCOLS lpafpProtocols
Definition: winsock2.h:847
LPCSADDR_INFO lpcsaBuffer
Definition: winsock2.h:850
DWORD dwNameSpace
Definition: winsock2.h:843
DWORD dwSize
Definition: winsock2.h:839
DWORD dwNumberOfCsAddrs
Definition: winsock2.h:849
LPWSTR lpszContext
Definition: winsock2.h:862
LPWSAVERSION lpVersion
Definition: winsock2.h:858
LPBLOB lpBlob
Definition: winsock2.h:869
LPWSTR lpszQueryString
Definition: winsock2.h:865
LPWSTR lpszServiceInstanceName
Definition: winsock2.h:857
DWORD dwNameSpace
Definition: winsock2.h:860
DWORD dwNumberOfProtocols
Definition: winsock2.h:863
_Field_size_(dwNumberOfCsAddrs) LPCSADDR_INFO lpcsaBuffer
DWORD dwOutputFlags
Definition: winsock2.h:868
DWORD dwNumberOfCsAddrs
Definition: winsock2.h:866
_Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols
LPWSTR lpszComment
Definition: winsock2.h:859
LPGUID lpNSProviderId
Definition: winsock2.h:861
DWORD dwSize
Definition: winsock2.h:856
DWORD dwNumberOfCsAddrs
Definition: winsock2.h:813
LPWSAVERSION lpVersion
Definition: winsock2.h:805
_Field_size_(dwNumberOfCsAddrs) LPCSADDR_INFO lpcsaBuffer
LPGUID lpServiceClassId
Definition: winsock2.h:804
DWORD dwOutputFlags
Definition: winsock2.h:815
LPSTR lpszQueryString
Definition: winsock2.h:812
LPBLOB lpBlob
Definition: winsock2.h:816
_Field_size_(dwNumberOfProtocols) LPAFPROTOCOLS lpafpProtocols
DWORD dwSize
Definition: winsock2.h:802
DWORD dwNumberOfProtocols
Definition: winsock2.h:810
LPSTR lpszComment
Definition: winsock2.h:806
LPGUID lpNSProviderId
Definition: winsock2.h:808
LPSTR lpszContext
Definition: winsock2.h:809
DWORD dwNameSpace
Definition: winsock2.h:807
LPSTR lpszServiceInstanceName
Definition: winsock2.h:803
LPSTR lpszServiceClassName
Definition: winsock2.h:922
LPWSANSCLASSINFOA lpClassInfos
Definition: winsock2.h:924
LPWSTR lpszServiceClassName
Definition: winsock2.h:929
LPWSANSCLASSINFOW lpClassInfos
Definition: winsock2.h:931
WSAECOMPARATOR ecHow
Definition: winsock2.h:798
DWORD dwVersion
Definition: winsock2.h:797
Definition: qos.h:45
Definition: ftp_var.h:139
Definition: http.c:7252
Definition: winsock.h:66
u_int fd_count
Definition: winsock.h:67
SOCKET fd_array[FD_SETSIZE]
Definition: winsock.h:68
char * h_name
Definition: winsock.h:134
short h_length
Definition: winsock.h:137
char ** h_aliases
Definition: winsock.h:135
short h_addrtype
Definition: winsock.h:136
char ** h_addr_list
Definition: winsock.h:138
Definition: tcpip.h:126
u_char s_b1
Definition: tcpip.h:129
u_long S_addr
Definition: tcpip.h:131
u_short s_w1
Definition: tcpip.h:130
u_char s_b4
Definition: tcpip.h:129
struct in_addr::@1002::@1004 S_un_w
u_char s_b2
Definition: tcpip.h:129
u_short s_w2
Definition: tcpip.h:130
struct in_addr::@1002::@1003 S_un_b
union in_addr::@1002 S_un
u_char s_b3
Definition: tcpip.h:129
u_short l_onoff
Definition: winsock.h:142
u_short l_linger
Definition: winsock.h:143
Definition: name.c:39
u_long n_net
Definition: winsock.h:155
char * n_name
Definition: winsock.h:152
short n_addrtype
Definition: winsock.h:154
char ** n_aliases
Definition: winsock.h:153
Definition: linux.h:1867
int fd
Definition: linux.h:1868
short revents
Definition: linux.h:1870
short events
Definition: linux.h:1869
char ** p_aliases
Definition: winsock.h:172
short p_proto
Definition: winsock.h:173
char * p_name
Definition: winsock.h:171
short s_port
Definition: winsock.h:165
char * s_proto
Definition: winsock.h:166
char FAR * s_name
Definition: winsock2.h:190
char FAR * s_proto
Definition: winsock2.h:197
char FAR ** s_aliases
Definition: winsock2.h:191
u_short sp_protocol
Definition: winsock.h:541
u_short sp_family
Definition: winsock.h:540
Definition: dhcpd.h:245
unsigned long tv_sec
Definition: linux.h:1738
unsigned long tv_usec
Definition: linux.h:1739
HANDLE lEvent
Definition: tftpd.cpp:56
uint32_t DWORD_PTR
Definition: typedefs.h:65
PVOID HANDLE
Definition: typedefs.h:73
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_In_ DWORD dwIoControlCode
Definition: winddi.h:1700
UINT_PTR WPARAM
Definition: windef.h:207
int * LPINT
Definition: windef.h:178
#define PASCAL
Definition: windef.h:133
WINSOCK_API_LINKAGE struct servent FAR *WSAAPI getservbyname(_In_z_ const char FAR *name, _In_opt_z_ const char FAR *proto)
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)
_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)
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextW(_In_ HANDLE hLookup, _In_ DWORD dwControlFlags, _Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) LPWSAQUERYSETW lpqsResults)
struct _WSAQuerySet2W * LPWSAQUERYSET2W
struct _WSANSClassInfoW * PWSANSCLASSINFOW
unsigned int GROUP
Definition: winsock2.h:640
_Out_writes_bytes_to_ lpdwBufferLength LPSTR lpszServiceClassName
Definition: winsock2.h:2598
WINSOCK_API_LINKAGE int WSAAPI WSAEnumProtocolsW(_In_opt_ LPINT lpiProtocols, _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) LPWSAPROTOCOL_INFOW lpProtocolBuffer, _Inout_ LPDWORD lpdwBufferLength)
struct _WSAQuerySetA * PWSAQUERYSETA
enum _WSAEcomparator WSAECOMPARATOR
struct _WSAQuerySetA * LPWSAQUERYSETA
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextA(_In_ HANDLE hLookup, _In_ DWORD dwControlFlags, _Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_(*lpdwBufferLength, *lpdwBufferLength) LPWSAQUERYSETA lpqsResults)
struct _QualityOfService * LPQOS
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)
_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)
WINSOCK_API_LINKAGE struct protoent FAR *WSAAPI getprotobynumber(_In_ int number)
WSANAMESPACE_INFOEXA WSANAMESPACE_INFOEX
Definition: winsock2.h:989
* LPWSAQUERYSETW
Definition: winsock2.h:836
struct linger FAR * LPLINGER
Definition: winsock2.h:2709
struct _AFPROTOCOLS * PAFPROTOCOLS
struct _WSAServiceClassInfoA * LPWSASERVICECLASSINFOA
struct _WSANAMESPACE_INFOEXW WSANAMESPACE_INFOEXW
struct _QualityOfService QOS
#define MAX_PROTOCOL_CHAIN
Definition: winsock2.h:423
WINSOCK_API_LINKAGE int WSAAPI bind(_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *addr, _In_ int namelen)
struct _WSANAMESPACE_INFOA WSANAMESPACE_INFOA
struct _WSAQuerySetA WSAQUERYSETA
WINSOCK_API_LINKAGE int WSAAPI WSADuplicateSocketW(_In_ SOCKET s, _In_ DWORD dwProcessId, _Out_ LPWSAPROTOCOL_INFOW lpProtocolInfo)
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)
PWSANAMESPACE_INFOA PWSANAMESPACE_INFO
Definition: winsock2.h:987
struct _WSANAMESPACE_INFOEXA WSANAMESPACE_INFOEXA
WINSOCK_API_LINKAGE int WSAAPI WSAEventSelect(_In_ SOCKET s, _In_opt_ WSAEVENT hEventObject, _In_ long lNetworkEvents)
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)
struct hostent * PHOSTENT
Definition: winsock2.h:2714
PWSAQUERYSETA PWSAQUERYSET
Definition: winsock2.h:881
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)
WINSOCK_API_LINKAGE int WSAAPI WSAEnumNetworkEvents(_In_ SOCKET s, _In_ WSAEVENT hEventObject, _Out_ LPWSANETWORKEVENTS lpNetworkEvents)
WINSOCK_API_LINKAGE struct protoent FAR *WSAAPI getprotobyname(_In_z_ const char FAR *name)
struct _WSANAMESPACE_INFOW WSANAMESPACE_INFOW
struct _WSANAMESPACE_INFOA * LPWSANAMESPACE_INFOA
WINSOCK_API_LINKAGE BOOL WSAAPI WSASetEvent(_In_ WSAEVENT hEvent)
struct fd_set * PFD_SET
Definition: winsock2.h:2711
#define FD_MAX_EVENTS
Definition: winsock2.h:313
WSAQUERYSET2A WSAQUERYSET2
Definition: winsock2.h:883
enum _WSAEcomparator * PWSAECOMPARATOR
WINSOCK_API_LINKAGE int WSAAPI WSANtohl(_In_ SOCKET s, _In_ u_long netlong, _Out_ u_long FAR *lphostlong)
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceBeginW(_In_ LPWSAQUERYSETW lpqsRestrictions, _In_ DWORD dwControlFlags, _Out_ LPHANDLE lphLookup)
WINSOCK_API_LINKAGE int WSAAPI WSAHtonl(_In_ SOCKET s, _In_ u_long hostlong, _Out_ u_long FAR *lpnetlong)
struct protoent FAR * LPPROTOENT
Definition: winsock2.h:2721
struct _WSANAMESPACE_INFOW * LPWSANAMESPACE_INFOW
struct _WSANSClassInfoA WSANSCLASSINFOA
struct _WSAServiceClassInfoA * PWSASERVICECLASSINFOA
enum _WSAESETSERVICEOP * LPWSAESETSERVICEOP
UINT_PTR SOCKET
Definition: winsock2.h:72
LPWSANAMESPACE_INFOA LPWSANAMESPACE_INFO
Definition: winsock2.h:988
enum _WSAESETSERVICEOP WSAESETSERVICEOP
struct _BLOB * PBLOB
_Must_inspect_result_ WINSOCK_API_LINKAGE int WSAAPI WSAStartup(_In_ WORD wVersionRequired, _Out_ LPWSADATA lpWSAData)
WINSOCK_API_LINKAGE INT WSAAPI WSASetServiceA(_In_ LPWSAQUERYSETA lpqsRegInfo, _In_ WSAESETSERVICEOP essoperation, _In_ DWORD dwControlFlags)
WSANSCLASSINFOA WSANSCLASSINFO
Definition: winsock2.h:915
struct _WSANETWORKEVENTS WSANETWORKEVENTS
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 INT WSAAPI WSALookupServiceBeginA(_In_ LPWSAQUERYSETA lpqsRestrictions, _In_ DWORD dwControlFlags, _Out_ LPHANDLE lphLookup)
WINSOCK_API_LINKAGE int WSAAPI WSACancelBlockingCall(void)
Definition: bhook.c:23
#define WINSOCK_API_LINKAGE
Definition: winsock2.h:38
WINSOCK_API_LINKAGE BOOL WSAAPI WSACloseEvent(_In_ WSAEVENT hEvent)
WINSOCK_API_LINKAGE int WSAAPI WSACancelAsyncRequest(_In_ HANDLE hAsyncTaskHandle)
DWORD FAR * LPWSAEVENT
Definition: winsock2.h:606
WINSOCK_API_LINKAGE BOOL WSAAPI WSAGetQOSByName(_In_ SOCKET s, _In_ LPWSABUF lpQOSName, _Out_ LPQOS lpQOS)
struct _WSANSClassInfoW * LPWSANSCLASSINFOW
struct _WSANSClassInfoA * LPWSANSCLASSINFOA
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)
struct _WSAQuerySet2A * LPWSAQUERYSET2A
struct _WSAServiceClassInfoW WSASERVICECLASSINFOW
#define WSAPROTOCOL_LEN
Definition: winsock2.h:428
struct _BLOB BLOB
_WSAEcomparator
Definition: winsock2.h:791
@ COMP_EQUAL
Definition: winsock2.h:792
@ COMP_NOTLESS
Definition: winsock2.h:793
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)
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)
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)
WSASERVICECLASSINFOA WSASERVICECLASSINFO
Definition: winsock2.h:939
_Out_writes_bytes_to_ lpdwBufferLength LPSTR _Inout_ LPDWORD lpdwBufferLength
Definition: winsock2.h:2599
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)
WINSOCK_API_LINKAGE int WSAAPI WSAHtons(_In_ SOCKET s, _In_ u_short hostshort, _Out_ u_short FAR *lpnetshort)
struct _BLOB * LPBLOB
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)
WINSOCK_API_LINKAGE BOOL WSAAPI WSAResetEvent(_In_ WSAEVENT hEvent)
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)
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)
WINSOCK_API_LINKAGE struct servent FAR *WSAAPI getservbyport(_In_ int port, _In_opt_z_ const char FAR *proto)
struct _WSAPROTOCOLCHAIN WSAPROTOCOLCHAIN
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)
struct _WSAServiceClassInfoW * LPWSASERVICECLASSINFOW
struct timeval * PTIMEVAL
Definition: winsock2.h:2723
WINSOCK_API_LINKAGE int WSAAPI WSADuplicateSocketA(_In_ SOCKET s, _In_ DWORD dwProcessId, _Out_ LPWSAPROTOCOL_INFOA lpProtocolInfo)
WSAQUERYSETW
Definition: winsock2.h:836
_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 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)
WSAQUERYSETA WSAQUERYSET
Definition: winsock2.h:880
WINSOCK_API_LINKAGE struct hostent FAR *WSAAPI gethostbyname(_In_z_ const char FAR *name)
WINSOCK_API_LINKAGE WSAEVENT WSAAPI WSACreateEvent(void)
Definition: event.c:42
WINSOCK_API_LINKAGE int WSAAPI WSAAsyncSelect(_In_ SOCKET s, _In_ HWND hWnd, _In_ u_int wMsg, _In_ long lEvent)
struct _WSANAMESPACE_INFOEXW * LPWSANAMESPACE_INFOEXW
WINSOCK_API_LINKAGE int WSAAPI gethostname(_Out_writes_bytes_(namelen) char FAR *name, _In_ int namelen)
WINSOCK_API_LINKAGE int WSAAPI WSAGetLastError(void)
Definition: dllmain.c:112
_Must_inspect_result_ WINSOCK_API_LINKAGE SOCKET WSAAPI socket(_In_ int af, _In_ int type, _In_ int protocol)
struct servent FAR * LPSERVENT
Definition: winsock2.h:2718
struct WSAData * LPWSADATA
struct _WSANAMESPACE_INFOA * PWSANAMESPACE_INFOA
#define FD_SETSIZE
Definition: winsock2.h:75
struct _WSAServiceClassInfoW * PWSASERVICECLASSINFOW
WINSOCK_API_LINKAGE int WSAAPI shutdown(_In_ SOCKET s, _In_ int how)
WINSOCK_API_LINKAGE BOOL WSAAPI WSAGetOverlappedResult(_In_ SOCKET s, _In_ LPWSAOVERLAPPED lpOverlapped, _Out_ LPDWORD lpcbTransfer, _In_ BOOL fWait, _Out_ LPDWORD lpdwFlags)
struct _WSAPROTOCOL_INFOW WSAPROTOCOL_INFOW
unsigned long u_long
Definition: winsock2.h:59
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)
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 WSARemoveServiceClass(_In_ LPGUID lpServiceClassId)
struct servent * PSERVENT
Definition: winsock2.h:2717
WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersA(_Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_(*lpdwBufferLength, *lpdwBufferLength) LPWSANAMESPACE_INFOA lpnspBuffer)
PWSAQUERYSET2A PWSAQUERYSET2
Definition: winsock2.h:884
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)
* PWSAQUERYSETW
Definition: winsock2.h:836
WINSOCK_API_LINKAGE INT WSAAPI WSAInstallServiceClassW(_In_ LPWSASERVICECLASSINFOW lpServiceClassInfo)
LPWSAQUERYSET2A LPWSAQUERYSET2
Definition: winsock2.h:885
struct _WSAPROTOCOLCHAIN * LPWSAPROTOCOLCHAIN
WINSOCK_API_LINKAGE int WSAAPI WSASendDisconnect(_In_ SOCKET s, _In_opt_ LPWSABUF lpOutboundDisconnectData)
struct _WSANETWORKEVENTS * LPWSANETWORKEVENTS
struct _AFPROTOCOLS AFPROTOCOLS
unsigned short u_short
Definition: winsock2.h:56
WINSOCK_API_LINKAGE int WSAAPI WSAUnhookBlockingHook(void)
Definition: bhook.c:130
struct protoent * PPROTOENT
Definition: winsock2.h:2720
DWORD WSAEVENT
Definition: winsock2.h:606
WSAPROTOCOL_INFOA WSAPROTOCOL_INFO
Definition: winsock2.h:706
struct _WSANAMESPACE_INFOW * PWSANAMESPACE_INFOW
struct _WSAQuerySet2A WSAQUERYSET2A
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)
WINSOCK_API_LINKAGE INT WSAAPI WSAEnumNameSpaceProvidersW(_Inout_ LPDWORD lpdwBufferLength, _Out_writes_bytes_to_(*lpdwBufferLength, *lpdwBufferLength) LPWSANAMESPACE_INFOW lpnspBuffer)
struct sockaddr_in FAR * LPSOCKADDR_IN
Definition: winsock2.h:2706
struct WSAData WSADATA
LPWSAPROTOCOL_INFOA LPWSAPROTOCOL_INFO
Definition: winsock2.h:707
WINSOCK_API_LINKAGE int WSAAPI WSAEnumProtocolsA(_In_opt_ LPINT lpiProtocols, _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) LPWSAPROTOCOL_INFOA lpProtocolBuffer, _Inout_ LPDWORD lpdwBufferLength)
void(CALLBACK * LPWSAOVERLAPPED_COMPLETION_ROUTINE)(IN DWORD dwError, IN DWORD cbTransferred, IN LPWSAOVERLAPPED lpOverlapped, IN DWORD dwFlags)
Definition: winsock2.h:722
enum _WSAESETSERVICEOP * PWSAESETSERVICEOP
struct _WSAPROTOCOL_INFOA WSAPROTOCOL_INFOA
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)
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)
PWSANAMESPACE_INFOEXA PWSANAMESPACE_INFOEX
Definition: winsock2.h:990
WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(_In_ HANDLE hLookup)
struct _WSAOVERLAPPED * LPWSAOVERLAPPED
struct _WSANSClassInfoA * PWSANSCLASSINFOA
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)
LPWSANSCLASSINFOA LPWSANSCLASSINFO
Definition: winsock2.h:917
unsigned int u_int
Definition: winsock2.h:57
WINSOCK_API_LINKAGE int WSAAPI send(_In_ SOCKET s, _In_reads_bytes_(len) const char FAR *buf, _In_ int len, _In_ int flags)
LPWSAQUERYSETA LPWSAQUERYSET
Definition: winsock2.h:882
WINSOCK_API_LINKAGE struct hostent FAR *WSAAPI gethostbyaddr(_In_reads_bytes_(len) const char FAR *addr, _In_ int len, _In_ int type)
struct _WSAVersion * PWSAVERSION
WINSOCK_API_LINKAGE INT WSAAPI WSAProviderConfigChange(_Inout_ LPHANDLE lpNotificationHandle, _Inout_opt_ LPWSAOVERLAPPED lpOverlapped, _In_opt_ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
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)
struct timeval FAR * LPTIMEVAL
Definition: winsock2.h:2724
WINSOCK_API_LINKAGE BOOL WSAAPI WSAIsBlocking(void)
Definition: bhook.c:65
#define WSASYS_STATUS_LEN
Definition: winsock2.h:240
struct hostent FAR * LPHOSTENT
Definition: winsock2.h:2715
struct _WSANAMESPACE_INFOEXA * PWSANAMESPACE_INFOEXA
LPWSASERVICECLASSINFOA LPWSASERVICECLASSINFO
Definition: winsock2.h:941
struct _WSAVersion * LPWSAVERSION
WINSOCK_API_LINKAGE int WSAAPI getpeername(_In_ SOCKET s, _Out_writes_bytes_to_(*namelen, *namelen) struct sockaddr FAR *name, _Inout_ int FAR *namelen)
WINSOCK_API_LINKAGE int WSAAPI getsockname(_In_ SOCKET s, _Out_writes_bytes_to_(*namelen, *namelen) struct sockaddr FAR *name, _Inout_ int FAR *namelen)
WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassInfoW(_In_ LPGUID lpProviderId, _In_ LPGUID lpServiceClassId, _Inout_ LPDWORD lpdwBufSize, _Out_writes_bytes_to_(*lpdwBufSize, *lpdwBufSize) LPWSASERVICECLASSINFOW lpServiceClassInfo)
WINSOCK_API_LINKAGE int WSAAPI WSANtohs(_In_ SOCKET s, _In_ u_short netshort, _Out_ u_short FAR *lphostshort)
#define WSADESCRIPTION_LEN
Definition: winsock2.h:239
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)
struct fd_set FAR * LPFD_SET
Definition: winsock2.h:2712
WINSOCK_API_LINKAGE int WSAAPI WSARecvDisconnect(_In_ SOCKET s, _In_opt_ __out_data_source(NETWORK) LPWSABUF lpInboundDisconnectData)
_WSAESETSERVICEOP
Definition: winsock2.h:888
@ RNRSERVICE_DEREGISTER
Definition: winsock2.h:890
@ RNRSERVICE_REGISTER
Definition: winsock2.h:889
@ RNRSERVICE_DELETE
Definition: winsock2.h:891
WINSOCK_API_LINKAGE void WSAAPI WSASetLastError(_In_ int iError)
_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)
struct linger * PLINGER
Definition: winsock2.h:2708
int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *)
WINSOCK_API_LINKAGE int WSAAPI listen(_In_ SOCKET s, _In_ int backlog)
struct _WSAPROTOCOL_INFOW * LPWSAPROTOCOL_INFOW
WINSOCK_API_LINKAGE int WSAAPI WSACleanup(void)
Definition: startup.c:60
struct _WSAQuerySet2A * PWSAQUERYSET2A
unsigned char u_char
Definition: winsock2.h:55
WINSOCK_API_LINKAGE INT WSAAPI WSAGetServiceClassInfoA(_In_ LPGUID lpProviderId, _In_ LPGUID lpServiceClassId, _Inout_ LPDWORD lpdwBufSize, _Out_writes_bytes_to_(*lpdwBufSize, *lpdwBufSize) LPWSASERVICECLASSINFOA lpServiceClassInfo)
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 FARPROC WSAAPI WSASetBlockingHook(_In_ FARPROC lpBlockFunc)
struct _WSAServiceClassInfoA WSASERVICECLASSINFOA
struct _WSAQuerySet2W WSAQUERYSET2W
struct _WSANAMESPACE_INFOEXW * PWSANAMESPACE_INFOEXW
PWSASERVICECLASSINFOA PWSASERVICECLASSINFO
Definition: winsock2.h:940
enum _WSAEcomparator * LPWSAECOMPARATOR
struct _WSANAMESPACE_INFOEXA * LPWSANAMESPACE_INFOEXA
WINSOCK_API_LINKAGE INT WSAAPI WSAInstallServiceClassA(_In_ LPWSASERVICECLASSINFOA lpServiceClassInfo)
struct _WSAPROTOCOL_INFOA * LPWSAPROTOCOL_INFOA
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)
struct _WSAOVERLAPPED WSAOVERLAPPED
struct _WSAVersion WSAVERSION
WSANAMESPACE_INFOA WSANAMESPACE_INFO
Definition: winsock2.h:986
WINSOCK_API_LINKAGE INT WSAAPI WSASetServiceW(_In_ LPWSAQUERYSETW lpqsRegInfo, _In_ WSAESETSERVICEOP essoperation, _In_ DWORD dwControlFlags)
PWSANSCLASSINFOA PWSANSCLASSINFO
Definition: winsock2.h:916
struct _WSAQuerySet2W * PWSAQUERYSET2W
struct in_addr * PIN_ADDR
#define WSAAPI
Definition: winsock2.h:605
struct _AFPROTOCOLS * LPAFPROTOCOLS
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
struct _WSANSClassInfoW WSANSCLASSINFOW
UINT_PTR SOCKET
Definition: winsock.h:47
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
Definition: wsk.h:171
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Definition: wsk.h:172
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193