ReactOS 0.4.16-dev-122-g325d74c
winsock.h File Reference
#include <windows.h>
#include <inaddr.h>
Include dependency graph for winsock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fd_set
 
struct  timeval
 
struct  hostent
 
struct  linger
 
struct  netent
 
struct  servent
 
struct  protoent
 
struct  sockaddr
 
struct  sockaddr_in
 
struct  WSAData
 
struct  ip_mreq
 
struct  sockproto
 
struct  _TRANSMIT_FILE_BUFFERS
 

Macros

#define _WINSOCKAPI_
 
#define _GNU_H_WINDOWS32_SOCKETS
 
#define _BSDTYPES_DEFINED
 
#define FD_SETSIZE   64
 
#define SD_RECEIVE   0x00
 
#define SD_SEND   0x01
 
#define SD_BOTH   0x02
 
#define FD_CLR(fd, set)
 
#define FD_SET(fd, set)
 
#define FD_ZERO(set)   (((fd_set FAR*)(set))->fd_count=0)
 
#define FD_ISSET(fd, set)   __WSAFDIsSet((SOCKET)(fd), (fd_set FAR*)(set))
 
#define _TIMEVAL_DEFINED
 
#define timerisset(tvp)   ((tvp)->tv_sec || (tvp)->tv_usec)
 
#define timercmp(tvp, uvp, cmp)
 
#define timerclear(tvp)   (tvp)->tv_sec = (tvp)->tv_usec = 0
 
#define h_addr   h_addr_list[0]
 
#define _IO(x, y)   (IOC_VOID|((x)<<8)|(y))
 
#define _IOR(x, y, t)   (IOC_OUT|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
 
#define _IOW(x, y, t)   (IOC_IN|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
 
#define FIONBIO   _IOW('f', 126, u_long)
 
#define IP_OPTIONS   1
 
#define SO_DEBUG   1
 
#define SO_ACCEPTCONN   2
 
#define SO_REUSEADDR   4
 
#define SO_KEEPALIVE   8
 
#define SO_DONTROUTE   16
 
#define SO_BROADCAST   32
 
#define SO_USELOOPBACK   64
 
#define SO_LINGER   128
 
#define SO_OOBINLINE   256
 
#define SO_DONTLINGER   (u_int)(~SO_LINGER)
 
#define SO_SNDBUF   0x1001
 
#define SO_RCVBUF   0x1002
 
#define SO_SNDLOWAT   0x1003
 
#define SO_RCVLOWAT   0x1004
 
#define SO_SNDTIMEO   0x1005
 
#define SO_RCVTIMEO   0x1006
 
#define SO_ERROR   0x1007
 
#define SO_TYPE   0x1008
 
#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_MAXDG   0x7009
 
#define SO_MAXPATHDG   0x700A
 
#define SO_UPDATE_ACCEPT_CONTEXT   0x700B
 
#define SO_CONNECT_TIME   0x700C
 
#define SO_SYNCHRONOUS_ALERT   0x10
 
#define SO_SYNCHRONOUS_NONALERT   0x20
 
#define AF_MAX   24
 
#define MSG_OOB   1
 
#define MSG_PEEK   2
 
#define MSG_DONTROUTE   4
 
#define h_errno   WSAGetLastError()
 
#define HOST_NOT_FOUND   WSAHOST_NOT_FOUND
 
#define TRY_AGAIN   WSATRY_AGAIN
 
#define NO_RECOVERY   WSANO_RECOVERY
 
#define NO_DATA   WSANO_DATA
 
#define NO_ADDRES   WSANO_ADDRESS
 
#define IOCPARM_MASK   0x7f
 
#define IOC_VOID   0x20000000
 
#define IOC_OUT   0x40000000
 
#define IOC_IN   0x80000000
 
#define IOC_INOUT   (IOC_IN|IOC_OUT)
 
#define FIONREAD   _IOR('f', 127, u_long)
 
#define FIOASYNC   _IOW('f', 125, u_long)
 
#define SIOCSHIWAT   _IOW('s', 0, u_long)
 
#define SIOCGHIWAT   _IOR('s', 1, u_long)
 
#define SIOCSLOWAT   _IOW('s', 2, u_long)
 
#define SIOCGLOWAT   _IOR('s', 3, u_long)
 
#define SIOCATMARK   _IOR('s', 7, u_long)
 
#define IPPROTO_IP   0
 
#define IPPROTO_ICMP   1
 
#define IPPROTO_IGMP   2
 
#define IPPROTO_GGP   3
 
#define IPPROTO_TCP   6
 
#define IPPROTO_PUP   12
 
#define IPPROTO_UDP   17
 
#define IPPROTO_IDP   22
 
#define IPPROTO_ND   77
 
#define IPPROTO_RAW   255
 
#define IPPROTO_MAX   256
 
#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_MTP   57
 
#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 IN_CLASSA(i)   ((LONG)(i)&0x80000000)
 
#define IN_CLASSA_NET   0xff000000
 
#define IN_CLASSA_NSHIFT   24
 
#define IN_CLASSA_HOST   0x00ffffff
 
#define IN_CLASSA_MAX   128
 
#define IN_CLASSB(i)   (((LONG)(i)&0xc0000000)==0x80000000)
 
#define IN_CLASSB_NET   0xffff0000
 
#define IN_CLASSB_NSHIFT   16
 
#define IN_CLASSB_HOST   0x0000ffff
 
#define IN_CLASSB_MAX   65536
 
#define IN_CLASSC(i)   (((LONG)(i)&0xe0000000)==0xc0000000)
 
#define IN_CLASSC_NET   0xffffff00
 
#define IN_CLASSC_NSHIFT   8
 
#define IN_CLASSC_HOST   0xff
 
#define INADDR_ANY   (u_long)0
 
#define INADDR_LOOPBACK   0x7f000001
 
#define INADDR_BROADCAST   (u_long)0xffffffff
 
#define INADDR_NONE   0xffffffff
 
#define WSADESCRIPTION_LEN   256
 
#define WSASYS_STATUS_LEN   128
 
#define IP_MULTICAST_IF   2
 
#define IP_MULTICAST_TTL   3
 
#define IP_MULTICAST_LOOP   4
 
#define IP_ADD_MEMBERSHIP   5
 
#define IP_DROP_MEMBERSHIP   6
 
#define IP_TTL   7
 
#define IP_TOS   8
 
#define IP_DONTFRAGMENT   9
 
#define IP_DEFAULT_MULTICAST_TTL   1
 
#define IP_DEFAULT_MULTICAST_LOOP   1
 
#define IP_MAX_MEMBERSHIPS   20
 
#define INVALID_SOCKET   (SOCKET)(~0)
 
#define SOCKET_ERROR   (-1)
 
#define SOCK_STREAM   1
 
#define SOCK_DGRAM   2
 
#define SOCK_RAW   3
 
#define SOCK_RDM   4
 
#define SOCK_SEQPACKET   5
 
#define TCP_NODELAY   0x0001
 
#define TCP_BSDURGENT   0x7000
 
#define AF_UNSPEC   0
 
#define AF_UNIX   1
 
#define AF_INET   2
 
#define AF_IMPLINK   3
 
#define AF_PUP   4
 
#define AF_CHAOS   5
 
#define AF_IPX   6
 
#define AF_NS   6
 
#define AF_ISO   7
 
#define AF_OSI   AF_ISO
 
#define AF_ECMA   8
 
#define AF_DATAKIT   9
 
#define AF_CCITT   10
 
#define AF_SNA   11
 
#define AF_DECnet   12
 
#define AF_DLI   13
 
#define AF_LAT   14
 
#define AF_HYLINK   15
 
#define AF_APPLETALK   16
 
#define AF_NETBIOS   17
 
#define AF_VOICEVIEW   18
 
#define AF_FIREFOX   19
 
#define AF_UNKNOWN1   20
 
#define AF_BAN   21
 
#define AF_ATM   22
 
#define AF_INET6   23
 
#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_MAX   AF_MAX
 
#define SOL_SOCKET   0xffff
 
#define SOMAXCONN   5
 
#define MSG_MAXIOVLEN   16
 
#define MSG_PARTIAL   0x8000
 
#define MAXGETHOSTSTRUCT   1024
 
#define FD_READ   1
 
#define FD_WRITE   2
 
#define FD_OOB   4
 
#define FD_ACCEPT   8
 
#define FD_CONNECT   16
 
#define FD_CLOSE   32
 
#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 WSASYSNOTREADY   (WSABASEERR+91)
 
#define WSAVERNOTSUPPORTED   (WSABASEERR+92)
 
#define WSANOTINITIALISED   (WSABASEERR+93)
 
#define WSAEDISCON   (WSABASEERR+101)
 
#define WSAHOST_NOT_FOUND   (WSABASEERR+1001)
 
#define WSATRY_AGAIN   (WSABASEERR+1002)
 
#define WSANO_RECOVERY   (WSABASEERR+1003)
 
#define WSANO_DATA   (WSABASEERR+1004)
 
#define WSA_SECURE_HOST_NOT_FOUND   (WSABASEERR+1032)
 
#define WSA_IPSEC_NAME_POLICY_ERROR   (WSABASEERR+1033)
 
#define WSANO_ADDRESS   WSANO_DATA
 
#define TF_DISCONNECT   0x01
 
#define TF_REUSE_SOCKET   0x02
 
#define TF_WRITE_BEHIND   0x04
 
#define WSAMAKEASYNCREPLY(b, e)   MAKELONG(b,e)
 
#define WSAMAKESELECTREPLY(e, error)   MAKELONG(e,error)
 
#define WSAGETASYNCBUFLEN(l)   LOWORD(l)
 
#define WSAGETASYNCERROR(l)   HIWORD(l)
 
#define WSAGETSELECTEVENT(l)   LOWORD(l)
 
#define WSAGETSELECTERROR(l)   HIWORD(l)
 

Typedefs

typedef unsigned char u_char
 
typedef unsigned short u_short
 
typedef unsigned int u_int
 
typedef unsigned long u_long
 
typedef UINT_PTR SOCKET
 
typedef struct fd_set fd_set
 
typedef struct sockaddr SOCKADDR
 
typedef struct sockaddrPSOCKADDR
 
typedef struct sockaddrLPSOCKADDR
 
typedef struct sockaddr_in SOCKADDR_IN
 
typedef struct sockaddr_inPSOCKADDR_IN
 
typedef struct sockaddr_inLPSOCKADDR_IN
 
typedef struct linger LINGER
 
typedef struct lingerPLINGER
 
typedef struct lingerLPLINGER
 
typedef struct fd_set FD_SET
 
typedef struct fd_setPFD_SET
 
typedef struct fd_setLPFD_SET
 
typedef struct hostent HOSTENT
 
typedef struct hostentPHOSTENT
 
typedef struct hostentLPHOSTENT
 
typedef struct servent SERVENT
 
typedef struct serventPSERVENT
 
typedef struct serventLPSERVENT
 
typedef struct protoent PROTOENT
 
typedef struct protoentPPROTOENT
 
typedef struct protoentLPPROTOENT
 
typedef struct timeval TIMEVAL
 
typedef struct timevalPTIMEVAL
 
typedef struct timevalLPTIMEVAL
 
typedef struct WSAData WSADATA
 
typedef struct WSADataLPWSADATA
 
typedef struct _TRANSMIT_FILE_BUFFERS TRANSMIT_FILE_BUFFERS
 
typedef struct _TRANSMIT_FILE_BUFFERSPTRANSMIT_FILE_BUFFERS
 
typedef struct _TRANSMIT_FILE_BUFFERSLPTRANSMIT_FILE_BUFFERS
 

Functions

int PASCAL __WSAFDIsSet (SOCKET, fd_set FAR *)
 
u_long PASCAL htonl (u_long)
 
u_long PASCAL ntohl (u_long)
 
u_short PASCAL htons (u_short)
 
u_short PASCAL ntohs (u_short)
 
int PASCAL select (int nfds, fd_set *, fd_set *, fd_set *, const struct timeval *)
 
int PASCAL gethostname (char *, int)
 
SOCKET PASCAL FAR accept (_In_ SOCKET s, _Out_writes_bytes_opt_(*addrlen) struct sockaddr FAR *addr, _Inout_opt_ int FAR *addrlen)
 
int PASCAL FAR bind (_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *addr, _In_ int namelen)
 
int PASCAL FAR closesocket (_In_ SOCKET s)
 
int PASCAL FAR connect (_In_ SOCKET s, _In_reads_bytes_(namelen) const struct sockaddr FAR *name, _In_ int namelen)
 
int PASCAL FAR ioctlsocket (_In_ SOCKET s, _In_ long cmd, _Inout_ u_long FAR *argp)
 
int PASCAL FAR getpeername (_In_ SOCKET s, _Out_writes_bytes_to_(*namelen, *namelen) struct sockaddr FAR *name, _Inout_ int FAR *namelen)
 
int PASCAL FAR getsockname (_In_ SOCKET s, _Out_writes_bytes_to_(*namelen, *namelen) struct sockaddr FAR *name, _Inout_ int FAR *namelen)
 
int PASCAL FAR getsockopt (_In_ SOCKET s, _In_ int level, _In_ int optname, _Out_writes_bytes_(*optlen) char FAR *optval, _Inout_ int FAR *optlen)
 
u_long PASCAL FAR htonl (_In_ u_long hostlong)
 
u_short PASCAL FAR htons (_In_ u_short hostshort)
 
unsigned long PASCAL FAR inet_addr (_In_z_ const char FAR *cp)
 
char FAR *PASCAL FAR inet_ntoa (_In_ struct in_addr in)
 
int PASCAL FAR listen (_In_ SOCKET s, _In_ int backlog)
 
u_long PASCAL FAR ntohl (_In_ u_long netlong)
 
u_short PASCAL FAR ntohs (_In_ u_short netshort)
 
int PASCAL FAR recv (_In_ SOCKET s, _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, _In_ int len, _In_ int flags)
 
int PASCAL FAR recvfrom (_In_ SOCKET s, _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, _In_ int len, _In_ int flags, _Out_writes_bytes_to_opt_(*fromlen, *fromlen) struct sockaddr FAR *from, _Inout_opt_ int FAR *fromlen)
 
int PASCAL FAR select (_In_ int nfds, _Inout_opt_ fd_set FAR *readfds, _Inout_opt_ fd_set FAR *writefds, _Inout_opt_ fd_set FAR *exceptfds, _In_opt_ const struct timeval FAR *timeout)
 
int PASCAL FAR send (_In_ SOCKET s, _In_reads_bytes_(len) const char FAR *buf, _In_ int len, _In_ int flags)
 
int PASCAL FAR sendto (_In_ SOCKET s, _In_reads_bytes_(len) const char FAR *buf, _In_ int len, _In_ int flags, _In_reads_bytes_opt_(tolen) const struct sockaddr FAR *to, _In_ int tolen)
 
int PASCAL FAR setsockopt (_In_ SOCKET s, _In_ int level, _In_ int optname, _In_reads_bytes_opt_(optlen) const char FAR *optval, _In_ int optlen)
 
int PASCAL FAR shutdown (_In_ SOCKET s, _In_ int how)
 
SOCKET PASCAL FAR socket (_In_ int af, _In_ int type, _In_ int protocol)
 
struct hostent FAR *PASCAL FAR gethostbyaddr (_In_reads_bytes_(len) const char FAR *addr, _In_ int len, _In_ int type)
 
struct hostent FAR *PASCAL FAR gethostbyname (_In_z_ const char FAR *name)
 
int PASCAL FAR gethostname (_Out_writes_bytes_to_(namelen, return) char FAR *name, _In_ int namelen)
 
struct servent FAR *PASCAL FAR getservbyport (_In_ int port, _In_z_ const char FAR *proto)
 
struct servent FAR *PASCAL FAR getservbyname (_In_z_ const char FAR *name, _In_z_ const char FAR *proto)
 
struct protoent FAR *PASCAL FAR getprotobynumber (_In_ int number)
 
struct protoent FAR *PASCAL FAR getprotobyname (_In_z_ const char FAR *name)
 
int PASCAL FAR WSAStartup (_In_ WORD wVersionRequired, _Out_ LPWSADATA lpWSAData)
 
int PASCAL FAR WSACleanup (void)
 
void PASCAL FAR WSASetLastError (_In_ int iError)
 
int PASCAL FAR WSAGetLastError (void)
 
BOOL PASCAL FAR WSAIsBlocking (void)
 
int PASCAL FAR WSAUnhookBlockingHook (void)
 
FARPROC PASCAL FAR WSASetBlockingHook (_In_ FARPROC lpBlockFunc)
 
int PASCAL FAR WSACancelBlockingCall (void)
 
HANDLE PASCAL FAR WSAAsyncGetServByName (_In_ HWND hWnd, _In_ u_int wMsg, _In_z_ const char FAR *name, _In_z_ const char FAR *proto, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
 
HANDLE PASCAL FAR WSAAsyncGetServByPort (_In_ HWND hWnd, _In_ u_int wMsg, _In_ int port, _In_ const char FAR *proto, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
 
HANDLE PASCAL FAR WSAAsyncGetProtoByName (_In_ HWND hWnd, _In_ u_int wMsg, _In_z_ const char FAR *name, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
 
HANDLE PASCAL FAR WSAAsyncGetProtoByNumber (_In_ HWND hWnd, _In_ u_int wMsg, _In_ int number, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
 
HANDLE PASCAL FAR WSAAsyncGetHostByName (_In_ HWND hWnd, _In_ u_int wMsg, _In_z_ const char FAR *name, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
 
HANDLE PASCAL FAR WSAAsyncGetHostByAddr (_In_ HWND hWnd, _In_ u_int wMsg, _In_ const char FAR *addr, _In_ int len, _In_ int type, _Out_writes_bytes_(buflen) char FAR *buf, _In_ int buflen)
 
int PASCAL FAR WSACancelAsyncRequest (_In_ HANDLE hAsyncTaskHandle)
 
int PASCAL FAR WSAAsyncSelect (_In_ SOCKET s, _In_ HWND hWnd, _In_ u_int wMsg, _In_ long lEvent)
 
int PASCAL FAR WSARecvEx (_In_ SOCKET s, _Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR *buf, _In_ int len, _Inout_ int FAR *flags)
 
BOOL PASCAL FAR TransmitFile (_In_ SOCKET hSocket, _In_ HANDLE hFile, _In_ DWORD nNumberOfBytesToWrite, _In_ DWORD nNumberOfBytesPerSend, _Inout_opt_ LPOVERLAPPED lpOverlapped, _In_opt_ LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, _In_ DWORD dwReserved)
 
BOOL PASCAL FAR AcceptEx (_In_ SOCKET sListenSocket, _In_ SOCKET sAcceptSocket, _Out_writes_bytes_to_(dwReceiveDataLength+dwLocalAddressLength+dwRemoteAddressLength, *lpdwBytesReceived) PVOID lpOutputBuffer, _In_ DWORD dwReceiveDataLength, _In_ DWORD dwLocalAddressLength, _In_ DWORD dwRemoteAddressLength, _Out_ LPDWORD lpdwBytesReceived, _Inout_ LPOVERLAPPED lpOverlapped)
 
VOID PASCAL FAR GetAcceptExSockaddrs (_In_reads_bytes_(dwReceiveDataLength+dwLocalAddressLength+dwRemoteAddressLength) PVOID lpOutputBuffer, _In_ DWORD dwReceiveDataLength, _In_ DWORD dwLocalAddressLength, _In_ DWORD dwRemoteAddressLength, _Outptr_result_bytebuffer_(*LocalSockaddrLength) struct sockaddr **LocalSockaddr, _Out_ LPINT LocalSockaddrLength, _Outptr_result_bytebuffer_(*RemoteSockaddrLength) struct sockaddr **RemoteSockaddr, _Out_ LPINT RemoteSockaddrLength)
 

Macro Definition Documentation

◆ _BSDTYPES_DEFINED

#define _BSDTYPES_DEFINED

Definition at line 43 of file winsock.h.

◆ _GNU_H_WINDOWS32_SOCKETS

#define _GNU_H_WINDOWS32_SOCKETS

Definition at line 24 of file winsock.h.

◆ _IO

#define _IO (   x,
  y 
)    (IOC_VOID|((x)<<8)|(y))

Definition at line 146 of file winsock.h.

◆ _IOR

#define _IOR (   x,
  y,
  t 
)    (IOC_OUT|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))

Definition at line 147 of file winsock.h.

◆ _IOW

#define _IOW (   x,
  y,
  t 
)    (IOC_IN|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))

Definition at line 148 of file winsock.h.

◆ _TIMEVAL_DEFINED

#define _TIMEVAL_DEFINED

Definition at line 113 of file winsock.h.

◆ _WINSOCKAPI_

#define _WINSOCKAPI_

Definition at line 12 of file winsock.h.

◆ AF_APPLETALK

#define AF_APPLETALK   16

Definition at line 362 of file winsock.h.

◆ AF_ATM

#define AF_ATM   22

Definition at line 368 of file winsock.h.

◆ AF_BAN

#define AF_BAN   21

Definition at line 367 of file winsock.h.

◆ AF_CCITT

#define AF_CCITT   10

Definition at line 356 of file winsock.h.

◆ AF_CHAOS

#define AF_CHAOS   5

Definition at line 349 of file winsock.h.

◆ AF_DATAKIT

#define AF_DATAKIT   9

Definition at line 355 of file winsock.h.

◆ AF_DECnet

#define AF_DECnet   12

Definition at line 358 of file winsock.h.

◆ AF_DLI

#define AF_DLI   13

Definition at line 359 of file winsock.h.

◆ AF_ECMA

#define AF_ECMA   8

Definition at line 354 of file winsock.h.

◆ AF_FIREFOX

#define AF_FIREFOX   19

Definition at line 365 of file winsock.h.

◆ AF_HYLINK

#define AF_HYLINK   15

Definition at line 361 of file winsock.h.

◆ AF_IMPLINK

#define AF_IMPLINK   3

Definition at line 347 of file winsock.h.

◆ AF_INET

#define AF_INET   2

Definition at line 346 of file winsock.h.

◆ AF_INET6

#define AF_INET6   23

Definition at line 369 of file winsock.h.

◆ AF_IPX

#define AF_IPX   6

Definition at line 350 of file winsock.h.

◆ AF_ISO

#define AF_ISO   7

Definition at line 352 of file winsock.h.

◆ AF_LAT

#define AF_LAT   14

Definition at line 360 of file winsock.h.

◆ AF_MAX

#define AF_MAX   24

Definition at line 214 of file winsock.h.

◆ AF_NETBIOS

#define AF_NETBIOS   17

Definition at line 363 of file winsock.h.

◆ AF_NS

#define AF_NS   6

Definition at line 351 of file winsock.h.

◆ AF_OSI

#define AF_OSI   AF_ISO

Definition at line 353 of file winsock.h.

◆ AF_PUP

#define AF_PUP   4

Definition at line 348 of file winsock.h.

◆ AF_SNA

#define AF_SNA   11

Definition at line 357 of file winsock.h.

◆ AF_UNIX

#define AF_UNIX   1

Definition at line 345 of file winsock.h.

◆ AF_UNKNOWN1

#define AF_UNKNOWN1   20

Definition at line 366 of file winsock.h.

◆ AF_UNSPEC

#define AF_UNSPEC   0

Definition at line 344 of file winsock.h.

◆ AF_VOICEVIEW

#define AF_VOICEVIEW   18

Definition at line 364 of file winsock.h.

◆ FD_ACCEPT

#define FD_ACCEPT   8

Definition at line 408 of file winsock.h.

◆ FD_CLOSE

#define FD_CLOSE   32

Definition at line 410 of file winsock.h.

◆ FD_CLR

#define FD_CLR (   fd,
  set 
)
Value:
do { u_int __i;\
for (__i = 0; __i < ((fd_set FAR*)(set))->fd_count ; __i++) {\
if (((fd_set FAR*)(set))->fd_array[__i] == (fd)) {\
while (__i < ((fd_set FAR*)(set))->fd_count-1) {\
((fd_set FAR*)(set))->fd_array[__i] = ((fd_set FAR*)(set))->fd_array[__i+1];\
__i++;\
}\
((fd_set FAR*)(set))->fd_count--;\
break;\
}\
}\
} while (0)
Definition: _set.h:50
UINT32 u_int
Definition: types.h:82
#define FAR
Definition: zlib.h:34
static int fd
Definition: io.c:51
Definition: winsock.h:66

Definition at line 74 of file winsock.h.

◆ FD_CONNECT

#define FD_CONNECT   16

Definition at line 409 of file winsock.h.

◆ FD_ISSET

#define FD_ISSET (   fd,
  set 
)    __WSAFDIsSet((SOCKET)(fd), (fd_set FAR*)(set))

Definition at line 100 of file winsock.h.

◆ FD_OOB

#define FD_OOB   4

Definition at line 407 of file winsock.h.

◆ FD_READ

#define FD_READ   1

Definition at line 405 of file winsock.h.

◆ FD_SET

#define FD_SET (   fd,
  set 
)
Value:
do { \
if (((fd_set FAR*)(set))->fd_count < FD_SETSIZE) \
((fd_set FAR*)(set))->fd_array[((fd_set FAR*)(set))->fd_count++]=(fd);\
}while (0)
#define FD_SETSIZE
Definition: winsock.h:50

Definition at line 89 of file winsock.h.

◆ FD_SETSIZE

#define FD_SETSIZE   64

Definition at line 50 of file winsock.h.

◆ FD_WRITE

#define FD_WRITE   2

Definition at line 406 of file winsock.h.

◆ FD_ZERO

#define FD_ZERO (   set)    (((fd_set FAR*)(set))->fd_count=0)

Definition at line 96 of file winsock.h.

◆ FIOASYNC

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

Definition at line 248 of file winsock.h.

◆ FIONBIO

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

Definition at line 149 of file winsock.h.

◆ FIONREAD

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

Definition at line 247 of file winsock.h.

◆ h_addr

#define h_addr   h_addr_list[0]

Definition at line 131 of file winsock.h.

◆ h_errno

#define h_errno   WSAGetLastError()

Definition at line 225 of file winsock.h.

◆ HOST_NOT_FOUND

#define HOST_NOT_FOUND   WSAHOST_NOT_FOUND

Definition at line 226 of file winsock.h.

◆ IMPLINK_HIGHEXPER

#define IMPLINK_HIGHEXPER   158

Definition at line 293 of file winsock.h.

◆ IMPLINK_IP

#define IMPLINK_IP   155

Definition at line 291 of file winsock.h.

◆ IMPLINK_LOWEXPER

#define IMPLINK_LOWEXPER   156

Definition at line 292 of file winsock.h.

◆ IN_CLASSA

#define IN_CLASSA (   i)    ((LONG)(i)&0x80000000)

Definition at line 297 of file winsock.h.

◆ IN_CLASSA_HOST

#define IN_CLASSA_HOST   0x00ffffff

Definition at line 300 of file winsock.h.

◆ IN_CLASSA_MAX

#define IN_CLASSA_MAX   128

Definition at line 301 of file winsock.h.

◆ IN_CLASSA_NET

#define IN_CLASSA_NET   0xff000000

Definition at line 298 of file winsock.h.

◆ IN_CLASSA_NSHIFT

#define IN_CLASSA_NSHIFT   24

Definition at line 299 of file winsock.h.

◆ IN_CLASSB

#define IN_CLASSB (   i)    (((LONG)(i)&0xc0000000)==0x80000000)

Definition at line 302 of file winsock.h.

◆ IN_CLASSB_HOST

#define IN_CLASSB_HOST   0x0000ffff

Definition at line 305 of file winsock.h.

◆ IN_CLASSB_MAX

#define IN_CLASSB_MAX   65536

Definition at line 306 of file winsock.h.

◆ IN_CLASSB_NET

#define IN_CLASSB_NET   0xffff0000

Definition at line 303 of file winsock.h.

◆ IN_CLASSB_NSHIFT

#define IN_CLASSB_NSHIFT   16

Definition at line 304 of file winsock.h.

◆ IN_CLASSC

#define IN_CLASSC (   i)    (((LONG)(i)&0xe0000000)==0xc0000000)

Definition at line 307 of file winsock.h.

◆ IN_CLASSC_HOST

#define IN_CLASSC_HOST   0xff

Definition at line 310 of file winsock.h.

◆ IN_CLASSC_NET

#define IN_CLASSC_NET   0xffffff00

Definition at line 308 of file winsock.h.

◆ IN_CLASSC_NSHIFT

#define IN_CLASSC_NSHIFT   8

Definition at line 309 of file winsock.h.

◆ INADDR_ANY

#define INADDR_ANY   (u_long)0

Definition at line 311 of file winsock.h.

◆ INADDR_BROADCAST

#define INADDR_BROADCAST   (u_long)0xffffffff

Definition at line 313 of file winsock.h.

◆ INADDR_LOOPBACK

#define INADDR_LOOPBACK   0x7f000001

Definition at line 312 of file winsock.h.

◆ INADDR_NONE

#define INADDR_NONE   0xffffffff

Definition at line 314 of file winsock.h.

◆ INVALID_SOCKET

#define INVALID_SOCKET   (SOCKET)(~0)

Definition at line 332 of file winsock.h.

◆ IOC_IN

#define IOC_IN   0x80000000

Definition at line 244 of file winsock.h.

◆ IOC_INOUT

#define IOC_INOUT   (IOC_IN|IOC_OUT)

Definition at line 245 of file winsock.h.

◆ IOC_OUT

#define IOC_OUT   0x40000000

Definition at line 243 of file winsock.h.

◆ IOC_VOID

#define IOC_VOID   0x20000000

Definition at line 242 of file winsock.h.

◆ IOCPARM_MASK

#define IOCPARM_MASK   0x7f

Definition at line 241 of file winsock.h.

◆ IP_ADD_MEMBERSHIP

#define IP_ADD_MEMBERSHIP   5

Definition at line 322 of file winsock.h.

◆ IP_DEFAULT_MULTICAST_LOOP

#define IP_DEFAULT_MULTICAST_LOOP   1

Definition at line 329 of file winsock.h.

◆ IP_DEFAULT_MULTICAST_TTL

#define IP_DEFAULT_MULTICAST_TTL   1

Definition at line 328 of file winsock.h.

◆ IP_DONTFRAGMENT

#define IP_DONTFRAGMENT   9

Definition at line 326 of file winsock.h.

◆ IP_DROP_MEMBERSHIP

#define IP_DROP_MEMBERSHIP   6

Definition at line 323 of file winsock.h.

◆ IP_MAX_MEMBERSHIPS

#define IP_MAX_MEMBERSHIPS   20

Definition at line 330 of file winsock.h.

◆ IP_MULTICAST_IF

#define IP_MULTICAST_IF   2

Definition at line 319 of file winsock.h.

◆ IP_MULTICAST_LOOP

#define IP_MULTICAST_LOOP   4

Definition at line 321 of file winsock.h.

◆ IP_MULTICAST_TTL

#define IP_MULTICAST_TTL   3

Definition at line 320 of file winsock.h.

◆ IP_OPTIONS

#define IP_OPTIONS   1

Definition at line 176 of file winsock.h.

◆ IP_TOS

#define IP_TOS   8

Definition at line 325 of file winsock.h.

◆ IP_TTL

#define IP_TTL   7

Definition at line 324 of file winsock.h.

◆ IPPORT_BIFFUDP

#define IPPORT_BIFFUDP   512

Definition at line 287 of file winsock.h.

◆ IPPORT_CMDSERVER

#define IPPORT_CMDSERVER   514

Definition at line 285 of file winsock.h.

◆ IPPORT_DAYTIME

#define IPPORT_DAYTIME   13

Definition at line 269 of file winsock.h.

◆ IPPORT_DISCARD

#define IPPORT_DISCARD   9

Definition at line 267 of file winsock.h.

◆ IPPORT_ECHO

#define IPPORT_ECHO   7

Definition at line 266 of file winsock.h.

◆ IPPORT_EFSSERVER

#define IPPORT_EFSSERVER   520

Definition at line 286 of file winsock.h.

◆ IPPORT_EXECSERVER

#define IPPORT_EXECSERVER   512

Definition at line 283 of file winsock.h.

◆ IPPORT_FINGER

#define IPPORT_FINGER   79

Definition at line 280 of file winsock.h.

◆ IPPORT_FTP

#define IPPORT_FTP   21

Definition at line 271 of file winsock.h.

◆ IPPORT_LOGINSERVER

#define IPPORT_LOGINSERVER   513

Definition at line 284 of file winsock.h.

◆ IPPORT_MTP

#define IPPORT_MTP   57

Definition at line 277 of file winsock.h.

◆ IPPORT_NAMESERVER

#define IPPORT_NAMESERVER   42

Definition at line 275 of file winsock.h.

◆ IPPORT_NETSTAT

#define IPPORT_NETSTAT   15

Definition at line 270 of file winsock.h.

◆ IPPORT_RESERVED

#define IPPORT_RESERVED   1024

Definition at line 290 of file winsock.h.

◆ IPPORT_RJE

#define IPPORT_RJE   77

Definition at line 279 of file winsock.h.

◆ IPPORT_ROUTESERVER

#define IPPORT_ROUTESERVER   520

Definition at line 289 of file winsock.h.

◆ IPPORT_SMTP

#define IPPORT_SMTP   25

Definition at line 273 of file winsock.h.

◆ IPPORT_SUPDUP

#define IPPORT_SUPDUP   95

Definition at line 282 of file winsock.h.

◆ IPPORT_SYSTAT

#define IPPORT_SYSTAT   11

Definition at line 268 of file winsock.h.

◆ IPPORT_TELNET

#define IPPORT_TELNET   23

Definition at line 272 of file winsock.h.

◆ IPPORT_TFTP

#define IPPORT_TFTP   69

Definition at line 278 of file winsock.h.

◆ IPPORT_TIMESERVER

#define IPPORT_TIMESERVER   37

Definition at line 274 of file winsock.h.

◆ IPPORT_TTYLINK

#define IPPORT_TTYLINK   87

Definition at line 281 of file winsock.h.

◆ IPPORT_WHOIS

#define IPPORT_WHOIS   43

Definition at line 276 of file winsock.h.

◆ IPPORT_WHOSERVER

#define IPPORT_WHOSERVER   513

Definition at line 288 of file winsock.h.

◆ IPPROTO_GGP

#define IPPROTO_GGP   3

Definition at line 258 of file winsock.h.

◆ IPPROTO_ICMP

#define IPPROTO_ICMP   1

Definition at line 256 of file winsock.h.

◆ IPPROTO_IDP

#define IPPROTO_IDP   22

Definition at line 262 of file winsock.h.

◆ IPPROTO_IGMP

#define IPPROTO_IGMP   2

Definition at line 257 of file winsock.h.

◆ IPPROTO_IP

#define IPPROTO_IP   0

Definition at line 255 of file winsock.h.

◆ IPPROTO_MAX

#define IPPROTO_MAX   256

Definition at line 265 of file winsock.h.

◆ IPPROTO_ND

#define IPPROTO_ND   77

Definition at line 263 of file winsock.h.

◆ IPPROTO_PUP

#define IPPROTO_PUP   12

Definition at line 260 of file winsock.h.

◆ IPPROTO_RAW

#define IPPROTO_RAW   255

Definition at line 264 of file winsock.h.

◆ IPPROTO_TCP

#define IPPROTO_TCP   6

Definition at line 259 of file winsock.h.

◆ IPPROTO_UDP

#define IPPROTO_UDP   17

Definition at line 261 of file winsock.h.

◆ MAXGETHOSTSTRUCT

#define MAXGETHOSTSTRUCT   1024

Definition at line 403 of file winsock.h.

◆ MSG_DONTROUTE

#define MSG_DONTROUTE   4

Definition at line 223 of file winsock.h.

◆ MSG_MAXIOVLEN

#define MSG_MAXIOVLEN   16

Definition at line 401 of file winsock.h.

◆ MSG_OOB

#define MSG_OOB   1

Definition at line 221 of file winsock.h.

◆ MSG_PARTIAL

#define MSG_PARTIAL   0x8000

Definition at line 402 of file winsock.h.

◆ MSG_PEEK

#define MSG_PEEK   2

Definition at line 222 of file winsock.h.

◆ NO_ADDRES

#define NO_ADDRES   WSANO_ADDRESS

Definition at line 230 of file winsock.h.

◆ NO_DATA

#define NO_DATA   WSANO_DATA

Definition at line 229 of file winsock.h.

◆ NO_RECOVERY

#define NO_RECOVERY   WSANO_RECOVERY

Definition at line 228 of file winsock.h.

◆ PF_APPLETALK

#define PF_APPLETALK   AF_APPLETALK

Definition at line 389 of file winsock.h.

◆ PF_ATM

#define PF_ATM   AF_ATM

Definition at line 394 of file winsock.h.

◆ PF_BAN

#define PF_BAN   AF_BAN

Definition at line 393 of file winsock.h.

◆ PF_CCITT

#define PF_CCITT   AF_CCITT

Definition at line 383 of file winsock.h.

◆ PF_CHAOS

#define PF_CHAOS   AF_CHAOS

Definition at line 376 of file winsock.h.

◆ PF_DATAKIT

#define PF_DATAKIT   AF_DATAKIT

Definition at line 382 of file winsock.h.

◆ PF_DECnet

#define PF_DECnet   AF_DECnet

Definition at line 385 of file winsock.h.

◆ PF_DLI

#define PF_DLI   AF_DLI

Definition at line 386 of file winsock.h.

◆ PF_ECMA

#define PF_ECMA   AF_ECMA

Definition at line 381 of file winsock.h.

◆ PF_FIREFOX

#define PF_FIREFOX   AF_FIREFOX

Definition at line 391 of file winsock.h.

◆ PF_HYLINK

#define PF_HYLINK   AF_HYLINK

Definition at line 388 of file winsock.h.

◆ PF_IMPLINK

#define PF_IMPLINK   AF_IMPLINK

Definition at line 374 of file winsock.h.

◆ PF_INET

#define PF_INET   AF_INET

Definition at line 373 of file winsock.h.

◆ PF_INET6

#define PF_INET6   AF_INET6

Definition at line 395 of file winsock.h.

◆ PF_IPX

#define PF_IPX   AF_IPX

Definition at line 378 of file winsock.h.

◆ PF_ISO

#define PF_ISO   AF_ISO

Definition at line 379 of file winsock.h.

◆ PF_LAT

#define PF_LAT   AF_LAT

Definition at line 387 of file winsock.h.

◆ PF_MAX

#define PF_MAX   AF_MAX

Definition at line 396 of file winsock.h.

◆ PF_NS

#define PF_NS   AF_NS

Definition at line 377 of file winsock.h.

◆ PF_OSI

#define PF_OSI   AF_OSI

Definition at line 380 of file winsock.h.

◆ PF_PUP

#define PF_PUP   AF_PUP

Definition at line 375 of file winsock.h.

◆ PF_SNA

#define PF_SNA   AF_SNA

Definition at line 384 of file winsock.h.

◆ PF_UNIX

#define PF_UNIX   AF_UNIX

Definition at line 372 of file winsock.h.

◆ PF_UNKNOWN1

#define PF_UNKNOWN1   AF_UNKNOWN1

Definition at line 392 of file winsock.h.

◆ PF_UNSPEC

#define PF_UNSPEC   AF_UNSPEC

Definition at line 371 of file winsock.h.

◆ PF_VOICEVIEW

#define PF_VOICEVIEW   AF_VOICEVIEW

Definition at line 390 of file winsock.h.

◆ SD_BOTH

#define SD_BOTH   0x02

Definition at line 56 of file winsock.h.

◆ SD_RECEIVE

#define SD_RECEIVE   0x00

Definition at line 54 of file winsock.h.

◆ SD_SEND

#define SD_SEND   0x01

Definition at line 55 of file winsock.h.

◆ SIOCATMARK

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

Definition at line 253 of file winsock.h.

◆ SIOCGHIWAT

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

Definition at line 250 of file winsock.h.

◆ SIOCGLOWAT

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

Definition at line 252 of file winsock.h.

◆ SIOCSHIWAT

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

Definition at line 249 of file winsock.h.

◆ SIOCSLOWAT

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

Definition at line 251 of file winsock.h.

◆ SO_ACCEPTCONN

#define SO_ACCEPTCONN   2

Definition at line 179 of file winsock.h.

◆ SO_BROADCAST

#define SO_BROADCAST   32

Definition at line 183 of file winsock.h.

◆ SO_CONNDATA

#define SO_CONNDATA   0x7000

Definition at line 197 of file winsock.h.

◆ SO_CONNDATALEN

#define SO_CONNDATALEN   0x7004

Definition at line 201 of file winsock.h.

◆ SO_CONNECT_TIME

#define SO_CONNECT_TIME   0x700C

Definition at line 209 of file winsock.h.

◆ SO_CONNOPT

#define SO_CONNOPT   0x7001

Definition at line 198 of file winsock.h.

◆ SO_CONNOPTLEN

#define SO_CONNOPTLEN   0x7005

Definition at line 202 of file winsock.h.

◆ SO_DEBUG

#define SO_DEBUG   1

Definition at line 178 of file winsock.h.

◆ SO_DISCDATA

#define SO_DISCDATA   0x7002

Definition at line 199 of file winsock.h.

◆ SO_DISCDATALEN

#define SO_DISCDATALEN   0x7006

Definition at line 203 of file winsock.h.

◆ SO_DISCOPT

#define SO_DISCOPT   0x7003

Definition at line 200 of file winsock.h.

◆ SO_DISCOPTLEN

#define SO_DISCOPTLEN   0x7007

Definition at line 204 of file winsock.h.

◆ SO_DONTLINGER

#define SO_DONTLINGER   (u_int)(~SO_LINGER)

Definition at line 187 of file winsock.h.

◆ SO_DONTROUTE

#define SO_DONTROUTE   16

Definition at line 182 of file winsock.h.

◆ SO_ERROR

#define SO_ERROR   0x1007

Definition at line 194 of file winsock.h.

◆ SO_KEEPALIVE

#define SO_KEEPALIVE   8

Definition at line 181 of file winsock.h.

◆ SO_LINGER

#define SO_LINGER   128

Definition at line 185 of file winsock.h.

◆ SO_MAXDG

#define SO_MAXDG   0x7009

Definition at line 206 of file winsock.h.

◆ SO_MAXPATHDG

#define SO_MAXPATHDG   0x700A

Definition at line 207 of file winsock.h.

◆ SO_OOBINLINE

#define SO_OOBINLINE   256

Definition at line 186 of file winsock.h.

◆ SO_OPENTYPE

#define SO_OPENTYPE   0x7008

Definition at line 205 of file winsock.h.

◆ SO_RCVBUF

#define SO_RCVBUF   0x1002

Definition at line 189 of file winsock.h.

◆ SO_RCVLOWAT

#define SO_RCVLOWAT   0x1004

Definition at line 191 of file winsock.h.

◆ SO_RCVTIMEO

#define SO_RCVTIMEO   0x1006

Definition at line 193 of file winsock.h.

◆ SO_REUSEADDR

#define SO_REUSEADDR   4

Definition at line 180 of file winsock.h.

◆ SO_SNDBUF

#define SO_SNDBUF   0x1001

Definition at line 188 of file winsock.h.

◆ SO_SNDLOWAT

#define SO_SNDLOWAT   0x1003

Definition at line 190 of file winsock.h.

◆ SO_SNDTIMEO

#define SO_SNDTIMEO   0x1005

Definition at line 192 of file winsock.h.

◆ SO_SYNCHRONOUS_ALERT

#define SO_SYNCHRONOUS_ALERT   0x10

Definition at line 211 of file winsock.h.

◆ SO_SYNCHRONOUS_NONALERT

#define SO_SYNCHRONOUS_NONALERT   0x20

Definition at line 212 of file winsock.h.

◆ SO_TYPE

#define SO_TYPE   0x1008

Definition at line 195 of file winsock.h.

◆ SO_UPDATE_ACCEPT_CONTEXT

#define SO_UPDATE_ACCEPT_CONTEXT   0x700B

Definition at line 208 of file winsock.h.

◆ SO_USELOOPBACK

#define SO_USELOOPBACK   64

Definition at line 184 of file winsock.h.

◆ SOCK_DGRAM

#define SOCK_DGRAM   2

Definition at line 336 of file winsock.h.

◆ SOCK_RAW

#define SOCK_RAW   3

Definition at line 337 of file winsock.h.

◆ SOCK_RDM

#define SOCK_RDM   4

Definition at line 338 of file winsock.h.

◆ SOCK_SEQPACKET

#define SOCK_SEQPACKET   5

Definition at line 339 of file winsock.h.

◆ SOCK_STREAM

#define SOCK_STREAM   1

Definition at line 335 of file winsock.h.

◆ SOCKET_ERROR

#define SOCKET_ERROR   (-1)

Definition at line 333 of file winsock.h.

◆ SOL_SOCKET

#define SOL_SOCKET   0xffff

Definition at line 398 of file winsock.h.

◆ SOMAXCONN

#define SOMAXCONN   5

Definition at line 399 of file winsock.h.

◆ TCP_BSDURGENT

#define TCP_BSDURGENT   0x7000

Definition at line 342 of file winsock.h.

◆ TCP_NODELAY

#define TCP_NODELAY   0x0001

Definition at line 341 of file winsock.h.

◆ TF_DISCONNECT

#define TF_DISCONNECT   0x01

Definition at line 473 of file winsock.h.

◆ TF_REUSE_SOCKET

#define TF_REUSE_SOCKET   0x02

Definition at line 474 of file winsock.h.

◆ TF_WRITE_BEHIND

#define TF_WRITE_BEHIND   0x04

Definition at line 475 of file winsock.h.

◆ timerclear

#define timerclear (   tvp)    (tvp)->tv_sec = (tvp)->tv_usec = 0

Definition at line 127 of file winsock.h.

◆ timercmp

#define timercmp (   tvp,
  uvp,
  cmp 
)
Value:
(((tvp)->tv_sec != (uvp)->tv_sec) ? \
((tvp)->tv_sec cmp (uvp)->tv_sec) : \
((tvp)->tv_usec cmp (uvp)->tv_usec))
#define cmp(status, error)
Definition: error.c:114

Definition at line 122 of file winsock.h.

◆ timerisset

#define timerisset (   tvp)    ((tvp)->tv_sec || (tvp)->tv_usec)

Definition at line 120 of file winsock.h.

◆ TRY_AGAIN

#define TRY_AGAIN   WSATRY_AGAIN

Definition at line 227 of file winsock.h.

◆ WSA_IPSEC_NAME_POLICY_ERROR

#define WSA_IPSEC_NAME_POLICY_ERROR   (WSABASEERR+1033)

Definition at line 467 of file winsock.h.

◆ WSA_SECURE_HOST_NOT_FOUND

#define WSA_SECURE_HOST_NOT_FOUND   (WSABASEERR+1032)

Definition at line 466 of file winsock.h.

◆ WSABASEERR

#define WSABASEERR   10000

Definition at line 414 of file winsock.h.

◆ WSADESCRIPTION_LEN

#define WSADESCRIPTION_LEN   256

Definition at line 316 of file winsock.h.

◆ WSAEACCES

#define WSAEACCES   (WSABASEERR+13)

Definition at line 417 of file winsock.h.

◆ WSAEADDRINUSE

#define WSAEADDRINUSE   (WSABASEERR+48)

Definition at line 434 of file winsock.h.

◆ WSAEADDRNOTAVAIL

#define WSAEADDRNOTAVAIL   (WSABASEERR+49)

Definition at line 435 of file winsock.h.

◆ WSAEAFNOSUPPORT

#define WSAEAFNOSUPPORT   (WSABASEERR+47)

Definition at line 433 of file winsock.h.

◆ WSAEALREADY

#define WSAEALREADY   (WSABASEERR+37)

Definition at line 423 of file winsock.h.

◆ WSAEBADF

#define WSAEBADF   (WSABASEERR+9)

Definition at line 416 of file winsock.h.

◆ WSAECONNABORTED

#define WSAECONNABORTED   (WSABASEERR+53)

Definition at line 439 of file winsock.h.

◆ WSAECONNREFUSED

#define WSAECONNREFUSED   (WSABASEERR+61)

Definition at line 447 of file winsock.h.

◆ WSAECONNRESET

#define WSAECONNRESET   (WSABASEERR+54)

Definition at line 440 of file winsock.h.

◆ WSAEDESTADDRREQ

#define WSAEDESTADDRREQ   (WSABASEERR+39)

Definition at line 425 of file winsock.h.

◆ WSAEDISCON

#define WSAEDISCON   (WSABASEERR+101)

Definition at line 461 of file winsock.h.

◆ WSAEDQUOT

#define WSAEDQUOT   (WSABASEERR+69)

Definition at line 455 of file winsock.h.

◆ WSAEFAULT

#define WSAEFAULT   (WSABASEERR+14)

Definition at line 418 of file winsock.h.

◆ WSAEHOSTDOWN

#define WSAEHOSTDOWN   (WSABASEERR+64)

Definition at line 450 of file winsock.h.

◆ WSAEHOSTUNREACH

#define WSAEHOSTUNREACH   (WSABASEERR+65)

Definition at line 451 of file winsock.h.

◆ WSAEINPROGRESS

#define WSAEINPROGRESS   (WSABASEERR+36)

Definition at line 422 of file winsock.h.

◆ WSAEINTR

#define WSAEINTR   (WSABASEERR+4)

Definition at line 415 of file winsock.h.

◆ WSAEINVAL

#define WSAEINVAL   (WSABASEERR+22)

Definition at line 419 of file winsock.h.

◆ WSAEISCONN

#define WSAEISCONN   (WSABASEERR+56)

Definition at line 442 of file winsock.h.

◆ WSAELOOP

#define WSAELOOP   (WSABASEERR+62)

Definition at line 448 of file winsock.h.

◆ WSAEMFILE

#define WSAEMFILE   (WSABASEERR+24)

Definition at line 420 of file winsock.h.

◆ WSAEMSGSIZE

#define WSAEMSGSIZE   (WSABASEERR+40)

Definition at line 426 of file winsock.h.

◆ WSAENAMETOOLONG

#define WSAENAMETOOLONG   (WSABASEERR+63)

Definition at line 449 of file winsock.h.

◆ WSAENETDOWN

#define WSAENETDOWN   (WSABASEERR+50)

Definition at line 436 of file winsock.h.

◆ WSAENETRESET

#define WSAENETRESET   (WSABASEERR+52)

Definition at line 438 of file winsock.h.

◆ WSAENETUNREACH

#define WSAENETUNREACH   (WSABASEERR+51)

Definition at line 437 of file winsock.h.

◆ WSAENOBUFS

#define WSAENOBUFS   (WSABASEERR+55)

Definition at line 441 of file winsock.h.

◆ WSAENOPROTOOPT

#define WSAENOPROTOOPT   (WSABASEERR+42)

Definition at line 428 of file winsock.h.

◆ WSAENOTCONN

#define WSAENOTCONN   (WSABASEERR+57)

Definition at line 443 of file winsock.h.

◆ WSAENOTEMPTY

#define WSAENOTEMPTY   (WSABASEERR+66)

Definition at line 452 of file winsock.h.

◆ WSAENOTSOCK

#define WSAENOTSOCK   (WSABASEERR+38)

Definition at line 424 of file winsock.h.

◆ WSAEOPNOTSUPP

#define WSAEOPNOTSUPP   (WSABASEERR+45)

Definition at line 431 of file winsock.h.

◆ WSAEPFNOSUPPORT

#define WSAEPFNOSUPPORT   (WSABASEERR+46)

Definition at line 432 of file winsock.h.

◆ WSAEPROCLIM

#define WSAEPROCLIM   (WSABASEERR+67)

Definition at line 453 of file winsock.h.

◆ WSAEPROTONOSUPPORT

#define WSAEPROTONOSUPPORT   (WSABASEERR+43)

Definition at line 429 of file winsock.h.

◆ WSAEPROTOTYPE

#define WSAEPROTOTYPE   (WSABASEERR+41)

Definition at line 427 of file winsock.h.

◆ WSAEREMOTE

#define WSAEREMOTE   (WSABASEERR+71)

Definition at line 457 of file winsock.h.

◆ WSAESHUTDOWN

#define WSAESHUTDOWN   (WSABASEERR+58)

Definition at line 444 of file winsock.h.

◆ WSAESOCKTNOSUPPORT

#define WSAESOCKTNOSUPPORT   (WSABASEERR+44)

Definition at line 430 of file winsock.h.

◆ WSAESTALE

#define WSAESTALE   (WSABASEERR+70)

Definition at line 456 of file winsock.h.

◆ WSAETIMEDOUT

#define WSAETIMEDOUT   (WSABASEERR+60)

Definition at line 446 of file winsock.h.

◆ WSAETOOMANYREFS

#define WSAETOOMANYREFS   (WSABASEERR+59)

Definition at line 445 of file winsock.h.

◆ WSAEUSERS

#define WSAEUSERS   (WSABASEERR+68)

Definition at line 454 of file winsock.h.

◆ WSAEWOULDBLOCK

#define WSAEWOULDBLOCK   (WSABASEERR+35)

Definition at line 421 of file winsock.h.

◆ WSAGETASYNCBUFLEN

#define WSAGETASYNCBUFLEN (   l)    LOWORD(l)

Definition at line 479 of file winsock.h.

◆ WSAGETASYNCERROR

#define WSAGETASYNCERROR (   l)    HIWORD(l)

Definition at line 480 of file winsock.h.

◆ WSAGETSELECTERROR

#define WSAGETSELECTERROR (   l)    HIWORD(l)

Definition at line 482 of file winsock.h.

◆ WSAGETSELECTEVENT

#define WSAGETSELECTEVENT (   l)    LOWORD(l)

Definition at line 481 of file winsock.h.

◆ WSAHOST_NOT_FOUND

#define WSAHOST_NOT_FOUND   (WSABASEERR+1001)

Definition at line 462 of file winsock.h.

◆ WSAMAKEASYNCREPLY

#define WSAMAKEASYNCREPLY (   b,
  e 
)    MAKELONG(b,e)

Definition at line 477 of file winsock.h.

◆ WSAMAKESELECTREPLY

#define WSAMAKESELECTREPLY (   e,
  error 
)    MAKELONG(e,error)

Definition at line 478 of file winsock.h.

◆ WSANO_ADDRESS

#define WSANO_ADDRESS   WSANO_DATA

Definition at line 471 of file winsock.h.

◆ WSANO_DATA

#define WSANO_DATA   (WSABASEERR+1004)

Definition at line 465 of file winsock.h.

◆ WSANO_RECOVERY

#define WSANO_RECOVERY   (WSABASEERR+1003)

Definition at line 464 of file winsock.h.

◆ WSANOTINITIALISED

#define WSANOTINITIALISED   (WSABASEERR+93)

Definition at line 460 of file winsock.h.

◆ WSASYS_STATUS_LEN

#define WSASYS_STATUS_LEN   128

Definition at line 317 of file winsock.h.

◆ WSASYSNOTREADY

#define WSASYSNOTREADY   (WSABASEERR+91)

Definition at line 458 of file winsock.h.

◆ WSATRY_AGAIN

#define WSATRY_AGAIN   (WSABASEERR+1002)

Definition at line 463 of file winsock.h.

◆ WSAVERNOTSUPPORTED

#define WSAVERNOTSUPPORTED   (WSABASEERR+92)

Definition at line 459 of file winsock.h.

Typedef Documentation

◆ fd_set

typedef struct fd_set fd_set

◆ FD_SET

typedef struct fd_set FD_SET

Definition at line 493 of file winsock.h.

◆ HOSTENT

Definition at line 496 of file winsock.h.

◆ LINGER

typedef struct linger LINGER

Definition at line 490 of file winsock.h.

◆ LPFD_SET

Definition at line 495 of file winsock.h.

◆ LPHOSTENT

Definition at line 498 of file winsock.h.

◆ LPLINGER

Definition at line 492 of file winsock.h.

◆ LPPROTOENT

Definition at line 504 of file winsock.h.

◆ LPSERVENT

Definition at line 501 of file winsock.h.

◆ LPSOCKADDR

Definition at line 486 of file winsock.h.

◆ LPSOCKADDR_IN

Definition at line 489 of file winsock.h.

◆ LPTIMEVAL

Definition at line 507 of file winsock.h.

◆ LPTRANSMIT_FILE_BUFFERS

◆ LPWSADATA

◆ PFD_SET

typedef struct fd_set* PFD_SET

Definition at line 494 of file winsock.h.

◆ PHOSTENT

Definition at line 497 of file winsock.h.

◆ PLINGER

typedef struct linger* PLINGER

Definition at line 491 of file winsock.h.

◆ PPROTOENT

Definition at line 503 of file winsock.h.

◆ PROTOENT

Definition at line 502 of file winsock.h.

◆ PSERVENT

Definition at line 500 of file winsock.h.

◆ PSOCKADDR

Definition at line 485 of file winsock.h.

◆ PSOCKADDR_IN

Definition at line 488 of file winsock.h.

◆ PTIMEVAL

Definition at line 506 of file winsock.h.

◆ PTRANSMIT_FILE_BUFFERS

◆ SERVENT

Definition at line 499 of file winsock.h.

◆ SOCKADDR

Definition at line 484 of file winsock.h.

◆ SOCKADDR_IN

Definition at line 487 of file winsock.h.

◆ SOCKET

typedef UINT_PTR SOCKET

Definition at line 47 of file winsock.h.

◆ TIMEVAL

Definition at line 505 of file winsock.h.

◆ TRANSMIT_FILE_BUFFERS

◆ u_char

typedef unsigned char u_char

Definition at line 33 of file winsock.h.

◆ u_int

typedef unsigned int u_int

Definition at line 35 of file winsock.h.

◆ u_long

typedef unsigned long u_long

Definition at line 38 of file winsock.h.

◆ u_short

Definition at line 34 of file winsock.h.

◆ WSADATA

Function Documentation

◆ __WSAFDIsSet()

int PASCAL __WSAFDIsSet ( SOCKET  ,
fd_set FAR  
)

◆ accept()

SOCKET PASCAL FAR accept ( _In_ SOCKET  s,
_Out_writes_bytes_opt_ *addrlen struct sockaddr FAR addr,
_Inout_opt_ int FAR addrlen 
)

◆ AcceptEx()

BOOL PASCAL FAR AcceptEx ( _In_ SOCKET  sListenSocket,
_In_ SOCKET  sAcceptSocket,
_Out_writes_bytes_to_(dwReceiveDataLength+dwLocalAddressLength+dwRemoteAddressLength, *lpdwBytesReceived) PVOID  lpOutputBuffer,
_In_ DWORD  dwReceiveDataLength,
_In_ DWORD  dwLocalAddressLength,
_In_ DWORD  dwRemoteAddressLength,
_Out_ LPDWORD  lpdwBytesReceived,
_Inout_ LPOVERLAPPED  lpOverlapped 
)

◆ bind()

int PASCAL FAR bind ( _In_ SOCKET  s,
_In_reads_bytes_(namelen) const struct sockaddr FAR addr,
_In_ int  namelen 
)

◆ closesocket()

int PASCAL FAR closesocket ( _In_ SOCKET  s)

◆ connect()

◆ GetAcceptExSockaddrs()

VOID PASCAL FAR GetAcceptExSockaddrs ( _In_reads_bytes_(dwReceiveDataLength+dwLocalAddressLength+dwRemoteAddressLength) PVOID  lpOutputBuffer,
_In_ DWORD  dwReceiveDataLength,
_In_ DWORD  dwLocalAddressLength,
_In_ DWORD  dwRemoteAddressLength,
_Outptr_result_bytebuffer_ *LocalSockaddrLength struct sockaddr **  LocalSockaddr,
_Out_ LPINT  LocalSockaddrLength,
_Outptr_result_bytebuffer_ *RemoteSockaddrLength struct sockaddr **  RemoteSockaddr,
_Out_ LPINT  RemoteSockaddrLength 
)

◆ gethostbyaddr()

struct hostent FAR *PASCAL FAR gethostbyaddr ( _In_reads_bytes_(len) const char FAR addr,
_In_ int  len,
_In_ int  type 
)

◆ gethostbyname()

struct hostent FAR *PASCAL FAR gethostbyname ( _In_z_ const char FAR name)

◆ gethostname() [1/2]

int PASCAL FAR gethostname ( _Out_writes_bytes_to_(namelen, return) char FAR name,
_In_ int  namelen 
)

◆ gethostname() [2/2]

int PASCAL gethostname ( char ,
int   
)

◆ getpeername()

int PASCAL FAR getpeername ( _In_ SOCKET  s,
_Out_writes_bytes_to_ *, *namelen struct sockaddr FAR name,
_Inout_ int FAR namelen 
)

◆ getprotobyname()

struct protoent FAR *PASCAL FAR getprotobyname ( _In_z_ const char FAR name)

◆ getprotobynumber()

struct protoent FAR *PASCAL FAR getprotobynumber ( _In_ int  number)

◆ getservbyname()

struct servent FAR *PASCAL FAR getservbyname ( _In_z_ const char FAR name,
_In_z_ const char FAR proto 
)

◆ getservbyport()

struct servent FAR *PASCAL FAR getservbyport ( _In_ int  port,
_In_z_ const char FAR proto 
)

◆ getsockname()

int PASCAL FAR getsockname ( _In_ SOCKET  s,
_Out_writes_bytes_to_ *, *namelen struct sockaddr FAR name,
_Inout_ int FAR namelen 
)

◆ getsockopt()

int PASCAL FAR getsockopt ( _In_ SOCKET  s,
_In_ int  level,
_In_ int  optname,
_Out_writes_bytes_ *optlen char FAR optval,
_Inout_ int FAR optlen 
)

◆ htonl() [1/2]

u_long PASCAL FAR htonl ( _In_ u_long  hostlong)

◆ htonl() [2/2]

u_long PASCAL htonl ( u_long  )

◆ htons() [1/2]

u_short PASCAL FAR htons ( _In_ u_short  hostshort)

◆ htons() [2/2]

u_short PASCAL htons ( u_short  x)

Definition at line 20 of file connect.c.

21{
22 return ((x & 0x00FF) << 8) | ((x & 0xFF00) >> 8);
23}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

◆ inet_addr()

unsigned long PASCAL FAR inet_addr ( _In_z_ const char FAR cp)

◆ inet_ntoa()

char FAR *PASCAL FAR inet_ntoa ( _In_ struct in_addr  in)

◆ ioctlsocket()

int PASCAL FAR ioctlsocket ( _In_ SOCKET  s,
_In_ long  cmd,
_Inout_ u_long FAR argp 
)

◆ listen()

int PASCAL FAR listen ( _In_ SOCKET  s,
_In_ int  backlog 
)

◆ ntohl() [1/2]

u_long PASCAL FAR ntohl ( _In_ u_long  netlong)

◆ ntohl() [2/2]

u_long PASCAL ntohl ( u_long  )

◆ ntohs() [1/2]

u_short PASCAL FAR ntohs ( _In_ u_short  netshort)

◆ ntohs() [2/2]

u_short PASCAL ntohs ( u_short  )

◆ recv()

◆ recvfrom()

int PASCAL FAR recvfrom ( _In_ SOCKET  s,
_Out_writes_bytes_to_(len, return) __out_data_source(NETWORK) char FAR buf,
_In_ int  len,
_In_ int  flags,
_Out_writes_bytes_to_opt_ *, *fromlen struct sockaddr FAR from,
_Inout_opt_ int FAR fromlen 
)

◆ select() [1/2]

int PASCAL FAR select ( _In_ int  nfds,
_Inout_opt_ fd_set FAR readfds,
_Inout_opt_ fd_set FAR writefds,
_Inout_opt_ fd_set FAR exceptfds,
_In_opt_ const struct timeval FAR timeout 
)

◆ select() [2/2]

int PASCAL select ( int  nfds,
fd_set ,
fd_set ,
fd_set ,
const struct timeval  
)

◆ send()

int PASCAL FAR send ( _In_ SOCKET  s,
_In_reads_bytes_(len) const char FAR buf,
_In_ int  len,
_In_ int  flags 
)

◆ sendto()

int PASCAL FAR sendto ( _In_ SOCKET  s,
_In_reads_bytes_(len) const char FAR buf,
_In_ int  len,
_In_ int  flags,
_In_reads_bytes_opt_(tolen) const struct sockaddr FAR to,
_In_ int  tolen 
)

◆ setsockopt()

int PASCAL FAR setsockopt ( _In_ SOCKET  s,
_In_ int  level,
_In_ int  optname,
_In_reads_bytes_opt_(optlen) const char FAR optval,
_In_ int  optlen 
)

◆ shutdown()

int PASCAL FAR shutdown ( _In_ SOCKET  s,
_In_ int  how 
)

◆ socket()

SOCKET PASCAL FAR socket ( _In_ int  af,
_In_ int  type,
_In_ int  protocol 
)

◆ TransmitFile()

BOOL PASCAL FAR TransmitFile ( _In_ SOCKET  hSocket,
_In_ HANDLE  hFile,
_In_ DWORD  nNumberOfBytesToWrite,
_In_ DWORD  nNumberOfBytesPerSend,
_Inout_opt_ LPOVERLAPPED  lpOverlapped,
_In_opt_ LPTRANSMIT_FILE_BUFFERS  lpTransmitBuffers,
_In_ DWORD  dwReserved 
)

◆ WSAAsyncGetHostByAddr()

HANDLE PASCAL FAR WSAAsyncGetHostByAddr ( _In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_ const char FAR addr,
_In_ int  len,
_In_ int  type,
_Out_writes_bytes_(buflen) char FAR buf,
_In_ int  buflen 
)

◆ WSAAsyncGetHostByName()

HANDLE PASCAL FAR WSAAsyncGetHostByName ( _In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_z_ const char FAR name,
_Out_writes_bytes_(buflen) char FAR buf,
_In_ int  buflen 
)

◆ WSAAsyncGetProtoByName()

HANDLE PASCAL FAR WSAAsyncGetProtoByName ( _In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_z_ const char FAR name,
_Out_writes_bytes_(buflen) char FAR buf,
_In_ int  buflen 
)

◆ WSAAsyncGetProtoByNumber()

HANDLE PASCAL FAR WSAAsyncGetProtoByNumber ( _In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_ int  number,
_Out_writes_bytes_(buflen) char FAR buf,
_In_ int  buflen 
)

◆ WSAAsyncGetServByName()

HANDLE PASCAL FAR WSAAsyncGetServByName ( _In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_z_ const char FAR name,
_In_z_ const char FAR proto,
_Out_writes_bytes_(buflen) char FAR buf,
_In_ int  buflen 
)

◆ WSAAsyncGetServByPort()

HANDLE PASCAL FAR WSAAsyncGetServByPort ( _In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_ int  port,
_In_ const char FAR proto,
_Out_writes_bytes_(buflen) char FAR buf,
_In_ int  buflen 
)

◆ WSAAsyncSelect()

int PASCAL FAR WSAAsyncSelect ( _In_ SOCKET  s,
_In_ HWND  hWnd,
_In_ u_int  wMsg,
_In_ long  lEvent 
)

◆ WSACancelAsyncRequest()

int PASCAL FAR WSACancelAsyncRequest ( _In_ HANDLE  hAsyncTaskHandle)

◆ WSACancelBlockingCall()

int PASCAL FAR WSACancelBlockingCall ( void  )

Definition at line 23 of file bhook.c.

24{
28 DPRINT("WSACancelBlockingCall\n");
29
30 /* Call the prolog */
33 {
34 /* Fail */
36 return SOCKET_ERROR;
37 }
38
39 /* Make sure this isn't a 2.2 client */
40 if (LOBYTE(Process->Version) >= 2)
41 {
42 /* Only valid for 1.x */
44 return SOCKET_ERROR;
45 }
46
47 /* Cancel the call */
50 {
51 /* Fail */
53 return SOCKET_ERROR;
54 }
55
56 /* Return success */
57 return ERROR_SUCCESS;
58}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define SetLastError(x)
Definition: compat.h:752
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
#define LOBYTE(W)
Definition: jmemdos.c:487
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define DPRINT
Definition: sndvol32.h:73
int32_t INT
Definition: typedefs.h:58
#define WSAEOPNOTSUPP
Definition: winerror.h:1958
#define SOCKET_ERROR
Definition: winsock.h:333
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
DWORD WSAAPI WsThreadCancelBlockingCall(IN PWSTHREAD Thread)
Definition: dthread.c:96

Referenced by AreLegacyFunctionsSupported(), and WsAsyncThreadBlockingHook().

◆ WSACleanup()

int PASCAL FAR WSACleanup ( void  )

Definition at line 60 of file startup.c.

61{
65 LONG RefCount;
66 DPRINT("WSACleanup\n");
67
68 /* Enter startup lock */
70
71 /* Enter prolog */
73 {
74 /* Decrement process reference count and check if it's zero */
75 if (!(RefCount = InterlockedDecrement(&Process->RefCount)))
76 {
77 /* It's zero, destroy the process structure */
79 }
80 else if (RefCount == 1 && WsAsyncThreadInitialized)
81 {
82 /* Kill async thread */
84 }
85
86 DPRINT("WSACleanup RefCount = %ld\n", RefCount);
87 /* Return success */
89
90 /* Clear last error */
92 }
93 else
94 {
95 DPRINT("WSACleanup uninitialized\n");
96 /* Weren't initialized */
99 }
100
101 /* Release startup lock */
103
104 /* Done */
105 return ErrorCode;
106}
#define InterlockedDecrement
Definition: armddk.h:52
#define WsStartupLock()
Definition: startup.c:21
#define WsStartupUnlock()
Definition: startup.c:22
long LONG
Definition: pedump.c:60
VOID WSAAPI WsAsyncTerminateThread(VOID)
Definition: async.c:899
VOID WSAAPI WsProcDelete(IN PWSPROCESS Process)
Definition: dprocess.c:247
BOOLEAN WsAsyncThreadInitialized
Definition: async.c:15

Referenced by AdapterStop(), adns_finish(), Cleanup(), cleanup(), close_http(), closelog(), CreateServers(), CreateSocket(), DeinitWinsock(), DestroyConnection(), ErrorExit(), Exit(), inet_ntoa(), init_abort(), init_begin(), init_finish(), InitWinsock(), InternetTransport_UnregisterClass(), kickoff_telnetd(), main(), NETCON_unload(), netconn_unload(), open_http(), openlog(), read_line(), runProg(), service_main(), ServiceMain(), SocketTest(), START_TEST(), Test_ioctlsocket(), Test_Overread(), Test_recv(), test_WithWSAStartup(), Test_WSAIoctl_GetInterfaceList(), Test_WSARecv(), tirpc_exit(), userlist(), winsock_fini(), winsock_init(), wmain(), WsAsyncCheckAndInitThread(), WsAsyncThread(), wWinMain(), and Telnet::~Telnet().

◆ WSAGetLastError()

int PASCAL FAR WSAGetLastError ( void  )

Definition at line 112 of file dllmain.c.

113{
114 /* Let the Windows Function do the work */
115 return GetLastError();
116}
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by __rpc_fd2sockinfo(), __rpc_get_time_offset(), AcceptConnections(), AdapterDiscoveryThread(), AreLegacyFunctionsSupported(), bindresvport_sa(), clnt_vc_create(), create_netconn_socket(), CreateSocket(), dataconn(), detectChange(), do_bind(), drain_socket_thread(), EchoIncomingPackets(), ErrorExit(), event_client(), Exit(), fputcSocket(), fputSocket(), FTP_Connect(), FTPFILE_WriteFile(), getdomainname(), GetIpHostName(), got_one(), InternetTransport_ReadLine(), InternetTransport_WndProc(), InternetTransport_Write(), IsWinsockInitialized(), main(), make_listening_socket(), mwsNSPLookupServiceBegin(), mwsNSPLookupServiceNext(), NetBTRecv(), NETCON_is_alive(), NETCON_recv(), NETCON_send(), NETCON_set_timeout(), netconn_create(), netconn_is_alive(), netconn_set_timeout(), netfinger(), open_http(), POP3Transport_ParseResponse(), print_getaddrinfo(), processRequest(), read_ssl_chunk(), read_vc(), ReceiveIncomingPackets(), recvrequest(), ResolveTarget(), rpcrt4_conn_tcp_read(), rpcrt4_conn_tcp_write(), rpcrt4_ip_tcp_parse_top_of_tower(), rpcrt4_ncacn_ip_tcp_open(), rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(), rpcrt4_protseq_sock_get_wait_array(), rpcrt4_sock_wait_for_recv(), rpcrt4_sock_wait_for_send(), rtime(), SConnect(), select_server(), send_file(), SendLine(), sendrequest(), SendRequest(), SendTime(), SError(), setup_iocp_src(), SetUpListener(), ShutdownConnection(), sock_recv(), sock_send(), START_TEST(), svc_run(), Test_CloseDuplicatedSocket(), Test_CloseWhileSelectDuplicatedSocket(), Test_CloseWhileSelectSameSocket(), test_events(), test_GetAddrInfoW(), test_gethostbyname(), test_ip_pktinfo(), Test_Overread(), test_select(), test_send(), test_sendto(), test_set_getsockopt(), test_WithoutWSAStartup(), test_WithWSAStartup(), test_WSAEnumProtocolsA(), test_WSAEnumProtocolsW(), Test_WSAIoctl_GetInterfaceList(), Test_WSARecv(), TestBind(), TestNodeName(), TestServiceName(), wmain(), write_vc(), WspiapiLegacyGetNameInfo(), and WspiapiQueryDNS().

◆ WSAIsBlocking()

BOOL PASCAL FAR WSAIsBlocking ( void  )

Definition at line 65 of file bhook.c.

66{
70 DPRINT("WSAIsBlocking\n");
71
72 /* Call the prolog */
75 {
76 /* Fail unless its because we're busy */
77 if (ErrorCode != WSAEINPROGRESS) return FALSE;
78 }
79
80 /* Return the value from the thread */
81 return Thread->Blocking;
82}
#define FALSE
Definition: types.h:117
#define WSAEINPROGRESS
Definition: winerror.h:1949

◆ WSARecvEx()

◆ WSASetBlockingHook()

FARPROC PASCAL FAR WSASetBlockingHook ( _In_ FARPROC  lpBlockFunc)

◆ WSASetLastError()

void PASCAL FAR WSASetLastError ( _In_ int  iError)

◆ WSAStartup()

int PASCAL FAR WSAStartup ( _In_ WORD  wVersionRequired,
_Out_ LPWSADATA  lpWSAData 
)

◆ WSAUnhookBlockingHook()

int PASCAL FAR WSAUnhookBlockingHook ( void  )

Definition at line 130 of file bhook.c.

131{
135 DPRINT("WSAUnhookBlockingHook\n");
136
137 /* Call the prolog */
140 {
141 /* Fail */
143 return SOCKET_ERROR;
144 }
145
146 /* Make sure this isn't a 2.2 client */
147 if (LOBYTE(Process->Version) >= 2)
148 {
149 /* Only valid for 1.x */
151 return SOCKET_ERROR;
152 }
153
154 /* Set the blocking hook and return the previous one */
156}
DWORD WSAAPI WsThreadUnhookBlockingHook(IN PWSTHREAD Thread)
Definition: dthread.c:84