ReactOS 0.4.15-dev-8241-g63935f8
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.


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


#define _WINSOCKAPI_
#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 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_CONNECT_TIME   0x700C
#define AF_MAX   24
#define MSG_OOB   1
#define MSG_PEEK   2
#define MSG_DONTROUTE   4
#define h_errno   WSAGetLastError()
#define IOCPARM_MASK   0x7f
#define IOC_VOID   0x20000000
#define IOC_OUT   0x40000000
#define IOC_IN   0x80000000
#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_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_CMDSERVER   514
#define IPPORT_EFSSERVER   520
#define IPPORT_BIFFUDP   512
#define IPPORT_WHOSERVER   513
#define IPPORT_RESERVED   1024
#define IMPLINK_IP   155
#define IMPLINK_LOWEXPER   156
#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 WSASYS_STATUS_LEN   128
#define IP_MULTICAST_IF   2
#define IP_MULTICAST_TTL   3
#define IP_TTL   7
#define IP_TOS   8
#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_UNIX   AF_UNIX
#define PF_INET   AF_INET
#define PF_PUP   AF_PUP
#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_SNA   AF_SNA
#define PF_DECnet   AF_DECnet
#define PF_DLI   AF_DLI
#define PF_LAT   AF_LAT
#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 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 WSANO_DATA   (WSABASEERR+1004)
#define TF_DISCONNECT   0x01
#define TF_REUSE_SOCKET   0x02
#define TF_WRITE_BEHIND   0x04
#define WSAMAKESELECTREPLY(e, error)   MAKELONG(e,error)


typedef unsigned char u_char
typedef unsigned short u_short
typedef unsigned int u_int
typedef unsigned long u_long
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


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



Definition at line 43 of file winsock.h.



Definition at line 24 of file winsock.h.

◆ _IO

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

Definition at line 146 of file winsock.h.

◆ _IOR

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

Definition at line 147 of file winsock.h.

◆ _IOW

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

Definition at line 148 of file winsock.h.



Definition at line 113 of file winsock.h.


#define _WINSOCKAPI_

Definition at line 12 of file winsock.h.


#define AF_APPLETALK   16

Definition at line 362 of file winsock.h.


#define AF_ATM   22

Definition at line 368 of file winsock.h.


#define AF_BAN   21

Definition at line 367 of file winsock.h.


#define AF_CCITT   10

Definition at line 356 of file winsock.h.


#define AF_CHAOS   5

Definition at line 349 of file winsock.h.


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


#define AF_DLI   13

Definition at line 359 of file winsock.h.


#define AF_ECMA   8

Definition at line 354 of file winsock.h.


#define AF_FIREFOX   19

Definition at line 365 of file winsock.h.


#define AF_HYLINK   15

Definition at line 361 of file winsock.h.


#define AF_IMPLINK   3

Definition at line 347 of file winsock.h.


#define AF_INET   2

Definition at line 346 of file winsock.h.


#define AF_INET6   23

Definition at line 369 of file winsock.h.


#define AF_IPX   6

Definition at line 350 of file winsock.h.


#define AF_ISO   7

Definition at line 352 of file winsock.h.


#define AF_LAT   14

Definition at line 360 of file winsock.h.


#define AF_MAX   24

Definition at line 214 of file winsock.h.


#define AF_NETBIOS   17

Definition at line 363 of file winsock.h.


#define AF_NS   6

Definition at line 351 of file winsock.h.


#define AF_OSI   AF_ISO

Definition at line 353 of file winsock.h.


#define AF_PUP   4

Definition at line 348 of file winsock.h.


#define AF_SNA   11

Definition at line 357 of file winsock.h.


#define AF_UNIX   1

Definition at line 345 of file winsock.h.


#define AF_UNKNOWN1   20

Definition at line 366 of file winsock.h.


#define AF_UNSPEC   0

Definition at line 344 of file winsock.h.


#define AF_VOICEVIEW   18

Definition at line 364 of file winsock.h.


#define FD_ACCEPT   8

Definition at line 408 of file winsock.h.


#define FD_CLOSE   32

Definition at line 410 of file winsock.h.


#define FD_CLR (   fd,
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];\
((fd_set FAR*)(set))->fd_count--;\
} 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.


#define FD_CONNECT   16

Definition at line 409 of file winsock.h.


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

Definition at line 100 of file winsock.h.


#define FD_OOB   4

Definition at line 407 of file winsock.h.


#define FD_READ   1

Definition at line 405 of file winsock.h.


#define FD_SET (   fd,
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.


#define FD_SETSIZE   64

Definition at line 50 of file winsock.h.


#define FD_WRITE   2

Definition at line 406 of file winsock.h.


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

Definition at line 96 of file winsock.h.


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

Definition at line 248 of file winsock.h.


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

Definition at line 149 of file winsock.h.


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



Definition at line 226 of file winsock.h.



Definition at line 293 of file winsock.h.


#define IMPLINK_IP   155

Definition at line 291 of file winsock.h.


#define IMPLINK_LOWEXPER   156

Definition at line 292 of file winsock.h.


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

Definition at line 297 of file winsock.h.


#define IN_CLASSA_HOST   0x00ffffff

Definition at line 300 of file winsock.h.


#define IN_CLASSA_MAX   128

Definition at line 301 of file winsock.h.


#define IN_CLASSA_NET   0xff000000

Definition at line 298 of file winsock.h.


#define IN_CLASSA_NSHIFT   24

Definition at line 299 of file winsock.h.


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

Definition at line 302 of file winsock.h.


#define IN_CLASSB_HOST   0x0000ffff

Definition at line 305 of file winsock.h.


#define IN_CLASSB_MAX   65536

Definition at line 306 of file winsock.h.


#define IN_CLASSB_NET   0xffff0000

Definition at line 303 of file winsock.h.


#define IN_CLASSB_NSHIFT   16

Definition at line 304 of file winsock.h.


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

Definition at line 307 of file winsock.h.


#define IN_CLASSC_HOST   0xff

Definition at line 310 of file winsock.h.


#define IN_CLASSC_NET   0xffffff00

Definition at line 308 of file winsock.h.


#define IN_CLASSC_NSHIFT   8

Definition at line 309 of file winsock.h.


#define INADDR_ANY   (u_long)0

Definition at line 311 of file winsock.h.


#define INADDR_BROADCAST   (u_long)0xffffffff

Definition at line 313 of file winsock.h.


#define INADDR_LOOPBACK   0x7f000001

Definition at line 312 of file winsock.h.


#define INADDR_NONE   0xffffffff

Definition at line 314 of file winsock.h.



Definition at line 332 of file winsock.h.


#define IOC_IN   0x80000000

Definition at line 244 of file winsock.h.



Definition at line 245 of file winsock.h.


#define IOC_OUT   0x40000000

Definition at line 243 of file winsock.h.


#define IOC_VOID   0x20000000

Definition at line 242 of file winsock.h.


#define IOCPARM_MASK   0x7f

Definition at line 241 of file winsock.h.



Definition at line 322 of file winsock.h.



Definition at line 329 of file winsock.h.



Definition at line 328 of file winsock.h.



Definition at line 326 of file winsock.h.



Definition at line 323 of file winsock.h.



Definition at line 330 of file winsock.h.


#define IP_MULTICAST_IF   2

Definition at line 319 of file winsock.h.



Definition at line 321 of file winsock.h.


#define IP_MULTICAST_TTL   3

Definition at line 320 of file winsock.h.


#define IP_OPTIONS   1

Definition at line 176 of file winsock.h.


#define IP_TOS   8

Definition at line 325 of file winsock.h.


#define IP_TTL   7

Definition at line 324 of file winsock.h.


#define IPPORT_BIFFUDP   512

Definition at line 287 of file winsock.h.


#define IPPORT_CMDSERVER   514

Definition at line 285 of file winsock.h.


#define IPPORT_DAYTIME   13

Definition at line 269 of file winsock.h.


#define IPPORT_DISCARD   9

Definition at line 267 of file winsock.h.


#define IPPORT_ECHO   7

Definition at line 266 of file winsock.h.


#define IPPORT_EFSSERVER   520

Definition at line 286 of file winsock.h.



Definition at line 283 of file winsock.h.


#define IPPORT_FINGER   79

Definition at line 280 of file winsock.h.


#define IPPORT_FTP   21

Definition at line 271 of file winsock.h.



Definition at line 284 of file winsock.h.


#define IPPORT_MTP   57

Definition at line 277 of file winsock.h.



Definition at line 275 of file winsock.h.


#define IPPORT_NETSTAT   15

Definition at line 270 of file winsock.h.


#define IPPORT_RESERVED   1024

Definition at line 290 of file winsock.h.


#define IPPORT_RJE   77

Definition at line 279 of file winsock.h.



Definition at line 289 of file winsock.h.


#define IPPORT_SMTP   25

Definition at line 273 of file winsock.h.


#define IPPORT_SUPDUP   95

Definition at line 282 of file winsock.h.


#define IPPORT_SYSTAT   11

Definition at line 268 of file winsock.h.


#define IPPORT_TELNET   23

Definition at line 272 of file winsock.h.


#define IPPORT_TFTP   69

Definition at line 278 of file winsock.h.



Definition at line 274 of file winsock.h.


#define IPPORT_TTYLINK   87

Definition at line 281 of file winsock.h.


#define IPPORT_WHOIS   43

Definition at line 276 of file winsock.h.


#define IPPORT_WHOSERVER   513

Definition at line 288 of file winsock.h.


#define IPPROTO_GGP   3

Definition at line 258 of file winsock.h.


#define IPPROTO_ICMP   1

Definition at line 256 of file winsock.h.


#define IPPROTO_IDP   22

Definition at line 262 of file winsock.h.


#define IPPROTO_IGMP   2

Definition at line 257 of file winsock.h.


#define IPPROTO_IP   0

Definition at line 255 of file winsock.h.


#define IPPROTO_MAX   256

Definition at line 265 of file winsock.h.


#define IPPROTO_ND   77

Definition at line 263 of file winsock.h.


#define IPPROTO_PUP   12

Definition at line 260 of file winsock.h.


#define IPPROTO_RAW   255

Definition at line 264 of file winsock.h.


#define IPPROTO_TCP   6

Definition at line 259 of file winsock.h.


#define IPPROTO_UDP   17

Definition at line 261 of file winsock.h.



Definition at line 403 of file winsock.h.


#define MSG_DONTROUTE   4

Definition at line 223 of file winsock.h.


#define MSG_MAXIOVLEN   16

Definition at line 401 of file winsock.h.


#define MSG_OOB   1

Definition at line 221 of file winsock.h.


#define MSG_PARTIAL   0x8000

Definition at line 402 of file winsock.h.


#define MSG_PEEK   2

Definition at line 222 of file winsock.h.



Definition at line 230 of file winsock.h.



Definition at line 229 of file winsock.h.



Definition at line 228 of file winsock.h.



Definition at line 389 of file winsock.h.


#define PF_ATM   AF_ATM

Definition at line 394 of file winsock.h.


#define PF_BAN   AF_BAN

Definition at line 393 of file winsock.h.



Definition at line 383 of file winsock.h.



Definition at line 376 of file winsock.h.



Definition at line 382 of file winsock.h.

◆ PF_DECnet

#define PF_DECnet   AF_DECnet

Definition at line 385 of file winsock.h.


#define PF_DLI   AF_DLI

Definition at line 386 of file winsock.h.


#define PF_ECMA   AF_ECMA

Definition at line 381 of file winsock.h.



Definition at line 391 of file winsock.h.



Definition at line 388 of file winsock.h.



Definition at line 374 of file winsock.h.


#define PF_INET   AF_INET

Definition at line 373 of file winsock.h.


#define PF_INET6   AF_INET6

Definition at line 395 of file winsock.h.


#define PF_IPX   AF_IPX

Definition at line 378 of file winsock.h.


#define PF_ISO   AF_ISO

Definition at line 379 of file winsock.h.


#define PF_LAT   AF_LAT

Definition at line 387 of file winsock.h.


#define PF_MAX   AF_MAX

Definition at line 396 of file winsock.h.


#define PF_NS   AF_NS

Definition at line 377 of file winsock.h.


#define PF_OSI   AF_OSI

Definition at line 380 of file winsock.h.


#define PF_PUP   AF_PUP

Definition at line 375 of file winsock.h.


#define PF_SNA   AF_SNA

Definition at line 384 of file winsock.h.


#define PF_UNIX   AF_UNIX

Definition at line 372 of file winsock.h.



Definition at line 392 of file winsock.h.



Definition at line 371 of file winsock.h.



Definition at line 390 of file winsock.h.


#define SD_BOTH   0x02

Definition at line 56 of file winsock.h.


#define SD_RECEIVE   0x00

Definition at line 54 of file winsock.h.


#define SD_SEND   0x01

Definition at line 55 of file winsock.h.


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

Definition at line 253 of file winsock.h.


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

Definition at line 250 of file winsock.h.


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

Definition at line 252 of file winsock.h.


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

Definition at line 249 of file winsock.h.


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

Definition at line 251 of file winsock.h.


#define SO_ACCEPTCONN   2

Definition at line 179 of file winsock.h.


#define SO_BROADCAST   32

Definition at line 183 of file winsock.h.


#define SO_CONNDATA   0x7000

Definition at line 197 of file winsock.h.


#define SO_CONNDATALEN   0x7004

Definition at line 201 of file winsock.h.


#define SO_CONNECT_TIME   0x700C

Definition at line 209 of file winsock.h.


#define SO_CONNOPT   0x7001

Definition at line 198 of file winsock.h.


#define SO_CONNOPTLEN   0x7005

Definition at line 202 of file winsock.h.


#define SO_DEBUG   1

Definition at line 178 of file winsock.h.


#define SO_DISCDATA   0x7002

Definition at line 199 of file winsock.h.


#define SO_DISCDATALEN   0x7006

Definition at line 203 of file winsock.h.


#define SO_DISCOPT   0x7003

Definition at line 200 of file winsock.h.


#define SO_DISCOPTLEN   0x7007

Definition at line 204 of file winsock.h.


#define SO_DONTLINGER   (u_int)(~SO_LINGER)

Definition at line 187 of file winsock.h.


#define SO_DONTROUTE   16

Definition at line 182 of file winsock.h.


#define SO_ERROR   0x1007

Definition at line 194 of file winsock.h.


#define SO_KEEPALIVE   8

Definition at line 181 of file winsock.h.


#define SO_LINGER   128

Definition at line 185 of file winsock.h.


#define SO_MAXDG   0x7009

Definition at line 206 of file winsock.h.


#define SO_MAXPATHDG   0x700A

Definition at line 207 of file winsock.h.


#define SO_OOBINLINE   256

Definition at line 186 of file winsock.h.


#define SO_OPENTYPE   0x7008

Definition at line 205 of file winsock.h.


#define SO_RCVBUF   0x1002

Definition at line 189 of file winsock.h.


#define SO_RCVLOWAT   0x1004

Definition at line 191 of file winsock.h.


#define SO_RCVTIMEO   0x1006

Definition at line 193 of file winsock.h.


#define SO_REUSEADDR   4

Definition at line 180 of file winsock.h.


#define SO_SNDBUF   0x1001

Definition at line 188 of file winsock.h.


#define SO_SNDLOWAT   0x1003

Definition at line 190 of file winsock.h.


#define SO_SNDTIMEO   0x1005

Definition at line 192 of file winsock.h.



Definition at line 211 of file winsock.h.



Definition at line 212 of file winsock.h.


#define SO_TYPE   0x1008

Definition at line 195 of file winsock.h.



Definition at line 208 of file winsock.h.


#define SO_USELOOPBACK   64

Definition at line 184 of file winsock.h.


#define SOCK_DGRAM   2

Definition at line 336 of file winsock.h.


#define SOCK_RAW   3

Definition at line 337 of file winsock.h.


#define SOCK_RDM   4

Definition at line 338 of file winsock.h.


#define SOCK_SEQPACKET   5

Definition at line 339 of file winsock.h.


#define SOCK_STREAM   1

Definition at line 335 of file winsock.h.


#define SOCKET_ERROR   (-1)

Definition at line 333 of file winsock.h.


#define SOL_SOCKET   0xffff

Definition at line 398 of file winsock.h.


#define SOMAXCONN   5

Definition at line 399 of file winsock.h.


#define TCP_BSDURGENT   0x7000

Definition at line 342 of file winsock.h.


#define TCP_NODELAY   0x0001

Definition at line 341 of file winsock.h.


#define TF_DISCONNECT   0x01

Definition at line 473 of file winsock.h.


#define TF_REUSE_SOCKET   0x02

Definition at line 474 of file winsock.h.


#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,
(((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.



Definition at line 227 of file winsock.h.



Definition at line 467 of file winsock.h.



Definition at line 466 of file winsock.h.


#define WSABASEERR   10000

Definition at line 414 of file winsock.h.



Definition at line 316 of file winsock.h.



Definition at line 417 of file winsock.h.



Definition at line 434 of file winsock.h.



Definition at line 435 of file winsock.h.



Definition at line 433 of file winsock.h.



Definition at line 423 of file winsock.h.



Definition at line 416 of file winsock.h.



Definition at line 439 of file winsock.h.



Definition at line 447 of file winsock.h.



Definition at line 440 of file winsock.h.



Definition at line 425 of file winsock.h.



Definition at line 461 of file winsock.h.



Definition at line 455 of file winsock.h.



Definition at line 418 of file winsock.h.



Definition at line 450 of file winsock.h.



Definition at line 451 of file winsock.h.



Definition at line 422 of file winsock.h.



Definition at line 415 of file winsock.h.



Definition at line 419 of file winsock.h.



Definition at line 442 of file winsock.h.



Definition at line 448 of file winsock.h.



Definition at line 420 of file winsock.h.



Definition at line 426 of file winsock.h.



Definition at line 449 of file winsock.h.



Definition at line 436 of file winsock.h.



Definition at line 438 of file winsock.h.



Definition at line 437 of file winsock.h.



Definition at line 441 of file winsock.h.



Definition at line 428 of file winsock.h.



Definition at line 443 of file winsock.h.



Definition at line 452 of file winsock.h.



Definition at line 424 of file winsock.h.



Definition at line 431 of file winsock.h.



Definition at line 432 of file winsock.h.



Definition at line 453 of file winsock.h.



Definition at line 429 of file winsock.h.



Definition at line 427 of file winsock.h.



Definition at line 457 of file winsock.h.



Definition at line 444 of file winsock.h.



Definition at line 430 of file winsock.h.



Definition at line 456 of file winsock.h.



Definition at line 446 of file winsock.h.



Definition at line 445 of file winsock.h.



Definition at line 454 of file winsock.h.



Definition at line 421 of file winsock.h.



Definition at line 479 of file winsock.h.


#define WSAGETASYNCERROR (   l)    HIWORD(l)

Definition at line 480 of file winsock.h.



Definition at line 482 of file winsock.h.



Definition at line 481 of file winsock.h.



Definition at line 462 of file winsock.h.


)    MAKELONG(b,e)

Definition at line 477 of file winsock.h.


)    MAKELONG(e,error)

Definition at line 478 of file winsock.h.



Definition at line 471 of file winsock.h.


#define WSANO_DATA   (WSABASEERR+1004)

Definition at line 465 of file winsock.h.



Definition at line 464 of file winsock.h.



Definition at line 460 of file winsock.h.


#define WSASYS_STATUS_LEN   128

Definition at line 317 of file winsock.h.



Definition at line 458 of file winsock.h.



Definition at line 463 of file winsock.h.



Definition at line 459 of file winsock.h.

Typedef Documentation

◆ fd_set

typedef struct fd_set fd_set


typedef struct fd_set FD_SET

Definition at line 493 of file winsock.h.


Definition at line 496 of file winsock.h.


typedef struct linger LINGER

Definition at line 490 of file winsock.h.


Definition at line 495 of file winsock.h.


Definition at line 498 of file winsock.h.


Definition at line 492 of file winsock.h.


Definition at line 504 of file winsock.h.


Definition at line 501 of file winsock.h.


Definition at line 486 of file winsock.h.


Definition at line 489 of file winsock.h.


Definition at line 507 of file winsock.h.




typedef struct fd_set* PFD_SET

Definition at line 494 of file winsock.h.


Definition at line 497 of file winsock.h.


typedef struct linger* PLINGER

Definition at line 491 of file winsock.h.


Definition at line 503 of file winsock.h.


Definition at line 502 of file winsock.h.


Definition at line 500 of file winsock.h.


Definition at line 485 of file winsock.h.


Definition at line 488 of file winsock.h.


Definition at line 506 of file winsock.h.



Definition at line 499 of file winsock.h.


Definition at line 484 of file winsock.h.


Definition at line 487 of file winsock.h.



Definition at line 47 of file winsock.h.


Definition at line 505 of file winsock.h.


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


Function Documentation

◆ __WSAFDIsSet()

fd_set FAR  

◆ accept()

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

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

22 return ((x & 0x00FF) << 8) | ((x & 0xFF00) >> 8);
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.

28 DPRINT("WSACancelBlockingCall\n");
30 /* Call the prolog */
33 {
34 /* Fail */
36 return SOCKET_ERROR;
37 }
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 }
47 /* Cancel the call */
50 {
51 /* Fail */
53 return SOCKET_ERROR;
54 }
56 /* Return success */
57 return 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
Definition: ndis.h:4436
#define DPRINT
Definition: sndvol32.h:73
int32_t INT
Definition: typedefs.h:58
Definition: winerror.h:1958
Definition: winsock.h:333
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.

65 LONG RefCount;
66 DPRINT("WSACleanup\n");
68 /* Enter startup lock */
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 }
86 DPRINT("WSACleanup RefCount = %ld\n", RefCount);
87 /* Return success */
90 /* Clear last error */
92 }
93 else
94 {
95 DPRINT("WSACleanup uninitialized\n");
96 /* Weren't initialized */
99 }
101 /* Release startup lock */
104 /* Done */
105 return ErrorCode;
#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
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.

114 /* Let the Windows Function do the work */
115 return GetLastError();
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.

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

◆ WSAUnhookBlockingHook()

int PASCAL FAR WSAUnhookBlockingHook ( void  )

Definition at line 130 of file bhook.c.

135 DPRINT("WSAUnhookBlockingHook\n");
137 /* Call the prolog */
140 {
141 /* Fail */
143 return SOCKET_ERROR;
144 }
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 }
154 /* Set the blocking hook and return the previous one */
DWORD WSAAPI WsThreadUnhookBlockingHook(IN PWSTHREAD Thread)
Definition: dthread.c:84