xref: /freebsd/sys/netinet/sctp_sysctl.h (revision 282a3889ebf826db9839be296ff1dd903f6d6d6e)
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 /*
41  * limits for the sysctl variables
42  */
43 /* maxdgram: Maximum outgoing SCTP buffer size */
44 #define SCTPCTL_MAXDGRAM		1
45 #define SCTPCTL_MAXDGRAM_DESC		"Maximum outgoing SCTP buffer size"
46 #define SCTPCTL_MAXDGRAM_MIN		0
47 #define SCTPCTL_MAXDGRAM_MAX		0xFFFFFFFF
48 #define SCTPCTL_MAXDGRAM_DEFAULT	262144	/* 256k */
49 
50 /* recvspace: Maximum incoming SCTP buffer size */
51 #define SCTPCTL_RECVSPACE		2
52 #define SCTPCTL_RECVSPACE_DESC		"Maximum incoming SCTP buffer size"
53 #define SCTPCTL_RECVSPACE_MIN		0
54 #define SCTPCTL_RECVSPACE_MAX		0xFFFFFFFF
55 #define SCTPCTL_RECVSPACE_DEFAULT	262144	/* 256k */
56 
57 /* autoasconf: Enable SCTP Auto-ASCONF */
58 #define SCTPCTL_AUTOASCONF		3
59 #define SCTPCTL_AUTOASCONF_DESC		"Enable SCTP Auto-ASCONF"
60 #define SCTPCTL_AUTOASCONF_MIN		0
61 #define SCTPCTL_AUTOASCONF_MAX		1
62 #define SCTPCTL_AUTOASCONF_DEFAULT	SCTP_DEFAULT_AUTO_ASCONF
63 
64 /* ecn_enable: Enable SCTP ECN */
65 #define SCTPCTL_ECN_ENABLE		4
66 #define SCTPCTL_ECN_ENABLE_DESC		"Enable SCTP ECN"
67 #define SCTPCTL_ECN_ENABLE_MIN		0
68 #define SCTPCTL_ECN_ENABLE_MAX		1
69 #define SCTPCTL_ECN_ENABLE_DEFAULT	1
70 
71 /* ecn_nonce: Enable SCTP ECN Nonce */
72 #define SCTPCTL_ECN_NONCE		5
73 #define SCTPCTL_ECN_NONCE_DESC		"Enable SCTP ECN Nonce"
74 #define SCTPCTL_ECN_NONCE_MIN		0
75 #define SCTPCTL_ECN_NONCE_MAX		1
76 #define SCTPCTL_ECN_NONCE_DEFAULT	0
77 
78 /* strict_sacks: Enable SCTP Strict SACK checking */
79 #define SCTPCTL_STRICT_SACKS		6
80 #define SCTPCTL_STRICT_SACKS_DESC	"Enable SCTP Strict SACK checking"
81 #define SCTPCTL_STRICT_SACKS_MIN	0
82 #define SCTPCTL_STRICT_SACKS_MAX	1
83 #define SCTPCTL_STRICT_SACKS_DEFAULT	0
84 
85 /* loopback_nocsum: Enable NO Csum on packets sent on loopback */
86 #define SCTPCTL_LOOPBACK_NOCSUM		7
87 #define SCTPCTL_LOOPBACK_NOCSUM_DESC	"Enable NO Csum on packets sent on loopback"
88 #define SCTPCTL_LOOPBACK_NOCSUM_MIN	0
89 #define SCTPCTL_LOOPBACK_NOCSUM_MAX	1
90 #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT	1
91 
92 /* strict_init: Enable strict INIT/INIT-ACK singleton enforcement */
93 #define SCTPCTL_STRICT_INIT		8
94 #define SCTPCTL_STRICT_INIT_DESC	"Enable strict INIT/INIT-ACK singleton enforcement"
95 #define SCTPCTL_STRICT_INIT_MIN		0
96 #define SCTPCTL_STRICT_INIT_MAX		1
97 #define SCTPCTL_STRICT_INIT_DEFAULT	1
98 
99 /* peer_chkoh: Amount to debit peers rwnd per chunk sent */
100 #define SCTPCTL_PEER_CHKOH		9
101 #define SCTPCTL_PEER_CHKOH_DESC		"Amount to debit peers rwnd per chunk sent"
102 #define SCTPCTL_PEER_CHKOH_MIN		0
103 #define SCTPCTL_PEER_CHKOH_MAX		0xFFFFFFFF
104 #define SCTPCTL_PEER_CHKOH_DEFAULT	256
105 
106 /* maxburst: Default max burst for sctp endpoints */
107 #define SCTPCTL_MAXBURST		10
108 #define SCTPCTL_MAXBURST_DESC		"Default max burst for sctp endpoints"
109 #define SCTPCTL_MAXBURST_MIN		1
110 #define SCTPCTL_MAXBURST_MAX		0xFFFFFFFF
111 #define SCTPCTL_MAXBURST_DEFAULT	SCTP_DEF_MAX_BURST
112 
113 /* maxchunks: Default max chunks on queue per asoc */
114 #define SCTPCTL_MAXCHUNKS		11
115 #define SCTPCTL_MAXCHUNKS_DESC		"Default max chunks on queue per asoc"
116 #define SCTPCTL_MAXCHUNKS_MIN		0
117 #define SCTPCTL_MAXCHUNKS_MAX		0xFFFFFFFF
118 #define SCTPCTL_MAXCHUNKS_DEFAULT	SCTP_ASOC_MAX_CHUNKS_ON_QUEUE
119 
120 /* tcbhashsize: Tuneable for Hash table sizes */
121 #define SCTPCTL_TCBHASHSIZE		12
122 #define SCTPCTL_TCBHASHSIZE_DESC	"Tunable for TCB hash table sizes"
123 #define SCTPCTL_TCBHASHSIZE_MIN		1
124 #define SCTPCTL_TCBHASHSIZE_MAX		0xFFFFFFFF
125 #define SCTPCTL_TCBHASHSIZE_DEFAULT	SCTP_TCBHASHSIZE
126 
127 /* pcbhashsize: Tuneable for PCB Hash table sizes */
128 #define SCTPCTL_PCBHASHSIZE		13
129 #define SCTPCTL_PCBHASHSIZE_DESC	"Tunable for PCB hash table sizes"
130 #define SCTPCTL_PCBHASHSIZE_MIN		1
131 #define SCTPCTL_PCBHASHSIZE_MAX		0xFFFFFFFF
132 #define SCTPCTL_PCBHASHSIZE_DEFAULT	SCTP_PCBHASHSIZE
133 
134 /* min_split_point: Minimum size when splitting a chunk */
135 #define SCTPCTL_MIN_SPLIT_POINT		14
136 #define SCTPCTL_MIN_SPLIT_POINT_DESC	"Minimum size when splitting a chunk"
137 #define SCTPCTL_MIN_SPLIT_POINT_MIN	0
138 #define SCTPCTL_MIN_SPLIT_POINT_MAX	0xFFFFFFFF
139 #define SCTPCTL_MIN_SPLIT_POINT_DEFAULT	SCTP_DEFAULT_SPLIT_POINT_MIN
140 
141 /* chunkscale: Tuneable for Scaling of number of chunks and messages */
142 #define SCTPCTL_CHUNKSCALE		15
143 #define SCTPCTL_CHUNKSCALE_DESC		"Tuneable for Scaling of number of chunks and messages"
144 #define SCTPCTL_CHUNKSCALE_MIN		1
145 #define SCTPCTL_CHUNKSCALE_MAX		0xFFFFFFFF
146 #define SCTPCTL_CHUNKSCALE_DEFAULT	SCTP_CHUNKQUEUE_SCALE
147 
148 /* delayed_sack_time: Default delayed SACK timer in msec */
149 #define SCTPCTL_DELAYED_SACK_TIME	16
150 #define SCTPCTL_DELAYED_SACK_TIME_DESC	"Default delayed SACK timer in msec"
151 #define SCTPCTL_DELAYED_SACK_TIME_MIN	0
152 #define SCTPCTL_DELAYED_SACK_TIME_MAX	0xFFFFFFFF
153 #define SCTPCTL_DELAYED_SACK_TIME_DEFAULT	SCTP_RECV_MSEC
154 
155 /* sack_freq: Default SACK frequency */
156 #define SCTPCTL_SACK_FREQ		17
157 #define SCTPCTL_SACK_FREQ_DESC		"Default SACK frequency"
158 #define SCTPCTL_SACK_FREQ_MIN		0
159 #define SCTPCTL_SACK_FREQ_MAX		0xFFFFFFFF
160 #define SCTPCTL_SACK_FREQ_DEFAULT	SCTP_DEFAULT_SACK_FREQ
161 
162 /* sys_resource: Max number of cached resources in the system */
163 #define SCTPCTL_SYS_RESOURCE		18
164 #define SCTPCTL_SYS_RESOURCE_DESC	"Max number of cached resources in the system"
165 #define SCTPCTL_SYS_RESOURCE_MIN	0
166 #define SCTPCTL_SYS_RESOURCE_MAX	0xFFFFFFFF
167 #define SCTPCTL_SYS_RESOURCE_DEFAULT	SCTP_DEF_SYSTEM_RESC_LIMIT
168 
169 /* asoc_resource: Max number of cached resources in an asoc */
170 #define SCTPCTL_ASOC_RESOURCE		19
171 #define SCTPCTL_ASOC_RESOURCE_DESC	"Max number of cached resources in an asoc"
172 #define SCTPCTL_ASOC_RESOURCE_MIN	0
173 #define SCTPCTL_ASOC_RESOURCE_MAX	0xFFFFFFFF
174 #define SCTPCTL_ASOC_RESOURCE_DEFAULT	SCTP_DEF_ASOC_RESC_LIMIT
175 
176 /* heartbeat_interval: Default heartbeat interval in msec */
177 #define SCTPCTL_HEARTBEAT_INTERVAL	20
178 #define SCTPCTL_HEARTBEAT_INTERVAL_DESC	"Default heartbeat interval in msec"
179 #define SCTPCTL_HEARTBEAT_INTERVAL_MIN	0
180 #define SCTPCTL_HEARTBEAT_INTERVAL_MAX	0xFFFFFFFF
181 #define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT	SCTP_HB_DEFAULT_MSEC
182 
183 /* pmtu_raise_time: Default PMTU raise timer in sec */
184 #define SCTPCTL_PMTU_RAISE_TIME		21
185 #define SCTPCTL_PMTU_RAISE_TIME_DESC	"Default PMTU raise timer in sec"
186 #define SCTPCTL_PMTU_RAISE_TIME_MIN	0
187 #define SCTPCTL_PMTU_RAISE_TIME_MAX	0xFFFFFFFF
188 #define SCTPCTL_PMTU_RAISE_TIME_DEFAULT	SCTP_DEF_PMTU_RAISE_SEC
189 
190 /* shutdown_guard_time: Default shutdown guard timer in sec */
191 #define SCTPCTL_SHUTDOWN_GUARD_TIME		22
192 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC	"Default shutdown guard timer in sec"
193 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN		0
194 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX		0xFFFFFFFF
195 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT	SCTP_DEF_MAX_SHUTDOWN_SEC
196 
197 /* secret_lifetime: Default secret lifetime in sec */
198 #define SCTPCTL_SECRET_LIFETIME		23
199 #define SCTPCTL_SECRET_LIFETIME_DESC	"Default secret lifetime in sec"
200 #define SCTPCTL_SECRET_LIFETIME_MIN	0
201 #define SCTPCTL_SECRET_LIFETIME_MAX	0xFFFFFFFF
202 #define SCTPCTL_SECRET_LIFETIME_DEFAULT	SCTP_DEFAULT_SECRET_LIFE_SEC
203 
204 /* rto_max: Default maximum retransmission timeout in msec */
205 #define SCTPCTL_RTO_MAX			24
206 #define SCTPCTL_RTO_MAX_DESC		"Default maximum retransmission timeout in msec"
207 #define SCTPCTL_RTO_MAX_MIN		0
208 #define SCTPCTL_RTO_MAX_MAX		0xFFFFFFFF
209 #define SCTPCTL_RTO_MAX_DEFAULT		SCTP_RTO_UPPER_BOUND
210 
211 /* rto_min: Default minimum retransmission timeout in msec */
212 #define SCTPCTL_RTO_MIN			25
213 #define SCTPCTL_RTO_MIN_DESC		"Default minimum retransmission timeout in msec"
214 #define SCTPCTL_RTO_MIN_MIN		0
215 #define SCTPCTL_RTO_MIN_MAX		0xFFFFFFFF
216 #define SCTPCTL_RTO_MIN_DEFAULT		SCTP_RTO_LOWER_BOUND
217 
218 /* rto_initial: Default initial retransmission timeout in msec */
219 #define SCTPCTL_RTO_INITIAL		26
220 #define SCTPCTL_RTO_INITIAL_DESC	"Default initial retransmission timeout in msec"
221 #define SCTPCTL_RTO_INITIAL_MIN		0
222 #define SCTPCTL_RTO_INITIAL_MAX		0xFFFFFFFF
223 #define SCTPCTL_RTO_INITIAL_DEFAULT	SCTP_RTO_INITIAL
224 
225 /* init_rto_max: Default maximum retransmission timeout during association setup in msec */
226 #define SCTPCTL_INIT_RTO_MAX		27
227 #define SCTPCTL_INIT_RTO_MAX_DESC	"Default maximum retransmission timeout during association setup in msec"
228 #define SCTPCTL_INIT_RTO_MAX_MIN	0
229 #define SCTPCTL_INIT_RTO_MAX_MAX	0xFFFFFFFF
230 #define SCTPCTL_INIT_RTO_MAX_DEFAULT	SCTP_RTO_UPPER_BOUND
231 
232 /* valid_cookie_life: Default cookie lifetime in sec */
233 #define SCTPCTL_VALID_COOKIE_LIFE	28
234 #define SCTPCTL_VALID_COOKIE_LIFE_DESC	"Default cookie lifetime in sec"
235 #define SCTPCTL_VALID_COOKIE_LIFE_MIN	0
236 #define SCTPCTL_VALID_COOKIE_LIFE_MAX	0xFFFFFFFF
237 #define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT	SCTP_DEFAULT_COOKIE_LIFE
238 
239 /* init_rtx_max: Default maximum number of retransmission for INIT chunks */
240 #define SCTPCTL_INIT_RTX_MAX		29
241 #define SCTPCTL_INIT_RTX_MAX_DESC	"Default maximum number of retransmission for INIT chunks"
242 #define SCTPCTL_INIT_RTX_MAX_MIN	0
243 #define SCTPCTL_INIT_RTX_MAX_MAX	0xFFFFFFFF
244 #define SCTPCTL_INIT_RTX_MAX_DEFAULT	SCTP_DEF_MAX_INIT
245 
246 /* assoc_rtx_max: Default maximum number of retransmissions per association */
247 #define SCTPCTL_ASSOC_RTX_MAX		30
248 #define SCTPCTL_ASSOC_RTX_MAX_DESC	"Default maximum number of retransmissions per association"
249 #define SCTPCTL_ASSOC_RTX_MAX_MIN	0
250 #define SCTPCTL_ASSOC_RTX_MAX_MAX	0xFFFFFFFF
251 #define SCTPCTL_ASSOC_RTX_MAX_DEFAULT	SCTP_DEF_MAX_SEND
252 
253 /* path_rtx_max: Default maximum of retransmissions per path */
254 #define SCTPCTL_PATH_RTX_MAX		31
255 #define SCTPCTL_PATH_RTX_MAX_DESC	"Default maximum of retransmissions per path"
256 #define SCTPCTL_PATH_RTX_MAX_MIN	0
257 #define SCTPCTL_PATH_RTX_MAX_MAX	0xFFFFFFFF
258 #define SCTPCTL_PATH_RTX_MAX_DEFAULT	SCTP_DEF_MAX_PATH_RTX
259 
260 /* add_more_on_output: When space wise is it worthwhile to try to add more to a socket send buffer */
261 #define SCTPCTL_ADD_MORE_ON_OUTPUT	32
262 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC	"When space wise is it worthwhile to try to add more to a socket send buffer"
263 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN	0
264 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX	0xFFFFFFFF
265 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE
266 
267 /* outgoing_streams: Default number of outgoing streams */
268 #define SCTPCTL_OUTGOING_STREAMS	33
269 #define SCTPCTL_OUTGOING_STREAMS_DESC	"Default number of outgoing streams"
270 #define SCTPCTL_OUTGOING_STREAMS_MIN	1
271 #define SCTPCTL_OUTGOING_STREAMS_MAX	65535
272 #define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL
273 
274 /* cmt_on_off: CMT on/off flag */
275 #define SCTPCTL_CMT_ON_OFF		34
276 #define SCTPCTL_CMT_ON_OFF_DESC		"CMT on/off flag"
277 #define SCTPCTL_CMT_ON_OFF_MIN		0
278 #define SCTPCTL_CMT_ON_OFF_MAX		1
279 #define SCTPCTL_CMT_ON_OFF_DEFAULT	0
280 
281 /* cwnd_maxburst: Use a CWND adjusting maxburst */
282 #define SCTPCTL_CWND_MAXBURST		35
283 #define SCTPCTL_CWND_MAXBURST_DESC	"Use a CWND adjusting maxburst"
284 #define SCTPCTL_CWND_MAXBURST_MIN	0
285 #define SCTPCTL_CWND_MAXBURST_MAX	1
286 #define SCTPCTL_CWND_MAXBURST_DEFAULT	1
287 
288 /* early_fast_retran: Early Fast Retransmit with timer */
289 #define SCTPCTL_EARLY_FAST_RETRAN	36
290 #define SCTPCTL_EARLY_FAST_RETRAN_DESC	"Early Fast Retransmit with timer"
291 #define SCTPCTL_EARLY_FAST_RETRAN_MIN	0
292 #define SCTPCTL_EARLY_FAST_RETRAN_MAX	0xFFFFFFFF
293 #define SCTPCTL_EARLY_FAST_RETRAN_DEFAULT	0
294 
295 /* deadlock_detect: SMP Deadlock detection on/off */
296 #define SCTPCTL_DEADLOCK_DETECT		37
297 #define SCTPCTL_DEADLOCK_DETECT_DESC	"SMP Deadlock detection on/off"
298 #define SCTPCTL_DEADLOCK_DETECT_MIN	0
299 #define SCTPCTL_DEADLOCK_DETECT_MAX	1
300 #define SCTPCTL_DEADLOCK_DETECT_DEFAULT	0
301 
302 /* early_fast_retran_msec: Early Fast Retransmit minimum timer value */
303 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC		38
304 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_DESC	"Early Fast Retransmit minimum timer value"
305 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_MIN	0
306 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_MAX	0xFFFFFFFF
307 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_DEFAULT	SCTP_MINFR_MSEC_TIMER
308 
309 /* asconf_auth_nochk: Disable SCTP ASCONF AUTH requirement */
310 #define SCTPCTL_ASCONF_AUTH_NOCHK	39
311 #define SCTPCTL_ASCONF_AUTH_NOCHK_DESC	"Disable SCTP ASCONF AUTH requirement"
312 #define SCTPCTL_ASCONF_AUTH_NOCHK_MIN	0
313 #define SCTPCTL_ASCONF_AUTH_NOCHK_MAX	1
314 #define SCTPCTL_ASCONF_AUTH_NOCHK_DEFAULT	0
315 
316 /* auth_disable: Disable SCTP AUTH function */
317 #define SCTPCTL_AUTH_DISABLE		40
318 #define SCTPCTL_AUTH_DISABLE_DESC	"Disable SCTP AUTH function"
319 #define SCTPCTL_AUTH_DISABLE_MIN	0
320 #define SCTPCTL_AUTH_DISABLE_MAX	1
321 #define SCTPCTL_AUTH_DISABLE_DEFAULT	0
322 
323 /* nat_friendly: SCTP NAT friendly operation */
324 #define SCTPCTL_NAT_FRIENDLY		41
325 #define SCTPCTL_NAT_FRIENDLY_DESC	"SCTP NAT friendly operation"
326 #define SCTPCTL_NAT_FRIENDLY_MIN	0
327 #define SCTPCTL_NAT_FRIENDLY_MAX	1
328 #define SCTPCTL_NAT_FRIENDLY_DEFAULT	1
329 
330 
331 
332 /* abc_l_var: SCTP ABC max increase per SACK (L) */
333 #define SCTPCTL_ABC_L_VAR		42
334 #define SCTPCTL_ABC_L_VAR_DESC		"SCTP ABC max increase per SACK (L)"
335 #define SCTPCTL_ABC_L_VAR_MIN		0
336 #define SCTPCTL_ABC_L_VAR_MAX		0xFFFFFFFF
337 #define SCTPCTL_ABC_L_VAR_DEFAULT	1
338 
339 /* max_chained_mbufs: Default max number of small mbufs on a chain */
340 #define SCTPCTL_MAX_CHAINED_MBUFS	43
341 #define SCTPCTL_MAX_CHAINED_MBUFS_DESC	"Default max number of small mbufs on a chain"
342 #define SCTPCTL_MAX_CHAINED_MBUFS_MIN	0
343 #define SCTPCTL_MAX_CHAINED_MBUFS_MAX	0xFFFFFFFF
344 #define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT	SCTP_DEFAULT_MBUFS_IN_CHAIN
345 
346 /* cmt_use_dac: CMT DAC on/off flag */
347 #define SCTPCTL_CMT_USE_DAC		44
348 #define SCTPCTL_CMT_USE_DAC_DESC	"CMT DAC on/off flag"
349 #define SCTPCTL_CMT_USE_DAC_MIN		0
350 #define SCTPCTL_CMT_USE_DAC_MAX		1
351 #define SCTPCTL_CMT_USE_DAC_DEFAULT    	0
352 
353 /* do_sctp_drain: Should SCTP respond to the drain calls */
354 #define SCTPCTL_DO_SCTP_DRAIN		45
355 #define SCTPCTL_DO_SCTP_DRAIN_DESC	"Should SCTP respond to the drain calls"
356 #define SCTPCTL_DO_SCTP_DRAIN_MIN	0
357 #define SCTPCTL_DO_SCTP_DRAIN_MAX	1
358 #define SCTPCTL_DO_SCTP_DRAIN_DEFAULT	1
359 
360 /* hb_max_burst: Confirmation Heartbeat max burst? */
361 #define SCTPCTL_HB_MAX_BURST		46
362 #define SCTPCTL_HB_MAX_BURST_DESC	"Confirmation Heartbeat max burst?"
363 #define SCTPCTL_HB_MAX_BURST_MIN	1
364 #define SCTPCTL_HB_MAX_BURST_MAX	0xFFFFFFFF
365 #define SCTPCTL_HB_MAX_BURST_DEFAULT	SCTP_DEF_MAX_BURST
366 
367 /* abort_at_limit: When one-2-one hits qlimit abort */
368 #define SCTPCTL_ABORT_AT_LIMIT		47
369 #define SCTPCTL_ABORT_AT_LIMIT_DESC	"When one-2-one hits qlimit abort"
370 #define SCTPCTL_ABORT_AT_LIMIT_MIN	0
371 #define SCTPCTL_ABORT_AT_LIMIT_MAX	1
372 #define SCTPCTL_ABORT_AT_LIMIT_DEFAULT	0
373 
374 /* strict_data_order: Enforce strict data ordering, abort if control inside data */
375 #define SCTPCTL_STRICT_DATA_ORDER	48
376 #define SCTPCTL_STRICT_DATA_ORDER_DESC	"Enforce strict data ordering, abort if control inside data"
377 #define SCTPCTL_STRICT_DATA_ORDER_MIN	0
378 #define SCTPCTL_STRICT_DATA_ORDER_MAX	1
379 #define SCTPCTL_STRICT_DATA_ORDER_DEFAULT	0
380 
381 /* min_residual: min residual in a data fragment leftover */
382 #define SCTPCTL_MIN_REDIDUAL		49
383 #define SCTPCTL_MIN_RESIDUAL_DESC	"Minimum residual data chunk in second part of split"
384 #define SCTPCTL_MIN_RESIDUAL_MIN	20
385 #define SCTPCTL_MIN_RESIDUAL_MAX	65535
386 #define SCTPCTL_MIN_RESIDUAL_DEFAULT	1452
387 
388 /* max_retran_chunk: max chunk retransmissions */
389 #define SCTPCTL_MAX_RETRAN_CHUNK	50
390 #define SCTPCTL_MAX_RETRAN_CHUNK_DESC	"Maximum times an unlucky chunk can be retran'd before assoc abort"
391 #define SCTPCTL_MAX_RETRAN_CHUNK_MIN	0
392 #define SCTPCTL_MAX_RETRAN_CHUNK_MAX	65535
393 #define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT	30
394 
395 /* sctp_logging: This gives us logging when the options are enabled */
396 #define SCTPCTL_LOGGING_LEVEL		51
397 #define SCTPCTL_LOGGING_LEVEL_DESC	"Ltrace/KTR trace logging level"
398 #define SCTPCTL_LOGGING_LEVEL_MIN	0
399 #define SCTPCTL_LOGGING_LEVEL_MAX	0xffffffff
400 #define SCTPCTL_LOGGING_LEVEL_DEFAULT	0
401 
402 /* JRS 5/2107 - CMT PF type flag */
403 #define SCTPCTL_CMT_PF			52
404 #define SCTPCTL_CMT_PF_DESC		"CMT PF type flag"
405 #define SCTPCTL_CMT_PF_MIN		0
406 #define SCTPCTL_CMT_PF_MAX		2
407 #define SCTPCTL_CMT_PF_DEFAULT		0
408 
409 /* JRS - default congestion control module sysctl */
410 #define SCTPCTL_DEFAULT_CC_MODULE		53
411 #define SCTPCTL_DEFAULT_CC_MODULE_DESC		"Default congestion control module"
412 #define SCTPCTL_DEFAULT_CC_MODULE_MIN		0
413 #define SCTPCTL_DEFAULT_CC_MODULE_MAX		2
414 #define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT	0
415 
416 #ifdef SCTP_DEBUG
417 /* debug: Configure debug output */
418 #define SCTPCTL_DEBUG		54
419 #define SCTPCTL_DEBUG_DESC	"Configure debug output"
420 #define SCTPCTL_DEBUG_MIN	0
421 #define SCTPCTL_DEBUG_MAX	0xFFFFFFFF
422 #define SCTPCTL_DEBUG_DEFAULT	0
423 
424 
425 #define SCTPCTL_MAXID		    54
426 #else
427 #define SCTPCTL_MAXID		    55
428 #endif
429 
430 /*
431  * Names for SCTP sysctl objects variables.
432  * Must match the OIDs above.
433  */
434 #ifdef SCTP_DEBUG
435 #define SCTPCTL_NAMES { \
436 	{ 0, 0 }, \
437 	{ "sendspace", CTLTYPE_INT }, \
438 	{ "recvspace", CTLTYPE_INT }, \
439 	{ "autoasconf", CTLTYPE_INT }, \
440 	{ "ecn_enable", CTLTYPE_INT }, \
441 	{ "ecn_nonce", CTLTYPE_INT }, \
442 	{ "strict_sack", CTLTYPE_INT }, \
443 	{ "looback_nocsum", CTLTYPE_INT }, \
444 	{ "strict_init", CTLTYPE_INT }, \
445 	{ "peer_chkoh", CTLTYPE_INT }, \
446 	{ "maxburst", CTLTYPE_INT }, \
447 	{ "maxchunks", CTLTYPE_INT }, \
448 	{ "delayed_sack_time", CTLTYPE_INT }, \
449 	{ "sack_freq", CTLTYPE_INT }, \
450 	{ "heartbeat_interval", CTLTYPE_INT }, \
451 	{ "pmtu_raise_time", CTLTYPE_INT }, \
452 	{ "shutdown_guard_time", CTLTYPE_INT }, \
453 	{ "secret_lifetime", CTLTYPE_INT }, \
454 	{ "rto_max", CTLTYPE_INT }, \
455 	{ "rto_min", CTLTYPE_INT }, \
456 	{ "rto_initial", CTLTYPE_INT }, \
457 	{ "init_rto_max", CTLTYPE_INT }, \
458 	{ "valid_cookie_life", CTLTYPE_INT }, \
459 	{ "init_rtx_max", CTLTYPE_INT }, \
460 	{ "assoc_rtx_max", CTLTYPE_INT }, \
461 	{ "path_rtx_max", CTLTYPE_INT }, \
462 	{ "outgoing_streams", CTLTYPE_INT }, \
463 	{ "cmt_on_off", CTLTYPE_INT }, \
464 	{ "cmt_on_pf", CTLTYPE_INT }, \
465 	{ "default_cc_module", CTLTYPE_INT }, \
466 	{ "cwnd_maxburst", CTLTYPE_INT }, \
467 	{ "early_fast_retran", CTLTYPE_INT }, \
468 	{ "deadlock_detect", CTLTYPE_INT }, \
469 	{ "early_fast_retran_msec", CTLTYPE_INT }, \
470 	{ "asconf_auth_nochk", CTLTYPE_INT }, \
471 	{ "auth_disable", CTLTYPE_INT }, \
472 	{ "nat_friendly", CTLTYPE_INT }, \
473 	{ "abc_l_var", CTLTYPE_INT }, \
474 	{ "max_mbuf_chain", CTLTYPE_INT }, \
475 	{ "cmt_use_dac", CTLTYPE_INT }, \
476 	{ "do_sctp_drain", CTLTYPE_INT }, \
477 	{ "warm_crc_table", CTLTYPE_INT }, \
478 	{ "abort_at_limit", CTLTYPE_INT }, \
479 	{ "strict_data_order", CTLTYPE_INT }, \
480 	{ "tcbhashsize", CTLTYPE_INT }, \
481 	{ "pcbhashsize", CTLTYPE_INT }, \
482 	{ "chunkscale", CTLTYPE_INT }, \
483 	{ "min_split_point", CTLTYPE_INT }, \
484 	{ "add_more_on_output", CTLTYPE_INT }, \
485 	{ "sys_resource", CTLTYPE_INT }, \
486 	{ "asoc_resource", CTLTYPE_INT }, \
487 	{ "min_residual", CTLTYPE_INT }, \
488 	{ "max_retran_chunk", CTLTYPE_INT }, \
489 	{ "sctp_logging", CTLTYPE_INT }, \
490 	{ "debug", CTLTYPE_INT }, \
491 }
492 #else
493 #define SCTPCTL_NAMES { \
494 	{ 0, 0 }, \
495 	{ "sendspace", CTLTYPE_INT }, \
496 	{ "recvspace", CTLTYPE_INT }, \
497 	{ "autoasconf", CTLTYPE_INT }, \
498 	{ "ecn_enable", CTLTYPE_INT }, \
499 	{ "ecn_nonce", CTLTYPE_INT }, \
500 	{ "strict_sack", CTLTYPE_INT }, \
501 	{ "looback_nocsum", CTLTYPE_INT }, \
502 	{ "strict_init", CTLTYPE_INT }, \
503 	{ "peer_chkoh", CTLTYPE_INT }, \
504 	{ "maxburst", CTLTYPE_INT }, \
505 	{ "maxchunks", CTLTYPE_INT }, \
506 	{ "delayed_sack_time", CTLTYPE_INT }, \
507 	{ "sack_freq", CTLTYPE_INT }, \
508 	{ "heartbeat_interval", CTLTYPE_INT }, \
509 	{ "pmtu_raise_time", CTLTYPE_INT }, \
510 	{ "shutdown_guard_time", CTLTYPE_INT }, \
511 	{ "secret_lifetime", CTLTYPE_INT }, \
512 	{ "rto_max", CTLTYPE_INT }, \
513 	{ "rto_min", CTLTYPE_INT }, \
514 	{ "rto_initial", CTLTYPE_INT }, \
515 	{ "init_rto_max", CTLTYPE_INT }, \
516 	{ "valid_cookie_life", CTLTYPE_INT }, \
517 	{ "init_rtx_max", CTLTYPE_INT }, \
518 	{ "assoc_rtx_max", CTLTYPE_INT }, \
519 	{ "path_rtx_max", CTLTYPE_INT }, \
520 	{ "outgoing_streams", CTLTYPE_INT }, \
521 	{ "cmt_on_off", CTLTYPE_INT }, \
522 	{ "cmt_on_pf", CTLTYPE_INT }, \
523 	{ "default_cc_module", CTLTYPE_INT }, \
524 	{ "cwnd_maxburst", CTLTYPE_INT }, \
525 	{ "early_fast_retran", CTLTYPE_INT }, \
526 	{ "deadlock_detect", CTLTYPE_INT }, \
527 	{ "early_fast_retran_msec", CTLTYPE_INT }, \
528 	{ "asconf_auth_nochk", CTLTYPE_INT }, \
529 	{ "auth_disable", CTLTYPE_INT }, \
530 	{ "nat_friendly", CTLTYPE_INT }, \
531 	{ "abc_l_var", CTLTYPE_INT }, \
532 	{ "max_mbuf_chain", CTLTYPE_INT }, \
533 	{ "cmt_use_dac", CTLTYPE_INT }, \
534 	{ "do_sctp_drain", CTLTYPE_INT }, \
535 	{ "warm_crc_table", CTLTYPE_INT }, \
536 	{ "abort_at_limit", CTLTYPE_INT }, \
537 	{ "strict_data_order", CTLTYPE_INT }, \
538 	{ "tcbhashsize", CTLTYPE_INT }, \
539 	{ "pcbhashsize", CTLTYPE_INT }, \
540 	{ "chunkscale", CTLTYPE_INT }, \
541 	{ "min_split_point", CTLTYPE_INT }, \
542 	{ "add_more_on_output", CTLTYPE_INT }, \
543 	{ "sys_resource", CTLTYPE_INT }, \
544 	{ "asoc_resource", CTLTYPE_INT }, \
545 	{ "min_residual", CTLTYPE_INT }, \
546 	{ "max_retran_chunk", CTLTYPE_INT }, \
547 	{ "sctp_logging", CTLTYPE_INT }, \
548 }
549 #endif
550 
551 
552 #if defined(_KERNEL)
553 
554 /*
555  * variable definitions
556  */
557 extern uint32_t sctp_sendspace;
558 extern uint32_t sctp_recvspace;
559 extern uint32_t sctp_auto_asconf;
560 extern uint32_t sctp_ecn_enable;
561 extern uint32_t sctp_ecn_nonce;
562 extern uint32_t sctp_strict_sacks;
563 extern uint32_t sctp_no_csum_on_loopback;
564 extern uint32_t sctp_strict_init;
565 extern uint32_t sctp_peer_chunk_oh;
566 extern uint32_t sctp_max_burst_default;
567 extern uint32_t sctp_max_chunks_on_queue;
568 extern uint32_t sctp_hashtblsize;
569 extern uint32_t sctp_pcbtblsize;
570 extern uint32_t sctp_min_split_point;
571 extern uint32_t sctp_chunkscale;
572 extern uint32_t sctp_delayed_sack_time_default;
573 extern uint32_t sctp_sack_freq_default;
574 extern uint32_t sctp_system_free_resc_limit;
575 extern uint32_t sctp_asoc_free_resc_limit;
576 extern uint32_t sctp_heartbeat_interval_default;
577 extern uint32_t sctp_pmtu_raise_time_default;
578 extern uint32_t sctp_shutdown_guard_time_default;
579 extern uint32_t sctp_secret_lifetime_default;
580 extern uint32_t sctp_rto_max_default;
581 extern uint32_t sctp_rto_min_default;
582 extern uint32_t sctp_rto_initial_default;
583 extern uint32_t sctp_init_rto_max_default;
584 extern uint32_t sctp_valid_cookie_life_default;
585 extern uint32_t sctp_init_rtx_max_default;
586 extern uint32_t sctp_assoc_rtx_max_default;
587 extern uint32_t sctp_path_rtx_max_default;
588 extern uint32_t sctp_add_more_threshold;
589 extern uint32_t sctp_nr_outgoing_streams_default;
590 extern uint32_t sctp_cmt_on_off;
591 
592 /* JRS 5/21/07 - CMT PF type flag variables  */
593 extern uint32_t sctp_cmt_pf;
594 
595 /* JRS - Variable for the default congestion control module */
596 extern uint32_t sctp_default_cc_module;
597 extern uint32_t sctp_use_cwnd_based_maxburst;
598 extern uint32_t sctp_early_fr;
599 extern uint32_t sctp_use_rttvar_cc;
600 extern uint32_t sctp_says_check_for_deadlock;
601 extern uint32_t sctp_early_fr_msec;
602 extern uint32_t sctp_asconf_auth_nochk;
603 extern uint32_t sctp_auth_disable;
604 extern uint32_t sctp_nat_friendly;
605 extern uint32_t sctp_L2_abc_variable;
606 extern uint32_t sctp_mbuf_threshold_count;
607 extern uint32_t sctp_cmt_use_dac;
608 extern uint32_t sctp_do_drain;
609 extern uint32_t sctp_hb_maxburst;
610 extern uint32_t sctp_abort_if_one_2_one_hits_limit;
611 extern uint32_t sctp_strict_data_order;
612 extern uint32_t sctp_min_residual;
613 extern uint32_t sctp_max_retran_chunk;
614 extern uint32_t sctp_logging_level;
615 
616 #if defined(SCTP_DEBUG)
617 extern uint32_t sctp_debug_on;
618 
619 #endif
620 
621 extern struct sctpstat sctpstat;
622 
623 
624 #ifdef SYSCTL_DECL
625 SYSCTL_DECL(_net_inet_sctp);
626 #endif
627 
628 #endif				/* _KERNEL */
629 #endif				/* __sctp_sysctl_h__ */
630