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