in6_proto.c revision 54263
153541Sshin/* 253541Sshin * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 353541Sshin * All rights reserved. 453541Sshin * 553541Sshin * Redistribution and use in source and binary forms, with or without 653541Sshin * modification, are permitted provided that the following conditions 753541Sshin * are met: 853541Sshin * 1. Redistributions of source code must retain the above copyright 953541Sshin * notice, this list of conditions and the following disclaimer. 1053541Sshin * 2. Redistributions in binary form must reproduce the above copyright 1153541Sshin * notice, this list of conditions and the following disclaimer in the 1253541Sshin * documentation and/or other materials provided with the distribution. 1353541Sshin * 3. Neither the name of the project nor the names of its contributors 1453541Sshin * may be used to endorse or promote products derived from this software 1553541Sshin * without specific prior written permission. 1653541Sshin * 1753541Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 1853541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1953541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2053541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2153541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2253541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2353541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2453541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2553541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2653541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2753541Sshin * SUCH DAMAGE. 2853541Sshin * 2953541Sshin * $FreeBSD: head/sys/netinet6/in6_proto.c 54263 1999-12-07 17:39:16Z shin $ 3053541Sshin */ 3153541Sshin 3253541Sshin/* 3353541Sshin * Copyright (c) 1982, 1986, 1993 3453541Sshin * The Regents of the University of California. All rights reserved. 3553541Sshin * 3653541Sshin * Redistribution and use in source and binary forms, with or without 3753541Sshin * modification, are permitted provided that the following conditions 3853541Sshin * are met: 3953541Sshin * 1. Redistributions of source code must retain the above copyright 4053541Sshin * notice, this list of conditions and the following disclaimer. 4153541Sshin * 2. Redistributions in binary form must reproduce the above copyright 4253541Sshin * notice, this list of conditions and the following disclaimer in the 4353541Sshin * documentation and/or other materials provided with the distribution. 4453541Sshin * 3. All advertising materials mentioning features or use of this software 4553541Sshin * must display the following acknowledgement: 4653541Sshin * This product includes software developed by the University of 4753541Sshin * California, Berkeley and its contributors. 4853541Sshin * 4. Neither the name of the University nor the names of its contributors 4953541Sshin * may be used to endorse or promote products derived from this software 5053541Sshin * without specific prior written permission. 5153541Sshin * 5253541Sshin * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 5353541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 5453541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 5553541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 5653541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 5753541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 5853541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 5953541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 6053541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 6153541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 6253541Sshin * SUCH DAMAGE. 6353541Sshin * 6453541Sshin * @(#)in_proto.c 8.1 (Berkeley) 6/10/93 6553541Sshin */ 6653541Sshin 6753541Sshin#include <sys/param.h> 6853541Sshin#include <sys/socket.h> 6953541Sshin#include <sys/socketvar.h> 7053541Sshin#include <sys/protosw.h> 7153541Sshin#include <sys/kernel.h> 7253541Sshin#include <sys/domain.h> 7353541Sshin#include <sys/mbuf.h> 7453541Sshin#include <sys/systm.h> 7553541Sshin#include <sys/sysctl.h> 7653541Sshin 7753541Sshin#include <net/if.h> 7853541Sshin#include <net/radix.h> 7953541Sshin#include <net/route.h> 8053541Sshin 8153541Sshin#include <netinet/in.h> 8253541Sshin#include <netinet/in_systm.h> 8353541Sshin#include <netinet/in_var.h> 8453541Sshin#include <netinet/ip.h> 8553541Sshin#include <netinet/ip_var.h> 8653541Sshin#include <netinet6/ip6.h> 8753541Sshin#include <netinet6/ip6_var.h> 8853541Sshin#include <netinet6/icmp6.h> 8953541Sshin 9053541Sshin#include <netinet/tcp.h> 9153541Sshin#include <netinet/tcp_timer.h> 9253541Sshin#include <netinet/tcp_var.h> 9353541Sshin#include <netinet/udp.h> 9453541Sshin#include <netinet/udp_var.h> 9553541Sshin#include <netinet6/tcp6_var.h> 9653541Sshin#include <netinet6/udp6_var.h> 9753541Sshin 9853541Sshin#include <netinet6/pim6_var.h> 9953541Sshin 10053541Sshin#include <netinet6/nd6.h> 10153541Sshin#include <netinet6/in6_prefix.h> 10253541Sshin 10353541Sshin#ifdef IPSEC 10453541Sshin#include <netinet6/ipsec.h> 10553541Sshin#include <netinet6/ipsec6.h> 10653541Sshin#include <netinet6/ah.h> 10753541Sshin#ifdef IPSEC_ESP 10853541Sshin#include <netinet6/esp.h> 10953541Sshin#endif 11053541Sshin#include <netinet6/ipcomp.h> 11153541Sshin#endif /*IPSEC*/ 11253541Sshin 11353541Sshin#include <netinet6/ip6protosw.h> 11453541Sshin 11554263Sshin#include "gif.h" 11653541Sshin#if NGIF > 0 11753541Sshin#include <netinet6/in6_gif.h> 11853541Sshin#endif 11953541Sshin 12053541Sshin#include <net/net_osdep.h> 12153541Sshin 12253541Sshin#define offsetof(type, member) ((size_t)(&((type *)0)->member)) 12353541Sshin 12453541Sshin/* 12553541Sshin * TCP/IP protocol family: IP6, ICMP6, UDP, TCP. 12653541Sshin */ 12753541Sshin 12853541Sshinextern struct domain inet6domain; 12953541Sshinstatic struct pr_usrreqs nousrreqs; 13053541Sshin 13153541Sshinstruct ip6protosw inet6sw[] = { 13253541Sshin{ 0, &inet6domain, IPPROTO_IPV6, 0, 13353541Sshin 0, 0, 0, 0, 13453541Sshin 0, 13553541Sshin ip6_init, 0, frag6_slowtimo, frag6_drain, 13653541Sshin &nousrreqs, 13753541Sshin}, 13854263Sshin{ SOCK_DGRAM, &inet6domain, IPPROTO_UDP, PR_ATOMIC | PR_ADDR, 13954263Sshin udp6_input, 0, udp6_ctlinput, ip6_ctloutput, 14054263Sshin 0, 14154263Sshin 0, 0, 0, 0, 14254263Sshin &udp6_usrreqs, 14354263Sshin}, 14453541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_RAW, PR_ATOMIC | PR_ADDR, 14553541Sshin rip6_input, rip6_output, 0, rip6_ctloutput, 14653541Sshin 0, 14753541Sshin 0, 0, 0, 0, 14853541Sshin &rip6_usrreqs 14953541Sshin}, 15053541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_ICMPV6, PR_ATOMIC | PR_ADDR, 15153541Sshin icmp6_input, rip6_output, 0, rip6_ctloutput, 15253541Sshin 0, 15353541Sshin icmp6_init, icmp6_fasttimo, 0, 0, 15453541Sshin &rip6_usrreqs 15553541Sshin}, 15653541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_DSTOPTS,PR_ATOMIC|PR_ADDR, 15753541Sshin dest6_input, 0, 0, 0, 15853541Sshin 0, 15953541Sshin 0, 0, 0, 0, 16053541Sshin &nousrreqs 16153541Sshin}, 16253541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_ROUTING,PR_ATOMIC|PR_ADDR, 16353541Sshin route6_input, 0, 0, 0, 16453541Sshin 0, 16553541Sshin 0, 0, 0, 0, 16653541Sshin &nousrreqs 16753541Sshin}, 16853541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_FRAGMENT,PR_ATOMIC|PR_ADDR, 16953541Sshin frag6_input, 0, 0, 0, 17053541Sshin 0, 17153541Sshin 0, 0, 0, 0, 17253541Sshin &nousrreqs 17353541Sshin}, 17453541Sshin#ifdef IPSEC 17553541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, 17653541Sshin ah6_input, 0, 0, 0, 17753541Sshin 0, 17853541Sshin 0, 0, 0, 0, 17953541Sshin &nousrreqs, 18053541Sshin}, 18153541Sshin#ifdef IPSEC_ESP 18253541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR, 18353541Sshin esp6_input, 0, 0, 0, 18453541Sshin 0, 18553541Sshin 0, 0, 0, 0, 18653541Sshin &nousrreqs, 18753541Sshin}, 18853541Sshin#endif 18953541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR, 19053541Sshin ipcomp6_input, 0, 0, 0, 19153541Sshin 0, 19253541Sshin 0, 0, 0, 0, 19353541Sshin &nousrreqs, 19453541Sshin}, 19553541Sshin#endif /* IPSEC */ 19653541Sshin#if NGIF > 0 19753541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR, 19853541Sshin in6_gif_input,0, 0, 0, 19954263Sshin 0, 20053541Sshin 0, 0, 0, 0, 20153541Sshin &nousrreqs 20253541Sshin}, 20353541Sshin{ SOCK_RAW, &inet6domain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR, 20453541Sshin in6_gif_input,0, 0, 0, 20554263Sshin 0, 20653541Sshin 0, 0, 0, 0, 20753541Sshin &nousrreqs 20853541Sshin}, 20953541Sshin#endif /* GIF */ 21053541Sshin/* raw wildcard */ 21153541Sshin{ SOCK_RAW, &inet6domain, 0, PR_ATOMIC | PR_ADDR, 21253541Sshin rip6_input, rip6_output, 0, rip6_ctloutput, 21353541Sshin 0, 21453541Sshin 0, 0, 0, 0, 21553541Sshin &rip6_usrreqs 21653541Sshin}, 21753541Sshin}; 21853541Sshin 21953541Sshinextern int in6_inithead __P((void **, int)); 22053541Sshin 22153541Sshinstruct domain inet6domain = 22253541Sshin { AF_INET6, "internet6", 0, 0, 0, 22353541Sshin (struct protosw *)inet6sw, 22453541Sshin (struct protosw *)&inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])], 0, 22553541Sshin in6_inithead, 22653541Sshin offsetof(struct sockaddr_in6, sin6_addr) << 3, 22753541Sshin sizeof(struct sockaddr_in6) }; 22853541Sshin 22953541SshinDOMAIN_SET(inet6); 23053541Sshin 23153541Sshin/* 23253541Sshin * Internet configuration info 23353541Sshin */ 23453541Sshin#ifndef IPV6FORWARDING 23553541Sshin#ifdef GATEWAY6 23653541Sshin#define IPV6FORWARDING 1 /* forward IP6 packets not for us */ 23753541Sshin#else 23853541Sshin#define IPV6FORWARDING 0 /* don't forward IP6 packets not for us */ 23953541Sshin#endif /* GATEWAY6 */ 24053541Sshin#endif /* !IPV6FORWARDING */ 24153541Sshin 24253541Sshin#ifndef IPV6_SENDREDIRECTS 24353541Sshin#define IPV6_SENDREDIRECTS 1 24453541Sshin#endif 24553541Sshin 24653541Sshinint ip6_forwarding = IPV6FORWARDING; /* act as router? */ 24753541Sshinint ip6_sendredirects = IPV6_SENDREDIRECTS; 24853541Sshinint ip6_defhlim = IPV6_DEFHLIM; 24953541Sshinint ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS; 25053541Sshinint ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */ 25153541Sshinint ip6_maxfragpackets = 200; 25253541Sshinint ip6_log_interval = 5; 25353541Sshinint ip6_hdrnestlimit = 50; /* appropriate? */ 25453541Sshinint ip6_dad_count = 1; /* DupAddrDetectionTransmits */ 25553541Sshinu_int32_t ip6_flow_seq; 25653541Sshinint ip6_auto_flowlabel = 1; 25753541Sshin#if NGIF > 0 25853541Sshinint ip6_gif_hlim = GIF_HLIM; 25953541Sshin#else 26053541Sshinint ip6_gif_hlim = 0; 26153541Sshin#endif 26253541Sshinint ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */ 26353541Sshinint ip6_rr_prune = 5; /* router renumbering prefix 26453541Sshin * walk list every 5 sec. */ 26553541Sshinint ip6_mapped_addr_on = 1; 26653541Sshin 26753541Sshinu_int32_t ip6_id = 0UL; 26853541Sshinint ip6_keepfaith = 0; 26953541Sshintime_t ip6_log_time = (time_t)0L; 27053541Sshin 27153541Sshin/* icmp6 */ 27253541Sshin/* 27353541Sshin * BSDI4 defines these variables in in_proto.c... 27453541Sshin * XXX: what if we don't define INET? Should we define pmtu6_expire 27553541Sshin * or so? (jinmei@kame.net 19990310) 27653541Sshin */ 27753541Sshinint pmtu_expire = 60*10; 27853541Sshinint pmtu_probe = 60*2; 27953541Sshin 28053541Sshin/* raw IP6 parameters */ 28153541Sshin/* 28253541Sshin * Nominal space allocated to a raw ip socket. 28353541Sshin */ 28453541Sshin#define RIPV6SNDQ 8192 28553541Sshin#define RIPV6RCVQ 8192 28653541Sshin 28753541Sshinu_long rip6_sendspace = RIPV6SNDQ; 28853541Sshinu_long rip6_recvspace = RIPV6RCVQ; 28953541Sshin 29053541Sshin/* ICMPV6 parameters */ 29153541Sshinint icmp6_rediraccept = 1; /* accept and process redirects */ 29253541Sshinint icmp6_redirtimeout = 10 * 60; /* 10 minutes */ 29353541Sshinu_int icmp6errratelim = 1000; /* 1000usec = 1msec */ 29453541Sshin 29553541Sshin/* UDP on IP6 parameters */ 29653541Sshinint udp6_sendspace = 9216; /* really max datagram size */ 29753541Sshinint udp6_recvspace = 40 * (1024 + sizeof(struct sockaddr_in6)); 29853541Sshin /* 40 1K datagrams */ 29953541Sshin 30053541Sshin/* 30153541Sshin * sysctl related items. 30253541Sshin */ 30353541SshinSYSCTL_NODE(_net, PF_INET6, inet6, CTLFLAG_RW, 0, 30453541Sshin "Internet6 Family"); 30553541Sshin 30653541Sshin/* net.inet6 */ 30753541SshinSYSCTL_NODE(_net_inet6, IPPROTO_IPV6, ip6, CTLFLAG_RW, 0, "IP6"); 30853541SshinSYSCTL_NODE(_net_inet6, IPPROTO_ICMPV6, icmp6, CTLFLAG_RW, 0, "ICMP6"); 30953541SshinSYSCTL_NODE(_net_inet6, IPPROTO_UDP, udp6, CTLFLAG_RW, 0, "UDP6"); 31053541SshinSYSCTL_NODE(_net_inet6, IPPROTO_TCP, tcp6, CTLFLAG_RW, 0, "TCP6"); 31153541Sshin#ifdef IPSEC 31253541SshinSYSCTL_NODE(_net_inet6, IPPROTO_ESP, ipsec6, CTLFLAG_RW, 0, "IPSEC6"); 31353541Sshin#endif /* IPSEC */ 31453541Sshin 31553541Sshin/* net.inet6.ip6 */ 31653541Sshinstatic int 31753541Sshinsysctl_ip6_forwarding SYSCTL_HANDLER_ARGS 31853541Sshin{ 31953541Sshin int error = 0; 32053541Sshin int old_ip6_forwarding; 32153541Sshin int changed; 32253541Sshin 32353541Sshin error = SYSCTL_OUT(req, arg1, sizeof(int)); 32453541Sshin if (error || !req->newptr) 32553541Sshin return (error); 32653541Sshin old_ip6_forwarding = ip6_forwarding; 32753541Sshin error = SYSCTL_IN(req, arg1, sizeof(int)); 32853541Sshin if (error != 0) 32953541Sshin return (error); 33053541Sshin changed = (ip6_forwarding ? 1 : 0) ^ (old_ip6_forwarding ? 1 : 0); 33153541Sshin if (changed == 0) 33253541Sshin return (error); 33353541Sshin if (ip6_forwarding != 0) { /* host becomes router */ 33453541Sshin int s = splnet(); 33553541Sshin struct nd_prefix *pr, *next; 33653541Sshin 33754263Sshin for (pr = LIST_FIRST(&nd_prefix); pr; pr = next) { 33854263Sshin next = LIST_NEXT(pr, ndpr_entry); 33953541Sshin if (!IN6_IS_ADDR_UNSPECIFIED(&pr->ndpr_addr)) 34053541Sshin in6_ifdel(pr->ndpr_ifp, &pr->ndpr_addr); 34153541Sshin prelist_remove(pr); 34253541Sshin } 34353541Sshin splx(s); 34453541Sshin } else { /* router becomes host */ 34553541Sshin struct socket so; 34653541Sshin 34753541Sshin /* XXX: init dummy so */ 34853541Sshin bzero(&so, sizeof(so)); 34953541Sshin while(!LIST_EMPTY(&rr_prefix)) 35053541Sshin delete_each_prefix(&so, LIST_FIRST(&rr_prefix), 35153541Sshin PR_ORIG_KERNEL); 35253541Sshin } 35353541Sshin 35453541Sshin return (error); 35553541Sshin} 35653541Sshin 35753541SshinSYSCTL_OID(_net_inet6_ip6, IPV6CTL_FORWARDING, forwarding, 35853541Sshin CTLTYPE_INT|CTLFLAG_RW, &ip6_forwarding, 0, sysctl_ip6_forwarding, 35953541Sshin "I", ""); 36053541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, 36153541Sshin redirect, CTLFLAG_RW, &ip6_sendredirects, 0, ""); 36253541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, 36353541Sshin hlim, CTLFLAG_RW, &ip6_defhlim, 0, ""); 36453541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, 36553541Sshin maxfragpackets, CTLFLAG_RW, &ip6_maxfragpackets, 0, ""); 36653541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, 36753541Sshin accept_rtadv, CTLFLAG_RW, &ip6_accept_rtadv, 0, ""); 36853541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_KEEPFAITH, 36953541Sshin keepfaith, CTLFLAG_RW, &ip6_keepfaith, 0, ""); 37053541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_INTERVAL, 37153541Sshin log_interval, CTLFLAG_RW, &ip6_log_interval, 0, ""); 37253541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT, 37353541Sshin hdrnestlimit, CTLFLAG_RW, &ip6_hdrnestlimit, 0, ""); 37453541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT, 37553541Sshin dad_count, CTLFLAG_RW, &ip6_dad_count, 0, ""); 37653541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_FLOWLABEL, 37753541Sshin auto_flowlabel, CTLFLAG_RW, &ip6_auto_flowlabel, 0, ""); 37853541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM, 37953541Sshin defmcasthlim, CTLFLAG_RW, &ip6_defmcasthlim, 0, ""); 38053541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, 38153541Sshin gifhlim, CTLFLAG_RW, &ip6_gif_hlim, 0, ""); 38254263SshinSYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION, 38354263Sshin kame_version, CTLFLAG_RD, __KAME_VERSION, 0, ""); 38453541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_USE_DEPRECATED, 38553541Sshin use_deprecated, CTLFLAG_RW, &ip6_use_deprecated, 0, ""); 38653541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_RR_PRUNE, 38753541Sshin rr_prune, CTLFLAG_RW, &ip6_rr_prune, 0, ""); 38853541SshinSYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAPPED_ADDR, 38953541Sshin mapped_addr, CTLFLAG_RW, &ip6_mapped_addr_on, 0, ""); 39053541Sshin 39153541Sshin/* net.inet6.icmp6 */ 39253541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, 39353541Sshin rediraccept, CTLFLAG_RW, &icmp6_rediraccept, 0, ""); 39453541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, 39553541Sshin redirtimeout, CTLFLAG_RW, &icmp6_redirtimeout, 0, ""); 39653541SshinSYSCTL_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RD, 39753541Sshin &icmp6stat, icmp6stat, ""); 39853541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRRATELIMIT, 39953541Sshin errratelimit, CTLFLAG_RW, &icmp6errratelim, 0, ""); 40053541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, 40153541Sshin nd6_prune, CTLFLAG_RW, &nd6_prune, 0, ""); 40253541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY, 40353541Sshin nd6_delay, CTLFLAG_RW, &nd6_delay, 0, ""); 40453541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES, 40553541Sshin nd6_umaxtries, CTLFLAG_RW, &nd6_umaxtries, 0, ""); 40653541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES, 40753541Sshin nd6_mmaxtries, CTLFLAG_RW, &nd6_mmaxtries, 0, ""); 40853541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK, 40953541Sshin nd6_useloopback, CTLFLAG_RW, &nd6_useloopback, 0, ""); 41053541SshinSYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PROXYALL, 41153541Sshin nd6_proxyall, CTLFLAG_RW, &nd6_proxyall, 0, ""); 412