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