Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 1 | /* SCTP kernel implementation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * (C) Copyright IBM Corp. 2002, 2004 |
| 3 | * Copyright (c) 2002 Intel Corp. |
| 4 | * |
Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 5 | * This file is part of the SCTP kernel implementation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | * |
| 7 | * Sysctl related interfaces for SCTP. |
| 8 | * |
Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 9 | * This SCTP implementation is free software; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | * you can redistribute it and/or modify it under the terms of |
| 11 | * the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2, or (at your option) |
| 13 | * any later version. |
| 14 | * |
Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 15 | * This SCTP implementation is distributed in the hope that it |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 17 | * ************************ |
| 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 19 | * See the GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with GNU CC; see the file COPYING. If not, write to |
| 23 | * the Free Software Foundation, 59 Temple Place - Suite 330, |
| 24 | * Boston, MA 02111-1307, USA. |
| 25 | * |
| 26 | * Please send any bug reports or fixes you make to the |
| 27 | * email address(es): |
| 28 | * lksctp developers <lksctp-developers@lists.sourceforge.net> |
| 29 | * |
| 30 | * Or submit a bug report through the following website: |
| 31 | * http://www.sf.net/projects/lksctp |
| 32 | * |
| 33 | * Written or modified by: |
| 34 | * Mingqin Liu <liuming@us.ibm.com> |
| 35 | * Jon Grimm <jgrimm@us.ibm.com> |
| 36 | * Ardelle Fan <ardelle.fan@intel.com> |
| 37 | * Ryan Layer <rmlayer@us.ibm.com> |
| 38 | * Sridhar Samudrala <sri@us.ibm.com> |
| 39 | * |
| 40 | * Any bugs reported given to us we will try to fix... any fixes shared will |
| 41 | * be incorporated into the next SCTP release. |
| 42 | */ |
| 43 | |
| 44 | #include <net/sctp/structs.h> |
Adrian Bunk | 8c5955d | 2005-09-05 18:07:42 -0700 | [diff] [blame] | 45 | #include <net/sctp/sctp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | #include <linux/sysctl.h> |
| 47 | |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 48 | static int zero = 0; |
| 49 | static int one = 1; |
| 50 | static int timer_max = 86400000; /* ms in one day */ |
| 51 | static int int_max = INT_MAX; |
Jean-Mickael Guerin | d48e074 | 2009-05-13 00:03:20 +0200 | [diff] [blame] | 52 | static int sack_timer_min = 1; |
| 53 | static int sack_timer_max = 500; |
Bhaskar Dutta | 7238843 | 2009-09-03 17:25:47 +0530 | [diff] [blame] | 54 | static int addr_scope_max = 3; /* check sctp_scope_policy_t in include/net/sctp/constants.h for max entries */ |
Vlad Yasevich | 90f2f53 | 2009-11-23 15:53:57 -0500 | [diff] [blame] | 55 | static int rwnd_scale_max = 16; |
Xi Wang | 2692ba6 | 2011-12-16 12:44:15 +0000 | [diff] [blame] | 56 | static unsigned long max_autoclose_min = 0; |
| 57 | static unsigned long max_autoclose_max = |
| 58 | (MAX_SCHEDULE_TIMEOUT / HZ > UINT_MAX) |
| 59 | ? UINT_MAX : MAX_SCHEDULE_TIMEOUT / HZ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | |
Eric Dumazet | 8d987e5 | 2010-11-09 23:24:26 +0000 | [diff] [blame] | 61 | extern long sysctl_sctp_mem[3]; |
Vlad Yasevich | 007e393 | 2007-09-16 16:04:37 -0700 | [diff] [blame] | 62 | extern int sysctl_sctp_rmem[3]; |
| 63 | extern int sysctl_sctp_wmem[3]; |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 64 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | static ctl_table sctp_table[] = { |
| 66 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | .procname = "rto_initial", |
| 68 | .data = &sctp_rto_initial, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 69 | .maxlen = sizeof(unsigned int), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 71 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 72 | .extra1 = &one, |
| 73 | .extra2 = &timer_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | }, |
| 75 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | .procname = "rto_min", |
| 77 | .data = &sctp_rto_min, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 78 | .maxlen = sizeof(unsigned int), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 80 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 81 | .extra1 = &one, |
| 82 | .extra2 = &timer_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | }, |
| 84 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | .procname = "rto_max", |
| 86 | .data = &sctp_rto_max, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 87 | .maxlen = sizeof(unsigned int), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 89 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 90 | .extra1 = &one, |
| 91 | .extra2 = &timer_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | }, |
| 93 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | .procname = "valid_cookie_life", |
| 95 | .data = &sctp_valid_cookie_life, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 96 | .maxlen = sizeof(unsigned int), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 98 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 99 | .extra1 = &one, |
| 100 | .extra2 = &timer_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | }, |
| 102 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | .procname = "max_burst", |
| 104 | .data = &sctp_max_burst, |
| 105 | .maxlen = sizeof(int), |
| 106 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 107 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 108 | .extra1 = &zero, |
| 109 | .extra2 = &int_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | }, |
| 111 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | .procname = "association_max_retrans", |
| 113 | .data = &sctp_max_retrans_association, |
| 114 | .maxlen = sizeof(int), |
| 115 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 116 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 117 | .extra1 = &one, |
| 118 | .extra2 = &int_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | }, |
| 120 | { |
Neil Horman | 4eb701d | 2005-04-28 12:02:04 -0700 | [diff] [blame] | 121 | .procname = "sndbuf_policy", |
| 122 | .data = &sctp_sndbuf_policy, |
| 123 | .maxlen = sizeof(int), |
| 124 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 125 | .proc_handler = proc_dointvec, |
Neil Horman | 4eb701d | 2005-04-28 12:02:04 -0700 | [diff] [blame] | 126 | }, |
| 127 | { |
Neil Horman | 049b3ff | 2005-11-11 16:08:24 -0800 | [diff] [blame] | 128 | .procname = "rcvbuf_policy", |
| 129 | .data = &sctp_rcvbuf_policy, |
| 130 | .maxlen = sizeof(int), |
| 131 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 132 | .proc_handler = proc_dointvec, |
Neil Horman | 049b3ff | 2005-11-11 16:08:24 -0800 | [diff] [blame] | 133 | }, |
| 134 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | .procname = "path_max_retrans", |
| 136 | .data = &sctp_max_retrans_path, |
| 137 | .maxlen = sizeof(int), |
| 138 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 139 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 140 | .extra1 = &one, |
| 141 | .extra2 = &int_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | }, |
| 143 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | .procname = "max_init_retransmits", |
| 145 | .data = &sctp_max_retrans_init, |
| 146 | .maxlen = sizeof(int), |
| 147 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 148 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 149 | .extra1 = &one, |
| 150 | .extra2 = &int_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | }, |
| 152 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | .procname = "hb_interval", |
| 154 | .data = &sctp_hb_interval, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 155 | .maxlen = sizeof(unsigned int), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 157 | .proc_handler = proc_dointvec_minmax, |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 158 | .extra1 = &one, |
| 159 | .extra2 = &timer_max |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 160 | }, |
| 161 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | .procname = "cookie_preserve_enable", |
| 163 | .data = &sctp_cookie_preserve_enable, |
Vlad Yasevich | 8116ffa | 2006-01-17 11:55:17 -0800 | [diff] [blame] | 164 | .maxlen = sizeof(int), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 166 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 167 | }, |
| 168 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | .procname = "rto_alpha_exp_divisor", |
| 170 | .data = &sctp_rto_alpha, |
| 171 | .maxlen = sizeof(int), |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 172 | .mode = 0444, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 173 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 174 | }, |
| 175 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | .procname = "rto_beta_exp_divisor", |
| 177 | .data = &sctp_rto_beta, |
| 178 | .maxlen = sizeof(int), |
Vladislav Yasevich | 3fd091e | 2006-08-22 13:29:17 -0700 | [diff] [blame] | 179 | .mode = 0444, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 180 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | }, |
| 182 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | .procname = "addip_enable", |
| 184 | .data = &sctp_addip_enable, |
| 185 | .maxlen = sizeof(int), |
| 186 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 187 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | }, |
| 189 | { |
Michio Honda | dd51be0 | 2011-04-26 17:36:05 +0900 | [diff] [blame] | 190 | .procname = "default_auto_asconf", |
| 191 | .data = &sctp_default_auto_asconf, |
| 192 | .maxlen = sizeof(int), |
| 193 | .mode = 0644, |
| 194 | .proc_handler = proc_dointvec, |
| 195 | }, |
| 196 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | .procname = "prsctp_enable", |
| 198 | .data = &sctp_prsctp_enable, |
| 199 | .maxlen = sizeof(int), |
| 200 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 201 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | }, |
Vlad Yasevich | 2f85a42 | 2005-06-28 13:24:23 -0700 | [diff] [blame] | 203 | { |
Vlad Yasevich | 2f85a42 | 2005-06-28 13:24:23 -0700 | [diff] [blame] | 204 | .procname = "sack_timeout", |
| 205 | .data = &sctp_sack_timeout, |
Jean-Mickael Guerin | d48e074 | 2009-05-13 00:03:20 +0200 | [diff] [blame] | 206 | .maxlen = sizeof(int), |
Vlad Yasevich | 2f85a42 | 2005-06-28 13:24:23 -0700 | [diff] [blame] | 207 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 208 | .proc_handler = proc_dointvec_minmax, |
Vlad Yasevich | 2f85a42 | 2005-06-28 13:24:23 -0700 | [diff] [blame] | 209 | .extra1 = &sack_timer_min, |
| 210 | .extra2 = &sack_timer_max, |
| 211 | }, |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 212 | { |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 213 | .procname = "sctp_mem", |
| 214 | .data = &sysctl_sctp_mem, |
| 215 | .maxlen = sizeof(sysctl_sctp_mem), |
| 216 | .mode = 0644, |
Eric Dumazet | 8d987e5 | 2010-11-09 23:24:26 +0000 | [diff] [blame] | 217 | .proc_handler = proc_doulongvec_minmax |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 218 | }, |
| 219 | { |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 220 | .procname = "sctp_rmem", |
| 221 | .data = &sysctl_sctp_rmem, |
| 222 | .maxlen = sizeof(sysctl_sctp_rmem), |
| 223 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 224 | .proc_handler = proc_dointvec, |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 225 | }, |
| 226 | { |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 227 | .procname = "sctp_wmem", |
| 228 | .data = &sysctl_sctp_wmem, |
| 229 | .maxlen = sizeof(sysctl_sctp_wmem), |
| 230 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 231 | .proc_handler = proc_dointvec, |
Neil Horman | 4d93df0 | 2007-08-15 16:07:44 -0700 | [diff] [blame] | 232 | }, |
Vlad Yasevich | a29a5bd | 2007-09-16 19:31:35 -0700 | [diff] [blame] | 233 | { |
Vlad Yasevich | a29a5bd | 2007-09-16 19:31:35 -0700 | [diff] [blame] | 234 | .procname = "auth_enable", |
| 235 | .data = &sctp_auth_enable, |
| 236 | .maxlen = sizeof(int), |
| 237 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 238 | .proc_handler = proc_dointvec, |
Vlad Yasevich | a29a5bd | 2007-09-16 19:31:35 -0700 | [diff] [blame] | 239 | }, |
Vlad Yasevich | 73d9c4f | 2007-10-24 17:24:26 -0400 | [diff] [blame] | 240 | { |
Vlad Yasevich | 73d9c4f | 2007-10-24 17:24:26 -0400 | [diff] [blame] | 241 | .procname = "addip_noauth_enable", |
| 242 | .data = &sctp_addip_noauth, |
| 243 | .maxlen = sizeof(int), |
| 244 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 245 | .proc_handler = proc_dointvec, |
Vlad Yasevich | 73d9c4f | 2007-10-24 17:24:26 -0400 | [diff] [blame] | 246 | }, |
Bhaskar Dutta | 7238843 | 2009-09-03 17:25:47 +0530 | [diff] [blame] | 247 | { |
Bhaskar Dutta | 7238843 | 2009-09-03 17:25:47 +0530 | [diff] [blame] | 248 | .procname = "addr_scope_policy", |
| 249 | .data = &sctp_scope_policy, |
| 250 | .maxlen = sizeof(int), |
| 251 | .mode = 0644, |
Eric W. Biederman | 6d45611 | 2009-11-16 03:11:48 -0800 | [diff] [blame] | 252 | .proc_handler = proc_dointvec_minmax, |
Bhaskar Dutta | 7238843 | 2009-09-03 17:25:47 +0530 | [diff] [blame] | 253 | .extra1 = &zero, |
| 254 | .extra2 = &addr_scope_max, |
| 255 | }, |
Vlad Yasevich | 90f2f53 | 2009-11-23 15:53:57 -0500 | [diff] [blame] | 256 | { |
Vlad Yasevich | 90f2f53 | 2009-11-23 15:53:57 -0500 | [diff] [blame] | 257 | .procname = "rwnd_update_shift", |
| 258 | .data = &sctp_rwnd_upd_shift, |
| 259 | .maxlen = sizeof(int), |
| 260 | .mode = 0644, |
| 261 | .proc_handler = &proc_dointvec_minmax, |
Vlad Yasevich | 90f2f53 | 2009-11-23 15:53:57 -0500 | [diff] [blame] | 262 | .extra1 = &one, |
| 263 | .extra2 = &rwnd_scale_max, |
| 264 | }, |
Xi Wang | 2692ba6 | 2011-12-16 12:44:15 +0000 | [diff] [blame] | 265 | { |
| 266 | .procname = "max_autoclose", |
| 267 | .data = &sctp_max_autoclose, |
| 268 | .maxlen = sizeof(unsigned long), |
| 269 | .mode = 0644, |
| 270 | .proc_handler = &proc_doulongvec_minmax, |
| 271 | .extra1 = &max_autoclose_min, |
| 272 | .extra2 = &max_autoclose_max, |
| 273 | }, |
Vlad Yasevich | 90f2f53 | 2009-11-23 15:53:57 -0500 | [diff] [blame] | 274 | |
Linus Torvalds | d7fc02c | 2009-12-08 07:55:01 -0800 | [diff] [blame] | 275 | { /* sentinel */ } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | }; |
| 277 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | static struct ctl_table_header * sctp_sysctl_header; |
| 279 | |
| 280 | /* Sysctl registration. */ |
| 281 | void sctp_sysctl_register(void) |
| 282 | { |
Eric W. Biederman | ec8f23c | 2012-04-19 13:44:49 +0000 | [diff] [blame] | 283 | sctp_sysctl_header = register_net_sysctl(&init_net, "net/sctp", sctp_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | /* Sysctl deregistration. */ |
| 287 | void sctp_sysctl_unregister(void) |
| 288 | { |
Eric W. Biederman | 5dd3df1 | 2012-04-19 13:24:33 +0000 | [diff] [blame] | 289 | unregister_net_sysctl_table(sctp_sysctl_header); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 290 | } |