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 #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 xinpcb.fragmentation_point = inp->sctp_frag_point; 198 if (inp->sctp_socket != NULL) { 199 sotoxsocket(inp->sctp_socket, &xinpcb.xsocket); 200 } else { 201 bzero(&xinpcb.xsocket, sizeof xinpcb.xsocket); 202 xinpcb.xsocket.xso_protocol = IPPROTO_SCTP; 203 } 204 SCTP_INP_INCR_REF(inp); 205 SCTP_INP_RUNLOCK(inp); 206 SCTP_INP_INFO_RUNLOCK(); 207 error = SYSCTL_OUT(req, &xinpcb, sizeof(struct xsctp_inpcb)); 208 if (error) { 209 return error; 210 } 211 SCTP_INP_INFO_RLOCK(); 212 SCTP_INP_RLOCK(inp); 213 /* FIXME MT */ 214 /* 215 * LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) 216 * { error = SYSCTL_OUT(req, &xladdr, sizeof(struct 217 * xsctp_laddr)); if (error) { #if 218 * defined(SCTP_PER_SOCKET_LOCKING) 219 * SCTP_SOCKET_UNLOCK(SCTP_INP_SO(inp), 1); 220 * SCTP_UNLOCK_SHARED(sctppcbinfo.ipi_ep_mtx); #endif 221 * SCTP_INP_RUNLOCK(inp); SCTP_INP_INFO_RUNLOCK(); return 222 * error; } } 223 */ 224 LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { 225 SCTP_TCB_LOCK(stcb); 226 atomic_add_int(&stcb->asoc.refcnt, 1); 227 SCTP_TCB_UNLOCK(stcb); 228 number_of_local_addresses = 0; 229 number_of_remote_addresses = 0; 230 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { 231 number_of_remote_addresses++; 232 } 233 xstcb.LocalPort = ntohs(inp->sctp_lport); 234 xstcb.RemPort = ntohs(stcb->rport); 235 if (stcb->asoc.primary_destination != NULL) 236 xstcb.RemPrimAddr = stcb->asoc.primary_destination->ro._l_addr; 237 xstcb.HeartBeatInterval = stcb->asoc.heart_beat_delay; 238 xstcb.State = SCTP_GET_STATE(&stcb->asoc); /* FIXME */ 239 xstcb.InStreams = stcb->asoc.streamincnt; 240 xstcb.OutStreams = stcb->asoc.streamoutcnt; 241 xstcb.MaxRetr = stcb->asoc.overall_error_count; 242 xstcb.PrimProcess = 0; /* not really supported yet */ 243 xstcb.T1expireds = stcb->asoc.timoinit + stcb->asoc.timocookie; 244 xstcb.T2expireds = stcb->asoc.timoshutdown + stcb->asoc.timoshutdownack; 245 xstcb.RtxChunks = stcb->asoc.marked_retrans; 246 xstcb.StartTime = stcb->asoc.start_time; 247 xstcb.DiscontinuityTime = stcb->asoc.discontinuity_time; 248 249 xstcb.number_local_addresses = number_of_local_addresses; 250 xstcb.number_remote_addresses = number_of_remote_addresses; 251 xstcb.total_sends = stcb->total_sends; 252 xstcb.total_recvs = stcb->total_recvs; 253 xstcb.local_tag = stcb->asoc.my_vtag; 254 xstcb.remote_tag = stcb->asoc.peer_vtag; 255 xstcb.initial_tsn = stcb->asoc.init_seq_number; 256 xstcb.highest_tsn = stcb->asoc.sending_seq - 1; 257 xstcb.cumulative_tsn = stcb->asoc.last_acked_seq; 258 xstcb.cumulative_tsn_ack = stcb->asoc.cumulative_tsn; 259 xstcb.mtu = stcb->asoc.smallest_mtu; 260 SCTP_INP_RUNLOCK(inp); 261 SCTP_INP_INFO_RUNLOCK(); 262 error = SYSCTL_OUT(req, &xstcb, sizeof(struct xsctp_tcb)); 263 if (error) { 264 atomic_add_int(&stcb->asoc.refcnt, -1); 265 return error; 266 } 267 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { 268 xraddr.RemAddr = net->ro._l_addr; 269 xraddr.RemAddrActive = ((net->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE); 270 xraddr.RemAddrConfirmed = ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0); 271 xraddr.RemAddrHBActive = ((net->dest_state & SCTP_ADDR_NOHB) == 0); 272 xraddr.RemAddrRTO = net->RTO; 273 xraddr.RemAddrMaxPathRtx = net->failure_threshold; 274 xraddr.RemAddrRtx = net->marked_retrans; 275 xraddr.RemAddrErrorCounter = net->error_count; 276 xraddr.RemAddrCwnd = net->cwnd; 277 xraddr.RemAddrFlightSize = net->flight_size; 278 xraddr.RemAddrStartTime = net->start_time; 279 xraddr.RemAddrMTU = net->mtu; 280 error = SYSCTL_OUT(req, &xraddr, sizeof(struct xsctp_raddr)); 281 if (error) { 282 atomic_add_int(&stcb->asoc.refcnt, -1); 283 return error; 284 } 285 } 286 atomic_add_int(&stcb->asoc.refcnt, -1); 287 SCTP_INP_INFO_RLOCK(); 288 SCTP_INP_RLOCK(inp); 289 } 290 SCTP_INP_DECR_REF(inp); 291 SCTP_INP_RUNLOCK(inp); 292 } 293 SCTP_INP_INFO_RUNLOCK(); 294 295 xinpcb.last = 1; 296 xinpcb.local_port = 0; 297 xinpcb.number_local_addresses = 0; 298 xinpcb.number_associations = 0; 299 xinpcb.flags = 0; 300 xinpcb.features = 0; 301 error = SYSCTL_OUT(req, &xinpcb, sizeof(struct xsctp_inpcb)); 302 return error; 303 } 304 305 306 /* 307 * sysctl definitions 308 */ 309 310 SYSCTL_INT(_net_inet_sctp, OID_AUTO, sendspace, CTLFLAG_RW, 311 &sctp_sendspace, 0, "Maximum outgoing SCTP buffer size"); 312 313 SYSCTL_INT(_net_inet_sctp, OID_AUTO, recvspace, CTLFLAG_RW, 314 &sctp_recvspace, 0, "Maximum incoming SCTP buffer size"); 315 316 #if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) 317 SYSCTL_INT(_net_inet_sctp, OID_AUTO, auto_asconf, CTLFLAG_RW, 318 &sctp_auto_asconf, 0, "Enable SCTP Auto-ASCONF"); 319 #endif 320 321 SYSCTL_INT(_net_inet_sctp, OID_AUTO, ecn_enable, CTLFLAG_RW, 322 &sctp_ecn_enable, 0, "Enable SCTP ECN"); 323 324 SYSCTL_INT(_net_inet_sctp, OID_AUTO, ecn_nonce, CTLFLAG_RW, 325 &sctp_ecn_nonce, 0, "Enable SCTP ECN Nonce"); 326 327 SYSCTL_INT(_net_inet_sctp, OID_AUTO, strict_sacks, CTLFLAG_RW, 328 &sctp_strict_sacks, 0, "Enable SCTP Strict SACK checking"); 329 330 SYSCTL_INT(_net_inet_sctp, OID_AUTO, loopback_nocsum, CTLFLAG_RW, 331 &sctp_no_csum_on_loopback, 0, 332 "Enable NO Csum on packets sent on loopback"); 333 334 SYSCTL_INT(_net_inet_sctp, OID_AUTO, strict_init, CTLFLAG_RW, 335 &sctp_strict_init, 0, 336 "Enable strict INIT/INIT-ACK singleton enforcement"); 337 338 SYSCTL_INT(_net_inet_sctp, OID_AUTO, peer_chkoh, CTLFLAG_RW, 339 &sctp_peer_chunk_oh, 0, 340 "Amount to debit peers rwnd per chunk sent"); 341 342 SYSCTL_INT(_net_inet_sctp, OID_AUTO, maxburst, CTLFLAG_RW, 343 &sctp_max_burst_default, 0, 344 "Default max burst for sctp endpoints"); 345 346 SYSCTL_INT(_net_inet_sctp, OID_AUTO, maxchunks, CTLFLAG_RW, 347 &sctp_max_chunks_on_queue, 0, 348 "Default max chunks on queue per asoc"); 349 350 SYSCTL_INT(_net_inet_sctp, OID_AUTO, tcbhashsize, CTLFLAG_RW, 351 &sctp_hashtblsize, 0, 352 "Tuneable for Hash table sizes"); 353 354 SYSCTL_INT(_net_inet_sctp, OID_AUTO, min_split_point, CTLFLAG_RW, 355 &sctp_min_split_point, 0, 356 "Minimum size when splitting a chunk"); 357 358 SYSCTL_INT(_net_inet_sctp, OID_AUTO, pcbhashsize, CTLFLAG_RW, 359 &sctp_pcbtblsize, 0, 360 "Tuneable for PCB Hash table sizes"); 361 362 SYSCTL_INT(_net_inet_sctp, OID_AUTO, sys_resource, CTLFLAG_RW, 363 &sctp_system_free_resc_limit, 0, 364 "Max number of cached resources in the system"); 365 366 SYSCTL_INT(_net_inet_sctp, OID_AUTO, asoc_resource, CTLFLAG_RW, 367 &sctp_asoc_free_resc_limit, 0, 368 "Max number of cached resources in an asoc"); 369 370 SYSCTL_INT(_net_inet_sctp, OID_AUTO, chunkscale, CTLFLAG_RW, 371 &sctp_chunkscale, 0, 372 "Tuneable for Scaling of number of chunks and messages"); 373 374 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, delayed_sack_time, CTLFLAG_RW, 375 &sctp_delayed_sack_time_default, 0, 376 "Default delayed SACK timer in msec"); 377 378 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, sack_freq, CTLFLAG_RW, 379 &sctp_sack_freq_default, 0, 380 "Default SACK frequency"); 381 382 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, heartbeat_interval, CTLFLAG_RW, 383 &sctp_heartbeat_interval_default, 0, 384 "Default heartbeat interval in msec"); 385 386 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, pmtu_raise_time, CTLFLAG_RW, 387 &sctp_pmtu_raise_time_default, 0, 388 "Default PMTU raise timer in sec"); 389 390 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, shutdown_guard_time, CTLFLAG_RW, 391 &sctp_shutdown_guard_time_default, 0, 392 "Default shutdown guard timer in sec"); 393 394 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, secret_lifetime, CTLFLAG_RW, 395 &sctp_secret_lifetime_default, 0, 396 "Default secret lifetime in sec"); 397 398 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, rto_max, CTLFLAG_RW, 399 &sctp_rto_max_default, 0, 400 "Default maximum retransmission timeout in msec"); 401 402 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, rto_min, CTLFLAG_RW, 403 &sctp_rto_min_default, 0, 404 "Default minimum retransmission timeout in msec"); 405 406 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, rto_initial, CTLFLAG_RW, 407 &sctp_rto_initial_default, 0, 408 "Default initial retransmission timeout in msec"); 409 410 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, init_rto_max, CTLFLAG_RW, 411 &sctp_init_rto_max_default, 0, 412 "Default maximum retransmission timeout during association setup in msec"); 413 414 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, valid_cookie_life, CTLFLAG_RW, 415 &sctp_valid_cookie_life_default, 0, 416 "Default cookie lifetime in ticks"); 417 418 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, init_rtx_max, CTLFLAG_RW, 419 &sctp_init_rtx_max_default, 0, 420 "Default maximum number of retransmission for INIT chunks"); 421 422 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, assoc_rtx_max, CTLFLAG_RW, 423 &sctp_assoc_rtx_max_default, 0, 424 "Default maximum number of retransmissions per association"); 425 426 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, path_rtx_max, CTLFLAG_RW, 427 &sctp_path_rtx_max_default, 0, 428 "Default maximum of retransmissions per path"); 429 430 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, add_more_on_output, CTLFLAG_RW, 431 &sctp_add_more_threshold, 0, 432 "When space wise is it worthwhile to try to add more to a socket send buffer"); 433 434 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, outgoing_streams, CTLFLAG_RW, 435 &sctp_nr_outgoing_streams_default, 0, 436 "Default number of outgoing streams"); 437 438 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, cmt_on_off, CTLFLAG_RW, 439 &sctp_cmt_on_off, 0, 440 "CMT ON/OFF flag"); 441 442 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, cwnd_maxburst, CTLFLAG_RW, 443 &sctp_use_cwnd_based_maxburst, 0, 444 "Use a CWND adjusting maxburst"); 445 446 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, early_fast_retran, CTLFLAG_RW, 447 &sctp_early_fr, 0, 448 "Early Fast Retransmit with timer"); 449 450 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, deadlock_detect, CTLFLAG_RW, 451 &sctp_says_check_for_deadlock, 0, 452 "SMP Deadlock detection on/off"); 453 454 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, early_fast_retran_msec, CTLFLAG_RW, 455 &sctp_early_fr_msec, 0, 456 "Early Fast Retransmit minimum timer value"); 457 458 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, asconf_auth_nochk, CTLFLAG_RW, 459 &sctp_asconf_auth_nochk, 0, 460 "Disable SCTP ASCONF AUTH requirement"); 461 462 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, auth_disable, CTLFLAG_RW, 463 &sctp_auth_disable, 0, 464 "Disable SCTP AUTH function"); 465 466 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, nat_friendly, CTLFLAG_RW, 467 &sctp_nat_friendly, 0, 468 "SCTP NAT friendly operation"); 469 470 SYSCTL_INT(_net_inet_sctp, OID_AUTO, abc_l_var, CTLFLAG_RW, 471 &sctp_L2_abc_variable, 0, 472 "SCTP ABC max increase per SACK (L)"); 473 474 SYSCTL_INT(_net_inet_sctp, OID_AUTO, max_chained_mbufs, CTLFLAG_RW, 475 &sctp_mbuf_threshold_count, 0, 476 "Default max number of small mbufs on a chain"); 477 478 SYSCTL_UINT(_net_inet_sctp, OID_AUTO, cmt_use_dac, CTLFLAG_RW, 479 &sctp_cmt_use_dac, 0, 480 "CMT DAC ON/OFF flag"); 481 482 SYSCTL_INT(_net_inet_sctp, OID_AUTO, do_sctp_drain, CTLFLAG_RW, 483 &sctp_do_drain, 0, 484 "Should SCTP respond to the drain calls"); 485 486 SYSCTL_INT(_net_inet_sctp, OID_AUTO, hb_max_burst, CTLFLAG_RW, 487 &sctp_hb_maxburst, 0, 488 "Confirmation Heartbeat max burst?"); 489 490 SYSCTL_INT(_net_inet_sctp, OID_AUTO, abort_at_limit, CTLFLAG_RW, 491 &sctp_abort_if_one_2_one_hits_limit, 0, 492 "When one-2-one hits qlimit abort"); 493 494 SYSCTL_INT(_net_inet_sctp, OID_AUTO, strict_data_order, CTLFLAG_RW, 495 &sctp_strict_data_order, 0, 496 "Enforce strict data ordering, abort if control inside data"); 497 498 SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_RW, 499 &sctpstat, sctpstat, 500 "SCTP statistics (struct sctps_stat, netinet/sctp.h"); 501 502 SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_RD, 503 0, 0, sctp_assoclist, 504 "S,xassoc", "List of active SCTP associations"); 505 506 SYSCTL_INT(_net_inet_sctp, OID_AUTO, min_residual, CTLFLAG_RW, 507 &sctp_min_residual, 0, 508 SCTPCTL_MIN_RESIDUAL_DESC); 509 510 SYSCTL_INT(_net_inet_sctp, OID_AUTO, max_retran_chunk, CTLFLAG_RW, 511 &sctp_max_retran_chunk, 0, 512 SCTPCTL_MAX_RETRAN_CHUNK_DESC); 513 514 #ifdef SCTP_DEBUG 515 SYSCTL_INT(_net_inet_sctp, OID_AUTO, debug, CTLFLAG_RW, 516 &sctp_debug_on, 0, "Configure debug output"); 517 #endif /* SCTP_DEBUG */ 518