ReactOS 0.4.15-dev-8058-ga7cbb60
mswsockdef.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#if(_WIN32_WINNT >= 0x0600)
8#ifdef _MSC_VER
9#define MSWSOCKDEF_INLINE __inline
10#else
11#define MSWSOCKDEF_INLINE extern inline
12#endif
13#endif /* (_WIN32_WINNT>=0x0600) */
14
15#ifndef ASSERT
16#define MSWSOCKDEF_ASSERT_UNDEFINED
17#define ASSERT(exp) ((VOID) 0)
18#endif
19
20#if(_WIN32_WINNT >= 0x0600)
21
22#ifdef _WS2DEF_
23
24const UCHAR sockaddr_size[AF_MAX];
25
26MSWSOCKDEF_INLINE
28SOCKADDR_SIZE(
30{
31 return (UCHAR)((af < AF_MAX) ? sockaddr_size[af]
32 : sockaddr_size[AF_UNSPEC]);
33}
34
35MSWSOCKDEF_INLINE
37ScopeLevel(
38 IN SCOPE_ID ScopeId)
39{
40 return (SCOPE_LEVEL)ScopeId.Level;
41}
42
43#endif /* _WS2DEF_ */
44
45#define SIO_SET_COMPATIBILITY_MODE _WSAIOW(IOC_VENDOR,300)
46
47typedef enum _WSA_COMPATIBILITY_BEHAVIOR_ID {
48 WsaBehaviorAll = 0,
49 WsaBehaviorReceiveBuffering,
50 WsaBehaviorAutoTuning
51} WSA_COMPATIBILITY_BEHAVIOR_ID, *PWSA_COMPATIBILITY_BEHAVIOR_ID;
52
53typedef struct _WSA_COMPATIBILITY_MODE {
54 WSA_COMPATIBILITY_BEHAVIOR_ID BehaviorId;
55 ULONG TargetOsVersion;
56} WSA_COMPATIBILITY_MODE, *PWSA_COMPATIBILITY_MODE;
57
58#endif /* (_WIN32_WINNT>=0x0600) */
59
60#ifdef MSWSOCKDEF_ASSERT_UNDEFINED
61#undef ASSERT
62#endif
63
64#ifdef __cplusplus
65}
66#endif
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define AF_MAX
Definition: winsock.h:214
#define AF_UNSPEC
Definition: winsock.h:344
SCOPE_LEVEL
Definition: ws2def.h:478
USHORT ADDRESS_FAMILY
Definition: ws2def.h:25
unsigned char UCHAR
Definition: xmlstorage.h:181