1 | /*
|
---|
2 | * Winsock 2 definitions - used for ws2_32.dll
|
---|
3 | *
|
---|
4 | * Copyright (C) 1999 Ove Kaaven
|
---|
5 | * Copyright (C) 2001 Francois Gouget
|
---|
6 | *
|
---|
7 | * This library is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU Lesser General Public
|
---|
9 | * License as published by the Free Software Foundation; either
|
---|
10 | * version 2.1 of the License, or (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This library is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
15 | * Lesser General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU Lesser General Public
|
---|
18 | * License along with this library; if not, write to the Free Software
|
---|
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
20 | *
|
---|
21 | * FIXME: Still missing required Winsock 2 definitions.
|
---|
22 | */
|
---|
23 |
|
---|
24 | /*
|
---|
25 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
26 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
27 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
28 | * a choice of LGPL license versions is made available with the language indicating
|
---|
29 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
30 | * of the LGPL is applied is otherwise unspecified.
|
---|
31 | */
|
---|
32 |
|
---|
33 | #ifndef _WINSOCK2API_
|
---|
34 | #define _WINSOCK2API_
|
---|
35 |
|
---|
36 | /*
|
---|
37 | * Setup phase
|
---|
38 | */
|
---|
39 |
|
---|
40 | /* Everything common between winsock.h and winsock2.h */
|
---|
41 | #ifndef INCL_WINSOCK_API_PROTOTYPES
|
---|
42 | #define INCL_WINSOCK_API_PROTOTYPES 1
|
---|
43 | #define WS_API_PROTOTYPES 1
|
---|
44 | #else
|
---|
45 | #define WS_API_PROTOTYPES INCL_WINSOCK_API_PROTOTYPES
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | #ifndef INCL_WINSOCK_API_TYPEDEFS
|
---|
49 | #define INCL_WINSOCK_API_TYPEDEFS 0
|
---|
50 | #define WS_API_TYPEDEFS 0
|
---|
51 | #else
|
---|
52 | #define WS_API_TYPEDEFS INCL_WINSOCK_API_TYPEDEFS
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #define __WINE_WINSOCK2__
|
---|
56 | #include <winsock.h>
|
---|
57 | #undef __WINE_WINSOCK2__
|
---|
58 |
|
---|
59 | #include <ws2def.h>
|
---|
60 |
|
---|
61 | #ifdef __cplusplus
|
---|
62 | extern "C" {
|
---|
63 | #endif /* defined(__cplusplus) */
|
---|
64 |
|
---|
65 |
|
---|
66 | #ifndef USE_WS_PREFIX
|
---|
67 | #define SO_GROUP_ID 0x2001
|
---|
68 | #define SO_GROUP_PRIORITY 0x2002
|
---|
69 | #define SO_MAX_MSG_SIZE 0x2003
|
---|
70 | #define SO_PROTOCOL_INFOA 0x2004
|
---|
71 | #define SO_PROTOCOL_INFOW 0x2005
|
---|
72 | #define SO_PROTOCOL_INFO WINELIB_NAME_AW(WS_SO_PROTOCOL_INFO)
|
---|
73 | #define PVD_CONFIG 0x3001
|
---|
74 | #define SO_CONDITIONAL_ACCEPT 0x3002
|
---|
75 | #else
|
---|
76 | #define WS_SO_GROUP_ID 0x2001
|
---|
77 | #define WS_SO_GROUP_PRIORITY 0x2002
|
---|
78 | #define WS_SO_MAX_MSG_SIZE 0x2003
|
---|
79 | #define WS_SO_PROTOCOL_INFOA 0x2004
|
---|
80 | #define WS_SO_PROTOCOL_INFOW 0x2005
|
---|
81 | #define WS_SO_PROTOCOL_INFO WINELIB_NAME_AW(WS_SO_PROTOCOL_INFO)
|
---|
82 | #define WS_PVD_CONFIG 0x3001
|
---|
83 | #define WS_SO_CONDITIONAL_ACCEPT 0x3002
|
---|
84 | #endif
|
---|
85 |
|
---|
86 | /* protocol types */
|
---|
87 |
|
---|
88 | #define FROM_PROTOCOL_INFO (-1)
|
---|
89 |
|
---|
90 | #ifndef USE_WS_PREFIX
|
---|
91 | #define SOCK_STREAM 1
|
---|
92 | #define SOCK_DGRAM 2
|
---|
93 | #define SOCK_RAW 3
|
---|
94 | #define SOCK_RDM 4
|
---|
95 | #define SOCK_SEQPACKET 5
|
---|
96 | #else /* USE_WS_PREFIX */
|
---|
97 | #define WS_SOCK_STREAM 1
|
---|
98 | #define WS_SOCK_DGRAM 2
|
---|
99 | #define WS_SOCK_RAW 3
|
---|
100 | #define WS_SOCK_RDM 4
|
---|
101 | #define WS_SOCK_SEQPACKET 5
|
---|
102 | #endif /* USE_WS_PREFIX */
|
---|
103 |
|
---|
104 | /* option flags per socket */
|
---|
105 |
|
---|
106 | #define FD_MAX_EVENTS 10
|
---|
107 | #define FD_READ_BIT 0
|
---|
108 | #define FD_WRITE_BIT 1
|
---|
109 | #define FD_OOB_BIT 2
|
---|
110 | #define FD_ACCEPT_BIT 3
|
---|
111 | #define FD_CONNECT_BIT 4
|
---|
112 | #define FD_CLOSE_BIT 5
|
---|
113 |
|
---|
114 | /* Constants for LPCONDITIONPROC */
|
---|
115 | #define CF_ACCEPT 0x0000
|
---|
116 | #define CF_REJECT 0x0001
|
---|
117 | #define CF_DEFER 0x0002
|
---|
118 |
|
---|
119 | /* Constants for shutdown() */
|
---|
120 | #define SD_RECEIVE 0x00
|
---|
121 | #define SD_SEND 0x01
|
---|
122 | #define SD_BOTH 0x02
|
---|
123 |
|
---|
124 | /* Constants for WSAIoctl() */
|
---|
125 | #ifdef USE_WS_PREFIX
|
---|
126 | #define WS_IOC_UNIX 0x00000000
|
---|
127 | #define WS_IOC_WS2 0x08000000
|
---|
128 | #define WS_IOC_PROTOCOL 0x10000000
|
---|
129 | #define WS_IOC_VENDOR 0x18000000
|
---|
130 | #define WS_IOC_VOID 0x20000000
|
---|
131 | #define WS_IOC_OUT 0x40000000
|
---|
132 | #define WS_IOC_IN 0x80000000
|
---|
133 | #define WS_IOC_INOUT (WS_IOC_IN|WS_IOC_OUT)
|
---|
134 | #define _WSAIO(x,y) (WS_IOC_VOID|(x)|(y))
|
---|
135 | #define _WSAIOR(x,y) (WS_IOC_OUT|(x)|(y))
|
---|
136 | #define _WSAIOW(x,y) (WS_IOC_IN|(x)|(y))
|
---|
137 | #define _WSAIORW(x,y) (WS_IOC_INOUT|(x)|(y))
|
---|
138 | #define WS_SIO_ASSOCIATE_HANDLE _WSAIOW(WS_IOC_WS2,1)
|
---|
139 | #define WS_SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(WS_IOC_WS2,2)
|
---|
140 | #define WS_SIO_FIND_ROUTE _WSAIOR(WS_IOC_WS2,3)
|
---|
141 | #define WS_SIO_FLUSH _WSAIO(WS_IOC_WS2,4)
|
---|
142 | #define WS_SIO_GET_BROADCAST_ADDRESS _WSAIOR(WS_IOC_WS2,5)
|
---|
143 | #define WS_SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(WS_IOC_WS2,6)
|
---|
144 | #define WS_SIO_GET_QOS _WSAIORW(WS_IOC_WS2,7)
|
---|
145 | #define WS_SIO_GET_GROUP_QOS _WSAIORW(WS_IOC_WS2,8)
|
---|
146 | #define WS_SIO_MULTIPOINT_LOOPBACK _WSAIOW(WS_IOC_WS2,9)
|
---|
147 | #define WS_SIO_MULTICAST_SCOPE _WSAIOW(WS_IOC_WS2,10)
|
---|
148 | #define WS_SIO_SET_QOS _WSAIOW(WS_IOC_WS2,11)
|
---|
149 | #define WS_SIO_SET_GROUP_QOS _WSAIOW(WS_IOC_WS2,12)
|
---|
150 | #define WS_SIO_TRANSLATE_HANDLE _WSAIORW(WS_IOC_WS2,13)
|
---|
151 | #define WS_SIO_ROUTING_INTERFACE_QUERY _WSAIORW(WS_IOC_WS2,20)
|
---|
152 | #define WS_SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(WS_IOC_WS2,21)
|
---|
153 | #define WS_SIO_ADDRESS_LIST_QUERY _WSAIOR(WS_IOC_WS2,22)
|
---|
154 | #define WS_SIO_ADDRESS_LIST_CHANGE _WSAIO(WS_IOC_WS2,23)
|
---|
155 | #define WS_SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(WS_IOC_WS2,24)
|
---|
156 | #define WS_SIO_GET_INTERFACE_LIST WS__IOR('t', 127, ULONG)
|
---|
157 | #else /* USE_WS_PREFIX */
|
---|
158 | #undef IOC_VOID
|
---|
159 | #undef IOC_IN
|
---|
160 | #undef IOC_OUT
|
---|
161 | #undef IOC_INOUT
|
---|
162 | #define IOC_UNIX 0x00000000
|
---|
163 | #define IOC_WS2 0x08000000
|
---|
164 | #define IOC_PROTOCOL 0x10000000
|
---|
165 | #define IOC_VENDOR 0x18000000
|
---|
166 | #define IOC_VOID 0x20000000
|
---|
167 | #define IOC_OUT 0x40000000
|
---|
168 | #define IOC_IN 0x80000000
|
---|
169 | #define IOC_INOUT (IOC_IN|IOC_OUT)
|
---|
170 | #define _WSAIO(x,y) (IOC_VOID|(x)|(y))
|
---|
171 | #define _WSAIOR(x,y) (IOC_OUT|(x)|(y))
|
---|
172 | #define _WSAIOW(x,y) (IOC_IN|(x)|(y))
|
---|
173 | #define _WSAIORW(x,y) (IOC_INOUT|(x)|(y))
|
---|
174 | #define SIO_ASSOCIATE_HANDLE _WSAIOW(IOC_WS2,1)
|
---|
175 | #define SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(IOC_WS2,2)
|
---|
176 | #define SIO_FIND_ROUTE _WSAIOR(IOC_WS2,3)
|
---|
177 | #define SIO_FLUSH _WSAIO(IOC_WS2,4)
|
---|
178 | #define SIO_GET_BROADCAST_ADDRESS _WSAIOR(IOC_WS2,5)
|
---|
179 | #define SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,6)
|
---|
180 | #define SIO_GET_QOS _WSAIORW(IOC_WS2,7)
|
---|
181 | #define SIO_GET_GROUP_QOS _WSAIORW(IOC_WS2,8)
|
---|
182 | #define SIO_MULTIPOINT_LOOPBACK _WSAIOW(IOC_WS2,9)
|
---|
183 | #define SIO_MULTICAST_SCOPE _WSAIOW(IOC_WS2,10)
|
---|
184 | #define SIO_SET_QOS _WSAIOW(IOC_WS2,11)
|
---|
185 | #define SIO_SET_GROUP_QOS _WSAIOW(IOC_WS2,12)
|
---|
186 | #define SIO_TRANSLATE_HANDLE _WSAIORW(IOC_WS2,13)
|
---|
187 | #define SIO_ROUTING_INTERFACE_QUERY _WSAIORW(IOC_WS2,20)
|
---|
188 | #define SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(IOC_WS2,21)
|
---|
189 | #define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
|
---|
190 | #define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
|
---|
191 | #define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
|
---|
192 | #define SIO_GET_INTERFACE_LIST _IOR ('t', 127, ULONG)
|
---|
193 | #endif /* USE_WS_PREFIX */
|
---|
194 |
|
---|
195 | /* Constants for WSAIoctl() */
|
---|
196 | #define WSA_FLAG_OVERLAPPED 0x01
|
---|
197 | #define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
|
---|
198 | #define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
|
---|
199 | #define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
|
---|
200 | #define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
|
---|
201 |
|
---|
202 | /* Constants for WSAJoinLeaf() */
|
---|
203 | #define JL_SENDER_ONLY 0x01
|
---|
204 | #define JL_RECEIVER_ONLY 0x02
|
---|
205 | #define JL_BOTH 0x04
|
---|
206 |
|
---|
207 |
|
---|
208 | #ifndef GUID_DEFINED
|
---|
209 | #include <guiddef.h>
|
---|
210 | #endif
|
---|
211 |
|
---|
212 | #define MAX_PROTOCOL_CHAIN 7
|
---|
213 | #define BASE_PROTOCOL 1
|
---|
214 | #define LAYERED_PROTOCOL 0
|
---|
215 |
|
---|
216 | typedef struct _WSAPROTOCOLCHAIN
|
---|
217 | {
|
---|
218 | int ChainLen; /* the length of the chain, */
|
---|
219 | /* length = 0 means layered protocol, */
|
---|
220 | /* length = 1 means base protocol, */
|
---|
221 | /* length > 1 means protocol chain */
|
---|
222 | DWORD ChainEntries[MAX_PROTOCOL_CHAIN]; /* a list of dwCatalogEntryIds */
|
---|
223 | } WSAPROTOCOLCHAIN, * LPWSAPROTOCOLCHAIN;
|
---|
224 |
|
---|
225 | #define XP1_CONNECTIONLESS 0x00000001
|
---|
226 | #define XP1_GUARANTEED_DELIVERY 0x00000002
|
---|
227 | #define XP1_GUARANTEED_ORDER 0x00000004
|
---|
228 | #define XP1_MESSAGE_ORIENTED 0x00000008
|
---|
229 | #define XP1_PSEUDO_STREAM 0x00000010
|
---|
230 | #define XP1_GRACEFUL_CLOSE 0x00000020
|
---|
231 | #define XP1_EXPEDITED_DATA 0x00000040
|
---|
232 | #define XP1_CONNECT_DATA 0x00000080
|
---|
233 | #define XP1_DISCONNECT_DATA 0x00000100
|
---|
234 | #define XP1_SUPPORT_BROADCAST 0x00000200
|
---|
235 | #define XP1_SUPPORT_MULTIPOINT 0x00000400
|
---|
236 | #define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
|
---|
237 | #define XP1_MULTIPOINT_DATA_PLANE 0x00001000
|
---|
238 | #define XP1_QOS_SUPPORTED 0x00002000
|
---|
239 | #define XP1_INTERRUPT 0x00004000
|
---|
240 | #define XP1_UNI_SEND 0x00008000
|
---|
241 | #define XP1_UNI_RECV 0x00010000
|
---|
242 | #define XP1_IFS_HANDLES 0x00020000
|
---|
243 | #define XP1_PARTIAL_MESSAGE 0x00040000
|
---|
244 |
|
---|
245 | #define BIGENDIAN 0x0000
|
---|
246 | #define LITTLEENDIAN 0x0001
|
---|
247 |
|
---|
248 | #define SECURITY_PROTOCOL_NONE 0x0000
|
---|
249 |
|
---|
250 | #define WSAPROTOCOL_LEN 255
|
---|
251 | typedef struct _WSAPROTOCOL_INFOA
|
---|
252 | {
|
---|
253 | DWORD dwServiceFlags1;
|
---|
254 | DWORD dwServiceFlags2;
|
---|
255 | DWORD dwServiceFlags3;
|
---|
256 | DWORD dwServiceFlags4;
|
---|
257 | DWORD dwProviderFlags;
|
---|
258 | GUID ProviderId;
|
---|
259 | DWORD dwCatalogEntryId;
|
---|
260 | WSAPROTOCOLCHAIN ProtocolChain;
|
---|
261 | int iVersion;
|
---|
262 | int iAddressFamily;
|
---|
263 | int iMaxSockAddr;
|
---|
264 | int iMinSockAddr;
|
---|
265 | int iSocketType;
|
---|
266 | int iProtocol;
|
---|
267 | int iProtocolMaxOffset;
|
---|
268 | int iNetworkByteOrder;
|
---|
269 | int iSecurityScheme;
|
---|
270 | DWORD dwMessageSize;
|
---|
271 | DWORD dwProviderReserved;
|
---|
272 | CHAR szProtocol[WSAPROTOCOL_LEN+1];
|
---|
273 | } WSAPROTOCOL_INFOA, * LPWSAPROTOCOL_INFOA;
|
---|
274 |
|
---|
275 | typedef struct _WSAPROTOCOL_INFOW
|
---|
276 | {
|
---|
277 | DWORD dwServiceFlags1;
|
---|
278 | DWORD dwServiceFlags2;
|
---|
279 | DWORD dwServiceFlags3;
|
---|
280 | DWORD dwServiceFlags4;
|
---|
281 | DWORD dwProviderFlags;
|
---|
282 | GUID ProviderId;
|
---|
283 | DWORD dwCatalogEntryId;
|
---|
284 | WSAPROTOCOLCHAIN ProtocolChain;
|
---|
285 | int iVersion;
|
---|
286 | int iAddressFamily;
|
---|
287 | int iMaxSockAddr;
|
---|
288 | int iMinSockAddr;
|
---|
289 | int iSocketType;
|
---|
290 | int iProtocol;
|
---|
291 | int iProtocolMaxOffset;
|
---|
292 | int iNetworkByteOrder;
|
---|
293 | int iSecurityScheme;
|
---|
294 | DWORD dwMessageSize;
|
---|
295 | DWORD dwProviderReserved;
|
---|
296 | WCHAR szProtocol[WSAPROTOCOL_LEN+1];
|
---|
297 | } WSAPROTOCOL_INFOW, *LPWSAPROTOCOL_INFOW;
|
---|
298 |
|
---|
299 | DECL_WINELIB_TYPE_AW(WSAPROTOCOL_INFO)
|
---|
300 | DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO)
|
---|
301 |
|
---|
302 | typedef struct _WSANETWORKEVENTS
|
---|
303 | {
|
---|
304 | LONG lNetworkEvents;
|
---|
305 | int iErrorCode[FD_MAX_EVENTS];
|
---|
306 | } WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
|
---|
307 |
|
---|
308 | typedef struct _WSANSClassInfoA
|
---|
309 | {
|
---|
310 | LPSTR lpszName;
|
---|
311 | DWORD dwNameSpace;
|
---|
312 | DWORD dwValueType;
|
---|
313 | DWORD dwValueSize;
|
---|
314 | LPVOID lpValue;
|
---|
315 | } WSANSCLASSINFOA, *PWSANSCLASSINFOA, *LPWSANSCLASSINFOA;
|
---|
316 |
|
---|
317 | typedef struct _WSANSClassInfoW
|
---|
318 | {
|
---|
319 | LPSTR lpszName;
|
---|
320 | DWORD dwNameSpace;
|
---|
321 | DWORD dwValueType;
|
---|
322 | DWORD dwValueSize;
|
---|
323 | LPVOID lpValue;
|
---|
324 | } WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
|
---|
325 |
|
---|
326 | DECL_WINELIB_TYPE_AW(WSANSCLASSINFO)
|
---|
327 | DECL_WINELIB_TYPE_AW(PWSANSCLASSINFO)
|
---|
328 | DECL_WINELIB_TYPE_AW(LPWSANSCLASSINFO)
|
---|
329 |
|
---|
330 | typedef struct _WSAServiceClassInfoA
|
---|
331 | {
|
---|
332 | LPGUID lpServiceClassId;
|
---|
333 | LPSTR lpszServiceClassName;
|
---|
334 | DWORD dwCount;
|
---|
335 | LPWSANSCLASSINFOA lpClassInfos;
|
---|
336 | } WSASERVICECLASSINFOA, *PWSASERVICECLASSINFOA, *LPWSASERVICECLASSINFOA;
|
---|
337 |
|
---|
338 | typedef struct _WSAServiceClassInfoW
|
---|
339 | {
|
---|
340 | LPGUID lpServiceClassId;
|
---|
341 | LPWSTR lpszServiceClassName;
|
---|
342 | DWORD dwCount;
|
---|
343 | LPWSANSCLASSINFOW lpClassInfos;
|
---|
344 | } WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
|
---|
345 |
|
---|
346 |
|
---|
347 | DECL_WINELIB_TYPE_AW(WSASERVICECLASSINFO)
|
---|
348 | DECL_WINELIB_TYPE_AW(PWSASERVICECLASSINFO)
|
---|
349 | DECL_WINELIB_TYPE_AW(LPWSASERVICECLASSINFO)
|
---|
350 |
|
---|
351 | typedef struct _WSABUF
|
---|
352 | {
|
---|
353 | ULONG len;
|
---|
354 | CHAR* buf;
|
---|
355 | } WSABUF, *LPWSABUF;
|
---|
356 |
|
---|
357 | #define WSAEVENT HANDLE
|
---|
358 | #define LPWSAEVENT LPHANDLE
|
---|
359 | #define WSAOVERLAPPED OVERLAPPED
|
---|
360 | typedef struct _OVERLAPPED* LPWSAOVERLAPPED;
|
---|
361 |
|
---|
362 | #define WSA_IO_PENDING (ERROR_IO_PENDING)
|
---|
363 | #define WSA_IO_INCOMPLETE (ERROR_IO_INCOMPLETE)
|
---|
364 | #define WSA_INVALID_HANDLE (ERROR_INVALID_HANDLE)
|
---|
365 | #define WSA_INVALID_PARAMETER (ERROR_INVALID_PARAMETER)
|
---|
366 | #define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
|
---|
367 | #define WSA_OPERATION_ABORTED (ERROR_OPERATION_ABORTED)
|
---|
368 |
|
---|
369 | #define WSA_INVALID_EVENT ((WSAEVENT)NULL)
|
---|
370 | #define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
|
---|
371 | #define WSA_WAIT_FAILED ((DWORD)-1L)
|
---|
372 | #define WSA_WAIT_EVENT_0 (WAIT_OBJECT_0)
|
---|
373 | #define WSA_WAIT_IO_COMPLETION (WAIT_IO_COMPLETION)
|
---|
374 | #define WSA_WAIT_TIMEOUT (WAIT_TIMEOUT)
|
---|
375 | #define WSA_INFINITE (INFINITE)
|
---|
376 |
|
---|
377 | typedef unsigned int GROUP;
|
---|
378 | #define SG_UNCONSTRAINED_GROUP 0x01
|
---|
379 | #define SG_CONSTRAINED_GROUP 0x02
|
---|
380 |
|
---|
381 | /*
|
---|
382 | * FLOWSPEC and SERVICETYPE should eventually move to qos.h
|
---|
383 | */
|
---|
384 |
|
---|
385 | typedef ULONG SERVICETYPE;
|
---|
386 |
|
---|
387 | typedef struct _FLOWSPEC {
|
---|
388 | unsigned int TokenRate;
|
---|
389 | unsigned int TokenBucketSize;
|
---|
390 | unsigned int PeakBandwidth;
|
---|
391 | unsigned int Latency;
|
---|
392 | unsigned int DelayVariation;
|
---|
393 | SERVICETYPE ServiceType;
|
---|
394 | unsigned int MaxSduSize;
|
---|
395 | unsigned int MinimumPolicedSize;
|
---|
396 | } FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC;
|
---|
397 |
|
---|
398 | typedef struct _QUALITYOFSERVICE {
|
---|
399 | FLOWSPEC SendingFlowspec;
|
---|
400 | FLOWSPEC ReceivingFlowspec;
|
---|
401 | WSABUF ProviderSpecific;
|
---|
402 | } QOS, *LPQOS;
|
---|
403 |
|
---|
404 | typedef int (CALLBACK *LPCONDITIONPROC)
|
---|
405 | (
|
---|
406 | LPWSABUF lpCallerId,
|
---|
407 | LPWSABUF lpCallerData,
|
---|
408 | LPQOS lpSQOS,
|
---|
409 | LPQOS lpGQOS,
|
---|
410 | LPWSABUF lpCalleeId,
|
---|
411 | LPWSABUF lpCalleeData,
|
---|
412 | GROUP *g,
|
---|
413 | DWORD dwCallbackData
|
---|
414 | );
|
---|
415 |
|
---|
416 | typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
|
---|
417 | (
|
---|
418 | DWORD dwError,
|
---|
419 | DWORD cbTransferred,
|
---|
420 | LPWSAOVERLAPPED lpOverlapped,
|
---|
421 | DWORD dwFlags
|
---|
422 | );
|
---|
423 |
|
---|
424 | #ifndef _tagBLOB_DEFINED
|
---|
425 | #define _tagBLOB_DEFINED
|
---|
426 | #define _BLOB_DEFINED
|
---|
427 | #define _LPBLOB_DEFINED
|
---|
428 | typedef struct _BLOB {
|
---|
429 | ULONG cbSize;
|
---|
430 | BYTE *pBlobData;
|
---|
431 | } BLOB, *LPBLOB;
|
---|
432 | #endif
|
---|
433 |
|
---|
434 | /* addressfamily protocol pairs */
|
---|
435 | typedef struct _AFPROTOCOLS {
|
---|
436 | INT iAddressFamily;
|
---|
437 | INT iProtocol;
|
---|
438 | } AFPROTOCOLS, *PAFPROTOCOLS, *LPAFPROTOCOLS;
|
---|
439 |
|
---|
440 | /* client query definitions */
|
---|
441 | typedef enum _WSAEcomparator {
|
---|
442 | COMP_EQUAL = 0,
|
---|
443 | COMP_NOTLESS
|
---|
444 | } WSAECOMPARATOR, *PWSAECOMPARATOR, *LPWSAECOMPARATOR;
|
---|
445 |
|
---|
446 | typedef struct _WSAVersion {
|
---|
447 | DWORD dwVersion;
|
---|
448 | WSAECOMPARATOR ecHow;
|
---|
449 | } WSAVERSION, *PWSAVERSION, *LPWSAVERSION;
|
---|
450 |
|
---|
451 |
|
---|
452 | typedef struct _WSAQuerySetA {
|
---|
453 | DWORD dwSize;
|
---|
454 | LPSTR lpszServiceInstanceName;
|
---|
455 | LPGUID lpServiceClassId;
|
---|
456 | LPWSAVERSION lpVersion;
|
---|
457 | LPSTR lpszComment;
|
---|
458 | DWORD dwNameSpace;
|
---|
459 | LPGUID lpNSProviderId;
|
---|
460 | LPSTR lpszContext;
|
---|
461 | DWORD dwNumberOfProtocols;
|
---|
462 | LPAFPROTOCOLS lpafpProtocols;
|
---|
463 | LPSTR lpszQueryString;
|
---|
464 | DWORD dwNumberOfCsAddrs;
|
---|
465 | LPCSADDR_INFO lpcsaBuffer;
|
---|
466 | DWORD dwOutputFlags;
|
---|
467 | LPBLOB lpBlob;
|
---|
468 | } WSAQUERYSETA, *PWSAQUERYSETA, *LPWSAQUERYSETA;
|
---|
469 |
|
---|
470 | typedef struct _WSAQuerySetW {
|
---|
471 | DWORD dwSize;
|
---|
472 | LPWSTR lpszServiceInstanceName;
|
---|
473 | LPGUID lpServiceClassId;
|
---|
474 | LPWSAVERSION lpVersion;
|
---|
475 | LPWSTR lpszComment;
|
---|
476 | DWORD dwNameSpace;
|
---|
477 | LPGUID lpNSProviderId;
|
---|
478 | LPWSTR lpszContext;
|
---|
479 | DWORD dwNumberOfProtocols;
|
---|
480 | LPAFPROTOCOLS lpafpProtocols;
|
---|
481 | LPWSTR lpszQueryString;
|
---|
482 | DWORD dwNumberOfCsAddrs;
|
---|
483 | LPCSADDR_INFO lpcsaBuffer;
|
---|
484 | DWORD dwOutputFlags;
|
---|
485 | LPBLOB lpBlob;
|
---|
486 | } WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW;
|
---|
487 |
|
---|
488 | DECL_WINELIB_TYPE_AW(WSAQUERYSET)
|
---|
489 | DECL_WINELIB_TYPE_AW(PWSAQUERYSET)
|
---|
490 | DECL_WINELIB_TYPE_AW(LPWSAQUERYSET)
|
---|
491 |
|
---|
492 | typedef enum _WSAESETSERVICEOP {
|
---|
493 | RNRSERVICE_REGISTER = 0,
|
---|
494 | RNRSERVICE_DEREGISTER,
|
---|
495 | RNRSERVICE_DELETE
|
---|
496 | } WSAESETSERVICEOP, *PWSAESETSERVICEOP, *LPWSAESETSERVICEOP;
|
---|
497 |
|
---|
498 | typedef struct _WSANAMESPACE_INFOA {
|
---|
499 | GUID NSProviderId;
|
---|
500 | DWORD dwNameSpace;
|
---|
501 | BOOL fActive;
|
---|
502 | DWORD dwVersion;
|
---|
503 | LPSTR lpszIdentifier;
|
---|
504 | } WSANAMESPACE_INFOA, *PWSANAMESPACE_INFOA, *LPWSANAMESPACE_INFOA;
|
---|
505 |
|
---|
506 | typedef struct _WSANAMESPACE_INFOW {
|
---|
507 | GUID NSProviderId;
|
---|
508 | DWORD dwNameSpace;
|
---|
509 | BOOL fActive;
|
---|
510 | DWORD dwVersion;
|
---|
511 | LPWSTR lpszIdentifier;
|
---|
512 | } WSANAMESPACE_INFOW, *PWSANAMESPACE_INFOW, *LPWSANAMESPACE_INFOW;
|
---|
513 |
|
---|
514 | DECL_WINELIB_TYPE_AW(WSANAMESPACE_INFO)
|
---|
515 | DECL_WINELIB_TYPE_AW(PWSANAMESPACE_INFO)
|
---|
516 | DECL_WINELIB_TYPE_AW(LPWSANAMESPACE_INFO)
|
---|
517 |
|
---|
518 | /*
|
---|
519 | * Winsock Function Typedefs
|
---|
520 | *
|
---|
521 | * Remember to keep this section in sync with the
|
---|
522 | * "Prototypes" section in winsock.h.
|
---|
523 | */
|
---|
524 | #if WS_API_TYPEDEFS
|
---|
525 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,WS(u_int),const char*,int,int,char*,int);
|
---|
526 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,WS(u_int),const char*,char*,int);
|
---|
527 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,WS(u_int),const char*,char*,int);
|
---|
528 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,WS(u_int),int,char*,int);
|
---|
529 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
|
---|
530 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,WS(u_int),int,const char*,char*,int);
|
---|
531 | typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),LONG);
|
---|
532 | typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE);
|
---|
533 | typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
|
---|
534 | typedef int (WINAPI *LPFN_WSACLEANUP)(void);
|
---|
535 | typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void);
|
---|
536 | typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void);
|
---|
537 | typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC);
|
---|
538 | typedef void (WINAPI *LPFN_WSASETLASTERROR)(int);
|
---|
539 | typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA);
|
---|
540 | typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
|
---|
541 |
|
---|
542 | typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*);
|
---|
543 | typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int);
|
---|
544 | typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET);
|
---|
545 | typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int);
|
---|
546 | typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int);
|
---|
547 | typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*);
|
---|
548 | typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int);
|
---|
549 | typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*);
|
---|
550 | typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*);
|
---|
551 | typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int);
|
---|
552 | #ifdef WS_DEFINE_SELECT
|
---|
553 | typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
|
---|
554 | #endif
|
---|
555 | typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*);
|
---|
556 | typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
|
---|
557 | typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
|
---|
558 | typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
|
---|
559 | typedef ULONG (WINAPI *LPFN_HTONL)(ULONG);
|
---|
560 | typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
|
---|
561 | typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
|
---|
562 | typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr);
|
---|
563 | typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,ULONG*);
|
---|
564 | typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
|
---|
565 | typedef ULONG (WINAPI *LPFN_NTOHL)(ULONG);
|
---|
566 | typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
|
---|
567 | typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
|
---|
568 | typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
|
---|
569 | typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int);
|
---|
570 | typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int);
|
---|
571 | typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int);
|
---|
572 | typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int);
|
---|
573 | typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int);
|
---|
574 | #endif /* WS_API_TYPEDEFS */
|
---|
575 |
|
---|
576 |
|
---|
577 |
|
---|
578 | /*
|
---|
579 | * Winsock2 Prototypes
|
---|
580 | *
|
---|
581 | * Remember to keep this section in sync with the
|
---|
582 | * "Winsock2 Function Typedefs" section below.
|
---|
583 | */
|
---|
584 | #if WS_API_PROTOTYPES
|
---|
585 | SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD);
|
---|
586 | INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
|
---|
587 | INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
|
---|
588 | #define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
|
---|
589 | BOOL WINAPI WSACloseEvent(WSAEVENT);
|
---|
590 | int WINAPI WSAConnect(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
|
---|
591 | WSAEVENT WINAPI WSACreateEvent(void);
|
---|
592 | INT WINAPI WSADuplicateSocketA(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
|
---|
593 | INT WINAPI WSADuplicateSocketW(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
|
---|
594 | #define WSADuplicateSocket WINELIB_NAME_AW(WSADuplicateSocket)
|
---|
595 | INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD,LPWSANAMESPACE_INFOA);
|
---|
596 | INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD,LPWSANAMESPACE_INFOW);
|
---|
597 | #define WSAEnumNameSpaceProviders WINELIB_NAME_AW(WSAEnumNameSpaceProviders)
|
---|
598 | int WINAPI WSAEnumNetworkEvents(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
|
---|
599 | int WINAPI WSAEnumProtocolsA(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
|
---|
600 | int WINAPI WSAEnumProtocolsW(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
|
---|
601 | #define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
|
---|
602 | int WINAPI WSAEventSelect(SOCKET,WSAEVENT,LONG);
|
---|
603 | BOOL WINAPI WSAGetOverlappedResult(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
|
---|
604 | BOOL WINAPI WSAGetQOSByName(SOCKET,LPWSABUF,LPQOS);
|
---|
605 | INT WINAPI WSAGetServiceClassInfoA(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
|
---|
606 | INT WINAPI WSAGetServiceClassInfoW(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
|
---|
607 | #define WSAGetServiceClassInfo WINELIB_NAME_AW(WSAGetServiceClassInfo)
|
---|
608 | INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID,LPSTR,LPDWORD);
|
---|
609 | INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID,LPWSTR,LPDWORD);
|
---|
610 | #define WSAGetServiceClassNameByClassId WINELIB_NAME_AW(WSAGetServiceClassNameByClassId)
|
---|
611 | int WINAPI WSAHtonl(SOCKET,ULONG,ULONG*);
|
---|
612 | int WINAPI WSAHtons(SOCKET,WS(u_short),WS(u_short)*);
|
---|
613 | int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
|
---|
614 | int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
|
---|
615 | #define WSAInstallServiceClass WINELIB_NAME_AW(WSAInstallServiceClass)
|
---|
616 | int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
617 | SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
|
---|
618 | INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA,DWORD,LPHANDLE);
|
---|
619 | INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW,DWORD,LPHANDLE);
|
---|
620 | #define WSALookupServiceBegin WINELIB_NAME_AW(WSALookupServiceBegin)
|
---|
621 | INT WINAPI WSALookupServiceEnd(HANDLE);
|
---|
622 | INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
|
---|
623 | INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
|
---|
624 | #define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext)
|
---|
625 | int WINAPI WSANtohl(SOCKET,ULONG,ULONG*);
|
---|
626 | int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*);
|
---|
627 | INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
628 | int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
629 | int WINAPI WSARecvDisconnect(SOCKET,LPWSABUF);
|
---|
630 | int WINAPI WSARecvFrom(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
631 | INT WINAPI WSARemoveServiceClass(LPGUID);
|
---|
632 | BOOL WINAPI WSAResetEvent(WSAEVENT);
|
---|
633 | int WINAPI WSASend(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
634 | int WINAPI WSASendDisconnect(SOCKET,LPWSABUF);
|
---|
635 | int WINAPI WSASendTo(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
636 | BOOL WINAPI WSASetEvent(WSAEVENT);
|
---|
637 | INT WINAPI WSASetServiceA(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
|
---|
638 | INT WINAPI WSASetServiceW(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
|
---|
639 | #define WSASetService WINELIB_NAME_AW(WSASetService)
|
---|
640 | SOCKET WINAPI WSASocketA(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
|
---|
641 | SOCKET WINAPI WSASocketW(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
|
---|
642 | #define WSASocket WINELIB_NAME_AW(WSASocket)
|
---|
643 | INT WINAPI WSAStringToAddressA(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
|
---|
644 | INT WINAPI WSAStringToAddressW(LPWSTR,INT,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPINT);
|
---|
645 | #define WSAStringToAddress WINELIB_NAME_AW(WSAStringToAddress)
|
---|
646 | DWORD WINAPI WSAWaitForMultipleEvents(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
|
---|
647 | #endif /* WS_API_PROTOTYPES */
|
---|
648 |
|
---|
649 |
|
---|
650 |
|
---|
651 | /*
|
---|
652 | * Winsock2 Function Typedefs
|
---|
653 | *
|
---|
654 | * Remember to keep this section in sync with the
|
---|
655 | * "Winsock2 Prototypes" section above.
|
---|
656 | */
|
---|
657 | #if WS_API_TYPEDEFS
|
---|
658 | typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD);
|
---|
659 | typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
|
---|
660 | typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
|
---|
661 | #define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
|
---|
662 | typedef BOOL (WINAPI *LPFN_WSACLOSEEVENT)(WSAEVENT);
|
---|
663 | typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
|
---|
664 | typedef WSAEVENT (WINAPI *LPFN_WSACREATEEVENT)(void);
|
---|
665 | typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETA)(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
|
---|
666 | typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETW)(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
|
---|
667 | #define LPFN_WSADUPLICATESOCKET WINELIB_NAME_AW(LPFN_WSADUPLICATESOCKET)
|
---|
668 | typedef INT (WINAPI *LPFNWSAENUMNAMESPACEPROVIDERSA)(LPDWORD,LPWSANAMESPACE_INFOA);
|
---|
669 | typedef INT (WINAPI *LPFNWSAENUMNAMESPACEPROVIDERSW)(LPDWORD,LPWSANAMESPACE_INFOW);
|
---|
670 | #define LPFN_WSAENUMNAMESPACEPROVIDERS WINELIB_NAME_AW(LPFNWSAENUMNAMESPACEPROVIDERS)
|
---|
671 | typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENT)(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
|
---|
672 | typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
|
---|
673 | typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
|
---|
674 | #define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
|
---|
675 | typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,LONG);
|
---|
676 | typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
|
---|
677 | typedef BOOL (WINAPI *LPFNWSAGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS);
|
---|
678 | typedef INT (WINAPI *LPFNWSAGETSERVICECLASSINFOA)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
|
---|
679 | typedef INT (WINAPI *LPFNWSAGETSERVICECLASSINFOW)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
|
---|
680 | #define LPFN_LPFNWSAGETSERVICECLASSINFO WINELIB_NAME_AW(LPFN_LPFNWSAGETSERVICECLASSINFO)
|
---|
681 | typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID,LPSTR,LPDWORD);
|
---|
682 | typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID,LPWSTR,LPDWORD);
|
---|
683 | #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID WINELIB_NAME_AW(LPFN_WSAGETSERVICECLASSNAMEBYCLASSID)
|
---|
684 | typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,ULONG,ULONG*);
|
---|
685 | typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET,WS(u_short),WS(u_short)*);
|
---|
686 | typedef int (WINAPI LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
|
---|
687 | typedef int (WINAPI LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
|
---|
688 | typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
689 | typedef int (WINAPI *LPFN_WSAJOINLEAF)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
|
---|
690 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINA)(LPWSAQUERYSETA,DWORD,LPHANDLE);
|
---|
691 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINW)(LPWSAQUERYSETW,DWORD,LPHANDLE);
|
---|
692 | #define LPFN_WSALOOKUPSERVICEBEGIN WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICEBEGIN);
|
---|
693 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND(HANDLE);
|
---|
694 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
|
---|
695 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
|
---|
696 | #define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT)
|
---|
697 | typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*);
|
---|
698 | typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*);
|
---|
699 | typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
700 | typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
701 | typedef int (WINAPI *LPFN_WSARECVDISCONNECT)(SOCKET,LPWSABUF);
|
---|
702 | typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
703 | typedef INT (WINAPI *LPFN_WSAREMOVESERVICECLASS)(LPGUID);
|
---|
704 | typedef BOOL (WINAPI *LPFN_WSARESETEVENT)(WSAEVENT);
|
---|
705 | typedef int (WINAPI *LPFN_WSASEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
706 | typedef int (WINAPI *LPFN_WSASENDDISCONNECT)(SOCKET,LPWSABUF);
|
---|
707 | typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
708 | typedef BOOL (WINAPI *LPFN_WSASETEVENT)(WSAEVENT);
|
---|
709 | typedef INT (WINAPI *LPFN_WSASETSERVICEA)(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
|
---|
710 | typedef INT (WINAPI *LPFN_WSASETSERVICEW)(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
|
---|
711 | #define LPFN_WSASETSERVICE WINELIB_NAME_AW(LPFN_WSASETSERVICE)
|
---|
712 | typedef SOCKET (WINAPI *LPFN_WSASOCKETA)(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
|
---|
713 | typedef SOCKET (WINAPI *LPFN_WSASOCKETW)(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
|
---|
714 | typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSA)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
|
---|
715 | typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSW)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
|
---|
716 | #define LPFN_WSASOCKET WINELIB_NAME_AW(LPFN_WSASOCKET)
|
---|
717 | #define LPFN_WSASTRINGTOADDRESS WINELIB_NAME_AW(LPFN_WSASTRINGTOADDRESS)
|
---|
718 | typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
|
---|
719 | #endif /* WS_API_TYPEDEFS */
|
---|
720 |
|
---|
721 |
|
---|
722 | /* Condition function return values */
|
---|
723 | #define CF_ACCEPT 0x0000
|
---|
724 | #define CF_REJECT 0x0001
|
---|
725 | #define CF_DEFER 0x0002
|
---|
726 |
|
---|
727 | #ifdef __cplusplus
|
---|
728 | }
|
---|
729 | #endif
|
---|
730 |
|
---|
731 | #undef WS
|
---|
732 | #undef WS_API_PROTOTYPES
|
---|
733 | #undef WS_API_TYPEDEFS
|
---|
734 |
|
---|
735 | #endif /* __WINSOCK2API__ */
|
---|