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