2 * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved.
3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved.
4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
9 * a) Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
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.
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.
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.
33 #include <sys/cdefs.h>
34 __FBSDID("$FreeBSD$");
36 #ifndef __sctp_sysctl_h__
37 #define __sctp_sysctl_h__
39 #include <netinet/sctp_os.h>
40 #include <netinet/sctp_constants.h>
43 uint32_t sctp_sendspace;
44 uint32_t sctp_recvspace;
45 uint32_t sctp_auto_asconf;
46 uint32_t sctp_multiple_asconfs;
47 uint32_t sctp_ecn_enable;
48 uint32_t sctp_fr_max_burst_default;
49 uint32_t sctp_strict_sacks;
50 #if !defined(SCTP_WITH_NO_CSUM)
51 uint32_t sctp_no_csum_on_loopback;
53 uint32_t sctp_strict_init;
54 uint32_t sctp_peer_chunk_oh;
55 uint32_t sctp_max_burst_default;
56 uint32_t sctp_max_chunks_on_queue;
57 uint32_t sctp_hashtblsize;
58 uint32_t sctp_pcbtblsize;
59 uint32_t sctp_min_split_point;
60 uint32_t sctp_chunkscale;
61 uint32_t sctp_delayed_sack_time_default;
62 uint32_t sctp_sack_freq_default;
63 uint32_t sctp_system_free_resc_limit;
64 uint32_t sctp_asoc_free_resc_limit;
65 uint32_t sctp_heartbeat_interval_default;
66 uint32_t sctp_pmtu_raise_time_default;
67 uint32_t sctp_shutdown_guard_time_default;
68 uint32_t sctp_secret_lifetime_default;
69 uint32_t sctp_rto_max_default;
70 uint32_t sctp_rto_min_default;
71 uint32_t sctp_rto_initial_default;
72 uint32_t sctp_init_rto_max_default;
73 uint32_t sctp_valid_cookie_life_default;
74 uint32_t sctp_init_rtx_max_default;
75 uint32_t sctp_assoc_rtx_max_default;
76 uint32_t sctp_path_rtx_max_default;
77 uint32_t sctp_add_more_threshold;
78 uint32_t sctp_nr_outgoing_streams_default;
79 uint32_t sctp_cmt_on_off;
80 uint32_t sctp_cmt_use_dac;
81 /* EY 5/5/08 - nr_sack flag variable */
82 uint32_t sctp_nr_sack_on_off;
84 uint32_t sctp_use_cwnd_based_maxburst;
85 uint32_t sctp_early_fr;
86 uint32_t sctp_early_fr_msec;
87 uint32_t sctp_asconf_auth_nochk;
88 uint32_t sctp_auth_disable;
89 uint32_t sctp_nat_friendly;
90 uint32_t sctp_L2_abc_variable;
91 uint32_t sctp_mbuf_threshold_count;
92 uint32_t sctp_do_drain;
93 uint32_t sctp_hb_maxburst;
94 uint32_t sctp_abort_if_one_2_one_hits_limit;
95 uint32_t sctp_strict_data_order;
96 uint32_t sctp_min_residual;
97 uint32_t sctp_max_retran_chunk;
98 uint32_t sctp_logging_level;
99 /* JRS - Variable for default congestion control module */
100 uint32_t sctp_default_cc_module;
101 /* RS - Variable for default stream scheduling module */
102 uint32_t sctp_default_ss_module;
103 uint32_t sctp_default_frag_interleave;
104 uint32_t sctp_mobility_base;
105 uint32_t sctp_mobility_fasthandoff;
106 uint32_t sctp_inits_include_nat_friendly;
107 uint32_t sctp_rttvar_bw;
108 uint32_t sctp_rttvar_rtt;
109 uint32_t sctp_rttvar_eqret;
110 uint32_t sctp_steady_step;
111 uint32_t sctp_use_dccc_ecn;
112 #if defined(SCTP_LOCAL_TRACE_BUF)
113 struct sctp_log sctp_log;
115 uint32_t sctp_udp_tunneling_for_client_enable;
116 uint32_t sctp_udp_tunneling_port;
117 uint32_t sctp_enable_sack_immediately;
118 uint32_t sctp_vtag_time_wait;
119 uint32_t sctp_buffer_splitting;
120 uint32_t sctp_initial_cwnd;
121 #if defined(SCTP_DEBUG)
122 uint32_t sctp_debug_on;
124 #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
125 uint32_t sctp_output_unlocked;
130 * limits for the sysctl variables
132 /* maxdgram: Maximum outgoing SCTP buffer size */
133 #define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size"
134 #define SCTPCTL_MAXDGRAM_MIN 0
135 #define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF
136 #define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */
138 /* recvspace: Maximum incoming SCTP buffer size */
139 #define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size"
140 #define SCTPCTL_RECVSPACE_MIN 0
141 #define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF
142 #define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */
144 /* autoasconf: Enable SCTP Auto-ASCONF */
145 #define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF"
146 #define SCTPCTL_AUTOASCONF_MIN 0
147 #define SCTPCTL_AUTOASCONF_MAX 1
148 #define SCTPCTL_AUTOASCONF_DEFAULT SCTP_DEFAULT_AUTO_ASCONF
150 /* autoasconf: Enable SCTP Auto-ASCONF */
151 #define SCTPCTL_MULTIPLEASCONFS_DESC "Enable SCTP Muliple-ASCONFs"
152 #define SCTPCTL_MULTIPLEASCONFS_MIN 0
153 #define SCTPCTL_MULTIPLEASCONFS_MAX 1
154 #define SCTPCTL_MULTIPLEASCONFS_DEFAULT SCTP_DEFAULT_MULTIPLE_ASCONFS
156 /* ecn_enable: Enable SCTP ECN */
157 #define SCTPCTL_ECN_ENABLE_DESC "Enable SCTP ECN"
158 #define SCTPCTL_ECN_ENABLE_MIN 0
159 #define SCTPCTL_ECN_ENABLE_MAX 1
160 #define SCTPCTL_ECN_ENABLE_DEFAULT 1
162 /* strict_sacks: Enable SCTP Strict SACK checking */
163 #define SCTPCTL_STRICT_SACKS_DESC "Enable SCTP Strict SACK checking"
164 #define SCTPCTL_STRICT_SACKS_MIN 0
165 #define SCTPCTL_STRICT_SACKS_MAX 1
166 #define SCTPCTL_STRICT_SACKS_DEFAULT 1
168 /* loopback_nocsum: Enable NO Csum on packets sent on loopback */
169 #define SCTPCTL_LOOPBACK_NOCSUM_DESC "Enable NO Csum on packets sent on loopback"
170 #define SCTPCTL_LOOPBACK_NOCSUM_MIN 0
171 #define SCTPCTL_LOOPBACK_NOCSUM_MAX 1
172 #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1
174 /* strict_init: Enable strict INIT/INIT-ACK singleton enforcement */
175 #define SCTPCTL_STRICT_INIT_DESC "Enable strict INIT/INIT-ACK singleton enforcement"
176 #define SCTPCTL_STRICT_INIT_MIN 0
177 #define SCTPCTL_STRICT_INIT_MAX 1
178 #define SCTPCTL_STRICT_INIT_DEFAULT 1
180 /* peer_chkoh: Amount to debit peers rwnd per chunk sent */
181 #define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent"
182 #define SCTPCTL_PEER_CHKOH_MIN 0
183 #define SCTPCTL_PEER_CHKOH_MAX 0xFFFFFFFF
184 #define SCTPCTL_PEER_CHKOH_DEFAULT 256
186 /* maxburst: Default max burst for sctp endpoints */
187 #define SCTPCTL_MAXBURST_DESC "Default max burst for sctp endpoints"
188 #define SCTPCTL_MAXBURST_MIN 0
189 #define SCTPCTL_MAXBURST_MAX 0xFFFFFFFF
190 #define SCTPCTL_MAXBURST_DEFAULT SCTP_DEF_MAX_BURST
192 /* fr_maxburst: Default max burst for sctp endpoints when fast retransmitting */
193 #define SCTPCTL_FRMAXBURST_DESC "Default fr max burst for sctp endpoints"
194 #define SCTPCTL_FRMAXBURST_MIN 0
195 #define SCTPCTL_FRMAXBURST_MAX 0xFFFFFFFF
196 #define SCTPCTL_FRMAXBURST_DEFAULT SCTP_DEF_FRMAX_BURST
199 /* maxchunks: Default max chunks on queue per asoc */
200 #define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc"
201 #define SCTPCTL_MAXCHUNKS_MIN 0
202 #define SCTPCTL_MAXCHUNKS_MAX 0xFFFFFFFF
203 #define SCTPCTL_MAXCHUNKS_DEFAULT SCTP_ASOC_MAX_CHUNKS_ON_QUEUE
205 /* tcbhashsize: Tuneable for Hash table sizes */
206 #define SCTPCTL_TCBHASHSIZE_DESC "Tunable for TCB hash table sizes"
207 #define SCTPCTL_TCBHASHSIZE_MIN 1
208 #define SCTPCTL_TCBHASHSIZE_MAX 0xFFFFFFFF
209 #define SCTPCTL_TCBHASHSIZE_DEFAULT SCTP_TCBHASHSIZE
211 /* pcbhashsize: Tuneable for PCB Hash table sizes */
212 #define SCTPCTL_PCBHASHSIZE_DESC "Tunable for PCB hash table sizes"
213 #define SCTPCTL_PCBHASHSIZE_MIN 1
214 #define SCTPCTL_PCBHASHSIZE_MAX 0xFFFFFFFF
215 #define SCTPCTL_PCBHASHSIZE_DEFAULT SCTP_PCBHASHSIZE
217 /* min_split_point: Minimum size when splitting a chunk */
218 #define SCTPCTL_MIN_SPLIT_POINT_DESC "Minimum size when splitting a chunk"
219 #define SCTPCTL_MIN_SPLIT_POINT_MIN 0
220 #define SCTPCTL_MIN_SPLIT_POINT_MAX 0xFFFFFFFF
221 #define SCTPCTL_MIN_SPLIT_POINT_DEFAULT SCTP_DEFAULT_SPLIT_POINT_MIN
223 /* chunkscale: Tuneable for Scaling of number of chunks and messages */
224 #define SCTPCTL_CHUNKSCALE_DESC "Tuneable for Scaling of number of chunks and messages"
225 #define SCTPCTL_CHUNKSCALE_MIN 1
226 #define SCTPCTL_CHUNKSCALE_MAX 0xFFFFFFFF
227 #define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE
229 /* delayed_sack_time: Default delayed SACK timer in ms */
230 #define SCTPCTL_DELAYED_SACK_TIME_DESC "Default delayed SACK timer in ms"
231 #define SCTPCTL_DELAYED_SACK_TIME_MIN 0
232 #define SCTPCTL_DELAYED_SACK_TIME_MAX 0xFFFFFFFF
233 #define SCTPCTL_DELAYED_SACK_TIME_DEFAULT SCTP_RECV_MSEC
235 /* sack_freq: Default SACK frequency */
236 #define SCTPCTL_SACK_FREQ_DESC "Default SACK frequency"
237 #define SCTPCTL_SACK_FREQ_MIN 0
238 #define SCTPCTL_SACK_FREQ_MAX 0xFFFFFFFF
239 #define SCTPCTL_SACK_FREQ_DEFAULT SCTP_DEFAULT_SACK_FREQ
241 /* sys_resource: Max number of cached resources in the system */
242 #define SCTPCTL_SYS_RESOURCE_DESC "Max number of cached resources in the system"
243 #define SCTPCTL_SYS_RESOURCE_MIN 0
244 #define SCTPCTL_SYS_RESOURCE_MAX 0xFFFFFFFF
245 #define SCTPCTL_SYS_RESOURCE_DEFAULT SCTP_DEF_SYSTEM_RESC_LIMIT
247 /* asoc_resource: Max number of cached resources in an asoc */
248 #define SCTPCTL_ASOC_RESOURCE_DESC "Max number of cached resources in an asoc"
249 #define SCTPCTL_ASOC_RESOURCE_MIN 0
250 #define SCTPCTL_ASOC_RESOURCE_MAX 0xFFFFFFFF
251 #define SCTPCTL_ASOC_RESOURCE_DEFAULT SCTP_DEF_ASOC_RESC_LIMIT
253 /* heartbeat_interval: Default heartbeat interval in ms */
254 #define SCTPCTL_HEARTBEAT_INTERVAL_DESC "Default heartbeat interval in ms"
255 #define SCTPCTL_HEARTBEAT_INTERVAL_MIN 0
256 #define SCTPCTL_HEARTBEAT_INTERVAL_MAX 0xFFFFFFFF
257 #define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT SCTP_HB_DEFAULT_MSEC
259 /* pmtu_raise_time: Default PMTU raise timer in seconds */
260 #define SCTPCTL_PMTU_RAISE_TIME_DESC "Default PMTU raise timer in seconds"
261 #define SCTPCTL_PMTU_RAISE_TIME_MIN 0
262 #define SCTPCTL_PMTU_RAISE_TIME_MAX 0xFFFFFFFF
263 #define SCTPCTL_PMTU_RAISE_TIME_DEFAULT SCTP_DEF_PMTU_RAISE_SEC
265 /* shutdown_guard_time: Default shutdown guard timer in seconds */
266 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC "Default shutdown guard timer in seconds"
267 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN 0
268 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX 0xFFFFFFFF
269 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT SCTP_DEF_MAX_SHUTDOWN_SEC
271 /* secret_lifetime: Default secret lifetime in seconds */
272 #define SCTPCTL_SECRET_LIFETIME_DESC "Default secret lifetime in seconds"
273 #define SCTPCTL_SECRET_LIFETIME_MIN 0
274 #define SCTPCTL_SECRET_LIFETIME_MAX 0xFFFFFFFF
275 #define SCTPCTL_SECRET_LIFETIME_DEFAULT SCTP_DEFAULT_SECRET_LIFE_SEC
277 /* rto_max: Default maximum retransmission timeout in ms */
278 #define SCTPCTL_RTO_MAX_DESC "Default maximum retransmission timeout in ms"
279 #define SCTPCTL_RTO_MAX_MIN 0
280 #define SCTPCTL_RTO_MAX_MAX 0xFFFFFFFF
281 #define SCTPCTL_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND
283 /* rto_min: Default minimum retransmission timeout in ms */
284 #define SCTPCTL_RTO_MIN_DESC "Default minimum retransmission timeout in ms"
285 #define SCTPCTL_RTO_MIN_MIN 0
286 #define SCTPCTL_RTO_MIN_MAX 0xFFFFFFFF
287 #define SCTPCTL_RTO_MIN_DEFAULT SCTP_RTO_LOWER_BOUND
289 /* rto_initial: Default initial retransmission timeout in ms */
290 #define SCTPCTL_RTO_INITIAL_DESC "Default initial retransmission timeout in ms"
291 #define SCTPCTL_RTO_INITIAL_MIN 0
292 #define SCTPCTL_RTO_INITIAL_MAX 0xFFFFFFFF
293 #define SCTPCTL_RTO_INITIAL_DEFAULT SCTP_RTO_INITIAL
295 /* init_rto_max: Default maximum retransmission timeout during association setup in ms */
296 #define SCTPCTL_INIT_RTO_MAX_DESC "Default maximum retransmission timeout during association setup in ms"
297 #define SCTPCTL_INIT_RTO_MAX_MIN 0
298 #define SCTPCTL_INIT_RTO_MAX_MAX 0xFFFFFFFF
299 #define SCTPCTL_INIT_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND
301 /* valid_cookie_life: Default cookie lifetime in sec */
302 #define SCTPCTL_VALID_COOKIE_LIFE_DESC "Default cookie lifetime in seconds"
303 #define SCTPCTL_VALID_COOKIE_LIFE_MIN 0
304 #define SCTPCTL_VALID_COOKIE_LIFE_MAX 0xFFFFFFFF
305 #define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT SCTP_DEFAULT_COOKIE_LIFE
307 /* init_rtx_max: Default maximum number of retransmission for INIT chunks */
308 #define SCTPCTL_INIT_RTX_MAX_DESC "Default maximum number of retransmission for INIT chunks"
309 #define SCTPCTL_INIT_RTX_MAX_MIN 0
310 #define SCTPCTL_INIT_RTX_MAX_MAX 0xFFFFFFFF
311 #define SCTPCTL_INIT_RTX_MAX_DEFAULT SCTP_DEF_MAX_INIT
313 /* assoc_rtx_max: Default maximum number of retransmissions per association */
314 #define SCTPCTL_ASSOC_RTX_MAX_DESC "Default maximum number of retransmissions per association"
315 #define SCTPCTL_ASSOC_RTX_MAX_MIN 0
316 #define SCTPCTL_ASSOC_RTX_MAX_MAX 0xFFFFFFFF
317 #define SCTPCTL_ASSOC_RTX_MAX_DEFAULT SCTP_DEF_MAX_SEND
319 /* path_rtx_max: Default maximum of retransmissions per path */
320 #define SCTPCTL_PATH_RTX_MAX_DESC "Default maximum of retransmissions per path"
321 #define SCTPCTL_PATH_RTX_MAX_MIN 0
322 #define SCTPCTL_PATH_RTX_MAX_MAX 0xFFFFFFFF
323 #define SCTPCTL_PATH_RTX_MAX_DEFAULT SCTP_DEF_MAX_PATH_RTX
325 /* add_more_on_output: When space-wise is it worthwhile to try to add more to a socket send buffer */
326 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC "When space-wise is it worthwhile to try to add more to a socket send buffer"
327 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN 0
328 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX 0xFFFFFFFF
329 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE
331 /* outgoing_streams: Default number of outgoing streams */
332 #define SCTPCTL_OUTGOING_STREAMS_DESC "Default number of outgoing streams"
333 #define SCTPCTL_OUTGOING_STREAMS_MIN 1
334 #define SCTPCTL_OUTGOING_STREAMS_MAX 65535
335 #define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL
337 /* cmt_on_off: CMT on/off flag */
338 #define SCTPCTL_CMT_ON_OFF_DESC "CMT settings"
339 #define SCTPCTL_CMT_ON_OFF_MIN SCTP_CMT_OFF
340 #define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX
341 #define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF
343 /* EY - nr_sack_on_off: NR_SACK on/off flag */
344 #define SCTPCTL_NR_SACK_ON_OFF_DESC "NR_SACK on/off flag"
345 #define SCTPCTL_NR_SACK_ON_OFF_MIN 0
346 #define SCTPCTL_NR_SACK_ON_OFF_MAX 1
347 #define SCTPCTL_NR_SACK_ON_OFF_DEFAULT 0
349 /* cmt_use_dac: CMT DAC on/off flag */
350 #define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag"
351 #define SCTPCTL_CMT_USE_DAC_MIN 0
352 #define SCTPCTL_CMT_USE_DAC_MAX 1
353 #define SCTPCTL_CMT_USE_DAC_DEFAULT 0
355 /* JRS 5/2107 - CMT PF type flag */
356 #define SCTPCTL_CMT_PF_DESC "CMT PF type flag"
357 #define SCTPCTL_CMT_PF_MIN 0
358 #define SCTPCTL_CMT_PF_MAX 2
359 #define SCTPCTL_CMT_PF_DEFAULT 0
361 /* cwnd_maxburst: Use a CWND adjusting maxburst */
362 #define SCTPCTL_CWND_MAXBURST_DESC "Use a CWND adjusting maxburst"
363 #define SCTPCTL_CWND_MAXBURST_MIN 0
364 #define SCTPCTL_CWND_MAXBURST_MAX 1
365 #define SCTPCTL_CWND_MAXBURST_DEFAULT 1
367 /* early_fast_retran: Early Fast Retransmit with timer */
368 #define SCTPCTL_EARLY_FAST_RETRAN_DESC "Early Fast Retransmit with timer"
369 #define SCTPCTL_EARLY_FAST_RETRAN_MIN 0
370 #define SCTPCTL_EARLY_FAST_RETRAN_MAX 0xFFFFFFFF
371 #define SCTPCTL_EARLY_FAST_RETRAN_DEFAULT 0
373 /* early_fast_retran_msec: Early Fast Retransmit minimum timer value */
374 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_DESC "Early Fast Retransmit minimum timer value"
375 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_MIN 0
376 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_MAX 0xFFFFFFFF
377 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_DEFAULT SCTP_MINFR_MSEC_TIMER
379 /* asconf_auth_nochk: Disable SCTP ASCONF AUTH requirement */
380 #define SCTPCTL_ASCONF_AUTH_NOCHK_DESC "Disable SCTP ASCONF AUTH requirement"
381 #define SCTPCTL_ASCONF_AUTH_NOCHK_MIN 0
382 #define SCTPCTL_ASCONF_AUTH_NOCHK_MAX 1
383 #define SCTPCTL_ASCONF_AUTH_NOCHK_DEFAULT 0
385 /* auth_disable: Disable SCTP AUTH function */
386 #define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function"
387 #define SCTPCTL_AUTH_DISABLE_MIN 0
388 #define SCTPCTL_AUTH_DISABLE_MAX 1
389 #define SCTPCTL_AUTH_DISABLE_DEFAULT 0
391 /* nat_friendly: SCTP NAT friendly operation */
392 #define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation"
393 #define SCTPCTL_NAT_FRIENDLY_MIN 0
394 #define SCTPCTL_NAT_FRIENDLY_MAX 1
395 #define SCTPCTL_NAT_FRIENDLY_DEFAULT 1
397 /* abc_l_var: SCTP ABC max increase per SACK (L) */
398 #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)"
399 #define SCTPCTL_ABC_L_VAR_MIN 0
400 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF
401 #define SCTPCTL_ABC_L_VAR_DEFAULT 1
403 /* max_chained_mbufs: Default max number of small mbufs on a chain */
404 #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain"
405 #define SCTPCTL_MAX_CHAINED_MBUFS_MIN 0
406 #define SCTPCTL_MAX_CHAINED_MBUFS_MAX 0xFFFFFFFF
407 #define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT SCTP_DEFAULT_MBUFS_IN_CHAIN
409 /* do_sctp_drain: Should SCTP respond to the drain calls */
410 #define SCTPCTL_DO_SCTP_DRAIN_DESC "Should SCTP respond to the drain calls"
411 #define SCTPCTL_DO_SCTP_DRAIN_MIN 0
412 #define SCTPCTL_DO_SCTP_DRAIN_MAX 1
413 #define SCTPCTL_DO_SCTP_DRAIN_DEFAULT 1
415 /* hb_max_burst: Confirmation Heartbeat max burst? */
416 #define SCTPCTL_HB_MAX_BURST_DESC "Confirmation Heartbeat max burst"
417 #define SCTPCTL_HB_MAX_BURST_MIN 1
418 #define SCTPCTL_HB_MAX_BURST_MAX 0xFFFFFFFF
419 #define SCTPCTL_HB_MAX_BURST_DEFAULT SCTP_DEF_HBMAX_BURST
421 /* abort_at_limit: When one-2-one hits qlimit abort */
422 #define SCTPCTL_ABORT_AT_LIMIT_DESC "When one-2-one hits qlimit abort"
423 #define SCTPCTL_ABORT_AT_LIMIT_MIN 0
424 #define SCTPCTL_ABORT_AT_LIMIT_MAX 1
425 #define SCTPCTL_ABORT_AT_LIMIT_DEFAULT 0
427 /* strict_data_order: Enforce strict data ordering, abort if control inside data */
428 #define SCTPCTL_STRICT_DATA_ORDER_DESC "Enforce strict data ordering, abort if control inside data"
429 #define SCTPCTL_STRICT_DATA_ORDER_MIN 0
430 #define SCTPCTL_STRICT_DATA_ORDER_MAX 1
431 #define SCTPCTL_STRICT_DATA_ORDER_DEFAULT 0
433 /* min_residual: min residual in a data fragment leftover */
434 #define SCTPCTL_MIN_RESIDUAL_DESC "Minimum residual data chunk in second part of split"
435 #define SCTPCTL_MIN_RESIDUAL_MIN 20
436 #define SCTPCTL_MIN_RESIDUAL_MAX 65535
437 #define SCTPCTL_MIN_RESIDUAL_DEFAULT 1452
439 /* max_retran_chunk: max chunk retransmissions */
440 #define SCTPCTL_MAX_RETRAN_CHUNK_DESC "Maximum times an unlucky chunk can be retran'd before assoc abort"
441 #define SCTPCTL_MAX_RETRAN_CHUNK_MIN 0
442 #define SCTPCTL_MAX_RETRAN_CHUNK_MAX 65535
443 #define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT 30
445 /* sctp_logging: This gives us logging when the options are enabled */
446 #define SCTPCTL_LOGGING_LEVEL_DESC "Ltrace/KTR trace logging level"
447 #define SCTPCTL_LOGGING_LEVEL_MIN 0
448 #define SCTPCTL_LOGGING_LEVEL_MAX 0xffffffff
449 #define SCTPCTL_LOGGING_LEVEL_DEFAULT 0
451 /* JRS - default congestion control module sysctl */
452 #define SCTPCTL_DEFAULT_CC_MODULE_DESC "Default congestion control module"
453 #define SCTPCTL_DEFAULT_CC_MODULE_MIN 0
454 #define SCTPCTL_DEFAULT_CC_MODULE_MAX 2
455 #define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT 0
457 /* RS - default stream scheduling module sysctl */
458 #define SCTPCTL_DEFAULT_SS_MODULE_DESC "Default stream scheduling module"
459 #define SCTPCTL_DEFAULT_SS_MODULE_MIN 0
460 #define SCTPCTL_DEFAULT_SS_MODULE_MAX 5
461 #define SCTPCTL_DEFAULT_SS_MODULE_DEFAULT 0
463 /* RRS - default fragment interleave */
464 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC "Default fragment interleave level"
465 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN 0
466 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX 2
467 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT 1
469 /* mobility_base: Enable SCTP mobility support */
470 #define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility"
471 #define SCTPCTL_MOBILITY_BASE_MIN 0
472 #define SCTPCTL_MOBILITY_BASE_MAX 1
473 #define SCTPCTL_MOBILITY_BASE_DEFAULT SCTP_DEFAULT_MOBILITY_BASE
475 /* mobility_fasthandoff: Enable SCTP fast handoff support */
476 #define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff"
477 #define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0
478 #define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1
479 #define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT SCTP_DEFAULT_MOBILITY_FASTHANDOFF
481 /* Enable SCTP/UDP tunneling for clients*/
482 #define SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_DESC "Enable SCTP/UDP tunneling for client"
483 #define SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN 0
484 #define SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX 1
485 #define SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_DEFAULT SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN
487 /* Enable SCTP/UDP tunneling port */
488 #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port"
489 #define SCTPCTL_UDP_TUNNELING_PORT_MIN 0
490 #define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535
491 #define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT SCTP_OVER_UDP_TUNNELING_PORT
493 /* Enable sending of the SACK-IMMEDIATELY bit */
494 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit."
495 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN 0
496 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 1
497 #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN
499 /* Enable sending of the NAT-FRIENDLY message */
500 #define SCTPCTL_NAT_FRIENDLY_INITS_DESC "Enable sending of the nat-friendly SCTP option on INITs."
501 #define SCTPCTL_NAT_FRIENDLY_INITS_MIN 0
502 #define SCTPCTL_NAT_FRIENDLY_INITS_MAX 1
503 #define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT SCTPCTL_NAT_FRIENDLY_INITS_MIN
505 /* Vtag time wait in seconds */
506 #define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time in seconds, 0 disables it."
507 #define SCTPCTL_TIME_WAIT_MIN 0
508 #define SCTPCTL_TIME_WAIT_MAX 0xffffffff
509 #define SCTPCTL_TIME_WAIT_DEFAULT SCTP_TIME_WAIT
511 /* Enable Send/Receive buffer splitting */
512 #define SCTPCTL_BUFFER_SPLITTING_DESC "Enable send/receive buffer splitting."
513 #define SCTPCTL_BUFFER_SPLITTING_MIN 0
514 #define SCTPCTL_BUFFER_SPLITTING_MAX 0x3
515 #define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN
517 /* Initial congestion window in MTU */
518 #define SCTPCTL_INITIAL_CWND_DESC "Initial congestion window in MTUs"
519 #define SCTPCTL_INITIAL_CWND_MIN 0
520 #define SCTPCTL_INITIAL_CWND_MAX 0xffffffff
521 #define SCTPCTL_INITIAL_CWND_DEFAULT 3
523 /* rttvar smooth avg for bw calc */
524 #define SCTPCTL_RTTVAR_BW_DESC "Shift amount for bw smoothing on rtt calc"
525 #define SCTPCTL_RTTVAR_BW_MIN 0
526 #define SCTPCTL_RTTVAR_BW_MAX 32
527 #define SCTPCTL_RTTVAR_BW_DEFAULT 4
529 /* rttvar smooth avg for bw calc */
530 #define SCTPCTL_RTTVAR_RTT_DESC "Shift amount for rtt smoothing on rtt calc"
531 #define SCTPCTL_RTTVAR_RTT_MIN 0
532 #define SCTPCTL_RTTVAR_RTT_MAX 32
533 #define SCTPCTL_RTTVAR_RTT_DEFAULT 5
535 #define SCTPCTL_RTTVAR_EQRET_DESC "What to return when rtt and bw are unchanged"
536 #define SCTPCTL_RTTVAR_EQRET_MIN 0
537 #define SCTPCTL_RTTVAR_EQRET_MAX 1
538 #define SCTPCTL_RTTVAR_EQRET_DEFAULT 0
540 #define SCTPCTL_RTTVAR_STEADYS_DESC "How many the sames it takes to try step down of cwnd"
541 #define SCTPCTL_RTTVAR_STEADYS_MIN 0
542 #define SCTPCTL_RTTVAR_STEADYS_MAX 0xFFFF
543 #define SCTPCTL_RTTVAR_STEADYS_DEFAULT 20 /* 0 means disable feature */
545 #define SCTPCTL_RTTVAR_DCCCECN_DESC "Enable for RTCC CC datacenter ECN"
546 #define SCTPCTL_RTTVAR_DCCCECN_MIN 0
547 #define SCTPCTL_RTTVAR_DCCCECN_MAX 1
548 #define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */
550 #if defined(SCTP_DEBUG)
551 /* debug: Configure debug output */
552 #define SCTPCTL_DEBUG_DESC "Configure debug output"
553 #define SCTPCTL_DEBUG_MIN 0
554 #define SCTPCTL_DEBUG_MAX 0xFFFFFFFF
555 #define SCTPCTL_DEBUG_DEFAULT 0
559 #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
560 #define SCTPCTL_OUTPUT_UNLOCKED_DESC "Unlock socket when sending packets down to IP."
561 #define SCTPCTL_OUTPUT_UNLOCKED_MIN 0
562 #define SCTPCTL_OUTPUT_UNLOCKED_MAX 1
563 #define SCTPCTL_OUTPUT_UNLOCKED_DEFAULT SCTPCTL_OUTPUT_UNLOCKED_MIN
567 #if defined(_KERNEL) || defined(__Userspace__)
568 #if defined(SYSCTL_DECL)
569 SYSCTL_DECL(_net_inet_sctp);
572 void sctp_init_sysctls(void);
575 #endif /* __sctp_sysctl_h__ */