xref: /freebsd/sys/netinet/sctp_sysctl.c (revision bfe691b2f75de2224c7ceb304ebcdef2b42d4179)
1 /*-
2  * Copyright (c) 2007, 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 #include <netinet/sctp_os.h>
35 #include <netinet/sctp_constants.h>
36 #include <netinet/sctp_sysctl.h>
37 #include <netinet/sctp_pcb.h>
38 #include <netinet/sctputil.h>
39 
40 /*
41  * sysctl tunable variables
42  */
43 uint32_t sctp_sendspace = (128 * 1024);
44 uint32_t sctp_recvspace = 128 * (1024 +
45 #ifdef INET6
46     sizeof(struct sockaddr_in6)
47 #else
48     sizeof(struct sockaddr_in)
49 #endif
50 );
51 uint32_t sctp_mbuf_threshold_count = SCTP_DEFAULT_MBUFS_IN_CHAIN;
52 uint32_t sctp_auto_asconf = SCTP_DEFAULT_AUTO_ASCONF;
53 uint32_t sctp_ecn_enable = 1;
54 uint32_t sctp_ecn_nonce = 0;
55 uint32_t sctp_strict_sacks = 0;
56 uint32_t sctp_no_csum_on_loopback = 1;
57 uint32_t sctp_strict_init = 1;
58 uint32_t sctp_abort_if_one_2_one_hits_limit = 0;
59 uint32_t sctp_strict_data_order = 0;
60 
61 uint32_t sctp_peer_chunk_oh = sizeof(struct mbuf);
62 uint32_t sctp_max_burst_default = SCTP_DEF_MAX_BURST;
63 uint32_t sctp_use_cwnd_based_maxburst = 1;
64 uint32_t sctp_do_drain = 1;
65 uint32_t sctp_hb_maxburst = SCTP_DEF_MAX_BURST;
66 
67 uint32_t sctp_max_chunks_on_queue = SCTP_ASOC_MAX_CHUNKS_ON_QUEUE;
68 uint32_t sctp_delayed_sack_time_default = SCTP_RECV_MSEC;
69 uint32_t sctp_sack_freq_default = SCTP_DEFAULT_SACK_FREQ;
70 uint32_t sctp_heartbeat_interval_default = SCTP_HB_DEFAULT_MSEC;
71 uint32_t sctp_pmtu_raise_time_default = SCTP_DEF_PMTU_RAISE_SEC;
72 uint32_t sctp_shutdown_guard_time_default = SCTP_DEF_MAX_SHUTDOWN_SEC;
73 uint32_t sctp_secret_lifetime_default = SCTP_DEFAULT_SECRET_LIFE_SEC;
74 uint32_t sctp_rto_max_default = SCTP_RTO_UPPER_BOUND;
75 uint32_t sctp_rto_min_default = SCTP_RTO_LOWER_BOUND;
76 uint32_t sctp_rto_initial_default = SCTP_RTO_INITIAL;
77 uint32_t sctp_init_rto_max_default = SCTP_RTO_UPPER_BOUND;
78 uint32_t sctp_valid_cookie_life_default = SCTP_DEFAULT_COOKIE_LIFE;
79 uint32_t sctp_init_rtx_max_default = SCTP_DEF_MAX_INIT;
80 uint32_t sctp_assoc_rtx_max_default = SCTP_DEF_MAX_SEND;
81 uint32_t sctp_path_rtx_max_default = SCTP_DEF_MAX_PATH_RTX;
82 uint32_t sctp_nr_outgoing_streams_default = SCTP_OSTREAM_INITIAL;
83 uint32_t sctp_add_more_threshold = SCTP_DEFAULT_ADD_MORE;
84 uint32_t sctp_asoc_free_resc_limit = SCTP_DEF_ASOC_RESC_LIMIT;
85 uint32_t sctp_system_free_resc_limit = SCTP_DEF_SYSTEM_RESC_LIMIT;
86 
87 uint32_t sctp_min_split_point = SCTP_DEFAULT_SPLIT_POINT_MIN;
88 uint32_t sctp_pcbtblsize = SCTP_PCBHASHSIZE;
89 uint32_t sctp_hashtblsize = SCTP_TCBHASHSIZE;
90 uint32_t sctp_chunkscale = SCTP_CHUNKQUEUE_SCALE;
91 
92 uint32_t sctp_cmt_on_off = 0;
93 uint32_t sctp_cmt_use_dac = 0;
94 uint32_t sctp_max_retran_chunk = SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT;
95 
96 
97 uint32_t sctp_L2_abc_variable = 1;
98 uint32_t sctp_early_fr = 0;
99 uint32_t sctp_early_fr_msec = SCTP_MINFR_MSEC_TIMER;
100 uint32_t sctp_says_check_for_deadlock = 0;
101 uint32_t sctp_asconf_auth_nochk = 0;
102 uint32_t sctp_auth_disable = 0;
103 uint32_t sctp_nat_friendly = 1;
104 uint32_t sctp_min_residual = SCTPCTL_MIN_RESIDUAL_DEFAULT;;
105 
106 
107 struct sctpstat sctpstat;
108 
109 #ifdef SCTP_DEBUG
110 uint32_t sctp_debug_on = 0;
111 
112 #endif
113 
114 
115 /*
116  * sysctl functions
117  */
118 static int
119 sctp_assoclist(SYSCTL_HANDLER_ARGS)
120 {
121 	unsigned int number_of_endpoints;
122 	unsigned int number_of_local_addresses;
123 	unsigned int number_of_associations;
124 	unsigned int number_of_remote_addresses;
125 	unsigned int n;
126 	int error;
127 	struct sctp_inpcb *inp;
128 	struct sctp_tcb *stcb;
129 	struct sctp_nets *net;
130 	struct sctp_laddr *laddr;
131 	struct xsctp_inpcb xinpcb;
132 	struct xsctp_tcb xstcb;
133 
134 /*	struct xsctp_laddr xladdr; */
135 	struct xsctp_raddr xraddr;
136 
137 	number_of_endpoints = 0;
138 	number_of_local_addresses = 0;
139 	number_of_associations = 0;
140 	number_of_remote_addresses = 0;
141 
142 	SCTP_INP_INFO_RLOCK();
143 	if (req->oldptr == USER_ADDR_NULL) {
144 		LIST_FOREACH(inp, &sctppcbinfo.listhead, sctp_list) {
145 			SCTP_INP_RLOCK(inp);
146 			number_of_endpoints++;
147 			/* FIXME MT */
148 			LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) {
149 				number_of_local_addresses++;
150 			}
151 			LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
152 				number_of_associations++;
153 				TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
154 					number_of_remote_addresses++;
155 				}
156 			}
157 			SCTP_INP_RUNLOCK(inp);
158 		}
159 		SCTP_INP_INFO_RUNLOCK();
160 		n = (number_of_endpoints + 1) * sizeof(struct xsctp_inpcb) +
161 		    number_of_local_addresses * sizeof(struct xsctp_laddr) +
162 		    number_of_associations * sizeof(struct xsctp_tcb) +
163 		    number_of_remote_addresses * sizeof(struct xsctp_raddr);
164 #ifdef SCTP_DEBUG
165 		printf("inps = %u, stcbs = %u, laddrs = %u, raddrs = %u\n",
166 		    number_of_endpoints, number_of_associations,
167 		    number_of_local_addresses, number_of_remote_addresses);
168 #endif
169 		/* request some more memory than needed */
170 		req->oldidx = (n + n / 8);
171 		return 0;
172 	}
173 	if (req->newptr != USER_ADDR_NULL) {
174 		SCTP_INP_INFO_RUNLOCK();
175 		return EPERM;
176 	}
177 	LIST_FOREACH(inp, &sctppcbinfo.listhead, sctp_list) {
178 		SCTP_INP_RLOCK(inp);
179 		number_of_local_addresses = 0;
180 		number_of_associations = 0;
181 		/*
182 		 * LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr)
183 		 * { number_of_local_addresses++; }
184 		 */
185 		LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
186 			number_of_associations++;
187 		}
188 		xinpcb.last = 0;
189 		xinpcb.local_port = ntohs(inp->sctp_lport);
190 		xinpcb.number_local_addresses = number_of_local_addresses;
191 		xinpcb.number_associations = number_of_associations;
192 		xinpcb.flags = inp->sctp_flags;
193 		xinpcb.features = inp->sctp_features;
194 		xinpcb.total_sends = inp->total_sends;
195 		xinpcb.total_recvs = inp->total_recvs;
196 		xinpcb.total_nospaces = inp->total_nospaces;
197 		SCTP_INP_INCR_REF(inp);
198 		SCTP_INP_RUNLOCK(inp);
199 		SCTP_INP_INFO_RUNLOCK();
200 		error = SYSCTL_OUT(req, &xinpcb, sizeof(struct xsctp_inpcb));
201 		if (error) {
202 			return error;
203 		}
204 		SCTP_INP_INFO_RLOCK();
205 		SCTP_INP_RLOCK(inp);
206 		/* FIXME MT */
207 		/*
208 		 * LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr)
209 		 * { error = SYSCTL_OUT(req, &xladdr, sizeof(struct
210 		 * xsctp_laddr)); if (error) { #if
211 		 * defined(SCTP_PER_SOCKET_LOCKING)
212 		 * SCTP_SOCKET_UNLOCK(SCTP_INP_SO(inp), 1);
213 		 * SCTP_UNLOCK_SHARED(sctppcbinfo.ipi_ep_mtx); #endif
214 		 * SCTP_INP_RUNLOCK(inp); SCTP_INP_INFO_RUNLOCK(); return
215 		 * error; }			}
216 		 */
217 		LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
218 			SCTP_TCB_LOCK(stcb);
219 			atomic_add_int(&stcb->asoc.refcnt, 1);
220 			SCTP_TCB_UNLOCK(stcb);
221 			number_of_local_addresses = 0;
222 			number_of_remote_addresses = 0;
223 			TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
224 				number_of_remote_addresses++;
225 			}
226 			xstcb.LocalPort = ntohs(inp->sctp_lport);
227 			xstcb.RemPort = ntohs(stcb->rport);
228 			if (stcb->asoc.primary_destination != NULL)
229 				xstcb.RemPrimAddr = stcb->asoc.primary_destination->ro._l_addr;
230 			xstcb.HeartBeatInterval = stcb->asoc.heart_beat_delay;
231 			xstcb.State = SCTP_GET_STATE(&stcb->asoc);	/* FIXME */
232 			xstcb.InStreams = stcb->asoc.streamincnt;
233 			xstcb.OutStreams = stcb->asoc.streamoutcnt;
234 			xstcb.MaxRetr = stcb->asoc.overall_error_count;
235 			xstcb.PrimProcess = 0;	/* not really supported yet */
236 			xstcb.T1expireds = stcb->asoc.timoinit + stcb->asoc.timocookie;
237 			xstcb.T2expireds = stcb->asoc.timoshutdown + stcb->asoc.timoshutdownack;
238 			xstcb.RtxChunks = stcb->asoc.marked_retrans;
239 			xstcb.StartTime = stcb->asoc.start_time;
240 			xstcb.DiscontinuityTime = stcb->asoc.discontinuity_time;
241 
242 			xstcb.number_local_addresses = number_of_local_addresses;
243 			xstcb.number_remote_addresses = number_of_remote_addresses;
244 			xstcb.total_sends = stcb->total_sends;
245 			xstcb.total_recvs = stcb->total_recvs;
246 			xstcb.local_tag = stcb->asoc.my_vtag;
247 			xstcb.remote_tag = stcb->asoc.peer_vtag;
248 			xstcb.initial_tsn = stcb->asoc.init_seq_number;
249 			xstcb.highest_tsn = stcb->asoc.sending_seq - 1;
250 			xstcb.cumulative_tsn = stcb->asoc.last_acked_seq;
251 			xstcb.cumulative_tsn_ack = stcb->asoc.cumulative_tsn;
252 			SCTP_INP_RUNLOCK(inp);
253 			SCTP_INP_INFO_RUNLOCK();
254 			error = SYSCTL_OUT(req, &xstcb, sizeof(struct xsctp_tcb));
255 			if (error) {
256 				atomic_add_int(&stcb->asoc.refcnt, -1);
257 				return error;
258 			}
259 			TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
260 				xraddr.RemAddr = net->ro._l_addr;
261 				xraddr.RemAddrActive = ((net->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE);
262 				xraddr.RemAddrConfirmed = ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0);
263 				xraddr.RemAddrHBActive = ((net->dest_state & SCTP_ADDR_NOHB) == 0);
264 				xraddr.RemAddrRTO = net->RTO;
265 				xraddr.RemAddrMaxPathRtx = net->failure_threshold;
266 				xraddr.RemAddrRtx = net->marked_retrans;
267 				xraddr.RemAddrErrorCounter = net->error_count;
268 				xraddr.RemAddrCwnd = net->cwnd;
269 				xraddr.RemAddrFlightSize = net->flight_size;
270 				xraddr.RemAddrStartTime = net->start_time;
271 				error = SYSCTL_OUT(req, &xraddr, sizeof(struct xsctp_raddr));
272 				if (error) {
273 					atomic_add_int(&stcb->asoc.refcnt, -1);
274 					return error;
275 				}
276 			}
277 			atomic_add_int(&stcb->asoc.refcnt, -1);
278 			SCTP_INP_INFO_RLOCK();
279 			SCTP_INP_RLOCK(inp);
280 		}
281 		SCTP_INP_DECR_REF(inp);
282 		SCTP_INP_RUNLOCK(inp);
283 	}
284 	SCTP_INP_INFO_RUNLOCK();
285 
286 	xinpcb.last = 1;
287 	xinpcb.local_port = 0;
288 	xinpcb.number_local_addresses = 0;
289 	xinpcb.number_associations = 0;
290 	xinpcb.flags = 0;
291 	xinpcb.features = 0;
292 	error = SYSCTL_OUT(req, &xinpcb, sizeof(struct xsctp_inpcb));
293 	return error;
294 }
295 
296 
297 /*
298  * sysctl definitions
299  */
300 
301 SYSCTL_INT(_net_inet_sctp, OID_AUTO, sendspace, CTLFLAG_RW,
302     &sctp_sendspace, 0, "Maximum outgoing SCTP buffer size");
303 
304 SYSCTL_INT(_net_inet_sctp, OID_AUTO, recvspace, CTLFLAG_RW,
305     &sctp_recvspace, 0, "Maximum incoming SCTP buffer size");
306 
307 #if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF)
308 SYSCTL_INT(_net_inet_sctp, OID_AUTO, auto_asconf, CTLFLAG_RW,
309     &sctp_auto_asconf, 0, "Enable SCTP Auto-ASCONF");
310 #endif
311 
312 SYSCTL_INT(_net_inet_sctp, OID_AUTO, ecn_enable, CTLFLAG_RW,
313     &sctp_ecn_enable, 0, "Enable SCTP ECN");
314 
315 SYSCTL_INT(_net_inet_sctp, OID_AUTO, ecn_nonce, CTLFLAG_RW,
316     &sctp_ecn_nonce, 0, "Enable SCTP ECN Nonce");
317 
318 SYSCTL_INT(_net_inet_sctp, OID_AUTO, strict_sacks, CTLFLAG_RW,
319     &sctp_strict_sacks, 0, "Enable SCTP Strict SACK checking");
320 
321 SYSCTL_INT(_net_inet_sctp, OID_AUTO, loopback_nocsum, CTLFLAG_RW,
322     &sctp_no_csum_on_loopback, 0,
323     "Enable NO Csum on packets sent on loopback");
324 
325 SYSCTL_INT(_net_inet_sctp, OID_AUTO, strict_init, CTLFLAG_RW,
326     &sctp_strict_init, 0,
327     "Enable strict INIT/INIT-ACK singleton enforcement");
328 
329 SYSCTL_INT(_net_inet_sctp, OID_AUTO, peer_chkoh, CTLFLAG_RW,
330     &sctp_peer_chunk_oh, 0,
331     "Amount to debit peers rwnd per chunk sent");
332 
333 SYSCTL_INT(_net_inet_sctp, OID_AUTO, maxburst, CTLFLAG_RW,
334     &sctp_max_burst_default, 0,
335     "Default max burst for sctp endpoints");
336 
337 SYSCTL_INT(_net_inet_sctp, OID_AUTO, maxchunks, CTLFLAG_RW,
338     &sctp_max_chunks_on_queue, 0,
339     "Default max chunks on queue per asoc");
340 
341 SYSCTL_INT(_net_inet_sctp, OID_AUTO, tcbhashsize, CTLFLAG_RW,
342     &sctp_hashtblsize, 0,
343     "Tuneable for Hash table sizes");
344 
345 SYSCTL_INT(_net_inet_sctp, OID_AUTO, min_split_point, CTLFLAG_RW,
346     &sctp_min_split_point, 0,
347     "Minimum size when splitting a chunk");
348 
349 SYSCTL_INT(_net_inet_sctp, OID_AUTO, pcbhashsize, CTLFLAG_RW,
350     &sctp_pcbtblsize, 0,
351     "Tuneable for PCB Hash table sizes");
352 
353 SYSCTL_INT(_net_inet_sctp, OID_AUTO, sys_resource, CTLFLAG_RW,
354     &sctp_system_free_resc_limit, 0,
355     "Max number of cached resources in the system");
356 
357 SYSCTL_INT(_net_inet_sctp, OID_AUTO, asoc_resource, CTLFLAG_RW,
358     &sctp_asoc_free_resc_limit, 0,
359     "Max number of cached resources in an asoc");
360 
361 SYSCTL_INT(_net_inet_sctp, OID_AUTO, chunkscale, CTLFLAG_RW,
362     &sctp_chunkscale, 0,
363     "Tuneable for Scaling of number of chunks and messages");
364 
365 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, delayed_sack_time, CTLFLAG_RW,
366     &sctp_delayed_sack_time_default, 0,
367     "Default delayed SACK timer in msec");
368 
369 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, sack_freq, CTLFLAG_RW,
370     &sctp_sack_freq_default, 0,
371     "Default SACK frequency");
372 
373 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, heartbeat_interval, CTLFLAG_RW,
374     &sctp_heartbeat_interval_default, 0,
375     "Default heartbeat interval in msec");
376 
377 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, pmtu_raise_time, CTLFLAG_RW,
378     &sctp_pmtu_raise_time_default, 0,
379     "Default PMTU raise timer in sec");
380 
381 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, shutdown_guard_time, CTLFLAG_RW,
382     &sctp_shutdown_guard_time_default, 0,
383     "Default shutdown guard timer in sec");
384 
385 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, secret_lifetime, CTLFLAG_RW,
386     &sctp_secret_lifetime_default, 0,
387     "Default secret lifetime in sec");
388 
389 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, rto_max, CTLFLAG_RW,
390     &sctp_rto_max_default, 0,
391     "Default maximum retransmission timeout in msec");
392 
393 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, rto_min, CTLFLAG_RW,
394     &sctp_rto_min_default, 0,
395     "Default minimum retransmission timeout in msec");
396 
397 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, rto_initial, CTLFLAG_RW,
398     &sctp_rto_initial_default, 0,
399     "Default initial retransmission timeout in msec");
400 
401 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, init_rto_max, CTLFLAG_RW,
402     &sctp_init_rto_max_default, 0,
403     "Default maximum retransmission timeout during association setup in msec");
404 
405 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, valid_cookie_life, CTLFLAG_RW,
406     &sctp_valid_cookie_life_default, 0,
407     "Default cookie lifetime in sec");
408 
409 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, init_rtx_max, CTLFLAG_RW,
410     &sctp_init_rtx_max_default, 0,
411     "Default maximum number of retransmission for INIT chunks");
412 
413 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, assoc_rtx_max, CTLFLAG_RW,
414     &sctp_assoc_rtx_max_default, 0,
415     "Default maximum number of retransmissions per association");
416 
417 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, path_rtx_max, CTLFLAG_RW,
418     &sctp_path_rtx_max_default, 0,
419     "Default maximum of retransmissions per path");
420 
421 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, add_more_on_output, CTLFLAG_RW,
422     &sctp_add_more_threshold, 0,
423     "When space wise is it worthwhile to try to add more to a socket send buffer");
424 
425 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, outgoing_streams, CTLFLAG_RW,
426     &sctp_nr_outgoing_streams_default, 0,
427     "Default number of outgoing streams");
428 
429 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, cmt_on_off, CTLFLAG_RW,
430     &sctp_cmt_on_off, 0,
431     "CMT ON/OFF flag");
432 
433 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, cwnd_maxburst, CTLFLAG_RW,
434     &sctp_use_cwnd_based_maxburst, 0,
435     "Use a CWND adjusting maxburst");
436 
437 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, early_fast_retran, CTLFLAG_RW,
438     &sctp_early_fr, 0,
439     "Early Fast Retransmit with timer");
440 
441 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, deadlock_detect, CTLFLAG_RW,
442     &sctp_says_check_for_deadlock, 0,
443     "SMP Deadlock detection on/off");
444 
445 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, early_fast_retran_msec, CTLFLAG_RW,
446     &sctp_early_fr_msec, 0,
447     "Early Fast Retransmit minimum timer value");
448 
449 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, asconf_auth_nochk, CTLFLAG_RW,
450     &sctp_asconf_auth_nochk, 0,
451     "Disable SCTP ASCONF AUTH requirement");
452 
453 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, auth_disable, CTLFLAG_RW,
454     &sctp_auth_disable, 0,
455     "Disable SCTP AUTH function");
456 
457 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, nat_friendly, CTLFLAG_RW,
458     &sctp_nat_friendly, 0,
459     "SCTP NAT friendly operation");
460 
461 SYSCTL_INT(_net_inet_sctp, OID_AUTO, abc_l_var, CTLFLAG_RW,
462     &sctp_L2_abc_variable, 0,
463     "SCTP ABC max increase per SACK (L)");
464 
465 SYSCTL_INT(_net_inet_sctp, OID_AUTO, max_chained_mbufs, CTLFLAG_RW,
466     &sctp_mbuf_threshold_count, 0,
467     "Default max number of small mbufs on a chain");
468 
469 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, cmt_use_dac, CTLFLAG_RW,
470     &sctp_cmt_use_dac, 0,
471     "CMT DAC ON/OFF flag");
472 
473 SYSCTL_INT(_net_inet_sctp, OID_AUTO, do_sctp_drain, CTLFLAG_RW,
474     &sctp_do_drain, 0,
475     "Should SCTP respond to the drain calls");
476 
477 SYSCTL_INT(_net_inet_sctp, OID_AUTO, hb_max_burst, CTLFLAG_RW,
478     &sctp_hb_maxburst, 0,
479     "Confirmation Heartbeat max burst?");
480 
481 SYSCTL_INT(_net_inet_sctp, OID_AUTO, abort_at_limit, CTLFLAG_RW,
482     &sctp_abort_if_one_2_one_hits_limit, 0,
483     "When one-2-one hits qlimit abort");
484 
485 SYSCTL_INT(_net_inet_sctp, OID_AUTO, strict_data_order, CTLFLAG_RW,
486     &sctp_strict_data_order, 0,
487     "Enforce strict data ordering, abort if control inside data");
488 
489 SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_RW,
490     &sctpstat, sctpstat,
491     "SCTP statistics (struct sctps_stat, netinet/sctp.h");
492 
493 SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_RD,
494     0, 0, sctp_assoclist,
495     "S,xassoc", "List of active SCTP associations");
496 
497 SYSCTL_INT(_net_inet_sctp, OID_AUTO, min_residual, CTLFLAG_RW,
498     &sctp_min_residual, 0,
499     SCTPCTL_MIN_RESIDUAL_DESC);
500 
501 SYSCTL_INT(_net_inet_sctp, OID_AUTO, max_retran_chunk, CTLFLAG_RW,
502     &sctp_max_retran_chunk, 0,
503     SCTPCTL_MAX_RETRAN_CHUNK_DESC);
504 
505 #ifdef SCTP_DEBUG
506 SYSCTL_INT(_net_inet_sctp, OID_AUTO, debug, CTLFLAG_RW,
507     &sctp_debug_on, 0, "Configure debug output");
508 #endif				/* SCTP_DEBUG */
509