1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 6 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions are met: 10 * 11 * a) Redistributions of source code must retain the above copyright notice, 12 * this list of conditions and the following disclaimer. 13 * 14 * b) Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in 16 * the documentation and/or other materials provided with the distribution. 17 * 18 * c) Neither the name of Cisco Systems, Inc. nor the names of its 19 * contributors may be used to endorse or promote products derived 20 * from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 24 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 * THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34 35 #ifndef _NETINET_SCTP_SYSCTL_H_ 36 #define _NETINET_SCTP_SYSCTL_H_ 37 38 #include <netinet/sctp_os.h> 39 #include <netinet/sctp_constants.h> 40 41 struct sctp_sysctl { 42 uint32_t sctp_sendspace; 43 uint32_t sctp_recvspace; 44 uint32_t sctp_auto_asconf; 45 uint32_t sctp_multiple_asconfs; 46 uint32_t sctp_ecn_enable; 47 uint32_t sctp_pr_enable; 48 uint32_t sctp_auth_enable; 49 uint32_t sctp_asconf_enable; 50 uint32_t sctp_reconfig_enable; 51 uint32_t sctp_nrsack_enable; 52 uint32_t sctp_pktdrop_enable; 53 uint32_t sctp_fr_max_burst_default; 54 uint32_t sctp_peer_chunk_oh; 55 uint32_t sctp_max_burst_default; 56 uint32_t sctp_max_chunks_on_queue; 57 uint32_t sctp_hashtblsize; 58 uint32_t sctp_pcbtblsize; 59 uint32_t sctp_min_split_point; 60 uint32_t sctp_chunkscale; 61 uint32_t sctp_delayed_sack_time_default; 62 uint32_t sctp_sack_freq_default; 63 uint32_t sctp_system_free_resc_limit; 64 uint32_t sctp_asoc_free_resc_limit; 65 uint32_t sctp_heartbeat_interval_default; 66 uint32_t sctp_pmtu_raise_time_default; 67 uint32_t sctp_shutdown_guard_time_default; 68 uint32_t sctp_secret_lifetime_default; 69 uint32_t sctp_rto_max_default; 70 uint32_t sctp_rto_min_default; 71 uint32_t sctp_rto_initial_default; 72 uint32_t sctp_init_rto_max_default; 73 uint32_t sctp_valid_cookie_life_default; 74 uint32_t sctp_init_rtx_max_default; 75 uint32_t sctp_assoc_rtx_max_default; 76 uint32_t sctp_path_rtx_max_default; 77 uint32_t sctp_path_pf_threshold; 78 uint32_t sctp_add_more_threshold; 79 uint32_t sctp_nr_incoming_streams_default; 80 uint32_t sctp_nr_outgoing_streams_default; 81 uint32_t sctp_cmt_on_off; 82 uint32_t sctp_cmt_use_dac; 83 uint32_t sctp_use_cwnd_based_maxburst; 84 uint32_t sctp_nat_friendly; 85 uint32_t sctp_L2_abc_variable; 86 uint32_t sctp_mbuf_threshold_count; 87 uint32_t sctp_do_drain; 88 uint32_t sctp_hb_maxburst; 89 uint32_t sctp_abort_if_one_2_one_hits_limit; 90 uint32_t sctp_min_residual; 91 uint32_t sctp_max_retran_chunk; 92 uint32_t sctp_logging_level; 93 /* JRS - Variable for default congestion control module */ 94 uint32_t sctp_default_cc_module; 95 /* RS - Variable for default stream scheduling module */ 96 uint32_t sctp_default_ss_module; 97 uint32_t sctp_default_frag_interleave; 98 uint32_t sctp_mobility_base; 99 uint32_t sctp_mobility_fasthandoff; 100 uint32_t sctp_inits_include_nat_friendly; 101 uint32_t sctp_rttvar_bw; 102 uint32_t sctp_rttvar_rtt; 103 uint32_t sctp_rttvar_eqret; 104 uint32_t sctp_steady_step; 105 uint32_t sctp_use_dccc_ecn; 106 #if defined(SCTP_LOCAL_TRACE_BUF) 107 struct sctp_log sctp_log; 108 #endif 109 uint32_t sctp_udp_tunneling_port; 110 uint32_t sctp_enable_sack_immediately; 111 uint32_t sctp_vtag_time_wait; 112 uint32_t sctp_buffer_splitting; 113 uint32_t sctp_initial_cwnd; 114 uint32_t sctp_blackhole; 115 uint32_t sctp_sendall_limit; 116 uint32_t sctp_diag_info_code; 117 uint32_t sctp_ootb_with_zero_cksum; 118 #if defined(SCTP_DEBUG) 119 uint32_t sctp_debug_on; 120 #endif 121 }; 122 123 /* 124 * limits for the sysctl variables 125 */ 126 /* maxdgram: Maximum outgoing SCTP buffer size */ 127 #define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size" 128 #define SCTPCTL_MAXDGRAM_MIN 0 129 #define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF 130 #define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */ 131 132 /* recvspace: Maximum incoming SCTP buffer size */ 133 #define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size" 134 #define SCTPCTL_RECVSPACE_MIN 0 135 #define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF 136 #define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */ 137 138 /* autoasconf: Enable SCTP Auto-ASCONF */ 139 #define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF" 140 #define SCTPCTL_AUTOASCONF_MIN 0 141 #define SCTPCTL_AUTOASCONF_MAX 1 142 #define SCTPCTL_AUTOASCONF_DEFAULT 1 143 144 /* autoasconf: Enable SCTP Auto-ASCONF */ 145 #define SCTPCTL_MULTIPLEASCONFS_DESC "Enable SCTP Multiple-ASCONFs" 146 #define SCTPCTL_MULTIPLEASCONFS_MIN 0 147 #define SCTPCTL_MULTIPLEASCONFS_MAX 1 148 #define SCTPCTL_MULTIPLEASCONFS_DEFAULT SCTP_DEFAULT_MULTIPLE_ASCONFS 149 150 /* ecn_enable: Enable SCTP ECN */ 151 #define SCTPCTL_ECN_ENABLE_DESC "Enable SCTP ECN" 152 #define SCTPCTL_ECN_ENABLE_MIN 0 153 #define SCTPCTL_ECN_ENABLE_MAX 1 154 #define SCTPCTL_ECN_ENABLE_DEFAULT 1 155 156 /* pr_enable: Enable PR-SCTP */ 157 #define SCTPCTL_PR_ENABLE_DESC "Enable PR-SCTP" 158 #define SCTPCTL_PR_ENABLE_MIN 0 159 #define SCTPCTL_PR_ENABLE_MAX 1 160 #define SCTPCTL_PR_ENABLE_DEFAULT 1 161 162 /* auth_enable: Enable SCTP AUTH function */ 163 #define SCTPCTL_AUTH_ENABLE_DESC "Enable SCTP AUTH function" 164 #define SCTPCTL_AUTH_ENABLE_MIN 0 165 #define SCTPCTL_AUTH_ENABLE_MAX 1 166 #define SCTPCTL_AUTH_ENABLE_DEFAULT 1 167 168 /* asconf_enable: Enable SCTP ASCONF */ 169 #define SCTPCTL_ASCONF_ENABLE_DESC "Enable SCTP ASCONF" 170 #define SCTPCTL_ASCONF_ENABLE_MIN 0 171 #define SCTPCTL_ASCONF_ENABLE_MAX 1 172 #define SCTPCTL_ASCONF_ENABLE_DEFAULT 1 173 174 /* reconfig_enable: Enable SCTP RE-CONFIG */ 175 #define SCTPCTL_RECONFIG_ENABLE_DESC "Enable SCTP RE-CONFIG" 176 #define SCTPCTL_RECONFIG_ENABLE_MIN 0 177 #define SCTPCTL_RECONFIG_ENABLE_MAX 1 178 #define SCTPCTL_RECONFIG_ENABLE_DEFAULT 1 179 180 /* nrsack_enable: Enable NR_SACK */ 181 #define SCTPCTL_NRSACK_ENABLE_DESC "Enable SCTP NR-SACK" 182 #define SCTPCTL_NRSACK_ENABLE_MIN 0 183 #define SCTPCTL_NRSACK_ENABLE_MAX 1 184 #define SCTPCTL_NRSACK_ENABLE_DEFAULT 0 185 186 /* pktdrop_enable: Enable SCTP Packet Drop Reports */ 187 #define SCTPCTL_PKTDROP_ENABLE_DESC "Enable SCTP PKTDROP" 188 #define SCTPCTL_PKTDROP_ENABLE_MIN 0 189 #define SCTPCTL_PKTDROP_ENABLE_MAX 1 190 #define SCTPCTL_PKTDROP_ENABLE_DEFAULT 0 191 192 /* loopback_nocsum: Enable NO Csum on packets sent on loopback */ 193 #define SCTPCTL_LOOPBACK_NOCSUM_DESC "Enable NO Csum on packets sent on loopback" 194 #define SCTPCTL_LOOPBACK_NOCSUM_MIN 0 195 #define SCTPCTL_LOOPBACK_NOCSUM_MAX 1 196 #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1 197 198 /* peer_chkoh: Amount to debit peers rwnd per chunk sent */ 199 #define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent" 200 #define SCTPCTL_PEER_CHKOH_MIN 0 201 #define SCTPCTL_PEER_CHKOH_MAX 0xFFFFFFFF 202 #define SCTPCTL_PEER_CHKOH_DEFAULT 256 203 204 /* maxburst: Default max burst for sctp endpoints */ 205 #define SCTPCTL_MAXBURST_DESC "Default max burst for sctp endpoints" 206 #define SCTPCTL_MAXBURST_MIN 0 207 #define SCTPCTL_MAXBURST_MAX 0xFFFFFFFF 208 #define SCTPCTL_MAXBURST_DEFAULT SCTP_DEF_MAX_BURST 209 210 /* fr_maxburst: Default max burst for sctp endpoints when fast retransmitting */ 211 #define SCTPCTL_FRMAXBURST_DESC "Default max burst for SCTP endpoints when fast retransmitting" 212 #define SCTPCTL_FRMAXBURST_MIN 0 213 #define SCTPCTL_FRMAXBURST_MAX 0xFFFFFFFF 214 #define SCTPCTL_FRMAXBURST_DEFAULT SCTP_DEF_FRMAX_BURST 215 216 /* maxchunks: Default max chunks on queue per asoc */ 217 #define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc" 218 #define SCTPCTL_MAXCHUNKS_MIN 0 219 #define SCTPCTL_MAXCHUNKS_MAX 0xFFFFFFFF 220 #define SCTPCTL_MAXCHUNKS_DEFAULT SCTP_ASOC_MAX_CHUNKS_ON_QUEUE 221 222 /* tcbhashsize: Tunable for Hash table sizes */ 223 #define SCTPCTL_TCBHASHSIZE_DESC "Tunable for TCB hash table sizes" 224 #define SCTPCTL_TCBHASHSIZE_MIN 1 225 #define SCTPCTL_TCBHASHSIZE_MAX 0xFFFFFFFF 226 #define SCTPCTL_TCBHASHSIZE_DEFAULT SCTP_TCBHASHSIZE 227 228 /* pcbhashsize: Tunable for PCB Hash table sizes */ 229 #define SCTPCTL_PCBHASHSIZE_DESC "Tunable for PCB hash table sizes" 230 #define SCTPCTL_PCBHASHSIZE_MIN 1 231 #define SCTPCTL_PCBHASHSIZE_MAX 0xFFFFFFFF 232 #define SCTPCTL_PCBHASHSIZE_DEFAULT SCTP_PCBHASHSIZE 233 234 /* min_split_point: Minimum size when splitting a chunk */ 235 #define SCTPCTL_MIN_SPLIT_POINT_DESC "Minimum size when splitting a chunk" 236 #define SCTPCTL_MIN_SPLIT_POINT_MIN 0 237 #define SCTPCTL_MIN_SPLIT_POINT_MAX 0xFFFFFFFF 238 #define SCTPCTL_MIN_SPLIT_POINT_DEFAULT SCTP_DEFAULT_SPLIT_POINT_MIN 239 240 /* chunkscale: Tunable for Scaling of number of chunks and messages */ 241 #define SCTPCTL_CHUNKSCALE_DESC "Tunable for scaling of number of chunks and messages" 242 #define SCTPCTL_CHUNKSCALE_MIN 1 243 #define SCTPCTL_CHUNKSCALE_MAX 0xFFFFFFFF 244 #define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE 245 246 /* delayed_sack_time: Default delayed SACK timer in ms */ 247 #define SCTPCTL_DELAYED_SACK_TIME_DESC "Default delayed SACK timer in ms" 248 #define SCTPCTL_DELAYED_SACK_TIME_MIN 0 249 #define SCTPCTL_DELAYED_SACK_TIME_MAX 0xFFFFFFFF 250 #define SCTPCTL_DELAYED_SACK_TIME_DEFAULT SCTP_RECV_MSEC 251 252 /* sack_freq: Default SACK frequency */ 253 #define SCTPCTL_SACK_FREQ_DESC "Default SACK frequency" 254 #define SCTPCTL_SACK_FREQ_MIN 0 255 #define SCTPCTL_SACK_FREQ_MAX 0xFFFFFFFF 256 #define SCTPCTL_SACK_FREQ_DEFAULT SCTP_DEFAULT_SACK_FREQ 257 258 /* sys_resource: Max number of cached resources in the system */ 259 #define SCTPCTL_SYS_RESOURCE_DESC "Max number of cached resources in the system" 260 #define SCTPCTL_SYS_RESOURCE_MIN 0 261 #define SCTPCTL_SYS_RESOURCE_MAX 0xFFFFFFFF 262 #define SCTPCTL_SYS_RESOURCE_DEFAULT SCTP_DEF_SYSTEM_RESC_LIMIT 263 264 /* asoc_resource: Max number of cached resources in an asoc */ 265 #define SCTPCTL_ASOC_RESOURCE_DESC "Max number of cached resources in an asoc" 266 #define SCTPCTL_ASOC_RESOURCE_MIN 0 267 #define SCTPCTL_ASOC_RESOURCE_MAX 0xFFFFFFFF 268 #define SCTPCTL_ASOC_RESOURCE_DEFAULT SCTP_DEF_ASOC_RESC_LIMIT 269 270 /* heartbeat_interval: Default heartbeat interval in ms */ 271 #define SCTPCTL_HEARTBEAT_INTERVAL_DESC "Default heartbeat interval in ms" 272 #define SCTPCTL_HEARTBEAT_INTERVAL_MIN 0 273 #define SCTPCTL_HEARTBEAT_INTERVAL_MAX 0xFFFFFFFF 274 #define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT SCTP_HB_DEFAULT_MSEC 275 276 /* pmtu_raise_time: Default PMTU raise timer in seconds */ 277 #define SCTPCTL_PMTU_RAISE_TIME_DESC "Default PMTU raise timer in seconds" 278 #define SCTPCTL_PMTU_RAISE_TIME_MIN 0 279 #define SCTPCTL_PMTU_RAISE_TIME_MAX 0xFFFFFFFF 280 #define SCTPCTL_PMTU_RAISE_TIME_DEFAULT SCTP_DEF_PMTU_RAISE_SEC 281 282 /* shutdown_guard_time: Default shutdown guard timer in seconds */ 283 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC "Shutdown guard timer in seconds (0 means 5 times RTO.Max)" 284 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN 0 285 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX 0xFFFFFFFF 286 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT 0 287 288 /* secret_lifetime: Default secret lifetime in seconds */ 289 #define SCTPCTL_SECRET_LIFETIME_DESC "Default secret lifetime in seconds" 290 #define SCTPCTL_SECRET_LIFETIME_MIN 0 291 #define SCTPCTL_SECRET_LIFETIME_MAX 0xFFFFFFFF 292 #define SCTPCTL_SECRET_LIFETIME_DEFAULT SCTP_DEFAULT_SECRET_LIFE_SEC 293 294 /* rto_max: Default maximum retransmission timeout in ms */ 295 #define SCTPCTL_RTO_MAX_DESC "Default maximum retransmission timeout in ms" 296 #define SCTPCTL_RTO_MAX_MIN 0 297 #define SCTPCTL_RTO_MAX_MAX 0xFFFFFFFF 298 #define SCTPCTL_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND 299 300 /* rto_min: Default minimum retransmission timeout in ms */ 301 #define SCTPCTL_RTO_MIN_DESC "Default minimum retransmission timeout in ms" 302 #define SCTPCTL_RTO_MIN_MIN 0 303 #define SCTPCTL_RTO_MIN_MAX 0xFFFFFFFF 304 #define SCTPCTL_RTO_MIN_DEFAULT SCTP_RTO_LOWER_BOUND 305 306 /* rto_initial: Default initial retransmission timeout in ms */ 307 #define SCTPCTL_RTO_INITIAL_DESC "Default initial retransmission timeout in ms" 308 #define SCTPCTL_RTO_INITIAL_MIN 0 309 #define SCTPCTL_RTO_INITIAL_MAX 0xFFFFFFFF 310 #define SCTPCTL_RTO_INITIAL_DEFAULT SCTP_RTO_INITIAL 311 312 /* init_rto_max: Default maximum retransmission timeout during association setup in ms */ 313 #define SCTPCTL_INIT_RTO_MAX_DESC "Default maximum retransmission timeout during association setup in ms" 314 #define SCTPCTL_INIT_RTO_MAX_MIN 0 315 #define SCTPCTL_INIT_RTO_MAX_MAX 0xFFFFFFFF 316 #define SCTPCTL_INIT_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND 317 318 /* valid_cookie_life: Default cookie lifetime in ms */ 319 #define SCTPCTL_VALID_COOKIE_LIFE_DESC "Default cookie lifetime in ms" 320 #define SCTPCTL_VALID_COOKIE_LIFE_MIN SCTP_MIN_COOKIE_LIFE 321 #define SCTPCTL_VALID_COOKIE_LIFE_MAX SCTP_MAX_COOKIE_LIFE 322 #define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT SCTP_DEFAULT_COOKIE_LIFE 323 324 /* init_rtx_max: Default maximum number of retransmission for INIT chunks */ 325 #define SCTPCTL_INIT_RTX_MAX_DESC "Default maximum number of retransmissions for INIT chunks" 326 #define SCTPCTL_INIT_RTX_MAX_MIN 0 327 #define SCTPCTL_INIT_RTX_MAX_MAX 0xFFFFFFFF 328 #define SCTPCTL_INIT_RTX_MAX_DEFAULT SCTP_DEF_MAX_INIT 329 330 /* assoc_rtx_max: Default maximum number of retransmissions per association */ 331 #define SCTPCTL_ASSOC_RTX_MAX_DESC "Default maximum number of retransmissions per association" 332 #define SCTPCTL_ASSOC_RTX_MAX_MIN 0 333 #define SCTPCTL_ASSOC_RTX_MAX_MAX 0xFFFFFFFF 334 #define SCTPCTL_ASSOC_RTX_MAX_DEFAULT SCTP_DEF_MAX_SEND 335 336 /* path_rtx_max: Default maximum of retransmissions per path */ 337 #define SCTPCTL_PATH_RTX_MAX_DESC "Default maximum of retransmissions per path" 338 #define SCTPCTL_PATH_RTX_MAX_MIN 0 339 #define SCTPCTL_PATH_RTX_MAX_MAX 0xFFFFFFFF 340 #define SCTPCTL_PATH_RTX_MAX_DEFAULT SCTP_DEF_MAX_PATH_RTX 341 342 /* path_pf_threshold: threshold for considering the path potentially failed */ 343 #define SCTPCTL_PATH_PF_THRESHOLD_DESC "Default potentially failed threshold" 344 #define SCTPCTL_PATH_PF_THRESHOLD_MIN 0 345 #define SCTPCTL_PATH_PF_THRESHOLD_MAX 0xFFFF 346 #define SCTPCTL_PATH_PF_THRESHOLD_DEFAULT SCTPCTL_PATH_PF_THRESHOLD_MAX 347 348 /* add_more_on_output: When space-wise is it worthwhile to try to add more to a socket send buffer */ 349 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC "When space-wise is it worthwhile to try to add more to a socket send buffer" 350 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN 0 351 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX 0xFFFFFFFF 352 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE 353 354 /* incoming_streams: Default number of incoming streams */ 355 #define SCTPCTL_INCOMING_STREAMS_DESC "Default number of incoming streams" 356 #define SCTPCTL_INCOMING_STREAMS_MIN 1 357 #define SCTPCTL_INCOMING_STREAMS_MAX 65535 358 #define SCTPCTL_INCOMING_STREAMS_DEFAULT SCTP_ISTREAM_INITIAL 359 360 /* outgoing_streams: Default number of outgoing streams */ 361 #define SCTPCTL_OUTGOING_STREAMS_DESC "Default number of outgoing streams" 362 #define SCTPCTL_OUTGOING_STREAMS_MIN 1 363 #define SCTPCTL_OUTGOING_STREAMS_MAX 65535 364 #define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL 365 366 /* cmt_on_off: CMT on/off flag */ 367 #define SCTPCTL_CMT_ON_OFF_DESC "CMT settings" 368 #define SCTPCTL_CMT_ON_OFF_MIN SCTP_CMT_OFF 369 #define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX 370 #define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF 371 372 /* cmt_use_dac: CMT DAC on/off flag */ 373 #define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag" 374 #define SCTPCTL_CMT_USE_DAC_MIN 0 375 #define SCTPCTL_CMT_USE_DAC_MAX 1 376 #define SCTPCTL_CMT_USE_DAC_DEFAULT 0 377 378 /* cwnd_maxburst: Use a CWND adjusting to implement maxburst */ 379 #define SCTPCTL_CWND_MAXBURST_DESC "Adjust congestion control window to limit maximum burst when sending" 380 #define SCTPCTL_CWND_MAXBURST_MIN 0 381 #define SCTPCTL_CWND_MAXBURST_MAX 1 382 #define SCTPCTL_CWND_MAXBURST_DEFAULT 1 383 384 /* nat_friendly: SCTP NAT friendly operation */ 385 #define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation" 386 #define SCTPCTL_NAT_FRIENDLY_MIN 0 387 #define SCTPCTL_NAT_FRIENDLY_MAX 1 388 #define SCTPCTL_NAT_FRIENDLY_DEFAULT 1 389 390 /* abc_l_var: SCTP ABC max increase per SACK (L) */ 391 #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" 392 #define SCTPCTL_ABC_L_VAR_MIN 0 393 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF 394 #define SCTPCTL_ABC_L_VAR_DEFAULT 2 395 396 /* max_chained_mbufs: Default max number of small mbufs on a chain */ 397 #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" 398 #define SCTPCTL_MAX_CHAINED_MBUFS_MIN 0 399 #define SCTPCTL_MAX_CHAINED_MBUFS_MAX 0xFFFFFFFF 400 #define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT SCTP_DEFAULT_MBUFS_IN_CHAIN 401 402 /* do_sctp_drain: Should SCTP respond to the drain calls */ 403 #define SCTPCTL_DO_SCTP_DRAIN_DESC "Should SCTP respond to the drain calls" 404 #define SCTPCTL_DO_SCTP_DRAIN_MIN 0 405 #define SCTPCTL_DO_SCTP_DRAIN_MAX 1 406 #define SCTPCTL_DO_SCTP_DRAIN_DEFAULT 1 407 408 /* hb_max_burst: Confirmation Heartbeat max burst? */ 409 #define SCTPCTL_HB_MAX_BURST_DESC "Confirmation Heartbeat max burst" 410 #define SCTPCTL_HB_MAX_BURST_MIN 1 411 #define SCTPCTL_HB_MAX_BURST_MAX 0xFFFFFFFF 412 #define SCTPCTL_HB_MAX_BURST_DEFAULT SCTP_DEF_HBMAX_BURST 413 414 /* abort_at_limit: When one-2-one hits qlimit abort */ 415 #define SCTPCTL_ABORT_AT_LIMIT_DESC "Abort when one-to-one hits qlimit" 416 #define SCTPCTL_ABORT_AT_LIMIT_MIN 0 417 #define SCTPCTL_ABORT_AT_LIMIT_MAX 1 418 #define SCTPCTL_ABORT_AT_LIMIT_DEFAULT 0 419 420 /* min_residual: min residual in a data fragment leftover */ 421 #define SCTPCTL_MIN_RESIDUAL_DESC "Minimum residual data chunk in second part of split" 422 #define SCTPCTL_MIN_RESIDUAL_MIN 20 423 #define SCTPCTL_MIN_RESIDUAL_MAX 65535 424 #define SCTPCTL_MIN_RESIDUAL_DEFAULT 1452 425 426 /* max_retran_chunk: max chunk retransmissions */ 427 #define SCTPCTL_MAX_RETRAN_CHUNK_DESC "Maximum times an unlucky chunk can be retransmitted before assoc abort" 428 #define SCTPCTL_MAX_RETRAN_CHUNK_MIN 0 429 #define SCTPCTL_MAX_RETRAN_CHUNK_MAX 65535 430 #define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT 30 431 432 /* sctp_logging: This gives us logging when the options are enabled */ 433 #define SCTPCTL_LOGGING_LEVEL_DESC "Ltrace/KTR trace logging level" 434 #define SCTPCTL_LOGGING_LEVEL_MIN 0 435 #define SCTPCTL_LOGGING_LEVEL_MAX 0xffffffff 436 #define SCTPCTL_LOGGING_LEVEL_DEFAULT 0 437 438 /* JRS - default congestion control module sysctl */ 439 #define SCTPCTL_DEFAULT_CC_MODULE_DESC "Default congestion control module" 440 #define SCTPCTL_DEFAULT_CC_MODULE_MIN 0 441 #define SCTPCTL_DEFAULT_CC_MODULE_MAX 2 442 #define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT 0 443 444 /* RS - default stream scheduling module sysctl */ 445 #define SCTPCTL_DEFAULT_SS_MODULE_DESC "Default stream scheduling module" 446 #define SCTPCTL_DEFAULT_SS_MODULE_MIN 0 447 #define SCTPCTL_DEFAULT_SS_MODULE_MAX 5 448 #define SCTPCTL_DEFAULT_SS_MODULE_DEFAULT 0 449 450 /* RRS - default fragment interleave */ 451 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC "Default fragment interleave level" 452 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN 0 453 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX 2 454 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT 1 455 456 /* mobility_base: Enable SCTP mobility support */ 457 #define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility" 458 #define SCTPCTL_MOBILITY_BASE_MIN 0 459 #define SCTPCTL_MOBILITY_BASE_MAX 1 460 #define SCTPCTL_MOBILITY_BASE_DEFAULT 0 461 462 /* mobility_fasthandoff: Enable SCTP fast handoff support */ 463 #define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff" 464 #define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0 465 #define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1 466 #define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT 0 467 468 /* Enable SCTP/UDP tunneling port */ 469 #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port" 470 #define SCTPCTL_UDP_TUNNELING_PORT_MIN 0 471 #define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535 472 #define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT 0 473 474 /* Enable sending of the SACK-IMMEDIATELY bit */ 475 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit" 476 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN 0 477 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 1 478 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 479 480 /* Enable sending of the NAT-FRIENDLY message */ 481 #define SCTPCTL_NAT_FRIENDLY_INITS_DESC "Enable sending of the nat-friendly SCTP option on INITs" 482 #define SCTPCTL_NAT_FRIENDLY_INITS_MIN 0 483 #define SCTPCTL_NAT_FRIENDLY_INITS_MAX 1 484 #define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT SCTPCTL_NAT_FRIENDLY_INITS_MIN 485 486 /* Vtag time wait in seconds */ 487 #define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time in seconds, 0 disables it" 488 #define SCTPCTL_TIME_WAIT_MIN 0 489 #define SCTPCTL_TIME_WAIT_MAX 0xffffffff 490 #define SCTPCTL_TIME_WAIT_DEFAULT SCTP_TIME_WAIT 491 492 /* Enable Send/Receive buffer splitting */ 493 #define SCTPCTL_BUFFER_SPLITTING_DESC "Enable send/receive buffer splitting" 494 #define SCTPCTL_BUFFER_SPLITTING_MIN 0 495 #define SCTPCTL_BUFFER_SPLITTING_MAX 0x3 496 #define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN 497 498 /* Initial congestion window in MTUs */ 499 #define SCTPCTL_INITIAL_CWND_DESC "Defines the initial congestion window size in MTUs" 500 #define SCTPCTL_INITIAL_CWND_MIN 0 501 #define SCTPCTL_INITIAL_CWND_MAX 0xffffffff 502 #define SCTPCTL_INITIAL_CWND_DEFAULT 3 503 504 /* rttvar smooth avg for bw calc */ 505 #define SCTPCTL_RTTVAR_BW_DESC "Shift amount DCCC uses for bw smoothing on rtt calc" 506 #define SCTPCTL_RTTVAR_BW_MIN 0 507 #define SCTPCTL_RTTVAR_BW_MAX 32 508 #define SCTPCTL_RTTVAR_BW_DEFAULT 4 509 510 /* rttvar smooth avg for bw calc */ 511 #define SCTPCTL_RTTVAR_RTT_DESC "Shift amount DCCC uses for rtt smoothing on rtt calc" 512 #define SCTPCTL_RTTVAR_RTT_MIN 0 513 #define SCTPCTL_RTTVAR_RTT_MAX 32 514 #define SCTPCTL_RTTVAR_RTT_DEFAULT 5 515 516 #define SCTPCTL_RTTVAR_EQRET_DESC "Whether DCCC increases cwnd when the rtt and bw are unchanged" 517 #define SCTPCTL_RTTVAR_EQRET_MIN 0 518 #define SCTPCTL_RTTVAR_EQRET_MAX 1 519 #define SCTPCTL_RTTVAR_EQRET_DEFAULT 0 520 521 #define SCTPCTL_RTTVAR_STEADYS_DESC "Number of identical bw measurements DCCC takes to try step down of cwnd" 522 #define SCTPCTL_RTTVAR_STEADYS_MIN 0 523 #define SCTPCTL_RTTVAR_STEADYS_MAX 0xFFFF 524 #define SCTPCTL_RTTVAR_STEADYS_DEFAULT 20 /* 0 means disable feature */ 525 526 #define SCTPCTL_RTTVAR_DCCCECN_DESC "Enable ECN for DCCC." 527 #define SCTPCTL_RTTVAR_DCCCECN_MIN 0 528 #define SCTPCTL_RTTVAR_DCCCECN_MAX 1 529 #define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */ 530 531 #define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing, see blackhole(4) for more details" 532 #define SCTPCTL_BLACKHOLE_MIN 0 533 #define SCTPCTL_BLACKHOLE_MAX 2 534 #define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN 535 536 /* sendall_limit: Maximum message with SCTP_SENDALL */ 537 #define SCTPCTL_SENDALL_LIMIT_DESC "Maximum size of a message send with SCTP_SENDALL" 538 #define SCTPCTL_SENDALL_LIMIT_MIN 0 539 #define SCTPCTL_SENDALL_LIMIT_MAX 0xFFFFFFFF 540 #define SCTPCTL_SENDALL_LIMIT_DEFAULT 1432 541 542 #define SCTPCTL_DIAG_INFO_CODE_DESC "Diagnostic information error cause code" 543 #define SCTPCTL_DIAG_INFO_CODE_MIN 0 544 #define SCTPCTL_DIAG_INFO_CODE_MAX 65535 545 #define SCTPCTL_DIAG_INFO_CODE_DEFAULT 0 546 547 #define SCTPCTL_OOTB_WITH_ZERO_CKSUM_DESC "Accept OOTB packets with zero checksum" 548 #define SCTPCTL_OOTB_WITH_ZERO_CKSUM_MIN 0 549 #define SCTPCTL_OOTB_WITH_ZERO_CKSUM_MAX 1 550 #define SCTPCTL_OOTB_WITH_ZERO_CKSUM_DEFAULT 0 551 552 #if defined(SCTP_DEBUG) 553 /* debug: Configure debug output */ 554 #define SCTPCTL_DEBUG_DESC "Configure debug output" 555 #define SCTPCTL_DEBUG_MIN 0 556 #define SCTPCTL_DEBUG_MAX 0xFFFFFFFF 557 #define SCTPCTL_DEBUG_DEFAULT 0 558 #endif 559 560 #if defined(_KERNEL) || defined(__Userspace__) 561 #if defined(SYSCTL_DECL) 562 SYSCTL_DECL(_net_inet_sctp); 563 #endif 564 565 void sctp_init_sysctls(void); 566 567 #endif /* _KERNEL */ 568 #endif /* __sctp_sysctl_h__ */ 569