Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6/mini2440.git] / net / ipv4 / sysctl_net_ipv4.c
blob0aa304711a96ee09b7a99a48f4a1c676b4ee86ec
1 /*
2 * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
4 * $Id: sysctl_net_ipv4.c,v 1.50 2001/10/20 00:00:11 davem Exp $
6 * Begun April 1, 1996, Mike Shaver.
7 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
8 */
10 #include <linux/mm.h>
11 #include <linux/module.h>
12 #include <linux/sysctl.h>
13 #include <linux/igmp.h>
14 #include <linux/inetdevice.h>
15 #include <net/snmp.h>
16 #include <net/icmp.h>
17 #include <net/ip.h>
18 #include <net/route.h>
19 #include <net/tcp.h>
20 #include <net/cipso_ipv4.h>
22 /* From af_inet.c */
23 extern int sysctl_ip_nonlocal_bind;
25 #ifdef CONFIG_SYSCTL
26 static int zero;
27 static int tcp_retr1_max = 255;
28 static int ip_local_port_range_min[] = { 1, 1 };
29 static int ip_local_port_range_max[] = { 65535, 65535 };
30 #endif
32 struct ipv4_config ipv4_config;
34 #ifdef CONFIG_SYSCTL
36 static
37 int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
38 void __user *buffer, size_t *lenp, loff_t *ppos)
40 int val = ipv4_devconf.forwarding;
41 int ret;
43 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
45 if (write && ipv4_devconf.forwarding != val)
46 inet_forward_change();
48 return ret;
51 static int ipv4_sysctl_forward_strategy(ctl_table *table,
52 int __user *name, int nlen,
53 void __user *oldval, size_t __user *oldlenp,
54 void __user *newval, size_t newlen)
56 int *valp = table->data;
57 int new;
59 if (!newval || !newlen)
60 return 0;
62 if (newlen != sizeof(int))
63 return -EINVAL;
65 if (get_user(new, (int __user *)newval))
66 return -EFAULT;
68 if (new == *valp)
69 return 0;
71 if (oldval && oldlenp) {
72 size_t len;
74 if (get_user(len, oldlenp))
75 return -EFAULT;
77 if (len) {
78 if (len > table->maxlen)
79 len = table->maxlen;
80 if (copy_to_user(oldval, valp, len))
81 return -EFAULT;
82 if (put_user(len, oldlenp))
83 return -EFAULT;
87 *valp = new;
88 inet_forward_change();
89 return 1;
92 static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp,
93 void __user *buffer, size_t *lenp, loff_t *ppos)
95 char val[TCP_CA_NAME_MAX];
96 ctl_table tbl = {
97 .data = val,
98 .maxlen = TCP_CA_NAME_MAX,
100 int ret;
102 tcp_get_default_congestion_control(val);
104 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
105 if (write && ret == 0)
106 ret = tcp_set_default_congestion_control(val);
107 return ret;
110 static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
111 int nlen, void __user *oldval,
112 size_t __user *oldlenp,
113 void __user *newval, size_t newlen)
115 char val[TCP_CA_NAME_MAX];
116 ctl_table tbl = {
117 .data = val,
118 .maxlen = TCP_CA_NAME_MAX,
120 int ret;
122 tcp_get_default_congestion_control(val);
123 ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
124 if (ret == 0 && newval && newlen)
125 ret = tcp_set_default_congestion_control(val);
126 return ret;
129 static int proc_tcp_available_congestion_control(ctl_table *ctl,
130 int write, struct file * filp,
131 void __user *buffer, size_t *lenp,
132 loff_t *ppos)
134 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX, };
135 int ret;
137 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
138 if (!tbl.data)
139 return -ENOMEM;
140 tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX);
141 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
142 kfree(tbl.data);
143 return ret;
146 static int proc_allowed_congestion_control(ctl_table *ctl,
147 int write, struct file * filp,
148 void __user *buffer, size_t *lenp,
149 loff_t *ppos)
151 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
152 int ret;
154 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
155 if (!tbl.data)
156 return -ENOMEM;
158 tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen);
159 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
160 if (write && ret == 0)
161 ret = tcp_set_allowed_congestion_control(tbl.data);
162 kfree(tbl.data);
163 return ret;
166 static int strategy_allowed_congestion_control(ctl_table *table, int __user *name,
167 int nlen, void __user *oldval,
168 size_t __user *oldlenp,
169 void __user *newval,
170 size_t newlen)
172 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
173 int ret;
175 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
176 if (!tbl.data)
177 return -ENOMEM;
179 tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
180 ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
181 if (ret == 0 && newval && newlen)
182 ret = tcp_set_allowed_congestion_control(tbl.data);
183 kfree(tbl.data);
185 return ret;
189 ctl_table ipv4_table[] = {
191 .ctl_name = NET_IPV4_TCP_TIMESTAMPS,
192 .procname = "tcp_timestamps",
193 .data = &sysctl_tcp_timestamps,
194 .maxlen = sizeof(int),
195 .mode = 0644,
196 .proc_handler = &proc_dointvec
199 .ctl_name = NET_IPV4_TCP_WINDOW_SCALING,
200 .procname = "tcp_window_scaling",
201 .data = &sysctl_tcp_window_scaling,
202 .maxlen = sizeof(int),
203 .mode = 0644,
204 .proc_handler = &proc_dointvec
207 .ctl_name = NET_IPV4_TCP_SACK,
208 .procname = "tcp_sack",
209 .data = &sysctl_tcp_sack,
210 .maxlen = sizeof(int),
211 .mode = 0644,
212 .proc_handler = &proc_dointvec
215 .ctl_name = NET_IPV4_TCP_RETRANS_COLLAPSE,
216 .procname = "tcp_retrans_collapse",
217 .data = &sysctl_tcp_retrans_collapse,
218 .maxlen = sizeof(int),
219 .mode = 0644,
220 .proc_handler = &proc_dointvec
223 .ctl_name = NET_IPV4_FORWARD,
224 .procname = "ip_forward",
225 .data = &ipv4_devconf.forwarding,
226 .maxlen = sizeof(int),
227 .mode = 0644,
228 .proc_handler = &ipv4_sysctl_forward,
229 .strategy = &ipv4_sysctl_forward_strategy
232 .ctl_name = NET_IPV4_DEFAULT_TTL,
233 .procname = "ip_default_ttl",
234 .data = &sysctl_ip_default_ttl,
235 .maxlen = sizeof(int),
236 .mode = 0644,
237 .proc_handler = &ipv4_doint_and_flush,
238 .strategy = &ipv4_doint_and_flush_strategy,
241 .ctl_name = NET_IPV4_NO_PMTU_DISC,
242 .procname = "ip_no_pmtu_disc",
243 .data = &ipv4_config.no_pmtu_disc,
244 .maxlen = sizeof(int),
245 .mode = 0644,
246 .proc_handler = &proc_dointvec
249 .ctl_name = NET_IPV4_NONLOCAL_BIND,
250 .procname = "ip_nonlocal_bind",
251 .data = &sysctl_ip_nonlocal_bind,
252 .maxlen = sizeof(int),
253 .mode = 0644,
254 .proc_handler = &proc_dointvec
257 .ctl_name = NET_IPV4_TCP_SYN_RETRIES,
258 .procname = "tcp_syn_retries",
259 .data = &sysctl_tcp_syn_retries,
260 .maxlen = sizeof(int),
261 .mode = 0644,
262 .proc_handler = &proc_dointvec
265 .ctl_name = NET_TCP_SYNACK_RETRIES,
266 .procname = "tcp_synack_retries",
267 .data = &sysctl_tcp_synack_retries,
268 .maxlen = sizeof(int),
269 .mode = 0644,
270 .proc_handler = &proc_dointvec
273 .ctl_name = NET_TCP_MAX_ORPHANS,
274 .procname = "tcp_max_orphans",
275 .data = &sysctl_tcp_max_orphans,
276 .maxlen = sizeof(int),
277 .mode = 0644,
278 .proc_handler = &proc_dointvec
281 .ctl_name = NET_TCP_MAX_TW_BUCKETS,
282 .procname = "tcp_max_tw_buckets",
283 .data = &tcp_death_row.sysctl_max_tw_buckets,
284 .maxlen = sizeof(int),
285 .mode = 0644,
286 .proc_handler = &proc_dointvec
289 .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH,
290 .procname = "ipfrag_high_thresh",
291 .data = &sysctl_ipfrag_high_thresh,
292 .maxlen = sizeof(int),
293 .mode = 0644,
294 .proc_handler = &proc_dointvec
297 .ctl_name = NET_IPV4_IPFRAG_LOW_THRESH,
298 .procname = "ipfrag_low_thresh",
299 .data = &sysctl_ipfrag_low_thresh,
300 .maxlen = sizeof(int),
301 .mode = 0644,
302 .proc_handler = &proc_dointvec
305 .ctl_name = NET_IPV4_DYNADDR,
306 .procname = "ip_dynaddr",
307 .data = &sysctl_ip_dynaddr,
308 .maxlen = sizeof(int),
309 .mode = 0644,
310 .proc_handler = &proc_dointvec
313 .ctl_name = NET_IPV4_IPFRAG_TIME,
314 .procname = "ipfrag_time",
315 .data = &sysctl_ipfrag_time,
316 .maxlen = sizeof(int),
317 .mode = 0644,
318 .proc_handler = &proc_dointvec_jiffies,
319 .strategy = &sysctl_jiffies
322 .ctl_name = NET_IPV4_TCP_KEEPALIVE_TIME,
323 .procname = "tcp_keepalive_time",
324 .data = &sysctl_tcp_keepalive_time,
325 .maxlen = sizeof(int),
326 .mode = 0644,
327 .proc_handler = &proc_dointvec_jiffies,
328 .strategy = &sysctl_jiffies
331 .ctl_name = NET_IPV4_TCP_KEEPALIVE_PROBES,
332 .procname = "tcp_keepalive_probes",
333 .data = &sysctl_tcp_keepalive_probes,
334 .maxlen = sizeof(int),
335 .mode = 0644,
336 .proc_handler = &proc_dointvec
339 .ctl_name = NET_IPV4_TCP_KEEPALIVE_INTVL,
340 .procname = "tcp_keepalive_intvl",
341 .data = &sysctl_tcp_keepalive_intvl,
342 .maxlen = sizeof(int),
343 .mode = 0644,
344 .proc_handler = &proc_dointvec_jiffies,
345 .strategy = &sysctl_jiffies
348 .ctl_name = NET_IPV4_TCP_RETRIES1,
349 .procname = "tcp_retries1",
350 .data = &sysctl_tcp_retries1,
351 .maxlen = sizeof(int),
352 .mode = 0644,
353 .proc_handler = &proc_dointvec_minmax,
354 .strategy = &sysctl_intvec,
355 .extra2 = &tcp_retr1_max
358 .ctl_name = NET_IPV4_TCP_RETRIES2,
359 .procname = "tcp_retries2",
360 .data = &sysctl_tcp_retries2,
361 .maxlen = sizeof(int),
362 .mode = 0644,
363 .proc_handler = &proc_dointvec
366 .ctl_name = NET_IPV4_TCP_FIN_TIMEOUT,
367 .procname = "tcp_fin_timeout",
368 .data = &sysctl_tcp_fin_timeout,
369 .maxlen = sizeof(int),
370 .mode = 0644,
371 .proc_handler = &proc_dointvec_jiffies,
372 .strategy = &sysctl_jiffies
374 #ifdef CONFIG_SYN_COOKIES
376 .ctl_name = NET_TCP_SYNCOOKIES,
377 .procname = "tcp_syncookies",
378 .data = &sysctl_tcp_syncookies,
379 .maxlen = sizeof(int),
380 .mode = 0644,
381 .proc_handler = &proc_dointvec
383 #endif
385 .ctl_name = NET_TCP_TW_RECYCLE,
386 .procname = "tcp_tw_recycle",
387 .data = &tcp_death_row.sysctl_tw_recycle,
388 .maxlen = sizeof(int),
389 .mode = 0644,
390 .proc_handler = &proc_dointvec
393 .ctl_name = NET_TCP_ABORT_ON_OVERFLOW,
394 .procname = "tcp_abort_on_overflow",
395 .data = &sysctl_tcp_abort_on_overflow,
396 .maxlen = sizeof(int),
397 .mode = 0644,
398 .proc_handler = &proc_dointvec
401 .ctl_name = NET_TCP_STDURG,
402 .procname = "tcp_stdurg",
403 .data = &sysctl_tcp_stdurg,
404 .maxlen = sizeof(int),
405 .mode = 0644,
406 .proc_handler = &proc_dointvec
409 .ctl_name = NET_TCP_RFC1337,
410 .procname = "tcp_rfc1337",
411 .data = &sysctl_tcp_rfc1337,
412 .maxlen = sizeof(int),
413 .mode = 0644,
414 .proc_handler = &proc_dointvec
417 .ctl_name = NET_TCP_MAX_SYN_BACKLOG,
418 .procname = "tcp_max_syn_backlog",
419 .data = &sysctl_max_syn_backlog,
420 .maxlen = sizeof(int),
421 .mode = 0644,
422 .proc_handler = &proc_dointvec
425 .ctl_name = NET_IPV4_LOCAL_PORT_RANGE,
426 .procname = "ip_local_port_range",
427 .data = &sysctl_local_port_range,
428 .maxlen = sizeof(sysctl_local_port_range),
429 .mode = 0644,
430 .proc_handler = &proc_dointvec_minmax,
431 .strategy = &sysctl_intvec,
432 .extra1 = ip_local_port_range_min,
433 .extra2 = ip_local_port_range_max
436 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_ALL,
437 .procname = "icmp_echo_ignore_all",
438 .data = &sysctl_icmp_echo_ignore_all,
439 .maxlen = sizeof(int),
440 .mode = 0644,
441 .proc_handler = &proc_dointvec
444 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS,
445 .procname = "icmp_echo_ignore_broadcasts",
446 .data = &sysctl_icmp_echo_ignore_broadcasts,
447 .maxlen = sizeof(int),
448 .mode = 0644,
449 .proc_handler = &proc_dointvec
452 .ctl_name = NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES,
453 .procname = "icmp_ignore_bogus_error_responses",
454 .data = &sysctl_icmp_ignore_bogus_error_responses,
455 .maxlen = sizeof(int),
456 .mode = 0644,
457 .proc_handler = &proc_dointvec
460 .ctl_name = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
461 .procname = "icmp_errors_use_inbound_ifaddr",
462 .data = &sysctl_icmp_errors_use_inbound_ifaddr,
463 .maxlen = sizeof(int),
464 .mode = 0644,
465 .proc_handler = &proc_dointvec
468 .ctl_name = NET_IPV4_ROUTE,
469 .procname = "route",
470 .maxlen = 0,
471 .mode = 0555,
472 .child = ipv4_route_table
474 #ifdef CONFIG_IP_MULTICAST
476 .ctl_name = NET_IPV4_IGMP_MAX_MEMBERSHIPS,
477 .procname = "igmp_max_memberships",
478 .data = &sysctl_igmp_max_memberships,
479 .maxlen = sizeof(int),
480 .mode = 0644,
481 .proc_handler = &proc_dointvec
484 #endif
486 .ctl_name = NET_IPV4_IGMP_MAX_MSF,
487 .procname = "igmp_max_msf",
488 .data = &sysctl_igmp_max_msf,
489 .maxlen = sizeof(int),
490 .mode = 0644,
491 .proc_handler = &proc_dointvec
494 .ctl_name = NET_IPV4_INET_PEER_THRESHOLD,
495 .procname = "inet_peer_threshold",
496 .data = &inet_peer_threshold,
497 .maxlen = sizeof(int),
498 .mode = 0644,
499 .proc_handler = &proc_dointvec
502 .ctl_name = NET_IPV4_INET_PEER_MINTTL,
503 .procname = "inet_peer_minttl",
504 .data = &inet_peer_minttl,
505 .maxlen = sizeof(int),
506 .mode = 0644,
507 .proc_handler = &proc_dointvec_jiffies,
508 .strategy = &sysctl_jiffies
511 .ctl_name = NET_IPV4_INET_PEER_MAXTTL,
512 .procname = "inet_peer_maxttl",
513 .data = &inet_peer_maxttl,
514 .maxlen = sizeof(int),
515 .mode = 0644,
516 .proc_handler = &proc_dointvec_jiffies,
517 .strategy = &sysctl_jiffies
520 .ctl_name = NET_IPV4_INET_PEER_GC_MINTIME,
521 .procname = "inet_peer_gc_mintime",
522 .data = &inet_peer_gc_mintime,
523 .maxlen = sizeof(int),
524 .mode = 0644,
525 .proc_handler = &proc_dointvec_jiffies,
526 .strategy = &sysctl_jiffies
529 .ctl_name = NET_IPV4_INET_PEER_GC_MAXTIME,
530 .procname = "inet_peer_gc_maxtime",
531 .data = &inet_peer_gc_maxtime,
532 .maxlen = sizeof(int),
533 .mode = 0644,
534 .proc_handler = &proc_dointvec_jiffies,
535 .strategy = &sysctl_jiffies
538 .ctl_name = NET_TCP_ORPHAN_RETRIES,
539 .procname = "tcp_orphan_retries",
540 .data = &sysctl_tcp_orphan_retries,
541 .maxlen = sizeof(int),
542 .mode = 0644,
543 .proc_handler = &proc_dointvec
546 .ctl_name = NET_TCP_FACK,
547 .procname = "tcp_fack",
548 .data = &sysctl_tcp_fack,
549 .maxlen = sizeof(int),
550 .mode = 0644,
551 .proc_handler = &proc_dointvec
554 .ctl_name = NET_TCP_REORDERING,
555 .procname = "tcp_reordering",
556 .data = &sysctl_tcp_reordering,
557 .maxlen = sizeof(int),
558 .mode = 0644,
559 .proc_handler = &proc_dointvec
562 .ctl_name = NET_TCP_ECN,
563 .procname = "tcp_ecn",
564 .data = &sysctl_tcp_ecn,
565 .maxlen = sizeof(int),
566 .mode = 0644,
567 .proc_handler = &proc_dointvec
570 .ctl_name = NET_TCP_DSACK,
571 .procname = "tcp_dsack",
572 .data = &sysctl_tcp_dsack,
573 .maxlen = sizeof(int),
574 .mode = 0644,
575 .proc_handler = &proc_dointvec
578 .ctl_name = NET_TCP_MEM,
579 .procname = "tcp_mem",
580 .data = &sysctl_tcp_mem,
581 .maxlen = sizeof(sysctl_tcp_mem),
582 .mode = 0644,
583 .proc_handler = &proc_dointvec
586 .ctl_name = NET_TCP_WMEM,
587 .procname = "tcp_wmem",
588 .data = &sysctl_tcp_wmem,
589 .maxlen = sizeof(sysctl_tcp_wmem),
590 .mode = 0644,
591 .proc_handler = &proc_dointvec
594 .ctl_name = NET_TCP_RMEM,
595 .procname = "tcp_rmem",
596 .data = &sysctl_tcp_rmem,
597 .maxlen = sizeof(sysctl_tcp_rmem),
598 .mode = 0644,
599 .proc_handler = &proc_dointvec
602 .ctl_name = NET_TCP_APP_WIN,
603 .procname = "tcp_app_win",
604 .data = &sysctl_tcp_app_win,
605 .maxlen = sizeof(int),
606 .mode = 0644,
607 .proc_handler = &proc_dointvec
610 .ctl_name = NET_TCP_ADV_WIN_SCALE,
611 .procname = "tcp_adv_win_scale",
612 .data = &sysctl_tcp_adv_win_scale,
613 .maxlen = sizeof(int),
614 .mode = 0644,
615 .proc_handler = &proc_dointvec
618 .ctl_name = NET_IPV4_ICMP_RATELIMIT,
619 .procname = "icmp_ratelimit",
620 .data = &sysctl_icmp_ratelimit,
621 .maxlen = sizeof(int),
622 .mode = 0644,
623 .proc_handler = &proc_dointvec
626 .ctl_name = NET_IPV4_ICMP_RATEMASK,
627 .procname = "icmp_ratemask",
628 .data = &sysctl_icmp_ratemask,
629 .maxlen = sizeof(int),
630 .mode = 0644,
631 .proc_handler = &proc_dointvec
634 .ctl_name = NET_TCP_TW_REUSE,
635 .procname = "tcp_tw_reuse",
636 .data = &sysctl_tcp_tw_reuse,
637 .maxlen = sizeof(int),
638 .mode = 0644,
639 .proc_handler = &proc_dointvec
642 .ctl_name = NET_TCP_FRTO,
643 .procname = "tcp_frto",
644 .data = &sysctl_tcp_frto,
645 .maxlen = sizeof(int),
646 .mode = 0644,
647 .proc_handler = &proc_dointvec
650 .ctl_name = NET_TCP_LOW_LATENCY,
651 .procname = "tcp_low_latency",
652 .data = &sysctl_tcp_low_latency,
653 .maxlen = sizeof(int),
654 .mode = 0644,
655 .proc_handler = &proc_dointvec
658 .ctl_name = NET_IPV4_IPFRAG_SECRET_INTERVAL,
659 .procname = "ipfrag_secret_interval",
660 .data = &sysctl_ipfrag_secret_interval,
661 .maxlen = sizeof(int),
662 .mode = 0644,
663 .proc_handler = &proc_dointvec_jiffies,
664 .strategy = &sysctl_jiffies
667 .ctl_name = NET_IPV4_IPFRAG_MAX_DIST,
668 .procname = "ipfrag_max_dist",
669 .data = &sysctl_ipfrag_max_dist,
670 .maxlen = sizeof(int),
671 .mode = 0644,
672 .proc_handler = &proc_dointvec_minmax,
673 .extra1 = &zero
676 .ctl_name = NET_TCP_NO_METRICS_SAVE,
677 .procname = "tcp_no_metrics_save",
678 .data = &sysctl_tcp_nometrics_save,
679 .maxlen = sizeof(int),
680 .mode = 0644,
681 .proc_handler = &proc_dointvec,
684 .ctl_name = NET_TCP_MODERATE_RCVBUF,
685 .procname = "tcp_moderate_rcvbuf",
686 .data = &sysctl_tcp_moderate_rcvbuf,
687 .maxlen = sizeof(int),
688 .mode = 0644,
689 .proc_handler = &proc_dointvec,
692 .ctl_name = NET_TCP_TSO_WIN_DIVISOR,
693 .procname = "tcp_tso_win_divisor",
694 .data = &sysctl_tcp_tso_win_divisor,
695 .maxlen = sizeof(int),
696 .mode = 0644,
697 .proc_handler = &proc_dointvec,
700 .ctl_name = NET_TCP_CONG_CONTROL,
701 .procname = "tcp_congestion_control",
702 .mode = 0644,
703 .maxlen = TCP_CA_NAME_MAX,
704 .proc_handler = &proc_tcp_congestion_control,
705 .strategy = &sysctl_tcp_congestion_control,
708 .ctl_name = NET_TCP_ABC,
709 .procname = "tcp_abc",
710 .data = &sysctl_tcp_abc,
711 .maxlen = sizeof(int),
712 .mode = 0644,
713 .proc_handler = &proc_dointvec,
716 .ctl_name = NET_TCP_MTU_PROBING,
717 .procname = "tcp_mtu_probing",
718 .data = &sysctl_tcp_mtu_probing,
719 .maxlen = sizeof(int),
720 .mode = 0644,
721 .proc_handler = &proc_dointvec,
724 .ctl_name = NET_TCP_BASE_MSS,
725 .procname = "tcp_base_mss",
726 .data = &sysctl_tcp_base_mss,
727 .maxlen = sizeof(int),
728 .mode = 0644,
729 .proc_handler = &proc_dointvec,
732 .ctl_name = NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS,
733 .procname = "tcp_workaround_signed_windows",
734 .data = &sysctl_tcp_workaround_signed_windows,
735 .maxlen = sizeof(int),
736 .mode = 0644,
737 .proc_handler = &proc_dointvec
739 #ifdef CONFIG_NET_DMA
741 .ctl_name = NET_TCP_DMA_COPYBREAK,
742 .procname = "tcp_dma_copybreak",
743 .data = &sysctl_tcp_dma_copybreak,
744 .maxlen = sizeof(int),
745 .mode = 0644,
746 .proc_handler = &proc_dointvec
748 #endif
750 .ctl_name = NET_TCP_SLOW_START_AFTER_IDLE,
751 .procname = "tcp_slow_start_after_idle",
752 .data = &sysctl_tcp_slow_start_after_idle,
753 .maxlen = sizeof(int),
754 .mode = 0644,
755 .proc_handler = &proc_dointvec
757 #ifdef CONFIG_NETLABEL
759 .ctl_name = NET_CIPSOV4_CACHE_ENABLE,
760 .procname = "cipso_cache_enable",
761 .data = &cipso_v4_cache_enabled,
762 .maxlen = sizeof(int),
763 .mode = 0644,
764 .proc_handler = &proc_dointvec,
767 .ctl_name = NET_CIPSOV4_CACHE_BUCKET_SIZE,
768 .procname = "cipso_cache_bucket_size",
769 .data = &cipso_v4_cache_bucketsize,
770 .maxlen = sizeof(int),
771 .mode = 0644,
772 .proc_handler = &proc_dointvec,
775 .ctl_name = NET_CIPSOV4_RBM_OPTFMT,
776 .procname = "cipso_rbm_optfmt",
777 .data = &cipso_v4_rbm_optfmt,
778 .maxlen = sizeof(int),
779 .mode = 0644,
780 .proc_handler = &proc_dointvec,
783 .ctl_name = NET_CIPSOV4_RBM_STRICTVALID,
784 .procname = "cipso_rbm_strictvalid",
785 .data = &cipso_v4_rbm_strictvalid,
786 .maxlen = sizeof(int),
787 .mode = 0644,
788 .proc_handler = &proc_dointvec,
790 #endif /* CONFIG_NETLABEL */
792 .ctl_name = NET_TCP_AVAIL_CONG_CONTROL,
793 .procname = "tcp_available_congestion_control",
794 .maxlen = TCP_CA_BUF_MAX,
795 .mode = 0444,
796 .proc_handler = &proc_tcp_available_congestion_control,
799 .ctl_name = NET_TCP_ALLOWED_CONG_CONTROL,
800 .procname = "tcp_allowed_congestion_control",
801 .maxlen = TCP_CA_BUF_MAX,
802 .mode = 0644,
803 .proc_handler = &proc_allowed_congestion_control,
804 .strategy = &strategy_allowed_congestion_control,
806 { .ctl_name = 0 }
809 #endif /* CONFIG_SYSCTL */
811 EXPORT_SYMBOL(ipv4_config);