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