Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
winsock.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  _sockaddr_in
struct  _WSADATA
struct  _TRANSMIT_FILE_BUFFERS
struct  _sockaddr
struct  _sockproto
struct  _linger
struct  _ip_mreq

Macros

#define _WINSOCKAPI_
#define WINSOCK_VERSION   0x0101
#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 INADDR_ANY   0x00000000
#define INADDR_LOOPBACK   0x7F000001
#define INADDR_BROADCAST   0xFFFFFFFF
#define INADDR_NONE   0xFFFFFFFF
#define IN_CLASSA_NET   0xff000000
#define IN_CLASSA_NSHIFT   24
#define IN_CLASSA_HOST   0x00ffffff
#define IN_CLASSA_MAX   128
#define IN_CLASSB_NET   0xffff0000
#define IN_CLASSB_NSHIFT   16
#define IN_CLASSB_HOST   0x0000ffff
#define IN_CLASSB_MAX   65536
#define IN_CLASSC_NET   0xffffff00
#define IN_CLASSC_NSHIFT   8
#define IN_CLASSC_HOST   0x000000ff
#define WSADESCRIPTION_LEN   256
#define WSASYS_STATUS_LEN   128
#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 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   5
#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_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   0x01
#define FD_WRITE   0x02
#define FD_OOB   0x04
#define FD_ACCEPT   0x08
#define FD_CONNECT   0x10
#define FD_CLOSE   0x20
#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 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 s_addr   S_un.S_addr

Typedefs

typedef unsigned char u_char
typedef unsigned short u_short
typedef unsigned int u_int
typedef unsigned long u_long
typedef char MBChar
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 _sockaddr_in sockaddr_in
typedef struct _WSADATA WSADATA
typedef struct _TRANSMIT_FILE_BUFFERS TRANSMIT_FILE_BUFFERS
typedef struct _sockaddr sockaddr
typedef sockaddr SOCKADDR
typedef struct _sockproto sockproto
typedef struct _linger linger
typedef struct _ip_mreq ip_mreq

Functions

BOOL STDCALL WSStart (void)
BOOL STDCALL WSStop (void)
void STDCALL WSAsyncStart (void *data)
SOCKET STDCALL accept (SOCKET s, SOCKADDR *addr, int *addrlen)
 Accept an incoming connection attempt on a socket See the Windows Sockets documentation for additional information.
int STDCALL bind (SOCKET s, SOCKADDR *addr, int namelen)
 Associate a local address with a socket See the Windows Sockets documentation for additional information.
int STDCALL closesocket (SOCKET s)
 Close an existing socket See the Windows Sockets documentation for additional information.
int STDCALL connect (SOCKET s, SOCKADDR *name, int namelen)
 Establish a connection to a specified socket See the Windows Sockets documentation for additional information.
int STDCALL ioctlsocket (SOCKET s, int32_t cmd, u_long *arg)
 Control the I/O mode of a socket See the Windows Sockets documentation for additional information.
int STDCALL getpeername (SOCKET s, SOCKADDR *name, int *namelen)
 Retrieve the address of the peer to which a socket is connected See the Windows Sockets documentation for additional information.
int STDCALL getsockname (SOCKET s, SOCKADDR *name, int *namelen)
 Retrieve the local name for a socket See the Windows Sockets documentation for additional information.
int STDCALL getsockopt (SOCKET s, int level, int optname, char *optval, int *optlen)
 Retrieve a socket option See the Windows Sockets 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 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 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.
int STDCALL listen (SOCKET s, int backlog)
 Place a socket in a state in which it is listening for incoming connections See the Windows Sockets 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 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 documentation for additional information.
int STDCALL recv (SOCKET s, char *buf, int len, int flags)
 Receive data from a connected socket or a bound connectionless socket See the Windows Sockets documentation for additional information.
int STDCALL recvfrom (SOCKET s, char *buf, int len, int flags, SOCKADDR *from, int *fromlen)
 Receive a datagram and store the source address See the Windows Sockets documentation for additional information.
int STDCALL select (int 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.
int STDCALL send (SOCKET s, const char *buf, int len, int flags)
 Send data on a connected socket See the Windows Sockets documentation for additional information.
int STDCALL sendto (SOCKET s, const char *buf, int len, int flags, SOCKADDR *toaddr, int tolen)
 Send data to a specific destination See the Windows Sockets documentation for additional information.
int STDCALL setsockopt (SOCKET s, int level, int optname, const char *optval, int optlen)
 Set a socket option See the Windows Sockets documentation for additional information.
int STDCALL shutdown (SOCKET s, int how)
 Disable sends or receives on a socket See the Windows Sockets documentation for additional information.
SOCKET STDCALL socket (int af, int type, int protocol)
 Create a socket that is bound to a specific transport service provider See the Windows Sockets documentation for additional information.
hostent *STDCALL gethostbyaddr (const char *addr, int len, int 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 documentation for additional information.
int STDCALL gethostname (char *name, int namelen)
 Retrieve the standard host name for the local computer See the Windows Sockets documentation for additional information.
servent *STDCALL getservbyport (int 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 documentation for additional information.
protoent *STDCALL getprotobynumber (int proto)
 Retrieve protocol information corresponding to a protocol number See the Windows Sockets documentation for additional information.
protoent *STDCALL getprotobyname (const char *name)
 Retrieve the protocol information corresponding to a protocol name See the Windows Sockets documentation for additional information.
int STDCALL WSAStartup (uint16_t wversionrequired, WSADATA *wsadata)
 Initiate use of Winsock by an application See the Windows Sockets documentation for additional information.
int STDCALL WSACleanup (void)
 Terminate use of Winsock by an application See the Windows Sockets documentation for additional information.
void STDCALL WSASetLastError (int ierror)
 Set the error code that can be retrieved through the WSAGetLastError function See the Windows Sockets documentation for additional information.
int STDCALL WSAGetLastError (void)
 Return the error status for the last Windows Sockets operation that failed See the Windows Sockets documentation for additional information.
BOOL STDCALL WSAIsBlocking (void)
int STDCALL WSAUnhookBlockingHook (void)
FARPROC STDCALL WSASetBlockingHook (FARPROC lpblockfunc)
int STDCALL WSACancelBlockingCall (void)
HANDLE STDCALL WSAAsyncGetServByName (HWND hwnd, u_int wmsg, const char *name, const char *proto, char *buf, int buflen)
HANDLE STDCALL WSAAsyncGetServByPort (HWND hwnd, u_int wmsg, int port, const char *proto, char *buf, int buflen)
HANDLE STDCALL WSAAsyncGetProtoByName (HWND hwnd, u_int wmsg, const char *name, char *buf, int buflen)
HANDLE STDCALL WSAAsyncGetProtoByNumber (HWND hwnd, u_int wmsg, int number, char *buf, int buflen)
HANDLE STDCALL WSAAsyncGetHostByName (HWND hwnd, u_int wmsg, const char *name, char *buf, int buflen)
HANDLE STDCALL WSAAsyncGetHostByAddr (HWND hwnd, u_int wmsg, const char *addr, int len, int family, char *buf, int buflen)
int STDCALL WSACancelAsyncRequest (HANDLE hasynctaskhandle)
int STDCALL WSAAsyncSelect (SOCKET s, HWND hwnd, u_int wmsg, int32_t levent)
int STDCALL WSARecvEx (SOCKET s, char *buf, int len, int *flags)
 Receive data from a connected socket or a bound connectionless socket See the Windows Sockets documentation for additional information.
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 documentation for additional information.
int 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 documentation for additional information.
BOOL STDCALL TransmitFile (SOCKET hsocket, HANDLE hfile, uint32_t nnumberofbytestowrite, uint32_t nnumberofbytespersend, OVERLAPPED *lpoverlapped, TRANSMIT_FILE_BUFFERS *lptransmitbuffers, uint32_t dwreserved)
BOOL STDCALL AcceptEx (SOCKET slistensocket, SOCKET sacceptsocket, void *lpoutputbuffer, uint32_t dwreceivedatalength, uint32_t dwlocaladdresslength, uint32_t dwremoteaddresslength, uint32_t *lpdwbytesreceived, OVERLAPPED *lpoverlapped)
void STDCALL GetAcceptExSockaddrs (void *lpoutputbuffer, uint32_t dwreceivedatalength, uint32_t dwlocaladdresslength, uint32_t dwremoteaddresslength, SOCKADDR **localsockaddr, int *localsockaddrlength, SOCKADDR **remotesockaddr, int *remotesockaddrlength)
uint32_t STDCALL WSAMakeSyncReply (uint16_t buflen, uint16_t error)
uint32_t STDCALL WSAMakeSelectReply (uint16_t event, uint16_t error)
uint16_t STDCALL WSAGetAsyncBuflen (uint32_t param)
uint16_t STDCALL WSAGetAsyncError (uint32_t param)
uint16_t STDCALL WSAGetSelectEvent (uint32_t param)
uint16_t STDCALL WSAGetSelectError (uint32_t param)
void STDCALL FD_CLR (SOCKET socket, fd_set *fdset)
 Remove a socket from an fd_set See the Windows Sockets 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 documentation for additional information.
void STDCALL FD_SET (SOCKET socket, fd_set *fdset)
 Add a socket to an fd_set See the Windows Sockets documentation for additional information.
void STDCALL FD_ZERO (fd_set *fdset)
 Initialize an fd_set to null See the Windows Sockets 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 WinsockRedirectInput (SOCKET s)
 Redirect standard input to the socket specified by s.
BOOL STDCALL WinsockRedirectOutput (SOCKET s)
 Redirect standard output to the socket specified by s.
uint32_t STDCALL WinsockErrorToString (int32_t error, char *string, uint32_t len)

Macro Definition Documentation

◆ _WINSOCKAPI_

#define _WINSOCKAPI_

◆ WINSOCK_VERSION

#define WINSOCK_VERSION   0x0101

Note: To use winsock.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 Winsock 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

◆ INADDR_ANY

#define INADDR_ANY   0x00000000

◆ INADDR_LOOPBACK

#define INADDR_LOOPBACK   0x7F000001

◆ INADDR_BROADCAST

#define INADDR_BROADCAST   0xFFFFFFFF

◆ INADDR_NONE

#define INADDR_NONE   0xFFFFFFFF

◆ IN_CLASSA_NET

#define IN_CLASSA_NET   0xff000000

◆ IN_CLASSA_NSHIFT

#define IN_CLASSA_NSHIFT   24

◆ IN_CLASSA_HOST

#define IN_CLASSA_HOST   0x00ffffff

◆ IN_CLASSA_MAX

#define IN_CLASSA_MAX   128

◆ IN_CLASSB_NET

#define IN_CLASSB_NET   0xffff0000

◆ IN_CLASSB_NSHIFT

#define IN_CLASSB_NSHIFT   16

◆ IN_CLASSB_HOST

#define IN_CLASSB_HOST   0x0000ffff

◆ IN_CLASSB_MAX

#define IN_CLASSB_MAX   65536

◆ IN_CLASSC_NET

#define IN_CLASSC_NET   0xffffff00

◆ IN_CLASSC_NSHIFT

#define IN_CLASSC_NSHIFT   8

◆ IN_CLASSC_HOST

#define IN_CLASSC_HOST   0x000000ff

◆ WSADESCRIPTION_LEN

#define WSADESCRIPTION_LEN   256

◆ WSASYS_STATUS_LEN

#define WSASYS_STATUS_LEN   128

◆ 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

◆ 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   5

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_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

#define FD_READ   0x01

Define flags to be used with the WSAAsyncSelect() call.

◆ FD_WRITE

#define FD_WRITE   0x02

◆ FD_OOB

#define FD_OOB   0x04

◆ FD_ACCEPT

#define FD_ACCEPT   0x08

◆ FD_CONNECT

#define FD_CONNECT   0x10

◆ FD_CLOSE

#define FD_CLOSE   0x20

◆ 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

◆ 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

◆ s_addr

#define s_addr   S_un.S_addr

Typedef Documentation

◆ u_char

typedef unsigned char u_char

Global Socket types

Winsock2 specific types

◆ u_short

typedef unsigned short u_short

◆ u_int

typedef unsigned int u_int

◆ u_long

typedef unsigned long u_long

◆ MBChar

typedef char MBChar

◆ 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

◆ sockaddr_in

typedef struct _sockaddr_in sockaddr_in

◆ WSADATA

typedef struct _WSADATA WSADATA

◆ TRANSMIT_FILE_BUFFERS

◆ sockaddr

typedef struct _sockaddr sockaddr

Structure used by kernel to store most addresses.

◆ SOCKADDR

typedef sockaddr SOCKADDR

◆ sockproto

typedef struct _sockproto sockproto

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

◆ linger

typedef struct _linger linger

Structure used for manipulating linger option.

◆ ip_mreq

typedef struct _ip_mreq ip_mreq

Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP

Function Documentation

◆ WSStart()

BOOL STDCALL WSStart ( void )

Initialization Functions

◆ WSStop()

BOOL STDCALL WSStop ( void )

◆ WSAsyncStart()

void STDCALL WSAsyncStart ( void * data)

◆ accept()

SOCKET STDCALL accept ( SOCKET s,
SOCKADDR * addr,
int * addrlen )

Accept an incoming connection attempt on a socket See the Windows Sockets documentation for additional information.

Winsock Functions

◆ bind()

int STDCALL bind ( SOCKET s,
SOCKADDR * addr,
int namelen )

Associate a local address with a socket See the Windows Sockets documentation for additional information.

◆ closesocket()

int STDCALL closesocket ( SOCKET s)

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

◆ connect()

int STDCALL connect ( SOCKET s,
SOCKADDR * name,
int namelen )

Establish a connection to a specified socket See the Windows Sockets documentation for additional information.

◆ ioctlsocket()

int STDCALL ioctlsocket ( SOCKET s,
int32_t cmd,
u_long * arg )

Control the I/O mode of a socket See the Windows Sockets documentation for additional information.

◆ getpeername()

int STDCALL getpeername ( SOCKET s,
SOCKADDR * name,
int * namelen )

Retrieve the address of the peer to which a socket is connected See the Windows Sockets documentation for additional information.

◆ getsockname()

int STDCALL getsockname ( SOCKET s,
SOCKADDR * name,
int * namelen )

Retrieve the local name for a socket See the Windows Sockets documentation for additional information.

◆ getsockopt()

int STDCALL getsockopt ( SOCKET s,
int level,
int optname,
char * optval,
int * optlen )

Retrieve a socket option See the Windows Sockets 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 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 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 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 documentation for additional information

◆ listen()

int STDCALL listen ( SOCKET s,
int backlog )

Place a socket in a state in which it is listening for incoming connections See the Windows Sockets 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 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 documentation for additional information.

◆ recv()

int STDCALL recv ( SOCKET s,
char * buf,
int len,
int flags )

Receive data from a connected socket or a bound connectionless socket See the Windows Sockets documentation for additional information.

◆ recvfrom()

int STDCALL recvfrom ( SOCKET s,
char * buf,
int len,
int flags,
SOCKADDR * from,
int * fromlen )

Receive a datagram and store the source address See the Windows Sockets documentation for additional information.

◆ select()

int STDCALL select ( int 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 documentation for additional information

◆ send()

int STDCALL send ( SOCKET s,
const char * buf,
int len,
int flags )

Send data on a connected socket See the Windows Sockets documentation for additional information.

◆ sendto()

int STDCALL sendto ( SOCKET s,
const char * buf,
int len,
int flags,
SOCKADDR * toaddr,
int tolen )

Send data to a specific destination See the Windows Sockets documentation for additional information.

◆ setsockopt()

int STDCALL setsockopt ( SOCKET s,
int level,
int optname,
const char * optval,
int optlen )

Set a socket option See the Windows Sockets documentation for additional information.

◆ shutdown()

int STDCALL shutdown ( SOCKET s,
int how )

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

◆ socket()

SOCKET STDCALL socket ( int af,
int type,
int protocol )

Create a socket that is bound to a specific transport service provider See the Windows Sockets documentation for additional information.

◆ gethostbyaddr()

hostent *STDCALL gethostbyaddr ( const char * addr,
int len,
int family )

Retrieve the host information corresponding to a network address.

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

◆ gethostbyname()

hostent *STDCALL gethostbyname ( const char * name)

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

◆ gethostname()

int STDCALL gethostname ( char * name,
int namelen )

Retrieve the standard host name for the local computer See the Windows Sockets documentation for additional information.

◆ getservbyport()

servent *STDCALL getservbyport ( int 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 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 documentation for additional information.

◆ getprotobynumber()

protoent *STDCALL getprotobynumber ( int proto)

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

◆ getprotobyname()

protoent *STDCALL getprotobyname ( const char * name)

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

◆ WSAStartup()

int STDCALL WSAStartup ( uint16_t wversionrequired,
WSADATA * wsadata )

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

◆ WSACleanup()

int STDCALL WSACleanup ( void )

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

◆ WSASetLastError()

void STDCALL WSASetLastError ( int ierror)

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

◆ WSAGetLastError()

int STDCALL WSAGetLastError ( void )

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

◆ WSAIsBlocking()

BOOL STDCALL WSAIsBlocking ( void )

◆ WSAUnhookBlockingHook()

int STDCALL WSAUnhookBlockingHook ( void )

◆ WSASetBlockingHook()

FARPROC STDCALL WSASetBlockingHook ( FARPROC lpblockfunc)

◆ WSACancelBlockingCall()

int STDCALL WSACancelBlockingCall ( void )

◆ WSAAsyncGetServByName()

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

◆ WSAAsyncGetServByPort()

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

◆ WSAAsyncGetProtoByName()

HANDLE STDCALL WSAAsyncGetProtoByName ( HWND hwnd,
u_int wmsg,
const char * name,
char * buf,
int buflen )

◆ WSAAsyncGetProtoByNumber()

HANDLE STDCALL WSAAsyncGetProtoByNumber ( HWND hwnd,
u_int wmsg,
int number,
char * buf,
int buflen )

◆ WSAAsyncGetHostByName()

HANDLE STDCALL WSAAsyncGetHostByName ( HWND hwnd,
u_int wmsg,
const char * name,
char * buf,
int buflen )

◆ WSAAsyncGetHostByAddr()

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

◆ WSACancelAsyncRequest()

int STDCALL WSACancelAsyncRequest ( HANDLE hasynctaskhandle)

◆ WSAAsyncSelect()

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

◆ WSARecvEx()

int STDCALL WSARecvEx ( SOCKET s,
char * buf,
int len,
int * flags )

Receive data from a connected socket or a bound connectionless socket See the Windows Sockets documentation for additional information.

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

◆ __WSAFDIsSet_()

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

◆ TransmitFile()

BOOL STDCALL TransmitFile ( SOCKET hsocket,
HANDLE hfile,
uint32_t nnumberofbytestowrite,
uint32_t nnumberofbytespersend,
OVERLAPPED * lpoverlapped,
TRANSMIT_FILE_BUFFERS * lptransmitbuffers,
uint32_t dwreserved )

◆ AcceptEx()

BOOL STDCALL AcceptEx ( SOCKET slistensocket,
SOCKET sacceptsocket,
void * lpoutputbuffer,
uint32_t dwreceivedatalength,
uint32_t dwlocaladdresslength,
uint32_t dwremoteaddresslength,
uint32_t * lpdwbytesreceived,
OVERLAPPED * lpoverlapped )

◆ GetAcceptExSockaddrs()

void STDCALL GetAcceptExSockaddrs ( void * lpoutputbuffer,
uint32_t dwreceivedatalength,
uint32_t dwlocaladdresslength,
uint32_t dwremoteaddresslength,
SOCKADDR ** localsockaddr,
int * localsockaddrlength,
SOCKADDR ** remotesockaddr,
int * remotesockaddrlength )

◆ WSAMakeSyncReply()

uint32_t STDCALL WSAMakeSyncReply ( uint16_t buflen,
uint16_t error )

◆ WSAMakeSelectReply()

uint32_t STDCALL WSAMakeSelectReply ( uint16_t event,
uint16_t error )

◆ WSAGetAsyncBuflen()

uint16_t STDCALL WSAGetAsyncBuflen ( uint32_t param)

◆ WSAGetAsyncError()

uint16_t STDCALL WSAGetAsyncError ( uint32_t param)

◆ WSAGetSelectEvent()

uint16_t STDCALL WSAGetSelectEvent ( uint32_t param)

◆ WSAGetSelectError()

uint16_t STDCALL WSAGetSelectError ( uint32_t param)

◆ FD_CLR()

void STDCALL FD_CLR ( SOCKET socket,
fd_set * fdset )

Remove a socket from an fd_set See the Windows Sockets 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 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 documentation for additional information.

◆ FD_ZERO()

void STDCALL FD_ZERO ( fd_set * fdset)

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

◆ WsControl()

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

Winsock 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 )

Winsock Enhanced Functions

◆ WinsockRedirectInput()

BOOL STDCALL WinsockRedirectInput ( SOCKET s)

Redirect standard input to the socket specified by s.

Winsock 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

◆ WinsockRedirectOutput()

BOOL STDCALL WinsockRedirectOutput ( 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

◆ WinsockErrorToString()

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