Blame view
net/sctp/sysctl.c
7.31 KB
60c778b25 [SCTP]: Stop clai... |
1 |
/* SCTP kernel implementation |
1da177e4c Linux-2.6.12-rc2 |
2 3 4 |
* (C) Copyright IBM Corp. 2002, 2004 * Copyright (c) 2002 Intel Corp. * |
60c778b25 [SCTP]: Stop clai... |
5 |
* This file is part of the SCTP kernel implementation |
1da177e4c Linux-2.6.12-rc2 |
6 7 8 |
* * Sysctl related interfaces for SCTP. * |
60c778b25 [SCTP]: Stop clai... |
9 |
* This SCTP implementation is free software; |
1da177e4c Linux-2.6.12-rc2 |
10 11 12 13 14 |
* you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * |
60c778b25 [SCTP]: Stop clai... |
15 |
* This SCTP implementation is distributed in the hope that it |
1da177e4c Linux-2.6.12-rc2 |
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
* will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU CC; see the file COPYING. If not, write to * the Free Software Foundation, 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Please send any bug reports or fixes you make to the * email address(es): * lksctp developers <lksctp-developers@lists.sourceforge.net> * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Written or modified by: * Mingqin Liu <liuming@us.ibm.com> * Jon Grimm <jgrimm@us.ibm.com> * Ardelle Fan <ardelle.fan@intel.com> * Ryan Layer <rmlayer@us.ibm.com> * Sridhar Samudrala <sri@us.ibm.com> * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. */ #include <net/sctp/structs.h> |
8c5955d83 [SCTP]: net/sctp/... |
45 |
#include <net/sctp/sctp.h> |
1da177e4c Linux-2.6.12-rc2 |
46 |
#include <linux/sysctl.h> |
3fd091e73 [SCTP]: Remove mu... |
47 48 49 50 |
static int zero = 0; static int one = 1; static int timer_max = 86400000; /* ms in one day */ static int int_max = INT_MAX; |
d48e074df sctp: fix sack_ti... |
51 52 |
static int sack_timer_min = 1; static int sack_timer_max = 500; |
723884339 sctp: Sysctl conf... |
53 |
static int addr_scope_max = 3; /* check sctp_scope_policy_t in include/net/sctp/constants.h for max entries */ |
90f2f5318 sctp: Update SWS ... |
54 |
static int rwnd_scale_max = 16; |
2692ba61a sctp: fix incorre... |
55 56 57 58 |
static unsigned long max_autoclose_min = 0; static unsigned long max_autoclose_max = (MAX_SCHEDULE_TIMEOUT / HZ > UINT_MAX) ? UINT_MAX : MAX_SCHEDULE_TIMEOUT / HZ; |
1da177e4c Linux-2.6.12-rc2 |
59 |
|
8d987e5c7 net: avoid limits... |
60 |
extern long sysctl_sctp_mem[3]; |
007e3936b [SCTP]: Move sysc... |
61 62 |
extern int sysctl_sctp_rmem[3]; extern int sysctl_sctp_wmem[3]; |
4d93df0ab [SCTP]: Rewrite o... |
63 |
|
1da177e4c Linux-2.6.12-rc2 |
64 65 |
static ctl_table sctp_table[] = { { |
1da177e4c Linux-2.6.12-rc2 |
66 67 |
.procname = "rto_initial", .data = &sctp_rto_initial, |
3fd091e73 [SCTP]: Remove mu... |
68 |
.maxlen = sizeof(unsigned int), |
1da177e4c Linux-2.6.12-rc2 |
69 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
70 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
71 72 |
.extra1 = &one, .extra2 = &timer_max |
1da177e4c Linux-2.6.12-rc2 |
73 74 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
75 76 |
.procname = "rto_min", .data = &sctp_rto_min, |
3fd091e73 [SCTP]: Remove mu... |
77 |
.maxlen = sizeof(unsigned int), |
1da177e4c Linux-2.6.12-rc2 |
78 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
79 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
80 81 |
.extra1 = &one, .extra2 = &timer_max |
1da177e4c Linux-2.6.12-rc2 |
82 83 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
84 85 |
.procname = "rto_max", .data = &sctp_rto_max, |
3fd091e73 [SCTP]: Remove mu... |
86 |
.maxlen = sizeof(unsigned int), |
1da177e4c Linux-2.6.12-rc2 |
87 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
88 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
89 90 |
.extra1 = &one, .extra2 = &timer_max |
1da177e4c Linux-2.6.12-rc2 |
91 92 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
93 94 |
.procname = "valid_cookie_life", .data = &sctp_valid_cookie_life, |
3fd091e73 [SCTP]: Remove mu... |
95 |
.maxlen = sizeof(unsigned int), |
1da177e4c Linux-2.6.12-rc2 |
96 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
97 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
98 99 |
.extra1 = &one, .extra2 = &timer_max |
1da177e4c Linux-2.6.12-rc2 |
100 101 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
102 103 104 105 |
.procname = "max_burst", .data = &sctp_max_burst, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
106 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
107 108 |
.extra1 = &zero, .extra2 = &int_max |
1da177e4c Linux-2.6.12-rc2 |
109 110 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
111 112 113 114 |
.procname = "association_max_retrans", .data = &sctp_max_retrans_association, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
115 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
116 117 |
.extra1 = &one, .extra2 = &int_max |
1da177e4c Linux-2.6.12-rc2 |
118 119 |
}, { |
4eb701dfc [SCTP] Fix SCTP s... |
120 121 122 123 |
.procname = "sndbuf_policy", .data = &sctp_sndbuf_policy, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
124 |
.proc_handler = proc_dointvec, |
4eb701dfc [SCTP] Fix SCTP s... |
125 126 |
}, { |
049b3ff5a [SCTP]: Include u... |
127 128 129 130 |
.procname = "rcvbuf_policy", .data = &sctp_rcvbuf_policy, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
131 |
.proc_handler = proc_dointvec, |
049b3ff5a [SCTP]: Include u... |
132 133 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
134 135 136 137 |
.procname = "path_max_retrans", .data = &sctp_max_retrans_path, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
138 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
139 140 |
.extra1 = &one, .extra2 = &int_max |
1da177e4c Linux-2.6.12-rc2 |
141 142 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
143 144 145 146 |
.procname = "max_init_retransmits", .data = &sctp_max_retrans_init, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
147 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
148 149 |
.extra1 = &one, .extra2 = &int_max |
1da177e4c Linux-2.6.12-rc2 |
150 151 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
152 153 |
.procname = "hb_interval", .data = &sctp_hb_interval, |
3fd091e73 [SCTP]: Remove mu... |
154 |
.maxlen = sizeof(unsigned int), |
1da177e4c Linux-2.6.12-rc2 |
155 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
156 |
.proc_handler = proc_dointvec_minmax, |
3fd091e73 [SCTP]: Remove mu... |
157 158 |
.extra1 = &one, .extra2 = &timer_max |
1da177e4c Linux-2.6.12-rc2 |
159 160 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
161 162 |
.procname = "cookie_preserve_enable", .data = &sctp_cookie_preserve_enable, |
8116ffad4 [SCTP]: Fix bad s... |
163 |
.maxlen = sizeof(int), |
1da177e4c Linux-2.6.12-rc2 |
164 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
165 |
.proc_handler = proc_dointvec, |
1da177e4c Linux-2.6.12-rc2 |
166 167 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
168 169 170 |
.procname = "rto_alpha_exp_divisor", .data = &sctp_rto_alpha, .maxlen = sizeof(int), |
3fd091e73 [SCTP]: Remove mu... |
171 |
.mode = 0444, |
6d9f239a1 net: '&' redux |
172 |
.proc_handler = proc_dointvec, |
1da177e4c Linux-2.6.12-rc2 |
173 174 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
175 176 177 |
.procname = "rto_beta_exp_divisor", .data = &sctp_rto_beta, .maxlen = sizeof(int), |
3fd091e73 [SCTP]: Remove mu... |
178 |
.mode = 0444, |
6d9f239a1 net: '&' redux |
179 |
.proc_handler = proc_dointvec, |
1da177e4c Linux-2.6.12-rc2 |
180 181 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
182 183 |
.procname = "addip_enable", .data = &sctp_addip_enable, |
dd51be0f5 sctp: Add sysctl ... |
184 185 186 187 188 189 190 |
.maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec, }, { .procname = "default_auto_asconf", .data = &sctp_default_auto_asconf, |
1da177e4c Linux-2.6.12-rc2 |
191 192 |
.maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
193 |
.proc_handler = proc_dointvec, |
1da177e4c Linux-2.6.12-rc2 |
194 195 |
}, { |
1da177e4c Linux-2.6.12-rc2 |
196 197 198 199 |
.procname = "prsctp_enable", .data = &sctp_prsctp_enable, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
200 |
.proc_handler = proc_dointvec, |
1da177e4c Linux-2.6.12-rc2 |
201 |
}, |
2f85a4296 [SCTP] Make init ... |
202 |
{ |
2f85a4296 [SCTP] Make init ... |
203 204 |
.procname = "sack_timeout", .data = &sctp_sack_timeout, |
d48e074df sctp: fix sack_ti... |
205 |
.maxlen = sizeof(int), |
2f85a4296 [SCTP] Make init ... |
206 |
.mode = 0644, |
6d9f239a1 net: '&' redux |
207 |
.proc_handler = proc_dointvec_minmax, |
2f85a4296 [SCTP] Make init ... |
208 209 210 |
.extra1 = &sack_timer_min, .extra2 = &sack_timer_max, }, |
4d93df0ab [SCTP]: Rewrite o... |
211 |
{ |
4d93df0ab [SCTP]: Rewrite o... |
212 213 214 215 |
.procname = "sctp_mem", .data = &sysctl_sctp_mem, .maxlen = sizeof(sysctl_sctp_mem), .mode = 0644, |
8d987e5c7 net: avoid limits... |
216 |
.proc_handler = proc_doulongvec_minmax |
4d93df0ab [SCTP]: Rewrite o... |
217 218 |
}, { |
4d93df0ab [SCTP]: Rewrite o... |
219 220 221 222 |
.procname = "sctp_rmem", .data = &sysctl_sctp_rmem, .maxlen = sizeof(sysctl_sctp_rmem), .mode = 0644, |
6d9f239a1 net: '&' redux |
223 |
.proc_handler = proc_dointvec, |
4d93df0ab [SCTP]: Rewrite o... |
224 225 |
}, { |
4d93df0ab [SCTP]: Rewrite o... |
226 227 228 229 |
.procname = "sctp_wmem", .data = &sysctl_sctp_wmem, .maxlen = sizeof(sysctl_sctp_wmem), .mode = 0644, |
6d9f239a1 net: '&' redux |
230 |
.proc_handler = proc_dointvec, |
4d93df0ab [SCTP]: Rewrite o... |
231 |
}, |
a29a5bd4f [SCTP]: Implement... |
232 |
{ |
a29a5bd4f [SCTP]: Implement... |
233 234 235 236 |
.procname = "auth_enable", .data = &sctp_auth_enable, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
237 |
.proc_handler = proc_dointvec, |
a29a5bd4f [SCTP]: Implement... |
238 |
}, |
73d9c4fd1 SCTP: Allow ADD_I... |
239 |
{ |
73d9c4fd1 SCTP: Allow ADD_I... |
240 241 242 243 |
.procname = "addip_noauth_enable", .data = &sctp_addip_noauth, .maxlen = sizeof(int), .mode = 0644, |
6d9f239a1 net: '&' redux |
244 |
.proc_handler = proc_dointvec, |
73d9c4fd1 SCTP: Allow ADD_I... |
245 |
}, |
723884339 sctp: Sysctl conf... |
246 |
{ |
723884339 sctp: Sysctl conf... |
247 248 249 250 |
.procname = "addr_scope_policy", .data = &sctp_scope_policy, .maxlen = sizeof(int), .mode = 0644, |
6d4561110 sysctl: Drop & in... |
251 |
.proc_handler = proc_dointvec_minmax, |
723884339 sctp: Sysctl conf... |
252 253 254 |
.extra1 = &zero, .extra2 = &addr_scope_max, }, |
90f2f5318 sctp: Update SWS ... |
255 |
{ |
90f2f5318 sctp: Update SWS ... |
256 257 258 259 260 |
.procname = "rwnd_update_shift", .data = &sctp_rwnd_upd_shift, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec_minmax, |
90f2f5318 sctp: Update SWS ... |
261 262 263 |
.extra1 = &one, .extra2 = &rwnd_scale_max, }, |
2692ba61a sctp: fix incorre... |
264 265 266 267 268 269 270 271 272 |
{ .procname = "max_autoclose", .data = &sctp_max_autoclose, .maxlen = sizeof(unsigned long), .mode = 0644, .proc_handler = &proc_doulongvec_minmax, .extra1 = &max_autoclose_min, .extra2 = &max_autoclose_max, }, |
90f2f5318 sctp: Update SWS ... |
273 |
|
d7fc02c7b Merge git://git.k... |
274 |
{ /* sentinel */ } |
1da177e4c Linux-2.6.12-rc2 |
275 |
}; |
b5ccd792f [NET]: Simple ctl... |
276 |
static struct ctl_path sctp_path[] = { |
f8572d8f2 sysctl net: Remov... |
277 278 |
{ .procname = "net", }, { .procname = "sctp", }, |
b5ccd792f [NET]: Simple ctl... |
279 |
{ } |
1da177e4c Linux-2.6.12-rc2 |
280 281 282 283 284 285 286 |
}; static struct ctl_table_header * sctp_sysctl_header; /* Sysctl registration. */ void sctp_sysctl_register(void) { |
b5ccd792f [NET]: Simple ctl... |
287 |
sctp_sysctl_header = register_sysctl_paths(sctp_path, sctp_table); |
1da177e4c Linux-2.6.12-rc2 |
288 289 290 291 292 293 294 |
} /* Sysctl deregistration. */ void sctp_sysctl_unregister(void) { unregister_sysctl_table(sctp_sysctl_header); } |