1167598Srrs/*-
2169382Srrs * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved.
3235828Stuexen * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
4235828Stuexen * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
5167598Srrs *
6167598Srrs * Redistribution and use in source and binary forms, with or without
7167598Srrs * modification, are permitted provided that the following conditions are met:
8167598Srrs *
9167598Srrs * a) Redistributions of source code must retain the above copyright notice,
10228653Stuexen *    this list of conditions and the following disclaimer.
11167598Srrs *
12167598Srrs * b) Redistributions in binary form must reproduce the above copyright
13167598Srrs *    notice, this list of conditions and the following disclaimer in
14228653Stuexen *    the documentation and/or other materials provided with the distribution.
15167598Srrs *
16167598Srrs * c) Neither the name of Cisco Systems, Inc. nor the names of its
17167598Srrs *    contributors may be used to endorse or promote products derived
18167598Srrs *    from this software without specific prior written permission.
19167598Srrs *
20167598Srrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21167598Srrs * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22167598Srrs * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23167598Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24167598Srrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25167598Srrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26167598Srrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27167598Srrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28167598Srrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29167598Srrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30167598Srrs * THE POSSIBILITY OF SUCH DAMAGE.
31167598Srrs */
32167598Srrs
33167598Srrs#include <sys/cdefs.h>
34167598Srrs__FBSDID("$FreeBSD$");
35167598Srrs
36235828Stuexen#ifndef _NETINET_SCTP_SYSCTL_H_
37235828Stuexen#define _NETINET_SCTP_SYSCTL_H_
38167598Srrs
39167598Srrs#include <netinet/sctp_os.h>
40167598Srrs#include <netinet/sctp_constants.h>
41167598Srrs
42179783Srrsstruct sctp_sysctl {
43179783Srrs	uint32_t sctp_sendspace;
44179783Srrs	uint32_t sctp_recvspace;
45179783Srrs	uint32_t sctp_auto_asconf;
46179783Srrs	uint32_t sctp_multiple_asconfs;
47179783Srrs	uint32_t sctp_ecn_enable;
48218186Srrs	uint32_t sctp_fr_max_burst_default;
49179783Srrs	uint32_t sctp_strict_sacks;
50179783Srrs	uint32_t sctp_peer_chunk_oh;
51179783Srrs	uint32_t sctp_max_burst_default;
52179783Srrs	uint32_t sctp_max_chunks_on_queue;
53179783Srrs	uint32_t sctp_hashtblsize;
54179783Srrs	uint32_t sctp_pcbtblsize;
55179783Srrs	uint32_t sctp_min_split_point;
56179783Srrs	uint32_t sctp_chunkscale;
57179783Srrs	uint32_t sctp_delayed_sack_time_default;
58179783Srrs	uint32_t sctp_sack_freq_default;
59179783Srrs	uint32_t sctp_system_free_resc_limit;
60179783Srrs	uint32_t sctp_asoc_free_resc_limit;
61179783Srrs	uint32_t sctp_heartbeat_interval_default;
62179783Srrs	uint32_t sctp_pmtu_raise_time_default;
63179783Srrs	uint32_t sctp_shutdown_guard_time_default;
64179783Srrs	uint32_t sctp_secret_lifetime_default;
65179783Srrs	uint32_t sctp_rto_max_default;
66179783Srrs	uint32_t sctp_rto_min_default;
67179783Srrs	uint32_t sctp_rto_initial_default;
68179783Srrs	uint32_t sctp_init_rto_max_default;
69179783Srrs	uint32_t sctp_valid_cookie_life_default;
70179783Srrs	uint32_t sctp_init_rtx_max_default;
71179783Srrs	uint32_t sctp_assoc_rtx_max_default;
72179783Srrs	uint32_t sctp_path_rtx_max_default;
73224641Stuexen	uint32_t sctp_path_pf_threshold;
74179783Srrs	uint32_t sctp_add_more_threshold;
75252779Stuexen	uint32_t sctp_nr_incoming_streams_default;
76179783Srrs	uint32_t sctp_nr_outgoing_streams_default;
77179783Srrs	uint32_t sctp_cmt_on_off;
78179783Srrs	uint32_t sctp_cmt_use_dac;
79190689Srrs	/* EY 5/5/08 - nr_sack flag variable */
80185694Srrs	uint32_t sctp_nr_sack_on_off;
81179783Srrs	uint32_t sctp_use_cwnd_based_maxburst;
82179783Srrs	uint32_t sctp_asconf_auth_nochk;
83179783Srrs	uint32_t sctp_auth_disable;
84179783Srrs	uint32_t sctp_nat_friendly;
85179783Srrs	uint32_t sctp_L2_abc_variable;
86179783Srrs	uint32_t sctp_mbuf_threshold_count;
87179783Srrs	uint32_t sctp_do_drain;
88179783Srrs	uint32_t sctp_hb_maxburst;
89179783Srrs	uint32_t sctp_abort_if_one_2_one_hits_limit;
90179783Srrs	uint32_t sctp_strict_data_order;
91179783Srrs	uint32_t sctp_min_residual;
92179783Srrs	uint32_t sctp_max_retran_chunk;
93179783Srrs	uint32_t sctp_logging_level;
94179783Srrs	/* JRS - Variable for default congestion control module */
95179783Srrs	uint32_t sctp_default_cc_module;
96217760Stuexen	/* RS - Variable for default stream scheduling module */
97217760Stuexen	uint32_t sctp_default_ss_module;
98179783Srrs	uint32_t sctp_default_frag_interleave;
99179783Srrs	uint32_t sctp_mobility_base;
100179783Srrs	uint32_t sctp_mobility_fasthandoff;
101185694Srrs	uint32_t sctp_inits_include_nat_friendly;
102219057Srrs	uint32_t sctp_rttvar_bw;
103219057Srrs	uint32_t sctp_rttvar_rtt;
104219057Srrs	uint32_t sctp_rttvar_eqret;
105219397Srrs	uint32_t sctp_steady_step;
106219397Srrs	uint32_t sctp_use_dccc_ecn;
107179783Srrs#if defined(SCTP_LOCAL_TRACE_BUF)
108179783Srrs	struct sctp_log sctp_log;
109179783Srrs#endif
110179783Srrs	uint32_t sctp_udp_tunneling_port;
111179783Srrs	uint32_t sctp_enable_sack_immediately;
112193090Srrs	uint32_t sctp_vtag_time_wait;
113212799Stuexen	uint32_t sctp_buffer_splitting;
114212800Stuexen	uint32_t sctp_initial_cwnd;
115229805Stuexen	uint32_t sctp_blackhole;
116179783Srrs#if defined(SCTP_DEBUG)
117179783Srrs	uint32_t sctp_debug_on;
118179783Srrs#endif
119179783Srrs#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
120179783Srrs	uint32_t sctp_output_unlocked;
121179783Srrs#endif
122179783Srrs};
123179783Srrs
124167598Srrs/*
125167598Srrs * limits for the sysctl variables
126167598Srrs */
127167598Srrs/* maxdgram: Maximum outgoing SCTP buffer size */
128167598Srrs#define SCTPCTL_MAXDGRAM_DESC		"Maximum outgoing SCTP buffer size"
129167598Srrs#define SCTPCTL_MAXDGRAM_MIN		0
130167598Srrs#define SCTPCTL_MAXDGRAM_MAX		0xFFFFFFFF
131167598Srrs#define SCTPCTL_MAXDGRAM_DEFAULT	262144	/* 256k */
132167598Srrs
133167598Srrs/* recvspace: Maximum incoming SCTP buffer size */
134167598Srrs#define SCTPCTL_RECVSPACE_DESC		"Maximum incoming SCTP buffer size"
135167598Srrs#define SCTPCTL_RECVSPACE_MIN		0
136167598Srrs#define SCTPCTL_RECVSPACE_MAX		0xFFFFFFFF
137167598Srrs#define SCTPCTL_RECVSPACE_DEFAULT	262144	/* 256k */
138167598Srrs
139167598Srrs/* autoasconf: Enable SCTP Auto-ASCONF */
140167598Srrs#define SCTPCTL_AUTOASCONF_DESC		"Enable SCTP Auto-ASCONF"
141167598Srrs#define SCTPCTL_AUTOASCONF_MIN		0
142167598Srrs#define SCTPCTL_AUTOASCONF_MAX		1
143167598Srrs#define SCTPCTL_AUTOASCONF_DEFAULT	SCTP_DEFAULT_AUTO_ASCONF
144167598Srrs
145179157Srrs/* autoasconf: Enable SCTP Auto-ASCONF */
146179157Srrs#define SCTPCTL_MULTIPLEASCONFS_DESC	"Enable SCTP Muliple-ASCONFs"
147179157Srrs#define SCTPCTL_MULTIPLEASCONFS_MIN	0
148179157Srrs#define SCTPCTL_MULTIPLEASCONFS_MAX	1
149179157Srrs#define SCTPCTL_MULTIPLEASCONFS_DEFAULT	SCTP_DEFAULT_MULTIPLE_ASCONFS
150179157Srrs
151167598Srrs/* ecn_enable: Enable SCTP ECN */
152167598Srrs#define SCTPCTL_ECN_ENABLE_DESC		"Enable SCTP ECN"
153167598Srrs#define SCTPCTL_ECN_ENABLE_MIN		0
154167598Srrs#define SCTPCTL_ECN_ENABLE_MAX		1
155167598Srrs#define SCTPCTL_ECN_ENABLE_DEFAULT	1
156167598Srrs
157167598Srrs/* strict_sacks: Enable SCTP Strict SACK checking */
158167598Srrs#define SCTPCTL_STRICT_SACKS_DESC	"Enable SCTP Strict SACK checking"
159167598Srrs#define SCTPCTL_STRICT_SACKS_MIN	0
160167598Srrs#define SCTPCTL_STRICT_SACKS_MAX	1
161182367Srrs#define SCTPCTL_STRICT_SACKS_DEFAULT	1
162167598Srrs
163167598Srrs/* loopback_nocsum: Enable NO Csum on packets sent on loopback */
164167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_DESC	"Enable NO Csum on packets sent on loopback"
165167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_MIN	0
166167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_MAX	1
167167598Srrs#define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT	1
168167598Srrs
169167598Srrs/* peer_chkoh: Amount to debit peers rwnd per chunk sent */
170167598Srrs#define SCTPCTL_PEER_CHKOH_DESC		"Amount to debit peers rwnd per chunk sent"
171167598Srrs#define SCTPCTL_PEER_CHKOH_MIN		0
172167598Srrs#define SCTPCTL_PEER_CHKOH_MAX		0xFFFFFFFF
173170642Srrs#define SCTPCTL_PEER_CHKOH_DEFAULT	256
174167598Srrs
175167598Srrs/* maxburst: Default max burst for sctp endpoints */
176167598Srrs#define SCTPCTL_MAXBURST_DESC		"Default max burst for sctp endpoints"
177217894Stuexen#define SCTPCTL_MAXBURST_MIN		0
178167598Srrs#define SCTPCTL_MAXBURST_MAX		0xFFFFFFFF
179167598Srrs#define SCTPCTL_MAXBURST_DEFAULT	SCTP_DEF_MAX_BURST
180167598Srrs
181218186Srrs/* fr_maxburst: Default max burst for sctp endpoints when fast retransmitting */
182218186Srrs#define SCTPCTL_FRMAXBURST_DESC		"Default fr max burst for sctp endpoints"
183218186Srrs#define SCTPCTL_FRMAXBURST_MIN		0
184218186Srrs#define SCTPCTL_FRMAXBURST_MAX		0xFFFFFFFF
185218186Srrs#define SCTPCTL_FRMAXBURST_DEFAULT	SCTP_DEF_FRMAX_BURST
186218186Srrs
187218186Srrs
188167598Srrs/* maxchunks: Default max chunks on queue per asoc */
189167598Srrs#define SCTPCTL_MAXCHUNKS_DESC		"Default max chunks on queue per asoc"
190167598Srrs#define SCTPCTL_MAXCHUNKS_MIN		0
191167598Srrs#define SCTPCTL_MAXCHUNKS_MAX		0xFFFFFFFF
192167598Srrs#define SCTPCTL_MAXCHUNKS_DEFAULT	SCTP_ASOC_MAX_CHUNKS_ON_QUEUE
193167598Srrs
194218264Sbrucec/* tcbhashsize: Tunable for Hash table sizes */
195167598Srrs#define SCTPCTL_TCBHASHSIZE_DESC	"Tunable for TCB hash table sizes"
196167598Srrs#define SCTPCTL_TCBHASHSIZE_MIN		1
197167598Srrs#define SCTPCTL_TCBHASHSIZE_MAX		0xFFFFFFFF
198167598Srrs#define SCTPCTL_TCBHASHSIZE_DEFAULT	SCTP_TCBHASHSIZE
199167598Srrs
200218264Sbrucec/* pcbhashsize: Tunable for PCB Hash table sizes */
201167598Srrs#define SCTPCTL_PCBHASHSIZE_DESC	"Tunable for PCB hash table sizes"
202167598Srrs#define SCTPCTL_PCBHASHSIZE_MIN		1
203167598Srrs#define SCTPCTL_PCBHASHSIZE_MAX		0xFFFFFFFF
204167598Srrs#define SCTPCTL_PCBHASHSIZE_DEFAULT	SCTP_PCBHASHSIZE
205167598Srrs
206167598Srrs/* min_split_point: Minimum size when splitting a chunk */
207167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_DESC	"Minimum size when splitting a chunk"
208167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_MIN	0
209167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_MAX	0xFFFFFFFF
210167598Srrs#define SCTPCTL_MIN_SPLIT_POINT_DEFAULT	SCTP_DEFAULT_SPLIT_POINT_MIN
211167598Srrs
212218264Sbrucec/* chunkscale: Tunable for Scaling of number of chunks and messages */
213218264Sbrucec#define SCTPCTL_CHUNKSCALE_DESC		"Tunable for Scaling of number of chunks and messages"
214167598Srrs#define SCTPCTL_CHUNKSCALE_MIN		1
215167598Srrs#define SCTPCTL_CHUNKSCALE_MAX		0xFFFFFFFF
216167598Srrs#define SCTPCTL_CHUNKSCALE_DEFAULT	SCTP_CHUNKQUEUE_SCALE
217167598Srrs
218219397Srrs/* delayed_sack_time: Default delayed SACK timer in ms */
219219397Srrs#define SCTPCTL_DELAYED_SACK_TIME_DESC	"Default delayed SACK timer in ms"
220167598Srrs#define SCTPCTL_DELAYED_SACK_TIME_MIN	0
221167598Srrs#define SCTPCTL_DELAYED_SACK_TIME_MAX	0xFFFFFFFF
222167598Srrs#define SCTPCTL_DELAYED_SACK_TIME_DEFAULT	SCTP_RECV_MSEC
223167598Srrs
224167598Srrs/* sack_freq: Default SACK frequency */
225167598Srrs#define SCTPCTL_SACK_FREQ_DESC		"Default SACK frequency"
226167598Srrs#define SCTPCTL_SACK_FREQ_MIN		0
227167598Srrs#define SCTPCTL_SACK_FREQ_MAX		0xFFFFFFFF
228167598Srrs#define SCTPCTL_SACK_FREQ_DEFAULT	SCTP_DEFAULT_SACK_FREQ
229167598Srrs
230167598Srrs/* sys_resource: Max number of cached resources in the system */
231167598Srrs#define SCTPCTL_SYS_RESOURCE_DESC	"Max number of cached resources in the system"
232167598Srrs#define SCTPCTL_SYS_RESOURCE_MIN	0
233167598Srrs#define SCTPCTL_SYS_RESOURCE_MAX	0xFFFFFFFF
234167598Srrs#define SCTPCTL_SYS_RESOURCE_DEFAULT	SCTP_DEF_SYSTEM_RESC_LIMIT
235167598Srrs
236167598Srrs/* asoc_resource: Max number of cached resources in an asoc */
237167598Srrs#define SCTPCTL_ASOC_RESOURCE_DESC	"Max number of cached resources in an asoc"
238167598Srrs#define SCTPCTL_ASOC_RESOURCE_MIN	0
239167598Srrs#define SCTPCTL_ASOC_RESOURCE_MAX	0xFFFFFFFF
240167598Srrs#define SCTPCTL_ASOC_RESOURCE_DEFAULT	SCTP_DEF_ASOC_RESC_LIMIT
241167598Srrs
242219397Srrs/* heartbeat_interval: Default heartbeat interval in ms */
243219397Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_DESC	"Default heartbeat interval in ms"
244167598Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_MIN	0
245167598Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_MAX	0xFFFFFFFF
246167598Srrs#define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT	SCTP_HB_DEFAULT_MSEC
247167598Srrs
248219397Srrs/* pmtu_raise_time: Default PMTU raise timer in seconds */
249219397Srrs#define SCTPCTL_PMTU_RAISE_TIME_DESC	"Default PMTU raise timer in seconds"
250167598Srrs#define SCTPCTL_PMTU_RAISE_TIME_MIN	0
251167598Srrs#define SCTPCTL_PMTU_RAISE_TIME_MAX	0xFFFFFFFF
252167598Srrs#define SCTPCTL_PMTU_RAISE_TIME_DEFAULT	SCTP_DEF_PMTU_RAISE_SEC
253167598Srrs
254219397Srrs/* shutdown_guard_time: Default shutdown guard timer in seconds */
255219397Srrs#define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC	"Default shutdown guard timer in seconds"
256167598Srrs#define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN		0
257167598Srrs#define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX		0xFFFFFFFF
258167598Srrs#define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT	SCTP_DEF_MAX_SHUTDOWN_SEC
259167598Srrs
260219397Srrs/* secret_lifetime: Default secret lifetime in seconds */
261219397Srrs#define SCTPCTL_SECRET_LIFETIME_DESC	"Default secret lifetime in seconds"
262167598Srrs#define SCTPCTL_SECRET_LIFETIME_MIN	0
263167598Srrs#define SCTPCTL_SECRET_LIFETIME_MAX	0xFFFFFFFF
264167598Srrs#define SCTPCTL_SECRET_LIFETIME_DEFAULT	SCTP_DEFAULT_SECRET_LIFE_SEC
265167598Srrs
266219397Srrs/* rto_max: Default maximum retransmission timeout in ms */
267219397Srrs#define SCTPCTL_RTO_MAX_DESC		"Default maximum retransmission timeout in ms"
268167598Srrs#define SCTPCTL_RTO_MAX_MIN		0
269167598Srrs#define SCTPCTL_RTO_MAX_MAX		0xFFFFFFFF
270167598Srrs#define SCTPCTL_RTO_MAX_DEFAULT		SCTP_RTO_UPPER_BOUND
271167598Srrs
272219397Srrs/* rto_min: Default minimum retransmission timeout in ms */
273219397Srrs#define SCTPCTL_RTO_MIN_DESC		"Default minimum retransmission timeout in ms"
274167598Srrs#define SCTPCTL_RTO_MIN_MIN		0
275167598Srrs#define SCTPCTL_RTO_MIN_MAX		0xFFFFFFFF
276167598Srrs#define SCTPCTL_RTO_MIN_DEFAULT		SCTP_RTO_LOWER_BOUND
277167598Srrs
278219397Srrs/* rto_initial: Default initial retransmission timeout in ms */
279219397Srrs#define SCTPCTL_RTO_INITIAL_DESC	"Default initial retransmission timeout in ms"
280167598Srrs#define SCTPCTL_RTO_INITIAL_MIN		0
281167598Srrs#define SCTPCTL_RTO_INITIAL_MAX		0xFFFFFFFF
282167598Srrs#define SCTPCTL_RTO_INITIAL_DEFAULT	SCTP_RTO_INITIAL
283167598Srrs
284219397Srrs/* init_rto_max: Default maximum retransmission timeout during association setup in ms */
285219397Srrs#define SCTPCTL_INIT_RTO_MAX_DESC	"Default maximum retransmission timeout during association setup in ms"
286167598Srrs#define SCTPCTL_INIT_RTO_MAX_MIN	0
287167598Srrs#define SCTPCTL_INIT_RTO_MAX_MAX	0xFFFFFFFF
288167598Srrs#define SCTPCTL_INIT_RTO_MAX_DEFAULT	SCTP_RTO_UPPER_BOUND
289167598Srrs
290167598Srrs/* valid_cookie_life: Default cookie lifetime in sec */
291219397Srrs#define SCTPCTL_VALID_COOKIE_LIFE_DESC	"Default cookie lifetime in seconds"
292167598Srrs#define SCTPCTL_VALID_COOKIE_LIFE_MIN	0
293167598Srrs#define SCTPCTL_VALID_COOKIE_LIFE_MAX	0xFFFFFFFF
294167598Srrs#define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT	SCTP_DEFAULT_COOKIE_LIFE
295167598Srrs
296167598Srrs/* init_rtx_max: Default maximum number of retransmission for INIT chunks */
297167598Srrs#define SCTPCTL_INIT_RTX_MAX_DESC	"Default maximum number of retransmission for INIT chunks"
298167598Srrs#define SCTPCTL_INIT_RTX_MAX_MIN	0
299167598Srrs#define SCTPCTL_INIT_RTX_MAX_MAX	0xFFFFFFFF
300167598Srrs#define SCTPCTL_INIT_RTX_MAX_DEFAULT	SCTP_DEF_MAX_INIT
301167598Srrs
302167598Srrs/* assoc_rtx_max: Default maximum number of retransmissions per association */
303167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_DESC	"Default maximum number of retransmissions per association"
304167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_MIN	0
305167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_MAX	0xFFFFFFFF
306167598Srrs#define SCTPCTL_ASSOC_RTX_MAX_DEFAULT	SCTP_DEF_MAX_SEND
307167598Srrs
308167598Srrs/* path_rtx_max: Default maximum of retransmissions per path */
309167598Srrs#define SCTPCTL_PATH_RTX_MAX_DESC	"Default maximum of retransmissions per path"
310167598Srrs#define SCTPCTL_PATH_RTX_MAX_MIN	0
311167598Srrs#define SCTPCTL_PATH_RTX_MAX_MAX	0xFFFFFFFF
312167598Srrs#define SCTPCTL_PATH_RTX_MAX_DEFAULT	SCTP_DEF_MAX_PATH_RTX
313167598Srrs
314224641Stuexen/* path_pf_threshold: threshold for considering the path potentially failed */
315224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_DESC		"Default potentially failed threshold"
316224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_MIN		0
317224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_MAX		0xFFFF
318224641Stuexen#define SCTPCTL_PATH_PF_THRESHOLD_DEFAULT	SCTPCTL_PATH_PF_THRESHOLD_MAX
319224641Stuexen
320219397Srrs/* add_more_on_output: When space-wise is it worthwhile to try to add more to a socket send buffer */
321219397Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC	"When space-wise is it worthwhile to try to add more to a socket send buffer"
322167598Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN	0
323167598Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX	0xFFFFFFFF
324167598Srrs#define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE
325167598Srrs
326252779Stuexen/* incoming_streams: Default number of incoming streams */
327252779Stuexen#define SCTPCTL_INCOMING_STREAMS_DESC	"Default number of incoming streams"
328252779Stuexen#define SCTPCTL_INCOMING_STREAMS_MIN	1
329252779Stuexen#define SCTPCTL_INCOMING_STREAMS_MAX	65535
330252779Stuexen#define SCTPCTL_INCOMING_STREAMS_DEFAULT SCTP_ISTREAM_INITIAL
331252779Stuexen
332167598Srrs/* outgoing_streams: Default number of outgoing streams */
333167598Srrs#define SCTPCTL_OUTGOING_STREAMS_DESC	"Default number of outgoing streams"
334167598Srrs#define SCTPCTL_OUTGOING_STREAMS_MIN	1
335167598Srrs#define SCTPCTL_OUTGOING_STREAMS_MAX	65535
336167598Srrs#define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL
337167598Srrs
338167598Srrs/* cmt_on_off: CMT on/off flag */
339216669Stuexen#define SCTPCTL_CMT_ON_OFF_DESC		"CMT settings"
340221460Stuexen#define SCTPCTL_CMT_ON_OFF_MIN		SCTP_CMT_OFF
341221460Stuexen#define SCTPCTL_CMT_ON_OFF_MAX		SCTP_CMT_MAX
342221460Stuexen#define SCTPCTL_CMT_ON_OFF_DEFAULT	SCTP_CMT_OFF
343167598Srrs
344185694Srrs/* EY - nr_sack_on_off: NR_SACK on/off flag */
345185694Srrs#define SCTPCTL_NR_SACK_ON_OFF_DESC	"NR_SACK on/off flag"
346185694Srrs#define SCTPCTL_NR_SACK_ON_OFF_MIN	0
347185694Srrs#define SCTPCTL_NR_SACK_ON_OFF_MAX	1
348185694Srrs#define SCTPCTL_NR_SACK_ON_OFF_DEFAULT	0
349185694Srrs
350172091Srrs/* cmt_use_dac: CMT DAC on/off flag */
351172091Srrs#define SCTPCTL_CMT_USE_DAC_DESC	"CMT DAC on/off flag"
352172091Srrs#define SCTPCTL_CMT_USE_DAC_MIN		0
353172091Srrs#define SCTPCTL_CMT_USE_DAC_MAX		1
354172091Srrs#define SCTPCTL_CMT_USE_DAC_DEFAULT    	0
355172091Srrs
356167598Srrs/* cwnd_maxburst: Use a CWND adjusting maxburst */
357167598Srrs#define SCTPCTL_CWND_MAXBURST_DESC	"Use a CWND adjusting maxburst"
358167598Srrs#define SCTPCTL_CWND_MAXBURST_MIN	0
359167598Srrs#define SCTPCTL_CWND_MAXBURST_MAX	1
360167598Srrs#define SCTPCTL_CWND_MAXBURST_DEFAULT	1
361167598Srrs
362167598Srrs/* asconf_auth_nochk: Disable SCTP ASCONF AUTH requirement */
363167598Srrs#define SCTPCTL_ASCONF_AUTH_NOCHK_DESC	"Disable SCTP ASCONF AUTH requirement"
364167598Srrs#define SCTPCTL_ASCONF_AUTH_NOCHK_MIN	0
365167598Srrs#define SCTPCTL_ASCONF_AUTH_NOCHK_MAX	1
366167598Srrs#define SCTPCTL_ASCONF_AUTH_NOCHK_DEFAULT	0
367167598Srrs
368167598Srrs/* auth_disable: Disable SCTP AUTH function */
369167598Srrs#define SCTPCTL_AUTH_DISABLE_DESC	"Disable SCTP AUTH function"
370167598Srrs#define SCTPCTL_AUTH_DISABLE_MIN	0
371167598Srrs#define SCTPCTL_AUTH_DISABLE_MAX	1
372167598Srrs#define SCTPCTL_AUTH_DISABLE_DEFAULT	0
373167598Srrs
374167598Srrs/* nat_friendly: SCTP NAT friendly operation */
375167598Srrs#define SCTPCTL_NAT_FRIENDLY_DESC	"SCTP NAT friendly operation"
376167598Srrs#define SCTPCTL_NAT_FRIENDLY_MIN	0
377167598Srrs#define SCTPCTL_NAT_FRIENDLY_MAX	1
378167598Srrs#define SCTPCTL_NAT_FRIENDLY_DEFAULT	1
379167598Srrs
380167598Srrs/* abc_l_var: SCTP ABC max increase per SACK (L) */
381167598Srrs#define SCTPCTL_ABC_L_VAR_DESC		"SCTP ABC max increase per SACK (L)"
382167598Srrs#define SCTPCTL_ABC_L_VAR_MIN		0
383167598Srrs#define SCTPCTL_ABC_L_VAR_MAX		0xFFFFFFFF
384235557Stuexen#define SCTPCTL_ABC_L_VAR_DEFAULT	2
385167598Srrs
386167598Srrs/* max_chained_mbufs: Default max number of small mbufs on a chain */
387167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_DESC	"Default max number of small mbufs on a chain"
388167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_MIN	0
389167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_MAX	0xFFFFFFFF
390167598Srrs#define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT	SCTP_DEFAULT_MBUFS_IN_CHAIN
391167598Srrs
392167598Srrs/* do_sctp_drain: Should SCTP respond to the drain calls */
393167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_DESC	"Should SCTP respond to the drain calls"
394167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_MIN	0
395167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_MAX	1
396167598Srrs#define SCTPCTL_DO_SCTP_DRAIN_DEFAULT	1
397167598Srrs
398167598Srrs/* hb_max_burst: Confirmation Heartbeat max burst? */
399172091Srrs#define SCTPCTL_HB_MAX_BURST_DESC	"Confirmation Heartbeat max burst"
400167598Srrs#define SCTPCTL_HB_MAX_BURST_MIN	1
401167598Srrs#define SCTPCTL_HB_MAX_BURST_MAX	0xFFFFFFFF
402218186Srrs#define SCTPCTL_HB_MAX_BURST_DEFAULT	SCTP_DEF_HBMAX_BURST
403167598Srrs
404167598Srrs/* abort_at_limit: When one-2-one hits qlimit abort */
405167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_DESC	"When one-2-one hits qlimit abort"
406167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_MIN	0
407167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_MAX	1
408167598Srrs#define SCTPCTL_ABORT_AT_LIMIT_DEFAULT	0
409167598Srrs
410167598Srrs/* strict_data_order: Enforce strict data ordering, abort if control inside data */
411167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_DESC	"Enforce strict data ordering, abort if control inside data"
412167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_MIN	0
413167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_MAX	1
414167598Srrs#define SCTPCTL_STRICT_DATA_ORDER_DEFAULT	0
415167598Srrs
416168299Srrs/* min_residual: min residual in a data fragment leftover */
417168124Srrs#define SCTPCTL_MIN_RESIDUAL_DESC	"Minimum residual data chunk in second part of split"
418168124Srrs#define SCTPCTL_MIN_RESIDUAL_MIN	20
419168124Srrs#define SCTPCTL_MIN_RESIDUAL_MAX	65535
420168124Srrs#define SCTPCTL_MIN_RESIDUAL_DEFAULT	1452
421168124Srrs
422168299Srrs/* max_retran_chunk: max chunk retransmissions */
423168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_DESC	"Maximum times an unlucky chunk can be retran'd before assoc abort"
424168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_MIN	0
425168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_MAX	65535
426168299Srrs#define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT	30
427168124Srrs
428170744Srrs/* sctp_logging: This gives us logging when the options are enabled */
429170744Srrs#define SCTPCTL_LOGGING_LEVEL_DESC	"Ltrace/KTR trace logging level"
430170744Srrs#define SCTPCTL_LOGGING_LEVEL_MIN	0
431170814Srrs#define SCTPCTL_LOGGING_LEVEL_MAX	0xffffffff
432170744Srrs#define SCTPCTL_LOGGING_LEVEL_DEFAULT	0
433168124Srrs
434171440Srrs/* JRS - default congestion control module sysctl */
435171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_DESC		"Default congestion control module"
436171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_MIN		0
437171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_MAX		2
438171440Srrs#define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT	0
439171440Srrs
440217760Stuexen/* RS - default stream scheduling module sysctl */
441217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_DESC		"Default stream scheduling module"
442217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_MIN		0
443217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_MAX		5
444217760Stuexen#define SCTPCTL_DEFAULT_SS_MODULE_DEFAULT	0
445217760Stuexen
446171943Srrs/* RRS - default fragment interleave */
447171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC	"Default fragment interleave level"
448171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN	0
449171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX	2
450171943Srrs#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT	1
451171943Srrs
452171990Srrs/* mobility_base: Enable SCTP mobility support */
453171990Srrs#define SCTPCTL_MOBILITY_BASE_DESC	"Enable SCTP base mobility"
454171990Srrs#define SCTPCTL_MOBILITY_BASE_MIN	0
455171990Srrs#define SCTPCTL_MOBILITY_BASE_MAX	1
456171990Srrs#define SCTPCTL_MOBILITY_BASE_DEFAULT	SCTP_DEFAULT_MOBILITY_BASE
457171943Srrs
458171990Srrs/* mobility_fasthandoff: Enable SCTP fast handoff support */
459171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_DESC	"Enable SCTP fast handoff"
460171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_MIN	0
461171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_MAX	1
462171990Srrs#define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT	SCTP_DEFAULT_MOBILITY_FASTHANDOFF
463171990Srrs
464179157Srrs/* Enable SCTP/UDP tunneling port */
465179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_DESC		"Set the SCTP/UDP tunneling port"
466179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_MIN		0
467179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_MAX		65535
468179157Srrs#define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT	SCTP_OVER_UDP_TUNNELING_PORT
469179157Srrs
470179783Srrs/* Enable sending of the SACK-IMMEDIATELY bit */
471179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC	"Enable sending of the SACK-IMMEDIATELY-bit."
472179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN	0
473179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX	1
474179783Srrs#define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT	SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN
475179783Srrs
476212799Stuexen/* Enable sending of the NAT-FRIENDLY message */
477195919Stuexen#define SCTPCTL_NAT_FRIENDLY_INITS_DESC	"Enable sending of the nat-friendly SCTP option on INITs."
478185694Srrs#define SCTPCTL_NAT_FRIENDLY_INITS_MIN	0
479185694Srrs#define SCTPCTL_NAT_FRIENDLY_INITS_MAX	1
480185694Srrs#define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT	SCTPCTL_NAT_FRIENDLY_INITS_MIN
481185694Srrs
482212799Stuexen/* Vtag time wait in seconds */
483212799Stuexen#define SCTPCTL_TIME_WAIT_DESC	"Vtag time wait time in seconds, 0 disables it."
484193090Srrs#define SCTPCTL_TIME_WAIT_MIN	0
485193090Srrs#define SCTPCTL_TIME_WAIT_MAX	0xffffffff
486193090Srrs#define SCTPCTL_TIME_WAIT_DEFAULT	SCTP_TIME_WAIT
487193090Srrs
488212799Stuexen/* Enable Send/Receive buffer splitting */
489212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_DESC		"Enable send/receive buffer splitting."
490212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_MIN		0
491212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_MAX		0x3
492212799Stuexen#define SCTPCTL_BUFFER_SPLITTING_DEFAULT	SCTPCTL_BUFFER_SPLITTING_MIN
493193090Srrs
494212800Stuexen/* Initial congestion window in MTU */
495212851Stuexen#define SCTPCTL_INITIAL_CWND_DESC	"Initial congestion window in MTUs"
496216672Stuexen#define SCTPCTL_INITIAL_CWND_MIN	0
497212800Stuexen#define SCTPCTL_INITIAL_CWND_MAX	0xffffffff
498212800Stuexen#define SCTPCTL_INITIAL_CWND_DEFAULT	3
499212800Stuexen
500219057Srrs/* rttvar smooth avg for bw calc  */
501219397Srrs#define SCTPCTL_RTTVAR_BW_DESC	"Shift amount for bw smoothing on rtt calc"
502219057Srrs#define SCTPCTL_RTTVAR_BW_MIN	0
503219057Srrs#define SCTPCTL_RTTVAR_BW_MAX	32
504219057Srrs#define SCTPCTL_RTTVAR_BW_DEFAULT	4
505219057Srrs
506219057Srrs/* rttvar smooth avg for bw calc  */
507219397Srrs#define SCTPCTL_RTTVAR_RTT_DESC	"Shift amount for rtt smoothing on rtt calc"
508219057Srrs#define SCTPCTL_RTTVAR_RTT_MIN	0
509219057Srrs#define SCTPCTL_RTTVAR_RTT_MAX	32
510219057Srrs#define SCTPCTL_RTTVAR_RTT_DEFAULT	5
511219057Srrs
512219397Srrs#define SCTPCTL_RTTVAR_EQRET_DESC	"What to return when rtt and bw are unchanged"
513219057Srrs#define SCTPCTL_RTTVAR_EQRET_MIN	0
514219057Srrs#define SCTPCTL_RTTVAR_EQRET_MAX	1
515219057Srrs#define SCTPCTL_RTTVAR_EQRET_DEFAULT	0
516219057Srrs
517219397Srrs#define SCTPCTL_RTTVAR_STEADYS_DESC	"How many the sames it takes to try step down of cwnd"
518219397Srrs#define SCTPCTL_RTTVAR_STEADYS_MIN	0
519219397Srrs#define SCTPCTL_RTTVAR_STEADYS_MAX	0xFFFF
520219397Srrs#define SCTPCTL_RTTVAR_STEADYS_DEFAULT	20	/* 0 means disable feature */
521219397Srrs
522219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_DESC	"Enable for RTCC CC datacenter ECN"
523219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_MIN	0
524219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_MAX	1
525219397Srrs#define SCTPCTL_RTTVAR_DCCCECN_DEFAULT	1	/* 0 means disable feature */
526219397Srrs
527229805Stuexen#define SCTPCTL_BLACKHOLE_DESC		"Enable SCTP blackholing"
528229805Stuexen#define SCTPCTL_BLACKHOLE_MIN		0
529229805Stuexen#define SCTPCTL_BLACKHOLE_MAX		2
530229805Stuexen#define SCTPCTL_BLACKHOLE_DEFAULT	SCTPCTL_BLACKHOLE_MIN
531229805Stuexen
532172091Srrs#if defined(SCTP_DEBUG)
533167598Srrs/* debug: Configure debug output */
534167598Srrs#define SCTPCTL_DEBUG_DESC	"Configure debug output"
535167598Srrs#define SCTPCTL_DEBUG_MIN	0
536167598Srrs#define SCTPCTL_DEBUG_MAX	0xFFFFFFFF
537167598Srrs#define SCTPCTL_DEBUG_DEFAULT	0
538167598Srrs#endif
539167598Srrs
540167598Srrs
541237565Stuexen#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
542179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_DESC	"Unlock socket when sending packets down to IP."
543179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_MIN	0
544179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_MAX	1
545179783Srrs#define SCTPCTL_OUTPUT_UNLOCKED_DEFAULT	SCTPCTL_OUTPUT_UNLOCKED_MIN
546172157Srrs#endif
547179157Srrs
548167598Srrs
549180387Srrs#if defined(_KERNEL) || defined(__Userspace__)
550172091Srrs#if defined(SYSCTL_DECL)
551167598SrrsSYSCTL_DECL(_net_inet_sctp);
552167598Srrs#endif
553167598Srrs
554179783Srrsvoid sctp_init_sysctls(void);
555179783Srrs
556167598Srrs#endif				/* _KERNEL */
557167598Srrs#endif				/* __sctp_sysctl_h__ */
558