2 * Winsock 2 definitions - used for ws2_32.dll
4 * FIXME: Still missing required Winsock 2 definitions.
14 /* Everything common between winsock.h and winsock2.h */
15 #ifndef INCL_WINSOCK_API_PROTOTYPES
16 #define INCL_WINSOCK_API_PROTOTYPES 1
17 #define WS_API_PROTOTYPES 1
19 #define WS_API_PROTOTYPES INCL_WINSOCK_API_PROTOTYPES
22 #ifndef INCL_WINSOCK_API_TYPEDEFS
23 #define INCL_WINSOCK_API_TYPEDEFS 0
24 #define WS_API_TYPEDEFS 0
26 #define WS_API_TYPEDEFS INCL_WINSOCK_API_TYPEDEFS
29 #define __WINE_WINSOCK2__
31 #undef __WINE_WINSOCK2__
36 #endif /* defined(__cplusplus) */
38 /* proper 4-byte packing */
43 #define SO_GROUP_ID 0x2001
44 #define SO_GROUP_PRIORITY 0x2002
45 #define SO_MAX_MSG_SIZE 0x2003
46 #define SO_PROTOCOL_INFOA 0x2004
47 #define SO_PROTOCOL_INFOW 0x2005
48 #define SO_PROTOCOL_INFO WINELIB_NAME_AW(WS_SO_PROTOCOL_INFO)
49 #define PVD_CONFIG 0x3001
50 #define SO_CONDITIONAL_ACCEPT 0x3002
52 #define WS_SO_GROUP_ID 0x2001
53 #define WS_SO_GROUP_PRIORITY 0x2002
54 #define WS_SO_MAX_MSG_SIZE 0x2003
55 #define WS_SO_PROTOCOL_INFOA 0x2004
56 #define WS_SO_PROTOCOL_INFOW 0x2005
57 #define WS_SO_PROTOCOL_INFO WINELIB_NAME_AW(WS_SO_PROTOCOL_INFO)
58 #define WS_PVD_CONFIG 0x3001
59 #define WS_SO_CONDITIONAL_ACCEPT 0x3002
63 /* option flags per socket */
65 #define FD_MAX_EVENTS 10
67 #define FD_WRITE_BIT 1
69 #define FD_ACCEPT_BIT 3
70 #define FD_CONNECT_BIT 4
71 #define FD_CLOSE_BIT 5
73 /* Constants for LPCONDITIONPROC */
74 #define CF_ACCEPT 0x0000
75 #define CF_REJECT 0x0001
76 #define CF_DEFER 0x0002
78 /* Constants for shutdown() */
79 #define SD_RECEIVE 0x00
83 /* Constants for WSAIoctl() */
84 #define IOC_UNIX 0x00000000
85 #define IOC_WS2 0x08000000
86 #define IOC_PROTOCOL 0x10000000
87 #define IOC_VENDOR 0x18000000
88 #define _WSAIO(x,y) (IOC_VOID|(x)|(y))
89 #define _WSAIOR(x,y) (IOC_OUT|(x)|(y))
90 #define _WSAIOW(x,y) (IOC_IN|(x)|(y))
91 #define _WSAIORW(x,y) (IOC_INOUT|(x)|(y))
92 #define SIO_ASSOCIATE_HANDLE _WSAIOW(IOC_WS2,1)
93 #define SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(IOC_WS2,2)
94 #define SIO_FIND_ROUTE _WSAIOR(IOC_WS2,3)
95 #define SIO_FLUSH _WSAIO(IOC_WS2,4)
96 #define SIO_GET_BROADCAST_ADDRESS _WSAIOR(IOC_WS2,5)
97 #define SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,6)
98 #define SIO_GET_QOS _WSAIORW(IOC_WS2,7)
99 #define SIO_GET_GROUP_QOS _WSAIORW(IOC_WS2,8)
100 #define SIO_MULTIPOINT_LOOPBACK _WSAIOW(IOC_WS2,9)
101 #define SIO_MULTICAST_SCOPE _WSAIOW(IOC_WS2,10)
102 #define SIO_SET_QOS _WSAIOW(IOC_WS2,11)
103 #define SIO_SET_GROUP_QOS _WSAIOW(IOC_WS2,12)
104 #define SIO_TRANSLATE_HANDLE _WSAIORW(IOC_WS2,13)
105 #define SIO_ROUTING_INTERFACE_QUERY _WSAIORW(IOC_WS2,20)
106 #define SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(IOC_WS2,21)
107 #define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
108 #define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
109 #define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
110 #ifndef USE_WS_PREFIX
111 #define SIO_GET_INTERFACE_LIST _IOR ('t', 127, u_long)
113 #define SIO_GET_INTERFACE_LIST WS__IOR ('t', 127, u_long)
116 /* Constants for WSAIoctl() */
117 #define WSA_FLAG_OVERLAPPED 0x01
118 #define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
119 #define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
120 #define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
121 #define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
128 #define MAX_PROTOCOL_CHAIN 7
129 #define BASE_PROTOCOL 1
130 #define LAYERED_PROTOCOL 0
132 typedef struct _WSAPROTOCOLCHAIN
134 int ChainLen
; /* the length of the chain, */
135 /* length = 0 means layered protocol, */
136 /* length = 1 means base protocol, */
137 /* length > 1 means protocol chain */
138 DWORD ChainEntries
[MAX_PROTOCOL_CHAIN
]; /* a list of dwCatalogEntryIds */
139 } WSAPROTOCOLCHAIN
, * LPWSAPROTOCOLCHAIN
;
141 #define WSAPROTOCOL_LEN 255
142 typedef struct _WSAPROTOCOL_INFOA
144 DWORD dwServiceFlags1
;
145 DWORD dwServiceFlags2
;
146 DWORD dwServiceFlags3
;
147 DWORD dwServiceFlags4
;
148 DWORD dwProviderFlags
;
150 DWORD dwCatalogEntryId
;
151 WSAPROTOCOLCHAIN ProtocolChain
;
158 int iProtocolMaxOffset
;
159 int iNetworkByteOrder
;
162 DWORD dwProviderReserved
;
163 CHAR szProtocol
[WSAPROTOCOL_LEN
+1];
164 } WSAPROTOCOL_INFOA
, * LPWSAPROTOCOL_INFOA
;
166 typedef struct _WSAPROTOCOL_INFOW
168 DWORD dwServiceFlags1
;
169 DWORD dwServiceFlags2
;
170 DWORD dwServiceFlags3
;
171 DWORD dwServiceFlags4
;
172 DWORD dwProviderFlags
;
174 DWORD dwCatalogEntryId
;
175 WSAPROTOCOLCHAIN ProtocolChain
;
182 int iProtocolMaxOffset
;
183 int iNetworkByteOrder
;
186 DWORD dwProviderReserved
;
187 WCHAR szProtocol
[WSAPROTOCOL_LEN
+1];
188 } WSAPROTOCOL_INFOW
, *LPWSAPROTOCOL_INFOW
;
190 DECL_WINELIB_TYPE_AW(WSAPROTOCOL_INFO
)
191 DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO
)
193 typedef struct _WSANETWORKEVENTS
196 int iErrorCode
[FD_MAX_EVENTS
];
197 } WSANETWORKEVENTS
, *LPWSANETWORKEVENTS
;
199 typedef struct _WSABUF
205 #define WSAEVENT HANDLE
206 #define LPWSAEVENT LPHANDLE
207 #define WSAOVERLAPPED OVERLAPPED
208 typedef struct _OVERLAPPED
* LPWSAOVERLAPPED
;
210 #define WSA_IO_PENDING (ERROR_IO_PENDING)
211 #define WSA_IO_INCOMPLETE (ERROR_IO_INCOMPLETE)
212 #define WSA_INVALID_HANDLE (ERROR_INVALID_HANDLE)
213 #define WSA_INVALID_PARAMETER (ERROR_INVALID_PARAMETER)
214 #define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
215 #define WSA_OPERATION_ABORTED (ERROR_OPERATION_ABORTED)
217 #define WSA_INVALID_EVENT ((WSAEVENT)NULL)
218 #define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
219 #define WSA_WAIT_FAILED ((DWORD)-1L)
220 #define WSA_WAIT_EVENT_0 (WAIT_OBJECT_0)
221 #define WSA_WAIT_IO_COMPLETION (WAIT_IO_COMPLETION)
222 #define WSA_WAIT_TIMEOUT (WAIT_TIMEOUT)
223 #define WSA_INFINITE (INFINITE)
225 typedef unsigned int GROUP
;
226 #define SG_UNCONSTRAINED_GROUP 0x01
227 #define SG_CONSTRAINED_GROUP 0x02
230 * FLOWSPEC and SERVICETYPE should eventually move to qos.h
233 typedef ULONG SERVICETYPE
;
235 typedef struct _FLOWSPEC
{
236 unsigned int TokenRate
;
237 unsigned int TokenBucketSize
;
238 unsigned int PeakBandwidth
;
239 unsigned int Latency
;
240 unsigned int DelayVariation
;
241 SERVICETYPE ServiceType
;
242 unsigned int MaxSduSize
;
243 unsigned int MinimumPolicedSize
;
244 } FLOWSPEC
, *PFLOWSPEC
, *LPFLOWSPEC
;
246 typedef struct _QUALITYOFSERVICE
{
247 FLOWSPEC SendingFlowspec
;
248 FLOWSPEC ReceivingFlowspec
;
249 WSABUF ProviderSpecific
;
252 typedef int CALLBACK (*LPCONDITIONPROC
)
255 LPWSABUF lpCallerData
,
259 LPWSABUF lpCalleeData
,
264 typedef void CALLBACK (*LPWSAOVERLAPPED_COMPLETION_ROUTINE
)
268 LPWSAOVERLAPPED lpOverlapped
,
275 * Winsock Function Typedefs
277 * Remember to keep this section in sync with the
278 * "Prototypes" section in winsock.h.
281 typedef HANDLE (WINAPI
*LPFN_WSAASYNCGETHOSTBYADDR
)(HWND
,u_int
,const char*,int,int,char*,int));
282 typedef HANDLE (WINAPI
*LPFN_WSAASYNCGETHOSTBYNAME
)(HWND
,u_int
,const char*,char*,int));
283 typedef HANDLE (WINAPI
*LPFN_WSAASYNCGETPROTOBYNAME
)(HWND
,u_int
,const char*,char*,int));
284 typedef HANDLE (WINAPI
*LPFN_WSAASYNCGETPROTOBYNUMBER
)(HWND
,u_int
,int,char*,int));
285 typedef HANDLE (WINAPI
*LPFN_WSAASYNCGETSERVBYNAME
)(HWND
,u_int
,const char*,const char*,char*,int));
286 typedef HANDLE (WINAPI
*LPFN_WSAASYNCGETSERVBYPORT
)(HWND
,u_int
,int,const char*,char*,int));
287 typedef int (WINAPI
*LPFN_WSAASYNCSELECT
)(SOCKET
,HWND
,u_int
,long));
288 typedef int (WINAPI
*LPFN_WSACANCELASYNCREQUEST
)(HANDLE
));
289 typedef int (WINAPI
*LPFN_WSACANCELBLOCKINGCALL
)(void));
290 typedef int (WINAPI
*LPFN_WSACLEANUP
)(void));
291 typedef int (WINAPI
*LPFN_WSAGETLASTERROR
)(void));
292 typedef BOOL (WINAPI
*LPFN_WSAISBLOCKING
)(void));
293 typedef FARPROC (WINAPI
*LPFN_WSASETBLOCKINGHOOK
)(FARPROC
));
294 typedef void (WINAPI
*LPFN_WSASETLASTERROR
)(int));
295 typedef int (WINAPI
*LPFN_WSASTARTUP
)(WORD
,LPWSADATA
));
296 typedef int (WINAPI
*LPFN_WSAUNHOOKBLOCKINGHOOK
)(void));
298 typedef SOCKET (WINAPI
*LPFN_ACCEPT
)(SOCKET
,struct WS(sockaddr
)*,int*));
299 typedef int (WINAPI
*LPFN_BIND
)(SOCKET
,const struct WS(sockaddr
)*,int));
300 typedef int (WINAPI
*LPFN_CLOSESOCKET
)(SOCKET
));
301 typedef int (WINAPI
*LPFN_CONNECT
)(SOCKET
,const struct WS(sockaddr
)*,int));
302 typedef struct WS(hostent
)* (WINAPI
*LPFN_GETHOSTBYADDR
)(const char*,int,int));
303 typedef struct WS(hostent
)* (WINAPI
*LPFN_GETHOSTBYNAME
)(const char*));
304 typedef int (WINAPI
*LPFN_GETHOSTNAME
)(char*,int));
305 typedef int (WINAPI
*LPFN_GETPEERNAME
)(SOCKET
,struct WS(sockaddr
)*,int*));
306 typedef struct WS(protoent
)* (WINAPI
*LPFN_GETPROTOBYNAME
)(const char*));
307 typedef struct WS(protoent
)* (WINAPI
*LPFN_GETPROTOBYNUMBER
)(int));
308 #ifdef WS_DEFINE_SELECT
309 typedef int (WINAPI
* LPFN_SELECT
)(int,WS(fd_set
)*,WS(fd_set
)*,WS(fd_set
)*,const struct WS(timeval
)*);
311 typedef struct WS(servent
)* (WINAPI
*LPFN_GETSERVBYNAME
)(const char*,const char*));
312 typedef struct WS(servent
)* (WINAPI
*LPFN_GETSERVBYPORT
)(int,const char*));
313 typedef int (WINAPI
*LPFN_GETSOCKNAME
)(SOCKET
,struct WS(sockaddr
)*,int*));
314 typedef int (WINAPI
*LPFN_GETSOCKOPT
)(SOCKET
,int,int,char*,int*));
315 typedef u_long (WINAPI
*LPFN_HTONL
)(u_long
));
316 typedef u_short (WINAPI
*LPFN_HTONS
)(u_short
));
317 typedef unsigned long (WINAPI
*LPFN_INET_ADDR
)(const char*);
318 typedef char* (WINAPI
*LPFN_INET_NTOA
)(struct WS(in_addr
));
319 typedef int (WINAPI
*LPFN_IOCTLSOCKET
)(SOCKET
,long,u_long
*));
320 typedef int (WINAPI
*LPFN_LISTEN
)(SOCKET
,int));
321 typedef u_long (WINAPI
*LPFN_NTOHL
)(u_long
));
322 typedef u_short (WINAPI
*LPFN_NTOHS
)(u_short
));
323 typedef int (WINAPI
*LPFN_RECV
)(SOCKET
,char*,int,int));
324 typedef int (WINAPI
*LPFN_RECVFROM
)(SOCKET
,char*,int,int,struct WS(sockaddr
)*,int*));
325 typedef int (WINAPI
*LPFN_SEND
)(SOCKET
,const char*,int,int));
326 typedef int (WINAPI
*LPFN_SENDTO
)(SOCKET
,const char*,int,int,const struct WS(sockaddr
)*,int));
327 typedef int (WINAPI
*LPFN_SETSOCKOPT
)(SOCKET
,int,int,const char*,int));
328 typedef int (WINAPI
*LPFN_SHUTDOWN
)(SOCKET
,int));
329 typedef SOCKET (WINAPI
*LPFN_SOCKET
)(int,int,int));
330 #endif /* WS_API_TYPEDEFS */
335 * Winsock2 Prototypes
337 * Remember to keep this section in sync with the
338 * "Winsock2 Function Typedefs" section below.
340 #if WS_API_PROTOTYPES
341 SOCKET WINAPI
WSAAccept(SOCKET
,struct WS(sockaddr
)*,LPINT
,LPCONDITIONPROC
,DWORD
);
342 INT WINAPI
WSAAddressToStringA(LPSOCKADDR
,DWORD
,LPWSAPROTOCOL_INFOA
,LPSTR
,LPDWORD
);
343 INT WINAPI
WSAAddressToStringW(LPSOCKADDR
,DWORD
,LPWSAPROTOCOL_INFOW
,LPWSTR
,LPDWORD
);
344 #define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
345 BOOL WINAPI
WSACloseEvent(WSAEVENT
);
346 int WINAPI
WSAConnect(SOCKET
,const struct WS(sockaddr
)*,int,LPWSABUF
,LPWSABUF
,LPQOS
,LPQOS
);
347 WSAEVENT WINAPI
WSACreateEvent(void);
348 /* WSADuplicateSocketA */
349 /* WSADuplicateSocketW */
350 /* WSAEnumNameSpaceProvidersA */
351 /* WSAEnumNameSpaceProvidersW */
352 int WINAPI
WSAEnumNetworkEvents(SOCKET
,WSAEVENT
,LPWSANETWORKEVENTS
);
353 int WINAPI
WSAEnumProtocolsA(LPINT
,LPWSAPROTOCOL_INFOA
,LPDWORD
);
354 int WINAPI
WSAEnumProtocolsW(LPINT
,LPWSAPROTOCOL_INFOW
,LPDWORD
);
355 #define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
356 int WINAPI
WSAEventSelect(SOCKET
,WSAEVENT
,long);
357 BOOL WINAPI
WSAGetOverlappedResult(SOCKET
,LPWSAOVERLAPPED
,LPDWORD
,BOOL
,LPDWORD
);
358 /* WSAGetQOSByName */
359 /* WSAGetServiceClassInfoA */
360 /* WSAGetServiceClassInfoW */
361 /* WSAGetServiceClassNameByClassIdA */
362 /* WSAGetServiceClassNameByClassIdW */
363 int WINAPI
WSAHtonl(SOCKET
,u_long
,u_long
*);
364 int WINAPI
WSAHtons(SOCKET
,u_short
,u_short
*);
365 /* WSAInstallServiceClassA */
366 /* WSAInstallServiceClassW */
367 int WINAPI
WSAIoctl(SOCKET
,DWORD
,LPVOID
,DWORD
,LPVOID
,DWORD
,LPDWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
369 /* WSALookupServiceBeginA */
370 /* WSALookupServiceBeginW */
371 /* WSALookupServiceEnd */
372 /* WSALookupServiceNextA */
373 /* WSALookupServiceNextW */
374 int WINAPI
WSANtohl(SOCKET
,u_long
,u_long
*);
375 int WINAPI
WSANtohs(SOCKET
,u_short
,u_short
*);
376 /* WSAProviderConfigChange */
377 int WINAPI
WSARecv(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,LPDWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
378 int WINAPI
WSARecvDisconnect(SOCKET
,LPWSABUF
);
379 int WINAPI
WSARecvFrom(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,LPDWORD
,struct WS(sockaddr
)*,LPINT
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
380 /* WSARemoveServiceClass */
381 BOOL WINAPI
WSAResetEvent(WSAEVENT
);
382 int WINAPI
WSASend(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,DWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
383 int WINAPI
WSASendDisconnect(SOCKET
,LPWSABUF
);
384 int WINAPI
WSASendTo(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,DWORD
,const struct WS(sockaddr
)*,int,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
385 BOOL WINAPI
WSASetEvent(WSAEVENT
);
388 SOCKET WINAPI
WSASocketA(int,int,int,LPWSAPROTOCOL_INFOA
,GROUP
,DWORD
);
389 SOCKET WINAPI
WSASocketW(int,int,int,LPWSAPROTOCOL_INFOW
,GROUP
,DWORD
);
390 INT WINAPI
WSAStringToAddressA(LPSTR
,INT
,LPWSAPROTOCOL_INFOA
,LPSOCKADDR
,LPINT
);
391 INT WINAPI
WSAStringToAddressW(LPSTR
,INT
,LPWSAPROTOCOL_INFOA
,LPSOCKADDR
,LPINT
);
392 #define WSASocket WINELIB_NAME_AW(WSASocket)
393 #define WSAStringToAddress WINELIB_NAME_AW(WSAStringToAddress)
394 DWORD WINAPI
WSAWaitForMultipleEvents(DWORD
,const WSAEVENT
*,BOOL
,DWORD
,BOOL
);
395 #endif /* WS_API_PROTOTYPES */
400 * Winsock2 Function Typedefs
402 * Remember to keep this section in sync with the
403 * "Winsock2 Prototypes" section above.
406 typedef SOCKET (WINAPI
*LPFN_WSAACCEPT
)(SOCKET
,WS(sockaddr
)*,LPINT
,LPCONDITIONPROC
,DWORD
);
407 typedef INT (WINAPI
*LPFN_WSAADRESSTOSTRINGA
)(LPSOCKADDR
,DWORD
,LPWSAPROTOCOL_INFOA
,LPSTR
,LPDWORD
);
408 typedef INT (WINAPI
*LPFN_WSAADRESSTOSTRINGW
)(LPSOCKADDR
,DWORD
,LPWSAPROTOCOL_INFOW
,LPWSTR
,LPDWORD
);
409 #define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
410 typedef BOOL (WINAPI
*LPFN_WSACLOSEEVENT
)(WSAEVENT
);
411 typedef int (WINAPI
*LPFN_WSACONNECT
)(SOCKET
,const struct WS(sockaddr
)*,int,LPWSABUF
,LPWSABUF
,LPQOS
,LPQOS
);
412 typedef WSAEVENT (WINAPI
*LPFN_WSACREATEEVENT
)(void);
413 /* WSADuplicateSocketA */
414 /* WSADuplicateSocketW */
415 /* WSAEnumNameSpaceProvidersA */
416 /* WSAEnumNameSpaceProvidersW */
417 typedef int (WINAPI
*LPFN_WSAENUMNETWORKEVENT
)(SOCKET
,WSAEVENT
,LPWSANETWORKEVENTS
);
418 typedef int (WINAPI
*LPFN_WSAENUMPROTOCOLSA
)(LPINT
,LPWSAPROTOCOL_INFOA
,LPDWORD
);
419 typedef int (WINAPI
*LPFN_WSAENUMPROTOCOLSW
)(LPINT
,LPWSAPROTOCOL_INFOW
,LPDWORD
);
420 #define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
421 typedef int (WINAPI
*LPFN_WSAEVENTSELECT
)(SOCKET
,WSAEVENT
,long);
422 typedef BOOL (WINAPI
*LPFN_WSAGETOVERLAPPEDRESULT
)(SOCKET
,LPWSAOVERLAPPED
,LPDWORD
,BOOL
,LPDWORD
);
423 /* WSAGetQOSByName */
424 /* WSAGetServiceClassInfoA */
425 /* WSAGetServiceClassInfoW */
426 /* WSAGetServiceClassNameByClassIdA */
427 /* WSAGetServiceClassNameByClassIdW */
428 typedef int (WINAPI
*LPFN_WSAHTONL
)(SOCKET
,u_long
,u_long
*);
429 typedef int (WINAPI
*LPFN_WSAHTONS
)(SOCKET
,u_short
,u_short
*);
430 /* WSAInstallServiceClassA */
431 /* WSAInstallServiceClassW */
432 typedef int (WINAPI
*LPFN_WSAIOCTL
)(SOCKET
,DWORD
,LPVOID
,DWORD
,LPVOID
,DWORD
,LPDWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
434 /* WSALookupServiceBeginA */
435 /* WSALookupServiceBeginW */
436 /* WSALookupServiceEnd */
437 /* WSALookupServiceNextA */
438 /* WSALookupServiceNextW */
439 typedef int (WINAPI
*LPFN_WSANTOHL
)(SOCKET
,u_long
,u_long
*);
440 typedef int (WINAPI
*LPFN_WSANTOHS
)(SOCKET
,u_short
,u_short
*);
441 /* WSAProviderConfigChange */
442 typedef int (WINAPI
*LPFN_WSARECV
)(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,LPDWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
443 typedef int (WINAPI
*LPFN_WSARECVDISCONNECT
)(SOCKET
,LPWSABUF
);
444 typedef int (WINAPI
*LPFN_WSARECVFROM
)(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,LPDWORD
,struct WS(sockaddr
)*,LPINT
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
445 /* WSARemoveServiceClass */
446 typedef BOOL (WINAPI
*LPFN_WSARESETEVENT
)(WSAEVENT
);
447 typedef int (WINAPI
*LPFN_WSASEND
)(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,DWORD
,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
448 typedef int (WINAPI
*LPFN_WSASENDDISCONNECT
)(SOCKET
,LPWSABUF
);
449 typedef int (WINAPI
*LPFN_WSASENDTO
)(SOCKET
,LPWSABUF
,DWORD
,LPDWORD
,DWORD
,const struct WS(sockaddr
)*,int,LPWSAOVERLAPPED
,LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
450 typedef BOOL (WINAPI
*LPFN_WSASETEVENT
)(WSAEVENT
);
453 typedef SOCKET (WINAPI
*LPFN_WSASOCKETA
)(int,int,int,LPWSAPROTOCOL_INFOA
,GROUP
,DWORD
);
454 typedef SOCKET (WINAPI
*LPFN_WSASOCKETW
)(int,int,int,LPWSAPROTOCOL_INFOW
,GROUP
,DWORD
);
455 typedef INT (WINAPI
*LPFN_WSASTRINGTOADDRESSA
)(LPSTR
,INT
,LPWSAPROTOCOL_INFOA
,LPSOCKADDR
,LPINT
);
456 typedef INT (WINAPI
*LPFN_WSASTRINGTOADDRESSW
)(LPSTR
,INT
,LPWSAPROTOCOL_INFOA
,LPSOCKADDR
,LPINT
);
457 #define LPFN_WSASOCKET WINELIB_NAME_AW(LPFN_WSASOCKET)
458 #define LPFN_WSASTRINGTOADDRESS WINELIB_NAME_AW(LPFN_WSASTRINGTOADDRESS)
459 typedef DWORD (WINAPI
*LPFN_WSAWAITFORMULTIPLEEVENTS
)(DWORD
,const WSAEVENT
*,BOOL
,DWORD
,BOOL
);
460 #endif /* WS_API_TYPEDEFS */
463 /* Condition function return values */
464 #define CF_ACCEPT 0x0000
465 #define CF_REJECT 0x0001
466 #define CF_DEFER 0x0002
475 #undef WS_API_PROTOTYPES
476 #undef WS_API_TYPEDEFS
478 #endif /* __WINSOCK2API__ */