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