aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/sysctl.c')
-rw-r--r--net/sctp/sysctl.c62
1 files changed, 15 insertions, 47 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index ab7151da120f..832590bbe0c0 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -52,6 +52,7 @@ static int int_max = INT_MAX;
52static int sack_timer_min = 1; 52static int sack_timer_min = 1;
53static int sack_timer_max = 500; 53static int sack_timer_max = 500;
54static int addr_scope_max = 3; /* check sctp_scope_policy_t in include/net/sctp/constants.h for max entries */ 54static int addr_scope_max = 3; /* check sctp_scope_policy_t in include/net/sctp/constants.h for max entries */
55static int rwnd_scale_max = 16;
55 56
56extern int sysctl_sctp_mem[3]; 57extern int sysctl_sctp_mem[3];
57extern int sysctl_sctp_rmem[3]; 58extern int sysctl_sctp_rmem[3];
@@ -59,180 +60,145 @@ extern int sysctl_sctp_wmem[3];
59 60
60static ctl_table sctp_table[] = { 61static ctl_table sctp_table[] = {
61 { 62 {
62 .ctl_name = NET_SCTP_RTO_INITIAL,
63 .procname = "rto_initial", 63 .procname = "rto_initial",
64 .data = &sctp_rto_initial, 64 .data = &sctp_rto_initial,
65 .maxlen = sizeof(unsigned int), 65 .maxlen = sizeof(unsigned int),
66 .mode = 0644, 66 .mode = 0644,
67 .proc_handler = proc_dointvec_minmax, 67 .proc_handler = proc_dointvec_minmax,
68 .strategy = sysctl_intvec,
69 .extra1 = &one, 68 .extra1 = &one,
70 .extra2 = &timer_max 69 .extra2 = &timer_max
71 }, 70 },
72 { 71 {
73 .ctl_name = NET_SCTP_RTO_MIN,
74 .procname = "rto_min", 72 .procname = "rto_min",
75 .data = &sctp_rto_min, 73 .data = &sctp_rto_min,
76 .maxlen = sizeof(unsigned int), 74 .maxlen = sizeof(unsigned int),
77 .mode = 0644, 75 .mode = 0644,
78 .proc_handler = proc_dointvec_minmax, 76 .proc_handler = proc_dointvec_minmax,
79 .strategy = sysctl_intvec,
80 .extra1 = &one, 77 .extra1 = &one,
81 .extra2 = &timer_max 78 .extra2 = &timer_max
82 }, 79 },
83 { 80 {
84 .ctl_name = NET_SCTP_RTO_MAX,
85 .procname = "rto_max", 81 .procname = "rto_max",
86 .data = &sctp_rto_max, 82 .data = &sctp_rto_max,
87 .maxlen = sizeof(unsigned int), 83 .maxlen = sizeof(unsigned int),
88 .mode = 0644, 84 .mode = 0644,
89 .proc_handler = proc_dointvec_minmax, 85 .proc_handler = proc_dointvec_minmax,
90 .strategy = sysctl_intvec,
91 .extra1 = &one, 86 .extra1 = &one,
92 .extra2 = &timer_max 87 .extra2 = &timer_max
93 }, 88 },
94 { 89 {
95 .ctl_name = NET_SCTP_VALID_COOKIE_LIFE,
96 .procname = "valid_cookie_life", 90 .procname = "valid_cookie_life",
97 .data = &sctp_valid_cookie_life, 91 .data = &sctp_valid_cookie_life,
98 .maxlen = sizeof(unsigned int), 92 .maxlen = sizeof(unsigned int),
99 .mode = 0644, 93 .mode = 0644,
100 .proc_handler = proc_dointvec_minmax, 94 .proc_handler = proc_dointvec_minmax,
101 .strategy = sysctl_intvec,
102 .extra1 = &one, 95 .extra1 = &one,
103 .extra2 = &timer_max 96 .extra2 = &timer_max
104 }, 97 },
105 { 98 {
106 .ctl_name = NET_SCTP_MAX_BURST,
107 .procname = "max_burst", 99 .procname = "max_burst",
108 .data = &sctp_max_burst, 100 .data = &sctp_max_burst,
109 .maxlen = sizeof(int), 101 .maxlen = sizeof(int),
110 .mode = 0644, 102 .mode = 0644,
111 .proc_handler = proc_dointvec_minmax, 103 .proc_handler = proc_dointvec_minmax,
112 .strategy = sysctl_intvec,
113 .extra1 = &zero, 104 .extra1 = &zero,
114 .extra2 = &int_max 105 .extra2 = &int_max
115 }, 106 },
116 { 107 {
117 .ctl_name = NET_SCTP_ASSOCIATION_MAX_RETRANS,
118 .procname = "association_max_retrans", 108 .procname = "association_max_retrans",
119 .data = &sctp_max_retrans_association, 109 .data = &sctp_max_retrans_association,
120 .maxlen = sizeof(int), 110 .maxlen = sizeof(int),
121 .mode = 0644, 111 .mode = 0644,
122 .proc_handler = proc_dointvec_minmax, 112 .proc_handler = proc_dointvec_minmax,
123 .strategy = sysctl_intvec,
124 .extra1 = &one, 113 .extra1 = &one,
125 .extra2 = &int_max 114 .extra2 = &int_max
126 }, 115 },
127 { 116 {
128 .ctl_name = NET_SCTP_SNDBUF_POLICY,
129 .procname = "sndbuf_policy", 117 .procname = "sndbuf_policy",
130 .data = &sctp_sndbuf_policy, 118 .data = &sctp_sndbuf_policy,
131 .maxlen = sizeof(int), 119 .maxlen = sizeof(int),
132 .mode = 0644, 120 .mode = 0644,
133 .proc_handler = proc_dointvec, 121 .proc_handler = proc_dointvec,
134 .strategy = sysctl_intvec
135 }, 122 },
136 { 123 {
137 .ctl_name = NET_SCTP_RCVBUF_POLICY,
138 .procname = "rcvbuf_policy", 124 .procname = "rcvbuf_policy",
139 .data = &sctp_rcvbuf_policy, 125 .data = &sctp_rcvbuf_policy,
140 .maxlen = sizeof(int), 126 .maxlen = sizeof(int),
141 .mode = 0644, 127 .mode = 0644,
142 .proc_handler = proc_dointvec, 128 .proc_handler = proc_dointvec,
143 .strategy = sysctl_intvec
144 }, 129 },
145 { 130 {
146 .ctl_name = NET_SCTP_PATH_MAX_RETRANS,
147 .procname = "path_max_retrans", 131 .procname = "path_max_retrans",
148 .data = &sctp_max_retrans_path, 132 .data = &sctp_max_retrans_path,
149 .maxlen = sizeof(int), 133 .maxlen = sizeof(int),
150 .mode = 0644, 134 .mode = 0644,
151 .proc_handler = proc_dointvec_minmax, 135 .proc_handler = proc_dointvec_minmax,
152 .strategy = sysctl_intvec,
153 .extra1 = &one, 136 .extra1 = &one,
154 .extra2 = &int_max 137 .extra2 = &int_max
155 }, 138 },
156 { 139 {
157 .ctl_name = NET_SCTP_MAX_INIT_RETRANSMITS,
158 .procname = "max_init_retransmits", 140 .procname = "max_init_retransmits",
159 .data = &sctp_max_retrans_init, 141 .data = &sctp_max_retrans_init,
160 .maxlen = sizeof(int), 142 .maxlen = sizeof(int),
161 .mode = 0644, 143 .mode = 0644,
162 .proc_handler = proc_dointvec_minmax, 144 .proc_handler = proc_dointvec_minmax,
163 .strategy = sysctl_intvec,
164 .extra1 = &one, 145 .extra1 = &one,
165 .extra2 = &int_max 146 .extra2 = &int_max
166 }, 147 },
167 { 148 {
168 .ctl_name = NET_SCTP_HB_INTERVAL,
169 .procname = "hb_interval", 149 .procname = "hb_interval",
170 .data = &sctp_hb_interval, 150 .data = &sctp_hb_interval,
171 .maxlen = sizeof(unsigned int), 151 .maxlen = sizeof(unsigned int),
172 .mode = 0644, 152 .mode = 0644,
173 .proc_handler = proc_dointvec_minmax, 153 .proc_handler = proc_dointvec_minmax,
174 .strategy = sysctl_intvec,
175 .extra1 = &one, 154 .extra1 = &one,
176 .extra2 = &timer_max 155 .extra2 = &timer_max
177 }, 156 },
178 { 157 {
179 .ctl_name = NET_SCTP_PRESERVE_ENABLE,
180 .procname = "cookie_preserve_enable", 158 .procname = "cookie_preserve_enable",
181 .data = &sctp_cookie_preserve_enable, 159 .data = &sctp_cookie_preserve_enable,
182 .maxlen = sizeof(int), 160 .maxlen = sizeof(int),
183 .mode = 0644, 161 .mode = 0644,
184 .proc_handler = proc_dointvec, 162 .proc_handler = proc_dointvec,
185 .strategy = sysctl_intvec
186 }, 163 },
187 { 164 {
188 .ctl_name = NET_SCTP_RTO_ALPHA,
189 .procname = "rto_alpha_exp_divisor", 165 .procname = "rto_alpha_exp_divisor",
190 .data = &sctp_rto_alpha, 166 .data = &sctp_rto_alpha,
191 .maxlen = sizeof(int), 167 .maxlen = sizeof(int),
192 .mode = 0444, 168 .mode = 0444,
193 .proc_handler = proc_dointvec, 169 .proc_handler = proc_dointvec,
194 .strategy = sysctl_intvec
195 }, 170 },
196 { 171 {
197 .ctl_name = NET_SCTP_RTO_BETA,
198 .procname = "rto_beta_exp_divisor", 172 .procname = "rto_beta_exp_divisor",
199 .data = &sctp_rto_beta, 173 .data = &sctp_rto_beta,
200 .maxlen = sizeof(int), 174 .maxlen = sizeof(int),
201 .mode = 0444, 175 .mode = 0444,
202 .proc_handler = proc_dointvec, 176 .proc_handler = proc_dointvec,
203 .strategy = sysctl_intvec
204 }, 177 },
205 { 178 {
206 .ctl_name = NET_SCTP_ADDIP_ENABLE,
207 .procname = "addip_enable", 179 .procname = "addip_enable",
208 .data = &sctp_addip_enable, 180 .data = &sctp_addip_enable,
209 .maxlen = sizeof(int), 181 .maxlen = sizeof(int),
210 .mode = 0644, 182 .mode = 0644,
211 .proc_handler = proc_dointvec, 183 .proc_handler = proc_dointvec,
212 .strategy = sysctl_intvec
213 }, 184 },
214 { 185 {
215 .ctl_name = NET_SCTP_PRSCTP_ENABLE,
216 .procname = "prsctp_enable", 186 .procname = "prsctp_enable",
217 .data = &sctp_prsctp_enable, 187 .data = &sctp_prsctp_enable,
218 .maxlen = sizeof(int), 188 .maxlen = sizeof(int),
219 .mode = 0644, 189 .mode = 0644,
220 .proc_handler = proc_dointvec, 190 .proc_handler = proc_dointvec,
221 .strategy = sysctl_intvec
222 }, 191 },
223 { 192 {
224 .ctl_name = NET_SCTP_SACK_TIMEOUT,
225 .procname = "sack_timeout", 193 .procname = "sack_timeout",
226 .data = &sctp_sack_timeout, 194 .data = &sctp_sack_timeout,
227 .maxlen = sizeof(int), 195 .maxlen = sizeof(int),
228 .mode = 0644, 196 .mode = 0644,
229 .proc_handler = proc_dointvec_minmax, 197 .proc_handler = proc_dointvec_minmax,
230 .strategy = sysctl_intvec,
231 .extra1 = &sack_timer_min, 198 .extra1 = &sack_timer_min,
232 .extra2 = &sack_timer_max, 199 .extra2 = &sack_timer_max,
233 }, 200 },
234 { 201 {
235 .ctl_name = CTL_UNNUMBERED,
236 .procname = "sctp_mem", 202 .procname = "sctp_mem",
237 .data = &sysctl_sctp_mem, 203 .data = &sysctl_sctp_mem,
238 .maxlen = sizeof(sysctl_sctp_mem), 204 .maxlen = sizeof(sysctl_sctp_mem),
@@ -240,7 +206,6 @@ static ctl_table sctp_table[] = {
240 .proc_handler = proc_dointvec, 206 .proc_handler = proc_dointvec,
241 }, 207 },
242 { 208 {
243 .ctl_name = CTL_UNNUMBERED,
244 .procname = "sctp_rmem", 209 .procname = "sctp_rmem",
245 .data = &sysctl_sctp_rmem, 210 .data = &sysctl_sctp_rmem,
246 .maxlen = sizeof(sysctl_sctp_rmem), 211 .maxlen = sizeof(sysctl_sctp_rmem),
@@ -248,7 +213,6 @@ static ctl_table sctp_table[] = {
248 .proc_handler = proc_dointvec, 213 .proc_handler = proc_dointvec,
249 }, 214 },
250 { 215 {
251 .ctl_name = CTL_UNNUMBERED,
252 .procname = "sctp_wmem", 216 .procname = "sctp_wmem",
253 .data = &sysctl_sctp_wmem, 217 .data = &sysctl_sctp_wmem,
254 .maxlen = sizeof(sysctl_sctp_wmem), 218 .maxlen = sizeof(sysctl_sctp_wmem),
@@ -256,40 +220,44 @@ static ctl_table sctp_table[] = {
256 .proc_handler = proc_dointvec, 220 .proc_handler = proc_dointvec,
257 }, 221 },
258 { 222 {
259 .ctl_name = CTL_UNNUMBERED,
260 .procname = "auth_enable", 223 .procname = "auth_enable",
261 .data = &sctp_auth_enable, 224 .data = &sctp_auth_enable,
262 .maxlen = sizeof(int), 225 .maxlen = sizeof(int),
263 .mode = 0644, 226 .mode = 0644,
264 .proc_handler = proc_dointvec, 227 .proc_handler = proc_dointvec,
265 .strategy = sysctl_intvec
266 }, 228 },
267 { 229 {
268 .ctl_name = CTL_UNNUMBERED,
269 .procname = "addip_noauth_enable", 230 .procname = "addip_noauth_enable",
270 .data = &sctp_addip_noauth, 231 .data = &sctp_addip_noauth,
271 .maxlen = sizeof(int), 232 .maxlen = sizeof(int),
272 .mode = 0644, 233 .mode = 0644,
273 .proc_handler = proc_dointvec, 234 .proc_handler = proc_dointvec,
274 .strategy = sysctl_intvec
275 }, 235 },
276 { 236 {
277 .ctl_name = CTL_UNNUMBERED,
278 .procname = "addr_scope_policy", 237 .procname = "addr_scope_policy",
279 .data = &sctp_scope_policy, 238 .data = &sctp_scope_policy,
280 .maxlen = sizeof(int), 239 .maxlen = sizeof(int),
281 .mode = 0644, 240 .mode = 0644,
282 .proc_handler = &proc_dointvec_minmax, 241 .proc_handler = proc_dointvec_minmax,
283 .strategy = &sysctl_intvec,
284 .extra1 = &zero, 242 .extra1 = &zero,
285 .extra2 = &addr_scope_max, 243 .extra2 = &addr_scope_max,
286 }, 244 },
287 { .ctl_name = 0 } 245 {
246 .procname = "rwnd_update_shift",
247 .data = &sctp_rwnd_upd_shift,
248 .maxlen = sizeof(int),
249 .mode = 0644,
250 .proc_handler = &proc_dointvec_minmax,
251 .extra1 = &one,
252 .extra2 = &rwnd_scale_max,
253 },
254
255 { /* sentinel */ }
288}; 256};
289 257
290static struct ctl_path sctp_path[] = { 258static struct ctl_path sctp_path[] = {
291 { .procname = "net", .ctl_name = CTL_NET, }, 259 { .procname = "net", },
292 { .procname = "sctp", .ctl_name = NET_SCTP, }, 260 { .procname = "sctp", },
293 { } 261 { }
294}; 262};
295 263