ReactOS  0.4.14-dev-376-gaedba84
mswsockdef.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "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 
24 const UCHAR sockaddr_size[AF_MAX];
25 
26 MSWSOCKDEF_INLINE
27 UCHAR
28 SOCKADDR_SIZE(
29  IN ADDRESS_FAMILY af)
30 {
31  return (UCHAR)((af < AF_MAX) ? sockaddr_size[af]
32  : sockaddr_size[AF_UNSPEC]);
33 }
34 
35 MSWSOCKDEF_INLINE
37 ScopeLevel(
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 
47 typedef enum _WSA_COMPATIBILITY_BEHAVIOR_ID {
48  WsaBehaviorAll = 0,
49  WsaBehaviorReceiveBuffering,
50  WsaBehaviorAutoTuning
51 } WSA_COMPATIBILITY_BEHAVIOR_ID, *PWSA_COMPATIBILITY_BEHAVIOR_ID;
52 
53 typedef 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:38
#define AF_MAX
Definition: winsock.h:214
#define AF_UNSPEC
Definition: winsock.h:344
USHORT ADDRESS_FAMILY
Definition: ws2def.h:25
unsigned char UCHAR
Definition: xmlstorage.h:181
SCOPE_LEVEL
Definition: ws2def.h:478
unsigned int ULONG
Definition: retypes.h:1