VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/mswsock.h@ 30705

Last change on this file since 30705 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 6.5 KB
Line 
1/*
2 * Copyright (C) the Wine project
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef _MSWSOCK_
29#define _MSWSOCK_
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* defined(__cplusplus) */
34
35#ifndef USE_WS_PREFIX
36#define SO_CONNDATA 0x7000
37#define SO_CONNOPT 0x7001
38#define SO_DISCDATA 0x7002
39#define SO_DISCOPT 0x7003
40#define SO_CONNDATALEN 0x7004
41#define SO_CONNOPTLEN 0x7005
42#define SO_DISCDATALEN 0x7006
43#define SO_DISCOPTLEN 0x7007
44#else
45#define WS_SO_CONNDATA 0x7000
46#define WS_SO_CONNOPT 0x7001
47#define WS_SO_DISCDATA 0x7002
48#define WS_SO_DISCOPT 0x7003
49#define WS_SO_CONNDATALEN 0x7004
50#define WS_SO_CONNOPTLEN 0x7005
51#define WS_SO_DISCDATALEN 0x7006
52#define WS_SO_DISCOPTLEN 0x7007
53#endif
54
55#ifndef USE_WS_PREFIX
56#define SO_OPENTYPE 0x7008
57#else
58#define WS_SO_OPENTYPE 0x7008
59#endif
60
61#ifndef USE_WS_PREFIX
62#define SO_SYNCHRONOUS_ALERT 0x10
63#define SO_SYNCHRONOUS_NONALERT 0x20
64#else
65#define WS_SO_SYNCHRONOUS_ALERT 0x10
66#define WS_SO_SYNCHRONOUS_NONALERT 0x20
67#endif
68
69#ifndef USE_WS_PREFIX
70#define SO_MAXDG 0x7009
71#define SO_MAXPATHDG 0x700A
72#define SO_UPDATE_ACCEPT_CONTEXT 0x700B
73#define SO_CONNECT_TIME 0x700C
74#define SO_UPDATE_CONNECT_CONTEXT 0x7010
75#else
76#define WS_SO_MAXDG 0x7009
77#define WS_SO_MAXPATHDG 0x700A
78#define WS_SO_UPDATE_ACCEPT_CONTEXT 0x700B
79#define WS_SO_CONNECT_TIME 0x700C
80#define WS_SO_UPDATE_CONNECT_CONTEXT 0x7010
81#endif
82
83#ifndef USE_WS_PREFIX
84#define TCP_BSDURGENT 0x7000
85#else
86#define WS_TCP_BSDURGENT 0x7000
87#endif
88
89#ifndef USE_WS_PREFIX
90#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
91#else
92#define WS_SIO_UDP_CONNRESET _WSAIOW(WS_IOC_VENDOR,12)
93#endif
94
95#define DE_REUSE_SOCKET TF_REUSE_SOCKET
96
97#ifndef USE_WS_PREFIX
98#define MSG_TRUNC 0x0100
99#define MSG_CTRUNC 0x0200
100#define MSG_BCAST 0x0400
101#define MSG_MCAST 0x0800
102#else
103#define WS_MSG_TRUNC 0x0100
104#define WS_MSG_CTRUNC 0x0200
105#define WS_MSG_BCAST 0x0400
106#define WS_MSG_MCAST 0x0800
107#endif
108
109#define TF_DISCONNECT 0x01
110#define TF_REUSE_SOCKET 0x02
111#define TF_WRITE_BEHIND 0x04
112#define TF_USE_DEFAULT_WORKER 0x00
113#define TF_USE_SYSTEM_THREAD 0x10
114#define TF_USE_KERNEL_APC 0x20
115
116#define TP_DISCONNECT TF_DISCONNECT
117#define TP_REUSE_SOCKET TF_REUSE_SOCKET
118#define TP_USE_DEFAULT_WORKER TF_USE_DEFAULT_WORKER
119#define TP_USE_SYSTEM_THREAD TF_USE_SYSTEM_THREAD
120#define TP_USE_KERNEL_APC TF_USE_KERNEL_APC
121
122#define TP_ELEMENT_MEMORY 1
123#define TP_ELEMENT_FILE 2
124#define TP_ELEMENT_EOP 4
125
126#define WSAID_ACCEPTEX \
127 {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
128#define WSAID_CONNECTEX \
129 {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}}
130#define WSAID_DISCONNECTEX \
131 {0x7fda2e11,0x8630,0x436f,{0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}
132#define WSAID_GETACCEPTEXSOCKADDRS \
133 {0xb5367df2,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
134#define WSAID_TRANSMITFILE \
135 {0xb5367df0,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
136#define WSAID_TRANSMITPACKETS \
137 {0xd9689da0,0x1f90,0x11d3,{0x99,0x71,0x00,0xc0,0x4f,0x68,0xc8,0x76}}
138#define WSAID_WSARECVMSG \
139 {0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}}
140
141typedef struct _TRANSMIT_FILE_BUFFERS {
142 LPVOID Head;
143 DWORD HeadLength;
144 LPVOID Tail;
145 DWORD TailLength;
146} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS;
147
148typedef struct _TRANSMIT_PACKETS_ELEMENT {
149 ULONG dwElFlags;
150 ULONG cLength;
151 union {
152 struct {
153 LARGE_INTEGER nFileOffset;
154 HANDLE hFile;
155 } DUMMYSTRUCTNAME;
156 PVOID pBuffer;
157 } DUMMYUNIONNAME;
158} TRANSMIT_PACKETS_ELEMENT, *PTRANSMIT_PACKETS_ELEMENT, *LPTRANSMIT_PACKETS_ELEMENT;
159
160typedef struct _WSAMSG {
161 LPSOCKADDR name;
162 INT namelen;
163 LPWSABUF lpBuffers;
164 DWORD dwBufferCount;
165 WSABUF Control;
166 DWORD dwFlags;
167} WSAMSG, *PWSAMSG, *LPWSAMSG;
168
169typedef struct _WSACMSGHDR {
170 SIZE_T cmsg_len;
171 INT cmsg_level;
172 INT cmsg_type;
173 /* followed by UCHAR cmsg_data[] */
174} WSACMSGHDR, *PWSACMSGHDR, *LPWSACMSGHDR;
175
176typedef BOOL (WINAPI * LPFN_ACCEPTEX)(SOCKET, SOCKET, PVOID, DWORD, DWORD, DWORD, LPDWORD, LPOVERLAPPED);
177typedef BOOL (WINAPI * LPFN_CONNECTEX)(SOCKET, const struct sockaddr *, int, PVOID, DWORD, LPDWORD, LPOVERLAPPED);
178typedef BOOL (WINAPI * LPFN_DISCONNECTEX)(SOCKET, LPOVERLAPPED, DWORD, DWORD);
179typedef VOID (WINAPI * LPFN_GETACCEPTEXSOCKADDRS)(PVOID, DWORD, DWORD, DWORD, struct sockaddr **, LPINT, struct sockaddr **, LPINT);
180typedef BOOL (WINAPI * LPFN_TRANSMITFILE)(SOCKET, HANDLE, DWORD, DWORD, LPOVERLAPPED, LPTRANSMIT_FILE_BUFFERS, DWORD);
181typedef BOOL (WINAPI * LPFN_TRANSMITPACKETS)(SOCKET, LPTRANSMIT_PACKETS_ELEMENT, DWORD, DWORD, LPOVERLAPPED, DWORD);
182typedef INT (WINAPI * LPFN_WSARECVMSG)(SOCKET, LPWSAMSG, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
183
184BOOL WINAPI AcceptEx(SOCKET, SOCKET, PVOID, DWORD, DWORD, DWORD, LPDWORD, LPOVERLAPPED);
185VOID WINAPI GetAcceptExSockaddrs(PVOID, DWORD, DWORD, DWORD, struct sockaddr **, LPINT, struct sockaddr **, LPINT);
186BOOL WINAPI TransmitFile(SOCKET, HANDLE, DWORD, DWORD, LPOVERLAPPED, LPTRANSMIT_FILE_BUFFERS, DWORD);
187INT WINAPI WSARecvEx(SOCKET, char *, INT, INT *);
188
189#ifdef __cplusplus
190}
191#endif
192
193#endif /* _MSWSOCK_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette