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