sysctl: ipv6 route flushing (kill binary path)
[wrt350n-kernel.git] / net / dccp / sysctl.c
blob9364b2fb4dbd4ce0e45581e7595c7e2d2a32e6dd
1 /*
2 * net/dccp/sysctl.c
4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@mandriva.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License v2
9 * as published by the Free Software Foundation.
12 #include <linux/mm.h>
13 #include <linux/sysctl.h>
14 #include "dccp.h"
15 #include "feat.h"
17 #ifndef CONFIG_SYSCTL
18 #error This file should not be compiled without CONFIG_SYSCTL defined
19 #endif
21 /* rate-limit for syncs in reply to sequence-invalid packets; RFC 4340, 7.5.4 */
22 int sysctl_dccp_sync_ratelimit __read_mostly = HZ / 8;
24 static struct ctl_table dccp_default_table[] = {
26 .procname = "seq_window",
27 .data = &sysctl_dccp_feat_sequence_window,
28 .maxlen = sizeof(sysctl_dccp_feat_sequence_window),
29 .mode = 0644,
30 .proc_handler = proc_dointvec,
33 .procname = "rx_ccid",
34 .data = &sysctl_dccp_feat_rx_ccid,
35 .maxlen = sizeof(sysctl_dccp_feat_rx_ccid),
36 .mode = 0644,
37 .proc_handler = proc_dointvec,
40 .procname = "tx_ccid",
41 .data = &sysctl_dccp_feat_tx_ccid,
42 .maxlen = sizeof(sysctl_dccp_feat_tx_ccid),
43 .mode = 0644,
44 .proc_handler = proc_dointvec,
47 .procname = "ack_ratio",
48 .data = &sysctl_dccp_feat_ack_ratio,
49 .maxlen = sizeof(sysctl_dccp_feat_ack_ratio),
50 .mode = 0644,
51 .proc_handler = proc_dointvec,
54 .procname = "send_ackvec",
55 .data = &sysctl_dccp_feat_send_ack_vector,
56 .maxlen = sizeof(sysctl_dccp_feat_send_ack_vector),
57 .mode = 0644,
58 .proc_handler = proc_dointvec,
61 .procname = "send_ndp",
62 .data = &sysctl_dccp_feat_send_ndp_count,
63 .maxlen = sizeof(sysctl_dccp_feat_send_ndp_count),
64 .mode = 0644,
65 .proc_handler = proc_dointvec,
68 .procname = "request_retries",
69 .data = &sysctl_dccp_request_retries,
70 .maxlen = sizeof(sysctl_dccp_request_retries),
71 .mode = 0644,
72 .proc_handler = proc_dointvec,
75 .procname = "retries1",
76 .data = &sysctl_dccp_retries1,
77 .maxlen = sizeof(sysctl_dccp_retries1),
78 .mode = 0644,
79 .proc_handler = proc_dointvec,
82 .procname = "retries2",
83 .data = &sysctl_dccp_retries2,
84 .maxlen = sizeof(sysctl_dccp_retries2),
85 .mode = 0644,
86 .proc_handler = proc_dointvec,
89 .procname = "tx_qlen",
90 .data = &sysctl_dccp_tx_qlen,
91 .maxlen = sizeof(sysctl_dccp_tx_qlen),
92 .mode = 0644,
93 .proc_handler = proc_dointvec,
96 .procname = "sync_ratelimit",
97 .data = &sysctl_dccp_sync_ratelimit,
98 .maxlen = sizeof(sysctl_dccp_sync_ratelimit),
99 .mode = 0644,
100 .proc_handler = proc_dointvec_ms_jiffies,
103 { .ctl_name = 0, }
106 static struct ctl_table dccp_table[] = {
108 .ctl_name = NET_DCCP_DEFAULT,
109 .procname = "default",
110 .mode = 0555,
111 .child = dccp_default_table,
113 { .ctl_name = 0, },
116 static struct ctl_table dccp_dir_table[] = {
118 .ctl_name = NET_DCCP,
119 .procname = "dccp",
120 .mode = 0555,
121 .child = dccp_table,
123 { .ctl_name = 0, },
126 static struct ctl_table dccp_root_table[] = {
128 .ctl_name = CTL_NET,
129 .procname = "net",
130 .mode = 0555,
131 .child = dccp_dir_table,
133 { .ctl_name = 0, },
136 static struct ctl_table_header *dccp_table_header;
138 int __init dccp_sysctl_init(void)
140 dccp_table_header = register_sysctl_table(dccp_root_table);
142 return dccp_table_header != NULL ? 0 : -ENOMEM;
145 void dccp_sysctl_exit(void)
147 if (dccp_table_header != NULL) {
148 unregister_sysctl_table(dccp_table_header);
149 dccp_table_header = NULL;