3 * MS-specific extensions to Windows Sockets, exported from mswsock.dll.
4 * These functions are N/A on Windows9x.
6 * This file is part of a free library for the Win32 API.
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 #pragma GCC system_header
21 #define SO_CONNDATA 0x7000
22 #define SO_CONNOPT 0x7001
23 #define SO_DISCDATA 0x7002
24 #define SO_DISCOPT 0x7003
25 #define SO_CONNDATALEN 0x7004
26 #define SO_CONNOPTLEN 0x7005
27 #define SO_DISCDATALEN 0x7006
28 #define SO_DISCOPTLEN 0x7007
29 #define SO_OPENTYPE 0x7008
30 #define SO_SYNCHRONOUS_ALERT 0x10
31 #define SO_SYNCHRONOUS_NONALERT 0x20
32 #define SO_MAXDG 0x7009
33 #define SO_MAXPATHDG 0x700A
34 #define SO_UPDATE_ACCEPT_CONTEXT 0x700B
35 #define SO_CONNECT_TIME 0x700C
36 #define TCP_BSDURGENT 0x7000
38 #define TF_DISCONNECT 1
39 #define TF_REUSE_SOCKET 2
40 #define TF_WRITE_BEHIND 4
41 #define TF_USE_DEFAULT_WORKER 0
42 #define TF_USE_SYSTEM_THREAD 16
43 #define TF_USE_KERNEL_APC 32
45 typedef struct _TRANSMIT_FILE_BUFFERS
{
50 } TRANSMIT_FILE_BUFFERS
, *PTRANSMIT_FILE_BUFFERS
, *LPTRANSMIT_FILE_BUFFERS
;
52 int PASCAL
WSARecvEx(SOCKET
,char*,int,int*);
53 BOOL PASCAL
TransmitFile(SOCKET
,HANDLE
,DWORD
,DWORD
,LPOVERLAPPED
,LPTRANSMIT_FILE_BUFFERS
,DWORD
);
54 BOOL PASCAL
AcceptEx(SOCKET
,SOCKET
,PVOID
,DWORD
,DWORD
,DWORD
,LPDWORD
,LPOVERLAPPED
);
55 VOID PASCAL
GetAcceptExSockaddrs(PVOID
,DWORD
,DWORD
,DWORD
,struct sockaddr
**, LPINT
, struct sockaddr
**, LPINT
);
57 #ifdef _WINSOCK2_H /* These require the winsock2 interface. */
59 #define TP_ELEMENT_FILE 1
60 #define TP_ELEMENT_MEMORY 2
61 #define TP_ELEMENT_EOP 4
63 typedef struct _TRANSMIT_PACKETS_ELEMENT
{
69 LARGE_INTEGER nFileOffset
;
74 } TRANSMIT_PACKETS_ELEMENT
;
76 typedef struct _WSAMSG
{
83 } WSAMSG
, *PWSAMSG
, *LPWSAMSG
;
86 /* According to MSDN docs, the WSAMSG.Control buffer starts with a
87 cmsghdr header of the following form. See also RFC 2292. */
89 typedef struct wsacmsghdr
{
93 /* followed by UCHAR cmsg_data[]; */
96 /* TODO: Standard Posix.1g macros as per RFC 2292, with WSA_uglification. */
98 #define WSA_CMSG_FIRSTHDR(mhdr)
99 #define WSA_CMSG_NXTHDR(mhdr, cmsg)
100 #define WSA_CMSG_SPACE(length)
101 #define WSA_CMSG_LEN(length)
104 BOOL PASCAL
DisconnectEx(SOCKET
,LPOVERLAPPED
,DWORD
,DWORD
);
105 int PASCAL
WSARecvMsg(SOCKET
,LPWSAMSG
,LPDWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
107 #endif /* _WINSOCK2_H */
112 #endif /* _MSWSOCK_H */