1 /*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 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. 16 * 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 27 * SUCH DAMAGE. 28 * 29 * $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ 30 */ 31 32 /*- 33 * Copyright (c) 1982, 1986, 1990, 1993 34 * The Regents of the University of California. All rights reserved. 35 * 36 * Redistribution and use in source and binary forms, with or without 37 * modification, are permitted provided that the following conditions 38 * are met: 39 * 1. Redistributions of source code must retain the above copyright 40 * notice, this list of conditions and the following disclaimer. 41 * 2. Redistributions in binary form must reproduce the above copyright 42 * notice, this list of conditions and the following disclaimer in the 43 * documentation and/or other materials provided with the distribution. 44 * 4. Neither the name of the University nor the names of its contributors 45 * may be used to endorse or promote products derived from this software 46 * without specific prior written permission. 47 * 48 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 49 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 50 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 51 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in.h 8.3 (Berkeley) 1/3/94 61 * $FreeBSD$ 62 */ 63 64 #ifndef __KAME_NETINET_IN_H_INCLUDED_ 65 #error "do not include netinet6/in6.h directly, include netinet/in.h. see RFC2553" 66 #endif 67 68 #ifndef _NETINET6_IN6_H_ 69 #define _NETINET6_IN6_H_ 70 71 /* 72 * Identification of the network protocol stack 73 * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE 74 * has the table of implementation/integration differences. 75 */ 76 #define __KAME__ 77 #define __KAME_VERSION "FreeBSD" 78 79 /* 80 * IPv6 port allocation rules should mirror the IPv4 rules and are controlled 81 * by the net.inet.ip.portrange sysctl tree. The following defines exist 82 * for compatibility with userland applications that need them. 83 */ 84 #if __BSD_VISIBLE 85 #define IPV6PORT_RESERVED 1024 86 #define IPV6PORT_ANONMIN 49152 87 #define IPV6PORT_ANONMAX 65535 88 #define IPV6PORT_RESERVEDMIN 600 89 #define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1) 90 #endif 91 92 /* 93 * IPv6 address 94 */ 95 struct in6_addr { 96 union { 97 uint8_t __u6_addr8[16]; 98 uint16_t __u6_addr16[8]; 99 uint32_t __u6_addr32[4]; 100 } __u6_addr; /* 128-bit IP6 address */ 101 }; 102 103 #define s6_addr __u6_addr.__u6_addr8 104 105 #define INET6_ADDRSTRLEN 46 106 107 /* 108 * XXX missing POSIX.1-2001 macro IPPROTO_IPV6. 109 */ 110 111 /* 112 * Socket address for IPv6 113 */ 114 #if __BSD_VISIBLE 115 #define SIN6_LEN 116 #endif 117 118 struct sockaddr_in6 { 119 uint8_t sin6_len; /* length of this struct */ 120 sa_family_t sin6_family; /* AF_INET6 */ 121 in_port_t sin6_port; /* Transport layer port # */ 122 uint32_t sin6_flowinfo; /* IP6 flow information */ 123 struct in6_addr sin6_addr; /* IP6 address */ 124 uint32_t sin6_scope_id; /* scope zone index */ 125 }; 126 127 /* 128 * Definition of some useful macros to handle IP6 addresses 129 */ 130 #if __BSD_VISIBLE 131 #define IN6ADDR_ANY_INIT \ 132 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 133 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} 134 #define IN6ADDR_LOOPBACK_INIT \ 135 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} 137 #define IN6ADDR_NODELOCAL_ALLNODES_INIT \ 138 {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} 140 #define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \ 141 {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} 143 #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ 144 {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} 146 #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ 147 {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 148 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}} 149 #define IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT \ 150 {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 }}} 152 #endif 153 154 extern const struct in6_addr in6addr_any; 155 extern const struct in6_addr in6addr_loopback; 156 #if __BSD_VISIBLE 157 extern const struct in6_addr in6addr_nodelocal_allnodes; 158 extern const struct in6_addr in6addr_linklocal_allnodes; 159 extern const struct in6_addr in6addr_linklocal_allrouters; 160 extern const struct in6_addr in6addr_linklocal_allv2routers; 161 #endif 162 163 /* 164 * Unspecified 165 */ 166 #define IN6_IS_ADDR_UNSPECIFIED(a) \ 167 ((a)->__u6_addr.__u6_addr32[0] == 0 && \ 168 (a)->__u6_addr.__u6_addr32[1] == 0 && \ 169 (a)->__u6_addr.__u6_addr32[2] == 0 && \ 170 (a)->__u6_addr.__u6_addr32[3] == 0) 171 172 /* 173 * Loopback 174 */ 175 #define IN6_IS_ADDR_LOOPBACK(a) \ 176 ((a)->__u6_addr.__u6_addr32[0] == 0 && \ 177 (a)->__u6_addr.__u6_addr32[1] == 0 && \ 178 (a)->__u6_addr.__u6_addr32[2] == 0 && \ 179 (a)->__u6_addr.__u6_addr32[3] == ntohl(1)) 180 181 /* 182 * IPv4 compatible 183 */ 184 #define IN6_IS_ADDR_V4COMPAT(a) \ 185 ((a)->__u6_addr.__u6_addr32[0] == 0 && \ 186 (a)->__u6_addr.__u6_addr32[1] == 0 && \ 187 (a)->__u6_addr.__u6_addr32[2] == 0 && \ 188 (a)->__u6_addr.__u6_addr32[3] != 0 && \ 189 (a)->__u6_addr.__u6_addr32[3] != ntohl(1)) 190 191 /* 192 * Mapped 193 */ 194 #define IN6_IS_ADDR_V4MAPPED(a) \ 195 ((a)->__u6_addr.__u6_addr32[0] == 0 && \ 196 (a)->__u6_addr.__u6_addr32[1] == 0 && \ 197 (a)->__u6_addr.__u6_addr32[2] == ntohl(0x0000ffff)) 198 199 /* 200 * Unicast Scope 201 * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). 202 */ 203 #define IN6_IS_ADDR_LINKLOCAL(a) \ 204 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) 205 #define IN6_IS_ADDR_SITELOCAL(a) \ 206 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) 207 208 /* 209 * Multicast 210 */ 211 #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) 212 213 #define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) 214 215 #define IN6_IS_ADDR_MC_NODELOCAL(a) \ 216 (IN6_IS_ADDR_MULTICAST(a) && \ 217 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL)) 218 #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ 219 (IN6_IS_ADDR_MULTICAST(a) && \ 220 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL)) 221 #define IN6_IS_ADDR_MC_SITELOCAL(a) \ 222 (IN6_IS_ADDR_MULTICAST(a) && \ 223 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL)) 224 #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ 225 (IN6_IS_ADDR_MULTICAST(a) && \ 226 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL)) 227 #define IN6_IS_ADDR_MC_GLOBAL(a) \ 228 (IN6_IS_ADDR_MULTICAST(a) && \ 229 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL)) 230 231 /* 232 * IP6 route structure 233 */ 234 #if __BSD_VISIBLE 235 struct route_in6 { 236 struct rtentry *ro_rt; 237 struct llentry *ro_lle; 238 /* 239 * ro_prepend and ro_plen are only used for bpf to pass in a 240 * preformed header. They are not cacheable. 241 */ 242 char *ro_prepend; 243 uint16_t ro_plen; 244 uint16_t ro_flags; 245 uint16_t ro_mtu; /* saved ro_rt mtu */ 246 uint16_t spare; 247 struct sockaddr_in6 ro_dst; 248 }; 249 #endif 250 251 #define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */ 252 #define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */ 253 #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ 254 #define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ 255 #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 multicast loopback */ 256 #define IPV6_JOIN_GROUP 12 /* ipv6_mreq; join a group membership */ 257 #define IPV6_LEAVE_GROUP 13 /* ipv6_mreq; leave a group membership */ 258 #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ 259 #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ 260 261 #define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */ 262 #define IPV6_V6ONLY 27 /* bool; make AF_INET6 sockets v6 only */ 263 #define IPV6_BINDV6ONLY IPV6_V6ONLY 264 265 #if 1 /* IPSEC */ 266 #define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ 267 #endif /* IPSEC */ 268 269 /* 29; unused; was IPV6_FAITH */ 270 #if 1 /* IPV6FIREWALL */ 271 #define IPV6_FW_ADD 30 /* add a firewall rule to chain */ 272 #define IPV6_FW_DEL 31 /* delete a firewall rule from chain */ 273 #define IPV6_FW_FLUSH 32 /* flush firewall rule chain */ 274 #define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */ 275 #define IPV6_FW_GET 34 /* get entire firewall rule chain */ 276 #endif 277 278 /* new socket options introduced in RFC3542 */ 279 #define IPV6_RTHDRDSTOPTS 35 /* ip6_dest; send dst option before rthdr */ 280 281 #define IPV6_RECVPKTINFO 36 /* bool; recv if, dst addr */ 282 #define IPV6_RECVHOPLIMIT 37 /* bool; recv hop limit */ 283 #define IPV6_RECVRTHDR 38 /* bool; recv routing header */ 284 #define IPV6_RECVHOPOPTS 39 /* bool; recv hop-by-hop option */ 285 #define IPV6_RECVDSTOPTS 40 /* bool; recv dst option after rthdr */ 286 287 #define IPV6_USE_MIN_MTU 42 /* bool; send packets at the minimum MTU */ 288 #define IPV6_RECVPATHMTU 43 /* bool; notify an according MTU */ 289 290 #define IPV6_PATHMTU 44 /* mtuinfo; get the current path MTU (sopt), 291 4 bytes int; MTU notification (cmsg) */ 292 #if 0 /*obsoleted during 2292bis -> 3542*/ 293 #define IPV6_REACHCONF 45 /* no data; ND reachability confirm 294 (cmsg only/not in of RFC3542) */ 295 #endif 296 297 /* more new socket options introduced in RFC3542 */ 298 #define IPV6_PKTINFO 46 /* in6_pktinfo; send if, src addr */ 299 #define IPV6_HOPLIMIT 47 /* int; send hop limit */ 300 #define IPV6_NEXTHOP 48 /* sockaddr; next hop addr */ 301 #define IPV6_HOPOPTS 49 /* ip6_hbh; send hop-by-hop option */ 302 #define IPV6_DSTOPTS 50 /* ip6_dest; send dst option befor rthdr */ 303 #define IPV6_RTHDR 51 /* ip6_rthdr; send routing header */ 304 #if 0 305 #define IPV6_PKTOPTIONS 52 /* buf/cmsghdr; set/get IPv6 options */ 306 /* obsoleted by RFC3542 */ 307 #endif 308 309 #define IPV6_RECVTCLASS 57 /* bool; recv traffic class values */ 310 311 #define IPV6_AUTOFLOWLABEL 59 /* bool; attach flowlabel automagically */ 312 313 #define IPV6_TCLASS 61 /* int; send traffic class value */ 314 #define IPV6_DONTFRAG 62 /* bool; disable IPv6 fragmentation */ 315 316 #define IPV6_PREFER_TEMPADDR 63 /* int; prefer temporary addresses as 317 * the source address. 318 */ 319 320 #define IPV6_BINDANY 64 /* bool: allow bind to any address */ 321 322 #define IPV6_BINDMULTI 65 /* bool; allow multibind to same addr/port */ 323 #define IPV6_RSS_LISTEN_BUCKET 66 /* int; set RSS listen bucket */ 324 #define IPV6_FLOWID 67 /* int; flowid of given socket */ 325 #define IPV6_FLOWTYPE 68 /* int; flowtype of given socket */ 326 #define IPV6_RSSBUCKETID 69 /* int; RSS bucket ID of given socket */ 327 #define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ 328 #define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ 329 330 /* 331 * The following option is private; do not use it from user applications. 332 * It is deliberately defined to the same value as IP_MSFILTER. 333 */ 334 #define IPV6_MSFILTER 74 /* struct __msfilterreq; 335 * set/get multicast source filter list. 336 */ 337 338 /* to define items, should talk with KAME guys first, for *BSD compatibility */ 339 340 #define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. XXX old spec */ 341 #define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. XXX old spec */ 342 #define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */ 343 344 /* 345 * Defaults and limits for options 346 */ 347 #define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */ 348 #define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ 349 350 /* 351 * The im6o_membership vector for each socket is now dynamically allocated at 352 * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized 353 * according to a power-of-two increment. 354 */ 355 #define IPV6_MIN_MEMBERSHIPS 31 356 #define IPV6_MAX_MEMBERSHIPS 4095 357 358 /* 359 * Default resource limits for IPv6 multicast source filtering. 360 * These may be modified by sysctl. 361 */ 362 #define IPV6_MAX_GROUP_SRC_FILTER 512 /* sources per group */ 363 #define IPV6_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ 364 365 /* 366 * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. 367 */ 368 struct ipv6_mreq { 369 struct in6_addr ipv6mr_multiaddr; 370 unsigned int ipv6mr_interface; 371 }; 372 373 /* 374 * IPV6_PKTINFO: Packet information(RFC2292 sec 5) 375 */ 376 struct in6_pktinfo { 377 struct in6_addr ipi6_addr; /* src/dst IPv6 address */ 378 unsigned int ipi6_ifindex; /* send/recv interface index */ 379 }; 380 381 /* 382 * Control structure for IPV6_RECVPATHMTU socket option. 383 */ 384 struct ip6_mtuinfo { 385 struct sockaddr_in6 ip6m_addr; /* or sockaddr_storage? */ 386 uint32_t ip6m_mtu; 387 }; 388 389 /* 390 * Argument for IPV6_PORTRANGE: 391 * - which range to search when port is unspecified at bind() or connect() 392 */ 393 #define IPV6_PORTRANGE_DEFAULT 0 /* default range */ 394 #define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ 395 #define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ 396 397 #if __BSD_VISIBLE 398 /* 399 * Definitions for inet6 sysctl operations. 400 * 401 * Third level is protocol number. 402 * Fourth level is desired variable within that protocol. 403 */ 404 #define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */ 405 406 /* 407 * Names for IP sysctl objects 408 */ 409 #define IPV6CTL_FORWARDING 1 /* act as router */ 410 #define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding*/ 411 #define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */ 412 #ifdef notyet 413 #define IPV6CTL_DEFMTU 4 /* default MTU */ 414 #endif 415 #define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */ 416 #define IPV6CTL_STATS 6 /* stats */ 417 #define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */ 418 #define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */ 419 #define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */ 420 #define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */ 421 #define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */ 422 #define IPV6CTL_ACCEPT_RTADV 12 423 /* 13; unused; was: IPV6CTL_KEEPFAITH */ 424 #define IPV6CTL_LOG_INTERVAL 14 425 #define IPV6CTL_HDRNESTLIMIT 15 426 #define IPV6CTL_DAD_COUNT 16 427 #define IPV6CTL_AUTO_FLOWLABEL 17 428 #define IPV6CTL_DEFMCASTHLIM 18 429 #define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */ 430 #define IPV6CTL_KAME_VERSION 20 431 #define IPV6CTL_USE_DEPRECATED 21 /* use deprecated addr (RFC2462 5.5.4) */ 432 #define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */ 433 #if 0 /* obsolete */ 434 #define IPV6CTL_MAPPED_ADDR 23 435 #endif 436 #define IPV6CTL_V6ONLY 24 437 /* IPV6CTL_RTEXPIRE 25 deprecated */ 438 /* IPV6CTL_RTMINEXPIRE 26 deprecated */ 439 /* IPV6CTL_RTMAXCACHE 27 deprecated */ 440 441 #define IPV6CTL_USETEMPADDR 32 /* use temporary addresses (RFC3041) */ 442 #define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */ 443 #define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */ 444 #define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */ 445 #define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */ 446 #define IPV6CTL_PREFER_TEMPADDR 37 /* prefer temporary addr as src */ 447 #define IPV6CTL_ADDRCTLPOLICY 38 /* get/set address selection policy */ 448 #define IPV6CTL_USE_DEFAULTZONE 39 /* use default scope zone */ 449 450 #define IPV6CTL_MAXFRAGS 41 /* max fragments */ 451 #if 0 452 #define IPV6CTL_IFQ 42 /* ip6intrq node */ 453 #define IPV6CTL_ISATAPRTR 43 /* isatap router */ 454 #endif 455 #define IPV6CTL_MCAST_PMTU 44 /* enable pMTU discovery for multicast? */ 456 457 /* New entries should be added here from current IPV6CTL_MAXID value. */ 458 /* to define items, should talk with KAME guys first, for *BSD compatibility */ 459 #define IPV6CTL_STEALTH 45 460 461 #define ICMPV6CTL_ND6_ONLINKNSRFC4861 47 462 #define IPV6CTL_NO_RADR 48 /* No defroute from RA */ 463 #define IPV6CTL_NORBIT_RAIF 49 /* Disable R-bit in NA on RA 464 * receiving IF. */ 465 #define IPV6CTL_RFC6204W3 50 /* Accept defroute even when forwarding 466 enabled */ 467 #define IPV6CTL_MAXID 51 468 #endif /* __BSD_VISIBLE */ 469 470 /* 471 * Since both netinet/ and netinet6/ call into netipsec/ and netpfil/, 472 * the protocol specific mbuf flags are shared between them. 473 */ 474 #define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */ 475 #define M_IP6_NEXTHOP M_PROTO2 /* explicit ip nexthop */ 476 #define M_IP_NEXTHOP M_PROTO2 /* explicit ip nexthop */ 477 #define M_SKIP_FIREWALL M_PROTO3 /* skip firewall processing */ 478 #define M_AUTHIPHDR M_PROTO4 479 #define M_DECRYPTED M_PROTO5 480 #define M_LOOP M_PROTO6 481 #define M_AUTHIPDGM M_PROTO7 482 #define M_RTALERT_MLD M_PROTO8 483 #ifndef _SIZE_T_DECLARED 484 typedef __size_t size_t; 485 #define _SIZE_T_DECLARED 486 #endif 487 488 #ifndef _SOCKLEN_T_DECLARED 489 typedef __socklen_t socklen_t; 490 #define _SOCKLEN_T_DECLARED 491 #endif 492 493 #endif /* !_NETINET6_IN6_H_ */ 494