ReactOS  0.4.12-dev-409-g9f418243
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 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: winsock.h:66
static int fd
Definition: io.c:51
#define FAR
Definition: guiddef.h:36
UINT32 u_int
Definition: types.h:82

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)
Definition: winsock.h:66
static int fd
Definition: io.c:51
#define FAR
Definition: guiddef.h:36
#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))
unsigned long tv_sec
Definition: linux.h:1738
#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.

◆ WSADESCRIPTION_LEN

#define WSADESCRIPTION_LEN   256

Definition at line 316 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.

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

◆ WSASYS_STATUS_LEN

#define WSASYS_STATUS_LEN   128

Definition at line 317 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

typedef unsigned short 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()

int PASCAL FAR connect ( _In_ SOCKET  s,
_In_reads_bytes_(namelen) const struct sockaddr FAR name,
_In_ int  namelen 
)

◆ 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 gethostname ( char ,
int   
)

◆ gethostname() [2/2]

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

◆ 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 htonl ( u_long  )

◆ htonl() [2/2]

u_long PASCAL FAR htonl ( _In_ u_long  hostlong)

◆ htons() [1/2]

u_short PASCAL htons ( u_short  )

Definition at line 20 of file connect.c.

21 {
22  return ((x & 0x00FF) << 8) | ((x & 0xFF00) >> 8);
23 }
INT x
Definition: msvc.h:62

◆ htons() [2/2]

u_short PASCAL FAR htons ( _In_ u_short  hostshort)

◆ 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 ntohl ( u_long  )

◆ ntohl() [2/2]

u_long PASCAL FAR ntohl ( _In_ u_long  netlong)

◆ ntohs() [1/2]

u_short PASCAL ntohs ( u_short  )

◆ ntohs() [2/2]

u_short PASCAL FAR ntohs ( _In_ u_short  netshort)

◆ 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 select ( int  nfds,
fd_set ,
fd_set ,
fd_set ,
const struct timeval  
)

◆ select() [2/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 
)

◆ 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 {
27  INT ErrorCode;
28  DPRINT("WSACancelBlockingCall\n");
29 
30  /* Call the prolog */
32  if (ErrorCode != ERROR_SUCCESS)
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 */
49  if (ErrorCode != ERROR_SUCCESS)
50  {
51  /* Fail */
53  return SOCKET_ERROR;
54  }
55 
56  /* Return success */
57  return ERROR_SUCCESS;
58 }
#define SOCKET_ERROR
Definition: winsock.h:333
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LOBYTE(W)
Definition: jmemdos.c:487
int32_t INT
Definition: typedefs.h:56
#define WSAEOPNOTSUPP
Definition: winerror.h:1958
void DPRINT(...)
Definition: polytest.cpp:61
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
#define SetLastError(x)
Definition: compat.h:409
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
DWORD WSAAPI WsThreadCancelBlockingCall(IN PWSTHREAD Thread)
Definition: dthread.c:96

◆ WSACleanup()

int PASCAL FAR WSACleanup ( void  )

Definition at line 60 of file startup.c.

61 {
64  INT ErrorCode;
65  LONG RefCount;
66  DPRINT("WSACleanup\n");
67 
68  /* Enter startup lock */
69  WsStartupLock();
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 */
102  WsStartupUnlock();
103 
104  /* Done */
105  return ErrorCode;
106 }
#define SOCKET_ERROR
Definition: winsock.h:333
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define ERROR_SUCCESS
Definition: deptool.c:10
int32_t INT
Definition: typedefs.h:56
long LONG
Definition: pedump.c:60
void DPRINT(...)
Definition: polytest.cpp:61
BOOLEAN WsAsyncThreadInitialized
Definition: async.c:15
VOID WSAAPI WsAsyncTerminateThread(VOID)
Definition: async.c:899
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
VOID WSAAPI WsProcDelete(IN PWSPROCESS Process)
Definition: dprocess.c:247
#define SetLastError(x)
Definition: compat.h:409
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
#define InterlockedDecrement
Definition: armddk.h:52
#define WsStartupLock()
Definition: startup.c:21
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
#define WsStartupUnlock()
Definition: startup.c:22

◆ 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:1059

◆ WSAIsBlocking()

BOOL PASCAL FAR WSAIsBlocking ( void  )

Definition at line 65 of file bhook.c.

66 {
69  INT ErrorCode;
70  DPRINT("WSAIsBlocking\n");
71 
72  /* Call the prolog */
74  if (ErrorCode != ERROR_SUCCESS)
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 }
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WSAEINPROGRESS
Definition: winerror.h:1949
int32_t INT
Definition: typedefs.h:56
void DPRINT(...)
Definition: polytest.cpp:61
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219

◆ 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 {
134  INT ErrorCode;
135  DPRINT("WSAUnhookBlockingHook\n");
136 
137  /* Call the prolog */
139  if (ErrorCode != ERROR_SUCCESS)
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 }
#define SOCKET_ERROR
Definition: winsock.h:333
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LOBYTE(W)
Definition: jmemdos.c:487
int32_t INT
Definition: typedefs.h:56
#define WSAEOPNOTSUPP
Definition: winerror.h:1958
DWORD WSAAPI WsThreadUnhookBlockingHook(IN PWSTHREAD Thread)
Definition: dthread.c:84
void DPRINT(...)
Definition: polytest.cpp:61
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
#define SetLastError(x)
Definition: compat.h:409
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219