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

Cache object: 73ba7997e90fdec4db7e748cee184596


[ 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.