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