mirror of
https://github.com/frida/tinycc
synced 2024-12-25 06:26:49 +03:00
win32/include/winapi changes from https://github.com/run4flat/tinycc.git
just for testing. Is it needed? I'm not a MSYS citizen. run4flat is a tcc fork by David Mertens that knows how to work with multiple symbol tables. Excelent work. A good descriptions of the tcc internals inside a code comments.
This commit is contained in:
parent
80322adaa0
commit
101cc8747f
@ -777,39 +777,5 @@ extern "C++" {
|
||||
* which always returns true: yes, (NaN != NaN) is true).
|
||||
*/
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
#define isgreater(x, y) __builtin_isgreater(x, y)
|
||||
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
|
||||
#define isless(x, y) __builtin_isless(x, y)
|
||||
#define islessequal(x, y) __builtin_islessequal(x, y)
|
||||
#define islessgreater(x, y) __builtin_islessgreater(x, y)
|
||||
#define isunordered(x, y) __builtin_isunordered(x, y)
|
||||
|
||||
#else
|
||||
/* helper */
|
||||
__CRT_INLINE int __cdecl
|
||||
__fp_unordered_compare (long double x, long double y){
|
||||
unsigned short retval;
|
||||
__asm__ ("fucom %%st(1);"
|
||||
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& 0x4500) == 0)
|
||||
#define isless(x, y) ((__fp_unordered_compare (y, x) \
|
||||
& 0x4500) == 0)
|
||||
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
|
||||
& FP_INFINITE) == 0)
|
||||
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
|
||||
& FP_INFINITE) == 0)
|
||||
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& FP_SUBNORMAL) == 0)
|
||||
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& 0x4500) == 0x4500)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* End _MATH_H_ */
|
||||
|
||||
|
21
win32/include/winapi/_bsd_types.h
Normal file
21
win32/include/winapi/_bsd_types.h
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef _BSDTYPES_DEFINED
|
||||
#define _BSDTYPES_DEFINED
|
||||
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
#if defined(__GNUC__) || \
|
||||
defined(__GNUG__)
|
||||
__extension__
|
||||
#endif /* gcc / g++ */
|
||||
typedef unsigned long long u_int64;
|
||||
|
||||
#endif /* _BSDTYPES_DEFINED */
|
||||
|
33
win32/include/winapi/_mingw_unicode.h
Normal file
33
win32/include/winapi/_mingw_unicode.h
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#if !defined(_INC_CRT_UNICODE_MACROS)
|
||||
/* _INC_CRT_UNICODE_MACROS defined based on UNICODE flag */
|
||||
|
||||
#if defined(UNICODE)
|
||||
# define _INC_CRT_UNICODE_MACROS 1
|
||||
# define __MINGW_NAME_AW(func) func##W
|
||||
# define __MINGW_NAME_AW_EXT(func,ext) func##W##ext
|
||||
# define __MINGW_NAME_UAW(func) func##_W
|
||||
# define __MINGW_NAME_UAW_EXT(func,ext) func##_W_##ext
|
||||
# define __MINGW_STRING_AW(str) L##str /* same as TEXT() from winnt.h */
|
||||
# define __MINGW_PROCNAMEEXT_AW "W"
|
||||
#else
|
||||
# define _INC_CRT_UNICODE_MACROS 2
|
||||
# define __MINGW_NAME_AW(func) func##A
|
||||
# define __MINGW_NAME_AW_EXT(func,ext) func##A##ext
|
||||
# define __MINGW_NAME_UAW(func) func##_A
|
||||
# define __MINGW_NAME_UAW_EXT(func,ext) func##_A_##ext
|
||||
# define __MINGW_STRING_AW(str) str /* same as TEXT() from winnt.h */
|
||||
# define __MINGW_PROCNAMEEXT_AW "A"
|
||||
#endif
|
||||
|
||||
#define __MINGW_TYPEDEF_AW(type) \
|
||||
typedef __MINGW_NAME_AW(type) type;
|
||||
#define __MINGW_TYPEDEF_UAW(type) \
|
||||
typedef __MINGW_NAME_UAW(type) type;
|
||||
|
||||
#endif /* !defined(_INC_CRT_UNICODE_MACROS) */
|
23
win32/include/winapi/_timeval.h
Normal file
23
win32/include/winapi/_timeval.h
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef _TIMEVAL_DEFINED
|
||||
#define _TIMEVAL_DEFINED
|
||||
|
||||
struct timeval
|
||||
{
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
|
||||
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
|
||||
#define timercmp(tvp,uvp,cmp) \
|
||||
((tvp)->tv_sec cmp (uvp)->tv_sec || \
|
||||
((tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec))
|
||||
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
|
||||
|
||||
#endif /* _TIMEVAL_DEFINED */
|
||||
|
28
win32/include/winapi/in6addr.h
Normal file
28
win32/include/winapi/in6addr.h
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef s6_addr
|
||||
|
||||
#include <_bsd_types.h>
|
||||
|
||||
typedef struct in6_addr {
|
||||
union {
|
||||
u_char Byte[16];
|
||||
u_short Word[8];
|
||||
} u;
|
||||
} IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
|
||||
|
||||
#define in_addr6 in6_addr
|
||||
|
||||
#define _S6_un u
|
||||
#define _S6_u8 Byte
|
||||
#define s6_addr _S6_un._S6_u8
|
||||
|
||||
#define s6_bytes u.Byte
|
||||
#define s6_words u.Word
|
||||
|
||||
#endif /* s6_addr */
|
||||
|
27
win32/include/winapi/inaddr.h
Normal file
27
win32/include/winapi/inaddr.h
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef s_addr
|
||||
|
||||
#include <_bsd_types.h>
|
||||
|
||||
typedef struct in_addr {
|
||||
union {
|
||||
struct { u_char s_b1, s_b2, s_b3, s_b4; } S_un_b;
|
||||
struct { u_short s_w1, s_w2; } S_un_w;
|
||||
u_long S_addr;
|
||||
} S_un;
|
||||
} IN_ADDR, *PIN_ADDR, *LPIN_ADDR;
|
||||
|
||||
#define s_addr S_un.S_addr
|
||||
#define s_host S_un.S_un_b.s_b2
|
||||
#define s_net S_un.S_un_b.s_b1
|
||||
#define s_imp S_un.S_un_w.s_w2
|
||||
#define s_impno S_un.S_un_b.s_b4
|
||||
#define s_lh S_un.S_un_b.s_b3
|
||||
|
||||
#endif /* s_addr */
|
||||
|
195
win32/include/winapi/mstcpip.h
Normal file
195
win32/include/winapi/mstcpip.h
Normal file
@ -0,0 +1,195 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef _MSTCPIP_
|
||||
#define _MSTCPIP_
|
||||
|
||||
#include <_mingw_unicode.h>
|
||||
|
||||
struct tcp_keepalive {
|
||||
u_long onoff;
|
||||
u_long keepalivetime;
|
||||
u_long keepaliveinterval;
|
||||
};
|
||||
|
||||
#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)
|
||||
#define SIO_RCVALL_MCAST _WSAIOW(IOC_VENDOR,2)
|
||||
#define SIO_RCVALL_IGMPMCAST _WSAIOW(IOC_VENDOR,3)
|
||||
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
|
||||
#define SIO_ABSORB_RTRALERT _WSAIOW(IOC_VENDOR,5)
|
||||
#define SIO_UCAST_IF _WSAIOW(IOC_VENDOR,6)
|
||||
#define SIO_LIMIT_BROADCASTS _WSAIOW(IOC_VENDOR,7)
|
||||
#define SIO_INDEX_BIND _WSAIOW(IOC_VENDOR,8)
|
||||
#define SIO_INDEX_MCASTIF _WSAIOW(IOC_VENDOR,9)
|
||||
#define SIO_INDEX_ADD_MCAST _WSAIOW(IOC_VENDOR,10)
|
||||
#define SIO_INDEX_DEL_MCAST _WSAIOW(IOC_VENDOR,11)
|
||||
|
||||
#define RCVALL_OFF 0
|
||||
#define RCVALL_ON 1
|
||||
#define RCVALL_SOCKETLEVELONLY 2
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0502)
|
||||
#define SOCKET_SETTINGS_GUARANTEE_ENCRYPTION 0x00000001
|
||||
#define SOCKET_SETTINGS_ALLOW_INSECURE 0x00000002
|
||||
|
||||
typedef enum _SOCKET_SECURITY_PROTOCOL {
|
||||
SOCKET_SECURITY_PROTOCOL_DEFAULT,
|
||||
SOCKET_SECURITY_PROTOCOL_IPSEC,
|
||||
SOCKET_SECURITY_PROTOCOL_INVALID
|
||||
} SOCKET_SECURITY_PROTOCOL;
|
||||
|
||||
typedef enum _SOCKET_USAGE_TYPE {
|
||||
SYSTEM_CRITICAL_SOCKET = 1
|
||||
} SOCKET_USAGE_TYPE;
|
||||
|
||||
typedef struct _SOCKET_PEER_TARGET_NAME {
|
||||
SOCKET_SECURITY_PROTOCOL SecurityProtocol;
|
||||
SOCKADDR_STORAGE PeerAddress;
|
||||
ULONG PeerTargetNameStringLen;
|
||||
wchar_t AllStrings[];
|
||||
} SOCKET_PEER_TARGET_NAME;
|
||||
|
||||
#define SOCKET_INFO_CONNECTION_SECURED 0x00000001
|
||||
#define SOCKET_INFO_CONNECTION_ENCRYPTED 0x00000002
|
||||
#define SOCKET_INFO_CONNECTION_IMPERSONATED 0x00000004
|
||||
|
||||
typedef struct _SOCKET_SECURITY_QUERY_INFO {
|
||||
SOCKET_SECURITY_PROTOCOL SecurityProtocol;
|
||||
ULONG Flags;
|
||||
UINT64 PeerApplicationAccessTokenHandle;
|
||||
UINT64 PeerMachineAccessTokenHandle;
|
||||
} SOCKET_SECURITY_QUERY_INFO;
|
||||
|
||||
typedef struct _SOCKET_SECURITY_QUERY_TEMPLATE {
|
||||
SOCKET_SECURITY_PROTOCOL SecurityProtocol;
|
||||
SOCKADDR_STORAGE PeerAddress;
|
||||
ULONG PeerTokenAccessMask;
|
||||
} SOCKET_SECURITY_QUERY_TEMPLATE;
|
||||
|
||||
typedef struct _SOCKET_SECURITY_SETTINGS {
|
||||
SOCKET_SECURITY_PROTOCOL SecurityProtocol;
|
||||
ULONG SecurityFlags;
|
||||
} SOCKET_SECURITY_SETTINGS;
|
||||
|
||||
#define SOCKET_SETTINGS_IPSEC_SKIP_FILTER_INSTANTIATION 0x00000001
|
||||
|
||||
typedef struct _SOCKET_SECURITY_SETTINGS_IPSEC {
|
||||
SOCKET_SECURITY_PROTOCOL SecurityProtocol;
|
||||
ULONG SecurityFlags;
|
||||
ULONG IpsecFlags;
|
||||
GUID AuthipMMPolicyKey;
|
||||
GUID AuthipQMPolicyKey;
|
||||
GUID Reserved;
|
||||
UINT64 Reserved2;
|
||||
ULONG UserNameStringLen;
|
||||
ULONG DomainNameStringLen;
|
||||
ULONG PasswordStringLen;
|
||||
wchar_t AllStrings[];
|
||||
} SOCKET_SECURITY_SETTINGS_IPSEC;
|
||||
|
||||
#define RtlIpv6AddressToString __MINGW_NAME_AW(RtlIpv6AddressToString)
|
||||
#define RtlIpv6AddressToStringEx __MINGW_NAME_AW(RtlIpv6AddressToStringEx)
|
||||
|
||||
LPWSTR NTAPI RtlIpv6AddressToStringA(
|
||||
const IN6_ADDR *Addr,
|
||||
LPSTR S
|
||||
);
|
||||
|
||||
LPSTR NTAPI RtlIpv6AddressToStringW(
|
||||
const IN6_ADDR *Addr,
|
||||
LPWSTR S
|
||||
);
|
||||
|
||||
LONG NTAPI RtlIpv6AddressToStringExA(
|
||||
const IN6_ADDR *Address,
|
||||
ULONG ScopeId,
|
||||
USHORT Port,
|
||||
LPSTR AddressString,
|
||||
PULONG AddressStringLength
|
||||
);
|
||||
|
||||
LONG NTAPI RtlIpv6AddressToStringExW(
|
||||
const IN6_ADDR *Address,
|
||||
ULONG ScopeId,
|
||||
USHORT Port,
|
||||
LPWSTR AddressString,
|
||||
PULONG AddressStringLength
|
||||
);
|
||||
|
||||
#define RtlIpv4AddressToString __MINGW_NAME_AW(RtlIpv4AddressToString)
|
||||
LPTSTR NTAPI RtlIpv4AddressToStringA(
|
||||
const IN_ADDR *Addr,
|
||||
LPSTR S
|
||||
);
|
||||
|
||||
LPTSTR NTAPI RtlIpv4AddressToStringW(
|
||||
const IN_ADDR *Addr,
|
||||
LPWSTR S
|
||||
);
|
||||
|
||||
#define RtlIpv4AddressToStringEx __MINGW_NAME_AW(RtlIpv4AddressToStringEx)
|
||||
LONG NTAPI RtlIpv4AddressToStringExA(
|
||||
const IN_ADDR *Address,
|
||||
USHORT Port,
|
||||
LPSTR AddressString,
|
||||
PULONG AddressStringLength
|
||||
);
|
||||
|
||||
LONG NTAPI RtlIpv4AddressToStringExW(
|
||||
const IN_ADDR *Address,
|
||||
USHORT Port,
|
||||
LPWSTR AddressString,
|
||||
PULONG AddressStringLength
|
||||
);
|
||||
|
||||
#define RtlIpv4StringToAddress __MINGW_NAME_AW(RtlIpv4StringToAddress)
|
||||
LONG NTAPI RtlIpv4StringToAddressA(
|
||||
PCSTR S,
|
||||
BOOLEAN Strict,
|
||||
LPSTR *Terminator,
|
||||
IN_ADDR *Addr
|
||||
);
|
||||
|
||||
LONG NTAPI RtlIpv4StringToAddressW(
|
||||
PCWSTR S,
|
||||
BOOLEAN Strict,
|
||||
LPWSTR *Terminator,
|
||||
IN_ADDR *Addr
|
||||
);
|
||||
|
||||
#define RtlIpv4StringToAddressEx __MINGW_NAME_AW(RtlIpv4StringToAddressEx)
|
||||
LONG NTAPI RtlIpv4StringToAddressExA(
|
||||
PCSTR AddressString,
|
||||
BOOLEAN Strict,
|
||||
IN_ADDR *Address,
|
||||
PUSHORT Port
|
||||
);
|
||||
|
||||
LONG NTAPI RtlIpv4StringToAddressExW(
|
||||
PCWSTR AddressString,
|
||||
BOOLEAN Strict,
|
||||
IN_ADDR *Address,
|
||||
PUSHORT Port
|
||||
);
|
||||
|
||||
#define RtlIpv6StringToAddressEx __MINGW_NAME_AW(RtlIpv6StringToAddressEx)
|
||||
LONG NTAPI RtlIpv6StringToAddressExA(
|
||||
PCSTR AddressString,
|
||||
IN6_ADDR *Address,
|
||||
PULONG ScopeId,
|
||||
PUSHORT Port
|
||||
);
|
||||
|
||||
LONG NTAPI RtlIpv6StringToAddressExW(
|
||||
PCSTR AddressString,
|
||||
IN6_ADDR *Address,
|
||||
PULONG ScopeId,
|
||||
PUSHORT Port
|
||||
);
|
||||
|
||||
#endif /*(_WIN32_WINNT >= 0x0502)*/
|
||||
|
||||
#endif /* _MSTCPIP_ */
|
||||
|
26
win32/include/winapi/psdk_inc/_fd_types.h
Normal file
26
win32/include/winapi/psdk_inc/_fd_types.h
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef ___WSA_FD_TYPES_H
|
||||
#define ___WSA_FD_TYPES_H
|
||||
|
||||
#include <psdk_inc/_socket_types.h>
|
||||
|
||||
#ifndef FD_SETSIZE
|
||||
#define FD_SETSIZE 64
|
||||
#endif
|
||||
typedef struct fd_set
|
||||
{
|
||||
u_int fd_count;
|
||||
SOCKET fd_array[FD_SETSIZE];
|
||||
} fd_set;
|
||||
|
||||
typedef struct fd_set FD_SET;
|
||||
typedef struct fd_set *PFD_SET;
|
||||
typedef struct fd_set *LPFD_SET;
|
||||
|
||||
#endif /* ___WSA_FD_TYPES_H */
|
||||
|
18
win32/include/winapi/psdk_inc/_ip_mreq1.h
Normal file
18
win32/include/winapi/psdk_inc/_ip_mreq1.h
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef _MINGW_IP_MREQ1_H
|
||||
#define _MINGW_IP_MREQ1_H
|
||||
|
||||
#include <inaddr.h>
|
||||
|
||||
struct ip_mreq {
|
||||
struct in_addr imr_multiaddr;
|
||||
struct in_addr imr_interface;
|
||||
};
|
||||
|
||||
#endif /* _MINGW_IP_MREQ1_H */
|
||||
|
104
win32/include/winapi/psdk_inc/_ip_types.h
Normal file
104
win32/include/winapi/psdk_inc/_ip_types.h
Normal file
@ -0,0 +1,104 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef _MINGW_IP_TYPES_H
|
||||
#define _MINGW_IP_TYPES_H
|
||||
|
||||
#include <_bsd_types.h>
|
||||
|
||||
#define h_addr h_addr_list[0]
|
||||
|
||||
struct hostent {
|
||||
char *h_name;
|
||||
char **h_aliases;
|
||||
short h_addrtype;
|
||||
short h_length;
|
||||
char **h_addr_list;
|
||||
};
|
||||
|
||||
struct netent {
|
||||
char *n_name;
|
||||
char **n_aliases;
|
||||
short n_addrtype;
|
||||
u_long n_net;
|
||||
};
|
||||
|
||||
struct servent {
|
||||
char *s_name;
|
||||
char **s_aliases;
|
||||
#ifdef _WIN64
|
||||
char *s_proto;
|
||||
short s_port;
|
||||
#else
|
||||
short s_port;
|
||||
char *s_proto;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct protoent {
|
||||
char *p_name;
|
||||
char **p_aliases;
|
||||
short p_proto;
|
||||
};
|
||||
|
||||
typedef struct hostent HOSTENT;
|
||||
typedef struct hostent *PHOSTENT;
|
||||
typedef struct hostent *LPHOSTENT;
|
||||
|
||||
typedef struct servent SERVENT;
|
||||
typedef struct servent *PSERVENT;
|
||||
typedef struct servent *LPSERVENT;
|
||||
|
||||
typedef struct protoent PROTOENT;
|
||||
typedef struct protoent *PPROTOENT;
|
||||
typedef struct protoent *LPPROTOENT;
|
||||
|
||||
|
||||
#include <inaddr.h>
|
||||
|
||||
struct sockaddr_in {
|
||||
short sin_family;
|
||||
u_short sin_port;
|
||||
struct in_addr sin_addr;
|
||||
char sin_zero[8];
|
||||
};
|
||||
|
||||
struct sockaddr {
|
||||
u_short sa_family;
|
||||
char sa_data[14];
|
||||
};
|
||||
|
||||
struct sockproto {
|
||||
u_short sp_family;
|
||||
u_short sp_protocol;
|
||||
};
|
||||
|
||||
struct linger {
|
||||
u_short l_onoff;
|
||||
u_short l_linger;
|
||||
};
|
||||
|
||||
typedef struct sockaddr SOCKADDR;
|
||||
typedef struct sockaddr *PSOCKADDR;
|
||||
typedef struct sockaddr *LPSOCKADDR;
|
||||
|
||||
typedef struct sockaddr_in SOCKADDR_IN;
|
||||
typedef struct sockaddr_in *PSOCKADDR_IN;
|
||||
typedef struct sockaddr_in *LPSOCKADDR_IN;
|
||||
|
||||
typedef struct linger LINGER;
|
||||
typedef struct linger *PLINGER;
|
||||
typedef struct linger *LPLINGER;
|
||||
|
||||
|
||||
#include <_timeval.h>
|
||||
|
||||
typedef struct timeval TIMEVAL;
|
||||
typedef struct timeval *PTIMEVAL;
|
||||
typedef struct timeval *LPTIMEVAL;
|
||||
|
||||
#endif /* _MINGW_IP_TYPES_H */
|
||||
|
20
win32/include/winapi/psdk_inc/_socket_types.h
Normal file
20
win32/include/winapi/psdk_inc/_socket_types.h
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef ___WSA_SOCKET_TYPES_H
|
||||
#define ___WSA_SOCKET_TYPES_H
|
||||
|
||||
#if 1
|
||||
typedef UINT_PTR SOCKET;
|
||||
#else
|
||||
typedef INT_PTR SOCKET;
|
||||
#endif
|
||||
|
||||
#define INVALID_SOCKET (SOCKET)(~0)
|
||||
#define SOCKET_ERROR (-1)
|
||||
|
||||
#endif /* ___WSA_SOCKET_TYPES_H */
|
||||
|
248
win32/include/winapi/psdk_inc/_ws1_undef.h
Normal file
248
win32/include/winapi/psdk_inc/_ws1_undef.h
Normal file
@ -0,0 +1,248 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#undef FD_CLR
|
||||
#undef FD_ZERO
|
||||
#undef FD_ISSET
|
||||
#undef FD_SET
|
||||
|
||||
#undef IOCPARM_MASK
|
||||
#undef IOC_VOID
|
||||
#undef IOC_OUT
|
||||
#undef IOC_IN
|
||||
#undef IOC_INOUT
|
||||
|
||||
#undef _IO
|
||||
#undef _IOR
|
||||
#undef _IOW
|
||||
|
||||
#undef FIONREAD
|
||||
#undef FIONBIO
|
||||
#undef FIOASYNC
|
||||
|
||||
#undef SIOCSHIWAT
|
||||
#undef SIOCGHIWAT
|
||||
#undef SIOCSLOWAT
|
||||
#undef SIOCGLOWAT
|
||||
#undef SIOCATMARK
|
||||
|
||||
#undef IPPROTO_IP
|
||||
#undef IPPROTO_ICMP
|
||||
#undef IPPROTO_IGMP
|
||||
#undef IPPROTO_GGP
|
||||
#undef IPPROTO_TCP
|
||||
#undef IPPROTO_PUP
|
||||
#undef IPPROTO_UDP
|
||||
#undef IPPROTO_IDP
|
||||
#undef IPPROTO_ND
|
||||
|
||||
#undef IPPROTO_RAW
|
||||
#undef IPPROTO_MAX
|
||||
|
||||
#undef IPPORT_ECHO
|
||||
#undef IPPORT_DISCARD
|
||||
#undef IPPORT_SYSTAT
|
||||
#undef IPPORT_DAYTIME
|
||||
#undef IPPORT_NETSTAT
|
||||
#undef IPPORT_FTP
|
||||
#undef IPPORT_TELNET
|
||||
#undef IPPORT_SMTP
|
||||
#undef IPPORT_TIMESERVER
|
||||
#undef IPPORT_NAMESERVER
|
||||
#undef IPPORT_WHOIS
|
||||
#undef IPPORT_MTP
|
||||
|
||||
#undef IPPORT_TFTP
|
||||
#undef IPPORT_RJE
|
||||
#undef IPPORT_FINGER
|
||||
#undef IPPORT_TTYLINK
|
||||
#undef IPPORT_SUPDUP
|
||||
|
||||
#undef IPPORT_EXECSERVER
|
||||
#undef IPPORT_LOGINSERVER
|
||||
#undef IPPORT_CMDSERVER
|
||||
#undef IPPORT_EFSSERVER
|
||||
|
||||
#undef IPPORT_BIFFUDP
|
||||
#undef IPPORT_WHOSERVER
|
||||
#undef IPPORT_ROUTESERVER
|
||||
|
||||
#undef IPPORT_RESERVED
|
||||
|
||||
#undef IMPLINK_IP
|
||||
#undef IMPLINK_LOWEXPER
|
||||
#undef IMPLINK_HIGHEXPER
|
||||
|
||||
#undef IN_CLASSA
|
||||
#undef IN_CLASSA_NET
|
||||
#undef IN_CLASSA_NSHIFT
|
||||
#undef IN_CLASSA_HOST
|
||||
#undef IN_CLASSA_MAX
|
||||
|
||||
#undef IN_CLASSB
|
||||
#undef IN_CLASSB_NET
|
||||
#undef IN_CLASSB_NSHIFT
|
||||
#undef IN_CLASSB_HOST
|
||||
#undef IN_CLASSB_MAX
|
||||
|
||||
#undef IN_CLASSC
|
||||
#undef IN_CLASSC_NET
|
||||
#undef IN_CLASSC_NSHIFT
|
||||
#undef IN_CLASSC_HOST
|
||||
|
||||
#undef INADDR_ANY
|
||||
#undef INADDR_LOOPBACK
|
||||
#undef INADDR_BROADCAST
|
||||
#undef INADDR_NONE
|
||||
|
||||
#undef IP_OPTIONS
|
||||
#undef IP_MULTICAST_IF
|
||||
#undef IP_MULTICAST_TTL
|
||||
#undef IP_MULTICAST_LOOP
|
||||
#undef IP_ADD_MEMBERSHIP
|
||||
#undef IP_DROP_MEMBERSHIP
|
||||
#undef IP_TTL
|
||||
#undef IP_TOS
|
||||
#undef IP_DONTFRAGMENT
|
||||
|
||||
#undef IP_DEFAULT_MULTICAST_TTL
|
||||
#undef IP_DEFAULT_MULTICAST_LOOP
|
||||
#undef IP_MAX_MEMBERSHIPS
|
||||
|
||||
#undef SOCK_STREAM
|
||||
#undef SOCK_DGRAM
|
||||
#undef SOCK_RAW
|
||||
#undef SOCK_RDM
|
||||
#undef SOCK_SEQPACKET
|
||||
|
||||
#undef SO_DEBUG
|
||||
#undef SO_ACCEPTCONN
|
||||
#undef SO_REUSEADDR
|
||||
#undef SO_KEEPALIVE
|
||||
#undef SO_DONTROUTE
|
||||
#undef SO_BROADCAST
|
||||
#undef SO_USELOOPBACK
|
||||
#undef SO_LINGER
|
||||
#undef SO_OOBINLINE
|
||||
|
||||
#undef SO_DONTLINGER
|
||||
|
||||
#undef SO_SNDBUF
|
||||
#undef SO_RCVBUF
|
||||
#undef SO_SNDLOWAT
|
||||
#undef SO_RCVLOWAT
|
||||
#undef SO_SNDTIMEO
|
||||
#undef SO_RCVTIMEO
|
||||
#undef SO_ERROR
|
||||
#undef SO_TYPE
|
||||
|
||||
#undef SO_CONNDATA
|
||||
#undef SO_CONNOPT
|
||||
#undef SO_DISCDATA
|
||||
#undef SO_DISCOPT
|
||||
#undef SO_CONNDATALEN
|
||||
#undef SO_CONNOPTLEN
|
||||
#undef SO_DISCDATALEN
|
||||
#undef SO_DISCOPTLEN
|
||||
|
||||
#undef SO_OPENTYPE
|
||||
|
||||
#undef SO_SYNCHRONOUS_ALERT
|
||||
#undef SO_SYNCHRONOUS_NONALERT
|
||||
|
||||
#undef SO_MAXDG
|
||||
#undef SO_MAXPATHDG
|
||||
#undef SO_UPDATE_ACCEPT_CONTEXT
|
||||
#undef SO_CONNECT_TIME
|
||||
|
||||
#undef TCP_NODELAY
|
||||
#undef TCP_BSDURGENT
|
||||
|
||||
#undef AF_UNSPEC
|
||||
#undef AF_UNIX
|
||||
#undef AF_INET
|
||||
#undef AF_IMPLINK
|
||||
#undef AF_PUP
|
||||
#undef AF_CHAOS
|
||||
#undef AF_IPX
|
||||
#undef AF_NS
|
||||
#undef AF_ISO
|
||||
#undef AF_OSI
|
||||
#undef AF_ECMA
|
||||
#undef AF_DATAKIT
|
||||
#undef AF_CCITT
|
||||
#undef AF_SNA
|
||||
#undef AF_DECnet
|
||||
#undef AF_DLI
|
||||
#undef AF_LAT
|
||||
#undef AF_HYLINK
|
||||
#undef AF_APPLETALK
|
||||
#undef AF_NETBIOS
|
||||
#undef AF_VOICEVIEW
|
||||
#undef AF_FIREFOX
|
||||
#undef AF_UNKNOWN1
|
||||
#undef AF_BAN
|
||||
|
||||
#undef AF_MAX
|
||||
|
||||
#undef PF_UNSPEC
|
||||
#undef PF_UNIX
|
||||
#undef PF_INET
|
||||
#undef PF_IMPLINK
|
||||
#undef PF_PUP
|
||||
#undef PF_CHAOS
|
||||
#undef PF_NS
|
||||
#undef PF_IPX
|
||||
#undef PF_ISO
|
||||
#undef PF_OSI
|
||||
#undef PF_ECMA
|
||||
#undef PF_DATAKIT
|
||||
#undef PF_CCITT
|
||||
#undef PF_SNA
|
||||
#undef PF_DECnet
|
||||
#undef PF_DLI
|
||||
#undef PF_LAT
|
||||
#undef PF_HYLINK
|
||||
#undef PF_APPLETALK
|
||||
#undef PF_VOICEVIEW
|
||||
#undef PF_FIREFOX
|
||||
#undef PF_UNKNOWN1
|
||||
#undef PF_BAN
|
||||
|
||||
#undef PF_MAX
|
||||
|
||||
#undef SOL_SOCKET
|
||||
|
||||
#undef SOMAXCONN
|
||||
|
||||
#undef MSG_OOB
|
||||
#undef MSG_PEEK
|
||||
#undef MSG_DONTROUTE
|
||||
|
||||
#undef MSG_MAXIOVLEN
|
||||
|
||||
#undef MSG_PARTIAL
|
||||
|
||||
#undef MAXGETHOSTSTRUCT
|
||||
|
||||
#undef FD_READ
|
||||
#undef FD_WRITE
|
||||
#undef FD_OOB
|
||||
#undef FD_ACCEPT
|
||||
#undef FD_CONNECT
|
||||
#undef FD_CLOSE
|
||||
|
||||
#undef TF_DISCONNECT
|
||||
#undef TF_REUSE_SOCKET
|
||||
#undef TF_WRITE_BEHIND
|
||||
|
||||
#undef WSAMAKEASYNCREPLY
|
||||
#undef WSAMAKESELECTREPLY
|
||||
#undef WSAGETASYNCBUFLEN
|
||||
#undef WSAGETASYNCERROR
|
||||
#undef WSAGETSELECTEVENT
|
||||
#undef WSAGETSELECTERROR
|
||||
|
225
win32/include/winapi/psdk_inc/_wsa_errnos.h
Normal file
225
win32/include/winapi/psdk_inc/_wsa_errnos.h
Normal file
@ -0,0 +1,225 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef WSABASEERR
|
||||
|
||||
#define WSABASEERR 10000
|
||||
|
||||
#define WSAEINTR (WSABASEERR + 4 )
|
||||
#define WSAEBADF (WSABASEERR + 9 )
|
||||
#define WSAEACCES (WSABASEERR + 13 )
|
||||
#define WSAEFAULT (WSABASEERR + 14 )
|
||||
#define WSAEINVAL (WSABASEERR + 22 )
|
||||
#define WSAEMFILE (WSABASEERR + 24 )
|
||||
|
||||
#define WSAEWOULDBLOCK (WSABASEERR + 35 )
|
||||
#define WSAEINPROGRESS (WSABASEERR + 36 )
|
||||
#define WSAEALREADY (WSABASEERR + 37 )
|
||||
#define WSAENOTSOCK (WSABASEERR + 38 )
|
||||
#define WSAEDESTADDRREQ (WSABASEERR + 39 )
|
||||
#define WSAEMSGSIZE (WSABASEERR + 40 )
|
||||
#define WSAEPROTOTYPE (WSABASEERR + 41 )
|
||||
#define WSAENOPROTOOPT (WSABASEERR + 42 )
|
||||
#define WSAEPROTONOSUPPORT (WSABASEERR + 43 )
|
||||
#define WSAESOCKTNOSUPPORT (WSABASEERR + 44 )
|
||||
#define WSAEOPNOTSUPP (WSABASEERR + 45 )
|
||||
#define WSAEPFNOSUPPORT (WSABASEERR + 46 )
|
||||
#define WSAEAFNOSUPPORT (WSABASEERR + 47 )
|
||||
#define WSAEADDRINUSE (WSABASEERR + 48 )
|
||||
#define WSAEADDRNOTAVAIL (WSABASEERR + 49 )
|
||||
#define WSAENETDOWN (WSABASEERR + 50 )
|
||||
#define WSAENETUNREACH (WSABASEERR + 51 )
|
||||
#define WSAENETRESET (WSABASEERR + 52 )
|
||||
#define WSAECONNABORTED (WSABASEERR + 53 )
|
||||
#define WSAECONNRESET (WSABASEERR + 54 )
|
||||
#define WSAENOBUFS (WSABASEERR + 55 )
|
||||
#define WSAEISCONN (WSABASEERR + 56 )
|
||||
#define WSAENOTCONN (WSABASEERR + 57 )
|
||||
#define WSAESHUTDOWN (WSABASEERR + 58 )
|
||||
#define WSAETOOMANYREFS (WSABASEERR + 59 )
|
||||
#define WSAETIMEDOUT (WSABASEERR + 60 )
|
||||
#define WSAECONNREFUSED (WSABASEERR + 61 )
|
||||
#define WSAELOOP (WSABASEERR + 62 )
|
||||
#define WSAENAMETOOLONG (WSABASEERR + 63 )
|
||||
#define WSAEHOSTDOWN (WSABASEERR + 64 )
|
||||
#define WSAEHOSTUNREACH (WSABASEERR + 65 )
|
||||
#define WSAENOTEMPTY (WSABASEERR + 66 )
|
||||
#define WSAEPROCLIM (WSABASEERR + 67 )
|
||||
#define WSAEUSERS (WSABASEERR + 68 )
|
||||
#define WSAEDQUOT (WSABASEERR + 69 )
|
||||
#define WSAESTALE (WSABASEERR + 70 )
|
||||
#define WSAEREMOTE (WSABASEERR + 71 )
|
||||
|
||||
#define WSASYSNOTREADY (WSABASEERR + 91 )
|
||||
#define WSAVERNOTSUPPORTED (WSABASEERR + 92 )
|
||||
#define WSANOTINITIALISED (WSABASEERR + 93 )
|
||||
|
||||
#define WSAEDISCON (WSABASEERR + 101 )
|
||||
|
||||
#ifndef WSAHOST_NOT_FOUND
|
||||
#define WSAHOST_NOT_FOUND (WSABASEERR + 1001)
|
||||
#endif
|
||||
#ifndef WSATRY_AGAIN
|
||||
#define WSATRY_AGAIN (WSABASEERR + 1002)
|
||||
#endif
|
||||
#ifndef WSANO_RECOVERY
|
||||
#define WSANO_RECOVERY (WSABASEERR + 1003)
|
||||
#endif
|
||||
#ifndef WSANO_DATA
|
||||
#define WSANO_DATA (WSABASEERR + 1004)
|
||||
#endif
|
||||
|
||||
#endif /* WSABASEERR */
|
||||
|
||||
#ifdef _WINSOCK2API_
|
||||
|
||||
#ifndef WSAENOMORE
|
||||
#define WSAENOMORE (WSABASEERR + 102)
|
||||
#endif
|
||||
#ifndef WSAECANCELLED
|
||||
#define WSAECANCELLED (WSABASEERR + 103)
|
||||
#endif
|
||||
#ifndef WSAEINVALIDPROCTABLE
|
||||
#define WSAEINVALIDPROCTABLE (WSABASEERR + 104)
|
||||
#endif
|
||||
#ifndef WSAEINVALIDPROVIDER
|
||||
#define WSAEINVALIDPROVIDER (WSABASEERR + 105)
|
||||
#endif
|
||||
#ifndef WSAEPROVIDERFAILEDINIT
|
||||
#define WSAEPROVIDERFAILEDINIT (WSABASEERR + 106)
|
||||
#endif
|
||||
#ifndef WSASYSCALLFAILURE
|
||||
#define WSASYSCALLFAILURE (WSABASEERR + 107)
|
||||
#endif
|
||||
#ifndef WSASERVICE_NOT_FOUND
|
||||
#define WSASERVICE_NOT_FOUND (WSABASEERR + 108)
|
||||
#endif
|
||||
#ifndef WSATYPE_NOT_FOUND
|
||||
#define WSATYPE_NOT_FOUND (WSABASEERR + 109)
|
||||
#endif
|
||||
#ifndef WSA_E_NO_MORE
|
||||
#define WSA_E_NO_MORE (WSABASEERR + 110)
|
||||
#endif
|
||||
#ifndef WSA_E_CANCELLED
|
||||
#define WSA_E_CANCELLED (WSABASEERR + 111)
|
||||
#endif
|
||||
#ifndef WSAEREFUSED
|
||||
#define WSAEREFUSED (WSABASEERR + 112)
|
||||
#endif
|
||||
#ifndef WSA_QOS_RECEIVERS
|
||||
#define WSA_QOS_RECEIVERS (WSABASEERR + 1005)
|
||||
#endif
|
||||
#ifndef WSA_QOS_SENDERS
|
||||
#define WSA_QOS_SENDERS (WSABASEERR + 1006)
|
||||
#endif
|
||||
#ifndef WSA_QOS_NO_SENDERS
|
||||
#define WSA_QOS_NO_SENDERS (WSABASEERR + 1007)
|
||||
#define WSA_QOS_NO_RECEIVERS (WSABASEERR + 1008)
|
||||
#define WSA_QOS_REQUEST_CONFIRMED (WSABASEERR + 1009)
|
||||
#define WSA_QOS_ADMISSION_FAILURE (WSABASEERR + 1010)
|
||||
#define WSA_QOS_POLICY_FAILURE (WSABASEERR + 1011)
|
||||
#define WSA_QOS_BAD_STYLE (WSABASEERR + 1012)
|
||||
#define WSA_QOS_BAD_OBJECT (WSABASEERR + 1013)
|
||||
#define WSA_QOS_TRAFFIC_CTRL_ERROR (WSABASEERR + 1014)
|
||||
#define WSA_QOS_GENERIC_ERROR (WSABASEERR + 1015)
|
||||
#define WSA_QOS_ESERVICETYPE (WSABASEERR + 1016)
|
||||
#define WSA_QOS_EFLOWSPEC (WSABASEERR + 1017)
|
||||
#define WSA_QOS_EPROVSPECBUF (WSABASEERR + 1018)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EFILTERSTYLE
|
||||
#define WSA_QOS_EFILTERSTYLE (WSABASEERR + 1019)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EFILTERTYPE
|
||||
#define WSA_QOS_EFILTERTYPE (WSABASEERR + 1020)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EFILTERCOUNT
|
||||
#define WSA_QOS_EFILTERCOUNT (WSABASEERR + 1021)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EOBJLENGTH
|
||||
#define WSA_QOS_EOBJLENGTH (WSABASEERR + 1022)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EFLOWCOUNT
|
||||
#define WSA_QOS_EFLOWCOUNT (WSABASEERR + 1023)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EUNKNOWNPSOBJ
|
||||
#define WSA_QOS_EUNKNOWNPSOBJ (WSABASEERR + 1024)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EPOLICYOBJ
|
||||
#define WSA_QOS_EPOLICYOBJ (WSABASEERR + 1025)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EFLOWDESC
|
||||
#define WSA_QOS_EFLOWDESC (WSABASEERR + 1026)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EPSFLOWSPEC
|
||||
#define WSA_QOS_EPSFLOWSPEC (WSABASEERR + 1027)
|
||||
#endif
|
||||
#ifndef WSA_QOS_EPSFILTERSPEC
|
||||
#define WSA_QOS_EPSFILTERSPEC (WSABASEERR + 1028)
|
||||
#endif
|
||||
#ifndef WSA_QOS_ESDMODEOBJ
|
||||
#define WSA_QOS_ESDMODEOBJ (WSABASEERR + 1029)
|
||||
#endif
|
||||
#ifndef WSA_QOS_ESHAPERATEOBJ
|
||||
#define WSA_QOS_ESHAPERATEOBJ (WSABASEERR + 1030)
|
||||
#endif
|
||||
#ifndef WSA_QOS_RESERVED_PETYPE
|
||||
#define WSA_QOS_RESERVED_PETYPE (WSABASEERR + 1031)
|
||||
#endif
|
||||
|
||||
#endif /* _WINSOCK2API_ */
|
||||
|
||||
#ifndef __WSA_ERR_MACROS_DEFINED
|
||||
#define __WSA_ERR_MACROS_DEFINED
|
||||
#define h_errno WSAGetLastError()
|
||||
#define HOST_NOT_FOUND WSAHOST_NOT_FOUND
|
||||
#define TRY_AGAIN WSATRY_AGAIN
|
||||
#define NO_RECOVERY WSANO_RECOVERY
|
||||
#define NO_DATA WSANO_DATA
|
||||
|
||||
#define WSANO_ADDRESS WSANO_DATA
|
||||
#define NO_ADDRESS WSANO_ADDRESS
|
||||
#endif /* __WSA_ERR_MACROS_DEFINED */
|
||||
|
||||
#if 0
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EALREADY WSAEALREADY
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
#define EDESTADDRREQ WSAEDESTADDRREQ
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define EPROTOTYPE WSAEPROTOTYPE
|
||||
#define ENOPROTOOPT WSAENOPROTOOPT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||
#define EOPNOTSUPP WSAEOPNOTSUPP
|
||||
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
#define ENETDOWN WSAENETDOWN
|
||||
#define ENETUNREACH WSAENETUNREACH
|
||||
#define ENETRESET WSAENETRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#define EISCONN WSAEISCONN
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
#define ETOOMANYREFS WSAETOOMANYREFS
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define ELOOP WSAELOOP
|
||||
#define ENAMETOOLONG WSAENAMETOOLONG
|
||||
#define EHOSTDOWN WSAEHOSTDOWN
|
||||
#define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#define ENOTEMPTY WSAENOTEMPTY
|
||||
#define EPROCLIM WSAEPROCLIM
|
||||
#define EUSERS WSAEUSERS
|
||||
#define EDQUOT WSAEDQUOT
|
||||
#define ESTALE WSAESTALE
|
||||
#define EREMOTE WSAEREMOTE
|
||||
#endif /* #if 0 */
|
||||
|
32
win32/include/winapi/psdk_inc/_wsadata.h
Normal file
32
win32/include/winapi/psdk_inc/_wsadata.h
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef __MINGW_WSADATA_H
|
||||
#define __MINGW_WSADATA_H
|
||||
|
||||
#define WSADESCRIPTION_LEN 256
|
||||
#define WSASYS_STATUS_LEN 128
|
||||
|
||||
typedef struct WSAData {
|
||||
WORD wVersion;
|
||||
WORD wHighVersion;
|
||||
#ifdef _WIN64
|
||||
unsigned short iMaxSockets;
|
||||
unsigned short iMaxUdpDg;
|
||||
char *lpVendorInfo;
|
||||
char szDescription[WSADESCRIPTION_LEN+1];
|
||||
char szSystemStatus[WSASYS_STATUS_LEN+1];
|
||||
#else
|
||||
char szDescription[WSADESCRIPTION_LEN+1];
|
||||
char szSystemStatus[WSASYS_STATUS_LEN+1];
|
||||
unsigned short iMaxSockets;
|
||||
unsigned short iMaxUdpDg;
|
||||
char *lpVendorInfo;
|
||||
#endif
|
||||
} WSADATA, *LPWSADATA;
|
||||
|
||||
#endif /* __MINGW_WSADATA_H */
|
||||
|
72
win32/include/winapi/qos.h
Normal file
72
win32/include/winapi/qos.h
Normal file
@ -0,0 +1,72 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef __QOS_H_
|
||||
#define __QOS_H_
|
||||
|
||||
typedef ULONG SERVICETYPE;
|
||||
|
||||
#define SERVICETYPE_NOTRAFFIC 0x00000000
|
||||
#define SERVICETYPE_BESTEFFORT 0x00000001
|
||||
#define SERVICETYPE_CONTROLLEDLOAD 0x00000002
|
||||
#define SERVICETYPE_GUARANTEED 0x00000003
|
||||
|
||||
#define SERVICETYPE_NETWORK_UNAVAILABLE 0x00000004
|
||||
#define SERVICETYPE_GENERAL_INFORMATION 0x00000005
|
||||
#define SERVICETYPE_NOCHANGE 0x00000006
|
||||
#define SERVICETYPE_NONCONFORMING 0x00000009
|
||||
#define SERVICETYPE_NETWORK_CONTROL 0x0000000A
|
||||
#define SERVICETYPE_QUALITATIVE 0x0000000D
|
||||
|
||||
#define SERVICE_BESTEFFORT 0x80010000
|
||||
#define SERVICE_CONTROLLEDLOAD 0x80020000
|
||||
#define SERVICE_GUARANTEED 0x80040000
|
||||
#define SERVICE_QUALITATIVE 0x80200000
|
||||
|
||||
#define SERVICE_NO_TRAFFIC_CONTROL 0x81000000
|
||||
|
||||
#define SERVICE_NO_QOS_SIGNALING 0x40000000
|
||||
|
||||
typedef struct _flowspec {
|
||||
ULONG TokenRate;
|
||||
ULONG TokenBucketSize;
|
||||
ULONG PeakBandwidth;
|
||||
ULONG Latency;
|
||||
ULONG DelayVariation;
|
||||
SERVICETYPE ServiceType;
|
||||
ULONG MaxSduSize;
|
||||
ULONG MinimumPolicedSize;
|
||||
} FLOWSPEC,*PFLOWSPEC,*LPFLOWSPEC;
|
||||
|
||||
#define QOS_NOT_SPECIFIED 0xFFFFFFFF
|
||||
#define POSITIVE_INFINITY_RATE 0xFFFFFFFE
|
||||
|
||||
typedef struct _QOS_OBJECT_HDR {
|
||||
ULONG ObjectType;
|
||||
ULONG ObjectLength;
|
||||
} QOS_OBJECT_HDR, *LPQOS_OBJECT_HDR;
|
||||
|
||||
#define QOS_GENERAL_ID_BASE 2000
|
||||
#define QOS_OBJECT_END_OF_LIST (0x00000001 + QOS_GENERAL_ID_BASE)
|
||||
#define QOS_OBJECT_SD_MODE (0x00000002 + QOS_GENERAL_ID_BASE)
|
||||
#define QOS_OBJECT_SHAPING_RATE (0x00000003 + QOS_GENERAL_ID_BASE)
|
||||
#define QOS_OBJECT_DESTADDR (0x00000004 + QOS_GENERAL_ID_BASE)
|
||||
|
||||
typedef struct _QOS_SD_MODE {
|
||||
QOS_OBJECT_HDR ObjectHdr;
|
||||
ULONG ShapeDiscardMode;
|
||||
} QOS_SD_MODE, *LPQOS_SD_MODE;
|
||||
|
||||
#define TC_NONCONF_BORROW 0
|
||||
#define TC_NONCONF_SHAPE 1
|
||||
#define TC_NONCONF_DISCARD 2
|
||||
#define TC_NONCONF_BORROW_PLUS 3
|
||||
|
||||
typedef struct _QOS_SHAPING_RATE {
|
||||
QOS_OBJECT_HDR ObjectHdr;
|
||||
ULONG ShapingRate;
|
||||
} QOS_SHAPING_RATE, *LPQOS_SHAPING_RATE;
|
||||
|
||||
#endif
|
1253
win32/include/winapi/winsock2.h
Normal file
1253
win32/include/winapi/winsock2.h
Normal file
File diff suppressed because it is too large
Load Diff
39
win32/include/winapi/ws2def.h
Normal file
39
win32/include/winapi/ws2def.h
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef _WS2DEF_
|
||||
#define _WS2DEF_
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
/* FIXME FIXME FIXME FIXME FIXME: Much more data need moving here.
|
||||
* This holds only SCOPE_LEVEL and SCOPE_ID so that compilations
|
||||
* do not fail.
|
||||
*/
|
||||
|
||||
typedef enum _SCOPE_LEVEL {
|
||||
ScopeLevelInterface = 1,
|
||||
ScopeLevelLink = 2,
|
||||
ScopeLevelSubnet = 3,
|
||||
ScopeLevelAdmin = 4,
|
||||
ScopeLevelSite = 5,
|
||||
ScopeLevelOrganization = 8,
|
||||
ScopeLevelGlobal = 14,
|
||||
ScopeLevelCount = 16
|
||||
} SCOPE_LEVEL;
|
||||
|
||||
typedef struct _SCOPE_ID {
|
||||
__C89_NAMELESS union {
|
||||
__C89_NAMELESS struct {
|
||||
ULONG Zone : 28;
|
||||
ULONG Level : 4;
|
||||
};
|
||||
ULONG Value;
|
||||
};
|
||||
} SCOPE_ID, *PSCOPE_ID;
|
||||
|
||||
#endif /* _WS2DEF_ */
|
||||
|
94
win32/include/winapi/ws2ipdef.h
Normal file
94
win32/include/winapi/ws2ipdef.h
Normal file
@ -0,0 +1,94 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef _INC_WS2IPDEF
|
||||
#define _INC_WS2IPDEF
|
||||
|
||||
#include <in6addr.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct ipv6_mreq {
|
||||
struct in6_addr ipv6mr_multiaddr;
|
||||
unsigned int ipv6mr_interface;
|
||||
} IPV6_MREQ;
|
||||
|
||||
struct sockaddr_in6_old {
|
||||
short sin6_family;
|
||||
u_short sin6_port;
|
||||
u_long sin6_flowinfo;
|
||||
struct in6_addr sin6_addr;
|
||||
};
|
||||
|
||||
typedef union sockaddr_gen {
|
||||
struct sockaddr Address;
|
||||
struct sockaddr_in AddressIn;
|
||||
struct sockaddr_in6_old AddressIn6;
|
||||
} sockaddr_gen;
|
||||
|
||||
struct sockaddr_in6 {
|
||||
short sin6_family;
|
||||
u_short sin6_port;
|
||||
u_long sin6_flowinfo;
|
||||
struct in6_addr sin6_addr;
|
||||
__C89_NAMELESS union {
|
||||
u_long sin6_scope_id;
|
||||
SCOPE_ID sin6_scope_struct;
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct sockaddr_in6 SOCKADDR_IN6;
|
||||
typedef struct sockaddr_in6 *PSOCKADDR_IN6;
|
||||
typedef struct sockaddr_in6 *LPSOCKADDR_IN6;
|
||||
|
||||
typedef struct _INTERFACE_INFO {
|
||||
u_long iiFlags;
|
||||
sockaddr_gen iiAddress;
|
||||
sockaddr_gen iiBroadcastAddress;
|
||||
sockaddr_gen iiNetmask;
|
||||
} INTERFACE_INFO,*LPINTERFACE_INFO;
|
||||
|
||||
typedef enum _MULTICAST_MODE_TYPE {
|
||||
MCAST_INCLUDE = 0,
|
||||
MCAST_EXCLUDE
|
||||
} MULTICAST_MODE_TYPE;
|
||||
|
||||
typedef struct _sockaddr_in6_pair {
|
||||
PSOCKADDR_IN6 SourceAddress;
|
||||
PSOCKADDR_IN6 DestinationAddress;
|
||||
} SOCKADDR_IN6_PAIR, *PSOCKADDR_IN6_PAIR;
|
||||
|
||||
typedef union _SOCKADDR_INET {
|
||||
SOCKADDR_IN Ipv4;
|
||||
SOCKADDR_IN6 Ipv6;
|
||||
ADDRESS_FAMILY si_family;
|
||||
} SOCKADDR_INET, *PSOCKADDR_INET;
|
||||
|
||||
typedef struct group_filter {
|
||||
ULONG gf_interface;
|
||||
SOCKADDR_STORAGE gf_group;
|
||||
MULTICAST_MODE_TYPE gf_fmode;
|
||||
ULONG gf_numsrc;
|
||||
SOCKADDR_STORAGE gf_slist[1];
|
||||
} GROUP_FILTER, *PGROUP_FILTER;
|
||||
|
||||
typedef struct group_req {
|
||||
ULONG gr_interface;
|
||||
SOCKADDR_STORAGE gr_group;
|
||||
} GROUP_REQ, *PGROUP_REQ;
|
||||
|
||||
typedef struct group_source_req {
|
||||
ULONG gsr_interface;
|
||||
SOCKADDR_STORAGE gsr_group;
|
||||
SOCKADDR_STORAGE gsr_source;
|
||||
} GROUP_SOURCE_REQ, *PGROUP_SOURCE_REQ;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_INC_WS2IPDEF*/
|
437
win32/include/winapi/ws2tcpip.h
Normal file
437
win32/include/winapi/ws2tcpip.h
Normal file
@ -0,0 +1,437 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef _WS2TCPIP_H_
|
||||
#define _WS2TCPIP_H_
|
||||
|
||||
#include <_mingw_unicode.h>
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <psdk_inc/_ip_mreq1.h>
|
||||
|
||||
struct ip_mreq_source {
|
||||
struct in_addr imr_multiaddr;
|
||||
struct in_addr imr_sourceaddr;
|
||||
struct in_addr imr_interface;
|
||||
};
|
||||
|
||||
struct ip_msfilter {
|
||||
struct in_addr imsf_multiaddr;
|
||||
struct in_addr imsf_interface;
|
||||
u_long imsf_fmode;
|
||||
u_long imsf_numsrc;
|
||||
struct in_addr imsf_slist[1];
|
||||
};
|
||||
|
||||
#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter)-sizeof(struct in_addr) + (numsrc)*sizeof(struct in_addr))
|
||||
|
||||
#define SIO_GET_INTERFACE_LIST _IOR('t',127,u_long)
|
||||
|
||||
#define SIO_GET_INTERFACE_LIST_EX _IOR('t',126,u_long)
|
||||
#define SIO_SET_MULTICAST_FILTER _IOW('t',125,u_long)
|
||||
#define SIO_GET_MULTICAST_FILTER _IOW('t',124 | IOC_IN,u_long)
|
||||
|
||||
#define IP_OPTIONS 1
|
||||
#define IP_HDRINCL 2
|
||||
#define IP_TOS 3
|
||||
#define IP_TTL 4
|
||||
#define IP_MULTICAST_IF 9
|
||||
#define IP_MULTICAST_TTL 10
|
||||
#define IP_MULTICAST_LOOP 11
|
||||
#define IP_ADD_MEMBERSHIP 12
|
||||
#define IP_DROP_MEMBERSHIP 13
|
||||
#define IP_DONTFRAGMENT 14
|
||||
#define IP_ADD_SOURCE_MEMBERSHIP 15
|
||||
#define IP_DROP_SOURCE_MEMBERSHIP 16
|
||||
#define IP_BLOCK_SOURCE 17
|
||||
#define IP_UNBLOCK_SOURCE 18
|
||||
#define IP_PKTINFO 19
|
||||
#define IP_RECEIVE_BROADCAST 22
|
||||
|
||||
#define IPV6_HDRINCL 2
|
||||
#define IPV6_UNICAST_HOPS 4
|
||||
#define IPV6_MULTICAST_IF 9
|
||||
#define IPV6_MULTICAST_HOPS 10
|
||||
#define IPV6_MULTICAST_LOOP 11
|
||||
#define IPV6_ADD_MEMBERSHIP 12
|
||||
#define IPV6_DROP_MEMBERSHIP 13
|
||||
#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
|
||||
#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
|
||||
#define IPV6_PKTINFO 19
|
||||
#define IPV6_HOPLIMIT 21
|
||||
#define IPV6_PROTECTION_LEVEL 23
|
||||
|
||||
#define PROTECTION_LEVEL_UNRESTRICTED 10
|
||||
#define PROTECTION_LEVEL_DEFAULT 20
|
||||
#define PROTECTION_LEVEL_RESTRICTED 30
|
||||
|
||||
#define UDP_NOCHECKSUM 1
|
||||
#define UDP_CHECKSUM_COVERAGE 20
|
||||
|
||||
#define TCP_EXPEDITED_1122 0x0002
|
||||
|
||||
|
||||
#include <ws2ipdef.h>
|
||||
|
||||
|
||||
#define SS_PORT(ssp) (((struct sockaddr_in*)(ssp))->sin_port)
|
||||
|
||||
#define IN6ADDR_ANY_INIT { 0 }
|
||||
#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const struct in6_addr in6addr_any;
|
||||
extern const struct in6_addr in6addr_loopback;
|
||||
|
||||
#define WS2TCPIP_INLINE __CRT_INLINE
|
||||
|
||||
int IN6_ADDR_EQUAL(const struct in6_addr *,const struct in6_addr *);
|
||||
int IN6_IS_ADDR_UNSPECIFIED(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_LOOPBACK(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_MULTICAST(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_LINKLOCAL(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_SITELOCAL(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_V4MAPPED(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_V4COMPAT(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_MC_ORGLOCAL(const struct in6_addr *);
|
||||
int IN6_IS_ADDR_MC_GLOBAL(const struct in6_addr *);
|
||||
int IN6ADDR_ISANY(const struct sockaddr_in6 *);
|
||||
int IN6ADDR_ISLOOPBACK(const struct sockaddr_in6 *);
|
||||
void IN6_SET_ADDR_UNSPECIFIED(struct in6_addr *);
|
||||
void IN6_SET_ADDR_LOOPBACK(struct in6_addr *);
|
||||
void IN6ADDR_SETANY(struct sockaddr_in6 *);
|
||||
void IN6ADDR_SETLOOPBACK(struct sockaddr_in6 *);
|
||||
|
||||
#ifndef __CRT__NO_INLINE
|
||||
WS2TCPIP_INLINE int IN6_ADDR_EQUAL(const struct in6_addr *a,const struct in6_addr *b) { return (memcmp(a,b,sizeof(struct in6_addr))==0); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_UNSPECIFIED(const struct in6_addr *a) { return ((a->s6_words[0]==0) && (a->s6_words[1]==0) && (a->s6_words[2]==0) && (a->s6_words[3]==0) && (a->s6_words[4]==0) && (a->s6_words[5]==0) && (a->s6_words[6]==0) && (a->s6_words[7]==0)); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_LOOPBACK(const struct in6_addr *a) { return ((a->s6_words[0]==0) && (a->s6_words[1]==0) && (a->s6_words[2]==0) && (a->s6_words[3]==0) && (a->s6_words[4]==0) && (a->s6_words[5]==0) && (a->s6_words[6]==0) && (a->s6_words[7]==0x0100)); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_MULTICAST(const struct in6_addr *a) { return (a->s6_bytes[0]==0xff); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_LINKLOCAL(const struct in6_addr *a) { return ((a->s6_bytes[0]==0xfe) && ((a->s6_bytes[1] & 0xc0)==0x80)); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_SITELOCAL(const struct in6_addr *a) { return ((a->s6_bytes[0]==0xfe) && ((a->s6_bytes[1] & 0xc0)==0xc0)); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_V4MAPPED(const struct in6_addr *a) { return ((a->s6_words[0]==0) && (a->s6_words[1]==0) && (a->s6_words[2]==0) && (a->s6_words[3]==0) && (a->s6_words[4]==0) && (a->s6_words[5]==0xffff)); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_V4COMPAT(const struct in6_addr *a) { return ((a->s6_words[0]==0) && (a->s6_words[1]==0) && (a->s6_words[2]==0) && (a->s6_words[3]==0) && (a->s6_words[4]==0) && (a->s6_words[5]==0) && !((a->s6_words[6]==0) && (a->s6_addr[14]==0) && ((a->s6_addr[15]==0) || (a->s6_addr[15]==1)))); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *a) { return IN6_IS_ADDR_MULTICAST(a) && ((a->s6_bytes[1] & 0xf)==1); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *a) { return IN6_IS_ADDR_MULTICAST(a) && ((a->s6_bytes[1] & 0xf)==2); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *a) { return IN6_IS_ADDR_MULTICAST(a) && ((a->s6_bytes[1] & 0xf)==5); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_MC_ORGLOCAL(const struct in6_addr *a) { return IN6_IS_ADDR_MULTICAST(a) && ((a->s6_bytes[1] & 0xf)==8); }
|
||||
WS2TCPIP_INLINE int IN6_IS_ADDR_MC_GLOBAL(const struct in6_addr *a) { return IN6_IS_ADDR_MULTICAST(a) && ((a->s6_bytes[1] & 0xf)==0xe); }
|
||||
WS2TCPIP_INLINE int IN6ADDR_ISANY(const struct sockaddr_in6 *a) { return ((a->sin6_family==AF_INET6) && IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr)); }
|
||||
WS2TCPIP_INLINE int IN6ADDR_ISLOOPBACK(const struct sockaddr_in6 *a) { return ((a->sin6_family==AF_INET6) && IN6_IS_ADDR_LOOPBACK(&a->sin6_addr)); }
|
||||
WS2TCPIP_INLINE void IN6_SET_ADDR_UNSPECIFIED(struct in6_addr *a) { memset(a->s6_bytes,0,sizeof(struct in6_addr)); }
|
||||
WS2TCPIP_INLINE void IN6_SET_ADDR_LOOPBACK(struct in6_addr *a) {
|
||||
memset(a->s6_bytes,0,sizeof(struct in6_addr));
|
||||
a->s6_bytes[15] = 1;
|
||||
}
|
||||
WS2TCPIP_INLINE void IN6ADDR_SETANY(struct sockaddr_in6 *a) {
|
||||
a->sin6_family = AF_INET6;
|
||||
a->sin6_port = 0;
|
||||
a->sin6_flowinfo = 0;
|
||||
IN6_SET_ADDR_UNSPECIFIED(&a->sin6_addr);
|
||||
a->sin6_scope_id = 0;
|
||||
}
|
||||
WS2TCPIP_INLINE void IN6ADDR_SETLOOPBACK(struct sockaddr_in6 *a) {
|
||||
a->sin6_family = AF_INET6;
|
||||
a->sin6_port = 0;
|
||||
a->sin6_flowinfo = 0;
|
||||
IN6_SET_ADDR_LOOPBACK(&a->sin6_addr);
|
||||
a->sin6_scope_id = 0;
|
||||
}
|
||||
#endif /* !__CRT__NO_INLINE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct _INTERFACE_INFO_EX {
|
||||
u_long iiFlags;
|
||||
SOCKET_ADDRESS iiAddress;
|
||||
SOCKET_ADDRESS iiBroadcastAddress;
|
||||
SOCKET_ADDRESS iiNetmask;
|
||||
} INTERFACE_INFO_EX,*LPINTERFACE_INFO_EX;
|
||||
|
||||
#define IFF_UP 0x00000001
|
||||
#define IFF_BROADCAST 0x00000002
|
||||
#define IFF_LOOPBACK 0x00000004
|
||||
#define IFF_POINTTOPOINT 0x00000008
|
||||
#define IFF_MULTICAST 0x00000010
|
||||
|
||||
typedef struct in_pktinfo {
|
||||
IN_ADDR ipi_addr;
|
||||
UINT ipi_ifindex;
|
||||
} IN_PKTINFO;
|
||||
|
||||
C_ASSERT(sizeof(IN_PKTINFO)==8);
|
||||
|
||||
typedef struct in6_pktinfo {
|
||||
IN6_ADDR ipi6_addr;
|
||||
UINT ipi6_ifindex;
|
||||
} IN6_PKTINFO;
|
||||
|
||||
C_ASSERT(sizeof(IN6_PKTINFO)==20);
|
||||
|
||||
#define EAI_AGAIN WSATRY_AGAIN
|
||||
#define EAI_BADFLAGS WSAEINVAL
|
||||
#define EAI_FAIL WSANO_RECOVERY
|
||||
#define EAI_FAMILY WSAEAFNOSUPPORT
|
||||
#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
|
||||
|
||||
#define EAI_NONAME WSAHOST_NOT_FOUND
|
||||
#define EAI_SERVICE WSATYPE_NOT_FOUND
|
||||
#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
|
||||
|
||||
#define EAI_NODATA EAI_NONAME
|
||||
|
||||
typedef struct addrinfo {
|
||||
int ai_flags;
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
size_t ai_addrlen;
|
||||
char *ai_canonname;
|
||||
struct sockaddr *ai_addr;
|
||||
struct addrinfo *ai_next;
|
||||
} ADDRINFOA,*PADDRINFOA;
|
||||
|
||||
typedef struct addrinfoW {
|
||||
int ai_flags;
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
size_t ai_addrlen;
|
||||
PWSTR ai_canonname;
|
||||
struct sockaddr *ai_addr;
|
||||
struct addrinfoW *ai_next;
|
||||
} ADDRINFOW,*PADDRINFOW;
|
||||
|
||||
typedef __MINGW_NAME_AW(ADDRINFO) ADDRINFOT,*PADDRINFOT;
|
||||
|
||||
typedef ADDRINFOA ADDRINFO,*LPADDRINFO;
|
||||
|
||||
#define AI_PASSIVE 0x1
|
||||
#define AI_CANONNAME 0x2
|
||||
#define AI_NUMERICHOST 0x4
|
||||
#if (_WIN32_WINNT >= 0x0600)
|
||||
#define AI_ADDRCONFIG 0x0400
|
||||
#define AI_NON_AUTHORITATIVE 0x04000
|
||||
#define AI_SECURE 0x08000
|
||||
#define AI_RETURN_PREFERRED_NAMES 0x010000
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GetAddrInfo __MINGW_NAME_AW(GetAddrInfo)
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI getaddrinfo(const char *nodename,const char *servname,const struct addrinfo *hints,struct addrinfo **res);
|
||||
WINSOCK_API_LINKAGE int WSAAPI GetAddrInfoW(PCWSTR pNodeName,PCWSTR pServiceName,const ADDRINFOW *pHints,PADDRINFOW *ppResult);
|
||||
|
||||
#define GetAddrInfoA getaddrinfo
|
||||
|
||||
#if INCL_WINSOCK_API_TYPEDEFS
|
||||
typedef int (WSAAPI *LPFN_GETADDRINFO)(const char *nodename,const char *servname,const struct addrinfo *hints,struct addrinfo **res);
|
||||
typedef int (WSAAPI *LPFN_GETADDRINFOW)(PCWSTR pNodeName,PCWSTR pServiceName,const ADDRINFOW *pHints,PADDRINFOW *ppResult);
|
||||
|
||||
#define LPFN_GETADDRINFOA LPFN_GETADDRINFO
|
||||
|
||||
#define LPFN_GETADDRINFOT __MINGW_NAME_AW(LPFN_GETADDRINFO)
|
||||
#endif
|
||||
|
||||
#define FreeAddrInfo __MINGW_NAME_AW(FreeAddrInfo)
|
||||
|
||||
WINSOCK_API_LINKAGE void WSAAPI freeaddrinfo(LPADDRINFO pAddrInfo);
|
||||
WINSOCK_API_LINKAGE void WSAAPI FreeAddrInfoW(PADDRINFOW pAddrInfo);
|
||||
|
||||
#define FreeAddrInfoA freeaddrinfo
|
||||
|
||||
#if INCL_WINSOCK_API_TYPEDEFS
|
||||
typedef void (WSAAPI *LPFN_FREEADDRINFO)(struct addrinfo *ai);
|
||||
typedef void (WSAAPI *LPFN_FREEADDRINFOW)(PADDRINFOW pAddrInfo);
|
||||
|
||||
#define LPFN_FREEADDRINFOA LPFN_FREEADDRINFO
|
||||
|
||||
#define LPFN_FREEADDRINFOT __MINGW_NAME_AW(LPFN_FREEADDRINFO)
|
||||
#endif
|
||||
|
||||
typedef int socklen_t;
|
||||
|
||||
#define GetNameInfo __MINGW_NAME_AW(GetNameInfo)
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI getnameinfo(const struct sockaddr *sa,socklen_t salen,char *host,DWORD hostlen,char *serv,DWORD servlen,int flags);
|
||||
WINSOCK_API_LINKAGE INT WSAAPI GetNameInfoW(const SOCKADDR *pSockaddr,socklen_t SockaddrLength,PWCHAR pNodeBuffer,DWORD NodeBufferSize,PWCHAR pServiceBuffer,DWORD ServiceBufferSize,INT Flags);
|
||||
|
||||
#define GetNameInfoA getnameinfo
|
||||
|
||||
#if INCL_WINSOCK_API_TYPEDEFS
|
||||
typedef int (WSAAPI *LPFN_GETNAMEINFO)(const struct sockaddr *sa,socklen_t salen,char *host,DWORD hostlen,char *serv,DWORD servlen,int flags);
|
||||
typedef INT (WSAAPI *LPFN_GETNAMEINFOW)(const SOCKADDR *pSockaddr,socklen_t SockaddrLength,PWCHAR pNodeBuffer,DWORD NodeBufferSize,PWCHAR pServiceBuffer,DWORD ServiceBufferSize,INT Flags);
|
||||
|
||||
#define LPFN_GETNAMEINFOA LPFN_GETNAMEINFO
|
||||
|
||||
#define LPFN_GETNAMEINFOT __MINGW_NAME_AW(LPFN_GETNAMEINFO)
|
||||
#endif
|
||||
|
||||
#define gai_strerror __MINGW_NAME_AW(gai_strerror)
|
||||
|
||||
#define GAI_STRERROR_BUFFER_SIZE 1024
|
||||
|
||||
char *gai_strerrorA (int);
|
||||
WCHAR *gai_strerrorW(int);
|
||||
|
||||
#define NI_MAXHOST 1025
|
||||
#define NI_MAXSERV 32
|
||||
|
||||
#define INET_ADDRSTRLEN 22
|
||||
#define INET6_ADDRSTRLEN 65
|
||||
|
||||
#define NI_NOFQDN 0x01
|
||||
#define NI_NUMERICHOST 0x02
|
||||
#define NI_NAMEREQD 0x04
|
||||
#define NI_NUMERICSERV 0x08
|
||||
#define NI_DGRAM 0x10
|
||||
|
||||
#include <mstcpip.h>
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0600)
|
||||
#define addrinfoEx __MINGW_NAME_AW(addrinfoEx)
|
||||
#define PADDRINFOEX __MINGW_NAME_AW(PADDRINFOEX)
|
||||
#define GetAddrInfoEx __MINGW_NAME_AW(GetAddrInfoEx)
|
||||
#define SetAddrInfoEx __MINGW_NAME_AW(SetAddrInfoEx)
|
||||
#define FreeAddrInfoEx __MINGW_NAME_AW(FreeAddrInfoEx)
|
||||
|
||||
typedef struct addrinfoExA {
|
||||
int ai_flags;
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
size_t ai_addrlen;
|
||||
LPCSTR ai_canonname;
|
||||
struct sockaddr *ai_addr;
|
||||
void *ai_blob;
|
||||
size_t ai_bloblen;
|
||||
LPGUID ai_provider;
|
||||
struct addrinfoexA *ai_next;
|
||||
} ADDRINFOEXA, *PADDRINFOEXA;
|
||||
|
||||
typedef struct addrinfoExW {
|
||||
int ai_flags;
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
size_t ai_addrlen;
|
||||
LPCWSTR ai_canonname;
|
||||
struct sockaddr *ai_addr;
|
||||
void *ai_blob;
|
||||
size_t ai_bloblen;
|
||||
LPGUID ai_provider;
|
||||
struct addrinfoexW *ai_next;
|
||||
} ADDRINFOEXW, *PADDRINFOEXW;
|
||||
|
||||
typedef PVOID LPLOOKUPSERVICE_COMPLETION_ROUTINE; /*reserved*/
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI GetAddrInfoExA(PCSTR pName, PCSTR pServiceName, DWORD dwNameSpace,
|
||||
LPGUID lpNspId,const ADDRINFOEXA *pHints,PADDRINFOEXA *ppResult,
|
||||
struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
WINSOCK_API_LINKAGE int WSAAPI GetAddrInfoExW(PCWSTR pName,PCWSTR pServiceName,DWORD dwNameSpace,
|
||||
LPGUID lpNspId,const ADDRINFOEXW *pHints,PADDRINFOEXW *ppResult,
|
||||
struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI SetAddrInfoExA(PCSTR pName, PCSTR pServiceName, SOCKET_ADDRESS *pAddresses,
|
||||
DWORD dwAddressCount,LPBLOB lpBlob,DWORD dwFlags,DWORD dwNameSpace,
|
||||
LPGUID lpNspId,struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
WINSOCK_API_LINKAGE int WSAAPI SetAddrInfoExW(PCWSTR pName,PCWSTR pServiceName,SOCKET_ADDRESS *pAddresses,
|
||||
DWORD dwAddressCount,LPBLOB lpBlob,DWORD dwFlags,DWORD dwNameSpace,
|
||||
LPGUID lpNspId,struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
|
||||
WINSOCK_API_LINKAGE void WSAAPI FreeAddrInfoExA(PADDRINFOEXA pAddrInfo);
|
||||
WINSOCK_API_LINKAGE void WSAAPI FreeAddrInfoExW(PADDRINFOEXW pAddrInfo);
|
||||
|
||||
#if INCL_WINSOCK_API_TYPEDEFS
|
||||
#define LPFN_GETADDRINFOEX __MINGW_NAME_AW(LPFN_GETADDRINFOEX)
|
||||
typedef int (WSAAPI *LPFN_GETADDRINFOEXA)(PCSTR pName, PCSTR pServiceName, DWORD dwNameSpace,
|
||||
LPGUID lpNspId,const ADDRINFOEXA *pHints,PADDRINFOEXA *ppResult,
|
||||
struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
typedef int (WSAAPI *LPFN_GETADDRINFOEXW)(PCWSTR pName,PCWSTR pServiceName,DWORD dwNameSpace,
|
||||
LPGUID lpNspId,const ADDRINFOEXW *pHints,PADDRINFOEXW *ppResult,
|
||||
struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
|
||||
#define LPFN_SETADDRINFOEX __MINGW_NAME_AW(LPFN_SETADDRINFOEX)
|
||||
typedef int (WSAAPI *LPFN_SETADDRINFOEXA)(PCSTR pName, PCSTR pServiceName, SOCKET_ADDRESS *pAddresses,
|
||||
DWORD dwAddressCount,LPBLOB lpBlob,DWORD dwFlags,DWORD dwNameSpace,
|
||||
LPGUID lpNspId,struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
typedef int (WSAAPI *LPFN_SETADDRINFOEXW)(PCWSTR pName,PCWSTR pServiceName,SOCKET_ADDRESS *pAddresses,
|
||||
DWORD dwAddressCount,LPBLOB lpBlob,DWORD dwFlags,DWORD dwNameSpace,
|
||||
LPGUID lpNspId,struct timeval *timeout,LPOVERLAPPED lpOverlapped,
|
||||
LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
|
||||
LPHANDLE lpNameHandle);
|
||||
|
||||
#define LPFN_FREEADDRINFOEX __MINGW_NAME_AW(LPFN_FREEADDRINFOEX)
|
||||
typedef void (WSAAPI *LPFN_FREEADDRINFOEXA)(PADDRINFOEXA pAddrInfo);
|
||||
typedef void (WSAAPI *LPFN_FREEADDRINFOEXW)(PADDRINFOEXW pAddrInfo);
|
||||
#endif /* INCL_WINSOCK_API_TYPEDEFS */
|
||||
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI WSAImpersonateSocketPeer(
|
||||
SOCKET Socket,
|
||||
const struct sockaddr *PeerAddress,
|
||||
ULONG peerAddressLen
|
||||
);
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI WSAQuerySocketSecurity(
|
||||
SOCKET Socket,
|
||||
const SOCKET_SECURITY_QUERY_TEMPLATE *SecurityQueryTemplate,
|
||||
ULONG SecurityQueryTemplateLen,
|
||||
SOCKET_SECURITY_QUERY_INFO *SecurityQueryInfo,
|
||||
ULONG *SecurityQueryInfoLen,
|
||||
LPWSAOVERLAPPED Overlapped,
|
||||
LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine
|
||||
);
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI WSARevertImpersonation(void);
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI WSASetSocketPeerTargetName(
|
||||
SOCKET Socket,
|
||||
const SOCKET_PEER_TARGET_NAME *PeerTargetName,
|
||||
ULONG PeerTargetNameLen,
|
||||
LPWSAOVERLAPPED Overlapped,
|
||||
LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine
|
||||
);
|
||||
|
||||
WINSOCK_API_LINKAGE int WSAAPI WSASetSocketSecurity(
|
||||
SOCKET Socket,
|
||||
const SOCKET_SECURITY_SETTINGS *SecuritySettings,
|
||||
ULONG SecuritySettingsLen,
|
||||
LPWSAOVERLAPPED Overlapped,
|
||||
LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine
|
||||
);
|
||||
|
||||
#endif /*(_WIN32_WINNT >= 0x0600)*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _WS2TCPIP_H_ */
|
Loading…
Reference in New Issue
Block a user