The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netinet6/in6_proto.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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_proto.c,v 1.91 2001/05/27 13:28:35 itojun Exp $
   30  */
   31 
   32 /*-
   33  * Copyright (c) 1982, 1986, 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_proto.c  8.1 (Berkeley) 6/10/93
   61  */
   62 
   63 #include <sys/cdefs.h>
   64 __FBSDID("$FreeBSD: releng/6.4/sys/netinet6/in6_proto.c 183529 2008-10-02 00:32:59Z cperciva $");
   65 
   66 #include "opt_inet.h"
   67 #include "opt_inet6.h"
   68 #include "opt_ipsec.h"
   69 #include "opt_ipstealth.h"
   70 #include "opt_carp.h"
   71 
   72 #include <sys/param.h>
   73 #include <sys/socket.h>
   74 #include <sys/socketvar.h>
   75 #include <sys/protosw.h>
   76 #include <sys/kernel.h>
   77 #include <sys/domain.h>
   78 #include <sys/mbuf.h>
   79 #include <sys/systm.h>
   80 #include <sys/sysctl.h>
   81 
   82 #include <net/if.h>
   83 #include <net/radix.h>
   84 #include <net/route.h>
   85 
   86 #include <netinet/in.h>
   87 #include <netinet/in_systm.h>
   88 #include <netinet/in_var.h>
   89 #include <netinet/ip_encap.h>
   90 #include <netinet/ip.h>
   91 #include <netinet/ip_var.h>
   92 #include <netinet/ip6.h>
   93 #include <netinet6/ip6_var.h>
   94 #include <netinet/icmp6.h>
   95 
   96 #include <netinet/tcp.h>
   97 #include <netinet/tcp_timer.h>
   98 #include <netinet/tcp_var.h>
   99 #include <netinet/udp.h>
  100 #include <netinet/udp_var.h>
  101 #include <netinet6/tcp6_var.h>
  102 #include <netinet6/raw_ip6.h>
  103 #include <netinet6/udp6_var.h>
  104 #include <netinet6/pim6_var.h>
  105 #include <netinet6/nd6.h>
  106 
  107 #ifdef IPSEC
  108 #include <netinet6/ipsec.h>
  109 #ifdef INET6
  110 #include <netinet6/ipsec6.h>
  111 #endif
  112 #include <netinet6/ah.h>
  113 #ifdef INET6
  114 #include <netinet6/ah6.h>
  115 #endif
  116 #ifdef IPSEC_ESP
  117 #include <netinet6/esp.h>
  118 #ifdef INET6
  119 #include <netinet6/esp6.h>
  120 #endif
  121 #endif
  122 #include <netinet6/ipcomp.h>
  123 #ifdef INET6
  124 #include <netinet6/ipcomp6.h>
  125 #endif
  126 #endif /* IPSEC */
  127 
  128 #ifdef DEV_CARP
  129 #include <netinet/ip_carp.h>
  130 #endif
  131 
  132 #ifdef FAST_IPSEC
  133 #include <netipsec/ipsec6.h>
  134 #define IPSEC
  135 #define IPSEC_ESP
  136 #define ah6_input       ipsec6_common_input
  137 #define esp6_input      ipsec6_common_input
  138 #define ipcomp6_input   ipsec6_common_input
  139 #endif /* FAST_IPSEC */
  140 
  141 #include <netinet6/ip6protosw.h>
  142 
  143 #include <net/net_osdep.h>
  144 
  145 /*
  146  * TCP/IP protocol family: IP6, ICMP6, UDP, TCP.
  147  */
  148 
  149 extern  struct domain inet6domain;
  150 static  struct pr_usrreqs nousrreqs;
  151 
  152 #define PR_LISTEN       0
  153 #define PR_ABRTACPTDIS  0
  154 
  155 struct ip6protosw inet6sw[] = {
  156 {
  157         .pr_type =              0,
  158         .pr_domain =            &inet6domain,
  159         .pr_protocol =          IPPROTO_IPV6,
  160         .pr_init =              ip6_init,
  161         .pr_slowtimo =          frag6_slowtimo,
  162         .pr_drain =             frag6_drain,
  163         .pr_usrreqs =           &nousrreqs,
  164 },
  165 {
  166         .pr_type =              SOCK_DGRAM,
  167         .pr_domain =            &inet6domain,
  168         .pr_protocol =          IPPROTO_UDP,
  169         .pr_flags =             PR_ATOMIC|PR_ADDR,
  170         .pr_input =             udp6_input,
  171         .pr_ctlinput =          udp6_ctlinput,
  172         .pr_ctloutput =         ip6_ctloutput,
  173         .pr_usrreqs =           &udp6_usrreqs,
  174 },
  175 {
  176         .pr_type =              SOCK_STREAM,
  177         .pr_domain =            &inet6domain,
  178         .pr_protocol =          IPPROTO_TCP,
  179         .pr_flags =             PR_CONNREQUIRED|PR_WANTRCVD|PR_LISTEN,
  180         .pr_input =             tcp6_input,
  181         .pr_ctlinput =          tcp6_ctlinput,
  182         .pr_ctloutput =         tcp_ctloutput,
  183 #ifndef INET    /* don't call initialization and timeout routines twice */
  184         .pr_init =              tcp_init,
  185         .pr_fasttimo =          tcp_fasttimo,
  186         .pr_slowtimo =          tcp_slowtimo,
  187 #endif
  188         .pr_drain =             tcp_drain,
  189         .pr_usrreqs =           &tcp6_usrreqs,
  190 },
  191 {
  192         .pr_type =              SOCK_RAW,
  193         .pr_domain =            &inet6domain,
  194         .pr_protocol =          IPPROTO_RAW,
  195         .pr_flags =             PR_ATOMIC|PR_ADDR,
  196         .pr_input =             rip6_input,
  197         .pr_output =            rip6_output,
  198         .pr_ctlinput =          rip6_ctlinput,
  199         .pr_ctloutput =         rip6_ctloutput,
  200         .pr_usrreqs =           &rip6_usrreqs
  201 },
  202 {
  203         .pr_type =              SOCK_RAW,
  204         .pr_domain =            &inet6domain,
  205         .pr_protocol =          IPPROTO_ICMPV6,
  206         .pr_flags =             PR_ATOMIC|PR_ADDR|PR_LASTHDR,
  207         .pr_input =             icmp6_input,
  208         .pr_output =            rip6_output,
  209         .pr_ctlinput =          rip6_ctlinput,
  210         .pr_ctloutput =         rip6_ctloutput,
  211         .pr_init =              icmp6_init,
  212         .pr_fasttimo =          icmp6_fasttimo,
  213         .pr_usrreqs =           &rip6_usrreqs
  214 },
  215 {
  216         .pr_type =              SOCK_RAW,
  217         .pr_domain =            &inet6domain,
  218         .pr_protocol =          IPPROTO_DSTOPTS,
  219         .pr_flags =             PR_ATOMIC|PR_ADDR,
  220         .pr_input =             dest6_input,
  221         .pr_usrreqs =           &nousrreqs
  222 },
  223 {
  224         .pr_type =              SOCK_RAW,
  225         .pr_domain =            &inet6domain,
  226         .pr_protocol =          IPPROTO_ROUTING,
  227         .pr_flags =             PR_ATOMIC|PR_ADDR,
  228         .pr_input =             route6_input,
  229         .pr_usrreqs =           &nousrreqs
  230 },
  231 {
  232         .pr_type =              SOCK_RAW,
  233         .pr_domain =            &inet6domain,
  234         .pr_protocol =          IPPROTO_FRAGMENT,
  235         .pr_flags =             PR_ATOMIC|PR_ADDR,
  236         .pr_input =             frag6_input,
  237         .pr_usrreqs =           &nousrreqs
  238 },
  239 #ifdef IPSEC
  240 {
  241         .pr_type =              SOCK_RAW,
  242         .pr_domain =            &inet6domain,
  243         .pr_protocol =          IPPROTO_AH,
  244         .pr_flags =             PR_ATOMIC|PR_ADDR,
  245         .pr_input =             ah6_input,
  246         .pr_usrreqs =           &nousrreqs,
  247 },
  248 #ifdef IPSEC_ESP
  249 {
  250         .pr_type =              SOCK_RAW,
  251         .pr_domain =            &inet6domain,
  252         .pr_protocol =          IPPROTO_ESP,
  253         .pr_flags =             PR_ATOMIC|PR_ADDR,
  254         .pr_input =             esp6_input,
  255         .pr_ctlinput =          esp6_ctlinput,
  256         .pr_usrreqs =           &nousrreqs,
  257 },
  258 #endif
  259 {
  260         .pr_type =              SOCK_RAW,
  261         .pr_domain =            &inet6domain,
  262         .pr_protocol =          IPPROTO_IPCOMP,
  263         .pr_flags =             PR_ATOMIC|PR_ADDR,
  264         .pr_input =             ipcomp6_input,
  265         .pr_usrreqs =           &nousrreqs,
  266 },
  267 #endif /* IPSEC */
  268 #ifdef INET
  269 {
  270         .pr_type =              SOCK_RAW,
  271         .pr_domain =            &inet6domain,
  272         .pr_protocol =          IPPROTO_IPV4,
  273         .pr_flags =             PR_ATOMIC|PR_ADDR|PR_LASTHDR,
  274         .pr_input =             encap6_input,
  275         .pr_output =            rip6_output,
  276         .pr_ctloutput =         rip6_ctloutput,
  277         .pr_init =              encap_init,
  278         .pr_usrreqs =           &rip6_usrreqs
  279 },
  280 #endif /* INET */
  281 {
  282         .pr_type =              SOCK_RAW,
  283         .pr_domain =            &inet6domain,
  284         .pr_protocol =          IPPROTO_IPV6,
  285         .pr_flags =             PR_ATOMIC|PR_ADDR|PR_LASTHDR,
  286         .pr_input =             encap6_input,
  287         .pr_output =            rip6_output,
  288         .pr_ctloutput =         rip6_ctloutput,
  289         .pr_init =              encap_init,
  290         .pr_usrreqs =           &rip6_usrreqs
  291 },
  292 {
  293         .pr_type =              SOCK_RAW,
  294         .pr_domain =            &inet6domain,
  295         .pr_protocol =          IPPROTO_PIM,
  296         .pr_flags =             PR_ATOMIC|PR_ADDR|PR_LASTHDR,
  297         .pr_input =             pim6_input,
  298         .pr_output =            rip6_output,
  299         .pr_ctloutput =         rip6_ctloutput,
  300         .pr_usrreqs =           &rip6_usrreqs
  301 },
  302 #ifdef DEV_CARP
  303 {
  304         .pr_type =              SOCK_RAW,
  305         .pr_domain =            &inet6domain,
  306         .pr_protocol =          IPPROTO_CARP,
  307         .pr_flags =             PR_ATOMIC|PR_ADDR,
  308         .pr_input =             carp6_input,
  309         .pr_output =            rip6_output,
  310         .pr_ctloutput =         rip6_ctloutput,
  311         .pr_usrreqs =           &rip6_usrreqs
  312 },
  313 #endif /* DEV_CARP */
  314 /* raw wildcard */
  315 {
  316         .pr_type =              SOCK_RAW,
  317         .pr_domain =            &inet6domain,
  318         .pr_flags =             PR_ATOMIC|PR_ADDR,
  319         .pr_input =             rip6_input,
  320         .pr_output =            rip6_output,
  321         .pr_ctloutput =         rip6_ctloutput,
  322         .pr_usrreqs =           &rip6_usrreqs
  323 },
  324 };
  325 
  326 extern int in6_inithead(void **, int);
  327 
  328 struct domain inet6domain = {
  329         .dom_family =           AF_INET6,
  330         .dom_name =             "internet6",
  331         .dom_protosw =          (struct protosw *)inet6sw,
  332         .dom_protoswNPROTOSW =  (struct protosw *)
  333                                 &inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])],
  334         .dom_rtattach =         in6_inithead,
  335         .dom_rtoffset =         offsetof(struct sockaddr_in6, sin6_addr) << 3,
  336         .dom_maxrtkey =         sizeof(struct sockaddr_in6),
  337         .dom_ifattach =         in6_domifattach,
  338         .dom_ifdetach =         in6_domifdetach
  339 };
  340 
  341 DOMAIN_SET(inet6);
  342 
  343 /*
  344  * Internet configuration info
  345  */
  346 #ifndef IPV6FORWARDING
  347 #ifdef GATEWAY6
  348 #define IPV6FORWARDING  1       /* forward IP6 packets not for us */
  349 #else
  350 #define IPV6FORWARDING  0       /* don't forward IP6 packets not for us */
  351 #endif /* GATEWAY6 */
  352 #endif /* !IPV6FORWARDING */
  353 
  354 #ifndef IPV6_SENDREDIRECTS
  355 #define IPV6_SENDREDIRECTS      1
  356 #endif
  357 int     nd6_onlink_ns_rfc4861 = 0; /* allow 'on-link' nd6 NS (as in RFC 4861) */
  358 
  359 int     ip6_forwarding = IPV6FORWARDING;        /* act as router? */
  360 int     ip6_sendredirects = IPV6_SENDREDIRECTS;
  361 int     ip6_defhlim = IPV6_DEFHLIM;
  362 int     ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;
  363 int     ip6_accept_rtadv = 0;   /* "IPV6FORWARDING ? 0 : 1" is dangerous */
  364 int     ip6_maxfragpackets;     /* initialized in frag6.c:frag6_init() */
  365 int     ip6_maxfrags;   /* initialized in frag6.c:frag6_init() */
  366 int     ip6_log_interval = 5;
  367 int     ip6_hdrnestlimit = 15;  /* How many header options will we process? */
  368 int     ip6_dad_count = 1;      /* DupAddrDetectionTransmits */
  369 int     ip6_auto_flowlabel = 1;
  370 int     ip6_gif_hlim = 0;
  371 int     ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */
  372 int     ip6_rr_prune = 5;       /* router renumbering prefix
  373                                  * walk list every 5 sec. */
  374 int     ip6_mcast_pmtu = 0;     /* enable pMTU discovery for multicast? */
  375 int     ip6_v6only = 1;
  376 
  377 int     ip6_keepfaith = 0;
  378 time_t  ip6_log_time = (time_t)0L;
  379 #ifdef IPSTEALTH
  380 int     ip6stealth = 0;
  381 #endif
  382 int     ip6_rthdr0_allowed = 0; /* Disallow use of routing header 0 */
  383                                 /* by default. */
  384 
  385 /* icmp6 */
  386 /*
  387  * BSDI4 defines these variables in in_proto.c...
  388  * XXX: what if we don't define INET? Should we define pmtu6_expire
  389  * or so? (jinmei@kame.net 19990310)
  390  */
  391 int pmtu_expire = 60*10;
  392 int pmtu_probe = 60*2;
  393 
  394 /* raw IP6 parameters */
  395 /*
  396  * Nominal space allocated to a raw ip socket.
  397  */
  398 #define RIPV6SNDQ       8192
  399 #define RIPV6RCVQ       8192
  400 
  401 u_long  rip6_sendspace = RIPV6SNDQ;
  402 u_long  rip6_recvspace = RIPV6RCVQ;
  403 
  404 /* ICMPV6 parameters */
  405 int     icmp6_rediraccept = 1;          /* accept and process redirects */
  406 int     icmp6_redirtimeout = 10 * 60;   /* 10 minutes */
  407 int     icmp6errppslim = 100;           /* 100pps */
  408 /* control how to respond to NI queries */
  409 int     icmp6_nodeinfo = (ICMP6_NODEINFO_FQDNOK|ICMP6_NODEINFO_NODEADDROK);
  410 
  411 /* UDP on IP6 parameters */
  412 int     udp6_sendspace = 9216;          /* really max datagram size */
  413 int     udp6_recvspace = 40 * (1024 + sizeof(struct sockaddr_in6));
  414                                         /* 40 1K datagrams */
  415 
  416 /*
  417  * sysctl related items.
  418  */
  419 SYSCTL_NODE(_net,       PF_INET6,       inet6,  CTLFLAG_RW,     0,
  420         "Internet6 Family");
  421 
  422 /* net.inet6 */
  423 SYSCTL_NODE(_net_inet6, IPPROTO_IPV6,   ip6,    CTLFLAG_RW, 0,  "IP6");
  424 SYSCTL_NODE(_net_inet6, IPPROTO_ICMPV6, icmp6,  CTLFLAG_RW, 0,  "ICMP6");
  425 SYSCTL_NODE(_net_inet6, IPPROTO_UDP,    udp6,   CTLFLAG_RW, 0,  "UDP6");
  426 SYSCTL_NODE(_net_inet6, IPPROTO_TCP,    tcp6,   CTLFLAG_RW, 0,  "TCP6");
  427 #ifdef IPSEC
  428 SYSCTL_NODE(_net_inet6, IPPROTO_ESP,    ipsec6, CTLFLAG_RW, 0,  "IPSEC6");
  429 #endif /* IPSEC */
  430 
  431 /* net.inet6.ip6 */
  432 static int
  433 sysctl_ip6_temppltime(SYSCTL_HANDLER_ARGS)
  434 {
  435         int error = 0;
  436         int old;
  437 
  438         error = SYSCTL_OUT(req, arg1, sizeof(int));
  439         if (error || !req->newptr)
  440                 return (error);
  441         old = ip6_temp_preferred_lifetime;
  442         error = SYSCTL_IN(req, arg1, sizeof(int));
  443         if (ip6_temp_preferred_lifetime <
  444             ip6_desync_factor + ip6_temp_regen_advance) {
  445                 ip6_temp_preferred_lifetime = old;
  446                 return (EINVAL);
  447         }
  448         return (error);
  449 }
  450 
  451 static int
  452 sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS)
  453 {
  454         int error = 0;
  455         int old;
  456 
  457         error = SYSCTL_OUT(req, arg1, sizeof(int));
  458         if (error || !req->newptr)
  459                 return (error);
  460         old = ip6_temp_valid_lifetime;
  461         error = SYSCTL_IN(req, arg1, sizeof(int));
  462         if (ip6_temp_valid_lifetime < ip6_temp_preferred_lifetime) {
  463                 ip6_temp_preferred_lifetime = old;
  464                 return (EINVAL);
  465         }
  466         return (error);
  467 }
  468 
  469 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING,
  470         forwarding, CTLFLAG_RW,         &ip6_forwarding,        0, "");
  471 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS,
  472         redirect, CTLFLAG_RW,           &ip6_sendredirects,     0, "");
  473 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM,
  474         hlim, CTLFLAG_RW,               &ip6_defhlim,   0, "");
  475 SYSCTL_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RD,
  476         &ip6stat, ip6stat, "");
  477 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS,
  478         maxfragpackets, CTLFLAG_RW,     &ip6_maxfragpackets,    0, "");
  479 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV,
  480         accept_rtadv, CTLFLAG_RW,       &ip6_accept_rtadv,      0, "");
  481 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_KEEPFAITH,
  482         keepfaith, CTLFLAG_RW,          &ip6_keepfaith, 0, "");
  483 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_INTERVAL,
  484         log_interval, CTLFLAG_RW,       &ip6_log_interval,      0, "");
  485 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT,
  486         hdrnestlimit, CTLFLAG_RW,       &ip6_hdrnestlimit,      0, "");
  487 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT,
  488         dad_count, CTLFLAG_RW,  &ip6_dad_count, 0, "");
  489 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_FLOWLABEL,
  490         auto_flowlabel, CTLFLAG_RW,     &ip6_auto_flowlabel,    0, "");
  491 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM,
  492         defmcasthlim, CTLFLAG_RW,       &ip6_defmcasthlim,      0, "");
  493 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM,
  494         gifhlim, CTLFLAG_RW,    &ip6_gif_hlim,                  0, "");
  495 SYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION,
  496         kame_version, CTLFLAG_RD,       __KAME_VERSION,         0, "");
  497 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USE_DEPRECATED,
  498         use_deprecated, CTLFLAG_RW,     &ip6_use_deprecated,    0, "");
  499 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RR_PRUNE,
  500         rr_prune, CTLFLAG_RW,   &ip6_rr_prune,                  0, "");
  501 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USETEMPADDR,
  502         use_tempaddr, CTLFLAG_RW, &ip6_use_tempaddr,            0, "");
  503 SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime,
  504            CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_preferred_lifetime, 0,
  505            sysctl_ip6_temppltime, "I", "");
  506 SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPVLTIME, tempvltime,
  507            CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_valid_lifetime, 0,
  508            sysctl_ip6_tempvltime, "I", "");
  509 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY,
  510         v6only, CTLFLAG_RW,     &ip6_v6only,                    0, "");
  511 TUNABLE_INT("net.inet6.ip6.auto_linklocal", &ip6_auto_linklocal);
  512 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL,
  513         auto_linklocal, CTLFLAG_RW, &ip6_auto_linklocal,        0, "");
  514 SYSCTL_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RD,
  515         &rip6stat, rip6stat, "");
  516 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR,
  517         prefer_tempaddr, CTLFLAG_RW, &ip6_prefer_tempaddr,      0, "");
  518 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USE_DEFAULTZONE,
  519         use_defaultzone, CTLFLAG_RW, &ip6_use_defzone,          0,"");
  520 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS,
  521         maxfrags, CTLFLAG_RW,           &ip6_maxfrags,  0, "");
  522 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MCAST_PMTU,
  523         mcast_pmtu, CTLFLAG_RW,         &ip6_mcast_pmtu,        0, "");
  524 #ifdef IPSTEALTH
  525 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_STEALTH, stealth, CTLFLAG_RW,
  526         &ip6stealth, 0, "");
  527 #endif
  528 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTHDR0_ALLOWED, 
  529            rthdr0_allowed, CTLFLAG_RW, &ip6_rthdr0_allowed, 0, "");
  530 
  531 
  532 /* net.inet6.icmp6 */
  533 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT,
  534         rediraccept, CTLFLAG_RW,        &icmp6_rediraccept,     0, "");
  535 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT,
  536         redirtimeout, CTLFLAG_RW,       &icmp6_redirtimeout,    0, "");
  537 SYSCTL_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RD,
  538         &icmp6stat, icmp6stat, "");
  539 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE,
  540         nd6_prune, CTLFLAG_RW,          &nd6_prune,     0, "");
  541 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY,
  542         nd6_delay, CTLFLAG_RW,          &nd6_delay,     0, "");
  543 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES,
  544         nd6_umaxtries, CTLFLAG_RW,      &nd6_umaxtries, 0, "");
  545 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES,
  546         nd6_mmaxtries, CTLFLAG_RW,      &nd6_mmaxtries, 0, "");
  547 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK,
  548         nd6_useloopback, CTLFLAG_RW,    &nd6_useloopback, 0, "");
  549 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO,
  550         nodeinfo, CTLFLAG_RW,   &icmp6_nodeinfo,        0, "");
  551 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT,
  552         errppslimit, CTLFLAG_RW,        &icmp6errppslim,        0, "");
  553 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXNUDHINT,
  554         nd6_maxnudhint, CTLFLAG_RW,     &nd6_maxnudhint, 0, "");
  555 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG,
  556         nd6_debug, CTLFLAG_RW,  &nd6_debug,             0, "");
  557 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861,
  558         nd6_onlink_ns_rfc4861, CTLFLAG_RW, &nd6_onlink_ns_rfc4861, 0,
  559         "Accept 'on-link' nd6 NS in compliance with RFC 4861.");

Cache object: a151b98ca44c46b866950793cf46243e


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.