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 | * Oracle 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, Oracle 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 | /* constants used in dwProviderFlags from struct WSAPROTOCOL_INFO */
|
---|
226 | #define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
|
---|
227 | #define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
|
---|
228 | #define PFL_HIDDEN 0x00000004
|
---|
229 | #define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
|
---|
230 |
|
---|
231 | #define XP1_CONNECTIONLESS 0x00000001
|
---|
232 | #define XP1_GUARANTEED_DELIVERY 0x00000002
|
---|
233 | #define XP1_GUARANTEED_ORDER 0x00000004
|
---|
234 | #define XP1_MESSAGE_ORIENTED 0x00000008
|
---|
235 | #define XP1_PSEUDO_STREAM 0x00000010
|
---|
236 | #define XP1_GRACEFUL_CLOSE 0x00000020
|
---|
237 | #define XP1_EXPEDITED_DATA 0x00000040
|
---|
238 | #define XP1_CONNECT_DATA 0x00000080
|
---|
239 | #define XP1_DISCONNECT_DATA 0x00000100
|
---|
240 | #define XP1_SUPPORT_BROADCAST 0x00000200
|
---|
241 | #define XP1_SUPPORT_MULTIPOINT 0x00000400
|
---|
242 | #define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
|
---|
243 | #define XP1_MULTIPOINT_DATA_PLANE 0x00001000
|
---|
244 | #define XP1_QOS_SUPPORTED 0x00002000
|
---|
245 | #define XP1_INTERRUPT 0x00004000
|
---|
246 | #define XP1_UNI_SEND 0x00008000
|
---|
247 | #define XP1_UNI_RECV 0x00010000
|
---|
248 | #define XP1_IFS_HANDLES 0x00020000
|
---|
249 | #define XP1_PARTIAL_MESSAGE 0x00040000
|
---|
250 |
|
---|
251 | #define BIGENDIAN 0x0000
|
---|
252 | #define LITTLEENDIAN 0x0001
|
---|
253 |
|
---|
254 | #define SECURITY_PROTOCOL_NONE 0x0000
|
---|
255 |
|
---|
256 | #define WSAPROTOCOL_LEN 255
|
---|
257 | typedef struct _WSAPROTOCOL_INFOA
|
---|
258 | {
|
---|
259 | DWORD dwServiceFlags1;
|
---|
260 | DWORD dwServiceFlags2;
|
---|
261 | DWORD dwServiceFlags3;
|
---|
262 | DWORD dwServiceFlags4;
|
---|
263 | DWORD dwProviderFlags;
|
---|
264 | GUID ProviderId;
|
---|
265 | DWORD dwCatalogEntryId;
|
---|
266 | WSAPROTOCOLCHAIN ProtocolChain;
|
---|
267 | int iVersion;
|
---|
268 | int iAddressFamily;
|
---|
269 | int iMaxSockAddr;
|
---|
270 | int iMinSockAddr;
|
---|
271 | int iSocketType;
|
---|
272 | int iProtocol;
|
---|
273 | int iProtocolMaxOffset;
|
---|
274 | int iNetworkByteOrder;
|
---|
275 | int iSecurityScheme;
|
---|
276 | DWORD dwMessageSize;
|
---|
277 | DWORD dwProviderReserved;
|
---|
278 | CHAR szProtocol[WSAPROTOCOL_LEN+1];
|
---|
279 | } WSAPROTOCOL_INFOA, * LPWSAPROTOCOL_INFOA;
|
---|
280 |
|
---|
281 | typedef struct _WSAPROTOCOL_INFOW
|
---|
282 | {
|
---|
283 | DWORD dwServiceFlags1;
|
---|
284 | DWORD dwServiceFlags2;
|
---|
285 | DWORD dwServiceFlags3;
|
---|
286 | DWORD dwServiceFlags4;
|
---|
287 | DWORD dwProviderFlags;
|
---|
288 | GUID ProviderId;
|
---|
289 | DWORD dwCatalogEntryId;
|
---|
290 | WSAPROTOCOLCHAIN ProtocolChain;
|
---|
291 | int iVersion;
|
---|
292 | int iAddressFamily;
|
---|
293 | int iMaxSockAddr;
|
---|
294 | int iMinSockAddr;
|
---|
295 | int iSocketType;
|
---|
296 | int iProtocol;
|
---|
297 | int iProtocolMaxOffset;
|
---|
298 | int iNetworkByteOrder;
|
---|
299 | int iSecurityScheme;
|
---|
300 | DWORD dwMessageSize;
|
---|
301 | DWORD dwProviderReserved;
|
---|
302 | WCHAR szProtocol[WSAPROTOCOL_LEN+1];
|
---|
303 | } WSAPROTOCOL_INFOW, *LPWSAPROTOCOL_INFOW;
|
---|
304 |
|
---|
305 | DECL_WINELIB_TYPE_AW(WSAPROTOCOL_INFO)
|
---|
306 | DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO)
|
---|
307 |
|
---|
308 | typedef struct _WSANETWORKEVENTS
|
---|
309 | {
|
---|
310 | LONG lNetworkEvents;
|
---|
311 | int iErrorCode[FD_MAX_EVENTS];
|
---|
312 | } WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
|
---|
313 |
|
---|
314 | typedef struct _WSANSClassInfoA
|
---|
315 | {
|
---|
316 | LPSTR lpszName;
|
---|
317 | DWORD dwNameSpace;
|
---|
318 | DWORD dwValueType;
|
---|
319 | DWORD dwValueSize;
|
---|
320 | LPVOID lpValue;
|
---|
321 | } WSANSCLASSINFOA, *PWSANSCLASSINFOA, *LPWSANSCLASSINFOA;
|
---|
322 |
|
---|
323 | typedef struct _WSANSClassInfoW
|
---|
324 | {
|
---|
325 | LPSTR lpszName;
|
---|
326 | DWORD dwNameSpace;
|
---|
327 | DWORD dwValueType;
|
---|
328 | DWORD dwValueSize;
|
---|
329 | LPVOID lpValue;
|
---|
330 | } WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
|
---|
331 |
|
---|
332 | DECL_WINELIB_TYPE_AW(WSANSCLASSINFO)
|
---|
333 | DECL_WINELIB_TYPE_AW(PWSANSCLASSINFO)
|
---|
334 | DECL_WINELIB_TYPE_AW(LPWSANSCLASSINFO)
|
---|
335 |
|
---|
336 | typedef struct _WSAServiceClassInfoA
|
---|
337 | {
|
---|
338 | LPGUID lpServiceClassId;
|
---|
339 | LPSTR lpszServiceClassName;
|
---|
340 | DWORD dwCount;
|
---|
341 | LPWSANSCLASSINFOA lpClassInfos;
|
---|
342 | } WSASERVICECLASSINFOA, *PWSASERVICECLASSINFOA, *LPWSASERVICECLASSINFOA;
|
---|
343 |
|
---|
344 | typedef struct _WSAServiceClassInfoW
|
---|
345 | {
|
---|
346 | LPGUID lpServiceClassId;
|
---|
347 | LPWSTR lpszServiceClassName;
|
---|
348 | DWORD dwCount;
|
---|
349 | LPWSANSCLASSINFOW lpClassInfos;
|
---|
350 | } WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
|
---|
351 |
|
---|
352 |
|
---|
353 | DECL_WINELIB_TYPE_AW(WSASERVICECLASSINFO)
|
---|
354 | DECL_WINELIB_TYPE_AW(PWSASERVICECLASSINFO)
|
---|
355 | DECL_WINELIB_TYPE_AW(LPWSASERVICECLASSINFO)
|
---|
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)-1)
|
---|
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_PTR 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 | typedef enum _WSACOMPLETIONTYPE {
|
---|
519 | NSP_NOTIFY_IMMEDIATELY = 0,
|
---|
520 | NSP_NOTIFY_HWND = 1,
|
---|
521 | NSP_NOTIFY_EVENT = 2,
|
---|
522 | NSP_NOTIFY_PORT = 3,
|
---|
523 | NSP_NOTIFY_APC = 4
|
---|
524 | } WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, * LPWSACOMPLETIONTYPE;
|
---|
525 |
|
---|
526 | typedef struct _WSACOMPLETION {
|
---|
527 | WSACOMPLETIONTYPE Type;
|
---|
528 | union {
|
---|
529 | struct {
|
---|
530 | HWND hWnd;
|
---|
531 | UINT uMsg;
|
---|
532 | WPARAM context;
|
---|
533 | } WindowMessage;
|
---|
534 | struct {
|
---|
535 | LPWSAOVERLAPPED lpOverlapped;
|
---|
536 | } Event;
|
---|
537 | struct {
|
---|
538 | LPWSAOVERLAPPED lpOverlapped;
|
---|
539 | LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
|
---|
540 | } Apc;
|
---|
541 | struct {
|
---|
542 | LPWSAOVERLAPPED lpOverlapped;
|
---|
543 | HANDLE hPort;
|
---|
544 | ULONG_PTR Key;
|
---|
545 | } Port;
|
---|
546 | } Parameters;
|
---|
547 | } WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION;
|
---|
548 |
|
---|
549 | /*
|
---|
550 | * Winsock Function Typedefs
|
---|
551 | *
|
---|
552 | * Remember to keep this section in sync with the
|
---|
553 | * "Prototypes" section in winsock.h.
|
---|
554 | */
|
---|
555 | #if WS_API_TYPEDEFS
|
---|
556 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,WS(u_int),const char*,int,int,char*,int);
|
---|
557 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,WS(u_int),const char*,char*,int);
|
---|
558 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,WS(u_int),const char*,char*,int);
|
---|
559 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,WS(u_int),int,char*,int);
|
---|
560 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
|
---|
561 | typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,WS(u_int),int,const char*,char*,int);
|
---|
562 | typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),LONG);
|
---|
563 | typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE);
|
---|
564 | typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
|
---|
565 | typedef int (WINAPI *LPFN_WSACLEANUP)(void);
|
---|
566 | typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void);
|
---|
567 | typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void);
|
---|
568 | typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC);
|
---|
569 | typedef void (WINAPI *LPFN_WSASETLASTERROR)(int);
|
---|
570 | typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA);
|
---|
571 | typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
|
---|
572 |
|
---|
573 | typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*);
|
---|
574 | typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int);
|
---|
575 | typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET);
|
---|
576 | typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int);
|
---|
577 | typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int);
|
---|
578 | typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*);
|
---|
579 | typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int);
|
---|
580 | typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*);
|
---|
581 | typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*);
|
---|
582 | typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int);
|
---|
583 | #ifdef WS_DEFINE_SELECT
|
---|
584 | typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
|
---|
585 | #endif
|
---|
586 | typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*);
|
---|
587 | typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
|
---|
588 | typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
|
---|
589 | typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
|
---|
590 | typedef ULONG (WINAPI *LPFN_HTONL)(ULONG);
|
---|
591 | typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
|
---|
592 | typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
|
---|
593 | typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr));
|
---|
594 | typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,ULONG*);
|
---|
595 | typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
|
---|
596 | typedef ULONG (WINAPI *LPFN_NTOHL)(ULONG);
|
---|
597 | typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
|
---|
598 | typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
|
---|
599 | typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
|
---|
600 | typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int);
|
---|
601 | typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int);
|
---|
602 | typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int);
|
---|
603 | typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int);
|
---|
604 | typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int);
|
---|
605 | #endif /* WS_API_TYPEDEFS */
|
---|
606 |
|
---|
607 |
|
---|
608 |
|
---|
609 | /*
|
---|
610 | * Winsock2 Prototypes
|
---|
611 | *
|
---|
612 | * Remember to keep this section in sync with the
|
---|
613 | * "Winsock2 Function Typedefs" section below.
|
---|
614 | */
|
---|
615 | #if WS_API_PROTOTYPES
|
---|
616 | SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
|
---|
617 | INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
|
---|
618 | INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
|
---|
619 | #define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
|
---|
620 | BOOL WINAPI WSACloseEvent(WSAEVENT);
|
---|
621 | int WINAPI WSAConnect(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
|
---|
622 | WSAEVENT WINAPI WSACreateEvent(void);
|
---|
623 | INT WINAPI WSADuplicateSocketA(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
|
---|
624 | INT WINAPI WSADuplicateSocketW(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
|
---|
625 | #define WSADuplicateSocket WINELIB_NAME_AW(WSADuplicateSocket)
|
---|
626 | INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD,LPWSANAMESPACE_INFOA);
|
---|
627 | INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD,LPWSANAMESPACE_INFOW);
|
---|
628 | #define WSAEnumNameSpaceProviders WINELIB_NAME_AW(WSAEnumNameSpaceProviders)
|
---|
629 | int WINAPI WSAEnumNetworkEvents(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
|
---|
630 | int WINAPI WSAEnumProtocolsA(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
|
---|
631 | int WINAPI WSAEnumProtocolsW(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
|
---|
632 | #define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
|
---|
633 | int WINAPI WSAEventSelect(SOCKET,WSAEVENT,LONG);
|
---|
634 | BOOL WINAPI WSAGetOverlappedResult(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
|
---|
635 | BOOL WINAPI WSAGetQOSByName(SOCKET,LPWSABUF,LPQOS);
|
---|
636 | INT WINAPI WSAGetServiceClassInfoA(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
|
---|
637 | INT WINAPI WSAGetServiceClassInfoW(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
|
---|
638 | #define WSAGetServiceClassInfo WINELIB_NAME_AW(WSAGetServiceClassInfo)
|
---|
639 | INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID,LPSTR,LPDWORD);
|
---|
640 | INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID,LPWSTR,LPDWORD);
|
---|
641 | #define WSAGetServiceClassNameByClassId WINELIB_NAME_AW(WSAGetServiceClassNameByClassId)
|
---|
642 | int WINAPI WSAHtonl(SOCKET,ULONG,ULONG*);
|
---|
643 | int WINAPI WSAHtons(SOCKET,WS(u_short),WS(u_short)*);
|
---|
644 | int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
|
---|
645 | int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
|
---|
646 | #define WSAInstallServiceClass WINELIB_NAME_AW(WSAInstallServiceClass)
|
---|
647 | int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
648 | SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
|
---|
649 | INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA,DWORD,LPHANDLE);
|
---|
650 | INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW,DWORD,LPHANDLE);
|
---|
651 | #define WSALookupServiceBegin WINELIB_NAME_AW(WSALookupServiceBegin)
|
---|
652 | INT WINAPI WSALookupServiceEnd(HANDLE);
|
---|
653 | INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
|
---|
654 | INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
|
---|
655 | #define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext)
|
---|
656 | int WINAPI WSANSPIoctl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
|
---|
657 | int WINAPI WSANtohl(SOCKET,ULONG,ULONG*);
|
---|
658 | int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*);
|
---|
659 | INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
660 | int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
661 | int WINAPI WSARecvDisconnect(SOCKET,LPWSABUF);
|
---|
662 | int WINAPI WSARecvFrom(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
663 | INT WINAPI WSARemoveServiceClass(LPGUID);
|
---|
664 | BOOL WINAPI WSAResetEvent(WSAEVENT);
|
---|
665 | int WINAPI WSASend(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
666 | int WINAPI WSASendDisconnect(SOCKET,LPWSABUF);
|
---|
667 | int WINAPI WSASendTo(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
668 | BOOL WINAPI WSASetEvent(WSAEVENT);
|
---|
669 | INT WINAPI WSASetServiceA(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
|
---|
670 | INT WINAPI WSASetServiceW(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
|
---|
671 | #define WSASetService WINELIB_NAME_AW(WSASetService)
|
---|
672 | SOCKET WINAPI WSASocketA(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
|
---|
673 | SOCKET WINAPI WSASocketW(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
|
---|
674 | #define WSASocket WINELIB_NAME_AW(WSASocket)
|
---|
675 | INT WINAPI WSAStringToAddressA(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
|
---|
676 | INT WINAPI WSAStringToAddressW(LPWSTR,INT,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPINT);
|
---|
677 | #define WSAStringToAddress WINELIB_NAME_AW(WSAStringToAddress)
|
---|
678 | DWORD WINAPI WSAWaitForMultipleEvents(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
|
---|
679 | #endif /* WS_API_PROTOTYPES */
|
---|
680 |
|
---|
681 |
|
---|
682 |
|
---|
683 | /*
|
---|
684 | * Winsock2 Function Typedefs
|
---|
685 | *
|
---|
686 | * Remember to keep this section in sync with the
|
---|
687 | * "Winsock2 Prototypes" section above.
|
---|
688 | */
|
---|
689 | #if WS_API_TYPEDEFS
|
---|
690 | typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
|
---|
691 | typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
|
---|
692 | typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
|
---|
693 | #define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
|
---|
694 | typedef BOOL (WINAPI *LPFN_WSACLOSEEVENT)(WSAEVENT);
|
---|
695 | typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
|
---|
696 | typedef WSAEVENT (WINAPI *LPFN_WSACREATEEVENT)(void);
|
---|
697 | typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETA)(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
|
---|
698 | typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETW)(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
|
---|
699 | #define LPFN_WSADUPLICATESOCKET WINELIB_NAME_AW(LPFN_WSADUPLICATESOCKET)
|
---|
700 | typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)(LPDWORD,LPWSANAMESPACE_INFOA);
|
---|
701 | typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSW)(LPDWORD,LPWSANAMESPACE_INFOW);
|
---|
702 | #define LPFN_WSAENUMNAMESPACEPROVIDERS WINELIB_NAME_AW(LPFN_WSAENUMNAMESPACEPROVIDERS)
|
---|
703 | typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENTS)(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
|
---|
704 | typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
|
---|
705 | typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
|
---|
706 | #define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
|
---|
707 | typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,LONG);
|
---|
708 | typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
|
---|
709 | typedef BOOL (WINAPI *LPFN_WSAGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS);
|
---|
710 | typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOA)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
|
---|
711 | typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOW)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
|
---|
712 | #define LPFN_LPFNWSAGETSERVICECLASSINFO WINELIB_NAME_AW(LPFN_LPFNWSAGETSERVICECLASSINFO)
|
---|
713 | typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID,LPSTR,LPDWORD);
|
---|
714 | typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID,LPWSTR,LPDWORD);
|
---|
715 | #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID WINELIB_NAME_AW(LPFN_WSAGETSERVICECLASSNAMEBYCLASSID)
|
---|
716 | typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,ULONG,ULONG*);
|
---|
717 | typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET,WS(u_short),WS(u_short)*);
|
---|
718 | typedef int (WINAPI *LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
|
---|
719 | typedef int (WINAPI *LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
|
---|
720 | typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
721 | typedef int (WINAPI *LPFN_WSAJOINLEAF)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
|
---|
722 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINA)(LPWSAQUERYSETA,DWORD,LPHANDLE);
|
---|
723 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINW)(LPWSAQUERYSETW,DWORD,LPHANDLE);
|
---|
724 | #define LPFN_WSALOOKUPSERVICEBEGIN WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICEBEGIN);
|
---|
725 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND)(HANDLE);
|
---|
726 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
|
---|
727 | typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
|
---|
728 | #define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT)
|
---|
729 | typedef int (WINAPI *LPFN_WSANSPIOCTL)(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
|
---|
730 | typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*);
|
---|
731 | typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*);
|
---|
732 | typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
733 | typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
734 | typedef int (WINAPI *LPFN_WSARECVDISCONNECT)(SOCKET,LPWSABUF);
|
---|
735 | typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
736 | typedef INT (WINAPI *LPFN_WSAREMOVESERVICECLASS)(LPGUID);
|
---|
737 | typedef BOOL (WINAPI *LPFN_WSARESETEVENT)(WSAEVENT);
|
---|
738 | typedef int (WINAPI *LPFN_WSASEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
739 | typedef int (WINAPI *LPFN_WSASENDDISCONNECT)(SOCKET,LPWSABUF);
|
---|
740 | typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
|
---|
741 | typedef BOOL (WINAPI *LPFN_WSASETEVENT)(WSAEVENT);
|
---|
742 | typedef INT (WINAPI *LPFN_WSASETSERVICEA)(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
|
---|
743 | typedef INT (WINAPI *LPFN_WSASETSERVICEW)(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
|
---|
744 | #define LPFN_WSASETSERVICE WINELIB_NAME_AW(LPFN_WSASETSERVICE)
|
---|
745 | typedef SOCKET (WINAPI *LPFN_WSASOCKETA)(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
|
---|
746 | typedef SOCKET (WINAPI *LPFN_WSASOCKETW)(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
|
---|
747 | typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSA)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
|
---|
748 | typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSW)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
|
---|
749 | #define LPFN_WSASOCKET WINELIB_NAME_AW(LPFN_WSASOCKET)
|
---|
750 | #define LPFN_WSASTRINGTOADDRESS WINELIB_NAME_AW(LPFN_WSASTRINGTOADDRESS)
|
---|
751 | typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
|
---|
752 | #endif /* WS_API_TYPEDEFS */
|
---|
753 |
|
---|
754 |
|
---|
755 | /* Condition function return values */
|
---|
756 | #define CF_ACCEPT 0x0000
|
---|
757 | #define CF_REJECT 0x0001
|
---|
758 | #define CF_DEFER 0x0002
|
---|
759 |
|
---|
760 | #ifdef __cplusplus
|
---|
761 | }
|
---|
762 | #endif
|
---|
763 |
|
---|
764 | #undef WS
|
---|
765 | #undef WS_API_PROTOTYPES
|
---|
766 | #undef WS_API_TYPEDEFS
|
---|
767 |
|
---|
768 | #endif /* __WINSOCK2API__ */
|
---|