21#define UDP_NOCHECKSUM 1
22#define UDP_CHECKSUM_COVERAGE 20
25#define WS2TCPIP_INLINE __inline
27#define WS2TCPIP_INLINE static inline
31#define EAI_AGAIN WSATRY_AGAIN
32#define EAI_BADFLAGS WSAEINVAL
33#define EAI_FAIL WSANO_RECOVERY
34#define EAI_FAMILY WSAEAFNOSUPPORT
35#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
36#define EAI_NODATA EAI_NONAME
37#define EAI_NOSECURENAME WSA_SECURE_HOST_NOT_FOUND
38#define EAI_NONAME WSAHOST_NOT_FOUND
39#define EAI_SERVICE WSATYPE_NOT_FOUND
40#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
41#define EAI_IPSECPOLICY WSA_IPSEC_NAME_POLICY_ERROR
51#if (_WIN32_WINNT >= 0x0600)
54typedef ADDRINFOEXW ADDRINFOEX, *PADDRINFOEX;
56typedef ADDRINFOEXA ADDRINFOEX, *PADDRINFOEX;
70#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502)
81#define GetAddrInfoA getaddrinfo
84#define GetAddrInfo GetAddrInfoW
86#define GetAddrInfo GetAddrInfoA
91#if INCL_WINSOCK_API_TYPEDEFS
101(
WSAAPI *LPFN_GETADDRINFOW)(
107#define LPFN_GETADDRINFOA LPFN_GETADDRINFO
110#define LPFN_GETADDRINFOT LPFN_GETADDRINFOW
112#define LPFN_GETADDRINFOT LPFN_GETADDRINFOA
117#if (_WIN32_WINNT >= 0x0600)
120(
CALLBACK *LPLOOKUPSERVICE_COMPLETION_ROUTINE)(
137 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
152 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
156#define GetAddrInfoEx GetAddrInfoExW
158#define GetAddrInfoEx GetAddrInfoExA
161#if INCL_WINSOCK_API_TYPEDEFS
164(
WSAAPI *LPFN_GETADDRINFOEXA)(
173 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
177(
WSAAPI *LPFN_GETADDRINFOEXW)(
186 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
190#define LPFN_GETADDRINFOEX LPFN_GETADDRINFOEXW
192#define LPFN_GETADDRINFOEX LPFN_GETADDRINFOEXA
198#if (_WIN32_WINNT >= 0x0600)
214 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
231 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
235#define SetAddrInfoEx SetAddrInfoExW
237#define SetAddrInfoEx SetAddrInfoExA
240#if INCL_WINSOCK_API_TYPEDEFS
243(
WSAAPI *LPFN_SETADDRINFOEXA)(
254 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
258(
WSAAPI *LPFN_SETADDRINFOEXW)(
269 _In_opt_ LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine,
273#define LPFN_SETADDRINFOEX LPFN_SETADDRINFOEXW
275#define LPFN_SETADDRINFOEX LPFN_SETADDRINFOEXA
287#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502)
295#define FreeAddrInfoA freeaddrinfo
298#define FreeAddrInfo FreeAddrInfoW
300#define FreeAddrInfo FreeAddrInfoA
304#if INCL_WINSOCK_API_TYPEDEFS
307(
WSAAPI *LPFN_FREEADDRINFO)(
311(
WSAAPI *LPFN_FREEADDRINFOW)(
314#define LPFN_FREEADDRINFOA LPFN_FREEADDRINFO
317#define LPFN_FREEADDRINFOT LPFN_FREEADDRINFOW
319#define LPFN_FREEADDRINFOT LPFN_FREEADDRINFOA
324#if (_WIN32_WINNT >= 0x0600)
338#define FreeAddrInfoExA FreeAddrInfoEx
341#define FreeAddrInfoEx FreeAddrInfoExW
344#ifdef INCL_WINSOCK_API_TYPEDEFS
347(
WSAAPI *LPFN_FREEADDRINFOEXA)(
348 _In_ PADDRINFOEXA pAddrInfoEx);
351(
WSAAPI *LPFN_FREEADDRINFOEXW)(
352 _In_ PADDRINFOEXW pAddrInfoEx);
356#define LPFN_FREEADDRINFOEX LPFN_FREEADDRINFOEXW
358#define LPFN_FREEADDRINFOEX LPFN_FREEADDRINFOEXA
378#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502)
392#define GetNameInfoA getnameinfo
395#define GetNameInfo GetNameInfoW
397#define GetNameInfo GetNameInfoA
402#if INCL_WINSOCK_API_TYPEDEFS
405(
WSAAPI *LPFN_GETNAMEINFO)(
415(
WSAAPI *LPFN_GETNAMEINFOW)(
424#define LPFN_GETNAMEINFOA LPFN_GETNAMEINFO
427#define LPFN_GETNAMEINFOT LPFN_GETNAMEINFOW
429#define LPFN_GETNAMEINFOT LPFN_GETNAMEINFOA
433#if (NTDDI_VERSION >= NTDDI_VISTA)
456 _In_ size_t StringBufSize);
464 _In_ size_t StringBufSize);
466#define InetPtonA inet_pton
467#define InetNtopA inet_ntop
470#define InetPton InetPtonW
471#define InetNtop InetNtopW
473#define InetPton InetPtonA
474#define InetNtop InetNtopA
477#if INCL_WINSOCK_API_TYPEDEFS
496 _In_ size_t StringBufSize);
503 _In_ size_t StringBufSize);
506#define LPFN_INET_PTON LPFN_INET_PTONW
507#define LPFN_INET_NTOP LPFN_INET_NTOPW
509#define LPFN_INET_PTON LPFN_INET_PTONA
510#define LPFN_INET_NTOP LPFN_INET_NTOPA
516#if INCL_WINSOCK_API_PROTOTYPES
519#define gai_strerror gai_strerrorW
521#define gai_strerror gai_strerrorA
524#define GAI_STRERROR_BUFFER_SIZE 1024
531 static char buff[GAI_STRERROR_BUFFER_SIZE + 1];
540 GAI_STRERROR_BUFFER_SIZE,
551 static WCHAR buff[GAI_STRERROR_BUFFER_SIZE + 1];
560 GAI_STRERROR_BUFFER_SIZE,
661#if (NTDDI_VERSION >= NTDDI_WINXP)
753#ifdef IDEAL_SEND_BACKLOG_IOCTLS
757idealsendbacklogquery(
769idealsendbacklognotify(
783#if (_WIN32_WINNT >= 0x0600)
785#ifdef _SECURE_SOCKET_TYPES_DEFINED_
800WSAQuerySocketSecurity(
802 _In_reads_bytes_opt_(SecurityQueryTemplateLen)
const SOCKET_SECURITY_QUERY_TEMPLATE *SecurityQueryTemplate,
812WSASetSocketPeerTargetName(
814 _In_reads_bytes_(PeerTargetNameLen)
const SOCKET_PEER_TARGET_NAME *PeerTargetName,
822WSADeleteSocketPeerTargetName(
832WSAImpersonateSocketPeer(
840WSARevertImpersonation(
VOID);
845#if !defined(_WIN32_WINNT) || (_WIN32_WINNT <= 0x0500)
static unsigned char bytes[4]
#define HeapFree(x, y, z)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define WINSOCK_API_LINKAGE
VOID WSAAPI WSASetLastError(IN INT iError)
INT WSAAPI WSAIoctl(IN SOCKET s, IN DWORD dwIoControlCode, IN LPVOID lpvInBuffer, IN DWORD cbInBuffer, OUT LPVOID lpvOutBuffer, IN DWORD cbOutBuffer, OUT LPDWORD lpcbBytesReturned, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
static unsigned char buff[32768]
PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER pAddr
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
enum _tagppResult ppResult
#define _In_reads_bytes_(s)
#define _Out_writes_opt_(s)
#define _Out_writes_bytes_to_opt_(s, c)
#define _Out_writes_bytes_(s)
#define _In_reads_bytes_opt_(s)
namespace GUID const ADDRINFOEXW * hints
MULTICAST_MODE_TYPE imsf_fmode
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
#define FORMAT_MESSAGE_MAX_WIDTH_MASK
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
void(CALLBACK * LPWSAOVERLAPPED_COMPLETION_ROUTINE)(IN DWORD dwError, IN DWORD cbTransferred, IN LPWSAOVERLAPPED lpOverlapped, IN DWORD dwFlags)
struct group_filter * PGROUP_FILTER
struct ip_msfilter * PIP_MSFILTER
enum _MULTICAST_MODE_TYPE MULTICAST_MODE_TYPE
#define SIO_IDEAL_SEND_BACKLOG_CHANGE
#define IP_MSFILTER_SIZE(NumSources)
#define GROUP_FILTER_SIZE(numsrc)
#define SIO_IDEAL_SEND_BACKLOG_QUERY
_In_ IN_ADDR _In_ IN_ADDR _Out_ MULTICAST_MODE_TYPE * FilterMode
WINSOCK_API_LINKAGE INT WSAAPI GetNameInfoW(_In_reads_bytes_(SockaddrLength) const SOCKADDR *pSockaddr, _In_ socklen_t SockaddrLength, _Out_writes_opt_(NodeBufferSize) PWCHAR pNodeBuffer, _In_ DWORD NodeBufferSize, _Out_writes_opt_(ServiceBufferSize) PWCHAR pServiceBuffer, _In_ DWORD ServiceBufferSize, _In_ INT Flags)
PCSTR WSAAPI inet_ntop(_In_ INT Family, _In_ const VOID *pAddr, _Out_writes_(StringBufSize) PSTR pStringBuf, _In_ size_t StringBufSize)
PCWSTR WSAAPI InetNtopW(_In_ INT Family, _In_ const VOID *pAddr, _Out_writes_(StringBufSize) PWSTR pStringBuf, _In_ size_t StringBufSize)
WS2TCPIP_INLINE int setsourcefilter(_In_ SOCKET Socket, _In_ ULONG Interface, _In_ CONST SOCKADDR *Group, _In_ int GroupLength, _In_ MULTICAST_MODE_TYPE FilterMode, _In_ ULONG SourceCount, _In_reads_(SourceCount) CONST SOCKADDR_STORAGE *SourceList)
_In_ ULONG _In_ CONST SOCKADDR _In_ int GroupLength
WINSOCK_API_LINKAGE INT WSAAPI GetAddrInfoW(_In_opt_ PCWSTR pNodeName, _In_opt_ PCWSTR pServiceName, _In_opt_ const ADDRINFOW *pHints, _Outptr_ PADDRINFOW *ppResult)
_In_ IN_ADDR _In_ IN_ADDR _Out_ MULTICAST_MODE_TYPE _Inout_ ULONG _Out_writes_ SourceCount IN_ADDR * SourceList
INT WSAAPI InetPtonW(_In_ INT Family, _In_ PCWSTR pszAddrString, _Out_writes_bytes_(sizeof(IN6_ADDR)) PVOID pAddrBuf)
WINSOCK_API_LINKAGE INT WSAAPI inet_pton(_In_ INT Family, _In_ PCSTR pszAddrString, _Out_writes_bytes_(sizeof(IN6_ADDR)) PVOID pAddrBuf)
_In_ IN_ADDR _In_ IN_ADDR Group
ADDRINFOA FAR * LPADDRINFO
WS2TCPIP_INLINE int setipv4sourcefilter(_In_ SOCKET Socket, _In_ IN_ADDR Interface, _In_ IN_ADDR Group, _In_ MULTICAST_MODE_TYPE FilterMode, _In_ ULONG SourceCount, _In_reads_(SourceCount) CONST IN_ADDR *SourceList)
_In_ IN_ADDR _In_ IN_ADDR _Out_ MULTICAST_MODE_TYPE _Inout_ ULONG * SourceCount
_Must_inspect_result_ _In_ ULONG Flags