/*
* Winsock 2 definitions - used for ws2_32.dll
*
* Copyright (C) 1999 Ove Kaaven
* Copyright (C) 2001 Francois Gouget
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* FIXME: Still missing required Winsock 2 definitions.
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef _WINSOCK2API_
#define _WINSOCK2API_
/*
* Setup phase
*/
/* Everything common between winsock.h and winsock2.h */
#ifndef INCL_WINSOCK_API_PROTOTYPES
#else
#endif
#ifndef INCL_WINSOCK_API_TYPEDEFS
#define INCL_WINSOCK_API_TYPEDEFS 0
#define WS_API_TYPEDEFS 0
#else
#endif
#define __WINE_WINSOCK2__
#include <winsock.h>
#include <ws2def.h>
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
#ifndef USE_WS_PREFIX
#else
#endif
/* protocol types */
#ifndef USE_WS_PREFIX
#else /* USE_WS_PREFIX */
#endif /* USE_WS_PREFIX */
/* option flags per socket */
#define FD_READ_BIT 0
/* Constants for LPCONDITIONPROC */
/* Constants for shutdown() */
/* Constants for WSAIoctl() */
#ifdef USE_WS_PREFIX
#else /* USE_WS_PREFIX */
#endif /* USE_WS_PREFIX */
/* Constants for WSAIoctl() */
/* Constants for WSAJoinLeaf() */
#ifndef GUID_DEFINED
#include <guiddef.h>
#endif
#define LAYERED_PROTOCOL 0
typedef struct _WSAPROTOCOLCHAIN
{
/* length = 0 means layered protocol, */
/* length = 1 means base protocol, */
/* length > 1 means protocol chain */
typedef struct _WSAPROTOCOL_INFOA
{
int iVersion;
int iAddressFamily;
int iMaxSockAddr;
int iMinSockAddr;
int iSocketType;
int iProtocol;
int iProtocolMaxOffset;
int iNetworkByteOrder;
int iSecurityScheme;
typedef struct _WSAPROTOCOL_INFOW
{
int iVersion;
int iAddressFamily;
int iMaxSockAddr;
int iMinSockAddr;
int iSocketType;
int iProtocol;
int iProtocolMaxOffset;
int iNetworkByteOrder;
int iSecurityScheme;
typedef struct _WSANETWORKEVENTS
{
typedef struct _WSANSClassInfoA
{
typedef struct _WSANSClassInfoW
{
typedef struct _WSAServiceClassInfoA
{
typedef struct _WSAServiceClassInfoW
{
typedef struct _WSABUF
{
typedef unsigned int GROUP;
/*
* FLOWSPEC and SERVICETYPE should eventually move to qos.h
*/
typedef struct _FLOWSPEC {
unsigned int TokenRate;
unsigned int TokenBucketSize;
unsigned int PeakBandwidth;
unsigned int Latency;
unsigned int DelayVariation;
unsigned int MaxSduSize;
unsigned int MinimumPolicedSize;
typedef struct _QUALITYOFSERVICE {
(
GROUP *g,
);
(
);
#ifndef _tagBLOB_DEFINED
#define _tagBLOB_DEFINED
#define _BLOB_DEFINED
#define _LPBLOB_DEFINED
typedef struct _BLOB {
#endif
/* addressfamily protocol pairs */
typedef struct _AFPROTOCOLS {
/* client query definitions */
typedef enum _WSAEcomparator {
COMP_EQUAL = 0,
typedef struct _WSAVersion {
typedef struct _WSAQuerySetA {
typedef struct _WSAQuerySetW {
typedef enum _WSAESETSERVICEOP {
RNRSERVICE_REGISTER = 0,
typedef struct _WSANAMESPACE_INFOA {
typedef struct _WSANAMESPACE_INFOW {
/*
* Winsock Function Typedefs
*
* Remember to keep this section in sync with the
* "Prototypes" section in winsock.h.
*/
#if WS_API_TYPEDEFS
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
#ifdef WS_DEFINE_SELECT
typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
#endif
#endif /* WS_API_TYPEDEFS */
/*
* Winsock2 Prototypes
*
* Remember to keep this section in sync with the
* "Winsock2 Function Typedefs" section below.
*/
int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
int WINAPI WSARecvFrom(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
int WINAPI WSASend(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
int WINAPI WSASendTo(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
#endif /* WS_API_PROTOTYPES */
/*
* Winsock2 Function Typedefs
*
* Remember to keep this section in sync with the
* "Winsock2 Prototypes" section above.
*/
#if WS_API_TYPEDEFS
typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
typedef int (WINAPI *LPFN_WSAJOINLEAF)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
typedef int (WINAPI *LPFN_WSASEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
#endif /* WS_API_TYPEDEFS */
/* Condition function return values */
#ifdef __cplusplus
}
#endif
#endif /* __WINSOCK2API__ */