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)
79 #endif /* (NTDDI_VERSION >= NTDDI_VISTASP1) */
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
151 struct sockaddr_in6_old
{
158 typedef union sockaddr_gen
{
159 struct sockaddr Address
;
160 struct sockaddr_in AddressIn
;
161 struct sockaddr_in6_old AddressIn6
;
164 typedef struct _INTERFACE_INFO
{
166 sockaddr_gen iiAddress
;
167 sockaddr_gen iiBroadcastAddress
;
168 sockaddr_gen iiNetmask
;
169 } INTERFACE_INFO
, FAR
*LPINTERFACE_INFO
;
171 typedef struct _INTERFACE_INFO_EX
{
173 SOCKET_ADDRESS iiAddress
;
174 SOCKET_ADDRESS iiBroadcastAddress
;
175 SOCKET_ADDRESS iiNetmask
;
176 } INTERFACE_INFO_EX
, FAR
*LPINTERFACE_INFO_EX
;
178 typedef struct sockaddr_in6
{
179 ADDRESS_FAMILY sin6_family
;
185 SCOPE_ID sin6_scope_struct
;
187 } SOCKADDR_IN6_LH
, *PSOCKADDR_IN6_LH
, FAR
*LPSOCKADDR_IN6_LH
;
189 typedef struct sockaddr_in6_w2ksp1
{
193 struct in6_addr sin6_addr
;
195 } SOCKADDR_IN6_W2KSP1
, *PSOCKADDR_IN6_W2KSP1
, FAR
*LPSOCKADDR_IN6_W2KSP1
;
197 #if (NTDDI_VERSION >= NTDDI_VISTA)
199 typedef SOCKADDR_IN6_LH SOCKADDR_IN6
;
200 typedef SOCKADDR_IN6_LH
*PSOCKADDR_IN6
;
201 typedef SOCKADDR_IN6_LH FAR
*LPSOCKADDR_IN6
;
203 #elif(NTDDI_VERSION >= NTDDI_WIN2KSP1)
205 typedef SOCKADDR_IN6_W2KSP1 SOCKADDR_IN6
;
206 typedef SOCKADDR_IN6_W2KSP1
*PSOCKADDR_IN6
;
207 typedef SOCKADDR_IN6_W2KSP1 FAR
*LPSOCKADDR_IN6
;
211 typedef SOCKADDR_IN6_LH SOCKADDR_IN6
;
212 typedef SOCKADDR_IN6_LH
*PSOCKADDR_IN6
;
213 typedef SOCKADDR_IN6_LH FAR
*LPSOCKADDR_IN6
;
215 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
217 typedef union _SOCKADDR_INET
{
220 ADDRESS_FAMILY si_family
;
221 } SOCKADDR_INET
, *PSOCKADDR_INET
;
223 typedef struct _sockaddr_in6_pair
{
224 PSOCKADDR_IN6 SourceAddress
;
225 PSOCKADDR_IN6 DestinationAddress
;
226 } SOCKADDR_IN6_PAIR
, *PSOCKADDR_IN6_PAIR
;
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
254 extern CONST SCOPE_ID scopeid_unspecified
;
256 extern CONST IN_ADDR in4addr_any
;
257 extern CONST IN_ADDR in4addr_loopback
;
258 extern CONST IN_ADDR in4addr_broadcast
;
259 extern CONST IN_ADDR in4addr_allnodesonlink
;
260 extern CONST IN_ADDR in4addr_allroutersonlink
;
261 extern CONST IN_ADDR in4addr_alligmpv3routersonlink
;
262 extern CONST IN_ADDR in4addr_allteredohostsonlink
;
263 extern CONST IN_ADDR in4addr_linklocalprefix
;
264 extern CONST IN_ADDR in4addr_multicastprefix
;
266 extern CONST IN6_ADDR in6addr_any
;
267 extern CONST IN6_ADDR in6addr_loopback
;
268 extern CONST IN6_ADDR in6addr_allnodesonnode
;
269 extern CONST IN6_ADDR in6addr_allnodesonlink
;
270 extern CONST IN6_ADDR in6addr_allroutersonlink
;
271 extern CONST IN6_ADDR in6addr_allmldv2routersonlink
;
272 extern CONST IN6_ADDR in6addr_teredoinitiallinklocaladdress
;
273 extern CONST IN6_ADDR in6addr_linklocalprefix
;
274 extern CONST IN6_ADDR in6addr_multicastprefix
;
275 extern CONST IN6_ADDR in6addr_solicitednodemulticastprefix
;
276 extern CONST IN6_ADDR in6addr_v4mappedprefix
;
277 extern CONST IN6_ADDR in6addr_6to4prefix
;
278 extern CONST IN6_ADDR in6addr_teredoprefix
;
279 extern CONST IN6_ADDR in6addr_teredoprefix_old
;
285 IN6_ADDR_EQUAL(CONST IN6_ADDR
*x
, CONST IN6_ADDR
*y
) {
286 __int64 UNALIGNED
*a
;
287 __int64 UNALIGNED
*b
;
289 a
= (__int64 UNALIGNED
*)x
;
290 b
= (__int64 UNALIGNED
*)y
;
291 return (BOOLEAN
)((a
[1] == b
[1]) && (a
[0] == b
[0]));
294 #define IN6_ARE_ADDR_EQUAL IN6_ADDR_EQUAL
298 IN6_IS_ADDR_UNSPECIFIED(CONST IN6_ADDR
*a
) {
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));
311 IN6_IS_ADDR_LOOPBACK(CONST IN6_ADDR
*a
) {
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));
324 IN6_IS_ADDR_MULTICAST(CONST IN6_ADDR
*a
) {
325 return (BOOLEAN
)(a
->s6_bytes
[0] == 0xff);
330 IN6_IS_ADDR_EUI64(CONST IN6_ADDR
*a
) {
331 return (BOOLEAN
)(((a
->s6_bytes
[0] & 0xe0) != 0) &&
332 !IN6_IS_ADDR_MULTICAST(a
));
337 IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(CONST IN6_ADDR
*a
) {
338 return (BOOLEAN
)(IN6_IS_ADDR_EUI64(a
) &&
339 (a
->s6_words
[4] == 0) &&
340 (a
->s6_words
[5] == 0) &&
341 (a
->s6_words
[6] == 0) &&
342 (a
->s6_words
[7] == 0));
347 IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(CONST IN6_ADDR
*a
) {
348 return (BOOLEAN
)(IN6_IS_ADDR_EUI64(a
) &&
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));
357 IN6_IS_ADDR_ANYCAST(CONST IN6_ADDR
*a
) {
358 return (IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(a
) ||
359 IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(a
));
364 IN6_IS_ADDR_LINKLOCAL(CONST IN6_ADDR
*a
) {
365 return (BOOLEAN
)((a
->s6_bytes
[0] == 0xfe) &&
366 ((a
->s6_bytes
[1] & 0xc0) == 0x80));
371 IN6_IS_ADDR_SITELOCAL(CONST IN6_ADDR
*a
) {
372 return (BOOLEAN
)((a
->s6_bytes
[0] == 0xfe) &&
373 ((a
->s6_bytes
[1] & 0xc0) == 0xc0));
378 IN6_IS_ADDR_GLOBAL(CONST IN6_ADDR
*a
) {
379 ULONG High
= (a
->s6_bytes
[0] & 0xf0);
380 return (BOOLEAN
)((High
!= 0) && (High
!= 0xf0));
385 IN6_IS_ADDR_V4MAPPED(CONST IN6_ADDR
*a
) {
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));
396 IN6_IS_ADDR_V4COMPAT(CONST IN6_ADDR
*a
) {
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))));
410 IN6_IS_ADDR_V4TRANSLATED(CONST IN6_ADDR
*a
) {
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));
421 IN6_IS_ADDR_MC_NODELOCAL(CONST IN6_ADDR
*a
) {
422 return (BOOLEAN
)(IN6_IS_ADDR_MULTICAST(a
) &&
423 ((a
->s6_bytes
[1] & 0xf) == 1));
428 IN6_IS_ADDR_MC_LINKLOCAL(CONST IN6_ADDR
*a
) {
429 return (BOOLEAN
)(IN6_IS_ADDR_MULTICAST(a
) &&
430 ((a
->s6_bytes
[1] & 0xf) == 2));
435 IN6_IS_ADDR_MC_SITELOCAL(CONST IN6_ADDR
*a
) {
436 return (BOOLEAN
)(IN6_IS_ADDR_MULTICAST(a
) &&
437 ((a
->s6_bytes
[1] & 0xf) == 5));
442 IN6_IS_ADDR_MC_ORGLOCAL(CONST IN6_ADDR
*a
) {
443 return (BOOLEAN
)(IN6_IS_ADDR_MULTICAST(a
) &&
444 ((a
->s6_bytes
[1] & 0xf) == 8));
449 IN6_IS_ADDR_MC_GLOBAL(CONST IN6_ADDR
*a
) {
450 return (BOOLEAN
)(IN6_IS_ADDR_MULTICAST(a
) &&
451 ((a
->s6_bytes
[1] & 0xf) == 0xe));
456 IN6_SET_ADDR_UNSPECIFIED(PIN6_ADDR a
) {
457 memset(a
->s6_bytes
, 0, sizeof(IN6_ADDR
));
462 IN6_SET_ADDR_LOOPBACK(PIN6_ADDR a
) {
463 memset(a
->s6_bytes
, 0, sizeof(IN6_ADDR
));
469 IN6ADDR_SETANY(PSOCKADDR_IN6 a
) {
470 a
->sin6_family
= AF_INET6
;
472 a
->sin6_flowinfo
= 0;
473 IN6_SET_ADDR_UNSPECIFIED(&a
->sin6_addr
);
474 a
->sin6_scope_id
= 0;
479 IN6ADDR_SETLOOPBACK(PSOCKADDR_IN6 a
) {
480 a
->sin6_family
= AF_INET6
;
482 a
->sin6_flowinfo
= 0;
483 IN6_SET_ADDR_LOOPBACK(&a
->sin6_addr
);
484 a
->sin6_scope_id
= 0;
489 IN6ADDR_ISANY(CONST SOCKADDR_IN6
*a
) {
490 WS2IPDEF_ASSERT(a
->sin6_family
== AF_INET6
);
491 return IN6_IS_ADDR_UNSPECIFIED(&a
->sin6_addr
);
496 IN6ADDR_ISLOOPBACK(CONST SOCKADDR_IN6
*a
) {
497 WS2IPDEF_ASSERT(a
->sin6_family
== AF_INET6
);
498 return IN6_IS_ADDR_LOOPBACK(&a
->sin6_addr
);
503 IN6ADDR_ISEQUAL(CONST SOCKADDR_IN6
*a
, CONST SOCKADDR_IN6
*b
) {
504 WS2IPDEF_ASSERT(a
->sin6_family
== AF_INET6
);
505 return (BOOLEAN
)(a
->sin6_scope_id
== b
->sin6_scope_id
&&
506 IN6_ADDR_EQUAL(&a
->sin6_addr
, &b
->sin6_addr
));
511 IN6ADDR_ISUNSPECIFIED(CONST SOCKADDR_IN6
*a
) {
512 WS2IPDEF_ASSERT(a
->sin6_family
== AF_INET6
);
513 return (BOOLEAN
)(a
->sin6_scope_id
== 0 &&
514 IN6_IS_ADDR_UNSPECIFIED(&a
->sin6_addr
));
519 #endif /* (NTDDI_VERSION >= NTDDI_WIN2KSP1) */
521 typedef enum _MULTICAST_MODE_TYPE
{
524 } MULTICAST_MODE_TYPE
;
526 typedef struct ip_mreq
{
527 IN_ADDR imr_multiaddr
;
528 IN_ADDR imr_interface
;
529 } IP_MREQ
, *PIP_MREQ
;
531 typedef struct ip_mreq_source
{
532 IN_ADDR imr_multiaddr
;
533 IN_ADDR imr_sourceaddr
;
534 IN_ADDR imr_interface
;
535 } IP_MREQ_SOURCE
, *PIP_MREQ_SOURCE
;
537 typedef struct ip_msfilter
{
538 IN_ADDR imsf_multiaddr
;
539 IN_ADDR imsf_interface
;
540 MULTICAST_MODE_TYPE imsf_fmode
;
542 IN_ADDR imsf_slist
[1];
543 } IP_MSFILTER
, *PIP_MSFILTER
;
545 typedef struct ipv6_mreq
{
546 IN6_ADDR ipv6mr_multiaddr
;
547 ULONG ipv6mr_interface
;
548 } IPV6_MREQ
, *PIPV6_MREQ
;
550 #if (NTDDI_VERSION >= NTDDI_WINXP)
552 typedef struct group_req
{
554 SOCKADDR_STORAGE gr_group
;
555 } GROUP_REQ
, *PGROUP_REQ
;
557 typedef struct group_source_req
{
559 SOCKADDR_STORAGE gsr_group
;
560 SOCKADDR_STORAGE gsr_source
;
561 } GROUP_SOURCE_REQ
, *PGROUP_SOURCE_REQ
;
563 typedef struct group_filter
{
565 SOCKADDR_STORAGE gf_group
;
566 MULTICAST_MODE_TYPE gf_fmode
;
568 SOCKADDR_STORAGE gf_slist
[1];
569 } GROUP_FILTER
, *PGROUP_FILTER
;
571 #define GROUP_FILTER_SIZE(numsrc) \
572 (sizeof(GROUP_FILTER) - sizeof(SOCKADDR_STORAGE) \
573 + (numsrc) * sizeof(SOCKADDR_STORAGE))
575 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
577 typedef struct in_pktinfo
{
580 } IN_PKTINFO
, *PIN_PKTINFO
;
582 C_ASSERT(sizeof(IN_PKTINFO
) == 8);
584 typedef struct in6_pktinfo
{
587 } IN6_PKTINFO
, *PIN6_PKTINFO
;
589 C_ASSERT(sizeof(IN6_PKTINFO
) == 20);