VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock2.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: 30.2 KB
Line 
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
62extern "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
216typedef 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
251typedef 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
275typedef 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
299DECL_WINELIB_TYPE_AW(WSAPROTOCOL_INFO)
300DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO)
301
302typedef struct _WSANETWORKEVENTS
303{
304 LONG lNetworkEvents;
305 int iErrorCode[FD_MAX_EVENTS];
306} WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
307
308typedef struct _WSANSClassInfoA
309{
310 LPSTR lpszName;
311 DWORD dwNameSpace;
312 DWORD dwValueType;
313 DWORD dwValueSize;
314 LPVOID lpValue;
315} WSANSCLASSINFOA, *PWSANSCLASSINFOA, *LPWSANSCLASSINFOA;
316
317typedef struct _WSANSClassInfoW
318{
319 LPSTR lpszName;
320 DWORD dwNameSpace;
321 DWORD dwValueType;
322 DWORD dwValueSize;
323 LPVOID lpValue;
324} WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
325
326DECL_WINELIB_TYPE_AW(WSANSCLASSINFO)
327DECL_WINELIB_TYPE_AW(PWSANSCLASSINFO)
328DECL_WINELIB_TYPE_AW(LPWSANSCLASSINFO)
329
330typedef struct _WSAServiceClassInfoA
331{
332 LPGUID lpServiceClassId;
333 LPSTR lpszServiceClassName;
334 DWORD dwCount;
335 LPWSANSCLASSINFOA lpClassInfos;
336} WSASERVICECLASSINFOA, *PWSASERVICECLASSINFOA, *LPWSASERVICECLASSINFOA;
337
338typedef struct _WSAServiceClassInfoW
339{
340 LPGUID lpServiceClassId;
341 LPWSTR lpszServiceClassName;
342 DWORD dwCount;
343 LPWSANSCLASSINFOW lpClassInfos;
344} WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
345
346
347DECL_WINELIB_TYPE_AW(WSASERVICECLASSINFO)
348DECL_WINELIB_TYPE_AW(PWSASERVICECLASSINFO)
349DECL_WINELIB_TYPE_AW(LPWSASERVICECLASSINFO)
350
351typedef 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
360typedef 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
377typedef 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
385typedef ULONG SERVICETYPE;
386
387typedef 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
398typedef struct _QUALITYOFSERVICE {
399 FLOWSPEC SendingFlowspec;
400 FLOWSPEC ReceivingFlowspec;
401 WSABUF ProviderSpecific;
402 } QOS, *LPQOS;
403
404typedef 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
416typedef 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
428typedef struct _BLOB {
429 ULONG cbSize;
430 BYTE *pBlobData;
431} BLOB, *LPBLOB;
432#endif
433
434/* addressfamily protocol pairs */
435typedef struct _AFPROTOCOLS {
436 INT iAddressFamily;
437 INT iProtocol;
438} AFPROTOCOLS, *PAFPROTOCOLS, *LPAFPROTOCOLS;
439
440/* client query definitions */
441typedef enum _WSAEcomparator {
442 COMP_EQUAL = 0,
443 COMP_NOTLESS
444} WSAECOMPARATOR, *PWSAECOMPARATOR, *LPWSAECOMPARATOR;
445
446typedef struct _WSAVersion {
447 DWORD dwVersion;
448 WSAECOMPARATOR ecHow;
449} WSAVERSION, *PWSAVERSION, *LPWSAVERSION;
450
451
452typedef 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
470typedef 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
488DECL_WINELIB_TYPE_AW(WSAQUERYSET)
489DECL_WINELIB_TYPE_AW(PWSAQUERYSET)
490DECL_WINELIB_TYPE_AW(LPWSAQUERYSET)
491
492typedef enum _WSAESETSERVICEOP {
493 RNRSERVICE_REGISTER = 0,
494 RNRSERVICE_DEREGISTER,
495 RNRSERVICE_DELETE
496} WSAESETSERVICEOP, *PWSAESETSERVICEOP, *LPWSAESETSERVICEOP;
497
498typedef 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
506typedef 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
514DECL_WINELIB_TYPE_AW(WSANAMESPACE_INFO)
515DECL_WINELIB_TYPE_AW(PWSANAMESPACE_INFO)
516DECL_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
525typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,WS(u_int),const char*,int,int,char*,int);
526typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,WS(u_int),const char*,char*,int);
527typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,WS(u_int),const char*,char*,int);
528typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,WS(u_int),int,char*,int);
529typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
530typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,WS(u_int),int,const char*,char*,int);
531typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),LONG);
532typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE);
533typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
534typedef int (WINAPI *LPFN_WSACLEANUP)(void);
535typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void);
536typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void);
537typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC);
538typedef void (WINAPI *LPFN_WSASETLASTERROR)(int);
539typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA);
540typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
541
542typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*);
543typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int);
544typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET);
545typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int);
546typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int);
547typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*);
548typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int);
549typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*);
550typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*);
551typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int);
552#ifdef WS_DEFINE_SELECT
553typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
554#endif
555typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*);
556typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
557typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
558typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
559typedef ULONG (WINAPI *LPFN_HTONL)(ULONG);
560typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
561typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
562typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr);
563typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,ULONG*);
564typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
565typedef ULONG (WINAPI *LPFN_NTOHL)(ULONG);
566typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
567typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
568typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
569typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int);
570typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int);
571typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int);
572typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int);
573typedef 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
585SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD);
586INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
587INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
588#define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
589BOOL WINAPI WSACloseEvent(WSAEVENT);
590int WINAPI WSAConnect(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
591WSAEVENT WINAPI WSACreateEvent(void);
592INT WINAPI WSADuplicateSocketA(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
593INT WINAPI WSADuplicateSocketW(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
594#define WSADuplicateSocket WINELIB_NAME_AW(WSADuplicateSocket)
595INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD,LPWSANAMESPACE_INFOA);
596INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD,LPWSANAMESPACE_INFOW);
597#define WSAEnumNameSpaceProviders WINELIB_NAME_AW(WSAEnumNameSpaceProviders)
598int WINAPI WSAEnumNetworkEvents(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
599int WINAPI WSAEnumProtocolsA(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
600int WINAPI WSAEnumProtocolsW(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
601#define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
602int WINAPI WSAEventSelect(SOCKET,WSAEVENT,LONG);
603BOOL WINAPI WSAGetOverlappedResult(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
604BOOL WINAPI WSAGetQOSByName(SOCKET,LPWSABUF,LPQOS);
605INT WINAPI WSAGetServiceClassInfoA(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
606INT WINAPI WSAGetServiceClassInfoW(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
607#define WSAGetServiceClassInfo WINELIB_NAME_AW(WSAGetServiceClassInfo)
608INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID,LPSTR,LPDWORD);
609INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID,LPWSTR,LPDWORD);
610#define WSAGetServiceClassNameByClassId WINELIB_NAME_AW(WSAGetServiceClassNameByClassId)
611int WINAPI WSAHtonl(SOCKET,ULONG,ULONG*);
612int WINAPI WSAHtons(SOCKET,WS(u_short),WS(u_short)*);
613int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
614int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
615#define WSAInstallServiceClass WINELIB_NAME_AW(WSAInstallServiceClass)
616int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
617SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
618INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA,DWORD,LPHANDLE);
619INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW,DWORD,LPHANDLE);
620#define WSALookupServiceBegin WINELIB_NAME_AW(WSALookupServiceBegin)
621INT WINAPI WSALookupServiceEnd(HANDLE);
622INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
623INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
624#define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext)
625int WINAPI WSANtohl(SOCKET,ULONG,ULONG*);
626int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*);
627INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
628int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
629int WINAPI WSARecvDisconnect(SOCKET,LPWSABUF);
630int WINAPI WSARecvFrom(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
631INT WINAPI WSARemoveServiceClass(LPGUID);
632BOOL WINAPI WSAResetEvent(WSAEVENT);
633int WINAPI WSASend(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
634int WINAPI WSASendDisconnect(SOCKET,LPWSABUF);
635int WINAPI WSASendTo(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
636BOOL WINAPI WSASetEvent(WSAEVENT);
637INT WINAPI WSASetServiceA(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
638INT WINAPI WSASetServiceW(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
639#define WSASetService WINELIB_NAME_AW(WSASetService)
640SOCKET WINAPI WSASocketA(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
641SOCKET WINAPI WSASocketW(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
642#define WSASocket WINELIB_NAME_AW(WSASocket)
643INT WINAPI WSAStringToAddressA(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
644INT WINAPI WSAStringToAddressW(LPWSTR,INT,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPINT);
645#define WSAStringToAddress WINELIB_NAME_AW(WSAStringToAddress)
646DWORD 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
658typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD);
659typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
660typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
661#define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
662typedef BOOL (WINAPI *LPFN_WSACLOSEEVENT)(WSAEVENT);
663typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
664typedef WSAEVENT (WINAPI *LPFN_WSACREATEEVENT)(void);
665typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETA)(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
666typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETW)(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
667#define LPFN_WSADUPLICATESOCKET WINELIB_NAME_AW(LPFN_WSADUPLICATESOCKET)
668typedef INT (WINAPI *LPFNWSAENUMNAMESPACEPROVIDERSA)(LPDWORD,LPWSANAMESPACE_INFOA);
669typedef INT (WINAPI *LPFNWSAENUMNAMESPACEPROVIDERSW)(LPDWORD,LPWSANAMESPACE_INFOW);
670#define LPFN_WSAENUMNAMESPACEPROVIDERS WINELIB_NAME_AW(LPFNWSAENUMNAMESPACEPROVIDERS)
671typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENT)(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
672typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
673typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
674#define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
675typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,LONG);
676typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
677typedef BOOL (WINAPI *LPFNWSAGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS);
678typedef INT (WINAPI *LPFNWSAGETSERVICECLASSINFOA)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
679typedef INT (WINAPI *LPFNWSAGETSERVICECLASSINFOW)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
680#define LPFN_LPFNWSAGETSERVICECLASSINFO WINELIB_NAME_AW(LPFN_LPFNWSAGETSERVICECLASSINFO)
681typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID,LPSTR,LPDWORD);
682typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID,LPWSTR,LPDWORD);
683#define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID WINELIB_NAME_AW(LPFN_WSAGETSERVICECLASSNAMEBYCLASSID)
684typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,ULONG,ULONG*);
685typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET,WS(u_short),WS(u_short)*);
686typedef int (WINAPI LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
687typedef int (WINAPI LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
688typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
689typedef int (WINAPI *LPFN_WSAJOINLEAF)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
690typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINA)(LPWSAQUERYSETA,DWORD,LPHANDLE);
691typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINW)(LPWSAQUERYSETW,DWORD,LPHANDLE);
692#define LPFN_WSALOOKUPSERVICEBEGIN WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICEBEGIN);
693typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND(HANDLE);
694typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
695typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
696#define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT)
697typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*);
698typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*);
699typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
700typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
701typedef int (WINAPI *LPFN_WSARECVDISCONNECT)(SOCKET,LPWSABUF);
702typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
703typedef INT (WINAPI *LPFN_WSAREMOVESERVICECLASS)(LPGUID);
704typedef BOOL (WINAPI *LPFN_WSARESETEVENT)(WSAEVENT);
705typedef int (WINAPI *LPFN_WSASEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
706typedef int (WINAPI *LPFN_WSASENDDISCONNECT)(SOCKET,LPWSABUF);
707typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
708typedef BOOL (WINAPI *LPFN_WSASETEVENT)(WSAEVENT);
709typedef INT (WINAPI *LPFN_WSASETSERVICEA)(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
710typedef INT (WINAPI *LPFN_WSASETSERVICEW)(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
711#define LPFN_WSASETSERVICE WINELIB_NAME_AW(LPFN_WSASETSERVICE)
712typedef SOCKET (WINAPI *LPFN_WSASOCKETA)(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
713typedef SOCKET (WINAPI *LPFN_WSASOCKETW)(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
714typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSA)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
715typedef 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)
718typedef 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__ */
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