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 #ifdef __FreeBSD__ 36 #include <sys/cdefs.h> 37 __FBSDID("$FreeBSD: head/sys/netinet/sctp_sysctl.h 299543 2016-05-12 16:34:59Z tuexen $"); 38 #endif 39 40 #ifndef _NETINET_SCTP_SYSCTL_H_ 41 #define _NETINET_SCTP_SYSCTL_H_ 42 43 #include <netinet/sctp_os.h> 44 #include <netinet/sctp_constants.h> 45 46 struct sctp_sysctl { 47 uint32_t sctp_sendspace; 48 uint32_t sctp_recvspace; 49 uint32_t sctp_auto_asconf; 50 uint32_t sctp_multiple_asconfs; 51 uint32_t sctp_ecn_enable; 52 uint32_t sctp_pr_enable; 53 uint32_t sctp_auth_enable; 54 uint32_t sctp_asconf_enable; 55 uint32_t sctp_reconfig_enable; 56 uint32_t sctp_nrsack_enable; 57 uint32_t sctp_pktdrop_enable; 58 uint32_t sctp_fr_max_burst_default; 59 #if !(defined(__FreeBSD__) && __FreeBSD_version >= 800000) 60 #if !defined(SCTP_WITH_NO_CSUM) 61 uint32_t sctp_no_csum_on_loopback; 62 #endif 63 #endif 64 uint32_t sctp_peer_chunk_oh; 65 uint32_t sctp_max_burst_default; 66 uint32_t sctp_max_chunks_on_queue; 67 uint32_t sctp_hashtblsize; 68 uint32_t sctp_pcbtblsize; 69 uint32_t sctp_min_split_point; 70 uint32_t sctp_chunkscale; 71 uint32_t sctp_delayed_sack_time_default; 72 uint32_t sctp_sack_freq_default; 73 uint32_t sctp_system_free_resc_limit; 74 uint32_t sctp_asoc_free_resc_limit; 75 uint32_t sctp_heartbeat_interval_default; 76 uint32_t sctp_pmtu_raise_time_default; 77 uint32_t sctp_shutdown_guard_time_default; 78 uint32_t sctp_secret_lifetime_default; 79 uint32_t sctp_rto_max_default; 80 uint32_t sctp_rto_min_default; 81 uint32_t sctp_rto_initial_default; 82 uint32_t sctp_init_rto_max_default; 83 uint32_t sctp_valid_cookie_life_default; 84 uint32_t sctp_init_rtx_max_default; 85 uint32_t sctp_assoc_rtx_max_default; 86 uint32_t sctp_path_rtx_max_default; 87 uint32_t sctp_path_pf_threshold; 88 uint32_t sctp_add_more_threshold; 89 uint32_t sctp_nr_incoming_streams_default; 90 uint32_t sctp_nr_outgoing_streams_default; 91 uint32_t sctp_cmt_on_off; 92 uint32_t sctp_cmt_use_dac; 93 uint32_t sctp_use_cwnd_based_maxburst; 94 uint32_t sctp_nat_friendly; 95 uint32_t sctp_L2_abc_variable; 96 uint32_t sctp_mbuf_threshold_count; 97 uint32_t sctp_do_drain; 98 uint32_t sctp_hb_maxburst; 99 uint32_t sctp_abort_if_one_2_one_hits_limit; 100 uint32_t sctp_min_residual; 101 uint32_t sctp_max_retran_chunk; 102 uint32_t sctp_logging_level; 103 /* JRS - Variable for default congestion control module */ 104 uint32_t sctp_default_cc_module; 105 /* RS - Variable for default stream scheduling module */ 106 uint32_t sctp_default_ss_module; 107 uint32_t sctp_default_frag_interleave; 108 uint32_t sctp_mobility_base; 109 uint32_t sctp_mobility_fasthandoff; 110 uint32_t sctp_inits_include_nat_friendly; 111 uint32_t sctp_rttvar_bw; 112 uint32_t sctp_rttvar_rtt; 113 uint32_t sctp_rttvar_eqret; 114 uint32_t sctp_steady_step; 115 uint32_t sctp_use_dccc_ecn; 116 uint32_t sctp_diag_info_code; 117 #if defined(SCTP_LOCAL_TRACE_BUF) 118 #if defined(__Windows__) 119 struct sctp_log *sctp_log; 120 #else 121 struct sctp_log sctp_log; 122 #endif 123 #endif 124 uint32_t sctp_udp_tunneling_port; 125 uint32_t sctp_enable_sack_immediately; 126 uint32_t sctp_vtag_time_wait; 127 uint32_t sctp_buffer_splitting; 128 uint32_t sctp_initial_cwnd; 129 uint32_t sctp_blackhole; 130 #if defined(SCTP_DEBUG) 131 uint32_t sctp_debug_on; 132 #endif 133 #if defined(__APPLE__) 134 uint32_t sctp_ignore_vmware_interfaces; 135 uint32_t sctp_main_timer; 136 uint32_t sctp_addr_watchdog_limit; 137 uint32_t sctp_vtag_watchdog_limit; 138 #endif 139 #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) 140 uint32_t sctp_output_unlocked; 141 #endif 142 }; 143 144 /* 145 * limits for the sysctl variables 146 */ 147 /* maxdgram: Maximum outgoing SCTP buffer size */ 148 #define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size" 149 #define SCTPCTL_MAXDGRAM_MIN 0 150 #define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF 151 #if defined(__Userspace__) 152 #define SCTPCTL_MAXDGRAM_DEFAULT SB_MAX 153 #else 154 #define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */ 155 #endif 156 157 /* recvspace: Maximum incoming SCTP buffer size */ 158 #define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size" 159 #define SCTPCTL_RECVSPACE_MIN 0 160 #define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF 161 #if defined(__Userspace__) 162 #define SCTPCTL_RECVSPACE_DEFAULT SB_RAW 163 #else 164 #define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */ 165 #endif 166 167 /* autoasconf: Enable SCTP Auto-ASCONF */ 168 #define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF" 169 #define SCTPCTL_AUTOASCONF_MIN 0 170 #define SCTPCTL_AUTOASCONF_MAX 1 171 #define SCTPCTL_AUTOASCONF_DEFAULT 1 172 173 /* autoasconf: Enable SCTP Auto-ASCONF */ 174 #define SCTPCTL_MULTIPLEASCONFS_DESC "Enable SCTP Muliple-ASCONFs" 175 #define SCTPCTL_MULTIPLEASCONFS_MIN 0 176 #define SCTPCTL_MULTIPLEASCONFS_MAX 1 177 #define SCTPCTL_MULTIPLEASCONFS_DEFAULT SCTP_DEFAULT_MULTIPLE_ASCONFS 178 179 /* ecn_enable: Enable SCTP ECN */ 180 #define SCTPCTL_ECN_ENABLE_DESC "Enable SCTP ECN" 181 #define SCTPCTL_ECN_ENABLE_MIN 0 182 #define SCTPCTL_ECN_ENABLE_MAX 1 183 #define SCTPCTL_ECN_ENABLE_DEFAULT 1 184 185 /* pr_enable: Enable PR-SCTP */ 186 #define SCTPCTL_PR_ENABLE_DESC "Enable PR-SCTP" 187 #define SCTPCTL_PR_ENABLE_MIN 0 188 #define SCTPCTL_PR_ENABLE_MAX 1 189 #define SCTPCTL_PR_ENABLE_DEFAULT 1 190 191 /* auth_enable: Enable SCTP AUTH function */ 192 #define SCTPCTL_AUTH_ENABLE_DESC "Enable SCTP AUTH function" 193 #define SCTPCTL_AUTH_ENABLE_MIN 0 194 #define SCTPCTL_AUTH_ENABLE_MAX 1 195 #define SCTPCTL_AUTH_ENABLE_DEFAULT 1 196 197 /* asconf_enable: Enable SCTP ASCONF */ 198 #define SCTPCTL_ASCONF_ENABLE_DESC "Enable SCTP ASCONF" 199 #define SCTPCTL_ASCONF_ENABLE_MIN 0 200 #define SCTPCTL_ASCONF_ENABLE_MAX 1 201 #define SCTPCTL_ASCONF_ENABLE_DEFAULT 1 202 203 /* reconfig_enable: Enable SCTP RE-CONFIG */ 204 #define SCTPCTL_RECONFIG_ENABLE_DESC "Enable SCTP RE-CONFIG" 205 #define SCTPCTL_RECONFIG_ENABLE_MIN 0 206 #define SCTPCTL_RECONFIG_ENABLE_MAX 1 207 #define SCTPCTL_RECONFIG_ENABLE_DEFAULT 1 208 209 /* nrsack_enable: Enable NR_SACK */ 210 #define SCTPCTL_NRSACK_ENABLE_DESC "Enable SCTP NR-SACK" 211 #define SCTPCTL_NRSACK_ENABLE_MIN 0 212 #define SCTPCTL_NRSACK_ENABLE_MAX 1 213 #define SCTPCTL_NRSACK_ENABLE_DEFAULT 0 214 215 /* pktdrop_enable: Enable SCTP Packet Drop Reports */ 216 #define SCTPCTL_PKTDROP_ENABLE_DESC "Enable SCTP PKTDROP" 217 #define SCTPCTL_PKTDROP_ENABLE_MIN 0 218 #define SCTPCTL_PKTDROP_ENABLE_MAX 1 219 #define SCTPCTL_PKTDROP_ENABLE_DEFAULT 0 220 221 /* loopback_nocsum: Enable NO Csum on packets sent on loopback */ 222 #define SCTPCTL_LOOPBACK_NOCSUM_DESC "Enable NO Csum on packets sent on loopback" 223 #define SCTPCTL_LOOPBACK_NOCSUM_MIN 0 224 #define SCTPCTL_LOOPBACK_NOCSUM_MAX 1 225 #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1 226 227 /* peer_chkoh: Amount to debit peers rwnd per chunk sent */ 228 #define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent" 229 #define SCTPCTL_PEER_CHKOH_MIN 0 230 #define SCTPCTL_PEER_CHKOH_MAX 0xFFFFFFFF 231 #define SCTPCTL_PEER_CHKOH_DEFAULT 256 232 233 /* maxburst: Default max burst for sctp endpoints */ 234 #define SCTPCTL_MAXBURST_DESC "Default max burst for sctp endpoints" 235 #define SCTPCTL_MAXBURST_MIN 0 236 #define SCTPCTL_MAXBURST_MAX 0xFFFFFFFF 237 #define SCTPCTL_MAXBURST_DEFAULT SCTP_DEF_MAX_BURST 238 239 /* fr_maxburst: Default max burst for sctp endpoints when fast retransmitting */ 240 #define SCTPCTL_FRMAXBURST_DESC "Default fr max burst for sctp endpoints" 241 #define SCTPCTL_FRMAXBURST_MIN 0 242 #define SCTPCTL_FRMAXBURST_MAX 0xFFFFFFFF 243 #define SCTPCTL_FRMAXBURST_DEFAULT SCTP_DEF_FRMAX_BURST 244 245 246 /* maxchunks: Default max chunks on queue per asoc */ 247 #define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc" 248 #define SCTPCTL_MAXCHUNKS_MIN 0 249 #define SCTPCTL_MAXCHUNKS_MAX 0xFFFFFFFF 250 #define SCTPCTL_MAXCHUNKS_DEFAULT SCTP_ASOC_MAX_CHUNKS_ON_QUEUE 251 252 /* tcbhashsize: Tunable for Hash table sizes */ 253 #define SCTPCTL_TCBHASHSIZE_DESC "Tunable for TCB hash table sizes" 254 #define SCTPCTL_TCBHASHSIZE_MIN 1 255 #define SCTPCTL_TCBHASHSIZE_MAX 0xFFFFFFFF 256 #define SCTPCTL_TCBHASHSIZE_DEFAULT SCTP_TCBHASHSIZE 257 258 /* pcbhashsize: Tunable for PCB Hash table sizes */ 259 #define SCTPCTL_PCBHASHSIZE_DESC "Tunable for PCB hash table sizes" 260 #define SCTPCTL_PCBHASHSIZE_MIN 1 261 #define SCTPCTL_PCBHASHSIZE_MAX 0xFFFFFFFF 262 #define SCTPCTL_PCBHASHSIZE_DEFAULT SCTP_PCBHASHSIZE 263 264 /* min_split_point: Minimum size when splitting a chunk */ 265 #define SCTPCTL_MIN_SPLIT_POINT_DESC "Minimum size when splitting a chunk" 266 #define SCTPCTL_MIN_SPLIT_POINT_MIN 0 267 #define SCTPCTL_MIN_SPLIT_POINT_MAX 0xFFFFFFFF 268 #define SCTPCTL_MIN_SPLIT_POINT_DEFAULT SCTP_DEFAULT_SPLIT_POINT_MIN 269 270 /* chunkscale: Tunable for Scaling of number of chunks and messages */ 271 #define SCTPCTL_CHUNKSCALE_DESC "Tunable for Scaling of number of chunks and messages" 272 #define SCTPCTL_CHUNKSCALE_MIN 1 273 #define SCTPCTL_CHUNKSCALE_MAX 0xFFFFFFFF 274 #define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE 275 276 /* delayed_sack_time: Default delayed SACK timer in ms */ 277 #define SCTPCTL_DELAYED_SACK_TIME_DESC "Default delayed SACK timer in ms" 278 #define SCTPCTL_DELAYED_SACK_TIME_MIN 0 279 #define SCTPCTL_DELAYED_SACK_TIME_MAX 0xFFFFFFFF 280 #define SCTPCTL_DELAYED_SACK_TIME_DEFAULT SCTP_RECV_MSEC 281 282 /* sack_freq: Default SACK frequency */ 283 #define SCTPCTL_SACK_FREQ_DESC "Default SACK frequency" 284 #define SCTPCTL_SACK_FREQ_MIN 0 285 #define SCTPCTL_SACK_FREQ_MAX 0xFFFFFFFF 286 #define SCTPCTL_SACK_FREQ_DEFAULT SCTP_DEFAULT_SACK_FREQ 287 288 /* sys_resource: Max number of cached resources in the system */ 289 #define SCTPCTL_SYS_RESOURCE_DESC "Max number of cached resources in the system" 290 #define SCTPCTL_SYS_RESOURCE_MIN 0 291 #define SCTPCTL_SYS_RESOURCE_MAX 0xFFFFFFFF 292 #define SCTPCTL_SYS_RESOURCE_DEFAULT SCTP_DEF_SYSTEM_RESC_LIMIT 293 294 /* asoc_resource: Max number of cached resources in an asoc */ 295 #define SCTPCTL_ASOC_RESOURCE_DESC "Max number of cached resources in an asoc" 296 #define SCTPCTL_ASOC_RESOURCE_MIN 0 297 #define SCTPCTL_ASOC_RESOURCE_MAX 0xFFFFFFFF 298 #define SCTPCTL_ASOC_RESOURCE_DEFAULT SCTP_DEF_ASOC_RESC_LIMIT 299 300 /* heartbeat_interval: Default heartbeat interval in ms */ 301 #define SCTPCTL_HEARTBEAT_INTERVAL_DESC "Default heartbeat interval in ms" 302 #define SCTPCTL_HEARTBEAT_INTERVAL_MIN 0 303 #define SCTPCTL_HEARTBEAT_INTERVAL_MAX 0xFFFFFFFF 304 #define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT SCTP_HB_DEFAULT_MSEC 305 306 /* pmtu_raise_time: Default PMTU raise timer in seconds */ 307 #define SCTPCTL_PMTU_RAISE_TIME_DESC "Default PMTU raise timer in seconds" 308 #define SCTPCTL_PMTU_RAISE_TIME_MIN 0 309 #define SCTPCTL_PMTU_RAISE_TIME_MAX 0xFFFFFFFF 310 #define SCTPCTL_PMTU_RAISE_TIME_DEFAULT SCTP_DEF_PMTU_RAISE_SEC 311 312 /* shutdown_guard_time: Default shutdown guard timer in seconds */ 313 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC "Shutdown guard timer in seconds (0 means 5 times RTO.Max)" 314 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN 0 315 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX 0xFFFFFFFF 316 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT 0 317 318 /* secret_lifetime: Default secret lifetime in seconds */ 319 #define SCTPCTL_SECRET_LIFETIME_DESC "Default secret lifetime in seconds" 320 #define SCTPCTL_SECRET_LIFETIME_MIN 0 321 #define SCTPCTL_SECRET_LIFETIME_MAX 0xFFFFFFFF 322 #define SCTPCTL_SECRET_LIFETIME_DEFAULT SCTP_DEFAULT_SECRET_LIFE_SEC 323 324 /* rto_max: Default maximum retransmission timeout in ms */ 325 #define SCTPCTL_RTO_MAX_DESC "Default maximum retransmission timeout in ms" 326 #define SCTPCTL_RTO_MAX_MIN 0 327 #define SCTPCTL_RTO_MAX_MAX 0xFFFFFFFF 328 #define SCTPCTL_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND 329 330 /* rto_min: Default minimum retransmission timeout in ms */ 331 #define SCTPCTL_RTO_MIN_DESC "Default minimum retransmission timeout in ms" 332 #define SCTPCTL_RTO_MIN_MIN 0 333 #define SCTPCTL_RTO_MIN_MAX 0xFFFFFFFF 334 #define SCTPCTL_RTO_MIN_DEFAULT SCTP_RTO_LOWER_BOUND 335 336 /* rto_initial: Default initial retransmission timeout in ms */ 337 #define SCTPCTL_RTO_INITIAL_DESC "Default initial retransmission timeout in ms" 338 #define SCTPCTL_RTO_INITIAL_MIN 0 339 #define SCTPCTL_RTO_INITIAL_MAX 0xFFFFFFFF 340 #define SCTPCTL_RTO_INITIAL_DEFAULT SCTP_RTO_INITIAL 341 342 /* init_rto_max: Default maximum retransmission timeout during association setup in ms */ 343 #define SCTPCTL_INIT_RTO_MAX_DESC "Default maximum retransmission timeout during association setup in ms" 344 #define SCTPCTL_INIT_RTO_MAX_MIN 0 345 #define SCTPCTL_INIT_RTO_MAX_MAX 0xFFFFFFFF 346 #define SCTPCTL_INIT_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND 347 348 /* valid_cookie_life: Default cookie lifetime in sec */ 349 #define SCTPCTL_VALID_COOKIE_LIFE_DESC "Default cookie lifetime in seconds" 350 #define SCTPCTL_VALID_COOKIE_LIFE_MIN 0 351 #define SCTPCTL_VALID_COOKIE_LIFE_MAX 0xFFFFFFFF 352 #define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT SCTP_DEFAULT_COOKIE_LIFE 353 354 /* init_rtx_max: Default maximum number of retransmission for INIT chunks */ 355 #define SCTPCTL_INIT_RTX_MAX_DESC "Default maximum number of retransmission for INIT chunks" 356 #define SCTPCTL_INIT_RTX_MAX_MIN 0 357 #define SCTPCTL_INIT_RTX_MAX_MAX 0xFFFFFFFF 358 #define SCTPCTL_INIT_RTX_MAX_DEFAULT SCTP_DEF_MAX_INIT 359 360 /* assoc_rtx_max: Default maximum number of retransmissions per association */ 361 #define SCTPCTL_ASSOC_RTX_MAX_DESC "Default maximum number of retransmissions per association" 362 #define SCTPCTL_ASSOC_RTX_MAX_MIN 0 363 #define SCTPCTL_ASSOC_RTX_MAX_MAX 0xFFFFFFFF 364 #define SCTPCTL_ASSOC_RTX_MAX_DEFAULT SCTP_DEF_MAX_SEND 365 366 /* path_rtx_max: Default maximum of retransmissions per path */ 367 #define SCTPCTL_PATH_RTX_MAX_DESC "Default maximum of retransmissions per path" 368 #define SCTPCTL_PATH_RTX_MAX_MIN 0 369 #define SCTPCTL_PATH_RTX_MAX_MAX 0xFFFFFFFF 370 #define SCTPCTL_PATH_RTX_MAX_DEFAULT SCTP_DEF_MAX_PATH_RTX 371 372 /* path_pf_threshold: threshold for considering the path potentially failed */ 373 #define SCTPCTL_PATH_PF_THRESHOLD_DESC "Default potentially failed threshold" 374 #define SCTPCTL_PATH_PF_THRESHOLD_MIN 0 375 #define SCTPCTL_PATH_PF_THRESHOLD_MAX 0xFFFF 376 #define SCTPCTL_PATH_PF_THRESHOLD_DEFAULT SCTPCTL_PATH_PF_THRESHOLD_MAX 377 378 /* add_more_on_output: When space-wise is it worthwhile to try to add more to a socket send buffer */ 379 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC "When space-wise is it worthwhile to try to add more to a socket send buffer" 380 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN 0 381 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX 0xFFFFFFFF 382 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE 383 384 /* incoming_streams: Default number of incoming streams */ 385 #define SCTPCTL_INCOMING_STREAMS_DESC "Default number of incoming streams" 386 #define SCTPCTL_INCOMING_STREAMS_MIN 1 387 #define SCTPCTL_INCOMING_STREAMS_MAX 65535 388 #define SCTPCTL_INCOMING_STREAMS_DEFAULT SCTP_ISTREAM_INITIAL 389 390 /* outgoing_streams: Default number of outgoing streams */ 391 #define SCTPCTL_OUTGOING_STREAMS_DESC "Default number of outgoing streams" 392 #define SCTPCTL_OUTGOING_STREAMS_MIN 1 393 #define SCTPCTL_OUTGOING_STREAMS_MAX 65535 394 #define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL 395 396 /* cmt_on_off: CMT on/off flag */ 397 #define SCTPCTL_CMT_ON_OFF_DESC "CMT settings" 398 #define SCTPCTL_CMT_ON_OFF_MIN SCTP_CMT_OFF 399 #define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX 400 #define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF 401 402 /* cmt_use_dac: CMT DAC on/off flag */ 403 #define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag" 404 #define SCTPCTL_CMT_USE_DAC_MIN 0 405 #define SCTPCTL_CMT_USE_DAC_MAX 1 406 #define SCTPCTL_CMT_USE_DAC_DEFAULT 0 407 408 /* cwnd_maxburst: Use a CWND adjusting maxburst */ 409 #define SCTPCTL_CWND_MAXBURST_DESC "Use a CWND adjusting maxburst" 410 #define SCTPCTL_CWND_MAXBURST_MIN 0 411 #define SCTPCTL_CWND_MAXBURST_MAX 1 412 #define SCTPCTL_CWND_MAXBURST_DEFAULT 1 413 414 /* nat_friendly: SCTP NAT friendly operation */ 415 #define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation" 416 #define SCTPCTL_NAT_FRIENDLY_MIN 0 417 #define SCTPCTL_NAT_FRIENDLY_MAX 1 418 #define SCTPCTL_NAT_FRIENDLY_DEFAULT 1 419 420 /* abc_l_var: SCTP ABC max increase per SACK (L) */ 421 #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" 422 #define SCTPCTL_ABC_L_VAR_MIN 0 423 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF 424 #define SCTPCTL_ABC_L_VAR_DEFAULT 2 425 426 /* max_chained_mbufs: Default max number of small mbufs on a chain */ 427 #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" 428 #define SCTPCTL_MAX_CHAINED_MBUFS_MIN 0 429 #define SCTPCTL_MAX_CHAINED_MBUFS_MAX 0xFFFFFFFF 430 #define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT SCTP_DEFAULT_MBUFS_IN_CHAIN 431 432 /* do_sctp_drain: Should SCTP respond to the drain calls */ 433 #define SCTPCTL_DO_SCTP_DRAIN_DESC "Should SCTP respond to the drain calls" 434 #define SCTPCTL_DO_SCTP_DRAIN_MIN 0 435 #define SCTPCTL_DO_SCTP_DRAIN_MAX 1 436 #define SCTPCTL_DO_SCTP_DRAIN_DEFAULT 1 437 438 /* hb_max_burst: Confirmation Heartbeat max burst? */ 439 #define SCTPCTL_HB_MAX_BURST_DESC "Confirmation Heartbeat max burst" 440 #define SCTPCTL_HB_MAX_BURST_MIN 1 441 #define SCTPCTL_HB_MAX_BURST_MAX 0xFFFFFFFF 442 #define SCTPCTL_HB_MAX_BURST_DEFAULT SCTP_DEF_HBMAX_BURST 443 444 /* abort_at_limit: When one-2-one hits qlimit abort */ 445 #define SCTPCTL_ABORT_AT_LIMIT_DESC "When one-2-one hits qlimit abort" 446 #define SCTPCTL_ABORT_AT_LIMIT_MIN 0 447 #define SCTPCTL_ABORT_AT_LIMIT_MAX 1 448 #define SCTPCTL_ABORT_AT_LIMIT_DEFAULT 0 449 450 /* min_residual: min residual in a data fragment leftover */ 451 #define SCTPCTL_MIN_RESIDUAL_DESC "Minimum residual data chunk in second part of split" 452 #define SCTPCTL_MIN_RESIDUAL_MIN 20 453 #define SCTPCTL_MIN_RESIDUAL_MAX 65535 454 #define SCTPCTL_MIN_RESIDUAL_DEFAULT 1452 455 456 /* max_retran_chunk: max chunk retransmissions */ 457 #define SCTPCTL_MAX_RETRAN_CHUNK_DESC "Maximum times an unlucky chunk can be retran'd before assoc abort" 458 #define SCTPCTL_MAX_RETRAN_CHUNK_MIN 0 459 #define SCTPCTL_MAX_RETRAN_CHUNK_MAX 65535 460 #define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT 30 461 462 /* sctp_logging: This gives us logging when the options are enabled */ 463 #define SCTPCTL_LOGGING_LEVEL_DESC "Ltrace/KTR trace logging level" 464 #define SCTPCTL_LOGGING_LEVEL_MIN 0 465 #define SCTPCTL_LOGGING_LEVEL_MAX 0xffffffff 466 #define SCTPCTL_LOGGING_LEVEL_DEFAULT 0 467 468 /* JRS - default congestion control module sysctl */ 469 #define SCTPCTL_DEFAULT_CC_MODULE_DESC "Default congestion control module" 470 #define SCTPCTL_DEFAULT_CC_MODULE_MIN 0 471 #define SCTPCTL_DEFAULT_CC_MODULE_MAX 2 472 #define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT 0 473 474 /* RS - default stream scheduling module sysctl */ 475 #define SCTPCTL_DEFAULT_SS_MODULE_DESC "Default stream scheduling module" 476 #define SCTPCTL_DEFAULT_SS_MODULE_MIN 0 477 #define SCTPCTL_DEFAULT_SS_MODULE_MAX 5 478 #define SCTPCTL_DEFAULT_SS_MODULE_DEFAULT 0 479 480 /* RRS - default fragment interleave */ 481 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC "Default fragment interleave level" 482 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN 0 483 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX 2 484 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT 1 485 486 /* mobility_base: Enable SCTP mobility support */ 487 #define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility" 488 #define SCTPCTL_MOBILITY_BASE_MIN 0 489 #define SCTPCTL_MOBILITY_BASE_MAX 1 490 #define SCTPCTL_MOBILITY_BASE_DEFAULT 0 491 492 /* mobility_fasthandoff: Enable SCTP fast handoff support */ 493 #define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff" 494 #define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0 495 #define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1 496 #define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT 0 497 498 /* Enable SCTP/UDP tunneling port */ 499 #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port" 500 #define SCTPCTL_UDP_TUNNELING_PORT_MIN 0 501 #define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535 502 #if defined(__FreeBSD__) 503 #define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT 0 504 #else 505 #define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT SCTP_OVER_UDP_TUNNELING_PORT 506 #endif 507 508 /* Enable sending of the SACK-IMMEDIATELY bit */ 509 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit." 510 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN 0 511 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 1 512 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 513 514 /* Enable sending of the NAT-FRIENDLY message */ 515 #define SCTPCTL_NAT_FRIENDLY_INITS_DESC "Enable sending of the nat-friendly SCTP option on INITs." 516 #define SCTPCTL_NAT_FRIENDLY_INITS_MIN 0 517 #define SCTPCTL_NAT_FRIENDLY_INITS_MAX 1 518 #define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT SCTPCTL_NAT_FRIENDLY_INITS_MIN 519 520 /* Vtag time wait in seconds */ 521 #define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time in seconds, 0 disables it." 522 #define SCTPCTL_TIME_WAIT_MIN 0 523 #define SCTPCTL_TIME_WAIT_MAX 0xffffffff 524 #define SCTPCTL_TIME_WAIT_DEFAULT SCTP_TIME_WAIT 525 526 /* Enable Send/Receive buffer splitting */ 527 #define SCTPCTL_BUFFER_SPLITTING_DESC "Enable send/receive buffer splitting." 528 #define SCTPCTL_BUFFER_SPLITTING_MIN 0 529 #define SCTPCTL_BUFFER_SPLITTING_MAX 0x3 530 #define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN 531 532 /* Initial congestion window in MTU */ 533 #define SCTPCTL_INITIAL_CWND_DESC "Initial congestion window in MTUs" 534 #define SCTPCTL_INITIAL_CWND_MIN 0 535 #define SCTPCTL_INITIAL_CWND_MAX 0xffffffff 536 #define SCTPCTL_INITIAL_CWND_DEFAULT 3 537 538 /* rttvar smooth avg for bw calc */ 539 #define SCTPCTL_RTTVAR_BW_DESC "Shift amount for bw smoothing on rtt calc" 540 #define SCTPCTL_RTTVAR_BW_MIN 0 541 #define SCTPCTL_RTTVAR_BW_MAX 32 542 #define SCTPCTL_RTTVAR_BW_DEFAULT 4 543 544 /* rttvar smooth avg for bw calc */ 545 #define SCTPCTL_RTTVAR_RTT_DESC "Shift amount for rtt smoothing on rtt calc" 546 #define SCTPCTL_RTTVAR_RTT_MIN 0 547 #define SCTPCTL_RTTVAR_RTT_MAX 32 548 #define SCTPCTL_RTTVAR_RTT_DEFAULT 5 549 550 #define SCTPCTL_RTTVAR_EQRET_DESC "What to return when rtt and bw are unchanged" 551 #define SCTPCTL_RTTVAR_EQRET_MIN 0 552 #define SCTPCTL_RTTVAR_EQRET_MAX 1 553 #define SCTPCTL_RTTVAR_EQRET_DEFAULT 0 554 555 #define SCTPCTL_RTTVAR_STEADYS_DESC "How many the sames it takes to try step down of cwnd" 556 #define SCTPCTL_RTTVAR_STEADYS_MIN 0 557 #define SCTPCTL_RTTVAR_STEADYS_MAX 0xFFFF 558 #define SCTPCTL_RTTVAR_STEADYS_DEFAULT 20 /* 0 means disable feature */ 559 560 #define SCTPCTL_RTTVAR_DCCCECN_DESC "Enable for RTCC CC datacenter ECN" 561 #define SCTPCTL_RTTVAR_DCCCECN_MIN 0 562 #define SCTPCTL_RTTVAR_DCCCECN_MAX 1 563 #define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */ 564 565 #define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing. See blackhole(4) for more details." 566 #define SCTPCTL_BLACKHOLE_MIN 0 567 #define SCTPCTL_BLACKHOLE_MAX 2 568 #define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN 569 570 #define SCTPCTL_DIAG_INFO_CODE_DESC "Diagnostic information error cause code" 571 #define SCTPCTL_DIAG_INFO_CODE_MIN 0 572 #define SCTPCTL_DIAG_INFO_CODE_MAX 65535 573 #define SCTPCTL_DIAG_INFO_CODE_DEFAULT 0 574 575 #if defined(SCTP_DEBUG) 576 /* debug: Configure debug output */ 577 #define SCTPCTL_DEBUG_DESC "Configure debug output" 578 #define SCTPCTL_DEBUG_MIN 0 579 #define SCTPCTL_DEBUG_MAX 0xFFFFFFFF 580 #define SCTPCTL_DEBUG_DEFAULT 0 581 #endif 582 583 #if defined(__APPLE__) 584 #define SCTPCTL_MAIN_TIMER_DESC "Main timer interval in ms" 585 #define SCTPCTL_MAIN_TIMER_MIN 1 586 #define SCTPCTL_MAIN_TIMER_MAX 0xFFFFFFFF 587 #define SCTPCTL_MAIN_TIMER_DEFAULT 10 588 589 #define SCTPCTL_IGNORE_VMWARE_INTERFACES_DESC "Ignore VMware Interfaces" 590 #define SCTPCTL_IGNORE_VMWARE_INTERFACES_MIN 0 591 #define SCTPCTL_IGNORE_VMWARE_INTERFACES_MAX 1 592 #define SCTPCTL_IGNORE_VMWARE_INTERFACES_DEFAULT SCTPCTL_IGNORE_VMWARE_INTERFACES_MAX 593 #endif 594 595 #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) 596 #define SCTPCTL_OUTPUT_UNLOCKED_DESC "Unlock socket when sending packets down to IP." 597 #define SCTPCTL_OUTPUT_UNLOCKED_MIN 0 598 #define SCTPCTL_OUTPUT_UNLOCKED_MAX 1 599 #define SCTPCTL_OUTPUT_UNLOCKED_DEFAULT SCTPCTL_OUTPUT_UNLOCKED_MIN 600 #endif 601 602 #if defined(__APPLE__) 603 #define SCTPCTL_ADDR_WATCHDOG_LIMIT_DESC "Address watchdog limit" 604 #define SCTPCTL_ADDR_WATCHDOG_LIMIT_MIN 0 605 #define SCTPCTL_ADDR_WATCHDOG_LIMIT_MAX 0xFFFFFFFF 606 #define SCTPCTL_ADDR_WATCHDOG_LIMIT_DEFAULT SCTPCTL_ADDR_WATCHDOG_LIMIT_MIN 607 608 #define SCTPCTL_VTAG_WATCHDOG_LIMIT_DESC "VTag watchdog limit" 609 #define SCTPCTL_VTAG_WATCHDOG_LIMIT_MIN 0 610 #define SCTPCTL_VTAG_WATCHDOG_LIMIT_MAX 0xFFFFFFFF 611 #define SCTPCTL_VTAG_WATCHDOG_LIMIT_DEFAULT SCTPCTL_VTAG_WATCHDOG_LIMIT_MIN 612 #endif 613 614 #if defined(_KERNEL) || defined(__Userspace__) 615 #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__) 616 #if defined(SYSCTL_DECL) 617 SYSCTL_DECL(_net_inet_sctp); 618 #endif 619 #endif 620 621 void sctp_init_sysctls(void); 622 #if defined(__Windows__) 623 void sctp_finish_sysctls(void); 624 #endif 625 626 #endif /* _KERNEL */ 627 #endif /* __sctp_sysctl_h__ */ 628