26#ifndef _ULTIBO_WINSOCK2_H
27#define _ULTIBO_WINSOCK2_H
29#define _ULTIBO_WINSOCK_H
46#ifdef _SYS_TYPES_FD_SET
47#undef _SYS_TYPES_FD_SET
58#define WINSOCK_VERSION 0x0202
64#define IOCPARM_MASK 0x7f
65#define IOC_VOID 0x20000000
66#define IOC_OUT 0x40000000
67#define IOC_IN 0x80000000
68#define IOC_INOUT (IOC_IN | IOC_OUT)
70#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
72#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
74#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
76#define FIONREAD _IOR('f', 127, u_long)
77#define FIONBIO _IOW('f', 126, u_long)
78#define FIOASYNC _IOW('f', 125, u_long)
81#define SIOCSHIWAT _IOW('s', 0, u_long)
82#define SIOCGHIWAT _IOR('s', 1, u_long)
83#define SIOCSLOWAT _IOW('s', 2, u_long)
84#define SIOCGLOWAT _IOR('s', 3, u_long)
85#define SIOCATMARK _IOR('s', 7, u_long)
99#define IPPROTO_IPV6 41
100#define IPPROTO_ROUTING 43
101#define IPPROTO_FRAGMENT 44
102#define IPPROTO_ICMPV6 58
103#define IPPROTO_RVD 66
105#define IPPROTO_RAW 255
106#define IPPROTO_MAX 256
108#define NSPROTO_IPX 1000
109#define NSPROTO_SPX 1256
110#define NSPROTO_SPXII 1257
115#define IPPORT_DISCARD 9
116#define IPPORT_SYSTAT 11
117#define IPPORT_DAYTIME 13
118#define IPPORT_NETSTAT 15
120#define IPPORT_TELNET 23
121#define IPPORT_SMTP 25
122#define IPPORT_TIMESERVER 37
123#define IPPORT_NAMESERVER 42
124#define IPPORT_WHOIS 43
127#define IPPORT_BOOTPS 67
128#define IPPORT_BOOTPC 68
131#define IPPORT_TFTP 69
133#define IPPORT_FINGER 79
134#define IPPORT_TTYLINK 87
135#define IPPORT_SUPDUP 95
138#define IPPORT_EXECSERVER 512
139#define IPPORT_LOGINSERVER 513
140#define IPPORT_CMDSERVER 514
141#define IPPORT_EFSSERVER 520
144#define IPPORT_BIFFUDP 512
145#define IPPORT_WHOSERVER 513
146#define IPPORT_ROUTESERVER 520
150#define IPPORT_RESERVED 1024
153#define IMPLINK_IP 155
154#define IMPLINK_LOWEXPER 156
155#define IMPLINK_HIGHEXPER 158
157#define TF_DISCONNECT 0x01
158#define TF_REUSE_SOCKET 0x02
159#define TF_WRITE_BEHIND 0x04
163#define IP_MULTICAST_IF 2
164#define IP_MULTICAST_TTL 3
165#define IP_MULTICAST_LOOP 4
166#define IP_ADD_MEMBERSHIP 5
167#define IP_DROP_MEMBERSHIP 6
170#define IP_DONTFRAGMENT 9
173#define IP_DEFAULT_MULTICAST_TTL 1
174#define IP_DEFAULT_MULTICAST_LOOP 1
175#define IP_MAX_MEMBERSHIPS 20
178#define INVALID_SOCKET (SOCKET)(~0)
179#define SOCKET_ERROR -1
187#define SOCK_SEQPACKET 5
188#define SOCK_PACKET 10
195#define SO_DEBUG 0x0001
196#define SO_ACCEPTCONN 0x0002
197#define SO_REUSEADDR 0x0004
198#define SO_KEEPALIVE 0x0008
199#define SO_DONTROUTE 0x0010
200#define SO_BROADCAST 0x0020
201#define SO_USELOOPBACK 0x0040
202#define SO_LINGER 0x0080
203#define SO_OOBINLINE 0x0100
205#define SO_DONTLINGER 0xff7f
208#define SO_SNDBUF 0x1001
209#define SO_RCVBUF 0x1002
210#define SO_SNDLOWAT 0x1003
211#define SO_RCVLOWAT 0x1004
212#define SO_SNDTIMEO 0x1005
213#define SO_RCVTIMEO 0x1006
214#define SO_ERROR 0x1007
215#define SO_TYPE 0x1008
216#define SO_CONNTIMEO 0x1009
220#define SO_CONNDATA 0x7000
221#define SO_CONNOPT 0x7001
222#define SO_DISCDATA 0x7002
223#define SO_DISCOPT 0x7003
224#define SO_CONNDATALEN 0x7004
225#define SO_CONNOPTLEN 0x7005
226#define SO_DISCDATALEN 0x7006
227#define SO_DISCOPTLEN 0x7007
230#define SO_OPENTYPE 0x7008
231#define SO_SYNCHRONOUS_ALERT 0x10
232#define SO_SYNCHRONOUS_NONALERT 0x20
235#define SO_MAXDG 0x7009
236#define SO_MAXPATHDG 0x700A
237#define SO_UPDATE_ACCEPT_CONTEXT 0x700B
238#define SO_CONNECT_TIME 0x700C
241#define TCP_NODELAY 0x0001
242#define TCP_MAXSEG 0x0002
243#define TCP_NOPUSH 0x0004
244#define TCP_NOOPT 0x0008
245#define TCP_BSDURGENT 0x7000
247#define TCP_WSCALE 0x0010
248#define TCP_NOSACK 0x0020
251#define UDP_NOCHECKSUM 0x0001
272#define AF_APPLETALK 16
274#define AF_VOICEVIEW 18
276#define AF_UNKNOWN1 20
288#define _SS_MAXSIZE 128
289#define _SS_ALIGNSIZE (sizeof(__int64_t))
290#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned short))
291#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(unsigned short) + _SS_PAD1SIZE + _SS_ALIGNSIZE))
294#define PF_UNSPEC AF_UNSPEC
295#define PF_UNIX AF_UNIX
296#define PF_INET AF_INET
297#define PF_IMPLINK AF_IMPLINK
299#define PF_CHAOS AF_CHAOS
304#define PF_ECMA AF_ECMA
305#define PF_DATAKIT AF_DATAKIT
306#define PF_CCITT AF_CCITT
308#define PF_DECnet AF_DECnet
311#define PF_HYLINK AF_HYLINK
312#define PF_APPLETALK AF_APPLETALK
313#define PF_VOICEVIEW AF_VOICEVIEW
314#define PF_FIREFOX AF_FIREFOX
315#define PF_UNKNOWN1 AF_UNKNOWN1
318#define PF_INET6 AF_INET6
319#define PF_CLUSTER AF_CLUSTER
320#define PF_12844 AF_12844
321#define PF_IRDA AF_IRDA
322#define PF_NETDES AF_NETDES
327#define SOL_SOCKET 0xffff
330#define SOMAXCONN 0x7fffffff
334#define MSG_DONTROUTE 0x4
335#define MSG_WAITALL 0x8;
337#define MSG_INTERRUPT 0x10
338#define MSG_MAXIOVLEN 16
340#define MSG_PARTIAL 0x8000
343#define MAXGETHOSTSTRUCT 1024
347#define FD_READ (1 << FD_READ_BIT)
348#define FD_WRITE_BIT 1
349#define FD_WRITE (1 << FD_WRITE_BIT)
351#define FD_OOB (1 << FD_OOB_BIT)
352#define FD_ACCEPT_BIT 3
353#define FD_ACCEPT (1 << FD_ACCEPT_BIT)
354#define FD_CONNECT_BIT 4
355#define FD_CONNECT (1 << FD_CONNECT_BIT)
356#define FD_CLOSE_BIT 5
357#define FD_CLOSE (1 << FD_CLOSE_BIT)
359#define FD_QOS (1 << FD_QOS_BIT)
360#define FD_GROUP_QOS_BIT 7
361#define FD_GROUP_QOS (1 << FD_GROUP_QOS_BIT)
362#define FD_MAX_EVENTS 8
363#define FD_ALL_EVENTS ((1 << FD_MAX_EVENTS) - 1)
366#define WSABASEERR 10000
370#define WSAEINTR (WSABASEERR+4)
371#define WSAEBADF (WSABASEERR+9)
372#define WSAEACCES (WSABASEERR+13)
373#define WSAEFAULT (WSABASEERR+14)
374#define WSAEINVAL (WSABASEERR+22)
375#define WSAEMFILE (WSABASEERR+24)
379#define WSAEWOULDBLOCK (WSABASEERR+35)
380#define WSAEINPROGRESS (WSABASEERR+36)
381#define WSAEALREADY (WSABASEERR+37)
382#define WSAENOTSOCK (WSABASEERR+38)
383#define WSAEDESTADDRREQ (WSABASEERR+39)
384#define WSAEMSGSIZE (WSABASEERR+40)
385#define WSAEPROTOTYPE (WSABASEERR+41)
386#define WSAENOPROTOOPT (WSABASEERR+42)
387#define WSAEPROTONOSUPPORT (WSABASEERR+43)
388#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
389#define WSAEOPNOTSUPP (WSABASEERR+45)
390#define WSAEPFNOSUPPORT (WSABASEERR+46)
391#define WSAEAFNOSUPPORT (WSABASEERR+47)
392#define WSAEADDRINUSE (WSABASEERR+48)
393#define WSAEADDRNOTAVAIL (WSABASEERR+49)
394#define WSAENETDOWN (WSABASEERR+50)
395#define WSAENETUNREACH (WSABASEERR+51)
396#define WSAENETRESET (WSABASEERR+52)
397#define WSAECONNABORTED (WSABASEERR+53)
398#define WSAECONNRESET (WSABASEERR+54)
399#define WSAENOBUFS (WSABASEERR+55)
400#define WSAEISCONN (WSABASEERR+56)
401#define WSAENOTCONN (WSABASEERR+57)
402#define WSAESHUTDOWN (WSABASEERR+58)
403#define WSAETOOMANYREFS (WSABASEERR+59)
404#define WSAETIMEDOUT (WSABASEERR+60)
405#define WSAECONNREFUSED (WSABASEERR+61)
406#define WSAELOOP (WSABASEERR+62)
407#define WSAENAMETOOLONG (WSABASEERR+63)
408#define WSAEHOSTDOWN (WSABASEERR+64)
409#define WSAEHOSTUNREACH (WSABASEERR+65)
410#define WSAENOTEMPTY (WSABASEERR+66)
411#define WSAEPROCLIM (WSABASEERR+67)
412#define WSAEUSERS (WSABASEERR+68)
413#define WSAEDQUOT (WSABASEERR+69)
414#define WSAESTALE (WSABASEERR+70)
415#define WSAEREMOTE (WSABASEERR+71)
417#define WSAEDISCON (WSABASEERR+101)
421#define WSASYSNOTREADY (WSABASEERR+91)
422#define WSAVERNOTSUPPORTED (WSABASEERR+92)
423#define WSANOTINITIALISED (WSABASEERR+93)
425#define WSAENOMORE (WSABASEERR+102)
426#define WSAECANCELLED (WSABASEERR+103)
427#define WSAEINVALIDPROCTABLE (WSABASEERR+104)
428#define WSAEINVALIDPROVIDER (WSABASEERR+105)
429#define WSAEPROVIDERFAILEDINIT (WSABASEERR+106)
430#define WSASYSCALLFAILURE (WSABASEERR+107)
431#define WSASERVICE_NOT_FOUND (WSABASEERR+108)
432#define WSATYPE_NOT_FOUND (WSABASEERR+109)
433#define WSA_E_NO_MORE (WSABASEERR+110)
434#define WSA_E_CANCELLED (WSABASEERR+111)
435#define WSAEREFUSED (WSABASEERR+112)
448#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
449#define HOST_NOT_FOUND WSAHOST_NOT_FOUND
453#define WSATRY_AGAIN (WSABASEERR+1002)
454#define TRY_AGAIN WSATRY_AGAIN
458#define WSANO_RECOVERY (WSABASEERR+1003)
459#define NO_RECOVERY WSANO_RECOVERY
463#define WSANO_DATA (WSABASEERR+1004)
464#define NO_DATA WSANO_DATA
468#define WSANO_ADDRESS WSANO_DATA
469#define NO_ADDRESS WSANO_ADDRESS
472#define WSA_IO_PENDING ERROR_IO_PENDING
473#define WSA_IO_INCOMPLETE ERROR_IO_INCOMPLETE
474#define WSA_INVALID_HANDLE ERROR_INVALID_HANDLE
475#define WSA_INVALID_PARAMETER ERROR_INVALID_PARAMETER
476#define WSA_NOT_ENOUGH_MEMORY ERROR_NOT_ENOUGH_MEMORY
477#define WSA_OPERATION_ABORTED ERROR_OPERATION_ABORTED
478#define WSA_INVALID_EVENT (WSAEVENT)NULL
479#define WSA_MAXIMUM_WAIT_EVENTS MAXIMUM_WAIT_OBJECTS
480#define WSA_WAIT_FAILED 0xffffffff
481#define WSA_WAIT_EVENT_0 WAIT_OBJECT_0
482#define WSA_WAIT_IO_COMPLETION WAIT_IO_COMPLETION
483#define WSA_WAIT_TIMEOUT WAIT_TIMEOUT
484#define WSA_INFINITE INFINITE
490#define EWOULDBLOCK WSAEWOULDBLOCK
491#define EINPROGRESS WSAEINPROGRESS
492#define EALREADY WSAEALREADY
493#define ENOTSOCK WSAENOTSOCK
494#define EDESTADDRREQ WSAEDESTADDRREQ
495#define EMSGSIZE WSAEMSGSIZE
496#define EPROTOTYPE WSAEPROTOTYPE
497#define ENOPROTOOPT WSAENOPROTOOPT
498#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
499#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
500#define EOPNOTSUPP WSAEOPNOTSUPP
501#define EPFNOSUPPORT WSAEPFNOSUPPORT
502#define EAFNOSUPPORT WSAEAFNOSUPPORT
503#define EADDRINUSE WSAEADDRINUSE
504#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
505#define ENETDOWN WSAENETDOWN
506#define ENETUNREACH WSAENETUNREACH
507#define ENETRESET WSAENETRESET
508#define ECONNABORTED WSAECONNABORTED
509#define ECONNRESET WSAECONNRESET
510#define ENOBUFS WSAENOBUFS
511#define EISCONN WSAEISCONN
512#define ENOTCONN WSAENOTCONN
513#define ESHUTDOWN WSAESHUTDOWN
514#define ETOOMANYREFS WSAETOOMANYREFS
515#define ETIMEDOUT WSAETIMEDOUT
516#define ECONNREFUSED WSAECONNREFUSED
517#define ELOOP WSAELOOP
518#define ENAMETOOLONG WSAENAMETOOLONG
519#define EHOSTDOWN WSAEHOSTDOWN
520#define EHOSTUNREACH WSAEHOSTUNREACH
521#define ENOTEMPTY WSAENOTEMPTY
522#define EPROCLIM WSAEPROCLIM
523#define EUSERS WSAEUSERS
524#define EDQUOT WSAEDQUOT
525#define ESTALE WSAESTALE
526#define EREMOTE WSAEREMOTE
528#define ENOTREADY WSASYSNOTREADY
529#define EVERNOTSUPPORTED WSAVERNOTSUPPORTED
530#define ENOTINITIALISED WSANOTINITIALISED
532#define WSADESCRIPTION_LEN 256
533#define WSASYS_STATUS_LEN 128
534#define MAX_PROTOCOL_CHAIN 7
535#define BASE_PROTOCOL 1
536#define LAYERED_PROTOCOL 0
537#define WSAPROTOCOL_LEN 255
540#define SERVICETYPE_NOTRAFFIC 0x00000000
541#define SERVICETYPE_BESTEFFORT 0x00000001
542#define SERVICETYPE_CONTROLLEDLOAD 0x00000002
543#define SERVICETYPE_GUARANTEED 0x00000003
544#define SERVICETYPE_NETWORK_UNAVAILABLE 0x00000004
545#define SERVICETYPE_GENERAL_INFORMATION 0x00000005
546#define SERVICETYPE_NOCHANGE 0x00000006
548#define SERVICE_IMMEDIATE_TRAFFIC_CONTROL 0x80000000
551#define CF_ACCEPT 0x0000
552#define CF_REJECT 0x0001
553#define CF_DEFER 0x0002
556#define SD_RECEIVE 0x00
561#define SG_UNCONSTRAINED_GROUP 0x01
562#define SG_CONSTRAINED_GROUP 0x02
565#define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
566#define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
567#define PFL_HIDDEN 0x00000004
568#define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
571#define XP1_CONNECTIONLESS 0x00000001
572#define XP1_GUARANTEED_DELIVERY 0x00000002
573#define XP1_GUARANTEED_ORDER 0x00000004
574#define XP1_MESSAGE_ORIENTED 0x00000008
575#define XP1_PSEUDO_STREAM 0x00000010
576#define XP1_GRACEFUL_CLOSE 0x00000020
577#define XP1_EXPEDITED_DATA 0x00000040
578#define XP1_CONNECT_DATA 0x00000080
579#define XP1_DISCONNECT_DATA 0x00000100
580#define XP1_SUPPORT_BROADCAST 0x00000200
581#define XP1_SUPPORT_MULTIPOINT 0x00000400
582#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
583#define XP1_MULTIPOINT_DATA_PLANE 0x00001000
584#define XP1_QOS_SUPPORTED 0x00002000
585#define XP1_INTERRUPT 0x00004000
586#define XP1_UNI_SEND 0x00008000
587#define XP1_UNI_RECV 0x00010000
588#define XP1_IFS_HANDLES 0x00020000
589#define XP1_PARTIAL_MESSAGE 0x00040000
591#define BIGENDIAN 0x0000
592#define LITTLEENDIAN 0x0001
594#define SECURITY_PROTOCOL_NONE 0x0000
597#define JL_SENDER_ONLY 0x01
598#define JL_RECEIVER_ONLY 0x02
602#define WSA_FLAG_OVERLAPPED 0x01
603#define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
604#define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
605#define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
606#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
609#define IOC_UNIX 0x00000000
610#define IOC_WS2 0x08000000
611#define IOC_PROTOCOL 0x10000000
612#define IOC_VENDOR 0x18000000
614#define SIO_ASSOCIATE_HANDLE IOC_IN | IOC_WS2 | 1
615#define SIO_ENABLE_CIRCULAR_QUEUEING IOC_WS2 | 2
616#define SIO_FIND_ROUTE IOC_OUT | IOC_WS2 | 3
617#define SIO_FLUSH IOC_WS2 | 4
618#define SIO_GET_BROADCAST_ADDRESS IOC_OUT | IOC_WS2 | 5
619#define SIO_GET_EXTENSION_FUNCTION_POINTER IOC_INOUT | IOC_WS2 | 6
620#define SIO_GET_QOS IOC_INOUT | IOC_WS2 | 7
621#define SIO_GET_GROUP_QOS IOC_INOUT | IOC_WS2 | 8
622#define SIO_MULTIPOINT_LOOPBACK IOC_IN | IOC_WS2 | 9
623#define SIO_MULTICAST_SCOPE IOC_IN | IOC_WS2 | 10
624#define SIO_SET_QOS IOC_IN | IOC_WS2 | 11
625#define SIO_SET_GROUP_QOS IOC_IN | IOC_WS2 | 12
626#define SIO_TRANSLATE_HANDLE IOC_INOUT | IOC_WS2 | 13
629#define TH_NETDEV 0x00000001
630#define TH_TAPI 0x00000002
632#define SERVICE_MULTIPLE 0x00000001
639#define NS_PEER_BROWSE (3)
641#define NS_TCPIP_LOCAL (10)
642#define NS_TCPIP_HOSTS (11)
655#define NS_NISPLUS (42)
660#define RES_UNUSED_1 0x00000001
661#define RES_FLUSH_CACHE 0x00000002
662#define RES_SERVICE 0x00000004
665#define SERVICE_TYPE_VALUE_IPXPORTA "IpxSocket"
666#define SERVICE_TYPE_VALUE_IPXPORTW L"IpxSocket"
668#define SERVICE_TYPE_VALUE_SAPIDA "SapId"
669#define SERVICE_TYPE_VALUE_SAPIDW L"SapId"
671#define SERVICE_TYPE_VALUE_TCPPORTA "TcpPort"
672#define SERVICE_TYPE_VALUE_TCPPORTW L"TcpPort"
674#define SERVICE_TYPE_VALUE_UDPPORTA "UdpPort"
675#define SERVICE_TYPE_VALUE_UDPPORTW L"UdpPort"
677#define SERVICE_TYPE_VALUE_OBJECTIDA "ObjectId"
678#define SERVICE_TYPE_VALUE_OBJECTIDW L"ObjectId"
680#define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDA
681#define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTA
682#define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTA
683#define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDA
685#define LUP_DEEP 0x0001
686#define LUP_CONTAINERS 0x0002
687#define LUP_NOCONTAINERS 0x0004
688#define LUP_NEAREST 0x0008
689#define LUP_RETURN_NAME 0x0010
690#define LUP_RETURN_TYPE 0x0020
691#define LUP_RETURN_VERSION 0x0040
692#define LUP_RETURN_COMMENT 0x0080
693#define LUP_RETURN_ADDR 0x0100
694#define LUP_RETURN_BLOB 0x0200
695#define LUP_RETURN_ALIASES 0x0400
696#define LUP_RETURN_QUERY_STRING 0x0800
697#define LUP_RETURN_ALL 0x0FF0
698#define LUP_RES_SERVICE 0x8000
700#define LUP_FLUSHCACHE 0x1000
701#define LUP_FLUSHPREVIOUS 0x2000
704#define RESULT_IS_ALIAS 0x0001
707#define MSG_TRUNC 0x0100
708#define MSG_CTRUNC 0x0200
709#define MSG_BCAST 0x0400
710#define MSG_MCAST 0x0800
713#define POLLRDNORM 0x0100
714#define POLLRDBAND 0x0200
715#define POLLIN (POLLRDNORM | POLLRDBAND)
716#define POLLPRI 0x0400
718#define POLLWRNORM 0x0010
719#define POLLOUT (POLLWRNORM)
720#define POLLWRBAND 0x0020
722#define POLLERR 0x0001
723#define POLLHUP 0x0002
724#define POLLNVAL 0x0004
727#define EAI_AGAIN WSATRY_AGAIN
728#define EAI_BADFLAGS WSAEINVAL
729#define EAI_FAIL WSANO_RECOVERY
730#define EAI_FAMILY WSAEAFNOSUPPORT
731#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
733#define EAI_NONAME WSAHOST_NOT_FOUND
734#define EAI_SERVICE WSATYPE_NOT_FOUND
735#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
737#define EAI_NODATA EAI_NONAME
741#define AI_PASSIVE 0x00000001
742#define AI_CANONNAME 0x00000002
743#define AI_NUMERICHOST 0x00000004
744#define AI_NUMERICSERV 0x00000008
745#define AI_ALL 0x00000100
746#define AI_ADDRCONFIG 0x00000400
747#define AI_V4MAPPED 0x00000800
748#define AI_NON_AUTHORITATIVE 0x00004000
749#define AI_SECURE 0x00008000
750#define AI_RETURN_PREFERRED_NAMES 0x00010000
751#define AI_FQDN 0x00020000
752#define AI_FILESERVER 0x00040000
755#define NI_NOFQDN 0x01
756#define NI_NUMERICHOST 0x02
757#define NI_NAMEREQD 0x04
758#define NI_NUMERICSERV 0x08
761#define NI_MAXHOST 1025
764#define INET_ADDRSTR_ANY "0.0.0.0"
765#define INET6_ADDRSTR_ANY "::"
767#define INET_ADDRSTR_BROADCAST "255.255.255.255"
769#define INET_ADDRSTRLEN 16
770#define INET6_ADDRSTRLEN 46
772#define IN6ADDR_ANY_INIT {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
773#define IN6ADDR_LOOPBACK_INIT {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
776typedef unsigned char u_char;
778typedef unsigned int u_int;
779typedef unsigned long u_long;
836#define s_addr S_un.S_addr
1811int STDCALL WsControl(uint32_t proto, uint32_t action,
void *prequestinfo, uint32_t *pcbrequestinfolen,
void *presponseinfo, uint32_t *pcbresponseinfolen);
1825int STDCALL WsControlEx(uint32_t proto, uint32_t action,
void *prequestinfo, uint32_t *pcbrequestinfolen,
void *presponseinfo, uint32_t *pcbresponseinfolen);
void * FARPROC
Definition globaltypes.h:64
size_t HANDLE
Definition globaltypes.h:51
#define STDCALL
Definition globaltypes.h:45
HANDLE WSAEVENT
Definition globaltypes.h:62
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
struct _OVERLAPPED OVERLAPPED
Definition globaltypes.h:70
wchar_t WCHAR
Standard WideChar type (2 bytes) (Redeclared here for flexibility).
Definition globaltypes.h:58
uint32_t DWORD
Definition globaltypes.h:53
size_t SOCKET
Definition globaltypes.h:60
Definition winsock2.h:1216
SOCKADDR * ai_addr
Binary address.
Definition winsock2.h:1223
int32_t ai_socktype
SOCK_xxx.
Definition winsock2.h:1219
int32_t ai_protocol
0 or IPPROTO_xxx for IPv4 and IPv6
Definition winsock2.h:1220
int32_t ai_flags
AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST.
Definition winsock2.h:1217
ADDRINFO * ai_next
Next structure in linked list.
Definition winsock2.h:1224
size_t ai_addrlen
Length of ai_addr.
Definition winsock2.h:1221
char * ai_canonname
Canonical name for nodename.
Definition winsock2.h:1222
int32_t ai_family
PF_xxx.
Definition winsock2.h:1218
Definition winsock2.h:1064
int32_t iprotocol
Definition winsock2.h:1066
int32_t iaddressfamily
Definition winsock2.h:1065
Definition winsock2.h:940
uint8_t * pblobdata
Definition winsock2.h:942
uint32_t cbsize
Definition winsock2.h:941
Definition winsock2.h:1048
int32_t iprotocol
Definition winsock2.h:1052
int32_t isockettype
Definition winsock2.h:1051
SOCKET_ADDRESS remoteaddr
Definition winsock2.h:1050
SOCKET_ADDRESS localaddr
Definition winsock2.h:1049
Definition winsock2.h:955
int32_t tokenrate
In Bytes/sec.
Definition winsock2.h:956
int32_t tokenbucketsize
In Bytes.
Definition winsock2.h:957
int32_t delayvariation
In microseconds.
Definition winsock2.h:960
int32_t minimumpolicedsize
In Bytes.
Definition winsock2.h:963
int32_t maxsdusize
Definition winsock2.h:962
int32_t latency
In microseconds.
Definition winsock2.h:959
SERVICETYPE servicetype
Definition winsock2.h:961
int32_t peakbandwidth
In Bytes/sec.
Definition winsock2.h:958
Definition winsock2.h:967
WSABUF providerspecific
additional provider specific stuff
Definition winsock2.h:970
FLOWSPEC receivingflowspec
the flow spec for data receiving
Definition winsock2.h:969
FLOWSPEC sendingflowspec
the flow spec for data sending
Definition winsock2.h:968
Definition winsock2.h:1057
int32_t iaddresscount
Definition winsock2.h:1058
array[0..0] of SOCKET_ADDRESS address
Definition winsock2.h:1059
Definition winsock2.h:1041
SOCKADDR * lpsockaddr
Definition winsock2.h:1042
int32_t isockaddrlength
Definition winsock2.h:1043
Definition winsock2.h:947
char * buf
the pointer to the buffer
Definition winsock2.h:949
uint32_t len
the length of the buffer
Definition winsock2.h:948
uint16_t wversion
Definition winsock.h:590
char szdescription[WSADESCRIPTION_LEN+1]
Definition winsock.h:592
uint16_t whighversion
Definition winsock.h:591
uint16_t imaxsockets
Definition winsock.h:594
char szsystemstatus[WSASYS_STATUS_LEN+1]
Definition winsock.h:593
uint16_t imaxudpdg
Definition winsock.h:595
char * lpvendorinfo
Definition winsock.h:596
Definition winsock2.h:1125
WSABUF * lpbuffers
Definition winsock2.h:1128
int32_t namelen
Definition winsock2.h:1127
WSABUF control
Definition winsock2.h:1130
uint32_t dwflags
Definition winsock2.h:1131
uint32_t dwbuffercount
Definition winsock2.h:1129
SOCKET_ADDRESS * name
Definition winsock2.h:1126
Definition winsock2.h:1189
GUID nsproviderid
Definition winsock2.h:1190
BOOL factive
Definition winsock2.h:1192
int32_t dwnamespace
Definition winsock2.h:1191
int32_t dwversion
Definition winsock2.h:1193
char * lpszidentifier
Definition winsock2.h:1194
Definition winsock2.h:1198
GUID nsproviderid
Definition winsock2.h:1199
BOOL factive
Definition winsock2.h:1201
int32_t dwnamespace
Definition winsock2.h:1200
WCHAR * lpszidentifier
Definition winsock2.h:1203
int32_t dwversion
Definition winsock2.h:1202
Definition winsock2.h:977
int ierrorcode[FD_MAX_EVENTS]
Definition winsock2.h:979
long lnetworkevents
Definition winsock2.h:978
Definition winsock2.h:1151
int32_t dwnamespace
Definition winsock2.h:1153
int32_t dwvaluetype
Definition winsock2.h:1154
char * lpszname
Definition winsock2.h:1152
int32_t dwvaluesize
Definition winsock2.h:1155
void * lpvalue
Definition winsock2.h:1156
Definition winsock2.h:1160
int32_t dwnamespace
Definition winsock2.h:1162
WCHAR * lpszname
Definition winsock2.h:1161
int32_t dwvaluetype
Definition winsock2.h:1163
int32_t dwvaluesize
Definition winsock2.h:1164
void * lpvalue
Definition winsock2.h:1165
Definition winsock2.h:1135
short events
Definition winsock2.h:1137
SOCKET fd
Definition winsock2.h:1136
short revents
Definition winsock2.h:1138
Definition winsock2.h:983
int ChainLen
the length of the chain,
Definition winsock2.h:984
DWORD ChainEntries[MAX_PROTOCOL_CHAIN]
a list of dwCatalogEntryIds
Definition winsock2.h:988
Definition winsock2.h:992
int32_t dwserviceflags1
Definition winsock2.h:993
int32_t imaxsockaddr
Definition winsock2.h:1003
int32_t dwserviceflags2
Definition winsock2.h:994
int32_t iprotocol
Definition winsock2.h:1006
int32_t iaddressfamily
Definition winsock2.h:1002
int32_t isecurityscheme
Definition winsock2.h:1009
int32_t isockettype
Definition winsock2.h:1005
int32_t dwmessagesize
Definition winsock2.h:1010
int32_t dwserviceflags3
Definition winsock2.h:995
int32_t inetworkbyteorder
Definition winsock2.h:1008
int32_t dwproviderflags
Definition winsock2.h:997
WSAPROTOCOLCHAIN protocolchain
Definition winsock2.h:1000
int32_t iversion
Definition winsock2.h:1001
int32_t iprotocolmaxoffset
Definition winsock2.h:1007
int32_t dwcatalogentryid
Definition winsock2.h:999
int32_t dwserviceflags4
Definition winsock2.h:996
int32_t iminsockaddr
Definition winsock2.h:1004
int32_t dwproviderreserved
Definition winsock2.h:1011
GUID providerid
Definition winsock2.h:998
char szprotocol[WSAPROTOCOL_LEN+1]
Definition winsock2.h:1012
Definition winsock2.h:1016
WCHAR szprotocol[WSAPROTOCOL_LEN+1]
Definition winsock2.h:1036
int32_t dwserviceflags1
Definition winsock2.h:1017
int32_t imaxsockaddr
Definition winsock2.h:1027
int32_t dwserviceflags2
Definition winsock2.h:1018
int32_t iprotocol
Definition winsock2.h:1030
int32_t iaddressfamily
Definition winsock2.h:1026
int32_t isecurityscheme
Definition winsock2.h:1033
int32_t isockettype
Definition winsock2.h:1029
int32_t dwmessagesize
Definition winsock2.h:1034
int32_t dwserviceflags3
Definition winsock2.h:1019
int32_t inetworkbyteorder
Definition winsock2.h:1032
int32_t dwproviderflags
Definition winsock2.h:1021
WSAPROTOCOLCHAIN protocolchain
Definition winsock2.h:1024
int32_t iversion
Definition winsock2.h:1025
int32_t iprotocolmaxoffset
Definition winsock2.h:1031
int32_t dwcatalogentryid
Definition winsock2.h:1023
int32_t dwserviceflags4
Definition winsock2.h:1020
int32_t iminsockaddr
Definition winsock2.h:1028
int32_t dwproviderreserved
Definition winsock2.h:1035
GUID providerid
Definition winsock2.h:1022
Definition winsock2.h:1085
int32_t dwnumberofprotocols
Definition winsock2.h:1094
int32_t dwsize
Definition winsock2.h:1086
int32_t dwoutputflags
Definition winsock2.h:1099
int32_t dwnamespace
Definition winsock2.h:1091
BLOB * lpblob
Definition winsock2.h:1100
char * lpszserviceinstancename
Definition winsock2.h:1087
GUID * lpnsproviderid
Definition winsock2.h:1092
WSAVERSION * lpversion
Definition winsock2.h:1089
CSADDR_INFO * lpcsabuffer
Definition winsock2.h:1098
char * lpszcomment
Definition winsock2.h:1090
AFPROTOCOLS * lpafpprotocols
Definition winsock2.h:1095
char * lpszcontext
Definition winsock2.h:1093
char * lpszquerystring
Definition winsock2.h:1096
GUID * lpserviceclassid
Definition winsock2.h:1088
int32_t dwnumberofcsaddrs
Definition winsock2.h:1097
Definition winsock2.h:1104
int32_t dwnumberofprotocols
Definition winsock2.h:1113
int32_t dwsize
Definition winsock2.h:1105
int32_t dwoutputflags
Definition winsock2.h:1118
int32_t dwnamespace
Definition winsock2.h:1110
BLOB * lpblob
Definition winsock2.h:1119
WCHAR * lpszcontext
Definition winsock2.h:1112
GUID * lpnsproviderid
Definition winsock2.h:1111
WCHAR * lpszquerystring
Definition winsock2.h:1115
WSAVERSION * lpversion
Definition winsock2.h:1108
CSADDR_INFO * lpcsabuffer
Definition winsock2.h:1117
AFPROTOCOLS * lpafpprotocols
Definition winsock2.h:1114
WCHAR * lpszserviceinstancename
Definition winsock2.h:1106
WCHAR * lpszcomment
Definition winsock2.h:1109
GUID * lpserviceclassid
Definition winsock2.h:1107
int32_t dwnumberofcsaddrs
Definition winsock2.h:1116
Definition winsock2.h:1171
char * lpszserviceclassname
Definition winsock2.h:1173
WSANSCLASSINFOA * lpclassinfos
Definition winsock2.h:1175
int32_t dwcount
Definition winsock2.h:1174
GUID * lpserviceclassid
Definition winsock2.h:1172
Definition winsock2.h:1179
WSANSCLASSINFOW * lpclassinfos
Definition winsock2.h:1183
WCHAR * lpszserviceclassname
Definition winsock2.h:1181
int32_t dwcount
Definition winsock2.h:1182
GUID * lpserviceclassid
Definition winsock2.h:1180
Definition winsock2.h:1079
WSAECOMPARATOR echow
Definition winsock2.h:1081
int32_t dwversion
Definition winsock2.h:1080
u_int fd_count
Definition winsock.h:526
SOCKET fd_array[FD_SETSIZE]
Definition winsock.h:527
char ** h_aliases
Definition winsock.h:539
char ** h_addr_list
Definition winsock.h:542
int16_t h_addrtype
Definition winsock.h:540
char * h_name
Definition winsock.h:538
int16_t h_length
Definition winsock.h:541
Definition winsock2.h:841
int32_t s6_addr32[4]
Definition winsock2.h:850
uint32_t u6_addr32[4]
Definition winsock2.h:846
int8_t s6_addr[16]
Definition winsock2.h:848
uint8_t u6_addr8[16]
Definition winsock2.h:844
int8_t s6_addr8[16]
Definition winsock2.h:847
int16_t s6_addr16[8]
Definition winsock2.h:849
uint16_t u6_addr16[8]
Definition winsock2.h:845
u_short s_w1
Definition winsock.h:573
u_char S_bytes[4]
Definition winsock.h:575
u_char s_b3
Definition winsock.h:572
u_long S_addr
Definition winsock.h:574
u_char s_b1
Definition winsock.h:572
u_short s_w2
Definition winsock.h:573
struct _in_addr::@075342254321346101047366012334126230275075004224::@277110075311252260327012205042033311124245066371 S_un_w
struct _in_addr::@075342254321346101047366012334126230275075004224::@354042140363320263321207227377267012345362375137 S_un_b
u_char s_b4
Definition winsock.h:572
u_char s_b2
Definition winsock.h:572
union _in_addr::@075342254321346101047366012334126230275075004224 S_un
Definition winsock2.h:856
uint8_t s_node[6]
Definition winsock2.h:858
uint16_t s_socket
Definition winsock2.h:859
uint8_t s_net[4]
Definition winsock2.h:857
u_short l_onoff
Definition winsock.h:626
u_short l_linger
Definition winsock.h:627
char ** n_aliases
Definition winsock.h:548
char * n_name
Definition winsock.h:547
int16_t n_addrtype
Definition winsock.h:549
u_long n_net
Definition winsock.h:550
char * p_name
Definition winsock.h:563
char ** p_aliases
Definition winsock.h:564
int16_t p_proto
Definition winsock.h:565
int16_t s_port
Definition winsock.h:557
char * s_proto
Definition winsock.h:558
char ** s_aliases
Definition winsock.h:556
char * s_name
Definition winsock.h:555
Definition winsock2.h:872
u_int sin6_scope_id
set of interfaces for a scope
Definition winsock2.h:877
in6_addr sin6_addr
IPv6 address.
Definition winsock2.h:876
u_short sin6_family
AF_INET6.
Definition winsock2.h:873
u_short sin6_port
transport layer port #
Definition winsock2.h:874
u_int sin6_flowinfo
IPv6 flow information.
Definition winsock2.h:875
u_short sin_port
Definition winsock.h:583
in_addr sin_addr
Definition winsock.h:584
char sin_zero[8]
Definition winsock.h:585
u_short sin_family
Definition winsock.h:582
Definition winsock2.h:882
ipx_addr sipx_addr
IPX address.
Definition winsock2.h:884
u_short sipx_family
AF_IPX.
Definition winsock2.h:883
Definition winsock2.h:905
char __ss_pad1[_SS_PAD1SIZE]
6 byte pad, this is to make
Definition winsock2.h:908
u_short ss_family
address family
Definition winsock2.h:906
char __ss_pad2[_SS_PAD2SIZE]
112 byte pad to achieve desired size;
Definition winsock2.h:913
__int64_t __ss_align
Field to force desired structure.
Definition winsock2.h:912
char sa_data[14]
up to 14 bytes of direct address
Definition winsock.h:611
u_short sa_family
address family
Definition winsock.h:610
u_short sp_family
Definition winsock.h:619
u_short sp_protocol
Definition winsock.h:620
int32_t tv_sec
Definition winsock.h:532
int32_t tv_usec
Definition winsock.h:533
HANDLE HWND
Definition ultibo.h:212
uint32_t ULONG
unsigned long // In Windows ULONG remains as 4 bytes (32-bit) regardless of 32-bit or 64-bit compiler
Definition ultibo.h:191
BOOL STDCALL WSAConnectByList(SOCKET s, SOCKET_ADDRESS_LIST *socketaddresslist, uint32_t *localaddresslength, SOCKADDR *localaddress, uint32_t *remoteaddresslength, SOCKADDR *remoteaddress, wstimeval *timeout, WSAOVERLAPPED *reserved)
HANDLE STDCALL WSAAsyncGetProtoByNumber(HWND hwindow, u_int wmsg, int32_t number, char *buf, int32_t buflen)
int32_t STDCALL WSAGetServiceClassNameByClassIdA(GUID *lpserviceclassid, char *lpszserviceclassname, uint32_t *lpdwbufferlength)
int32_t STDCALL WSAHtons(SOCKET s, u_short hostshort, uint16_t *lpnetshort)
Convert a u_short from host byte order to network byte order See the Windows Sockets 2 documentation ...
SOCKET STDCALL WSASocketA(int32_t af, int32_t itype, int32_t protocol, WSAPROTOCOL_INFOA *lpprotocolinfo, GROUP g, uint32_t dwflags)
Create a socket that is bound to a specific transport-service provider.
int32_t STDCALL gethostname(char *name, int32_t len)
Retrieve the standard host name for the local computer See the Windows Sockets 2 documentation for ad...
int32_t STDCALL WSANtohs(SOCKET s, u_short netshort, uint16_t *lphostshort)
Convert a u_short from network byte order to host byte order See the Windows Sockets 2 documentation ...
BOOL STDCALL WSASetEvent(WSAEVENT hevent)
Set the state of the specified event object to signaled See the Windows Sockets 2 documentation for a...
enum _WSAECOMPARATOR WSAECOMPARATOR
SOCKET STDCALL WSASocketW(int32_t af, int32_t itype, int32_t protocol, WSAPROTOCOL_INFOW *lpprotocolinfo, GROUP g, uint32_t dwflags)
Create a socket that is bound to a specific transport-service provider.
hostent *STDCALL gethostbyaddr(void *addr, int32_t len, int32_t family)
Retrieve the host information corresponding to a network address.
HANDLE STDCALL WSAAsyncGetServByPort(HWND hwindow, u_int wmsg, u_int port, const char *proto, char *buf, int32_t buflen)
SOCKET STDCALL accept(SOCKET s, SOCKADDR *addr, int32_t *addrlen)
Accept an incoming connection attempt on a socket See the Windows Sockets 2 documentation for additio...
void STDCALL WSASetLastError(int32_t ierror)
Set the error code that can be retrieved through the WSAGetLastError function See the Windows Sockets...
uint16_t STDCALL WSAGetSelectError(int32_t param)
int32_t STDCALL WSAGetServiceClassNameByClassIdW(GUID *lpserviceclassid, WCHAR *lpszserviceclassname, uint32_t *lpdwbufferlength)
int32_t STDCALL WSARemoveServiceClass(GUID *lpserviceclassid)
#define _SS_PAD2SIZE
Definition winsock2.h:291
int32_t STDCALL shutdown(SOCKET s, int32_t how)
Disable sends or receives on a socket See the Windows Sockets 2 documentation for additional informat...
int32_t STDCALL setsockopt(SOCKET s, int32_t level, int32_t optname, const char *optval, int32_t optlen)
Set a socket option See the Windows Sockets 2 documentation for additional information.
HANDLE STDCALL WSAAsyncGetProtoByName(HWND hwindow, u_int wmsg, const char *name, char *buf, int32_t buflen)
FARPROC STDCALL WSASetBlockingHook(FARPROC lpblockfunc)
int32_t STDCALL WSAStringToAddressA(const char *addressstring, int32_t addressfamily, WSAPROTOCOL_INFOA *lpprotocolinfo, SOCKADDR *lpaddress, int32_t *lpaddresslength)
Convert a network address in its standard text presentation form into its numeric binary form in a so...
protoent *STDCALL getprotobynumber(int32_t proto)
Retrieve protocol information corresponding to a protocol number See the Windows Sockets 2 documentat...
#define MAX_PROTOCOL_CHAIN
Definition winsock2.h:534
struct _WSASERVICECLASSINFOW WSASERVICECLASSINFOW
struct _WSANAMESPACE_INFOA WSANAMESPACE_INFOA
struct _WSAVERSION WSAVERSION
struct _WSANSCLASSINFOA WSANSCLASSINFOA
void STDCALL freeaddrinfo(ADDRINFO *ai)
Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures See the Windo...
void STDCALL WS2AsyncStart(void *data)
int32_t STDCALL WSACancelBlockingCall(void)
_WSAECOMPARATOR
Definition winsock2.h:1073
@ COMP_EQUAL
Definition winsock2.h:1074
@ COMP_NOTLESS
Definition winsock2.h:1075
int32_t STDCALL WSARecvDisconnect(SOCKET s, WSABUF *lpinbounddisconnectdata)
int32_t STDCALL bind(SOCKET s, SOCKADDR *addr, int32_t namelen)
Associate a local address with a socket See the Windows Sockets 2 documentation for additional inform...
uint64_t STDCALL htond(double_t hostdouble)
Convert a double from host byte order to TCP/IP network byte order (which is big-endian) See the Wind...
struct _WSANAMESPACE_INFOW WSANAMESPACE_INFOW
struct _SOCKET_ADDRESS SOCKET_ADDRESS
BOOL STDCALL WSAGetOverlappedResult(SOCKET s, WSAOVERLAPPED *lpoverlapped, DWORD *lpcbtransfer, BOOL fwait, uint32_t *lpdwflags)
Retrieve the results of an overlapped operation on the specified socket See the Windows Sockets 2 doc...
#define FD_MAX_EVENTS
Definition winsock2.h:362
int32_t STDCALL recv(SOCKET s, char *buf, int32_t len, int32_t flags)
Receive data from a connected socket or a bound connectionless socket See the Windows Sockets 2 docum...
servent *STDCALL getservbyname(const char *name, const char *proto)
Retrieve service information corresponding to a service name and protocol See the Windows Sockets 2 d...
int32_t STDCALL WSARecvMsg(SOCKET s, WSAMSG *lpmsg, uint32_t *lpdwnumberofbytesrecvd, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Receive data and optional control information from connected and unconnected sockets.
struct _in6_addr in6_addr
int32_t STDCALL WSAMakeSyncReply(uint16_t buflen, uint16_t error)
int32_t STDCALL WSACleanup(void)
Terminate use of Winsock 2 by an application See the Windows Sockets 2 documentation for additional i...
uint64_t STDCALL ntohll(uint64_t netlonglong)
Convert an unsigned nt64 from TCP/IP network byte order to host byte order See the Windows Sockets 2 ...
u_long STDCALL inet_addr(const char *cp)
Convert a string containing an IPv4 dotted-decimal address into a proper address for the IN_ADDR stru...
int32_t STDCALL WSAInstallServiceClassA(WSASERVICECLASSINFOA *lpserviceclassinfo)
int32_t STDCALL WSASetServiceW(WSAQUERYSETW *lpqsreginfo, WSAESETSERVICEOP essoperation, uint32_t dwcontrolflags)
int32_t STDCALL listen(SOCKET s, int32_t backlog)
Place a socket in a state in which it is listening for incoming connections See the Windows Sockets 2...
int32_t STDCALL ioctlsocket(SOCKET s, int32_t cmd, u_long *arg)
Control the I/O mode of a socket See the Windows Sockets 2 documentation for additional information.
enum _WSAESETSERVICEOP WSAESETSERVICEOP
char *STDCALL InetNtopA(int32_t family, void *paddr, char *pstringbuf, int32_t stringbufsize)
Convert an IPv4 or IPv6 Internet network address into a string in Internet standard format.
int32_t STDCALL WSASendTo(SOCKET s, WSABUF *lpbuffers, uint32_t dwbuffercount, uint32_t *lpnumberofbytessent, uint32_t dwflags, SOCKADDR *lpto, int32_t itolen, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Send data to a specific destination, using overlapped I/O where applicable See the Windows Sockets 2 ...
WSANSCLASSINFOA WSANSCLASSINFO
Definition winsock2.h:1168
uint16_t STDCALL WSAGetAsyncError(int32_t param)
struct _WSANETWORKEVENTS WSANETWORKEVENTS
int32_t STDCALL WSADuplicateSocketW(SOCKET s, uint32_t dwprocessid, WSAPROTOCOL_INFOW *lpprotocolinfo)
#define WSAPROTOCOL_LEN
Definition winsock2.h:537
void STDCALL(* LPWSAOVERLAPPED_COMPLETION_ROUTINE)(uint32_t dwerror, uint32_t cbtransferred, WSAOVERLAPPED *lpoverlapped, uint32_t dwflags)
Definition winsock2.h:1211
double_t STDCALL ntohd(uint64_t netdouble)
Convert an unsigned int64 from TCP/IP network byte order to host byte order and return a double See t...
WSASERVICECLASSINFOA WSASERVICECLASSINFO
Definition winsock2.h:1186
int32_t STDCALL WSALookupServiceBeginA(WSAQUERYSETA *lpqsrestrictions, uint32_t dwcontrolflags, HANDLE *lphlookup)
int32_t STDCALL InetPtonW(int32_t family, const WCHAR *pszaddrstring, void *paddrbuf)
Convert an IPv4 or IPv6 Internet network address in its standard text presentation form into its nume...
int32_t STDCALL getsockopt(SOCKET s, int32_t level, int32_t optname, char *optval, int32_t *optlen)
Retrieve a socket option See the Windows Sockets 2 documentation for additional information.
u_long STDCALL htonl(u_long hostlong)
Convert a u_long from host byte order to TCP/IP network byte order (which is big-endian) See the Wind...
uint32_t STDCALL WSAWaitForMultipleEvents(uint32_t cevents, WSAEVENT *lphevents, BOOL fwaitall, uint32_t dwtimeout, BOOL falertable)
Wait for one or all of the specified event objects to be in the signaled state or the time-out interv...
int32_t STDCALL WSAEventSelect(SOCKET s, WSAEVENT heventobject, int32_t lnetworkevents)
Specify an event object to be associated with the requested set of FD_XXX network events See the Wind...
int32_t STDCALL WSAUnhookBlockingHook(void)
int32_t STDCALL WSAGetServiceClassInfoA(GUID *lpproviderid, GUID *lpserviceclassid, uint32_t *lpdwbufsize, WSASERVICECLASSINFOA *lpserviceclassinfo)
int32_t STDCALL WSAConnect(SOCKET s, SOCKADDR *name, int32_t namelen, WSABUF *lpcallerdata, WSABUF *lpcalleedata, QOS *lpsqos, QOS *lpgqos)
Establish a connection to another socket application and exchange connect data.
int32_t STDCALL inet_pton(int32_t family, const char *pszaddrstring, void *paddrbuf)
Convert an IPv4 or IPv6 Internet network address in its standard text presentation form into its nume...
uint64_t STDCALL htonll(uint64_t hostlonglong)
Convert an unsigned int64 from host byte order to TCP/IP network byte order (which is big-endian) See...
struct _WSASERVICECLASSINFOA WSASERVICECLASSINFOA
struct _WSAPROTOCOLCHAIN WSAPROTOCOLCHAIN
int32_t STDCALL sendto(SOCKET s, const char *buf, int32_t len, int32_t flags, SOCKADDR *addrto, int32_t tolen)
Send data to a specific destination See the Windows Sockets 2 documentation for additional informatio...
int32_t STDCALL WSADuplicateSocketA(SOCKET s, uint32_t dwprocessid, WSAPROTOCOL_INFOA *lpprotocolinfo)
int32_t STDCALL WSAHtonl(SOCKET s, u_long hostlong, uint32_t *lpnetlong)
Convert a u_long from host byte order to network byte order See the Windows Sockets 2 documentation f...
WSAQUERYSETA WSAQUERYSET
Definition winsock2.h:1122
int32_t STDCALL WSACancelAsyncRequest(HANDLE hasynctaskhandle)
int32_t STDCALL(* LPCONDITIONPROC)(WSABUF *lpcallerid, WSABUF *lpcallerdata, QOS *lpsqos, QOS *lpgqos, WSABUF *lpcalleeid, WSABUF *lpcalleedata, GROUP *g, uintptr_t dwcallbackdata)
Definition winsock2.h:1210
int32_t STDCALL getaddrinfo(const char *pnodename, const char *pservicename, ADDRINFO *phints, ADDRINFO **ppresult)
RFC 3493 protocol-independent translation from a host name to an address See the Windows Sockets 2 do...
char *STDCALL inet_ntop(int32_t family, void *paddr, char *pstringbuf, int32_t stringbufsize)
Convert an IPv4 or IPv6 Internet network address into a string in Internet standard format.
int32_t STDCALL recvfrom(SOCKET s, char *buf, int32_t len, int32_t flags, SOCKADDR *from, int32_t *fromlen)
Receive a datagram and store the source address See the Windows Sockets 2 documentation for additiona...
BOOL STDCALL FD_ISSET(SOCKET socket, fd_set *fdset)
Check if a socket is a member of an fd_set See the Windows Sockets 2 documentation for additional inf...
int32_t STDCALL WSAEnumProtocolsA(int32_t *lpiprotocols, WSAPROTOCOL_INFOA *lpprotocolbuffer, uint32_t *lpdwbufferlength)
int32_t STDCALL WSAAsyncSelect(SOCKET s, HWND hwindow, u_int wmsg, int32_t levent)
struct _WSAPROTOCOL_INFOW WSAPROTOCOL_INFOW
char *STDCALL inet_ntoa(in_addr inaddr)
Convert an (IPv4) Internet network address into an ASCII string in Internet standard dotted-decimal f...
uint32_t STDCALL Winsock2ErrorToString(int32_t error, char *string, uint32_t len)
protoent *STDCALL getprotobyname(const char *name)
Retrieve the protocol information corresponding to a protocol name See the Windows Sockets 2 document...
int32_t SERVICETYPE
Definition winsock2.h:952
int32_t STDCALL WSAEnumNameSpaceProvidersA(uint32_t *lpdwbufferlength, WSANAMESPACE_INFOA *lpnspbuffer)
int32_t STDCALL WSASend(SOCKET s, WSABUF *lpbuffers, uint32_t dwbuffercount, uint32_t *lpnumberofbytessent, uint32_t dwflags, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Send data on a connected socket See the Windows Sockets 2 documentation for additional information.
struct _ipx_addr ipx_addr
int32_t STDCALL WSAEnumNameSpaceProvidersW(uint32_t *lpdwbufferlength, WSANAMESPACE_INFOW *lpnspbuffer)
void STDCALL FD_ZERO(fd_set *fdset)
Initialize an fd_set to null See the Windows Sockets 2 documentation for additional information.
BOOL STDCALL WSAResetEvent(WSAEVENT hevent)
Reset the state of the specified event object to unsignaled See the Windows Sockets 2 documentation f...
int32_t STDCALL closesocket(SOCKET s)
Close an existing socket See the Windows Sockets 2 documentation for additional information.
int STDCALL WsControl(uint32_t proto, uint32_t action, void *prequestinfo, uint32_t *pcbrequestinfolen, void *presponseinfo, uint32_t *pcbresponseinfolen)
WCHAR *STDCALL InetNtopW(int32_t family, void *paddr, WCHAR *pstringbuf, int32_t stringbufsize)
Convert an IPv4 or IPv6 Internet network address into a string in Internet standard format.
u_long STDCALL ntohl(u_long netlong)
Convert a u_long from TCP/IP network byte order to host byte order See the Windows Sockets 2 document...
struct _sockaddr_ipx sockaddr_ipx
BOOL STDCALL WS2Stop(void)
int32_t STDCALL WSAEnumNetworkEvents(SOCKET s, WSAEVENT heventobject, WSANETWORKEVENTS *lpnetworkevents)
Discover occurrences of network events for the indicated socket, clear internal network event records...
int32_t STDCALL getpeername(SOCKET s, SOCKADDR *name, int32_t *namelen)
Retrieve the address of the peer to which a socket is connected See the Windows Sockets 2 documentati...
void STDCALL FD_CLR(SOCKET socket, fd_set *fdset)
Remove a socket from an fd_set See the Windows Sockets 2 documentation for additional information.
int STDCALL getnameinfo(SOCKADDR *sa, int salen, char *host, uint32_t hostlen, char *serv, uint32_t servlen, int flags)
RFC 3493 protocol-independent name resolution from an address to a host name and a port number to a s...
SOCKET STDCALL socket(int32_t af, int32_t type, int32_t protocol)
Create a socket that is bound to a specific transport service provider See the Windows Sockets 2 docu...
struct _AFPROTOCOLS AFPROTOCOLS
int32_t STDCALL WSALookupServiceBeginW(WSAQUERYSETW *lpqsrestrictions, uint32_t dwcontrolflags, HANDLE *lphlookup)
BOOL STDCALL WS2Start(void)
int32_t STDCALL WSASetServiceA(WSAQUERYSETA *lpqsreginfo, WSAESETSERVICEOP essoperation, uint32_t dwcontrolflags)
struct _SOCKET_ADDRESS_LIST SOCKET_ADDRESS_LIST
int32_t STDCALL WSASendDisconnect(SOCKET s, WSABUF *lpoutbounddisconnectdata)
int32_t STDCALL WSARecvFrom(SOCKET s, WSABUF *lpbuffers, uint32_t dwbuffercount, uint32_t *lpnumberofbytesrecvd, uint32_t *lpflags, SOCKADDR *lpfrom, int32_t *lpfromlen, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Receive a datagram and store the source address See the Windows Sockets 2 documentation for additiona...
servent *STDCALL getservbyport(int32_t port, const char *proto)
Retrieve service information corresponding to a port and protocol.
HANDLE STDCALL WSAAsyncGetHostByName(HWND hwindow, u_int wmsg, const char *name, char *buf, int32_t buflen)
BOOL STDCALL WSACloseEvent(WSAEVENT hevent)
Close the handle to an event object and free resources associated with the event object See the Windo...
int32_t STDCALL WSAStringToAddressW(const WCHAR *addressstring, int32_t addressfamily, WSAPROTOCOL_INFOA *lpprotocolinfo, SOCKADDR *lpaddress, int32_t *lpaddresslength)
Convert a network address in its standard text presentation form into its numeric binary form in a so...
struct _CSADDR_INFO CSADDR_INFO
int32_t STDCALL send(SOCKET s, const char *buf, int32_t len, int32_t flags)
Send data on a connected socket See the Windows Sockets 2 documentation for additional information.
int32_t STDCALL connect(SOCKET s, SOCKADDR *name, int32_t namelen)
Establish a connection to a specified socket See the Windows Sockets 2 documentation for additional i...
hostent *STDCALL gethostbyname(const char *name)
Retrieve network address corresponding to a host name See the Windows Sockets 2 documentation for add...
BOOL STDCALL WSAConnectByNameA(SOCKET s, char *nodename, char *servicename, uint32_t *localaddresslength, SOCKADDR *localaddress, uint32_t *remoteaddresslength, SOCKADDR *remoteaddress, wstimeval *timeout, WSAOVERLAPPED *reserved)
int32_t STDCALL WSANtohl(SOCKET s, u_long netlong, uint32_t *lphostlong)
Convert a u_long from network byte order to host byte order See the Windows Sockets 2 documentation f...
int32_t STDCALL WSAProviderConfigChange(HANDLE *lpnotificationhandle, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
int32_t STDCALL WSALookupServiceNextW(HANDLE hlookup, uint32_t dwcontrolflags, uint32_t *lpdwbufferlength, WSAQUERYSETW *lpqsresults)
BOOL STDCALL __WSAFDIsSet(SOCKET s, fd_set *fdset)
Return a value indicating whether a socket is included in a set of socket descriptors See the Windows...
int32_t STDCALL WSARecv(SOCKET s, WSABUF *lpbuffers, uint32_t dwbuffercount, uint32_t *lpnumberofbytesrecvd, uint32_t *lpflags, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Receive data from a connected socket or a bound connectionless socket See the Windows Sockets 2 docum...
struct _WSAPROTOCOL_INFOA WSAPROTOCOL_INFOA
uint16_t STDCALL WSAGetAsyncBuflen(int32_t param)
BOOL STDCALL Winsock2RedirectOutput(SOCKET s)
Redirect standard output to the socket specified by s.
netent *STDCALL getnetbyaddr(void *addr, int len, int type)
Retrieve the network information corresponding to a network address.
struct _WSANSCLASSINFOW WSANSCLASSINFOW
int32_t STDCALL WSALookupServiceEnd(HANDLE hlookup)
int32_t STDCALL WSAStartup(uint16_t wversionrequired, WSADATA *wsdata)
Initiate use of Winsock 2 by an application See the Windows Sockets 2 documentation for additional in...
int32_t STDCALL getsockname(SOCKET s, SOCKADDR *name, int32_t *namelen)
Retrieve the local name for a socket See the Windows Sockets 2 documentation for additional informati...
int32_t STDCALL WSALookupServiceNextA(HANDLE hlookup, uint32_t dwcontrolflags, uint32_t *lpdwbufferlength, WSAQUERYSETA *lpqsresults)
BOOL STDCALL WSAIsBlocking(void)
struct _sockaddr_in6 sockaddr_in6
int32_t STDCALL WSAIoctl(SOCKET s, uint32_t dwiocontrolcode, void *lpvinbuffer, uint32_t cbinbuffer, void *lpvoutbuffer, uint32_t cboutbuffer, DWORD *lpcbbytesreturned, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Control the mode of a socket See the Windows Sockets 2 documentation for additional information.
#define WSASYS_STATUS_LEN
Definition winsock2.h:533
#define _SS_PAD1SIZE
Definition winsock2.h:290
HANDLE STDCALL WSAAsyncGetHostByAddr(HWND hwindow, u_int wmsg, const char *addr, int32_t len, int32_t family, char *buf, int32_t buflen)
int32_t STDCALL WSAInstallServiceClassW(WSASERVICECLASSINFOW *lpserviceclassinfo)
WSAEVENT STDCALL WSACreateEvent(void)
Create a manual reset event object with an initial state of unsignaled See the Windows Sockets 2 docu...
int32_t STDCALL WSAPoll(WSAPOLLFD *fdarray, ULONG fds, int32_t timeout)
Determine status of one or more sockets See the Windows Sockets 2 documentation for additional inform...
#define WSADESCRIPTION_LEN
Definition winsock2.h:532
HANDLE STDCALL WSAAsyncGetServByName(HWND hwindow, u_int wmsg, const char *name, const char *proto, char *buf, int32_t buflen)
struct _ADDRINFO ADDRINFO
Definition winsock2.h:1214
u_short STDCALL ntohs(u_short netshort)
Convert a u_short from TCP/IP network byte order to host byte order See the Windows Sockets 2 documen...
_WSAESETSERVICEOP
Definition winsock2.h:1143
@ RNRSERVICE_DEREGISTER
Definition winsock2.h:1145
@ RNRSERVICE_REGISTER
Definition winsock2.h:1144
@ RNRSERVICE_DELETE
Definition winsock2.h:1146
int32_t STDCALL WSAGetLastError(void)
Return the error status for the last Windows Sockets operation that failed See the Windows Sockets 2 ...
struct _WSAQUERYSETA WSAQUERYSETA
SOCKET STDCALL WSAJoinLeaf(SOCKET s, SOCKADDR *name, int32_t namelen, WSABUF *lpcallerdata, WSABUF *lpcalleedata, QOS *lpsqos, QOS *lpgqos, uint32_t dwflags)
u_short STDCALL htons(u_short hostshort)
Convert a u_short from host byte order to TCP/IP network byte order (which is big-endian) See the Win...
int32_t STDCALL WSAEnumProtocolsW(int32_t *lpiprotocols, WSAPROTOCOL_INFOW *lpprotocolbuffer, uint32_t *lpdwbufferlength)
netent *STDCALL getnetbyname(const char *name)
Retrieve network address corresponding to a network name.
SOCKET STDCALL WSAAccept(SOCKET s, SOCKADDR *addr, int32_t *addrlen, LPCONDITIONPROC lpfncondition, uintptr_t dwcallbackdata)
Conditionally accept a connection based on the return value of a condition function and allows the tr...
int32_t STDCALL WSAAddressToStringW(SOCKADDR *lpsaaddress, uint32_t dwaddresslength, WSAPROTOCOL_INFOW *lpprotocolinfo, WCHAR *lpszaddressstring, uint32_t *lpdwaddressstringlength)
Convert all components of a sockaddr structure into a human-readable string representation of the add...
u_long GROUP
Definition winsock2.h:973
uint32_t STDCALL htonf(float_t hostfloat)
Convert a float from host byte order to TCP/IP network byte order (which is big-endian) See the Windo...
float_t STDCALL ntohf(uint32_t netfloat)
Convert an unsigned int32 from TCP/IP network byte order to host byte order and return a float See th...
BOOL STDCALL Winsock2RedirectInput(SOCKET s)
Redirect standard input to the socket specified by s.
int32_t STDCALL select(int32_t nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, wstimeval *timeout)
Determine the status of one or more sockets, waiting if necessary, to perform synchronous I/O.
void STDCALL FD_SET(SOCKET socket, fd_set *fdset)
Add a socket to an fd_set See the Windows Sockets 2 documentation for additional information.
struct _WSAPOLLFD WSAPOLLFD
struct _sockaddr_storage sockaddr_storage
WSANAMESPACE_INFOA WSANAMESPACE_INFO
Definition winsock2.h:1206
struct _FLOWSPEC FLOWSPEC
int32_t STDCALL WSAAddressToStringA(SOCKADDR *lpsaaddress, uint32_t dwaddresslength, WSAPROTOCOL_INFOA *lpprotocolinfo, char *lpszaddressstring, uint32_t *lpdwaddressstringlength)
Convert all components of a sockaddr structure into a human-readable string representation of the add...
int32_t STDCALL WSAGetServiceClassInfoW(GUID *lpproviderid, GUID *lpserviceclassid, uint32_t *lpdwbufsize, WSASERVICECLASSINFOW *lpserviceclassinfo)
int STDCALL WsControlEx(uint32_t proto, uint32_t action, void *prequestinfo, uint32_t *pcbrequestinfolen, void *presponseinfo, uint32_t *pcbresponseinfolen)
OVERLAPPED WSAOVERLAPPED
Definition winsock2.h:937
BOOL STDCALL WSAConnectByNameW(SOCKET s, WCHAR *nodename, WCHAR *servicename, uint32_t *localaddresslength, SOCKADDR *localaddress, uint32_t *remoteaddresslength, SOCKADDR *remoteaddress, wstimeval *timeout, WSAOVERLAPPED *reserved)
int32_t STDCALL WSASendMsg(SOCKET s, WSAMSG *lpmsg, uint32_t dwflags, uint32_t *lpnumberofbytessent, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
Send data and optional control information from connected and unconnected sockets.
BOOL STDCALL WSAGetQosByName(SOCKET s, WSABUF *lpqosname, QOS *lpqos)
uint16_t STDCALL WSAGetSelectEvent(int32_t param)
int32_t STDCALL InetPtonA(int32_t family, const char *pszaddrstring, void *paddrbuf)
Convert an IPv4 or IPv6 Internet network address in its standard text presentation form into its nume...
struct _WSAQUERYSETW WSAQUERYSETW
int32_t STDCALL WSAMakeSelectReply(uint16_t event, uint16_t error)
SOCKET STDCALL socket(int af, int type, int protocol)
Create a socket that is bound to a specific transport service provider See the Windows Sockets docume...
char MBChar
Definition winsock.h:522
struct _sockaddr_in sockaddr_in
#define FD_SETSIZE
Definition winsock.h:59
struct _sockproto sockproto
unsigned long u_long
Definition winsock.h:520
unsigned short u_short
Definition winsock.h:518
unsigned int u_int
Definition winsock.h:519
struct _wstimeval wstimeval
unsigned char u_char
Definition winsock.h:517
struct _sockaddr sockaddr
struct _protoent protoent
sockaddr SOCKADDR
Definition winsock.h:614