2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the project nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * Copyright (c) 1982, 1986, 1993
32 * The Regents of the University of California. All rights reserved.
34 * Redistribution and use in source and binary forms, with or without
35 * modification, are permitted provided that the following conditions
37 * 1. Redistributions of source code must retain the above copyright
38 * notice, this list of conditions and the following disclaimer.
39 * 2. Redistributions in binary form must reproduce the above copyright
40 * notice, this list of conditions and the following disclaimer in the
41 * documentation and/or other materials provided with the distribution.
42 * 4. Neither the name of the University nor the names of its contributors
43 * may be used to endorse or promote products derived from this software
44 * without specific prior written permission.
46 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
47 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
50 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
52 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
60 #ifndef _NETINET_ICMP6_H_
61 #define _NETINET_ICMP6_H_
66 #include <sys/types.h>
67 #include <netinet6/in6.h>
70 #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr)
71 - sizeof(struct icmp6_hdr) */
74 uint8_t icmp6_type
; /* type field */
75 uint8_t icmp6_code
; /* code field */
76 uint16_t icmp6_cksum
; /* checksum field */
78 uint32_t icmp6_un_data32
[1]; /* type-specific field */
79 uint16_t icmp6_un_data16
[2]; /* type-specific field */
80 uint8_t icmp6_un_data8
[4]; /* type-specific field */
84 #define icmp6_data32 icmp6_dataun.icmp6_un_data32
85 #define icmp6_data16 icmp6_dataun.icmp6_un_data16
86 #define icmp6_data8 icmp6_dataun.icmp6_un_data8
87 #define icmp6_pptr icmp6_data32[0] /* parameter prob */
88 #define icmp6_mtu icmp6_data32[0] /* packet too big */
89 #define icmp6_id icmp6_data16[0] /* echo request/reply */
90 #define icmp6_seq icmp6_data16[1] /* echo request/reply */
91 #define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
93 #define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */
94 #define ICMP6_PACKET_TOO_BIG 2 /* packet too big */
95 #define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */
96 #define ICMP6_PARAM_PROB 4 /* ip6 header bad */
98 #define ICMP6_ECHO_REQUEST 128 /* echo service */
99 #define ICMP6_ECHO_REPLY 129 /* echo reply */
100 #define MLD_LISTENER_QUERY 130 /* multicast listener query */
101 #define MLD_LISTENER_REPORT 131 /* multicast listener report */
102 #define MLD_LISTENER_DONE 132 /* multicast listener done */
103 #define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE /* RFC3542 definition */
106 #define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
107 #define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
108 #define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
111 /* the followings are for backward compatibility to old KAME apps. */
112 #define MLD6_LISTENER_QUERY MLD_LISTENER_QUERY
113 #define MLD6_LISTENER_REPORT MLD_LISTENER_REPORT
114 #define MLD6_LISTENER_DONE MLD_LISTENER_DONE
117 #define ND_ROUTER_SOLICIT 133 /* router solicitation */
118 #define ND_ROUTER_ADVERT 134 /* router advertisement */
119 #define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */
120 #define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisement */
121 #define ND_REDIRECT 137 /* redirect */
123 #define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
125 #define ICMP6_WRUREQUEST 139 /* who are you request */
126 #define ICMP6_WRUREPLY 140 /* who are you reply */
127 #define ICMP6_FQDN_QUERY 139 /* FQDN query */
128 #define ICMP6_FQDN_REPLY 140 /* FQDN reply */
129 #define ICMP6_NI_QUERY 139 /* node information request */
130 #define ICMP6_NI_REPLY 140 /* node information reply */
131 #define MLDV2_LISTENER_REPORT 143 /* RFC3810 listener report */
133 /* The definitions below are experimental. TBA */
134 #define MLD_MTRACE_RESP 200 /* mtrace resp (to sender) */
135 #define MLD_MTRACE 201 /* mtrace messages */
138 #define MLD6_MTRACE_RESP MLD_MTRACE_RESP
139 #define MLD6_MTRACE MLD_MTRACE
142 #define ICMP6_MAXTYPE 201
144 #define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
145 #define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */
146 #define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
147 #define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
148 #define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
149 #define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */
151 #define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */
152 #define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */
154 #define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
155 #define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */
156 #define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */
158 #define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
160 #define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
161 #define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
162 #define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
164 #define ICMP6_NI_SUCCESS 0 /* node information successful reply */
165 #define ICMP6_NI_REFUSED 1 /* node information request is refused */
166 #define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
168 #define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
169 #define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
170 #define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
172 /* Used in kernel only */
173 #define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
174 #define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
177 * Multicast Listener Discovery
180 struct icmp6_hdr mld_icmp6_hdr
;
181 struct in6_addr mld_addr
; /* multicast address */
184 /* definitions to provide backward compatibility to old KAME applications */
186 #define mld6_hdr mld_hdr
187 #define mld6_type mld_type
188 #define mld6_code mld_code
189 #define mld6_cksum mld_cksum
190 #define mld6_maxdelay mld_maxdelay
191 #define mld6_reserved mld_reserved
192 #define mld6_addr mld_addr
195 /* shortcut macro definitions */
196 #define mld_type mld_icmp6_hdr.icmp6_type
197 #define mld_code mld_icmp6_hdr.icmp6_code
198 #define mld_cksum mld_icmp6_hdr.icmp6_cksum
199 #define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
200 #define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
201 #define mld_v2_reserved mld_icmp6_hdr.icmp6_data16[0]
202 #define mld_v2_numrecs mld_icmp6_hdr.icmp6_data16[1]
208 struct nd_router_solicit
{ /* router solicitation */
209 struct icmp6_hdr nd_rs_hdr
;
210 /* could be followed by options */
213 #define nd_rs_type nd_rs_hdr.icmp6_type
214 #define nd_rs_code nd_rs_hdr.icmp6_code
215 #define nd_rs_cksum nd_rs_hdr.icmp6_cksum
216 #define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
218 struct nd_router_advert
{ /* router advertisement */
219 struct icmp6_hdr nd_ra_hdr
;
220 uint32_t nd_ra_reachable
; /* reachable time */
221 uint32_t nd_ra_retransmit
; /* retransmit timer */
222 /* could be followed by options */
225 #define nd_ra_type nd_ra_hdr.icmp6_type
226 #define nd_ra_code nd_ra_hdr.icmp6_code
227 #define nd_ra_cksum nd_ra_hdr.icmp6_cksum
228 #define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
229 #define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
230 #define ND_RA_FLAG_MANAGED 0x80
231 #define ND_RA_FLAG_OTHER 0x40
232 #define ND_RA_FLAG_HA 0x20
235 * Router preference values based on draft-draves-ipngwg-router-selection-01.
236 * These are non-standard definitions.
238 #define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */
240 #define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */
241 #define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */
242 #define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */
243 #define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */
245 #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
247 struct nd_neighbor_solicit
{ /* neighbor solicitation */
248 struct icmp6_hdr nd_ns_hdr
;
249 struct in6_addr nd_ns_target
; /*target address */
250 /* could be followed by options */
253 #define nd_ns_type nd_ns_hdr.icmp6_type
254 #define nd_ns_code nd_ns_hdr.icmp6_code
255 #define nd_ns_cksum nd_ns_hdr.icmp6_cksum
256 #define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
258 struct nd_neighbor_advert
{ /* neighbor advertisement */
259 struct icmp6_hdr nd_na_hdr
;
260 struct in6_addr nd_na_target
; /* target address */
261 /* could be followed by options */
264 #define nd_na_type nd_na_hdr.icmp6_type
265 #define nd_na_code nd_na_hdr.icmp6_code
266 #define nd_na_cksum nd_na_hdr.icmp6_cksum
267 #define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
268 #if BYTE_ORDER == BIG_ENDIAN
269 #define ND_NA_FLAG_ROUTER 0x80000000
270 #define ND_NA_FLAG_SOLICITED 0x40000000
271 #define ND_NA_FLAG_OVERRIDE 0x20000000
273 #if BYTE_ORDER == LITTLE_ENDIAN
274 #define ND_NA_FLAG_ROUTER 0x80
275 #define ND_NA_FLAG_SOLICITED 0x40
276 #define ND_NA_FLAG_OVERRIDE 0x20
280 struct nd_redirect
{ /* redirect */
281 struct icmp6_hdr nd_rd_hdr
;
282 struct in6_addr nd_rd_target
; /* target address */
283 struct in6_addr nd_rd_dst
; /* destination address */
284 /* could be followed by options */
287 #define nd_rd_type nd_rd_hdr.icmp6_type
288 #define nd_rd_code nd_rd_hdr.icmp6_code
289 #define nd_rd_cksum nd_rd_hdr.icmp6_cksum
290 #define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
292 struct nd_opt_hdr
{ /* Neighbor discovery option header */
295 /* followed by option specific data*/
298 #define ND_OPT_SOURCE_LINKADDR 1
299 #define ND_OPT_TARGET_LINKADDR 2
300 #define ND_OPT_PREFIX_INFORMATION 3
301 #define ND_OPT_REDIRECTED_HEADER 4
304 #define ND_OPT_ROUTE_INFO 200 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */
306 struct nd_opt_prefix_info
{ /* prefix information */
307 uint8_t nd_opt_pi_type
;
308 uint8_t nd_opt_pi_len
;
309 uint8_t nd_opt_pi_prefix_len
;
310 uint8_t nd_opt_pi_flags_reserved
;
311 uint32_t nd_opt_pi_valid_time
;
312 uint32_t nd_opt_pi_preferred_time
;
313 uint32_t nd_opt_pi_reserved2
;
314 struct in6_addr nd_opt_pi_prefix
;
317 #define ND_OPT_PI_FLAG_ONLINK 0x80
318 #define ND_OPT_PI_FLAG_AUTO 0x40
320 struct nd_opt_rd_hdr
{ /* redirected header */
321 uint8_t nd_opt_rh_type
;
322 uint8_t nd_opt_rh_len
;
323 uint16_t nd_opt_rh_reserved1
;
324 uint32_t nd_opt_rh_reserved2
;
325 /* followed by IP header and data */
328 struct nd_opt_mtu
{ /* MTU option */
329 uint8_t nd_opt_mtu_type
;
330 uint8_t nd_opt_mtu_len
;
331 uint16_t nd_opt_mtu_reserved
;
332 uint32_t nd_opt_mtu_mtu
;
335 struct nd_opt_route_info
{ /* route info */
336 uint8_t nd_opt_rti_type
;
337 uint8_t nd_opt_rti_len
;
338 uint8_t nd_opt_rti_prefixlen
;
339 uint8_t nd_opt_rti_flags
;
340 uint32_t nd_opt_rti_lifetime
;
348 struct icmp6_namelookup
{
349 struct icmp6_hdr icmp6_nl_hdr
;
350 uint8_t icmp6_nl_nonce
[8];
351 int32_t icmp6_nl_ttl
;
353 uint8_t icmp6_nl_len
;
354 uint8_t icmp6_nl_name
[3];
356 /* could be followed by options */
360 * icmp6 node information
362 struct icmp6_nodeinfo
{
363 struct icmp6_hdr icmp6_ni_hdr
;
364 uint8_t icmp6_ni_nonce
[8];
365 /* could be followed by reply data */
368 #define ni_type icmp6_ni_hdr.icmp6_type
369 #define ni_code icmp6_ni_hdr.icmp6_code
370 #define ni_cksum icmp6_ni_hdr.icmp6_cksum
371 #define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
372 #define ni_flags icmp6_ni_hdr.icmp6_data16[1]
374 #define NI_QTYPE_NOOP 0 /* NOOP */
375 #define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */
376 #define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
377 #define NI_QTYPE_DNSNAME 2 /* DNS Name */
378 #define NI_QTYPE_NODEADDR 3 /* Node Addresses */
379 #define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
381 #if BYTE_ORDER == BIG_ENDIAN
382 #define NI_SUPTYPE_FLAG_COMPRESS 0x1
383 #define NI_FQDN_FLAG_VALIDTTL 0x1
384 #elif BYTE_ORDER == LITTLE_ENDIAN
385 #define NI_SUPTYPE_FLAG_COMPRESS 0x0100
386 #define NI_FQDN_FLAG_VALIDTTL 0x0100
389 #ifdef NAME_LOOKUPS_04
390 #if BYTE_ORDER == BIG_ENDIAN
391 #define NI_NODEADDR_FLAG_LINKLOCAL 0x1
392 #define NI_NODEADDR_FLAG_SITELOCAL 0x2
393 #define NI_NODEADDR_FLAG_GLOBAL 0x4
394 #define NI_NODEADDR_FLAG_ALL 0x8
395 #define NI_NODEADDR_FLAG_TRUNCATE 0x10
396 #define NI_NODEADDR_FLAG_ANYCAST 0x20 /* just experimental. not in spec */
397 #elif BYTE_ORDER == LITTLE_ENDIAN
398 #define NI_NODEADDR_FLAG_LINKLOCAL 0x0100
399 #define NI_NODEADDR_FLAG_SITELOCAL 0x0200
400 #define NI_NODEADDR_FLAG_GLOBAL 0x0400
401 #define NI_NODEADDR_FLAG_ALL 0x0800
402 #define NI_NODEADDR_FLAG_TRUNCATE 0x1000
403 #define NI_NODEADDR_FLAG_ANYCAST 0x2000 /* just experimental. not in spec */
405 #else /* draft-ietf-ipngwg-icmp-name-lookups-05 (and later?) */
406 #if BYTE_ORDER == BIG_ENDIAN
407 #define NI_NODEADDR_FLAG_TRUNCATE 0x1
408 #define NI_NODEADDR_FLAG_ALL 0x2
409 #define NI_NODEADDR_FLAG_COMPAT 0x4
410 #define NI_NODEADDR_FLAG_LINKLOCAL 0x8
411 #define NI_NODEADDR_FLAG_SITELOCAL 0x10
412 #define NI_NODEADDR_FLAG_GLOBAL 0x20
413 #define NI_NODEADDR_FLAG_ANYCAST 0x40 /* just experimental. not in spec */
414 #elif BYTE_ORDER == LITTLE_ENDIAN
415 #define NI_NODEADDR_FLAG_TRUNCATE 0x0100
416 #define NI_NODEADDR_FLAG_ALL 0x0200
417 #define NI_NODEADDR_FLAG_COMPAT 0x0400
418 #define NI_NODEADDR_FLAG_LINKLOCAL 0x0800
419 #define NI_NODEADDR_FLAG_SITELOCAL 0x1000
420 #define NI_NODEADDR_FLAG_GLOBAL 0x2000
421 #define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */
425 struct ni_reply_fqdn
{
426 uint32_t ni_fqdn_ttl
; /* TTL */
427 uint8_t ni_fqdn_namelen
; /* length in octets of the FQDN */
428 uint8_t ni_fqdn_name
[3]; /* XXX: alignment */
432 * Router Renumbering. as router-renum-08.txt
434 struct icmp6_router_renum
{ /* router renumbering header */
435 struct icmp6_hdr rr_hdr
;
438 uint16_t rr_maxdelay
;
439 uint32_t rr_reserved
;
442 #define ICMP6_RR_FLAGS_TEST 0x80
443 #define ICMP6_RR_FLAGS_REQRESULT 0x40
444 #define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
445 #define ICMP6_RR_FLAGS_SPECSITE 0x10
446 #define ICMP6_RR_FLAGS_PREVDONE 0x08
448 #define rr_type rr_hdr.icmp6_type
449 #define rr_code rr_hdr.icmp6_code
450 #define rr_cksum rr_hdr.icmp6_cksum
451 #define rr_seqnum rr_hdr.icmp6_data32[0]
453 struct rr_pco_match
{ /* match prefix part */
457 uint8_t rpm_matchlen
;
460 uint16_t rpm_reserved
;
461 struct in6_addr rpm_prefix
;
464 #define RPM_PCO_ADD 1
465 #define RPM_PCO_CHANGE 2
466 #define RPM_PCO_SETGLOBAL 3
467 #define RPM_PCO_MAX 4
469 struct rr_pco_use
{ /* use prefix part */
477 struct in6_addr rpu_prefix
;
479 #define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
480 #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
482 #if BYTE_ORDER == BIG_ENDIAN
483 #define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
484 #define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
485 #elif BYTE_ORDER == LITTLE_ENDIAN
486 #define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
487 #define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
490 struct rr_result
{ /* router renumbering result message */
493 uint8_t rrr_matchedlen
;
495 struct in6_addr rrr_prefix
;
497 #if BYTE_ORDER == BIG_ENDIAN
498 #define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
499 #define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
500 #elif BYTE_ORDER == LITTLE_ENDIAN
501 #define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
502 #define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
506 * icmp6 filter structures.
509 struct icmp6_filter
{
510 uint32_t icmp6_filt
[8];
514 #define ICMP6_FILTER_SETPASS(type, filterp) \
515 (((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))
516 #define ICMP6_FILTER_SETBLOCK(type, filterp) \
517 (((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))
518 #define ICMP6_FILTER_WILLPASS(type, filterp) \
519 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
520 #define ICMP6_FILTER_WILLBLOCK(type, filterp) \
521 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
524 #endif /* !_NETINET_ICMP6_H_ */