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