Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
winsock2.h File Reference

Go to the source code of this file.

Data Structures

struct  _fd_set
struct  _wstimeval
struct  _hostent
struct  _netent
struct  _servent
struct  _protoent
struct  _in_addr
struct  _in6_addr
struct  _ipx_addr
struct  _sockaddr_in
struct  _sockaddr_in6
struct  _sockaddr_ipx
struct  _sockaddr
struct  _sockproto
struct  _sockaddr_storage
struct  _linger
struct  _WSADATA
struct  _BLOB
struct  _WSABUF
struct  _FLOWSPEC
struct  _QOS
struct  _WSANETWORKEVENTS
struct  _WSAPROTOCOLCHAIN
struct  _WSAPROTOCOL_INFOA
struct  _WSAPROTOCOL_INFOW
struct  _SOCKET_ADDRESS
struct  _CSADDR_INFO
struct  _SOCKET_ADDRESS_LIST
struct  _AFPROTOCOLS
struct  _WSAVERSION
struct  _WSAQUERYSETA
struct  _WSAQUERYSETW
struct  _WSAMSG
struct  _WSAPOLLFD
struct  _WSANSCLASSINFOA
struct  _WSANSCLASSINFOW
struct  _WSASERVICECLASSINFOA
struct  _WSASERVICECLASSINFOW
struct  _WSANAMESPACE_INFOA
struct  _WSANAMESPACE_INFOW
struct  _ADDRINFO

Macros

#define _ULTIBO_WINSOCK_H
 Prevent inclusion of winsock.h.
#define _WINSOCK2API_
#define _WINSOCKAPI_
#define WINSOCK_VERSION   0x0202
#define FD_SETSIZE   64
#define IOCPARM_MASK   0x7f
#define IOC_VOID   0x20000000
#define IOC_OUT   0x40000000
#define IOC_IN   0x80000000
#define IOC_INOUT   (IOC_IN | IOC_OUT)
#define _IO(x, y)
#define _IOR(x, y, t)
#define _IOW(x, y, t)
#define FIONREAD   _IOR('f', 127, u_long)
 get # bytes to read *‍/
#define FIONBIO   _IOW('f', 126, u_long)
 set/clear non-blocking i/o *‍/
#define FIOASYNC   _IOW('f', 125, u_long)
 set/clear async i/o *‍/
#define SIOCSHIWAT   _IOW('s', 0, u_long)
 set high watermark
#define SIOCGHIWAT   _IOR('s', 1, u_long)
 get high watermark
#define SIOCSLOWAT   _IOW('s', 2, u_long)
 set low watermark
#define SIOCGLOWAT   _IOR('s', 3, u_long)
 get low watermark
#define SIOCATMARK   _IOR('s', 7, u_long)
 at oob mark?
#define IPPROTO_IP   0
 dummy for IP
#define IPPROTO_ICMP   1
 control message protocol
#define IPPROTO_IGMP   2
 group management protocol
#define IPPROTO_GGP   3
 gateway^2 (deprecated)
#define IPPROTO_TCP   6
 tcp
#define IPPROTO_EGP   8
 egp
#define IPPROTO_PUP   12
 pup
#define IPPROTO_UDP   17
 user datagram protocol
#define IPPROTO_HMP   20
 hmp
#define IPPROTO_IDP   22
 xns idp
#define IPPROTO_RDP   27
 rdp
#define IPPROTO_IPV6   41
 IP6 header.
#define IPPROTO_ROUTING   43
 IP6 routing header.
#define IPPROTO_FRAGMENT   44
 IP6 fragmentation header.
#define IPPROTO_ICMPV6   58
 ICMP6.
#define IPPROTO_RVD   66
 rvd
#define IPPROTO_ND   77
 UNOFFICIAL net disk proto.
#define IPPROTO_RAW   255
 raw IP packet
#define IPPROTO_MAX   256
#define NSPROTO_IPX   1000
 ipx protocol
#define NSPROTO_SPX   1256
 spx protocol
#define NSPROTO_SPXII   1257
 spxii protocol
#define IPPORT_ANY   0
#define IPPORT_ECHO   7
#define IPPORT_DISCARD   9
#define IPPORT_SYSTAT   11
#define IPPORT_DAYTIME   13
#define IPPORT_NETSTAT   15
#define IPPORT_FTP   21
#define IPPORT_TELNET   23
#define IPPORT_SMTP   25
#define IPPORT_TIMESERVER   37
#define IPPORT_NAMESERVER   42
#define IPPORT_WHOIS   43
#define IPPORT_DNS   53
#define IPPORT_MTP   57
#define IPPORT_BOOTPS   67
#define IPPORT_BOOTPC   68
#define IPPORT_TFTP   69
#define IPPORT_RJE   77
#define IPPORT_FINGER   79
#define IPPORT_TTYLINK   87
#define IPPORT_SUPDUP   95
#define IPPORT_EXECSERVER   512
#define IPPORT_LOGINSERVER   513
#define IPPORT_CMDSERVER   514
#define IPPORT_EFSSERVER   520
#define IPPORT_BIFFUDP   512
#define IPPORT_WHOSERVER   513
#define IPPORT_ROUTESERVER   520
#define IPPORT_RESERVED   1024
#define IMPLINK_IP   155
#define IMPLINK_LOWEXPER   156
#define IMPLINK_HIGHEXPER   158
#define TF_DISCONNECT   0x01
#define TF_REUSE_SOCKET   0x02
#define TF_WRITE_BEHIND   0x04
#define IP_OPTIONS   1
#define IP_MULTICAST_IF   2
 set/get IP multicast interface
#define IP_MULTICAST_TTL   3
 set/get IP multicast timetolive
#define IP_MULTICAST_LOOP   4
 set/get IP multicast loopback
#define IP_ADD_MEMBERSHIP   5
 add an IP group membership
#define IP_DROP_MEMBERSHIP   6
 drop an IP group membership
#define IP_TTL   7
 set/get IP Time To Live
#define IP_TOS   8
 set/get IP Type Of Service
#define IP_DONTFRAGMENT   9
 set/get IP Don't Fragment flag
#define IP_HDRINCL   10
 set/get IP Header include
#define IP_DEFAULT_MULTICAST_TTL   1
 normally limit m'casts to 1 hop
#define IP_DEFAULT_MULTICAST_LOOP   1
 normally hear sends if a member
#define IP_MAX_MEMBERSHIPS   20
 per socket; must fit in one mbuf
#define INVALID_SOCKET   (SOCKET)(~0)
#define SOCKET_ERROR   -1
#define SOCK_UNSPEC   0
 unspecified
#define SOCK_STREAM   1
 stream socket
#define SOCK_DGRAM   2
 datagram socket
#define SOCK_RAW   3
 raw-protocol interface
#define SOCK_RDM   4
 reliably-delivered message
#define SOCK_SEQPACKET   5
 sequenced packet stream
#define SOCK_PACKET   10
 linux specific way of
#define SO_DEBUG   0x0001
 turn on debugging info recording
#define SO_ACCEPTCONN   0x0002
 socket has had listen()
#define SO_REUSEADDR   0x0004
 allow local address reuse
#define SO_KEEPALIVE   0x0008
 keep connections alive
#define SO_DONTROUTE   0x0010
 just use interface addresses
#define SO_BROADCAST   0x0020
 permit sending of broadcast msgs
#define SO_USELOOPBACK   0x0040
 bypass hardware when possible
#define SO_LINGER   0x0080
 linger on close if data present
#define SO_OOBINLINE   0x0100
 leave received OOB data in line
#define SO_DONTLINGER   0xff7f
#define SO_SNDBUF   0x1001
 send buffer size
#define SO_RCVBUF   0x1002
 receive buffer size
#define SO_SNDLOWAT   0x1003
 send low-water mark
#define SO_RCVLOWAT   0x1004
 receive low-water mark
#define SO_SNDTIMEO   0x1005
 send timeout
#define SO_RCVTIMEO   0x1006
 receive timeout
#define SO_ERROR   0x1007
 get error status and clear
#define SO_TYPE   0x1008
 get socket type
#define SO_CONNTIMEO   0x1009
 connection timeout
#define SO_CONNDATA   0x7000
#define SO_CONNOPT   0x7001
#define SO_DISCDATA   0x7002
#define SO_DISCOPT   0x7003
#define SO_CONNDATALEN   0x7004
#define SO_CONNOPTLEN   0x7005
#define SO_DISCDATALEN   0x7006
#define SO_DISCOPTLEN   0x7007
#define SO_OPENTYPE   0x7008
#define SO_SYNCHRONOUS_ALERT   0x10
#define SO_SYNCHRONOUS_NONALERT   0x20
#define SO_MAXDG   0x7009
#define SO_MAXPATHDG   0x700A
#define SO_UPDATE_ACCEPT_CONTEXT   0x700B
#define SO_CONNECT_TIME   0x700C
#define TCP_NODELAY   0x0001
#define TCP_MAXSEG   0x0002
#define TCP_NOPUSH   0x0004
#define TCP_NOOPT   0x0008
#define TCP_BSDURGENT   0x7000
 Implement BSD Urgent instead of RFC793/1122.
#define TCP_WSCALE   0x0010
#define TCP_NOSACK   0x0020
#define UDP_NOCHECKSUM   0x0001
#define AF_UNSPEC   0
 unspecified
#define AF_UNIX   1
 local to host (pipes, portals)
#define AF_INET   2
 internetwork: UDP, TCP, etc.
#define AF_IMPLINK   3
 arpanet imp addresses
#define AF_PUP   4
 pup protocols: e.g. BSP
#define AF_CHAOS   5
 mit CHAOS protocols
#define AF_IPX   6
 IPX and SPX.
#define AF_NS   6
 XEROX NS protocols.
#define AF_ISO   7
 ISO protocols.
#define AF_OSI   AF_ISO
 OSI is ISO.
#define AF_ECMA   8
 european computer manufacturers
#define AF_DATAKIT   9
 datakit protocols
#define AF_CCITT   10
 CCITT protocols, X.25 etc.
#define AF_SNA   11
 IBM SNA.
#define AF_DECnet   12
 DECnet.
#define AF_DLI   13
 Direct data link interface.
#define AF_LAT   14
 LAT.
#define AF_HYLINK   15
 NSC Hyperchannel.
#define AF_APPLETALK   16
 AppleTalk.
#define AF_NETBIOS   17
 NetBios-style addresses.
#define AF_VOICEVIEW   18
 VoiceView.
#define AF_FIREFOX   19
 FireFox.
#define AF_UNKNOWN1   20
 Somebody is using this!
#define AF_BAN   21
 Banyan.
#define AF_ATM   22
 Native ATM Services.
#define AF_INET6   23
 Internetwork Version 6.
#define AF_CLUSTER   24
 Microsoft Wolfpack.
#define AF_12844   25
 IEEE 1284.4 WG AF.
#define AF_IRDA   26
 IrDA.
#define AF_NETDES   28
 Network Designers OSI & gateway enabled.
#define AF_MAX   29
#define _SS_MAXSIZE   128
 Maximum size.
#define _SS_ALIGNSIZE   (sizeof(__int64_t))
 Desired alignment.
#define _SS_PAD1SIZE   (_SS_ALIGNSIZE - sizeof(unsigned short))
#define _SS_PAD2SIZE   (_SS_MAXSIZE - (sizeof(unsigned short) + _SS_PAD1SIZE + _SS_ALIGNSIZE))
#define PF_UNSPEC   AF_UNSPEC
#define PF_UNIX   AF_UNIX
#define PF_INET   AF_INET
#define PF_IMPLINK   AF_IMPLINK
#define PF_PUP   AF_PUP
#define PF_CHAOS   AF_CHAOS
#define PF_NS   AF_NS
#define PF_IPX   AF_IPX
#define PF_ISO   AF_ISO
#define PF_OSI   AF_OSI
#define PF_ECMA   AF_ECMA
#define PF_DATAKIT   AF_DATAKIT
#define PF_CCITT   AF_CCITT
#define PF_SNA   AF_SNA
#define PF_DECnet   AF_DECnet
#define PF_DLI   AF_DLI
#define PF_LAT   AF_LAT
#define PF_HYLINK   AF_HYLINK
#define PF_APPLETALK   AF_APPLETALK
#define PF_VOICEVIEW   AF_VOICEVIEW
#define PF_FIREFOX   AF_FIREFOX
#define PF_UNKNOWN1   AF_UNKNOWN1
#define PF_BAN   AF_BAN
#define PF_ATM   AF_ATM
#define PF_INET6   AF_INET6
#define PF_CLUSTER   AF_CLUSTER
#define PF_12844   AF_12844
#define PF_IRDA   AF_IRDA
#define PF_NETDES   AF_NETDES
#define PF_MAX   AF_MAX
#define SOL_SOCKET   0xffff
 options for socket level
#define SOMAXCONN   0x7fffffff
#define MSG_OOB   0x1
 process out-of-band data
#define MSG_PEEK   0x2
 peek at incoming message
#define MSG_DONTROUTE   0x4
 send without using routing tables
#define MSG_WAITALL   0x8;
 do not complete until packet is completely filled
#define MSG_INTERRUPT   0x10
 send/recv in the interrupt context
#define MSG_MAXIOVLEN   16
#define MSG_PARTIAL   0x8000
 partial send or recv for message xport
#define MAXGETHOSTSTRUCT   1024
#define FD_READ_BIT   0
#define FD_READ   (1 << FD_READ_BIT)
#define FD_WRITE_BIT   1
#define FD_WRITE   (1 << FD_WRITE_BIT)
#define FD_OOB_BIT   2
#define FD_OOB   (1 << FD_OOB_BIT)
#define FD_ACCEPT_BIT   3
#define FD_ACCEPT   (1 << FD_ACCEPT_BIT)
#define FD_CONNECT_BIT   4
#define FD_CONNECT   (1 << FD_CONNECT_BIT)
#define FD_CLOSE_BIT   5
#define FD_CLOSE   (1 << FD_CLOSE_BIT)
#define FD_QOS_BIT   6
#define FD_QOS   (1 << FD_QOS_BIT)
#define FD_GROUP_QOS_BIT   7
#define FD_GROUP_QOS   (1 << FD_GROUP_QOS_BIT)
#define FD_MAX_EVENTS   8
#define FD_ALL_EVENTS   ((1 << FD_MAX_EVENTS) - 1)
#define WSABASEERR   10000
#define WSAEINTR   (WSABASEERR+4)
#define WSAEBADF   (WSABASEERR+9)
#define WSAEACCES   (WSABASEERR+13)
#define WSAEFAULT   (WSABASEERR+14)
#define WSAEINVAL   (WSABASEERR+22)
#define WSAEMFILE   (WSABASEERR+24)
#define WSAEWOULDBLOCK   (WSABASEERR+35)
#define WSAEINPROGRESS   (WSABASEERR+36)
#define WSAEALREADY   (WSABASEERR+37)
#define WSAENOTSOCK   (WSABASEERR+38)
#define WSAEDESTADDRREQ   (WSABASEERR+39)
#define WSAEMSGSIZE   (WSABASEERR+40)
#define WSAEPROTOTYPE   (WSABASEERR+41)
#define WSAENOPROTOOPT   (WSABASEERR+42)
#define WSAEPROTONOSUPPORT   (WSABASEERR+43)
#define WSAESOCKTNOSUPPORT   (WSABASEERR+44)
#define WSAEOPNOTSUPP   (WSABASEERR+45)
#define WSAEPFNOSUPPORT   (WSABASEERR+46)
#define WSAEAFNOSUPPORT   (WSABASEERR+47)
#define WSAEADDRINUSE   (WSABASEERR+48)
#define WSAEADDRNOTAVAIL   (WSABASEERR+49)
#define WSAENETDOWN   (WSABASEERR+50)
#define WSAENETUNREACH   (WSABASEERR+51)
#define WSAENETRESET   (WSABASEERR+52)
#define WSAECONNABORTED   (WSABASEERR+53)
#define WSAECONNRESET   (WSABASEERR+54)
#define WSAENOBUFS   (WSABASEERR+55)
#define WSAEISCONN   (WSABASEERR+56)
#define WSAENOTCONN   (WSABASEERR+57)
#define WSAESHUTDOWN   (WSABASEERR+58)
#define WSAETOOMANYREFS   (WSABASEERR+59)
#define WSAETIMEDOUT   (WSABASEERR+60)
#define WSAECONNREFUSED   (WSABASEERR+61)
#define WSAELOOP   (WSABASEERR+62)
#define WSAENAMETOOLONG   (WSABASEERR+63)
#define WSAEHOSTDOWN   (WSABASEERR+64)
#define WSAEHOSTUNREACH   (WSABASEERR+65)
#define WSAENOTEMPTY   (WSABASEERR+66)
#define WSAEPROCLIM   (WSABASEERR+67)
#define WSAEUSERS   (WSABASEERR+68)
#define WSAEDQUOT   (WSABASEERR+69)
#define WSAESTALE   (WSABASEERR+70)
#define WSAEREMOTE   (WSABASEERR+71)
#define WSAEDISCON   (WSABASEERR+101)
#define WSASYSNOTREADY   (WSABASEERR+91)
#define WSAVERNOTSUPPORTED   (WSABASEERR+92)
#define WSANOTINITIALISED   (WSABASEERR+93)
#define WSAENOMORE   (WSABASEERR+102)
#define WSAECANCELLED   (WSABASEERR+103)
#define WSAEINVALIDPROCTABLE   (WSABASEERR+104)
#define WSAEINVALIDPROVIDER   (WSABASEERR+105)
#define WSAEPROVIDERFAILEDINIT   (WSABASEERR+106)
#define WSASYSCALLFAILURE   (WSABASEERR+107)
#define WSASERVICE_NOT_FOUND   (WSABASEERR+108)
#define WSATYPE_NOT_FOUND   (WSABASEERR+109)
#define WSA_E_NO_MORE   (WSABASEERR+110)
#define WSA_E_CANCELLED   (WSABASEERR+111)
#define WSAEREFUSED   (WSABASEERR+112)
#define WSAHOST_NOT_FOUND   (WSABASEERR+1001)
#define HOST_NOT_FOUND   WSAHOST_NOT_FOUND
#define WSATRY_AGAIN   (WSABASEERR+1002)
#define TRY_AGAIN   WSATRY_AGAIN
#define WSANO_RECOVERY   (WSABASEERR+1003)
#define NO_RECOVERY   WSANO_RECOVERY
#define WSANO_DATA   (WSABASEERR+1004)
#define NO_DATA   WSANO_DATA
#define WSANO_ADDRESS   WSANO_DATA
#define NO_ADDRESS   WSANO_ADDRESS
#define WSA_IO_PENDING   ERROR_IO_PENDING
#define WSA_IO_INCOMPLETE   ERROR_IO_INCOMPLETE
#define WSA_INVALID_HANDLE   ERROR_INVALID_HANDLE
#define WSA_INVALID_PARAMETER   ERROR_INVALID_PARAMETER
#define WSA_NOT_ENOUGH_MEMORY   ERROR_NOT_ENOUGH_MEMORY
#define WSA_OPERATION_ABORTED   ERROR_OPERATION_ABORTED
#define WSA_INVALID_EVENT   (WSAEVENT)NULL
#define WSA_MAXIMUM_WAIT_EVENTS   MAXIMUM_WAIT_OBJECTS
#define WSA_WAIT_FAILED   0xffffffff
#define WSA_WAIT_EVENT_0   WAIT_OBJECT_0
#define WSA_WAIT_IO_COMPLETION   WAIT_IO_COMPLETION
#define WSA_WAIT_TIMEOUT   WAIT_TIMEOUT
#define WSA_INFINITE   INFINITE
#define EWOULDBLOCK   WSAEWOULDBLOCK
#define EINPROGRESS   WSAEINPROGRESS
#define EALREADY   WSAEALREADY
#define ENOTSOCK   WSAENOTSOCK
#define EDESTADDRREQ   WSAEDESTADDRREQ
#define EMSGSIZE   WSAEMSGSIZE
#define EPROTOTYPE   WSAEPROTOTYPE
#define ENOPROTOOPT   WSAENOPROTOOPT
#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT   WSAESOCKTNOSUPPORT
#define EOPNOTSUPP   WSAEOPNOTSUPP
#define EPFNOSUPPORT   WSAEPFNOSUPPORT
#define EAFNOSUPPORT   WSAEAFNOSUPPORT
#define EADDRINUSE   WSAEADDRINUSE
#define EADDRNOTAVAIL   WSAEADDRNOTAVAIL
#define ENETDOWN   WSAENETDOWN
#define ENETUNREACH   WSAENETUNREACH
#define ENETRESET   WSAENETRESET
#define ECONNABORTED   WSAECONNABORTED
#define ECONNRESET   WSAECONNRESET
#define ENOBUFS   WSAENOBUFS
#define EISCONN   WSAEISCONN
#define ENOTCONN   WSAENOTCONN
#define ESHUTDOWN   WSAESHUTDOWN
#define ETOOMANYREFS   WSAETOOMANYREFS
#define ETIMEDOUT   WSAETIMEDOUT
#define ECONNREFUSED   WSAECONNREFUSED
#define ELOOP   WSAELOOP
#define ENAMETOOLONG   WSAENAMETOOLONG
#define EHOSTDOWN   WSAEHOSTDOWN
#define EHOSTUNREACH   WSAEHOSTUNREACH
#define ENOTEMPTY   WSAENOTEMPTY
#define EPROCLIM   WSAEPROCLIM
#define EUSERS   WSAEUSERS
#define EDQUOT   WSAEDQUOT
#define ESTALE   WSAESTALE
#define EREMOTE   WSAEREMOTE
#define ENOTREADY   WSASYSNOTREADY
#define EVERNOTSUPPORTED   WSAVERNOTSUPPORTED
#define ENOTINITIALISED   WSANOTINITIALISED
#define WSADESCRIPTION_LEN   256
#define WSASYS_STATUS_LEN   128
#define MAX_PROTOCOL_CHAIN   7
#define BASE_PROTOCOL   1
#define LAYERED_PROTOCOL   0
#define WSAPROTOCOL_LEN   255
#define SERVICETYPE_NOTRAFFIC   0x00000000
 No data in this direction.
#define SERVICETYPE_BESTEFFORT   0x00000001
 Best Effort.
#define SERVICETYPE_CONTROLLEDLOAD   0x00000002
 Controlled Load.
#define SERVICETYPE_GUARANTEED   0x00000003
 Guaranteed.
#define SERVICETYPE_NETWORK_UNAVAILABLE   0x00000004
 Used to notify change to user.
#define SERVICETYPE_GENERAL_INFORMATION   0x00000005
 corresponds to "General Parameters" defined by IntServ
#define SERVICETYPE_NOCHANGE   0x00000006
 used to indicate that the flow spec contains no change from any previous one
#define SERVICE_IMMEDIATE_TRAFFIC_CONTROL   0x80000000
 to turn on immediate traffic control, OR this flag with the ServiceType field in teh FLOWSPEC
#define CF_ACCEPT   0x0000
#define CF_REJECT   0x0001
#define CF_DEFER   0x0002
#define SD_RECEIVE   0x00
#define SD_SEND   0x01
#define SD_BOTH   0x02
#define SG_UNCONSTRAINED_GROUP   0x01
#define SG_CONSTRAINED_GROUP   0x02
#define PFL_MULTIPLE_PROTO_ENTRIES   0x00000001
#define PFL_RECOMMENDED_PROTO_ENTRY   0x00000002
#define PFL_HIDDEN   0x00000004
#define PFL_MATCHES_PROTOCOL_ZERO   0x00000008
#define XP1_CONNECTIONLESS   0x00000001
#define XP1_GUARANTEED_DELIVERY   0x00000002
#define XP1_GUARANTEED_ORDER   0x00000004
#define XP1_MESSAGE_ORIENTED   0x00000008
#define XP1_PSEUDO_STREAM   0x00000010
#define XP1_GRACEFUL_CLOSE   0x00000020
#define XP1_EXPEDITED_DATA   0x00000040
#define XP1_CONNECT_DATA   0x00000080
#define XP1_DISCONNECT_DATA   0x00000100
#define XP1_SUPPORT_BROADCAST   0x00000200
#define XP1_SUPPORT_MULTIPOINT   0x00000400
#define XP1_MULTIPOINT_CONTROL_PLANE   0x00000800
#define XP1_MULTIPOINT_DATA_PLANE   0x00001000
#define XP1_QOS_SUPPORTED   0x00002000
#define XP1_INTERRUPT   0x00004000
#define XP1_UNI_SEND   0x00008000
#define XP1_UNI_RECV   0x00010000
#define XP1_IFS_HANDLES   0x00020000
#define XP1_PARTIAL_MESSAGE   0x00040000
#define BIGENDIAN   0x0000
#define LITTLEENDIAN   0x0001
#define SECURITY_PROTOCOL_NONE   0x0000
#define JL_SENDER_ONLY   0x01
#define JL_RECEIVER_ONLY   0x02
#define JL_BOTH   0x04
#define WSA_FLAG_OVERLAPPED   0x01
#define WSA_FLAG_MULTIPOINT_C_ROOT   0x02
#define WSA_FLAG_MULTIPOINT_C_LEAF   0x04
#define WSA_FLAG_MULTIPOINT_D_ROOT   0x08
#define WSA_FLAG_MULTIPOINT_D_LEAF   0x10
#define IOC_UNIX   0x00000000
#define IOC_WS2   0x08000000
#define IOC_PROTOCOL   0x10000000
#define IOC_VENDOR   0x18000000
#define SIO_ASSOCIATE_HANDLE   IOC_IN | IOC_WS2 | 1
#define SIO_ENABLE_CIRCULAR_QUEUEING   IOC_WS2 | 2
#define SIO_FIND_ROUTE   IOC_OUT | IOC_WS2 | 3
#define SIO_FLUSH   IOC_WS2 | 4
#define SIO_GET_BROADCAST_ADDRESS   IOC_OUT | IOC_WS2 | 5
#define SIO_GET_EXTENSION_FUNCTION_POINTER   IOC_INOUT | IOC_WS2 | 6
#define SIO_GET_QOS   IOC_INOUT | IOC_WS2 | 7
#define SIO_GET_GROUP_QOS   IOC_INOUT | IOC_WS2 | 8
#define SIO_MULTIPOINT_LOOPBACK   IOC_IN | IOC_WS2 | 9
#define SIO_MULTICAST_SCOPE   IOC_IN | IOC_WS2 | 10
#define SIO_SET_QOS   IOC_IN | IOC_WS2 | 11
#define SIO_SET_GROUP_QOS   IOC_IN | IOC_WS2 | 12
#define SIO_TRANSLATE_HANDLE   IOC_INOUT | IOC_WS2 | 13
#define TH_NETDEV   0x00000001
#define TH_TAPI   0x00000002
#define SERVICE_MULTIPLE   0x00000001
#define NS_ALL   (0)
#define NS_SAP   (1)
#define NS_NDS   (2)
#define NS_PEER_BROWSE   (3)
#define NS_TCPIP_LOCAL   (10)
#define NS_TCPIP_HOSTS   (11)
#define NS_DNS   (12)
#define NS_NETBT   (13)
#define NS_WINS   (14)
#define NS_NBP   (20)
#define NS_MS   (30)
#define NS_STDA   (31)
#define NS_NTDS   (32)
#define NS_X500   (40)
#define NS_NIS   (41)
#define NS_NISPLUS   (42)
#define NS_WRQ   (50)
#define RES_UNUSED_1   0x00000001
#define RES_FLUSH_CACHE   0x00000002
#define RES_SERVICE   0x00000004
#define SERVICE_TYPE_VALUE_IPXPORTA   "IpxSocket"
#define SERVICE_TYPE_VALUE_IPXPORTW   L"IpxSocket"
#define SERVICE_TYPE_VALUE_SAPIDA   "SapId"
#define SERVICE_TYPE_VALUE_SAPIDW   L"SapId"
#define SERVICE_TYPE_VALUE_TCPPORTA   "TcpPort"
#define SERVICE_TYPE_VALUE_TCPPORTW   L"TcpPort"
#define SERVICE_TYPE_VALUE_UDPPORTA   "UdpPort"
#define SERVICE_TYPE_VALUE_UDPPORTW   L"UdpPort"
#define SERVICE_TYPE_VALUE_OBJECTIDA   "ObjectId"
#define SERVICE_TYPE_VALUE_OBJECTIDW   L"ObjectId"
#define SERVICE_TYPE_VALUE_SAPID   SERVICE_TYPE_VALUE_SAPIDA
#define SERVICE_TYPE_VALUE_TCPPORT   SERVICE_TYPE_VALUE_TCPPORTA
#define SERVICE_TYPE_VALUE_UDPPORT   SERVICE_TYPE_VALUE_UDPPORTA
#define SERVICE_TYPE_VALUE_OBJECTID   SERVICE_TYPE_VALUE_OBJECTIDA
#define LUP_DEEP   0x0001
#define LUP_CONTAINERS   0x0002
#define LUP_NOCONTAINERS   0x0004
#define LUP_NEAREST   0x0008
#define LUP_RETURN_NAME   0x0010
#define LUP_RETURN_TYPE   0x0020
#define LUP_RETURN_VERSION   0x0040
#define LUP_RETURN_COMMENT   0x0080
#define LUP_RETURN_ADDR   0x0100
#define LUP_RETURN_BLOB   0x0200
#define LUP_RETURN_ALIASES   0x0400
#define LUP_RETURN_QUERY_STRING   0x0800
#define LUP_RETURN_ALL   0x0FF0
#define LUP_RES_SERVICE   0x8000
#define LUP_FLUSHCACHE   0x1000
#define LUP_FLUSHPREVIOUS   0x2000
#define RESULT_IS_ALIAS   0x0001
#define MSG_TRUNC   0x0100
#define MSG_CTRUNC   0x0200
#define MSG_BCAST   0x0400
#define MSG_MCAST   0x0800
#define POLLRDNORM   0x0100
#define POLLRDBAND   0x0200
#define POLLIN   (POLLRDNORM | POLLRDBAND)
#define POLLPRI   0x0400
#define POLLWRNORM   0x0010
#define POLLOUT   (POLLWRNORM)
#define POLLWRBAND   0x0020
#define POLLERR   0x0001
#define POLLHUP   0x0002
#define POLLNVAL   0x0004
#define EAI_AGAIN   WSATRY_AGAIN
#define EAI_BADFLAGS   WSAEINVAL
#define EAI_FAIL   WSANO_RECOVERY
#define EAI_FAMILY   WSAEAFNOSUPPORT
#define EAI_MEMORY   WSA_NOT_ENOUGH_MEMORY
#define EAI_NONAME   WSAHOST_NOT_FOUND
#define EAI_SERVICE   WSATYPE_NOT_FOUND
#define EAI_SOCKTYPE   WSAESOCKTNOSUPPORT
#define EAI_NODATA   EAI_NONAME
#define AI_PASSIVE   0x00000001
 Socket address will be used in bind() call.
#define AI_CANONNAME   0x00000002
 Return canonical name from DNS in the first ai_canonname (Cannot be used with AI_FQDN).
#define AI_NUMERICHOST   0x00000004
 Nodename must be a numeric address string.
#define AI_NUMERICSERV   0x00000008
 Servicename must be a numeric port string.
#define AI_ALL   0x00000100
 Return both IPv6 and IPv4 addresses.
#define AI_ADDRCONFIG   0x00000400
 Only return addresses if a global address is configured (IPv4 or IPv6), loopback addresses do not count as global.
#define AI_V4MAPPED   0x00000800
 Map returned IPv4 addresses to IPv6 address format.
#define AI_NON_AUTHORITATIVE   0x00004000
 Allow both autoritive and non authoritive return addresses (NS_EMAIL only).
#define AI_SECURE   0x00008000
 Obtain result using enhanced security only (NS_EMAIL only).
#define AI_RETURN_PREFERRED_NAMES   0x00010000
 Return preferred names (NS_EMAIL only).
#define AI_FQDN   0x00020000
 Return the FQDN for the single name specified on NodeName (Cannot be used with AI_CANONNAME).
#define AI_FILESERVER   0x00040000
 The requested name is being used for file sharing (Hint Only).
#define NI_NOFQDN   0x01
 Only return nodename portion for local hosts.
#define NI_NUMERICHOST   0x02
 Return numeric form of the host's address.
#define NI_NAMEREQD   0x04
 Error if the host's name not in DNS.
#define NI_NUMERICSERV   0x08
 Return numeric form of the service (port #).
#define NI_DGRAM   0x10
 Service is a datagram service.
#define NI_MAXHOST   1025
 Max size of a fully-qualified domain name.
#define NI_MAXSERV   32
 Max size of a service name.
#define INET_ADDRSTR_ANY   "0.0.0.0"
#define INET6_ADDRSTR_ANY   "::"
#define INET_ADDRSTR_BROADCAST   "255.255.255.255"
#define INET_ADDRSTRLEN   16
 Max size of numeric form of IPv4 address.
#define INET6_ADDRSTRLEN   46
 Max size of numeric form of IPv6 address.
#define IN6ADDR_ANY_INIT   {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
#define IN6ADDR_LOOPBACK_INIT   {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
#define s_addr   S_un.S_addr

Typedefs

typedef struct _fd_set fd_set
typedef struct _wstimeval wstimeval
typedef struct _hostent hostent
typedef struct _netent netent
typedef struct _servent servent
typedef struct _protoent protoent
typedef struct _in_addr in_addr
typedef struct _in6_addr in6_addr
typedef struct _ipx_addr ipx_addr
typedef struct _sockaddr_in sockaddr_in
typedef struct _sockaddr_in6 sockaddr_in6
typedef struct _sockaddr_ipx sockaddr_ipx
typedef struct _sockaddr sockaddr
typedef struct _sockproto sockproto
typedef struct _sockaddr_storage sockaddr_storage
typedef struct _linger linger
typedef struct _WSADATA WSADATA
typedef OVERLAPPED WSAOVERLAPPED
typedef struct _BLOB BLOB
typedef struct _WSABUF WSABUF
typedef int32_t SERVICETYPE
typedef struct _FLOWSPEC FLOWSPEC
typedef struct _QOS QOS
typedef u_long GROUP
typedef struct _WSANETWORKEVENTS WSANETWORKEVENTS
typedef struct _WSAPROTOCOLCHAIN WSAPROTOCOLCHAIN
typedef struct _WSAPROTOCOL_INFOA WSAPROTOCOL_INFOA
typedef struct _WSAPROTOCOL_INFOW WSAPROTOCOL_INFOW
typedef struct _SOCKET_ADDRESS SOCKET_ADDRESS
typedef struct _CSADDR_INFO CSADDR_INFO
typedef struct _SOCKET_ADDRESS_LIST SOCKET_ADDRESS_LIST
typedef struct _AFPROTOCOLS AFPROTOCOLS
typedef enum _WSAECOMPARATOR WSAECOMPARATOR
typedef struct _WSAVERSION WSAVERSION
typedef struct _WSAQUERYSETA WSAQUERYSETA
typedef struct _WSAQUERYSETW WSAQUERYSETW
typedef WSAQUERYSETA WSAQUERYSET
typedef struct _WSAMSG WSAMSG
typedef struct _WSAPOLLFD WSAPOLLFD
typedef enum _WSAESETSERVICEOP WSAESETSERVICEOP
typedef struct _WSANSCLASSINFOA WSANSCLASSINFOA
typedef struct _WSANSCLASSINFOW WSANSCLASSINFOW
typedef WSANSCLASSINFOA WSANSCLASSINFO
typedef struct _WSASERVICECLASSINFOA WSASERVICECLASSINFOA
typedef struct _WSASERVICECLASSINFOW WSASERVICECLASSINFOW
typedef WSASERVICECLASSINFOA WSASERVICECLASSINFO
typedef struct _WSANAMESPACE_INFOA WSANAMESPACE_INFOA
typedef struct _WSANAMESPACE_INFOW WSANAMESPACE_INFOW
typedef WSANAMESPACE_INFOA WSANAMESPACE_INFO
typedef int32_t STDCALL(* LPCONDITIONPROC) (WSABUF *lpcallerid, WSABUF *lpcallerdata, QOS *lpsqos, QOS *lpgqos, WSABUF *lpcalleeid, WSABUF *lpcalleedata, GROUP *g, uintptr_t dwcallbackdata)
typedef void STDCALL(* LPWSAOVERLAPPED_COMPLETION_ROUTINE) (uint32_t dwerror, uint32_t cbtransferred, WSAOVERLAPPED *lpoverlapped, uint32_t dwflags)
typedef struct _ADDRINFO ADDRINFO

Enumerations

enum  _WSAECOMPARATOR { COMP_EQUAL = 0 , COMP_NOTLESS }
enum  _WSAESETSERVICEOP { RNRSERVICE_REGISTER = 0 , RNRSERVICE_DEREGISTER , RNRSERVICE_DELETE }

Functions

BOOL STDCALL WS2Start (void)
BOOL STDCALL WS2Stop (void)
void STDCALL WS2AsyncStart (void *data)
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 additional information.
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 information.
int32_t STDCALL closesocket (SOCKET s)
 Close an existing 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 information.
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.
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 documentation for additional information.
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 information.
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.
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 Windows Sockets 2 documentation for additional information.
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 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 Windows Sockets 2 documentation for additional information.
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 the Windows Sockets 2 documentation for additional information.
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 Windows Sockets 2 documentation for additional information.
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 structure.
char *STDCALL inet_ntoa (in_addr inaddr)
 Convert an (IPv4) Internet network address into an ASCII string in Internet standard dotted-decimal format As per the Winsock specification, the buffer returned by this function is only guaranteed to be valid until the next Winsock function call is made within the same thread. Therefore, the data should be copied before another Winsock call.
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 documentation for additional information.
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 the Windows Sockets 2 documentation for additional information.
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 the Windows Sockets 2 documentation for additional information.
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 documentation for additional information.
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 documentation for additional information.
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 documentation for additional information.
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 documentation for additional information.
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 additional information.
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.
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 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 information.
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.
int32_t STDCALL shutdown (SOCKET s, int32_t how)
 Disable sends or receives on a socket See the Windows Sockets 2 documentation for additional information.
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 documentation for additional information.
hostent *STDCALL gethostbyaddr (void *addr, int32_t len, int32_t family)
 Retrieve the host information corresponding to a network address.
hostent *STDCALL gethostbyname (const char *name)
 Retrieve network address corresponding to a host name See the Windows Sockets 2 documentation for additional information.
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 additional information.
servent *STDCALL getservbyport (int32_t port, const char *proto)
 Retrieve service information corresponding to a port and protocol.
servent *STDCALL getservbyname (const char *name, const char *proto)
 Retrieve service information corresponding to a service name and protocol See the Windows Sockets 2 documentation for additional information.
protoent *STDCALL getprotobynumber (int32_t proto)
 Retrieve protocol information corresponding to a protocol number See the Windows Sockets 2 documentation for additional information.
protoent *STDCALL getprotobyname (const char *name)
 Retrieve the protocol information corresponding to a protocol name See the Windows Sockets 2 documentation for additional information.
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 documentation for additional information.
void STDCALL freeaddrinfo (ADDRINFO *ai)
 Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures 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 service name See the Windows Sockets 2 documentation for additional information.
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 information.
int32_t STDCALL WSACleanup (void)
 Terminate use of Winsock 2 by an application See the Windows Sockets 2 documentation for additional information.
void STDCALL WSASetLastError (int32_t ierror)
 Set the error code that can be retrieved through the WSAGetLastError function See the Windows Sockets 2 documentation for additional information.
int32_t STDCALL WSAGetLastError (void)
 Return the error status for the last Windows Sockets operation that failed See the Windows Sockets 2 documentation for additional information.
BOOL STDCALL WSAIsBlocking (void)
int32_t STDCALL WSAUnhookBlockingHook (void)
FARPROC STDCALL WSASetBlockingHook (FARPROC lpblockfunc)
int32_t STDCALL WSACancelBlockingCall (void)
HANDLE STDCALL WSAAsyncGetServByName (HWND hwindow, u_int wmsg, const char *name, const char *proto, char *buf, int32_t buflen)
HANDLE STDCALL WSAAsyncGetServByPort (HWND hwindow, u_int wmsg, u_int port, const char *proto, char *buf, int32_t buflen)
HANDLE STDCALL WSAAsyncGetProtoByName (HWND hwindow, u_int wmsg, const char *name, char *buf, int32_t buflen)
HANDLE STDCALL WSAAsyncGetProtoByNumber (HWND hwindow, u_int wmsg, int32_t number, char *buf, int32_t buflen)
HANDLE STDCALL WSAAsyncGetHostByName (HWND hwindow, u_int wmsg, const char *name, char *buf, int32_t buflen)
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 WSACancelAsyncRequest (HANDLE hasynctaskhandle)
int32_t STDCALL WSAAsyncSelect (SOCKET s, HWND hwindow, u_int wmsg, int32_t levent)
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 Sockets 2 documentation for additional information.
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 numeric binary form.
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 numeric binary form.
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 numeric binary form.
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.
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.
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.
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 transfer of connection data See the Windows Sockets 2 documentation for additional information.
BOOL STDCALL WSACloseEvent (WSAEVENT hevent)
 Close the handle to an event object and free resources associated with the event object See the Windows Sockets 2 documentation for additional information.
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.
BOOL STDCALL WSAConnectByList (SOCKET s, SOCKET_ADDRESS_LIST *socketaddresslist, uint32_t *localaddresslength, SOCKADDR *localaddress, uint32_t *remoteaddresslength, SOCKADDR *remoteaddress, wstimeval *timeout, WSAOVERLAPPED *reserved)
BOOL STDCALL WSAConnectByNameA (SOCKET s, char *nodename, char *servicename, uint32_t *localaddresslength, SOCKADDR *localaddress, uint32_t *remoteaddresslength, SOCKADDR *remoteaddress, wstimeval *timeout, WSAOVERLAPPED *reserved)
BOOL STDCALL WSAConnectByNameW (SOCKET s, WCHAR *nodename, WCHAR *servicename, uint32_t *localaddresslength, SOCKADDR *localaddress, uint32_t *remoteaddresslength, SOCKADDR *remoteaddress, wstimeval *timeout, WSAOVERLAPPED *reserved)
WSAEVENT STDCALL WSACreateEvent (void)
 Create a manual reset event object with an initial state of unsignaled See the Windows Sockets 2 documentation for additional information.
int32_t STDCALL WSADuplicateSocketA (SOCKET s, uint32_t dwprocessid, WSAPROTOCOL_INFOA *lpprotocolinfo)
int32_t STDCALL WSADuplicateSocketW (SOCKET s, uint32_t dwprocessid, WSAPROTOCOL_INFOW *lpprotocolinfo)
int32_t STDCALL WSAEnumNetworkEvents (SOCKET s, WSAEVENT heventobject, WSANETWORKEVENTS *lpnetworkevents)
 Discover occurrences of network events for the indicated socket, clear internal network event records, and reset event objects See the Windows Sockets 2 documentation for additional information.
int32_t STDCALL WSAEnumProtocolsA (int32_t *lpiprotocols, WSAPROTOCOL_INFOA *lpprotocolbuffer, uint32_t *lpdwbufferlength)
int32_t STDCALL WSAEnumProtocolsW (int32_t *lpiprotocols, WSAPROTOCOL_INFOW *lpprotocolbuffer, uint32_t *lpdwbufferlength)
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 Windows Sockets 2 documentation for additional information.
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 documentation for additional information.
BOOL STDCALL WSAGetQosByName (SOCKET s, WSABUF *lpqosname, QOS *lpqos)
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 for additional information.
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 for additional information.
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.
SOCKET STDCALL WSAJoinLeaf (SOCKET s, SOCKADDR *name, int32_t namelen, WSABUF *lpcallerdata, WSABUF *lpcalleedata, QOS *lpsqos, QOS *lpgqos, uint32_t dwflags)
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 for additional information.
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 for additional information.
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 information.
int32_t STDCALL WSAProviderConfigChange (HANDLE *lpnotificationhandle, WSAOVERLAPPED *lpoverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine)
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 documentation for additional information.
int32_t STDCALL WSARecvDisconnect (SOCKET s, WSABUF *lpinbounddisconnectdata)
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 additional information.
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.
BOOL STDCALL WSAResetEvent (WSAEVENT hevent)
 Reset the state of the specified event object to unsignaled See the Windows Sockets 2 documentation for additional information.
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.
int32_t STDCALL WSASendDisconnect (SOCKET s, WSABUF *lpoutbounddisconnectdata)
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 documentation for additional information.
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 WSASetEvent (WSAEVENT hevent)
 Set the state of the specified event object to signaled See the Windows Sockets 2 documentation for additional information.
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.
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.
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 interval to expire See the Windows Sockets 2 documentation for additional information.
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 address.
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 address.
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 sockaddr structure.
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 sockaddr structure.
int32_t STDCALL WSALookupServiceBeginA (WSAQUERYSETA *lpqsrestrictions, uint32_t dwcontrolflags, HANDLE *lphlookup)
int32_t STDCALL WSALookupServiceBeginW (WSAQUERYSETW *lpqsrestrictions, uint32_t dwcontrolflags, HANDLE *lphlookup)
int32_t STDCALL WSALookupServiceNextA (HANDLE hlookup, uint32_t dwcontrolflags, uint32_t *lpdwbufferlength, WSAQUERYSETA *lpqsresults)
int32_t STDCALL WSALookupServiceNextW (HANDLE hlookup, uint32_t dwcontrolflags, uint32_t *lpdwbufferlength, WSAQUERYSETW *lpqsresults)
int32_t STDCALL WSALookupServiceEnd (HANDLE hlookup)
int32_t STDCALL WSAInstallServiceClassA (WSASERVICECLASSINFOA *lpserviceclassinfo)
int32_t STDCALL WSAInstallServiceClassW (WSASERVICECLASSINFOW *lpserviceclassinfo)
int32_t STDCALL WSARemoveServiceClass (GUID *lpserviceclassid)
int32_t STDCALL WSAGetServiceClassInfoA (GUID *lpproviderid, GUID *lpserviceclassid, uint32_t *lpdwbufsize, WSASERVICECLASSINFOA *lpserviceclassinfo)
int32_t STDCALL WSAGetServiceClassInfoW (GUID *lpproviderid, GUID *lpserviceclassid, uint32_t *lpdwbufsize, WSASERVICECLASSINFOW *lpserviceclassinfo)
int32_t STDCALL WSAEnumNameSpaceProvidersA (uint32_t *lpdwbufferlength, WSANAMESPACE_INFOA *lpnspbuffer)
int32_t STDCALL WSAEnumNameSpaceProvidersW (uint32_t *lpdwbufferlength, WSANAMESPACE_INFOW *lpnspbuffer)
int32_t STDCALL WSAGetServiceClassNameByClassIdA (GUID *lpserviceclassid, char *lpszserviceclassname, uint32_t *lpdwbufferlength)
int32_t STDCALL WSAGetServiceClassNameByClassIdW (GUID *lpserviceclassid, WCHAR *lpszserviceclassname, uint32_t *lpdwbufferlength)
int32_t STDCALL WSASetServiceA (WSAQUERYSETA *lpqsreginfo, WSAESETSERVICEOP essoperation, uint32_t dwcontrolflags)
int32_t STDCALL WSASetServiceW (WSAQUERYSETW *lpqsreginfo, WSAESETSERVICEOP essoperation, uint32_t dwcontrolflags)
int32_t STDCALL WSAMakeSyncReply (uint16_t buflen, uint16_t error)
int32_t STDCALL WSAMakeSelectReply (uint16_t event, uint16_t error)
uint16_t STDCALL WSAGetAsyncBuflen (int32_t param)
uint16_t STDCALL WSAGetAsyncError (int32_t param)
uint16_t STDCALL WSAGetSelectEvent (int32_t param)
uint16_t STDCALL WSAGetSelectError (int32_t param)
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.
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 information.
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.
void STDCALL FD_ZERO (fd_set *fdset)
 Initialize an fd_set to null 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)
netent *STDCALL getnetbyaddr (void *addr, int len, int type)
 Retrieve the network information corresponding to a network address.
netent *STDCALL getnetbyname (const char *name)
 Retrieve network address corresponding to a network name.
int STDCALL WsControlEx (uint32_t proto, uint32_t action, void *prequestinfo, uint32_t *pcbrequestinfolen, void *presponseinfo, uint32_t *pcbresponseinfolen)
BOOL STDCALL Winsock2RedirectInput (SOCKET s)
 Redirect standard input to the socket specified by s.
BOOL STDCALL Winsock2RedirectOutput (SOCKET s)
 Redirect standard output to the socket specified by s.
uint32_t STDCALL Winsock2ErrorToString (int32_t error, char *string, uint32_t len)

Macro Definition Documentation

◆ _ULTIBO_WINSOCK_H

#define _ULTIBO_WINSOCK_H

Prevent inclusion of winsock.h.

◆ _WINSOCK2API_

#define _WINSOCK2API_

◆ _WINSOCKAPI_

#define _WINSOCKAPI_

◆ WINSOCK_VERSION

#define WINSOCK_VERSION   0x0202

Note: To use winsock2.h either include it before sys/types.h Note: or add the following define before sys/types.h is included #define __USE_W32_SOCKETS Remove any socket definitions set by sys/types.h Winsock2 specific constants

◆ FD_SETSIZE

#define FD_SETSIZE   64

◆ IOCPARM_MASK

#define IOCPARM_MASK   0x7f

◆ IOC_VOID

#define IOC_VOID   0x20000000

◆ IOC_OUT

#define IOC_OUT   0x40000000

◆ IOC_IN

#define IOC_IN   0x80000000

◆ IOC_INOUT

#define IOC_INOUT   (IOC_IN | IOC_OUT)

◆ _IO

#define _IO ( x,
y )
Value:
(IOC_VOID|((x)<<8)|(y))
#define IOC_VOID
Definition winsock.h:63

◆ _IOR

#define _IOR ( x,
y,
t )
Value:
(IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define IOCPARM_MASK
Definition winsock.h:62
#define IOC_OUT
Definition winsock.h:64

◆ _IOW

#define _IOW ( x,
y,
t )
Value:
(IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define IOC_IN
Definition winsock.h:65

◆ FIONREAD

#define FIONREAD   _IOR('f', 127, u_long)

get # bytes to read *‍/

◆ FIONBIO

#define FIONBIO   _IOW('f', 126, u_long)

set/clear non-blocking i/o *‍/

◆ FIOASYNC

#define FIOASYNC   _IOW('f', 125, u_long)

set/clear async i/o *‍/

◆ SIOCSHIWAT

#define SIOCSHIWAT   _IOW('s', 0, u_long)

set high watermark

Socket I/O Controls

◆ SIOCGHIWAT

#define SIOCGHIWAT   _IOR('s', 1, u_long)

get high watermark

◆ SIOCSLOWAT

#define SIOCSLOWAT   _IOW('s', 2, u_long)

set low watermark

◆ SIOCGLOWAT

#define SIOCGLOWAT   _IOR('s', 3, u_long)

get low watermark

◆ SIOCATMARK

#define SIOCATMARK   _IOR('s', 7, u_long)

at oob mark?

◆ IPPROTO_IP

#define IPPROTO_IP   0

dummy for IP

Protocols

◆ IPPROTO_ICMP

#define IPPROTO_ICMP   1

control message protocol

◆ IPPROTO_IGMP

#define IPPROTO_IGMP   2

group management protocol

◆ IPPROTO_GGP

#define IPPROTO_GGP   3

gateway^2 (deprecated)

◆ IPPROTO_TCP

#define IPPROTO_TCP   6

tcp

◆ IPPROTO_EGP

#define IPPROTO_EGP   8

egp

◆ IPPROTO_PUP

#define IPPROTO_PUP   12

pup

◆ IPPROTO_UDP

#define IPPROTO_UDP   17

user datagram protocol

◆ IPPROTO_HMP

#define IPPROTO_HMP   20

hmp

◆ IPPROTO_IDP

#define IPPROTO_IDP   22

xns idp

◆ IPPROTO_RDP

#define IPPROTO_RDP   27

rdp

◆ IPPROTO_IPV6

#define IPPROTO_IPV6   41

IP6 header.

◆ IPPROTO_ROUTING

#define IPPROTO_ROUTING   43

IP6 routing header.

◆ IPPROTO_FRAGMENT

#define IPPROTO_FRAGMENT   44

IP6 fragmentation header.

◆ IPPROTO_ICMPV6

#define IPPROTO_ICMPV6   58

ICMP6.

◆ IPPROTO_RVD

#define IPPROTO_RVD   66

rvd

◆ IPPROTO_ND

#define IPPROTO_ND   77

UNOFFICIAL net disk proto.

◆ IPPROTO_RAW

#define IPPROTO_RAW   255

raw IP packet

◆ IPPROTO_MAX

#define IPPROTO_MAX   256

◆ NSPROTO_IPX

#define NSPROTO_IPX   1000

ipx protocol

◆ NSPROTO_SPX

#define NSPROTO_SPX   1256

spx protocol

◆ NSPROTO_SPXII

#define NSPROTO_SPXII   1257

spxii protocol

◆ IPPORT_ANY

#define IPPORT_ANY   0

Port/socket numbers: network standard functions

◆ IPPORT_ECHO

#define IPPORT_ECHO   7

◆ IPPORT_DISCARD

#define IPPORT_DISCARD   9

◆ IPPORT_SYSTAT

#define IPPORT_SYSTAT   11

◆ IPPORT_DAYTIME

#define IPPORT_DAYTIME   13

◆ IPPORT_NETSTAT

#define IPPORT_NETSTAT   15

◆ IPPORT_FTP

#define IPPORT_FTP   21

◆ IPPORT_TELNET

#define IPPORT_TELNET   23

◆ IPPORT_SMTP

#define IPPORT_SMTP   25

◆ IPPORT_TIMESERVER

#define IPPORT_TIMESERVER   37

◆ IPPORT_NAMESERVER

#define IPPORT_NAMESERVER   42

◆ IPPORT_WHOIS

#define IPPORT_WHOIS   43

◆ IPPORT_DNS

#define IPPORT_DNS   53

◆ IPPORT_MTP

#define IPPORT_MTP   57

◆ IPPORT_BOOTPS

#define IPPORT_BOOTPS   67

◆ IPPORT_BOOTPC

#define IPPORT_BOOTPC   68

◆ IPPORT_TFTP

#define IPPORT_TFTP   69

Port/socket numbers: host specific functions

◆ IPPORT_RJE

#define IPPORT_RJE   77

◆ IPPORT_FINGER

#define IPPORT_FINGER   79

◆ IPPORT_TTYLINK

#define IPPORT_TTYLINK   87

◆ IPPORT_SUPDUP

#define IPPORT_SUPDUP   95

◆ IPPORT_EXECSERVER

#define IPPORT_EXECSERVER   512

UNIX TCP sockets

◆ IPPORT_LOGINSERVER

#define IPPORT_LOGINSERVER   513

◆ IPPORT_CMDSERVER

#define IPPORT_CMDSERVER   514

◆ IPPORT_EFSSERVER

#define IPPORT_EFSSERVER   520

◆ IPPORT_BIFFUDP

#define IPPORT_BIFFUDP   512

UNIX UDP sockets

◆ IPPORT_WHOSERVER

#define IPPORT_WHOSERVER   513

◆ IPPORT_ROUTESERVER

#define IPPORT_ROUTESERVER   520

◆ IPPORT_RESERVED

#define IPPORT_RESERVED   1024

Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root).

◆ IMPLINK_IP

#define IMPLINK_IP   155

Link numbers

◆ IMPLINK_LOWEXPER

#define IMPLINK_LOWEXPER   156

◆ IMPLINK_HIGHEXPER

#define IMPLINK_HIGHEXPER   158

◆ TF_DISCONNECT

#define TF_DISCONNECT   0x01

◆ TF_REUSE_SOCKET

#define TF_REUSE_SOCKET   0x02

◆ TF_WRITE_BEHIND

#define TF_WRITE_BEHIND   0x04

◆ IP_OPTIONS

#define IP_OPTIONS   1

Options for use with [gs]etsockopt at the IP level.

◆ IP_MULTICAST_IF

#define IP_MULTICAST_IF   2

set/get IP multicast interface

◆ IP_MULTICAST_TTL

#define IP_MULTICAST_TTL   3

set/get IP multicast timetolive

◆ IP_MULTICAST_LOOP

#define IP_MULTICAST_LOOP   4

set/get IP multicast loopback

◆ IP_ADD_MEMBERSHIP

#define IP_ADD_MEMBERSHIP   5

add an IP group membership

◆ IP_DROP_MEMBERSHIP

#define IP_DROP_MEMBERSHIP   6

drop an IP group membership

◆ IP_TTL

#define IP_TTL   7

set/get IP Time To Live

◆ IP_TOS

#define IP_TOS   8

set/get IP Type Of Service

◆ IP_DONTFRAGMENT

#define IP_DONTFRAGMENT   9

set/get IP Don't Fragment flag

◆ IP_HDRINCL

#define IP_HDRINCL   10

set/get IP Header include

◆ IP_DEFAULT_MULTICAST_TTL

#define IP_DEFAULT_MULTICAST_TTL   1

normally limit m'casts to 1 hop

◆ IP_DEFAULT_MULTICAST_LOOP

#define IP_DEFAULT_MULTICAST_LOOP   1

normally hear sends if a member

◆ IP_MAX_MEMBERSHIPS

#define IP_MAX_MEMBERSHIPS   20

per socket; must fit in one mbuf

◆ INVALID_SOCKET

#define INVALID_SOCKET   (SOCKET)(~0)

This is used instead of -1, since the SOCKET type is unsigned.

◆ SOCKET_ERROR

#define SOCKET_ERROR   -1

◆ SOCK_UNSPEC

#define SOCK_UNSPEC   0

unspecified

Types

◆ SOCK_STREAM

#define SOCK_STREAM   1

stream socket

◆ SOCK_DGRAM

#define SOCK_DGRAM   2

datagram socket

◆ SOCK_RAW

#define SOCK_RAW   3

raw-protocol interface

◆ SOCK_RDM

#define SOCK_RDM   4

reliably-delivered message

◆ SOCK_SEQPACKET

#define SOCK_SEQPACKET   5

sequenced packet stream

◆ SOCK_PACKET

#define SOCK_PACKET   10

linux specific way of

◆ SO_DEBUG

#define SO_DEBUG   0x0001

turn on debugging info recording

Option flags per-socket.

◆ SO_ACCEPTCONN

#define SO_ACCEPTCONN   0x0002

socket has had listen()

◆ SO_REUSEADDR

#define SO_REUSEADDR   0x0004

allow local address reuse

◆ SO_KEEPALIVE

#define SO_KEEPALIVE   0x0008

keep connections alive

◆ SO_DONTROUTE

#define SO_DONTROUTE   0x0010

just use interface addresses

◆ SO_BROADCAST

#define SO_BROADCAST   0x0020

permit sending of broadcast msgs

◆ SO_USELOOPBACK

#define SO_USELOOPBACK   0x0040

bypass hardware when possible

◆ SO_LINGER

#define SO_LINGER   0x0080

linger on close if data present

◆ SO_OOBINLINE

#define SO_OOBINLINE   0x0100

leave received OOB data in line

◆ SO_DONTLINGER

#define SO_DONTLINGER   0xff7f

◆ SO_SNDBUF

#define SO_SNDBUF   0x1001

send buffer size

Additional options.

◆ SO_RCVBUF

#define SO_RCVBUF   0x1002

receive buffer size

◆ SO_SNDLOWAT

#define SO_SNDLOWAT   0x1003

send low-water mark

◆ SO_RCVLOWAT

#define SO_RCVLOWAT   0x1004

receive low-water mark

◆ SO_SNDTIMEO

#define SO_SNDTIMEO   0x1005

send timeout

◆ SO_RCVTIMEO

#define SO_RCVTIMEO   0x1006

receive timeout

◆ SO_ERROR

#define SO_ERROR   0x1007

get error status and clear

◆ SO_TYPE

#define SO_TYPE   0x1008

get socket type

◆ SO_CONNTIMEO

#define SO_CONNTIMEO   0x1009

connection timeout

◆ SO_CONNDATA

#define SO_CONNDATA   0x7000

Options for connect and disconnect data and options. Used only by non-TCP/IP transports such as DECNet, OSI TP4, etc.

◆ SO_CONNOPT

#define SO_CONNOPT   0x7001

◆ SO_DISCDATA

#define SO_DISCDATA   0x7002

◆ SO_DISCOPT

#define SO_DISCOPT   0x7003

◆ SO_CONNDATALEN

#define SO_CONNDATALEN   0x7004

◆ SO_CONNOPTLEN

#define SO_CONNOPTLEN   0x7005

◆ SO_DISCDATALEN

#define SO_DISCDATALEN   0x7006

◆ SO_DISCOPTLEN

#define SO_DISCOPTLEN   0x7007

◆ SO_OPENTYPE

#define SO_OPENTYPE   0x7008

Option for opening sockets for synchronous access.

◆ SO_SYNCHRONOUS_ALERT

#define SO_SYNCHRONOUS_ALERT   0x10

◆ SO_SYNCHRONOUS_NONALERT

#define SO_SYNCHRONOUS_NONALERT   0x20

◆ SO_MAXDG

#define SO_MAXDG   0x7009

Other NT-specific options.

◆ SO_MAXPATHDG

#define SO_MAXPATHDG   0x700A

◆ SO_UPDATE_ACCEPT_CONTEXT

#define SO_UPDATE_ACCEPT_CONTEXT   0x700B

◆ SO_CONNECT_TIME

#define SO_CONNECT_TIME   0x700C

◆ TCP_NODELAY

#define TCP_NODELAY   0x0001

TCP options.

◆ TCP_MAXSEG

#define TCP_MAXSEG   0x0002

◆ TCP_NOPUSH

#define TCP_NOPUSH   0x0004

◆ TCP_NOOPT

#define TCP_NOOPT   0x0008

◆ TCP_BSDURGENT

#define TCP_BSDURGENT   0x7000

Implement BSD Urgent instead of RFC793/1122.

◆ TCP_WSCALE

#define TCP_WSCALE   0x0010

◆ TCP_NOSACK

#define TCP_NOSACK   0x0020

◆ UDP_NOCHECKSUM

#define UDP_NOCHECKSUM   0x0001

UDP options.

◆ AF_UNSPEC

#define AF_UNSPEC   0

unspecified

Address families.

◆ AF_UNIX

#define AF_UNIX   1

local to host (pipes, portals)

◆ AF_INET

#define AF_INET   2

internetwork: UDP, TCP, etc.

◆ AF_IMPLINK

#define AF_IMPLINK   3

arpanet imp addresses

◆ AF_PUP

#define AF_PUP   4

pup protocols: e.g. BSP

◆ AF_CHAOS

#define AF_CHAOS   5

mit CHAOS protocols

◆ AF_IPX

#define AF_IPX   6

IPX and SPX.

◆ AF_NS

#define AF_NS   6

XEROX NS protocols.

◆ AF_ISO

#define AF_ISO   7

ISO protocols.

◆ AF_OSI

#define AF_OSI   AF_ISO

OSI is ISO.

◆ AF_ECMA

#define AF_ECMA   8

european computer manufacturers

◆ AF_DATAKIT

#define AF_DATAKIT   9

datakit protocols

◆ AF_CCITT

#define AF_CCITT   10

CCITT protocols, X.25 etc.

◆ AF_SNA

#define AF_SNA   11

IBM SNA.

◆ AF_DECnet

#define AF_DECnet   12

DECnet.

◆ AF_DLI

#define AF_DLI   13

Direct data link interface.

◆ AF_LAT

#define AF_LAT   14

LAT.

◆ AF_HYLINK

#define AF_HYLINK   15

NSC Hyperchannel.

◆ AF_APPLETALK

#define AF_APPLETALK   16

AppleTalk.

◆ AF_NETBIOS

#define AF_NETBIOS   17

NetBios-style addresses.

◆ AF_VOICEVIEW

#define AF_VOICEVIEW   18

VoiceView.

◆ AF_FIREFOX

#define AF_FIREFOX   19

FireFox.

◆ AF_UNKNOWN1

#define AF_UNKNOWN1   20

Somebody is using this!

◆ AF_BAN

#define AF_BAN   21

Banyan.

◆ AF_ATM

#define AF_ATM   22

Native ATM Services.

◆ AF_INET6

#define AF_INET6   23

Internetwork Version 6.

◆ AF_CLUSTER

#define AF_CLUSTER   24

Microsoft Wolfpack.

◆ AF_12844

#define AF_12844   25

IEEE 1284.4 WG AF.

◆ AF_IRDA

#define AF_IRDA   26

IrDA.

◆ AF_NETDES

#define AF_NETDES   28

Network Designers OSI & gateway enabled.

◆ AF_MAX

#define AF_MAX   29

◆ _SS_MAXSIZE

#define _SS_MAXSIZE   128

Maximum size.

Definitions used for sockaddr_storage structure paddings design.

◆ _SS_ALIGNSIZE

#define _SS_ALIGNSIZE   (sizeof(__int64_t))

Desired alignment.

◆ _SS_PAD1SIZE

#define _SS_PAD1SIZE   (_SS_ALIGNSIZE - sizeof(unsigned short))

◆ _SS_PAD2SIZE

#define _SS_PAD2SIZE   (_SS_MAXSIZE - (sizeof(unsigned short) + _SS_PAD1SIZE + _SS_ALIGNSIZE))

◆ PF_UNSPEC

#define PF_UNSPEC   AF_UNSPEC

Protocol families, same as address families for now.

◆ PF_UNIX

#define PF_UNIX   AF_UNIX

◆ PF_INET

#define PF_INET   AF_INET

◆ PF_IMPLINK

#define PF_IMPLINK   AF_IMPLINK

◆ PF_PUP

#define PF_PUP   AF_PUP

◆ PF_CHAOS

#define PF_CHAOS   AF_CHAOS

◆ PF_NS

#define PF_NS   AF_NS

◆ PF_IPX

#define PF_IPX   AF_IPX

◆ PF_ISO

#define PF_ISO   AF_ISO

◆ PF_OSI

#define PF_OSI   AF_OSI

◆ PF_ECMA

#define PF_ECMA   AF_ECMA

◆ PF_DATAKIT

#define PF_DATAKIT   AF_DATAKIT

◆ PF_CCITT

#define PF_CCITT   AF_CCITT

◆ PF_SNA

#define PF_SNA   AF_SNA

◆ PF_DECnet

#define PF_DECnet   AF_DECnet

◆ PF_DLI

#define PF_DLI   AF_DLI

◆ PF_LAT

#define PF_LAT   AF_LAT

◆ PF_HYLINK

#define PF_HYLINK   AF_HYLINK

◆ PF_APPLETALK

#define PF_APPLETALK   AF_APPLETALK

◆ PF_VOICEVIEW

#define PF_VOICEVIEW   AF_VOICEVIEW

◆ PF_FIREFOX

#define PF_FIREFOX   AF_FIREFOX

◆ PF_UNKNOWN1

#define PF_UNKNOWN1   AF_UNKNOWN1

◆ PF_BAN

#define PF_BAN   AF_BAN

◆ PF_ATM

#define PF_ATM   AF_ATM

◆ PF_INET6

#define PF_INET6   AF_INET6

◆ PF_CLUSTER

#define PF_CLUSTER   AF_CLUSTER

◆ PF_12844

#define PF_12844   AF_12844

◆ PF_IRDA

#define PF_IRDA   AF_IRDA

◆ PF_NETDES

#define PF_NETDES   AF_NETDES

◆ PF_MAX

#define PF_MAX   AF_MAX

◆ SOL_SOCKET

#define SOL_SOCKET   0xffff

options for socket level

Level number for (get/set)sockopt() to apply to socket itself.

◆ SOMAXCONN

#define SOMAXCONN   0x7fffffff

Maximum queue length specifiable by listen.

◆ MSG_OOB

#define MSG_OOB   0x1

process out-of-band data

◆ MSG_PEEK

#define MSG_PEEK   0x2

peek at incoming message

◆ MSG_DONTROUTE

#define MSG_DONTROUTE   0x4

send without using routing tables

◆ MSG_WAITALL

#define MSG_WAITALL   0x8;

do not complete until packet is completely filled

◆ MSG_INTERRUPT

#define MSG_INTERRUPT   0x10

send/recv in the interrupt context

◆ MSG_MAXIOVLEN

#define MSG_MAXIOVLEN   16

◆ MSG_PARTIAL

#define MSG_PARTIAL   0x8000

partial send or recv for message xport

◆ MAXGETHOSTSTRUCT

#define MAXGETHOSTSTRUCT   1024

Define constant based on rfc883, used by gethostbyxxxx() calls.

◆ FD_READ_BIT

#define FD_READ_BIT   0

WinSock 2 extension – bit values and indices for FD_XXX network events

◆ FD_READ

#define FD_READ   (1 << FD_READ_BIT)

◆ FD_WRITE_BIT

#define FD_WRITE_BIT   1

◆ FD_WRITE

#define FD_WRITE   (1 << FD_WRITE_BIT)

◆ FD_OOB_BIT

#define FD_OOB_BIT   2

◆ FD_OOB

#define FD_OOB   (1 << FD_OOB_BIT)

◆ FD_ACCEPT_BIT

#define FD_ACCEPT_BIT   3

◆ FD_ACCEPT

#define FD_ACCEPT   (1 << FD_ACCEPT_BIT)

◆ FD_CONNECT_BIT

#define FD_CONNECT_BIT   4

◆ FD_CONNECT

#define FD_CONNECT   (1 << FD_CONNECT_BIT)

◆ FD_CLOSE_BIT

#define FD_CLOSE_BIT   5

◆ FD_CLOSE

#define FD_CLOSE   (1 << FD_CLOSE_BIT)

◆ FD_QOS_BIT

#define FD_QOS_BIT   6

◆ FD_QOS

#define FD_QOS   (1 << FD_QOS_BIT)

◆ FD_GROUP_QOS_BIT

#define FD_GROUP_QOS_BIT   7

◆ FD_GROUP_QOS

#define FD_GROUP_QOS   (1 << FD_GROUP_QOS_BIT)

◆ FD_MAX_EVENTS

#define FD_MAX_EVENTS   8

◆ FD_ALL_EVENTS

#define FD_ALL_EVENTS   ((1 << FD_MAX_EVENTS) - 1)

◆ WSABASEERR

#define WSABASEERR   10000

All Windows Sockets error constants are biased by WSABASEERR from the "normal"

◆ WSAEINTR

#define WSAEINTR   (WSABASEERR+4)

Windows Sockets definitions of regular Microsoft C error constants

◆ WSAEBADF

#define WSAEBADF   (WSABASEERR+9)

◆ WSAEACCES

#define WSAEACCES   (WSABASEERR+13)

◆ WSAEFAULT

#define WSAEFAULT   (WSABASEERR+14)

◆ WSAEINVAL

#define WSAEINVAL   (WSABASEERR+22)

◆ WSAEMFILE

#define WSAEMFILE   (WSABASEERR+24)

◆ WSAEWOULDBLOCK

#define WSAEWOULDBLOCK   (WSABASEERR+35)

Windows Sockets definitions of regular Berkeley error constants

◆ WSAEINPROGRESS

#define WSAEINPROGRESS   (WSABASEERR+36)

◆ WSAEALREADY

#define WSAEALREADY   (WSABASEERR+37)

◆ WSAENOTSOCK

#define WSAENOTSOCK   (WSABASEERR+38)

◆ WSAEDESTADDRREQ

#define WSAEDESTADDRREQ   (WSABASEERR+39)

◆ WSAEMSGSIZE

#define WSAEMSGSIZE   (WSABASEERR+40)

◆ WSAEPROTOTYPE

#define WSAEPROTOTYPE   (WSABASEERR+41)

◆ WSAENOPROTOOPT

#define WSAENOPROTOOPT   (WSABASEERR+42)

◆ WSAEPROTONOSUPPORT

#define WSAEPROTONOSUPPORT   (WSABASEERR+43)

◆ WSAESOCKTNOSUPPORT

#define WSAESOCKTNOSUPPORT   (WSABASEERR+44)

◆ WSAEOPNOTSUPP

#define WSAEOPNOTSUPP   (WSABASEERR+45)

◆ WSAEPFNOSUPPORT

#define WSAEPFNOSUPPORT   (WSABASEERR+46)

◆ WSAEAFNOSUPPORT

#define WSAEAFNOSUPPORT   (WSABASEERR+47)

◆ WSAEADDRINUSE

#define WSAEADDRINUSE   (WSABASEERR+48)

◆ WSAEADDRNOTAVAIL

#define WSAEADDRNOTAVAIL   (WSABASEERR+49)

◆ WSAENETDOWN

#define WSAENETDOWN   (WSABASEERR+50)

◆ WSAENETUNREACH

#define WSAENETUNREACH   (WSABASEERR+51)

◆ WSAENETRESET

#define WSAENETRESET   (WSABASEERR+52)

◆ WSAECONNABORTED

#define WSAECONNABORTED   (WSABASEERR+53)

◆ WSAECONNRESET

#define WSAECONNRESET   (WSABASEERR+54)

◆ WSAENOBUFS

#define WSAENOBUFS   (WSABASEERR+55)

◆ WSAEISCONN

#define WSAEISCONN   (WSABASEERR+56)

◆ WSAENOTCONN

#define WSAENOTCONN   (WSABASEERR+57)

◆ WSAESHUTDOWN

#define WSAESHUTDOWN   (WSABASEERR+58)

◆ WSAETOOMANYREFS

#define WSAETOOMANYREFS   (WSABASEERR+59)

◆ WSAETIMEDOUT

#define WSAETIMEDOUT   (WSABASEERR+60)

◆ WSAECONNREFUSED

#define WSAECONNREFUSED   (WSABASEERR+61)

◆ WSAELOOP

#define WSAELOOP   (WSABASEERR+62)

◆ WSAENAMETOOLONG

#define WSAENAMETOOLONG   (WSABASEERR+63)

◆ WSAEHOSTDOWN

#define WSAEHOSTDOWN   (WSABASEERR+64)

◆ WSAEHOSTUNREACH

#define WSAEHOSTUNREACH   (WSABASEERR+65)

◆ WSAENOTEMPTY

#define WSAENOTEMPTY   (WSABASEERR+66)

◆ WSAEPROCLIM

#define WSAEPROCLIM   (WSABASEERR+67)

◆ WSAEUSERS

#define WSAEUSERS   (WSABASEERR+68)

◆ WSAEDQUOT

#define WSAEDQUOT   (WSABASEERR+69)

◆ WSAESTALE

#define WSAESTALE   (WSABASEERR+70)

◆ WSAEREMOTE

#define WSAEREMOTE   (WSABASEERR+71)

◆ WSAEDISCON

#define WSAEDISCON   (WSABASEERR+101)

◆ WSASYSNOTREADY

#define WSASYSNOTREADY   (WSABASEERR+91)

Extended Windows Sockets error constant definitions

◆ WSAVERNOTSUPPORTED

#define WSAVERNOTSUPPORTED   (WSABASEERR+92)

◆ WSANOTINITIALISED

#define WSANOTINITIALISED   (WSABASEERR+93)

◆ WSAENOMORE

#define WSAENOMORE   (WSABASEERR+102)

◆ WSAECANCELLED

#define WSAECANCELLED   (WSABASEERR+103)

◆ WSAEINVALIDPROCTABLE

#define WSAEINVALIDPROCTABLE   (WSABASEERR+104)

◆ WSAEINVALIDPROVIDER

#define WSAEINVALIDPROVIDER   (WSABASEERR+105)

◆ WSAEPROVIDERFAILEDINIT

#define WSAEPROVIDERFAILEDINIT   (WSABASEERR+106)

◆ WSASYSCALLFAILURE

#define WSASYSCALLFAILURE   (WSABASEERR+107)

◆ WSASERVICE_NOT_FOUND

#define WSASERVICE_NOT_FOUND   (WSABASEERR+108)

◆ WSATYPE_NOT_FOUND

#define WSATYPE_NOT_FOUND   (WSABASEERR+109)

◆ WSA_E_NO_MORE

#define WSA_E_NO_MORE   (WSABASEERR+110)

◆ WSA_E_CANCELLED

#define WSA_E_CANCELLED   (WSABASEERR+111)

◆ WSAEREFUSED

#define WSAEREFUSED   (WSABASEERR+112)

◆ WSAHOST_NOT_FOUND

#define WSAHOST_NOT_FOUND   (WSABASEERR+1001)

Error return codes from gethostbyname() and gethostbyaddr() (when using the resolver). Note that these errors are retrieved via WSAGetLastError() and must therefore follow the rules for avoiding clashes with error numbers from specific implementations or language run-time systems. For this reason the codes are based at WSABASEERR+1001. Note also that [WSA]NO_ADDRESS is defined only for compatibility purposes. Authoritative Answer: Host not found

◆ HOST_NOT_FOUND

#define HOST_NOT_FOUND   WSAHOST_NOT_FOUND

◆ WSATRY_AGAIN

#define WSATRY_AGAIN   (WSABASEERR+1002)

Non-Authoritative: Host not found, or SERVERFAIL

◆ TRY_AGAIN

#define TRY_AGAIN   WSATRY_AGAIN

◆ WSANO_RECOVERY

#define WSANO_RECOVERY   (WSABASEERR+1003)

Non recoverable errors, FORMERR, REFUSED, NOTIMP

◆ NO_RECOVERY

#define NO_RECOVERY   WSANO_RECOVERY

◆ WSANO_DATA

#define WSANO_DATA   (WSABASEERR+1004)

Valid name, no data record of requested type

◆ NO_DATA

#define NO_DATA   WSANO_DATA

◆ WSANO_ADDRESS

#define WSANO_ADDRESS   WSANO_DATA

no address, look for MX record

◆ NO_ADDRESS

#define NO_ADDRESS   WSANO_ADDRESS

◆ WSA_IO_PENDING

#define WSA_IO_PENDING   ERROR_IO_PENDING

WinSock 2 extension – new error codes and type definition

◆ WSA_IO_INCOMPLETE

#define WSA_IO_INCOMPLETE   ERROR_IO_INCOMPLETE

◆ WSA_INVALID_HANDLE

#define WSA_INVALID_HANDLE   ERROR_INVALID_HANDLE

◆ WSA_INVALID_PARAMETER

#define WSA_INVALID_PARAMETER   ERROR_INVALID_PARAMETER

◆ WSA_NOT_ENOUGH_MEMORY

#define WSA_NOT_ENOUGH_MEMORY   ERROR_NOT_ENOUGH_MEMORY

◆ WSA_OPERATION_ABORTED

#define WSA_OPERATION_ABORTED   ERROR_OPERATION_ABORTED

◆ WSA_INVALID_EVENT

#define WSA_INVALID_EVENT   (WSAEVENT)NULL

◆ WSA_MAXIMUM_WAIT_EVENTS

#define WSA_MAXIMUM_WAIT_EVENTS   MAXIMUM_WAIT_OBJECTS

◆ WSA_WAIT_FAILED

#define WSA_WAIT_FAILED   0xffffffff

◆ WSA_WAIT_EVENT_0

#define WSA_WAIT_EVENT_0   WAIT_OBJECT_0

◆ WSA_WAIT_IO_COMPLETION

#define WSA_WAIT_IO_COMPLETION   WAIT_IO_COMPLETION

◆ WSA_WAIT_TIMEOUT

#define WSA_WAIT_TIMEOUT   WAIT_TIMEOUT

◆ WSA_INFINITE

#define WSA_INFINITE   INFINITE

◆ EWOULDBLOCK

#define EWOULDBLOCK   WSAEWOULDBLOCK

Windows Sockets errors redefined as regular Berkeley error constants. These are commented out in Windows NT to avoid conflicts with errno.h. Use the WSA constants instead.

◆ EINPROGRESS

#define EINPROGRESS   WSAEINPROGRESS

◆ EALREADY

#define EALREADY   WSAEALREADY

◆ ENOTSOCK

#define ENOTSOCK   WSAENOTSOCK

◆ EDESTADDRREQ

#define EDESTADDRREQ   WSAEDESTADDRREQ

◆ EMSGSIZE

#define EMSGSIZE   WSAEMSGSIZE

◆ EPROTOTYPE

#define EPROTOTYPE   WSAEPROTOTYPE

◆ ENOPROTOOPT

#define ENOPROTOOPT   WSAENOPROTOOPT

◆ EPROTONOSUPPORT

#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT

◆ ESOCKTNOSUPPORT

#define ESOCKTNOSUPPORT   WSAESOCKTNOSUPPORT

◆ EOPNOTSUPP

#define EOPNOTSUPP   WSAEOPNOTSUPP

◆ EPFNOSUPPORT

#define EPFNOSUPPORT   WSAEPFNOSUPPORT

◆ EAFNOSUPPORT

#define EAFNOSUPPORT   WSAEAFNOSUPPORT

◆ EADDRINUSE

#define EADDRINUSE   WSAEADDRINUSE

◆ EADDRNOTAVAIL

#define EADDRNOTAVAIL   WSAEADDRNOTAVAIL

◆ ENETDOWN

#define ENETDOWN   WSAENETDOWN

◆ ENETUNREACH

#define ENETUNREACH   WSAENETUNREACH

◆ ENETRESET

#define ENETRESET   WSAENETRESET

◆ ECONNABORTED

#define ECONNABORTED   WSAECONNABORTED

◆ ECONNRESET

#define ECONNRESET   WSAECONNRESET

◆ ENOBUFS

#define ENOBUFS   WSAENOBUFS

◆ EISCONN

#define EISCONN   WSAEISCONN

◆ ENOTCONN

#define ENOTCONN   WSAENOTCONN

◆ ESHUTDOWN

#define ESHUTDOWN   WSAESHUTDOWN

◆ ETOOMANYREFS

#define ETOOMANYREFS   WSAETOOMANYREFS

◆ ETIMEDOUT

#define ETIMEDOUT   WSAETIMEDOUT

◆ ECONNREFUSED

#define ECONNREFUSED   WSAECONNREFUSED

◆ ELOOP

#define ELOOP   WSAELOOP

◆ ENAMETOOLONG

#define ENAMETOOLONG   WSAENAMETOOLONG

◆ EHOSTDOWN

#define EHOSTDOWN   WSAEHOSTDOWN

◆ EHOSTUNREACH

#define EHOSTUNREACH   WSAEHOSTUNREACH

◆ ENOTEMPTY

#define ENOTEMPTY   WSAENOTEMPTY

◆ EPROCLIM

#define EPROCLIM   WSAEPROCLIM

◆ EUSERS

#define EUSERS   WSAEUSERS

◆ EDQUOT

#define EDQUOT   WSAEDQUOT

◆ ESTALE

#define ESTALE   WSAESTALE

◆ EREMOTE

#define EREMOTE   WSAEREMOTE

◆ ENOTREADY

#define ENOTREADY   WSASYSNOTREADY

◆ EVERNOTSUPPORTED

#define EVERNOTSUPPORTED   WSAVERNOTSUPPORTED

◆ ENOTINITIALISED

#define ENOTINITIALISED   WSANOTINITIALISED

◆ WSADESCRIPTION_LEN

#define WSADESCRIPTION_LEN   256

◆ WSASYS_STATUS_LEN

#define WSASYS_STATUS_LEN   128

◆ MAX_PROTOCOL_CHAIN

#define MAX_PROTOCOL_CHAIN   7

◆ BASE_PROTOCOL

#define BASE_PROTOCOL   1

◆ LAYERED_PROTOCOL

#define LAYERED_PROTOCOL   0

◆ WSAPROTOCOL_LEN

#define WSAPROTOCOL_LEN   255

◆ SERVICETYPE_NOTRAFFIC

#define SERVICETYPE_NOTRAFFIC   0x00000000

No data in this direction.

WinSock 2 extension – WSABUF and QOS struct, include qos.h to pull in FLOWSPEC and related definitions

◆ SERVICETYPE_BESTEFFORT

#define SERVICETYPE_BESTEFFORT   0x00000001

Best Effort.

◆ SERVICETYPE_CONTROLLEDLOAD

#define SERVICETYPE_CONTROLLEDLOAD   0x00000002

Controlled Load.

◆ SERVICETYPE_GUARANTEED

#define SERVICETYPE_GUARANTEED   0x00000003

Guaranteed.

◆ SERVICETYPE_NETWORK_UNAVAILABLE

#define SERVICETYPE_NETWORK_UNAVAILABLE   0x00000004

Used to notify change to user.

◆ SERVICETYPE_GENERAL_INFORMATION

#define SERVICETYPE_GENERAL_INFORMATION   0x00000005

corresponds to "General Parameters" defined by IntServ

◆ SERVICETYPE_NOCHANGE

#define SERVICETYPE_NOCHANGE   0x00000006

used to indicate that the flow spec contains no change from any previous one

◆ SERVICE_IMMEDIATE_TRAFFIC_CONTROL

#define SERVICE_IMMEDIATE_TRAFFIC_CONTROL   0x80000000

to turn on immediate traffic control, OR this flag with the ServiceType field in teh FLOWSPEC

◆ CF_ACCEPT

#define CF_ACCEPT   0x0000

WinSock 2 extension – manifest constants for return values of the condition function

◆ CF_REJECT

#define CF_REJECT   0x0001

◆ CF_DEFER

#define CF_DEFER   0x0002

◆ SD_RECEIVE

#define SD_RECEIVE   0x00

WinSock 2 extension – manifest constants for shutdown()

◆ SD_SEND

#define SD_SEND   0x01

◆ SD_BOTH

#define SD_BOTH   0x02

◆ SG_UNCONSTRAINED_GROUP

#define SG_UNCONSTRAINED_GROUP   0x01

WinSock 2 extension – data type and manifest constants for socket groups

◆ SG_CONSTRAINED_GROUP

#define SG_CONSTRAINED_GROUP   0x02

◆ PFL_MULTIPLE_PROTO_ENTRIES

#define PFL_MULTIPLE_PROTO_ENTRIES   0x00000001

Flag bit definitions for dwProviderFlags

◆ PFL_RECOMMENDED_PROTO_ENTRY

#define PFL_RECOMMENDED_PROTO_ENTRY   0x00000002

◆ PFL_HIDDEN

#define PFL_HIDDEN   0x00000004

◆ PFL_MATCHES_PROTOCOL_ZERO

#define PFL_MATCHES_PROTOCOL_ZERO   0x00000008

◆ XP1_CONNECTIONLESS

#define XP1_CONNECTIONLESS   0x00000001

Flag bit definitions for dwServiceFlags1

◆ XP1_GUARANTEED_DELIVERY

#define XP1_GUARANTEED_DELIVERY   0x00000002

◆ XP1_GUARANTEED_ORDER

#define XP1_GUARANTEED_ORDER   0x00000004

◆ XP1_MESSAGE_ORIENTED

#define XP1_MESSAGE_ORIENTED   0x00000008

◆ XP1_PSEUDO_STREAM

#define XP1_PSEUDO_STREAM   0x00000010

◆ XP1_GRACEFUL_CLOSE

#define XP1_GRACEFUL_CLOSE   0x00000020

◆ XP1_EXPEDITED_DATA

#define XP1_EXPEDITED_DATA   0x00000040

◆ XP1_CONNECT_DATA

#define XP1_CONNECT_DATA   0x00000080

◆ XP1_DISCONNECT_DATA

#define XP1_DISCONNECT_DATA   0x00000100

◆ XP1_SUPPORT_BROADCAST

#define XP1_SUPPORT_BROADCAST   0x00000200

◆ XP1_SUPPORT_MULTIPOINT

#define XP1_SUPPORT_MULTIPOINT   0x00000400

◆ XP1_MULTIPOINT_CONTROL_PLANE

#define XP1_MULTIPOINT_CONTROL_PLANE   0x00000800

◆ XP1_MULTIPOINT_DATA_PLANE

#define XP1_MULTIPOINT_DATA_PLANE   0x00001000

◆ XP1_QOS_SUPPORTED

#define XP1_QOS_SUPPORTED   0x00002000

◆ XP1_INTERRUPT

#define XP1_INTERRUPT   0x00004000

◆ XP1_UNI_SEND

#define XP1_UNI_SEND   0x00008000

◆ XP1_UNI_RECV

#define XP1_UNI_RECV   0x00010000

◆ XP1_IFS_HANDLES

#define XP1_IFS_HANDLES   0x00020000

◆ XP1_PARTIAL_MESSAGE

#define XP1_PARTIAL_MESSAGE   0x00040000

◆ BIGENDIAN

#define BIGENDIAN   0x0000

◆ LITTLEENDIAN

#define LITTLEENDIAN   0x0001

◆ SECURITY_PROTOCOL_NONE

#define SECURITY_PROTOCOL_NONE   0x0000

◆ JL_SENDER_ONLY

#define JL_SENDER_ONLY   0x01

WinSock 2 extension – manifest constants for WSAJoinLeaf()

◆ JL_RECEIVER_ONLY

#define JL_RECEIVER_ONLY   0x02

◆ JL_BOTH

#define JL_BOTH   0x04

◆ WSA_FLAG_OVERLAPPED

#define WSA_FLAG_OVERLAPPED   0x01

WinSock 2 extension – manifest constants for WSASocket()

◆ WSA_FLAG_MULTIPOINT_C_ROOT

#define WSA_FLAG_MULTIPOINT_C_ROOT   0x02

◆ WSA_FLAG_MULTIPOINT_C_LEAF

#define WSA_FLAG_MULTIPOINT_C_LEAF   0x04

◆ WSA_FLAG_MULTIPOINT_D_ROOT

#define WSA_FLAG_MULTIPOINT_D_ROOT   0x08

◆ WSA_FLAG_MULTIPOINT_D_LEAF

#define WSA_FLAG_MULTIPOINT_D_LEAF   0x10

◆ IOC_UNIX

#define IOC_UNIX   0x00000000

WinSock 2 extension – manifest constants for WSAIoctl()

◆ IOC_WS2

#define IOC_WS2   0x08000000

◆ IOC_PROTOCOL

#define IOC_PROTOCOL   0x10000000

◆ IOC_VENDOR

#define IOC_VENDOR   0x18000000

◆ SIO_ASSOCIATE_HANDLE

#define SIO_ASSOCIATE_HANDLE   IOC_IN | IOC_WS2 | 1

◆ SIO_ENABLE_CIRCULAR_QUEUEING

#define SIO_ENABLE_CIRCULAR_QUEUEING   IOC_WS2 | 2

◆ SIO_FIND_ROUTE

#define SIO_FIND_ROUTE   IOC_OUT | IOC_WS2 | 3

◆ SIO_FLUSH

#define SIO_FLUSH   IOC_WS2 | 4

◆ SIO_GET_BROADCAST_ADDRESS

#define SIO_GET_BROADCAST_ADDRESS   IOC_OUT | IOC_WS2 | 5

◆ SIO_GET_EXTENSION_FUNCTION_POINTER

#define SIO_GET_EXTENSION_FUNCTION_POINTER   IOC_INOUT | IOC_WS2 | 6

◆ SIO_GET_QOS

#define SIO_GET_QOS   IOC_INOUT | IOC_WS2 | 7

◆ SIO_GET_GROUP_QOS

#define SIO_GET_GROUP_QOS   IOC_INOUT | IOC_WS2 | 8

◆ SIO_MULTIPOINT_LOOPBACK

#define SIO_MULTIPOINT_LOOPBACK   IOC_IN | IOC_WS2 | 9

◆ SIO_MULTICAST_SCOPE

#define SIO_MULTICAST_SCOPE   IOC_IN | IOC_WS2 | 10

◆ SIO_SET_QOS

#define SIO_SET_QOS   IOC_IN | IOC_WS2 | 11

◆ SIO_SET_GROUP_QOS

#define SIO_SET_GROUP_QOS   IOC_IN | IOC_WS2 | 12

◆ SIO_TRANSLATE_HANDLE

#define SIO_TRANSLATE_HANDLE   IOC_INOUT | IOC_WS2 | 13

◆ TH_NETDEV

#define TH_NETDEV   0x00000001

WinSock 2 extension – manifest constants for SIO_TRANSLATE_HANDLE ioctl

◆ TH_TAPI

#define TH_TAPI   0x00000002

◆ SERVICE_MULTIPLE

#define SERVICE_MULTIPLE   0x00000001

◆ NS_ALL

#define NS_ALL   (0)

Name Spaces

◆ NS_SAP

#define NS_SAP   (1)

◆ NS_NDS

#define NS_NDS   (2)

◆ NS_PEER_BROWSE

#define NS_PEER_BROWSE   (3)

◆ NS_TCPIP_LOCAL

#define NS_TCPIP_LOCAL   (10)

◆ NS_TCPIP_HOSTS

#define NS_TCPIP_HOSTS   (11)

◆ NS_DNS

#define NS_DNS   (12)

◆ NS_NETBT

#define NS_NETBT   (13)

◆ NS_WINS

#define NS_WINS   (14)

◆ NS_NBP

#define NS_NBP   (20)

◆ NS_MS

#define NS_MS   (30)

◆ NS_STDA

#define NS_STDA   (31)

◆ NS_NTDS

#define NS_NTDS   (32)

◆ NS_X500

#define NS_X500   (40)

◆ NS_NIS

#define NS_NIS   (41)

◆ NS_NISPLUS

#define NS_NISPLUS   (42)

◆ NS_WRQ

#define NS_WRQ   (50)

◆ RES_UNUSED_1

#define RES_UNUSED_1   0x00000001

Resolution flags for WSAGetAddressByName() Note these are also used by the 1.1 API GetAddressByName, so leave them around.

◆ RES_FLUSH_CACHE

#define RES_FLUSH_CACHE   0x00000002

◆ RES_SERVICE

#define RES_SERVICE   0x00000004

◆ SERVICE_TYPE_VALUE_IPXPORTA

#define SERVICE_TYPE_VALUE_IPXPORTA   "IpxSocket"

Well known value names for Service Types

◆ SERVICE_TYPE_VALUE_IPXPORTW

#define SERVICE_TYPE_VALUE_IPXPORTW   L"IpxSocket"

◆ SERVICE_TYPE_VALUE_SAPIDA

#define SERVICE_TYPE_VALUE_SAPIDA   "SapId"

◆ SERVICE_TYPE_VALUE_SAPIDW

#define SERVICE_TYPE_VALUE_SAPIDW   L"SapId"

◆ SERVICE_TYPE_VALUE_TCPPORTA

#define SERVICE_TYPE_VALUE_TCPPORTA   "TcpPort"

◆ SERVICE_TYPE_VALUE_TCPPORTW

#define SERVICE_TYPE_VALUE_TCPPORTW   L"TcpPort"

◆ SERVICE_TYPE_VALUE_UDPPORTA

#define SERVICE_TYPE_VALUE_UDPPORTA   "UdpPort"

◆ SERVICE_TYPE_VALUE_UDPPORTW

#define SERVICE_TYPE_VALUE_UDPPORTW   L"UdpPort"

◆ SERVICE_TYPE_VALUE_OBJECTIDA

#define SERVICE_TYPE_VALUE_OBJECTIDA   "ObjectId"

◆ SERVICE_TYPE_VALUE_OBJECTIDW

#define SERVICE_TYPE_VALUE_OBJECTIDW   L"ObjectId"

◆ SERVICE_TYPE_VALUE_SAPID

#define SERVICE_TYPE_VALUE_SAPID   SERVICE_TYPE_VALUE_SAPIDA

◆ SERVICE_TYPE_VALUE_TCPPORT

#define SERVICE_TYPE_VALUE_TCPPORT   SERVICE_TYPE_VALUE_TCPPORTA

◆ SERVICE_TYPE_VALUE_UDPPORT

#define SERVICE_TYPE_VALUE_UDPPORT   SERVICE_TYPE_VALUE_UDPPORTA

◆ SERVICE_TYPE_VALUE_OBJECTID

#define SERVICE_TYPE_VALUE_OBJECTID   SERVICE_TYPE_VALUE_OBJECTIDA

◆ LUP_DEEP

#define LUP_DEEP   0x0001

◆ LUP_CONTAINERS

#define LUP_CONTAINERS   0x0002

◆ LUP_NOCONTAINERS

#define LUP_NOCONTAINERS   0x0004

◆ LUP_NEAREST

#define LUP_NEAREST   0x0008

◆ LUP_RETURN_NAME

#define LUP_RETURN_NAME   0x0010

◆ LUP_RETURN_TYPE

#define LUP_RETURN_TYPE   0x0020

◆ LUP_RETURN_VERSION

#define LUP_RETURN_VERSION   0x0040

◆ LUP_RETURN_COMMENT

#define LUP_RETURN_COMMENT   0x0080

◆ LUP_RETURN_ADDR

#define LUP_RETURN_ADDR   0x0100

◆ LUP_RETURN_BLOB

#define LUP_RETURN_BLOB   0x0200

◆ LUP_RETURN_ALIASES

#define LUP_RETURN_ALIASES   0x0400

◆ LUP_RETURN_QUERY_STRING

#define LUP_RETURN_QUERY_STRING   0x0800

◆ LUP_RETURN_ALL

#define LUP_RETURN_ALL   0x0FF0

◆ LUP_RES_SERVICE

#define LUP_RES_SERVICE   0x8000

◆ LUP_FLUSHCACHE

#define LUP_FLUSHCACHE   0x1000

◆ LUP_FLUSHPREVIOUS

#define LUP_FLUSHPREVIOUS   0x2000

◆ RESULT_IS_ALIAS

#define RESULT_IS_ALIAS   0x0001

Return flags

◆ MSG_TRUNC

#define MSG_TRUNC   0x0100

WSARecvMsg flags

◆ MSG_CTRUNC

#define MSG_CTRUNC   0x0200

◆ MSG_BCAST

#define MSG_BCAST   0x0400

◆ MSG_MCAST

#define MSG_MCAST   0x0800

◆ POLLRDNORM

#define POLLRDNORM   0x0100

Event flag definitions for WSAPoll()

◆ POLLRDBAND

#define POLLRDBAND   0x0200

◆ POLLIN

#define POLLIN   (POLLRDNORM | POLLRDBAND)

◆ POLLPRI

#define POLLPRI   0x0400

◆ POLLWRNORM

#define POLLWRNORM   0x0010

◆ POLLOUT

#define POLLOUT   (POLLWRNORM)

◆ POLLWRBAND

#define POLLWRBAND   0x0020

◆ POLLERR

#define POLLERR   0x0001

◆ POLLHUP

#define POLLHUP   0x0002

◆ POLLNVAL

#define POLLNVAL   0x0004

◆ EAI_AGAIN

#define EAI_AGAIN   WSATRY_AGAIN

Error codes from getaddrinfo()

◆ EAI_BADFLAGS

#define EAI_BADFLAGS   WSAEINVAL

◆ EAI_FAIL

#define EAI_FAIL   WSANO_RECOVERY

◆ EAI_FAMILY

#define EAI_FAMILY   WSAEAFNOSUPPORT

◆ EAI_MEMORY

#define EAI_MEMORY   WSA_NOT_ENOUGH_MEMORY

◆ EAI_NONAME

#define EAI_NONAME   WSAHOST_NOT_FOUND

EAI_NODATA = WSANO_DATA;

◆ EAI_SERVICE

#define EAI_SERVICE   WSATYPE_NOT_FOUND

◆ EAI_SOCKTYPE

#define EAI_SOCKTYPE   WSAESOCKTNOSUPPORT

◆ EAI_NODATA

#define EAI_NODATA   EAI_NONAME

◆ AI_PASSIVE

#define AI_PASSIVE   0x00000001

Socket address will be used in bind() call.

Flags used in "hints" argument to getaddrinfo() Note: Under Linux these values may be different

◆ AI_CANONNAME

#define AI_CANONNAME   0x00000002

Return canonical name from DNS in the first ai_canonname (Cannot be used with AI_FQDN).

◆ AI_NUMERICHOST

#define AI_NUMERICHOST   0x00000004

Nodename must be a numeric address string.

◆ AI_NUMERICSERV

#define AI_NUMERICSERV   0x00000008

Servicename must be a numeric port string.

◆ AI_ALL

#define AI_ALL   0x00000100

Return both IPv6 and IPv4 addresses.

◆ AI_ADDRCONFIG

#define AI_ADDRCONFIG   0x00000400

Only return addresses if a global address is configured (IPv4 or IPv6), loopback addresses do not count as global.

◆ AI_V4MAPPED

#define AI_V4MAPPED   0x00000800

Map returned IPv4 addresses to IPv6 address format.

◆ AI_NON_AUTHORITATIVE

#define AI_NON_AUTHORITATIVE   0x00004000

Allow both autoritive and non authoritive return addresses (NS_EMAIL only).

◆ AI_SECURE

#define AI_SECURE   0x00008000

Obtain result using enhanced security only (NS_EMAIL only).

◆ AI_RETURN_PREFERRED_NAMES

#define AI_RETURN_PREFERRED_NAMES   0x00010000

Return preferred names (NS_EMAIL only).

◆ AI_FQDN

#define AI_FQDN   0x00020000

Return the FQDN for the single name specified on NodeName (Cannot be used with AI_CANONNAME).

◆ AI_FILESERVER

#define AI_FILESERVER   0x00040000

The requested name is being used for file sharing (Hint Only).

◆ NI_NOFQDN

#define NI_NOFQDN   0x01

Only return nodename portion for local hosts.

Flags for getnameinfo()

◆ NI_NUMERICHOST

#define NI_NUMERICHOST   0x02

Return numeric form of the host's address.

◆ NI_NAMEREQD

#define NI_NAMEREQD   0x04

Error if the host's name not in DNS.

◆ NI_NUMERICSERV

#define NI_NUMERICSERV   0x08

Return numeric form of the service (port #).

◆ NI_DGRAM

#define NI_DGRAM   0x10

Service is a datagram service.

◆ NI_MAXHOST

#define NI_MAXHOST   1025

Max size of a fully-qualified domain name.

◆ NI_MAXSERV

#define NI_MAXSERV   32

Max size of a service name.

◆ INET_ADDRSTR_ANY

#define INET_ADDRSTR_ANY   "0.0.0.0"

◆ INET6_ADDRSTR_ANY

#define INET6_ADDRSTR_ANY   "::"

◆ INET_ADDRSTR_BROADCAST

#define INET_ADDRSTR_BROADCAST   "255.255.255.255"

◆ INET_ADDRSTRLEN

#define INET_ADDRSTRLEN   16

Max size of numeric form of IPv4 address.

◆ INET6_ADDRSTRLEN

#define INET6_ADDRSTRLEN   46

Max size of numeric form of IPv6 address.

◆ IN6ADDR_ANY_INIT

#define IN6ADDR_ANY_INIT   {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}

◆ IN6ADDR_LOOPBACK_INIT

#define IN6ADDR_LOOPBACK_INIT   {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}

◆ s_addr

#define s_addr   S_un.S_addr

Typedef Documentation

◆ fd_set

typedef struct _fd_set fd_set

◆ wstimeval

typedef struct _wstimeval wstimeval

◆ hostent

typedef struct _hostent hostent

◆ netent

typedef struct _netent netent

◆ servent

typedef struct _servent servent

◆ protoent

typedef struct _protoent protoent

◆ in_addr

typedef struct _in_addr in_addr

◆ in6_addr

typedef struct _in6_addr in6_addr

IPv6 version of above

◆ ipx_addr

typedef struct _ipx_addr ipx_addr

IPX version of above

◆ sockaddr_in

typedef struct _sockaddr_in sockaddr_in

◆ sockaddr_in6

typedef struct _sockaddr_in6 sockaddr_in6

IPv6 version of above

◆ sockaddr_ipx

typedef struct _sockaddr_ipx sockaddr_ipx

IPX version of above

◆ sockaddr

typedef struct _sockaddr sockaddr

Structure used by kernel to store most addresses.

◆ sockproto

typedef struct _sockproto sockproto

Structure used by kernel to pass protocol information in raw sockets.

◆ sockaddr_storage

RFC 2553: protocol-independent placeholder for socket addresses

◆ linger

typedef struct _linger linger

Structure used for manipulating linger option.

◆ WSADATA

typedef struct _WSADATA WSADATA

◆ WSAOVERLAPPED

◆ BLOB

typedef struct _BLOB BLOB

◆ WSABUF

typedef struct _WSABUF WSABUF

WinSock 2 extension – WSABUF and QOS struct, include qos.h to pull in FLOWSPEC and related definitions

◆ SERVICETYPE

typedef int32_t SERVICETYPE

◆ FLOWSPEC

typedef struct _FLOWSPEC FLOWSPEC

◆ QOS

typedef struct _QOS QOS

◆ GROUP

typedef u_long GROUP

◆ WSANETWORKEVENTS

WinSock 2 extension – data type for WSAEnumNetworkEvents()

◆ WSAPROTOCOLCHAIN

◆ WSAPROTOCOL_INFOA

◆ WSAPROTOCOL_INFOW

◆ SOCKET_ADDRESS

SockAddr Information

◆ CSADDR_INFO

typedef struct _CSADDR_INFO CSADDR_INFO

CSAddr Information

◆ SOCKET_ADDRESS_LIST

Address list returned via SIO_ADDRESS_LIST_QUERY

◆ AFPROTOCOLS

typedef struct _AFPROTOCOLS AFPROTOCOLS

Address Family/Protocol Tuples

◆ WSAECOMPARATOR

Client Query API Typedefs The comparators

◆ WSAVERSION

typedef struct _WSAVERSION WSAVERSION

◆ WSAQUERYSETA

typedef struct _WSAQUERYSETA WSAQUERYSETA

◆ WSAQUERYSETW

typedef struct _WSAQUERYSETW WSAQUERYSETW

◆ WSAQUERYSET

◆ WSAMSG

typedef struct _WSAMSG WSAMSG

◆ WSAPOLLFD

typedef struct _WSAPOLLFD WSAPOLLFD

◆ WSAESETSERVICEOP

Service Address Registration and Deregistration Data Types.

◆ WSANSCLASSINFOA

Service Installation/Removal Data Types.

◆ WSANSCLASSINFOW

◆ WSANSCLASSINFO

◆ WSASERVICECLASSINFOA

◆ WSASERVICECLASSINFOW

◆ WSASERVICECLASSINFO

◆ WSANAMESPACE_INFOA

◆ WSANAMESPACE_INFOW

◆ WSANAMESPACE_INFO

◆ LPCONDITIONPROC

typedef int32_t STDCALL(* LPCONDITIONPROC) (WSABUF *lpcallerid, WSABUF *lpcallerdata, QOS *lpsqos, QOS *lpgqos, WSABUF *lpcalleeid, WSABUF *lpcalleedata, GROUP *g, uintptr_t dwcallbackdata)

WinSock 2 extensions – data types for the condition function in WSAAccept() and overlapped I/O completion routine.

◆ LPWSAOVERLAPPED_COMPLETION_ROUTINE

typedef void STDCALL(* LPWSAOVERLAPPED_COMPLETION_ROUTINE) (uint32_t dwerror, uint32_t cbtransferred, WSAOVERLAPPED *lpoverlapped, uint32_t dwflags)

◆ ADDRINFO

typedef struct _ADDRINFO ADDRINFO

Structure used in getaddrinfo() call

Enumeration Type Documentation

◆ _WSAECOMPARATOR

Client Query API Typedefs The comparators

Enumerator
COMP_EQUAL 
COMP_NOTLESS 

◆ _WSAESETSERVICEOP

Service Address Registration and Deregistration Data Types.

Enumerator
RNRSERVICE_REGISTER 
RNRSERVICE_DEREGISTER 
RNRSERVICE_DELETE 

Function Documentation

◆ WS2Start()

BOOL STDCALL WS2Start ( void )

Initialization Functions

◆ WS2Stop()

BOOL STDCALL WS2Stop ( void )

◆ WS2AsyncStart()

void STDCALL WS2AsyncStart ( void * data)

◆ accept()

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 additional information.

Winsock2 Functions

◆ bind()

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 information.

◆ closesocket()

int32_t STDCALL closesocket ( SOCKET s)

Close an existing socket See the Windows Sockets 2 documentation for additional information.

◆ connect()

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 information.

◆ ioctlsocket()

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.

◆ getpeername()

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 documentation for additional information.

◆ getsockname()

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 information.

◆ getsockopt()

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.

◆ htond()

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 Windows Sockets 2 documentation for additional information.

◆ htonf()

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 Windows Sockets 2 documentation for additional information.

◆ htonl()

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 Windows Sockets 2 documentation for additional information.

◆ htonll()

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 the Windows Sockets 2 documentation for additional information.

◆ htons()

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 Windows Sockets 2 documentation for additional information.

◆ inet_addr()

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 structure.

Note
Address will be returned in network byte order See the Windows Sockets 2 documentation for additional information

◆ inet_ntoa()

char *STDCALL inet_ntoa ( in_addr inaddr)

Convert an (IPv4) Internet network address into an ASCII string in Internet standard dotted-decimal format As per the Winsock specification, the buffer returned by this function is only guaranteed to be valid until the next Winsock function call is made within the same thread. Therefore, the data should be copied before another Winsock call.

Note
Address will be in network byte order See the Windows Sockets 2 documentation for additional information

◆ listen()

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 documentation for additional information.

◆ ntohd()

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 the Windows Sockets 2 documentation for additional information.

◆ ntohf()

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 the Windows Sockets 2 documentation for additional information.

◆ ntohl()

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 documentation for additional information.

◆ ntohll()

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 documentation for additional information.

◆ ntohs()

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 documentation for additional information.

◆ recv()

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 documentation for additional information.

◆ recvfrom()

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 additional information.

◆ select()

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.

Note
All sockets contained by the FDSet must be of the same type See the Windows Sockets 2 documentation for additional information

◆ send()

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.

◆ sendto()

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 information.

◆ setsockopt()

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.

overload;

◆ shutdown()

int32_t STDCALL shutdown ( SOCKET s,
int32_t how )

Disable sends or receives on a socket See the Windows Sockets 2 documentation for additional information.

◆ socket()

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 documentation for additional information.

◆ gethostbyaddr()

hostent *STDCALL gethostbyaddr ( void * addr,
int32_t len,
int32_t family )

Retrieve the host information corresponding to a network address.

Note
Address will be in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ gethostbyname()

hostent *STDCALL gethostbyname ( const char * name)

Retrieve network address corresponding to a host name See the Windows Sockets 2 documentation for additional information.

◆ gethostname()

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 additional information.

◆ getservbyport()

servent *STDCALL getservbyport ( int32_t port,
const char * proto )

Retrieve service information corresponding to a port and protocol.

Note
Port will be in network byte order See the Windows Sockets 2 documentation for additional information

◆ getservbyname()

servent *STDCALL getservbyname ( const char * name,
const char * proto )

Retrieve service information corresponding to a service name and protocol See the Windows Sockets 2 documentation for additional information.

◆ getprotobynumber()

protoent *STDCALL getprotobynumber ( int32_t proto)

Retrieve protocol information corresponding to a protocol number See the Windows Sockets 2 documentation for additional information.

◆ getprotobyname()

protoent *STDCALL getprotobyname ( const char * name)

Retrieve the protocol information corresponding to a protocol name See the Windows Sockets 2 documentation for additional information.

◆ getaddrinfo()

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 documentation for additional information.

◆ freeaddrinfo()

void STDCALL freeaddrinfo ( ADDRINFO * ai)

Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures See the Windows Sockets 2 documentation for additional information.

◆ getnameinfo()

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 service name See the Windows Sockets 2 documentation for additional information.

◆ WSAStartup()

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 information.

◆ WSACleanup()

int32_t STDCALL WSACleanup ( void )

Terminate use of Winsock 2 by an application See the Windows Sockets 2 documentation for additional information.

◆ WSASetLastError()

void STDCALL WSASetLastError ( int32_t ierror)

Set the error code that can be retrieved through the WSAGetLastError function See the Windows Sockets 2 documentation for additional information.

◆ WSAGetLastError()

int32_t STDCALL WSAGetLastError ( void )

Return the error status for the last Windows Sockets operation that failed See the Windows Sockets 2 documentation for additional information.

◆ WSAIsBlocking()

BOOL STDCALL WSAIsBlocking ( void )

◆ WSAUnhookBlockingHook()

int32_t STDCALL WSAUnhookBlockingHook ( void )

◆ WSASetBlockingHook()

FARPROC STDCALL WSASetBlockingHook ( FARPROC lpblockfunc)

◆ WSACancelBlockingCall()

int32_t STDCALL WSACancelBlockingCall ( void )

◆ WSAAsyncGetServByName()

HANDLE STDCALL WSAAsyncGetServByName ( HWND hwindow,
u_int wmsg,
const char * name,
const char * proto,
char * buf,
int32_t buflen )

◆ WSAAsyncGetServByPort()

HANDLE STDCALL WSAAsyncGetServByPort ( HWND hwindow,
u_int wmsg,
u_int port,
const char * proto,
char * buf,
int32_t buflen )

◆ WSAAsyncGetProtoByName()

HANDLE STDCALL WSAAsyncGetProtoByName ( HWND hwindow,
u_int wmsg,
const char * name,
char * buf,
int32_t buflen )

◆ WSAAsyncGetProtoByNumber()

HANDLE STDCALL WSAAsyncGetProtoByNumber ( HWND hwindow,
u_int wmsg,
int32_t number,
char * buf,
int32_t buflen )

◆ WSAAsyncGetHostByName()

HANDLE STDCALL WSAAsyncGetHostByName ( HWND hwindow,
u_int wmsg,
const char * name,
char * buf,
int32_t buflen )

◆ WSAAsyncGetHostByAddr()

HANDLE STDCALL WSAAsyncGetHostByAddr ( HWND hwindow,
u_int wmsg,
const char * addr,
int32_t len,
int32_t family,
char * buf,
int32_t buflen )

◆ WSACancelAsyncRequest()

int32_t STDCALL WSACancelAsyncRequest ( HANDLE hasynctaskhandle)

◆ WSAAsyncSelect()

int32_t STDCALL WSAAsyncSelect ( SOCKET s,
HWND hwindow,
u_int wmsg,
int32_t levent )

◆ __WSAFDIsSet()

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 Sockets 2 documentation for additional information.

◆ inet_pton()

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 numeric binary form.

WinSock 2 API new function prototypes

Note
Address will be returned in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ InetPtonA()

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 numeric binary form.

Note
Address will be returned in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ InetPtonW()

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 numeric binary form.

Note
Address will be returned in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ inet_ntop()

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.

Note
Address will be in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ InetNtopA()

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.

Note
Address will be in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ InetNtopW()

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.

Note
Address will be in network byte order where applicable See the Windows Sockets 2 documentation for additional information

◆ WSAAccept()

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 transfer of connection data See the Windows Sockets 2 documentation for additional information.

◆ WSACloseEvent()

BOOL STDCALL WSACloseEvent ( WSAEVENT hevent)

Close the handle to an event object and free resources associated with the event object See the Windows Sockets 2 documentation for additional information.

◆ WSAConnect()

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.

Note
The lpCallerData, lpCalleeData, lpSQOS and lpGQOS parameters are currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSAConnectByList()

BOOL STDCALL WSAConnectByList ( SOCKET s,
SOCKET_ADDRESS_LIST * socketaddresslist,
uint32_t * localaddresslength,
SOCKADDR * localaddress,
uint32_t * remoteaddresslength,
SOCKADDR * remoteaddress,
wstimeval * timeout,
WSAOVERLAPPED * reserved )

◆ WSAConnectByNameA()

BOOL STDCALL WSAConnectByNameA ( SOCKET s,
char * nodename,
char * servicename,
uint32_t * localaddresslength,
SOCKADDR * localaddress,
uint32_t * remoteaddresslength,
SOCKADDR * remoteaddress,
wstimeval * timeout,
WSAOVERLAPPED * reserved )

◆ WSAConnectByNameW()

BOOL STDCALL WSAConnectByNameW ( SOCKET s,
WCHAR * nodename,
WCHAR * servicename,
uint32_t * localaddresslength,
SOCKADDR * localaddress,
uint32_t * remoteaddresslength,
SOCKADDR * remoteaddress,
wstimeval * timeout,
WSAOVERLAPPED * reserved )

◆ WSACreateEvent()

WSAEVENT STDCALL WSACreateEvent ( void )

Create a manual reset event object with an initial state of unsignaled See the Windows Sockets 2 documentation for additional information.

◆ WSADuplicateSocketA()

int32_t STDCALL WSADuplicateSocketA ( SOCKET s,
uint32_t dwprocessid,
WSAPROTOCOL_INFOA * lpprotocolinfo )

◆ WSADuplicateSocketW()

int32_t STDCALL WSADuplicateSocketW ( SOCKET s,
uint32_t dwprocessid,
WSAPROTOCOL_INFOW * lpprotocolinfo )

◆ WSAEnumNetworkEvents()

int32_t STDCALL WSAEnumNetworkEvents ( SOCKET s,
WSAEVENT heventobject,
WSANETWORKEVENTS * lpnetworkevents )

Discover occurrences of network events for the indicated socket, clear internal network event records, and reset event objects See the Windows Sockets 2 documentation for additional information.

◆ WSAEnumProtocolsA()

int32_t STDCALL WSAEnumProtocolsA ( int32_t * lpiprotocols,
WSAPROTOCOL_INFOA * lpprotocolbuffer,
uint32_t * lpdwbufferlength )

◆ WSAEnumProtocolsW()

int32_t STDCALL WSAEnumProtocolsW ( int32_t * lpiprotocols,
WSAPROTOCOL_INFOW * lpprotocolbuffer,
uint32_t * lpdwbufferlength )

◆ WSAEventSelect()

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 Windows Sockets 2 documentation for additional information.

◆ WSAGetOverlappedResult()

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 documentation for additional information.

◆ WSAGetQosByName()

BOOL STDCALL WSAGetQosByName ( SOCKET s,
WSABUF * lpqosname,
QOS * lpqos )

◆ WSAHtonl()

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 for additional information.

◆ WSAHtons()

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 for additional information.

◆ WSAIoctl()

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.

◆ WSAJoinLeaf()

SOCKET STDCALL WSAJoinLeaf ( SOCKET s,
SOCKADDR * name,
int32_t namelen,
WSABUF * lpcallerdata,
WSABUF * lpcalleedata,
QOS * lpsqos,
QOS * lpgqos,
uint32_t dwflags )

◆ WSANtohl()

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 for additional information.

◆ WSANtohs()

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 for additional information.

◆ WSAPoll()

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 information.

◆ WSAProviderConfigChange()

int32_t STDCALL WSAProviderConfigChange ( HANDLE * lpnotificationhandle,
WSAOVERLAPPED * lpoverlapped,
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpcompletionroutine )

◆ WSARecv()

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 documentation for additional information.

◆ WSARecvDisconnect()

int32_t STDCALL WSARecvDisconnect ( SOCKET s,
WSABUF * lpinbounddisconnectdata )

◆ WSARecvFrom()

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 additional information.

◆ WSARecvMsg()

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.

Note
The Control field of lpMsg parameter is currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSAResetEvent()

BOOL STDCALL WSAResetEvent ( WSAEVENT hevent)

Reset the state of the specified event object to unsignaled See the Windows Sockets 2 documentation for additional information.

◆ WSASend()

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.

◆ WSASendDisconnect()

int32_t STDCALL WSASendDisconnect ( SOCKET s,
WSABUF * lpoutbounddisconnectdata )

◆ WSASendTo()

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 documentation for additional information.

◆ WSASendMsg()

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.

Note
The Control field of lpMsg parameter is currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSASetEvent()

BOOL STDCALL WSASetEvent ( WSAEVENT hevent)

Set the state of the specified event object to signaled See the Windows Sockets 2 documentation for additional information.

◆ WSASocketA()

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.

Note
The WSAProtocol_InfoA and GROUP parameters are currently ignored The only currently supported flag value is WSA_FLAG_OVERLAPPED See the Windows Sockets 2 documentation for additional information

◆ WSASocketW()

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.

Note
The WSAProtocol_InfoW and GROUP parameters are currently ignored The only currently supported flag value is WSA_FLAG_OVERLAPPED See the Windows Sockets 2 documentation for additional information

◆ WSAWaitForMultipleEvents()

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 interval to expire See the Windows Sockets 2 documentation for additional information.

◆ WSAAddressToStringA()

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 address.

Note
Address will be in network byte order where applicable
The lpProtocolInfo parameter is currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSAAddressToStringW()

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 address.

Note
Address will be in network byte order where applicable
The lpProtocolInfo parameter is currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSAStringToAddressA()

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 sockaddr structure.

Note
Address will be returned in network byte order where applicable
The lpProtocolInfo parameter is currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSAStringToAddressW()

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 sockaddr structure.

Note
Address will be returned in network byte order where applicable
The lpProtocolInfo parameter is currently ignored See the Windows Sockets 2 documentation for additional information

◆ WSALookupServiceBeginA()

int32_t STDCALL WSALookupServiceBeginA ( WSAQUERYSETA * lpqsrestrictions,
uint32_t dwcontrolflags,
HANDLE * lphlookup )

Registration and Name Resolution API functions

◆ WSALookupServiceBeginW()

int32_t STDCALL WSALookupServiceBeginW ( WSAQUERYSETW * lpqsrestrictions,
uint32_t dwcontrolflags,
HANDLE * lphlookup )

◆ WSALookupServiceNextA()

int32_t STDCALL WSALookupServiceNextA ( HANDLE hlookup,
uint32_t dwcontrolflags,
uint32_t * lpdwbufferlength,
WSAQUERYSETA * lpqsresults )

◆ WSALookupServiceNextW()

int32_t STDCALL WSALookupServiceNextW ( HANDLE hlookup,
uint32_t dwcontrolflags,
uint32_t * lpdwbufferlength,
WSAQUERYSETW * lpqsresults )

◆ WSALookupServiceEnd()

int32_t STDCALL WSALookupServiceEnd ( HANDLE hlookup)

◆ WSAInstallServiceClassA()

int32_t STDCALL WSAInstallServiceClassA ( WSASERVICECLASSINFOA * lpserviceclassinfo)

◆ WSAInstallServiceClassW()

int32_t STDCALL WSAInstallServiceClassW ( WSASERVICECLASSINFOW * lpserviceclassinfo)

◆ WSARemoveServiceClass()

int32_t STDCALL WSARemoveServiceClass ( GUID * lpserviceclassid)

◆ WSAGetServiceClassInfoA()

int32_t STDCALL WSAGetServiceClassInfoA ( GUID * lpproviderid,
GUID * lpserviceclassid,
uint32_t * lpdwbufsize,
WSASERVICECLASSINFOA * lpserviceclassinfo )

◆ WSAGetServiceClassInfoW()

int32_t STDCALL WSAGetServiceClassInfoW ( GUID * lpproviderid,
GUID * lpserviceclassid,
uint32_t * lpdwbufsize,
WSASERVICECLASSINFOW * lpserviceclassinfo )

◆ WSAEnumNameSpaceProvidersA()

int32_t STDCALL WSAEnumNameSpaceProvidersA ( uint32_t * lpdwbufferlength,
WSANAMESPACE_INFOA * lpnspbuffer )

◆ WSAEnumNameSpaceProvidersW()

int32_t STDCALL WSAEnumNameSpaceProvidersW ( uint32_t * lpdwbufferlength,
WSANAMESPACE_INFOW * lpnspbuffer )

◆ WSAGetServiceClassNameByClassIdA()

int32_t STDCALL WSAGetServiceClassNameByClassIdA ( GUID * lpserviceclassid,
char * lpszserviceclassname,
uint32_t * lpdwbufferlength )

◆ WSAGetServiceClassNameByClassIdW()

int32_t STDCALL WSAGetServiceClassNameByClassIdW ( GUID * lpserviceclassid,
WCHAR * lpszserviceclassname,
uint32_t * lpdwbufferlength )

◆ WSASetServiceA()

int32_t STDCALL WSASetServiceA ( WSAQUERYSETA * lpqsreginfo,
WSAESETSERVICEOP essoperation,
uint32_t dwcontrolflags )

◆ WSASetServiceW()

int32_t STDCALL WSASetServiceW ( WSAQUERYSETW * lpqsreginfo,
WSAESETSERVICEOP essoperation,
uint32_t dwcontrolflags )

◆ WSAMakeSyncReply()

int32_t STDCALL WSAMakeSyncReply ( uint16_t buflen,
uint16_t error )

◆ WSAMakeSelectReply()

int32_t STDCALL WSAMakeSelectReply ( uint16_t event,
uint16_t error )

◆ WSAGetAsyncBuflen()

uint16_t STDCALL WSAGetAsyncBuflen ( int32_t param)

◆ WSAGetAsyncError()

uint16_t STDCALL WSAGetAsyncError ( int32_t param)

◆ WSAGetSelectEvent()

uint16_t STDCALL WSAGetSelectEvent ( int32_t param)

◆ WSAGetSelectError()

uint16_t STDCALL WSAGetSelectError ( int32_t param)

◆ FD_CLR()

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.

◆ FD_ISSET()

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 information.

◆ FD_SET()

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.

◆ FD_ZERO()

void STDCALL FD_ZERO ( fd_set * fdset)

Initialize an fd_set to null See the Windows Sockets 2 documentation for additional information.

◆ WsControl()

int STDCALL WsControl ( uint32_t proto,
uint32_t action,
void * prequestinfo,
uint32_t * pcbrequestinfolen,
void * presponseinfo,
uint32_t * pcbresponseinfolen )

Winsock2 Undocumented Functions

◆ getnetbyaddr()

netent *STDCALL getnetbyaddr ( void * addr,
int len,
int type )

Retrieve the network information corresponding to a network address.

Note
Address will be in network byte order where applicable

◆ getnetbyname()

netent *STDCALL getnetbyname ( const char * name)

Retrieve network address corresponding to a network name.

◆ WsControlEx()

int STDCALL WsControlEx ( uint32_t proto,
uint32_t action,
void * prequestinfo,
uint32_t * pcbrequestinfolen,
void * presponseinfo,
uint32_t * pcbresponseinfolen )

Winsock2 Enhanced Functions

◆ Winsock2RedirectInput()

BOOL STDCALL Winsock2RedirectInput ( SOCKET s)

Redirect standard input to the socket specified by s.

Winsock2 Helper Functions

Parameters
sThe socket to redirect input to (or INVALID_SOCKET to stop redirection)
Returns
True if completed successfully or False if an error occurred
Note
Redirects the input of the text file Input which also redirects the input of Read, ReadLn and the standard C library

◆ Winsock2RedirectOutput()

BOOL STDCALL Winsock2RedirectOutput ( SOCKET s)

Redirect standard output to the socket specified by s.

Parameters
sThe socket to redirect output to (or INVALID_SOCKET to stop redirection)
Returns
True if completed successfully or False if an error occurred
Note
Redirects the output of the text files Output, ErrOutput, StdOut and StdErr which also redirects the output of Write, WriteLn and the standard C library

◆ Winsock2ErrorToString()

uint32_t STDCALL Winsock2ErrorToString ( int32_t error,
char * string,
uint32_t len )