1167598Srrs/*- 2169382Srrs * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. 3235828Stuexen * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 4235828Stuexen * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 5167598Srrs * 6167598Srrs * Redistribution and use in source and binary forms, with or without 7167598Srrs * modification, are permitted provided that the following conditions are met: 8167598Srrs * 9167598Srrs * a) Redistributions of source code must retain the above copyright notice, 10228653Stuexen * this list of conditions and the following disclaimer. 11167598Srrs * 12167598Srrs * b) Redistributions in binary form must reproduce the above copyright 13167598Srrs * notice, this list of conditions and the following disclaimer in 14228653Stuexen * the documentation and/or other materials provided with the distribution. 15167598Srrs * 16167598Srrs * c) Neither the name of Cisco Systems, Inc. nor the names of its 17167598Srrs * contributors may be used to endorse or promote products derived 18167598Srrs * from this software without specific prior written permission. 19167598Srrs * 20167598Srrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21167598Srrs * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22167598Srrs * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23167598Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24167598Srrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25167598Srrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26167598Srrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27167598Srrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28167598Srrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29167598Srrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30167598Srrs * THE POSSIBILITY OF SUCH DAMAGE. 31167598Srrs */ 32167598Srrs 33167598Srrs#include <sys/cdefs.h> 34167598Srrs__FBSDID("$FreeBSD$"); 35167598Srrs 36235828Stuexen#ifndef _NETINET_SCTP_SYSCTL_H_ 37235828Stuexen#define _NETINET_SCTP_SYSCTL_H_ 38167598Srrs 39167598Srrs#include <netinet/sctp_os.h> 40167598Srrs#include <netinet/sctp_constants.h> 41167598Srrs 42179783Srrsstruct sctp_sysctl { 43179783Srrs uint32_t sctp_sendspace; 44179783Srrs uint32_t sctp_recvspace; 45179783Srrs uint32_t sctp_auto_asconf; 46179783Srrs uint32_t sctp_multiple_asconfs; 47179783Srrs uint32_t sctp_ecn_enable; 48270357Stuexen uint32_t sctp_pr_enable; 49270362Stuexen uint32_t sctp_auth_disable; 50270362Stuexen uint32_t sctp_asconf_enable; 51270361Stuexen uint32_t sctp_reconfig_enable; 52270359Stuexen uint32_t sctp_nrsack_enable; 53270360Stuexen uint32_t sctp_pktdrop_enable; 54218186Srrs uint32_t sctp_fr_max_burst_default; 55179783Srrs uint32_t sctp_strict_sacks; 56179783Srrs uint32_t sctp_peer_chunk_oh; 57179783Srrs uint32_t sctp_max_burst_default; 58179783Srrs uint32_t sctp_max_chunks_on_queue; 59179783Srrs uint32_t sctp_hashtblsize; 60179783Srrs uint32_t sctp_pcbtblsize; 61179783Srrs uint32_t sctp_min_split_point; 62179783Srrs uint32_t sctp_chunkscale; 63179783Srrs uint32_t sctp_delayed_sack_time_default; 64179783Srrs uint32_t sctp_sack_freq_default; 65179783Srrs uint32_t sctp_system_free_resc_limit; 66179783Srrs uint32_t sctp_asoc_free_resc_limit; 67179783Srrs uint32_t sctp_heartbeat_interval_default; 68179783Srrs uint32_t sctp_pmtu_raise_time_default; 69179783Srrs uint32_t sctp_shutdown_guard_time_default; 70179783Srrs uint32_t sctp_secret_lifetime_default; 71179783Srrs uint32_t sctp_rto_max_default; 72179783Srrs uint32_t sctp_rto_min_default; 73179783Srrs uint32_t sctp_rto_initial_default; 74179783Srrs uint32_t sctp_init_rto_max_default; 75179783Srrs uint32_t sctp_valid_cookie_life_default; 76179783Srrs uint32_t sctp_init_rtx_max_default; 77179783Srrs uint32_t sctp_assoc_rtx_max_default; 78179783Srrs uint32_t sctp_path_rtx_max_default; 79224641Stuexen uint32_t sctp_path_pf_threshold; 80179783Srrs uint32_t sctp_add_more_threshold; 81252779Stuexen uint32_t sctp_nr_incoming_streams_default; 82179783Srrs uint32_t sctp_nr_outgoing_streams_default; 83179783Srrs uint32_t sctp_cmt_on_off; 84179783Srrs uint32_t sctp_cmt_use_dac; 85179783Srrs uint32_t sctp_use_cwnd_based_maxburst; 86179783Srrs uint32_t sctp_nat_friendly; 87179783Srrs uint32_t sctp_L2_abc_variable; 88179783Srrs uint32_t sctp_mbuf_threshold_count; 89179783Srrs uint32_t sctp_do_drain; 90179783Srrs uint32_t sctp_hb_maxburst; 91179783Srrs uint32_t sctp_abort_if_one_2_one_hits_limit; 92179783Srrs uint32_t sctp_strict_data_order; 93179783Srrs uint32_t sctp_min_residual; 94179783Srrs uint32_t sctp_max_retran_chunk; 95179783Srrs uint32_t sctp_logging_level; 96179783Srrs /* JRS - Variable for default congestion control module */ 97179783Srrs uint32_t sctp_default_cc_module; 98217760Stuexen /* RS - Variable for default stream scheduling module */ 99217760Stuexen uint32_t sctp_default_ss_module; 100179783Srrs uint32_t sctp_default_frag_interleave; 101179783Srrs uint32_t sctp_mobility_base; 102179783Srrs uint32_t sctp_mobility_fasthandoff; 103185694Srrs uint32_t sctp_inits_include_nat_friendly; 104219057Srrs uint32_t sctp_rttvar_bw; 105219057Srrs uint32_t sctp_rttvar_rtt; 106219057Srrs uint32_t sctp_rttvar_eqret; 107219397Srrs uint32_t sctp_steady_step; 108219397Srrs uint32_t sctp_use_dccc_ecn; 109267723Stuexen uint32_t sctp_diag_info_code; 110179783Srrs#if defined(SCTP_LOCAL_TRACE_BUF) 111179783Srrs struct sctp_log sctp_log; 112179783Srrs#endif 113179783Srrs uint32_t sctp_udp_tunneling_port; 114179783Srrs uint32_t sctp_enable_sack_immediately; 115193090Srrs uint32_t sctp_vtag_time_wait; 116212799Stuexen uint32_t sctp_buffer_splitting; 117212800Stuexen uint32_t sctp_initial_cwnd; 118229805Stuexen uint32_t sctp_blackhole; 119179783Srrs#if defined(SCTP_DEBUG) 120179783Srrs uint32_t sctp_debug_on; 121179783Srrs#endif 122179783Srrs#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) 123179783Srrs uint32_t sctp_output_unlocked; 124179783Srrs#endif 125179783Srrs}; 126179783Srrs 127167598Srrs/* 128167598Srrs * limits for the sysctl variables 129167598Srrs */ 130167598Srrs/* maxdgram: Maximum outgoing SCTP buffer size */ 131167598Srrs#define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size" 132167598Srrs#define SCTPCTL_MAXDGRAM_MIN 0 133167598Srrs#define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF 134167598Srrs#define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */ 135167598Srrs 136167598Srrs/* recvspace: Maximum incoming SCTP buffer size */ 137167598Srrs#define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size" 138167598Srrs#define SCTPCTL_RECVSPACE_MIN 0 139167598Srrs#define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF 140167598Srrs#define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */ 141167598Srrs 142167598Srrs/* autoasconf: Enable SCTP Auto-ASCONF */ 143167598Srrs#define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF" 144167598Srrs#define SCTPCTL_AUTOASCONF_MIN 0 145167598Srrs#define SCTPCTL_AUTOASCONF_MAX 1 146271746Stuexen#define SCTPCTL_AUTOASCONF_DEFAULT 1 147167598Srrs 148179157Srrs/* autoasconf: Enable SCTP Auto-ASCONF */ 149179157Srrs#define SCTPCTL_MULTIPLEASCONFS_DESC "Enable SCTP Muliple-ASCONFs" 150179157Srrs#define SCTPCTL_MULTIPLEASCONFS_MIN 0 151179157Srrs#define SCTPCTL_MULTIPLEASCONFS_MAX 1 152179157Srrs#define SCTPCTL_MULTIPLEASCONFS_DEFAULT SCTP_DEFAULT_MULTIPLE_ASCONFS 153179157Srrs 154167598Srrs/* ecn_enable: Enable SCTP ECN */ 155167598Srrs#define SCTPCTL_ECN_ENABLE_DESC "Enable SCTP ECN" 156167598Srrs#define SCTPCTL_ECN_ENABLE_MIN 0 157167598Srrs#define SCTPCTL_ECN_ENABLE_MAX 1 158167598Srrs#define SCTPCTL_ECN_ENABLE_DEFAULT 1 159167598Srrs 160270357Stuexen/* pr_enable: Enable PR-SCTP */ 161270357Stuexen#define SCTPCTL_PR_ENABLE_DESC "Enable PR-SCTP" 162270357Stuexen#define SCTPCTL_PR_ENABLE_MIN 0 163270357Stuexen#define SCTPCTL_PR_ENABLE_MAX 1 164270357Stuexen#define SCTPCTL_PR_ENABLE_DEFAULT 1 165270357Stuexen 166270362Stuexen/* auth_disable: Disable SCTP AUTH function */ 167270362Stuexen#define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function" 168270362Stuexen#define SCTPCTL_AUTH_DISABLE_MIN 0 169270362Stuexen#define SCTPCTL_AUTH_DISABLE_MAX 1 170270362Stuexen#define SCTPCTL_AUTH_DISABLE_DEFAULT 0 171270362Stuexen 172270362Stuexen/* asconf_enable: Enable SCTP ASCONF */ 173270362Stuexen#define SCTPCTL_ASCONF_ENABLE_DESC "Enable SCTP ASCONF" 174270362Stuexen#define SCTPCTL_ASCONF_ENABLE_MIN 0 175270362Stuexen#define SCTPCTL_ASCONF_ENABLE_MAX 1 176270362Stuexen#define SCTPCTL_ASCONF_ENABLE_DEFAULT 1 177270362Stuexen 178270361Stuexen/* reconfig_enable: Enable SCTP RE-CONFIG */ 179270361Stuexen#define SCTPCTL_RECONFIG_ENABLE_DESC "Enable SCTP RE-CONFIG" 180270361Stuexen#define SCTPCTL_RECONFIG_ENABLE_MIN 0 181270361Stuexen#define SCTPCTL_RECONFIG_ENABLE_MAX 1 182270361Stuexen#define SCTPCTL_RECONFIG_ENABLE_DEFAULT 1 183270361Stuexen 184270359Stuexen/* nrsack_enable: Enable NR_SACK */ 185270361Stuexen#define SCTPCTL_NRSACK_ENABLE_DESC "Enable SCTP NR-SACK" 186270359Stuexen#define SCTPCTL_NRSACK_ENABLE_MIN 0 187270359Stuexen#define SCTPCTL_NRSACK_ENABLE_MAX 1 188270359Stuexen#define SCTPCTL_NRSACK_ENABLE_DEFAULT 0 189270359Stuexen 190270360Stuexen/* pktdrop_enable: Enable SCTP Packet Drop Reports */ 191270360Stuexen#define SCTPCTL_PKTDROP_ENABLE_DESC "Enable SCTP PKTDROP" 192270360Stuexen#define SCTPCTL_PKTDROP_ENABLE_MIN 0 193270360Stuexen#define SCTPCTL_PKTDROP_ENABLE_MAX 1 194270360Stuexen#define SCTPCTL_PKTDROP_ENABLE_DEFAULT 0 195270359Stuexen 196167598Srrs/* strict_sacks: Enable SCTP Strict SACK checking */ 197167598Srrs#define SCTPCTL_STRICT_SACKS_DESC "Enable SCTP Strict SACK checking" 198167598Srrs#define SCTPCTL_STRICT_SACKS_MIN 0 199167598Srrs#define SCTPCTL_STRICT_SACKS_MAX 1 200182367Srrs#define SCTPCTL_STRICT_SACKS_DEFAULT 1 201167598Srrs 202167598Srrs/* loopback_nocsum: Enable NO Csum on packets sent on loopback */ 203167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_DESC "Enable NO Csum on packets sent on loopback" 204167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_MIN 0 205167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_MAX 1 206167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1 207167598Srrs 208167598Srrs/* peer_chkoh: Amount to debit peers rwnd per chunk sent */ 209167598Srrs#define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent" 210167598Srrs#define SCTPCTL_PEER_CHKOH_MIN 0 211167598Srrs#define SCTPCTL_PEER_CHKOH_MAX 0xFFFFFFFF 212170642Srrs#define SCTPCTL_PEER_CHKOH_DEFAULT 256 213167598Srrs 214167598Srrs/* maxburst: Default max burst for sctp endpoints */ 215167598Srrs#define SCTPCTL_MAXBURST_DESC "Default max burst for sctp endpoints" 216217894Stuexen#define SCTPCTL_MAXBURST_MIN 0 217167598Srrs#define SCTPCTL_MAXBURST_MAX 0xFFFFFFFF 218167598Srrs#define SCTPCTL_MAXBURST_DEFAULT SCTP_DEF_MAX_BURST 219167598Srrs 220218186Srrs/* fr_maxburst: Default max burst for sctp endpoints when fast retransmitting */ 221218186Srrs#define SCTPCTL_FRMAXBURST_DESC "Default fr max burst for sctp endpoints" 222218186Srrs#define SCTPCTL_FRMAXBURST_MIN 0 223218186Srrs#define SCTPCTL_FRMAXBURST_MAX 0xFFFFFFFF 224218186Srrs#define SCTPCTL_FRMAXBURST_DEFAULT SCTP_DEF_FRMAX_BURST 225218186Srrs 226218186Srrs 227167598Srrs/* maxchunks: Default max chunks on queue per asoc */ 228167598Srrs#define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc" 229167598Srrs#define SCTPCTL_MAXCHUNKS_MIN 0 230167598Srrs#define SCTPCTL_MAXCHUNKS_MAX 0xFFFFFFFF 231167598Srrs#define SCTPCTL_MAXCHUNKS_DEFAULT SCTP_ASOC_MAX_CHUNKS_ON_QUEUE 232167598Srrs 233218264Sbrucec/* tcbhashsize: Tunable for Hash table sizes */ 234167598Srrs#define SCTPCTL_TCBHASHSIZE_DESC "Tunable for TCB hash table sizes" 235167598Srrs#define SCTPCTL_TCBHASHSIZE_MIN 1 236167598Srrs#define SCTPCTL_TCBHASHSIZE_MAX 0xFFFFFFFF 237167598Srrs#define SCTPCTL_TCBHASHSIZE_DEFAULT SCTP_TCBHASHSIZE 238167598Srrs 239218264Sbrucec/* pcbhashsize: Tunable for PCB Hash table sizes */ 240167598Srrs#define SCTPCTL_PCBHASHSIZE_DESC "Tunable for PCB hash table sizes" 241167598Srrs#define SCTPCTL_PCBHASHSIZE_MIN 1 242167598Srrs#define SCTPCTL_PCBHASHSIZE_MAX 0xFFFFFFFF 243167598Srrs#define SCTPCTL_PCBHASHSIZE_DEFAULT SCTP_PCBHASHSIZE 244167598Srrs 245167598Srrs/* min_split_point: Minimum size when splitting a chunk */ 246167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_DESC "Minimum size when splitting a chunk" 247167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_MIN 0 248167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_MAX 0xFFFFFFFF 249167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_DEFAULT SCTP_DEFAULT_SPLIT_POINT_MIN 250167598Srrs 251218264Sbrucec/* chunkscale: Tunable for Scaling of number of chunks and messages */ 252218264Sbrucec#define SCTPCTL_CHUNKSCALE_DESC "Tunable for Scaling of number of chunks and messages" 253167598Srrs#define SCTPCTL_CHUNKSCALE_MIN 1 254167598Srrs#define SCTPCTL_CHUNKSCALE_MAX 0xFFFFFFFF 255167598Srrs#define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE 256167598Srrs 257219397Srrs/* delayed_sack_time: Default delayed SACK timer in ms */ 258219397Srrs#define SCTPCTL_DELAYED_SACK_TIME_DESC "Default delayed SACK timer in ms" 259167598Srrs#define SCTPCTL_DELAYED_SACK_TIME_MIN 0 260167598Srrs#define SCTPCTL_DELAYED_SACK_TIME_MAX 0xFFFFFFFF 261167598Srrs#define SCTPCTL_DELAYED_SACK_TIME_DEFAULT SCTP_RECV_MSEC 262167598Srrs 263167598Srrs/* sack_freq: Default SACK frequency */ 264167598Srrs#define SCTPCTL_SACK_FREQ_DESC "Default SACK frequency" 265167598Srrs#define SCTPCTL_SACK_FREQ_MIN 0 266167598Srrs#define SCTPCTL_SACK_FREQ_MAX 0xFFFFFFFF 267167598Srrs#define SCTPCTL_SACK_FREQ_DEFAULT SCTP_DEFAULT_SACK_FREQ 268167598Srrs 269167598Srrs/* sys_resource: Max number of cached resources in the system */ 270167598Srrs#define SCTPCTL_SYS_RESOURCE_DESC "Max number of cached resources in the system" 271167598Srrs#define SCTPCTL_SYS_RESOURCE_MIN 0 272167598Srrs#define SCTPCTL_SYS_RESOURCE_MAX 0xFFFFFFFF 273167598Srrs#define SCTPCTL_SYS_RESOURCE_DEFAULT SCTP_DEF_SYSTEM_RESC_LIMIT 274167598Srrs 275167598Srrs/* asoc_resource: Max number of cached resources in an asoc */ 276167598Srrs#define SCTPCTL_ASOC_RESOURCE_DESC "Max number of cached resources in an asoc" 277167598Srrs#define SCTPCTL_ASOC_RESOURCE_MIN 0 278167598Srrs#define SCTPCTL_ASOC_RESOURCE_MAX 0xFFFFFFFF 279167598Srrs#define SCTPCTL_ASOC_RESOURCE_DEFAULT SCTP_DEF_ASOC_RESC_LIMIT 280167598Srrs 281219397Srrs/* heartbeat_interval: Default heartbeat interval in ms */ 282219397Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_DESC "Default heartbeat interval in ms" 283167598Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_MIN 0 284167598Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_MAX 0xFFFFFFFF 285167598Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT SCTP_HB_DEFAULT_MSEC 286167598Srrs 287219397Srrs/* pmtu_raise_time: Default PMTU raise timer in seconds */ 288219397Srrs#define SCTPCTL_PMTU_RAISE_TIME_DESC "Default PMTU raise timer in seconds" 289167598Srrs#define SCTPCTL_PMTU_RAISE_TIME_MIN 0 290167598Srrs#define SCTPCTL_PMTU_RAISE_TIME_MAX 0xFFFFFFFF 291167598Srrs#define SCTPCTL_PMTU_RAISE_TIME_DEFAULT SCTP_DEF_PMTU_RAISE_SEC 292167598Srrs 293219397Srrs/* shutdown_guard_time: Default shutdown guard timer in seconds */ 294294151Stuexen#define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC "Shutdown guard timer in seconds (0 means 5 times RTO.Max)" 295167598Srrs#define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN 0 296167598Srrs#define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX 0xFFFFFFFF 297294151Stuexen#define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT 0 298167598Srrs 299219397Srrs/* secret_lifetime: Default secret lifetime in seconds */ 300219397Srrs#define SCTPCTL_SECRET_LIFETIME_DESC "Default secret lifetime in seconds" 301167598Srrs#define SCTPCTL_SECRET_LIFETIME_MIN 0 302167598Srrs#define SCTPCTL_SECRET_LIFETIME_MAX 0xFFFFFFFF 303167598Srrs#define SCTPCTL_SECRET_LIFETIME_DEFAULT SCTP_DEFAULT_SECRET_LIFE_SEC 304167598Srrs 305219397Srrs/* rto_max: Default maximum retransmission timeout in ms */ 306219397Srrs#define SCTPCTL_RTO_MAX_DESC "Default maximum retransmission timeout in ms" 307167598Srrs#define SCTPCTL_RTO_MAX_MIN 0 308167598Srrs#define SCTPCTL_RTO_MAX_MAX 0xFFFFFFFF 309167598Srrs#define SCTPCTL_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND 310167598Srrs 311219397Srrs/* rto_min: Default minimum retransmission timeout in ms */ 312219397Srrs#define SCTPCTL_RTO_MIN_DESC "Default minimum retransmission timeout in ms" 313167598Srrs#define SCTPCTL_RTO_MIN_MIN 0 314167598Srrs#define SCTPCTL_RTO_MIN_MAX 0xFFFFFFFF 315167598Srrs#define SCTPCTL_RTO_MIN_DEFAULT SCTP_RTO_LOWER_BOUND 316167598Srrs 317219397Srrs/* rto_initial: Default initial retransmission timeout in ms */ 318219397Srrs#define SCTPCTL_RTO_INITIAL_DESC "Default initial retransmission timeout in ms" 319167598Srrs#define SCTPCTL_RTO_INITIAL_MIN 0 320167598Srrs#define SCTPCTL_RTO_INITIAL_MAX 0xFFFFFFFF 321167598Srrs#define SCTPCTL_RTO_INITIAL_DEFAULT SCTP_RTO_INITIAL 322167598Srrs 323219397Srrs/* init_rto_max: Default maximum retransmission timeout during association setup in ms */ 324219397Srrs#define SCTPCTL_INIT_RTO_MAX_DESC "Default maximum retransmission timeout during association setup in ms" 325167598Srrs#define SCTPCTL_INIT_RTO_MAX_MIN 0 326167598Srrs#define SCTPCTL_INIT_RTO_MAX_MAX 0xFFFFFFFF 327167598Srrs#define SCTPCTL_INIT_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND 328167598Srrs 329167598Srrs/* valid_cookie_life: Default cookie lifetime in sec */ 330219397Srrs#define SCTPCTL_VALID_COOKIE_LIFE_DESC "Default cookie lifetime in seconds" 331167598Srrs#define SCTPCTL_VALID_COOKIE_LIFE_MIN 0 332167598Srrs#define SCTPCTL_VALID_COOKIE_LIFE_MAX 0xFFFFFFFF 333167598Srrs#define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT SCTP_DEFAULT_COOKIE_LIFE 334167598Srrs 335167598Srrs/* init_rtx_max: Default maximum number of retransmission for INIT chunks */ 336167598Srrs#define SCTPCTL_INIT_RTX_MAX_DESC "Default maximum number of retransmission for INIT chunks" 337167598Srrs#define SCTPCTL_INIT_RTX_MAX_MIN 0 338167598Srrs#define SCTPCTL_INIT_RTX_MAX_MAX 0xFFFFFFFF 339167598Srrs#define SCTPCTL_INIT_RTX_MAX_DEFAULT SCTP_DEF_MAX_INIT 340167598Srrs 341167598Srrs/* assoc_rtx_max: Default maximum number of retransmissions per association */ 342167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_DESC "Default maximum number of retransmissions per association" 343167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_MIN 0 344167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_MAX 0xFFFFFFFF 345167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_DEFAULT SCTP_DEF_MAX_SEND 346167598Srrs 347167598Srrs/* path_rtx_max: Default maximum of retransmissions per path */ 348167598Srrs#define SCTPCTL_PATH_RTX_MAX_DESC "Default maximum of retransmissions per path" 349167598Srrs#define SCTPCTL_PATH_RTX_MAX_MIN 0 350167598Srrs#define SCTPCTL_PATH_RTX_MAX_MAX 0xFFFFFFFF 351167598Srrs#define SCTPCTL_PATH_RTX_MAX_DEFAULT SCTP_DEF_MAX_PATH_RTX 352167598Srrs 353224641Stuexen/* path_pf_threshold: threshold for considering the path potentially failed */ 354224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_DESC "Default potentially failed threshold" 355224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_MIN 0 356224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_MAX 0xFFFF 357224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_DEFAULT SCTPCTL_PATH_PF_THRESHOLD_MAX 358224641Stuexen 359219397Srrs/* add_more_on_output: When space-wise is it worthwhile to try to add more to a socket send buffer */ 360219397Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC "When space-wise is it worthwhile to try to add more to a socket send buffer" 361167598Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN 0 362167598Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX 0xFFFFFFFF 363167598Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE 364167598Srrs 365252779Stuexen/* incoming_streams: Default number of incoming streams */ 366252779Stuexen#define SCTPCTL_INCOMING_STREAMS_DESC "Default number of incoming streams" 367252779Stuexen#define SCTPCTL_INCOMING_STREAMS_MIN 1 368252779Stuexen#define SCTPCTL_INCOMING_STREAMS_MAX 65535 369252779Stuexen#define SCTPCTL_INCOMING_STREAMS_DEFAULT SCTP_ISTREAM_INITIAL 370252779Stuexen 371167598Srrs/* outgoing_streams: Default number of outgoing streams */ 372167598Srrs#define SCTPCTL_OUTGOING_STREAMS_DESC "Default number of outgoing streams" 373167598Srrs#define SCTPCTL_OUTGOING_STREAMS_MIN 1 374167598Srrs#define SCTPCTL_OUTGOING_STREAMS_MAX 65535 375167598Srrs#define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL 376167598Srrs 377167598Srrs/* cmt_on_off: CMT on/off flag */ 378216669Stuexen#define SCTPCTL_CMT_ON_OFF_DESC "CMT settings" 379221460Stuexen#define SCTPCTL_CMT_ON_OFF_MIN SCTP_CMT_OFF 380221460Stuexen#define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX 381221460Stuexen#define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF 382167598Srrs 383172091Srrs/* cmt_use_dac: CMT DAC on/off flag */ 384172091Srrs#define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag" 385172091Srrs#define SCTPCTL_CMT_USE_DAC_MIN 0 386172091Srrs#define SCTPCTL_CMT_USE_DAC_MAX 1 387172091Srrs#define SCTPCTL_CMT_USE_DAC_DEFAULT 0 388172091Srrs 389167598Srrs/* cwnd_maxburst: Use a CWND adjusting maxburst */ 390167598Srrs#define SCTPCTL_CWND_MAXBURST_DESC "Use a CWND adjusting maxburst" 391167598Srrs#define SCTPCTL_CWND_MAXBURST_MIN 0 392167598Srrs#define SCTPCTL_CWND_MAXBURST_MAX 1 393167598Srrs#define SCTPCTL_CWND_MAXBURST_DEFAULT 1 394167598Srrs 395167598Srrs/* nat_friendly: SCTP NAT friendly operation */ 396167598Srrs#define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation" 397167598Srrs#define SCTPCTL_NAT_FRIENDLY_MIN 0 398167598Srrs#define SCTPCTL_NAT_FRIENDLY_MAX 1 399167598Srrs#define SCTPCTL_NAT_FRIENDLY_DEFAULT 1 400167598Srrs 401167598Srrs/* abc_l_var: SCTP ABC max increase per SACK (L) */ 402167598Srrs#define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" 403167598Srrs#define SCTPCTL_ABC_L_VAR_MIN 0 404167598Srrs#define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF 405235557Stuexen#define SCTPCTL_ABC_L_VAR_DEFAULT 2 406167598Srrs 407167598Srrs/* max_chained_mbufs: Default max number of small mbufs on a chain */ 408167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" 409167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_MIN 0 410167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_MAX 0xFFFFFFFF 411167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT SCTP_DEFAULT_MBUFS_IN_CHAIN 412167598Srrs 413167598Srrs/* do_sctp_drain: Should SCTP respond to the drain calls */ 414167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_DESC "Should SCTP respond to the drain calls" 415167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_MIN 0 416167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_MAX 1 417167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_DEFAULT 1 418167598Srrs 419167598Srrs/* hb_max_burst: Confirmation Heartbeat max burst? */ 420172091Srrs#define SCTPCTL_HB_MAX_BURST_DESC "Confirmation Heartbeat max burst" 421167598Srrs#define SCTPCTL_HB_MAX_BURST_MIN 1 422167598Srrs#define SCTPCTL_HB_MAX_BURST_MAX 0xFFFFFFFF 423218186Srrs#define SCTPCTL_HB_MAX_BURST_DEFAULT SCTP_DEF_HBMAX_BURST 424167598Srrs 425167598Srrs/* abort_at_limit: When one-2-one hits qlimit abort */ 426167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_DESC "When one-2-one hits qlimit abort" 427167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_MIN 0 428167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_MAX 1 429167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_DEFAULT 0 430167598Srrs 431167598Srrs/* strict_data_order: Enforce strict data ordering, abort if control inside data */ 432167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_DESC "Enforce strict data ordering, abort if control inside data" 433167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_MIN 0 434167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_MAX 1 435167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_DEFAULT 0 436167598Srrs 437168299Srrs/* min_residual: min residual in a data fragment leftover */ 438168124Srrs#define SCTPCTL_MIN_RESIDUAL_DESC "Minimum residual data chunk in second part of split" 439168124Srrs#define SCTPCTL_MIN_RESIDUAL_MIN 20 440168124Srrs#define SCTPCTL_MIN_RESIDUAL_MAX 65535 441168124Srrs#define SCTPCTL_MIN_RESIDUAL_DEFAULT 1452 442168124Srrs 443168299Srrs/* max_retran_chunk: max chunk retransmissions */ 444168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_DESC "Maximum times an unlucky chunk can be retran'd before assoc abort" 445168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_MIN 0 446168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_MAX 65535 447168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT 30 448168124Srrs 449170744Srrs/* sctp_logging: This gives us logging when the options are enabled */ 450170744Srrs#define SCTPCTL_LOGGING_LEVEL_DESC "Ltrace/KTR trace logging level" 451170744Srrs#define SCTPCTL_LOGGING_LEVEL_MIN 0 452170814Srrs#define SCTPCTL_LOGGING_LEVEL_MAX 0xffffffff 453170744Srrs#define SCTPCTL_LOGGING_LEVEL_DEFAULT 0 454168124Srrs 455171440Srrs/* JRS - default congestion control module sysctl */ 456171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_DESC "Default congestion control module" 457171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_MIN 0 458171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_MAX 2 459171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT 0 460171440Srrs 461217760Stuexen/* RS - default stream scheduling module sysctl */ 462217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_DESC "Default stream scheduling module" 463217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_MIN 0 464217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_MAX 5 465217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_DEFAULT 0 466217760Stuexen 467171943Srrs/* RRS - default fragment interleave */ 468171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC "Default fragment interleave level" 469171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN 0 470171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX 2 471171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT 1 472171943Srrs 473171990Srrs/* mobility_base: Enable SCTP mobility support */ 474171990Srrs#define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility" 475171990Srrs#define SCTPCTL_MOBILITY_BASE_MIN 0 476171990Srrs#define SCTPCTL_MOBILITY_BASE_MAX 1 477271746Stuexen#define SCTPCTL_MOBILITY_BASE_DEFAULT 0 478171943Srrs 479171990Srrs/* mobility_fasthandoff: Enable SCTP fast handoff support */ 480171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff" 481171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0 482171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1 483271746Stuexen#define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT 0 484171990Srrs 485179157Srrs/* Enable SCTP/UDP tunneling port */ 486179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port" 487179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_MIN 0 488179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535 489267724Stuexen#define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT 0 490179157Srrs 491179783Srrs/* Enable sending of the SACK-IMMEDIATELY bit */ 492179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit." 493179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN 0 494179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 1 495179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN 496179783Srrs 497212799Stuexen/* Enable sending of the NAT-FRIENDLY message */ 498195919Stuexen#define SCTPCTL_NAT_FRIENDLY_INITS_DESC "Enable sending of the nat-friendly SCTP option on INITs." 499185694Srrs#define SCTPCTL_NAT_FRIENDLY_INITS_MIN 0 500185694Srrs#define SCTPCTL_NAT_FRIENDLY_INITS_MAX 1 501185694Srrs#define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT SCTPCTL_NAT_FRIENDLY_INITS_MIN 502185694Srrs 503212799Stuexen/* Vtag time wait in seconds */ 504212799Stuexen#define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time in seconds, 0 disables it." 505193090Srrs#define SCTPCTL_TIME_WAIT_MIN 0 506193090Srrs#define SCTPCTL_TIME_WAIT_MAX 0xffffffff 507193090Srrs#define SCTPCTL_TIME_WAIT_DEFAULT SCTP_TIME_WAIT 508193090Srrs 509212799Stuexen/* Enable Send/Receive buffer splitting */ 510212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_DESC "Enable send/receive buffer splitting." 511212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_MIN 0 512212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_MAX 0x3 513212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN 514193090Srrs 515212800Stuexen/* Initial congestion window in MTU */ 516212851Stuexen#define SCTPCTL_INITIAL_CWND_DESC "Initial congestion window in MTUs" 517216672Stuexen#define SCTPCTL_INITIAL_CWND_MIN 0 518212800Stuexen#define SCTPCTL_INITIAL_CWND_MAX 0xffffffff 519212800Stuexen#define SCTPCTL_INITIAL_CWND_DEFAULT 3 520212800Stuexen 521219057Srrs/* rttvar smooth avg for bw calc */ 522219397Srrs#define SCTPCTL_RTTVAR_BW_DESC "Shift amount for bw smoothing on rtt calc" 523219057Srrs#define SCTPCTL_RTTVAR_BW_MIN 0 524219057Srrs#define SCTPCTL_RTTVAR_BW_MAX 32 525219057Srrs#define SCTPCTL_RTTVAR_BW_DEFAULT 4 526219057Srrs 527219057Srrs/* rttvar smooth avg for bw calc */ 528219397Srrs#define SCTPCTL_RTTVAR_RTT_DESC "Shift amount for rtt smoothing on rtt calc" 529219057Srrs#define SCTPCTL_RTTVAR_RTT_MIN 0 530219057Srrs#define SCTPCTL_RTTVAR_RTT_MAX 32 531219057Srrs#define SCTPCTL_RTTVAR_RTT_DEFAULT 5 532219057Srrs 533219397Srrs#define SCTPCTL_RTTVAR_EQRET_DESC "What to return when rtt and bw are unchanged" 534219057Srrs#define SCTPCTL_RTTVAR_EQRET_MIN 0 535219057Srrs#define SCTPCTL_RTTVAR_EQRET_MAX 1 536219057Srrs#define SCTPCTL_RTTVAR_EQRET_DEFAULT 0 537219057Srrs 538219397Srrs#define SCTPCTL_RTTVAR_STEADYS_DESC "How many the sames it takes to try step down of cwnd" 539219397Srrs#define SCTPCTL_RTTVAR_STEADYS_MIN 0 540219397Srrs#define SCTPCTL_RTTVAR_STEADYS_MAX 0xFFFF 541219397Srrs#define SCTPCTL_RTTVAR_STEADYS_DEFAULT 20 /* 0 means disable feature */ 542219397Srrs 543219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_DESC "Enable for RTCC CC datacenter ECN" 544219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_MIN 0 545219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_MAX 1 546219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */ 547219397Srrs 548229805Stuexen#define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing" 549229805Stuexen#define SCTPCTL_BLACKHOLE_MIN 0 550229805Stuexen#define SCTPCTL_BLACKHOLE_MAX 2 551229805Stuexen#define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN 552229805Stuexen 553267723Stuexen#define SCTPCTL_DIAG_INFO_CODE_DESC "Diagnostic information error cause code" 554267723Stuexen#define SCTPCTL_DIAG_INFO_CODE_MIN 0 555267723Stuexen#define SCTPCTL_DIAG_INFO_CODE_MAX 65535 556267723Stuexen#define SCTPCTL_DIAG_INFO_CODE_DEFAULT 0 557267723Stuexen 558172091Srrs#if defined(SCTP_DEBUG) 559167598Srrs/* debug: Configure debug output */ 560167598Srrs#define SCTPCTL_DEBUG_DESC "Configure debug output" 561167598Srrs#define SCTPCTL_DEBUG_MIN 0 562167598Srrs#define SCTPCTL_DEBUG_MAX 0xFFFFFFFF 563167598Srrs#define SCTPCTL_DEBUG_DEFAULT 0 564167598Srrs#endif 565167598Srrs 566167598Srrs 567237565Stuexen#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) 568179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_DESC "Unlock socket when sending packets down to IP." 569179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_MIN 0 570179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_MAX 1 571179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_DEFAULT SCTPCTL_OUTPUT_UNLOCKED_MIN 572172157Srrs#endif 573179157Srrs 574167598Srrs 575180387Srrs#if defined(_KERNEL) || defined(__Userspace__) 576172091Srrs#if defined(SYSCTL_DECL) 577167598SrrsSYSCTL_DECL(_net_inet_sctp); 578167598Srrs#endif 579167598Srrs 580179783Srrsvoid sctp_init_sysctls(void); 581179783Srrs 582167598Srrs#endif /* _KERNEL */ 583167598Srrs#endif /* __sctp_sysctl_h__ */ 584