in6_proto.c revision 1.1.2.1 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
30 /*
31 * Copyright (c) 1982, 1986, 1993
32 * The Regents of the University of California. All rights reserved.
33 *
34 * Redistribution and use in source and binary forms, with or without
35 * modification, are permitted provided that the following conditions
36 * are met:
37 * 1. Redistributions of source code must retain the above copyright
38 * notice, this list of conditions and the following disclaimer.
39 * 2. Redistributions in binary form must reproduce the above copyright
40 * notice, this list of conditions and the following disclaimer in the
41 * documentation and/or other materials provided with the distribution.
42 * 3. All advertising materials mentioning features or use of this software
43 * must display the following acknowledgement:
44 * This product includes software developed by the University of
45 * California, Berkeley and its contributors.
46 * 4. Neither the name of the University nor the names of its contributors
47 * may be used to endorse or promote products derived from this software
48 * without specific prior written permission.
49 *
50 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
51 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
54 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
56 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
59 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
60 * SUCH DAMAGE.
61 *
62 * @(#)in_proto.c 8.1 (Berkeley) 6/10/93
63 */
64
65 #if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__NetBSD__)
66 #include "opt_inet.h"
67 #endif
68
69 #include <sys/param.h>
70 #include <sys/socket.h>
71 #include <sys/protosw.h>
72 #include <sys/kernel.h>
73 #include <sys/domain.h>
74 #include <sys/mbuf.h>
75
76 #include <net/if.h>
77 #ifdef RADISH
78 #include <net/radish.h>
79 #else /* RADISH */
80 #include <net/radix.h>
81 #endif /* RADISH */
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 <netinet6/in6_systm.h>
88 #if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || (defined(__NetBSD__) && !defined(TCP6))
89 #include <netinet/ip.h>
90 #include <netinet/ip_var.h>
91 #endif
92 #if defined(__NetBSD__) && !defined(TCP6)
93 #include <netinet/in_pcb.h>
94 #endif
95 #include <netinet6/ip6.h>
96 #include <netinet6/ip6_var.h>
97 #include <netinet6/icmp6.h>
98 #if !defined(__FreeBSD__) || __FreeBSD__ < 3
99 #include <netinet6/in6_pcb.h>
100 #endif
101
102 #if (defined(__FreeBSD__) && __FreeBSD__ >= 3)
103 #include <netinet/tcp.h>
104 #include <netinet/tcp_timer.h>
105 #include <netinet/tcp_var.h>
106 #include <netinet/udp.h>
107 #include <netinet/udp_var.h>
108 #else
109 #if defined(__NetBSD__) && !defined(TCP6)
110 #include <netinet/tcp.h>
111 #include <netinet/tcp_fsm.h>
112 #include <netinet/tcp_seq.h>
113 #include <netinet/tcp_timer.h>
114 #include <netinet/tcp_var.h>
115 #include <netinet/tcpip.h>
116 #include <netinet/tcp_debug.h>
117 #else
118 #include <netinet6/tcp6.h>
119 #include <netinet6/tcp6_fsm.h>
120 #include <netinet6/tcp6_seq.h>
121 #include <netinet6/tcp6_timer.h>
122 #include <netinet6/tcp6_var.h>
123 #endif
124 #endif
125
126 #include <netinet6/udp6.h>
127 #include <netinet6/udp6_var.h>
128
129 #include <netinet6/pim6_var.h>
130
131 #include <netinet6/nd6.h>
132
133 #ifdef IPSEC
134 #include <netinet6/ah.h>
135 #ifdef IPSEC_ESP
136 #include <netinet6/esp.h>
137 #endif
138 #include <netinet6/ipcomp.h>
139 #endif /*IPSEC*/
140
141 #include <netinet6/ip6protosw.h>
142
143 #include "gif.h"
144 #if NGIF > 0
145 #include <netinet6/in6_gif.h>
146 #endif
147
148 #define offsetof(type, member) ((size_t)(&((type *)0)->member))
149
150 /*
151 * TCP/IP protocol family: IP6, ICMP6, UDP, TCP.
152 */
153
154 extern struct domain inet6domain;
155
156 struct ip6protosw inet6sw[] = {
157 { 0, &inet6domain, IPPROTO_IPV6, 0,
158 0, 0, 0, 0,
159 0,
160 ip6_init, 0, frag6_slowtimo, frag6_drain, ip6_sysctl
161 },
162 { SOCK_DGRAM, &inet6domain, IPPROTO_UDP, PR_ATOMIC | PR_ADDR,
163 udp6_input, 0, udp6_ctlinput, ip6_ctloutput,
164 udp6_usrreq,
165 udp6_init, 0, 0, 0, udp6_sysctl
166 },
167 #ifdef TCP6
168 { SOCK_STREAM, &inet6domain, IPPROTO_TCP, PR_CONNREQUIRED | PR_WANTRCVD,
169 tcp6_input, 0, tcp6_ctlinput, tcp6_ctloutput,
170 tcp6_usrreq,
171 tcp6_init, tcp6_fasttimo, tcp6_slowtimo, tcp6_drain, tcp6_sysctl
172 },
173 #else
174 { SOCK_STREAM, &inet6domain, IPPROTO_TCP, PR_CONNREQUIRED | PR_WANTRCVD,
175 tcp6_input, 0, tcp6_ctlinput, tcp_ctloutput,
176 tcp_usrreq,
177 tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain, tcp_sysctl
178 },
179 #endif
180 { SOCK_RAW, &inet6domain, IPPROTO_RAW, PR_ATOMIC | PR_ADDR,
181 rip6_input, rip6_output, 0, rip6_ctloutput,
182 rip6_usrreq,
183 0, 0, 0, 0, 0
184 },
185 { SOCK_RAW, &inet6domain, IPPROTO_ICMPV6, PR_ATOMIC | PR_ADDR,
186 icmp6_input, rip6_output, 0, rip6_ctloutput,
187 rip6_usrreq,
188 icmp6_init, icmp6_fasttimo, 0, 0, icmp6_sysctl
189 },
190 { SOCK_RAW, &inet6domain, IPPROTO_DSTOPTS,PR_ATOMIC|PR_ADDR,
191 dest6_input, 0, 0, 0,
192 0,
193 0, 0, 0, 0,
194 },
195 { SOCK_RAW, &inet6domain, IPPROTO_ROUTING,PR_ATOMIC|PR_ADDR,
196 route6_input, 0, 0, 0,
197 0,
198 0, 0, 0, 0,
199 },
200 { SOCK_RAW, &inet6domain, IPPROTO_FRAGMENT,PR_ATOMIC|PR_ADDR,
201 frag6_input, 0, 0, 0,
202 0,
203 0, 0, 0, 0,
204 },
205 #ifdef IPSEC
206 { SOCK_RAW, &inet6domain, IPPROTO_AH, PR_ATOMIC|PR_ADDR,
207 ah6_input, 0, 0, 0,
208 0,
209 0, 0, 0, 0, ipsec6_sysctl
210 },
211 #ifdef IPSEC_ESP
212 { SOCK_RAW, &inet6domain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR,
213 esp6_input, 0, 0, 0,
214 0,
215 0, 0, 0, 0, ipsec6_sysctl
216 },
217 #endif
218 { SOCK_RAW, &inet6domain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR,
219 ipcomp6_input, 0, 0, 0,
220 0,
221 0, 0, 0, 0, ipsec6_sysctl
222 },
223 #endif /* IPSEC */
224 #if NGIF > 0
225 { SOCK_RAW, &inet6domain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR,
226 in6_gif_input,0, 0, 0,
227 0,
228 0, 0, 0, 0,
229 },
230 #ifdef INET6
231 { SOCK_RAW, &inet6domain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
232 in6_gif_input,0, 0, 0,
233 0,
234 0, 0, 0, 0,
235 },
236 #endif /* INET6 */
237 #endif /* GIF */
238 { SOCK_RAW, &inet6domain, IPPROTO_PIM, PR_ATOMIC|PR_ADDR,
239 pim6_input, rip6_output, 0, rip6_ctloutput,
240 rip6_usrreq,
241 0, 0, 0, 0,
242 },
243 /* raw wildcard */
244 { SOCK_RAW, &inet6domain, 0, PR_ATOMIC | PR_ADDR,
245 rip6_input, rip6_output, 0, rip6_ctloutput,
246 rip6_usrreq,
247 rip6_init, 0, 0, 0,
248 },
249 };
250
251 #ifdef RADISH
252 struct domain inet6domain =
253 { AF_INET6, "internet6", 0, 0, 0,
254 inet6sw, &inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])], 0,
255 rn_inithead, sizeof(struct sockaddr_in6), 8, 16,
256 in6_rd_match};
257 #else /* RADISH */
258 struct domain inet6domain =
259 { AF_INET6, "internet6", 0, 0, 0,
260 (struct protosw *)inet6sw,
261 (struct protosw *)&inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])], 0,
262 rn_inithead, offsetof(struct sockaddr_in6, sin6_addr) << 3,
263 sizeof(struct sockaddr_in6) };
264 #endif /* RADISH */
265
266 #ifdef __FreeBSD__
267 DOMAIN_SET(inet6);
268 #endif
269
270 /*
271 * Internet configuration info
272 */
273 #ifndef IPV6FORWARDING
274 #ifdef GATEWAY6
275 #define IPV6FORWARDING 1 /* forward IP6 packets not for us */
276 #else
277 #define IPV6FORWARDING 0 /* don't forward IP6 packets not for us */
278 #endif /* GATEWAY6 */
279 #endif /* !IPV6FORWARDING */
280
281 #ifndef IPV6_SENDREDIRECTS
282 #define IPV6_SENDREDIRECTS 1
283 #endif
284
285 int ip6_forwarding = IPV6FORWARDING; /* act as router? */
286 int ip6_sendredirects = IPV6_SENDREDIRECTS;
287 int ip6_defhlim = IPV6_DEFHLIM;
288 int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;
289 int ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */
290 int ip6_maxfragpackets = 200;
291 int ip6_log_interval = 5;
292 int ip6_hdrnestlimit = 50; /* appropriate? */
293 int ip6_dad_count = 1; /* DupAddrDetectionTransmits */
294 u_int32_t ip6_flow_seq;
295 int ip6_auto_flowlabel = 1;
296 #if NGIF > 0
297 int ip6_gif_hlim = GIF_HLIM;
298 #else
299 int ip6_gif_hlim = 0;
300 #endif
301
302 u_long ip6_id = 0UL;
303 int ip6_keepfaith = 0;
304 time_t ip6_log_time = (time_t)0L;
305
306 #ifdef MAPPED_ADDR_ENABLED
307 int ip6_mapped_addr_on = 0;
308 #endif /* MAPPED_ADDR_ENABLED */
309
310 /* icmp6 */
311 int pmtu_expire = 60*10;
312 int pmtu_probe = 60*2;
313
314 /* raw IP6 parameters */
315 /*
316 * Nominal space allocated to a raw ip socket.
317 */
318 #define RIPV6SNDQ 8192
319 #define RIPV6RCVQ 8192
320
321 u_long rip6_sendspace = RIPV6SNDQ;
322 u_long rip6_recvspace = RIPV6RCVQ;
323
324 /* ICMPV6 parameters */
325 int icmp6_rediraccept = 1; /* accept and process redirects */
326 int icmp6_redirtimeout = 10 * 60; /* 10 minutes */
327 u_int icmp6errratelim = 1000; /* 1000usec = 1msec */
328
329 #ifdef TCP6
330 /* TCP on IP6 parameters */
331 int tcp6_sendspace = 1024 * 8;
332 int tcp6_recvspace = 1024 * 8;
333 int tcp6_mssdflt = TCP6_MSS;
334 int tcp6_rttdflt = TCP6TV_SRTTDFLT / PR_SLOWHZ;
335 int tcp6_do_rfc1323 = 1;
336 int tcp6_conntimeo = TCP6TV_KEEP_INIT; /* initial connection timeout */
337 int tcp6_43maxseg = 0;
338 int tcp6_pmtu = 0;
339
340 /*
341 * Parameters for keepalive option.
342 * Connections for which SO_KEEPALIVE is set will be probed
343 * after being idle for a time of tcp6_keepidle (in units of PR_SLOWHZ).
344 * Starting at that time, the connection is probed at intervals
345 * of tcp6_keepintvl (same units) until a response is received
346 * or until tcp6_keepcnt probes have been made, at which time
347 * the connection is dropped. Note that a tcp6_keepidle value
348 * under 2 hours is nonconformant with RFC-1122, Internet Host Requirements.
349 */
350 int tcp6_keepidle = TCP6TV_KEEP_IDLE; /* time before probing idle */
351 int tcp6_keepintvl = TCP6TV_KEEPINTVL; /* interval betwn idle probes */
352 int tcp6_keepcnt = TCP6TV_KEEPCNT; /* max idle probes */
353 int tcp6_maxpersistidle = TCP6TV_KEEP_IDLE; /* max idle time in persist */
354
355 #ifndef INET_SERVER
356 #define TCP6_LISTEN_HASH_SIZE 17
357 #define TCP6_CONN_HASH_SIZE 97
358 #define TCP6_SYN_HASH_SIZE 293
359 #define TCP6_SYN_BUCKET_SIZE 35
360 #else
361 #define TCP6_LISTEN_HASH_SIZE 97
362 #define TCP6_CONN_HASH_SIZE 9973
363 #define TCP6_SYN_HASH_SIZE 997
364 #define TCP6_SYN_BUCKET_SIZE 35
365 #endif
366 int tcp6_listen_hash_size = TCP6_LISTEN_HASH_SIZE;
367 int tcp6_conn_hash_size = TCP6_CONN_HASH_SIZE;
368 struct tcp6_hash_list tcp6_listen_hash[TCP6_LISTEN_HASH_SIZE],
369 tcp6_conn_hash[TCP6_CONN_HASH_SIZE];
370
371 int tcp6_syn_cache_size = TCP6_SYN_HASH_SIZE;
372 int tcp6_syn_cache_limit = TCP6_SYN_HASH_SIZE*TCP6_SYN_BUCKET_SIZE;
373 int tcp6_syn_bucket_limit = 3*TCP6_SYN_BUCKET_SIZE;
374 struct syn_cache_head6 tcp6_syn_cache[TCP6_SYN_HASH_SIZE];
375 struct syn_cache_head6 *tcp6_syn_cache_first;
376 int tcp6_syn_cache_interval = 8; /* runs timer every 4 seconds */
377 int tcp6_syn_cache_timeo = TCP6TV_KEEP_INIT;
378
379 /*
380 * Parameters for computing a desirable data segment size
381 * given an upper bound (either interface MTU, or peer's MSS option)_.
382 * As applications tend to use a buffer size that is a multiple
383 * of kilobytes, try for something that divides evenly. However,
384 * do not round down too much.
385 *
386 * Round segment size down to a multiple of TCP6_ROUNDSIZE if this
387 * does not result in lowering by more than (size/TCP6_ROUNDFRAC).
388 * For example, round 536 to 512. Older versions of the system
389 * effectively used MCLBYTES (1K or 2K) as TCP6_ROUNDSIZE, with
390 * a value of 1 for TCP6_ROUNDFRAC (eliminating its effect).
391 * We round to a multiple of 256 for SLIP.
392 */
393 #ifndef TCP6_ROUNDSIZE
394 #define TCP6_ROUNDSIZE 256 /* round to multiple of 256 */
395 #endif
396 #ifndef TCP6_ROUNDFRAC
397 #define TCP6_ROUNDFRAC 10 /* round down at most N/10, or 10% */
398 #endif
399
400 int tcp6_roundsize = TCP6_ROUNDSIZE;
401 int tcp6_roundfrac = TCP6_ROUNDFRAC;
402 #endif /*TCP6*/
403
404 /* UDP on IP6 parameters */
405 int udp6_sendspace = 9216; /* really max datagram size */
406 int udp6_recvspace = 40 * (1024 + sizeof(struct sockaddr_in6));
407 /* 40 1K datagrams */
408
409 #ifdef __FreeBSD__
410 /*
411 * sysctl related items.
412 */
413 SYSCTL_NODE(_net, PF_INET6, inet6, CTLFLAG_RW, 0,
414 "Internet6 Family");
415
416 /* net.inet6 */
417 SYSCTL_NODE(_net_inet6, IPPROTO_IPV6, ip6, CTLFLAG_RW, 0, "IP6");
418 SYSCTL_NODE(_net_inet6, IPPROTO_ICMPV6, icmp6, CTLFLAG_RW, 0, "ICMP6");
419 SYSCTL_NODE(_net_inet6, IPPROTO_UDP, udp6, CTLFLAG_RW, 0, "UDP6");
420 SYSCTL_NODE(_net_inet6, IPPROTO_TCP, tcp6, CTLFLAG_RW, 0, "TCP6");
421 #ifdef IPSEC
422 SYSCTL_NODE(_net_inet6, IPPROTO_ESP, ipsec6, CTLFLAG_RW, 0, "IPSEC6");
423 #endif /* IPSEC */
424
425 /* net.inet6.ip6 */
426 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING,
427 forwarding, CTLFLAG_RW, &ip6_forwarding, 0, "");
428 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS,
429 redirect, CTLFLAG_RW, &ip6_sendredirects, 0, "");
430 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM,
431 hlim, CTLFLAG_RW, &ip6_defhlim, 0, "");
432 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS,
433 maxfragpackets, CTLFLAG_RW, &ip6_maxfragpackets, 0, "");
434 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV,
435 accept_rtadv, CTLFLAG_RW, &ip6_accept_rtadv, 0, "");
436 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_KEEPFAITH,
437 keepfaith, CTLFLAG_RW, &ip6_keepfaith, 0, "");
438 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_INTERVAL,
439 log_interval, CTLFLAG_RW, &ip6_log_interval, 0, "");
440 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT,
441 hdrnestlimit, CTLFLAG_RW, &ip6_hdrnestlimit, 0, "");
442 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT,
443 dad_count, CTLFLAG_RW, &ip6_dad_count, 0, "");
444 #ifdef MAPPED_ADDR_ENABLED
445 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAPPED_ADDR,
446 mapped_addr, CTLFLAG_RW, &ip6_mapped_addr_on, 0, "");
447 #endif /* MAPPED_ADDR_ENABLED */
448 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_FLOWLABEL,
449 auto_flowlabel, CTLFLAG_RW, &ip6_auto_flowlabel, 0, "");
450 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM,
451 defmcasthlim, CTLFLAG_RW, &ip6_defmcasthlim, 0, "");
452 SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM,
453 gifhlim, CTLFLAG_RW, &ip6_gif_hlim, 0, "");
454
455 /* net.inet6.icmp6 */
456 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT,
457 rediraccept, CTLFLAG_RW, &icmp6_rediraccept, 0, "");
458 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT,
459 redirtimeout, CTLFLAG_RW, &icmp6_redirtimeout, 0, "");
460 SYSCTL_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RD,
461 &icmp6stat, icmp6stat, "");
462 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRRATELIMIT,
463 errratelimit, CTLFLAG_RW, &icmp6errratelim, 0, "");
464 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE,
465 nd6_prune, CTLFLAG_RW, &nd6_prune, 0, "");
466 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY,
467 nd6_delay, CTLFLAG_RW, &nd6_delay, 0, "");
468 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES,
469 nd6_umaxtries, CTLFLAG_RW, &nd6_umaxtries, 0, "");
470 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES,
471 nd6_mmaxtries, CTLFLAG_RW, &nd6_mmaxtries, 0, "");
472 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK,
473 nd6_useloopback, CTLFLAG_RW, &nd6_useloopback, 0, "");
474 SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PROXYALL,
475 nd6_proxyall, CTLFLAG_RW, &nd6_proxyall, 0, "");
476
477 /* net.inet6.udp6 */
478 SYSCTL_INT(_net_inet6_udp6, UDP6CTL_SENDMAX,
479 sendmax, CTLFLAG_RW, &udp6_sendspace, 0, "");
480 SYSCTL_INT(_net_inet6_udp6, UDP6CTL_RECVSPACE,
481 recvspace, CTLFLAG_RW, &udp6_recvspace, 0, "");
482
483 /* net.inet6.tcp6 */
484 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_MSSDFLT,
485 mssdflt, CTLFLAG_RW, &tcp6_mssdflt, 0, "");
486 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_DO_RFC1323,
487 do_rfc1323, CTLFLAG_RW, &tcp6_do_rfc1323, 0, "");
488 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_KEEPIDLE,
489 keepidle, CTLFLAG_RW, &tcp6_keepidle, 0, "");
490 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_KEEPINTVL,
491 keepintvl, CTLFLAG_RW, &tcp6_keepintvl, 0, "");
492 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_KEEPCNT,
493 keepcnt, CTLFLAG_RW, &tcp6_keepcnt, 0, "");
494 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_MAXPERSISTIDLE,
495 maxpersistidle, CTLFLAG_RW, &tcp6_maxpersistidle, 0, "");
496 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_SENDSPACE,
497 sendspace, CTLFLAG_RW, &tcp6_sendspace, 0, "");
498 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_RECVSPACE,
499 recvspace, CTLFLAG_RW, &tcp6_recvspace, 0, "");
500 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_CONNTIMEO,
501 conntimeo, CTLFLAG_RW, &tcp6_conntimeo, 0, "");
502 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_PMTU,
503 pmtu, CTLFLAG_RW, &tcp6_pmtu, 0, "");
504 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_PMTU_EXPIRE,
505 pmtu_expire, CTLFLAG_RW, &pmtu_expire, 0, "");
506 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_PMTU_PROBE,
507 pmtu_probe, CTLFLAG_RW, &pmtu_probe, 0, "");
508 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_43MAXSEG,
509 pmtu_43maxseg, CTLFLAG_RW, &tcp6_43maxseg, 0, "");
510 SYSCTL_STRUCT(_net_inet6_tcp6, TCP6CTL_STATS, stats, CTLFLAG_RD,
511 &tcp6stat, tcp6stat, "");
512 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_SYN_CACHE_LIMIT,
513 syn_cache_limit, CTLFLAG_RW, &tcp6_syn_cache_limit, 0, "");
514 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_SYN_BUCKET_LIMIT,
515 syn_bucket_limit, CTLFLAG_RW, &tcp6_syn_bucket_limit, 0, "");
516 SYSCTL_INT(_net_inet6_tcp6, TCP6CTL_SYN_CACHE_INTER,
517 syn_cache_interval, CTLFLAG_RW, &tcp6_syn_cache_interval, 0, "");
518
519 #endif /* __FreeBSD__ */
520