netwerk/sctp/src/netinet/sctp_sysctl.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rwxr-xr-x

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial