9 #ifndef WS2IPDEF_ASSERT 10 #define WS2IPDEF_ASSERT(exp) ((VOID) 0) 14 #define WS2TCPIP_INLINE __inline 16 #define WS2TCPIP_INLINE static inline 21 #define IFF_UP 0x00000001 22 #define IFF_BROADCAST 0x00000002 23 #define IFF_LOOPBACK 0x00000004 24 #define IFF_POINTTOPOINT 0x00000008 25 #define IFF_MULTICAST 0x00000010 31 #define IP_MULTICAST_IF 9 32 #define IP_MULTICAST_TTL 10 33 #define IP_MULTICAST_LOOP 11 34 #define IP_ADD_MEMBERSHIP 12 35 #define IP_DROP_MEMBERSHIP 13 36 #define IP_DONTFRAGMENT 14 37 #define IP_ADD_SOURCE_MEMBERSHIP 15 38 #define IP_DROP_SOURCE_MEMBERSHIP 16 39 #define IP_BLOCK_SOURCE 17 40 #define IP_UNBLOCK_SOURCE 18 42 #define IP_HOPLIMIT 21 43 #define IP_RECEIVE_BROADCAST 22 45 #define IP_RECVDSTADDR 25 47 #define IP_ADD_IFLIST 29 48 #define IP_DEL_IFLIST 30 49 #define IP_UNICAST_IF 31 51 #define IP_RECVRTHDR 38 53 #define IP_RECVTCLASS 40 54 #define IP_ORIGINAL_ARRIVAL_IF 47 56 #define IP_UNSPECIFIED_TYPE_OF_SERVICE -1 58 #define IPV6_ADDRESS_BITS RTL_BITS_OF(IN6_ADDR) 60 #define SS_PORT(ssp) (((PSOCKADDR_IN)(ssp))->sin_port) 62 #define SIO_GET_INTERFACE_LIST _IOR('t', 127, ULONG) 63 #define SIO_GET_INTERFACE_LIST_EX _IOR('t', 126, ULONG) 64 #define SIO_SET_MULTICAST_FILTER _IOW('t', 125, ULONG) 65 #define SIO_GET_MULTICAST_FILTER _IOW('t', 124 | IOC_IN, ULONG) 66 #define SIOCSIPMSFILTER SIO_SET_MULTICAST_FILTER 67 #define SIOCGIPMSFILTER SIO_GET_MULTICAST_FILTER 69 #define SIOCSMSFILTER _IOW('t', 126, ULONG) 70 #define SIOCGMSFILTER _IOW('t', 127 | IOC_IN, ULONG) 72 #if (NTDDI_VERSION >= NTDDI_VISTASP1) 74 #define IDEAL_SEND_BACKLOG_IOCTLS 76 #define SIO_IDEAL_SEND_BACKLOG_QUERY _IOR('t', 123, ULONG) 77 #define SIO_IDEAL_SEND_BACKLOG_CHANGE _IO('t', 122) 81 #define MCAST_JOIN_GROUP 41 82 #define MCAST_LEAVE_GROUP 42 83 #define MCAST_BLOCK_SOURCE 43 84 #define MCAST_UNBLOCK_SOURCE 44 85 #define MCAST_JOIN_SOURCE_GROUP 45 86 #define MCAST_LEAVE_SOURCE_GROUP 46 88 #define IP_MSFILTER_SIZE(NumSources) \ 89 (sizeof(IP_MSFILTER) - sizeof(IN_ADDR) + (NumSources) * sizeof(IN_ADDR)) 91 #define IPV6_HOPOPTS 1 92 #define IPV6_HDRINCL 2 93 #define IPV6_UNICAST_HOPS 4 94 #define IPV6_MULTICAST_IF 9 95 #define IPV6_MULTICAST_HOPS 10 96 #define IPV6_MULTICAST_LOOP 11 97 #define IPV6_ADD_MEMBERSHIP 12 98 #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP 99 #define IPV6_DROP_MEMBERSHIP 13 100 #define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP 101 #define IPV6_DONTFRAG 14 102 #define IPV6_PKTINFO 19 103 #define IPV6_HOPLIMIT 21 104 #define IPV6_PROTECTION_LEVEL 23 105 #define IPV6_RECVIF 24 106 #define IPV6_RECVDSTADDR 25 107 #define IPV6_CHECKSUM 26 108 #define IPV6_V6ONLY 27 109 #define IPV6_IFLIST 28 110 #define IPV6_ADD_IFLIST 29 111 #define IPV6_DEL_IFLIST 30 112 #define IPV6_UNICAST_IF 31 113 #define IPV6_RTHDR 32 114 #define IPV6_RECVRTHDR 38 115 #define IPV6_TCLASS 39 116 #define IPV6_RECVTCLASS 40 118 #define IP_UNSPECIFIED_HOP_LIMIT -1 120 #define IP_PROTECTION_LEVEL IPV6_PROTECTION_LEVEL 121 #define PROTECTION_LEVEL_UNRESTRICTED 10 122 #define PROTECTION_LEVEL_EDGERESTRICTED 20 123 #define PROTECTION_LEVEL_RESTRICTED 30 125 #if (NTDDI_VERSION < NTDDI_VISTA) 126 #define PROTECTION_LEVEL_DEFAULT PROTECTION_LEVEL_EDGERESTRICTED 128 #define PROTECTION_LEVEL_DEFAULT ((UINT)-1) 131 #define INET_ADDRSTRLEN 22 132 #define INET6_ADDRSTRLEN 65 134 #define TCP_OFFLOAD_NO_PREFERENCE 0 135 #define TCP_OFFLOAD_NOT_PREFERRED 1 136 #define TCP_OFFLOAD_PREFERRED 2 138 #define TCP_EXPEDITED_1122 0x0002 139 #define TCP_KEEPALIVE 3 145 #define TCP_NOSYNRETRIES 9 146 #define TCP_TIMESTAMPS 10 147 #define TCP_OFFLOAD_PREFERENCE 11 148 #define TCP_CONGESTION_ALGORITHM 12 149 #define TCP_DELAY_FIN_ACK 13 197 #if (NTDDI_VERSION >= NTDDI_VISTA) 203 #elif(NTDDI_VERSION >= NTDDI_WIN2KSP1) 228 #if (NTDDI_VERSION >= NTDDI_WIN2KSP1) 230 #define IN6ADDR_ANY_INIT {0} 231 #define IN6ADDR_LOOPBACK_INIT {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1} 232 #define IN6ADDR_ALLNODESONNODE_INIT {0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01} 233 #define IN6ADDR_ALLNODESONLINK_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01} 234 #define IN6ADDR_ALLROUTERSONLINK_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02} 235 #define IN6ADDR_ALLMLDV2ROUTERSONLINK_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16} 236 #define IN6ADDR_TEREDOINITIALLINKLOCALADDRESS_INIT {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe} 237 #define IN6ADDR_TEREDOOLDLINKLOCALADDRESSXP_INIT {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 'T', 'E', 'R', 'E', 'D', 'O'} 238 #define IN6ADDR_TEREDOOLDLINKLOCALADDRESSVISTA_INIT {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} 239 #define IN6ADDR_LINKLOCALPREFIX_INIT {0xfe, 0x80, } 240 #define IN6ADDR_MULTICASTPREFIX_INIT {0xff, 0x00, } 241 #define IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, } 242 #define IN6ADDR_V4MAPPEDPREFIX_INIT {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, } 243 #define IN6ADDR_6TO4PREFIX_INIT {0x20, 0x02, } 244 #define IN6ADDR_TEREDOPREFIX_INIT {0x20, 0x01, 0x00, 0x00, } 245 #define IN6ADDR_TEREDOPREFIX_INIT_OLD {0x3f, 0xfe, 0x83, 0x1f, } 247 #define IN6ADDR_LINKLOCALPREFIX_LENGTH 64 248 #define IN6ADDR_MULTICASTPREFIX_LENGTH 8 249 #define IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_LENGTH 104 250 #define IN6ADDR_V4MAPPEDPREFIX_LENGTH 96 251 #define IN6ADDR_6TO4PREFIX_LENGTH 16 252 #define IN6ADDR_TEREDOPREFIX_LENGTH 32 291 return (
BOOLEAN)((
a[1] ==
b[1]) && (
a[0] ==
b[0]));
294 #define IN6_ARE_ADDR_EQUAL IN6_ADDR_EQUAL 299 return (
BOOLEAN)((
a->s6_words[0] == 0) &&
300 (
a->s6_words[1] == 0) &&
301 (
a->s6_words[2] == 0) &&
302 (
a->s6_words[3] == 0) &&
303 (
a->s6_words[4] == 0) &&
304 (
a->s6_words[5] == 0) &&
305 (
a->s6_words[6] == 0) &&
306 (
a->s6_words[7] == 0));
312 return (
BOOLEAN)((
a->s6_words[0] == 0) &&
313 (
a->s6_words[1] == 0) &&
314 (
a->s6_words[2] == 0) &&
315 (
a->s6_words[3] == 0) &&
316 (
a->s6_words[4] == 0) &&
317 (
a->s6_words[5] == 0) &&
318 (
a->s6_words[6] == 0) &&
319 (
a->s6_words[7] == 0x0100));
325 return (
BOOLEAN)(
a->s6_bytes[0] == 0xff);
331 return (
BOOLEAN)(((
a->s6_bytes[0] & 0xe0) != 0) &&
339 (
a->s6_words[4] == 0) &&
340 (
a->s6_words[5] == 0) &&
341 (
a->s6_words[6] == 0) &&
342 (
a->s6_words[7] == 0));
349 (
a->s6_words[4] == 0xfffd) &&
350 (
a->s6_words[5] == 0xffff) &&
351 (
a->s6_words[6] == 0xffff) &&
352 ((
a->s6_words[7] & 0x80ff) == 0x80ff));
365 return (
BOOLEAN)((
a->s6_bytes[0] == 0xfe) &&
366 ((
a->s6_bytes[1] & 0xc0) == 0x80));
372 return (
BOOLEAN)((
a->s6_bytes[0] == 0xfe) &&
373 ((
a->s6_bytes[1] & 0xc0) == 0xc0));
386 return (
BOOLEAN)((
a->s6_words[0] == 0) &&
387 (
a->s6_words[1] == 0) &&
388 (
a->s6_words[2] == 0) &&
389 (
a->s6_words[3] == 0) &&
390 (
a->s6_words[4] == 0) &&
391 (
a->s6_words[5] == 0xffff));
397 return (
BOOLEAN)((
a->s6_words[0] == 0) &&
398 (
a->s6_words[1] == 0) &&
399 (
a->s6_words[2] == 0) &&
400 (
a->s6_words[3] == 0) &&
401 (
a->s6_words[4] == 0) &&
402 (
a->s6_words[5] == 0) &&
403 !((
a->s6_words[6] == 0) &&
404 (
a->s6_addr[14] == 0) &&
405 ((
a->s6_addr[15] == 0) || (
a->s6_addr[15] == 1))));
411 return (
BOOLEAN)((
a->s6_words[0] == 0) &&
412 (
a->s6_words[1] == 0) &&
413 (
a->s6_words[2] == 0) &&
414 (
a->s6_words[3] == 0) &&
415 (
a->s6_words[4] == 0xffff) &&
416 (
a->s6_words[5] == 0));
423 ((
a->s6_bytes[1] & 0xf) == 1));
430 ((
a->s6_bytes[1] & 0xf) == 2));
437 ((
a->s6_bytes[1] & 0xf) == 5));
444 ((
a->s6_bytes[1] & 0xf) == 8));
451 ((
a->s6_bytes[1] & 0xf) == 0xe));
472 a->sin6_flowinfo = 0;
474 a->sin6_scope_id = 0;
482 a->sin6_flowinfo = 0;
484 a->sin6_scope_id = 0;
505 return (
BOOLEAN)(
a->sin6_scope_id ==
b->sin6_scope_id &&
513 return (
BOOLEAN)(
a->sin6_scope_id == 0 &&
550 #if (NTDDI_VERSION >= NTDDI_WINXP) 571 #define GROUP_FILTER_SIZE(numsrc) \ 572 (sizeof(GROUP_FILTER) - sizeof(SOCKADDR_STORAGE) \ 573 + (numsrc) * sizeof(SOCKADDR_STORAGE))
WS2TCPIP_INLINE VOID IN6_SET_ADDR_UNSPECIFIED(PIN6_ADDR a)
CONST IN_ADDR in4addr_linklocalprefix
CONST IN_ADDR in4addr_loopback
IN6_ADDR ipv6mr_multiaddr
struct group_filter GROUP_FILTER
struct _INTERFACE_INFO INTERFACE_INFO
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_MULTICAST(CONST IN6_ADDR *a)
SOCKADDR_IN6_LH FAR * LPSOCKADDR_IN6
union _SOCKADDR_INET SOCKADDR_INET
enum _MULTICAST_MODE_TYPE MULTICAST_MODE_TYPE
CONST IN6_ADDR in6addr_allmldv2routersonlink
ADDRESS_FAMILY sin6_family
struct _sockaddr_in6_pair SOCKADDR_IN6_PAIR
struct in6_pktinfo IN6_PKTINFO
struct ip_mreq_source * PIP_MREQ_SOURCE
WS2TCPIP_INLINE VOID IN6ADDR_SETANY(PSOCKADDR_IN6 a)
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_MC_SITELOCAL(CONST IN6_ADDR *a)
struct ip_msfilter IP_MSFILTER
CONST IN6_ADDR in6addr_multicastprefix
SOCKADDR_STORAGE gsr_group
WS2TCPIP_INLINE BOOLEAN IN6ADDR_ISUNSPECIFIED(CONST SOCKADDR_IN6 *a)
struct sockaddr_in6 * LPSOCKADDR_IN6_LH
GLint GLint GLint GLint GLint x
WS2TCPIP_INLINE BOOLEAN IN6_ADDR_EQUAL(CONST IN6_ADDR *x, CONST IN6_ADDR *y)
CONST SCOPE_ID scopeid_unspecified
struct group_req * PGROUP_REQ
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(CONST IN6_ADDR *a)
CONST IN6_ADDR in6addr_teredoinitiallinklocaladdress
WS2TCPIP_INLINE BOOLEAN IN6ADDR_ISANY(CONST SOCKADDR_IN6 *a)
struct _INTERFACE_INFO_EX INTERFACE_INFO_EX
struct sockaddr_in6_w2ksp1 * PSOCKADDR_IN6_W2KSP1
PSOCKADDR_IN6 DestinationAddress
struct sockaddr_in6_w2ksp1 SOCKADDR_IN6_W2KSP1
struct _INTERFACE_INFO * LPINTERFACE_INFO
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_MC_GLOBAL(CONST IN6_ADDR *a)
struct ipv6_mreq * PIPV6_MREQ
CONST IN_ADDR in4addr_broadcast
WS2TCPIP_INLINE VOID IN6ADDR_SETLOOPBACK(PSOCKADDR_IN6 a)
SOCKET_ADDRESS iiBroadcastAddress
SCOPE_ID sin6_scope_struct
struct sockaddr_in6 SOCKADDR_IN6_LH
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_V4TRANSLATED(CONST IN6_ADDR *a)
struct group_source_req GROUP_SOURCE_REQ
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_ANYCAST(CONST IN6_ADDR *a)
CONST IN6_ADDR in6addr_any
SOCKADDR_STORAGE gr_group
CONST IN6_ADDR in6addr_allnodesonnode
WS2TCPIP_INLINE VOID IN6_SET_ADDR_LOOPBACK(PIN6_ADDR a)
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(CONST IN6_ADDR *a)
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_MC_ORGLOCAL(CONST IN6_ADDR *a)
struct ip_mreq_source IP_MREQ_SOURCE
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_EUI64(CONST IN6_ADDR *a)
GLboolean GLboolean GLboolean b
SOCKADDR_STORAGE gf_group
SOCKADDR_IN6_LH * PSOCKADDR_IN6
struct in6_pktinfo * PIN6_PKTINFO
struct sockaddr_in6_w2ksp1 * LPSOCKADDR_IN6_W2KSP1
SOCKADDR_STORAGE gf_slist[1]
struct in_pktinfo * PIN_PKTINFO
CONST IN_ADDR in4addr_any
struct in_pktinfo IN_PKTINFO
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_SITELOCAL(CONST IN6_ADDR *a)
CONST IN6_ADDR in6addr_solicitednodemulticastprefix
sockaddr_gen iiBroadcastAddress
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_LOOPBACK(CONST IN6_ADDR *a)
CONST IN_ADDR in4addr_allteredohostsonlink
struct _sockaddr_in6_pair * PSOCKADDR_IN6_PAIR
struct ipv6_mreq IPV6_MREQ
struct in6_addr sin6_addr
union sockaddr_gen sockaddr_gen
CONST IN6_ADDR in6addr_allroutersonlink
SOCKADDR_STORAGE gsr_source
CONST IN_ADDR in4addr_allnodesonlink
#define WS2IPDEF_ASSERT(exp)
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_UNSPECIFIED(CONST IN6_ADDR *a)
CONST IN6_ADDR in6addr_6to4prefix
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_V4COMPAT(CONST IN6_ADDR *a)
struct group_filter * PGROUP_FILTER
struct group_source_req * PGROUP_SOURCE_REQ
WS2TCPIP_INLINE BOOLEAN IN6ADDR_ISEQUAL(CONST SOCKADDR_IN6 *a, CONST SOCKADDR_IN6 *b)
struct sockaddr_in6 * PSOCKADDR_IN6_LH
struct sockaddr_in6_old AddressIn6
CONST IN6_ADDR in6addr_linklocalprefix
GLint GLint GLint GLint GLint GLint y
union _SOCKADDR_INET * PSOCKADDR_INET
SOCKADDR_IN6_LH SOCKADDR_IN6
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_GLOBAL(CONST IN6_ADDR *a)
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_MC_LINKLOCAL(CONST IN6_ADDR *a)
MULTICAST_MODE_TYPE imsf_fmode
CONST IN6_ADDR in6addr_loopback
MULTICAST_MODE_TYPE gf_fmode
CONST IN6_ADDR in6addr_teredoprefix_old
C_ASSERT(sizeof(IN_PKTINFO)==8)
CONST IN6_ADDR in6addr_v4mappedprefix
struct _INTERFACE_INFO_EX * LPINTERFACE_INFO_EX
CONST IN6_ADDR in6addr_allnodesonlink
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_MC_NODELOCAL(CONST IN6_ADDR *a)
PSOCKADDR_IN6 SourceAddress
WS2TCPIP_INLINE BOOLEAN IN6ADDR_ISLOOPBACK(CONST SOCKADDR_IN6 *a)
struct group_req GROUP_REQ
GLboolean GLboolean GLboolean GLboolean a
CONST IN_ADDR in4addr_alligmpv3routersonlink
CONST IN6_ADDR in6addr_teredoprefix
struct ip_mreq * PIP_MREQ
struct ip_msfilter * PIP_MSFILTER
struct sockaddr_in AddressIn
CONST IN_ADDR in4addr_allroutersonlink
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_LINKLOCAL(CONST IN6_ADDR *a)
CONST IN_ADDR in4addr_multicastprefix
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_V4MAPPED(CONST IN6_ADDR *a)