1d8b5fd91SRandall Stewart.\" Copyright (c) 2006, Randall Stewart. 2d8b5fd91SRandall Stewart.\" 3d8b5fd91SRandall Stewart.\" Redistribution and use in source and binary forms, with or without 4d8b5fd91SRandall Stewart.\" modification, are permitted provided that the following conditions 5d8b5fd91SRandall Stewart.\" are met: 6d8b5fd91SRandall Stewart.\" 1. Redistributions of source code must retain the above copyright 7d8b5fd91SRandall Stewart.\" notice, this list of conditions and the following disclaimer. 8d8b5fd91SRandall Stewart.\" 2. Redistributions in binary form must reproduce the above copyright 9d8b5fd91SRandall Stewart.\" notice, this list of conditions and the following disclaimer in the 10d8b5fd91SRandall Stewart.\" documentation and/or other materials provided with the distribution. 11dda5b397SEitan Adler.\" 3. Neither the name of the University nor the names of its contributors 12d8b5fd91SRandall Stewart.\" may be used to endorse or promote products derived from this software 13d8b5fd91SRandall Stewart.\" without specific prior written permission. 14d8b5fd91SRandall Stewart.\" 15d8b5fd91SRandall Stewart.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 16d8b5fd91SRandall Stewart.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17d8b5fd91SRandall Stewart.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18d8b5fd91SRandall Stewart.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 19d8b5fd91SRandall Stewart.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20d8b5fd91SRandall Stewart.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21d8b5fd91SRandall Stewart.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22d8b5fd91SRandall Stewart.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23d8b5fd91SRandall Stewart.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24d8b5fd91SRandall Stewart.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25d8b5fd91SRandall Stewart.\" SUCH DAMAGE. 26d8b5fd91SRandall Stewart.\" 27d8b5fd91SRandall Stewart.\" $FreeBSD$ 28d8b5fd91SRandall Stewart.\" 29*95033af9SMark Johnston.Dd June 18, 2020 30d8b5fd91SRandall Stewart.Dt SCTP 4 31d8b5fd91SRandall Stewart.Os 32d8b5fd91SRandall Stewart.Sh NAME 33d8b5fd91SRandall Stewart.Nm sctp 34ab0274e4SChristian Brueffer.Nd Internet Stream Control Transmission Protocol 35d8b5fd91SRandall Stewart.Sh SYNOPSIS 36*95033af9SMark Johnston.Cd "options SCTP" 37*95033af9SMark Johnston.Cd "options SCTP_SUPPORT" 38*95033af9SMark Johnston.Pp 39d8b5fd91SRandall Stewart.In sys/types.h 40d8b5fd91SRandall Stewart.In sys/socket.h 417c376800SRandall Stewart.In netinet/sctp.h 42d8b5fd91SRandall Stewart.Ft int 43d8b5fd91SRandall Stewart.Fn socket AF_INET SOCK_STREAM IPPROTO_SCTP 44d8b5fd91SRandall Stewart.Ft int 45d8b5fd91SRandall Stewart.Fn socket AF_INET SOCK_SEQPACKET IPPROTO_SCTP 46d8b5fd91SRandall Stewart.Sh DESCRIPTION 47d8b5fd91SRandall StewartThe 48d8b5fd91SRandall Stewart.Tn SCTP 49d8b5fd91SRandall Stewartprotocol provides reliable, flow-controlled, two-way 50d8b5fd91SRandall Stewarttransmission of data. 51d8b5fd91SRandall StewartIt is a message oriented protocol and can 52d8b5fd91SRandall Stewartsupport the 53d8b5fd91SRandall Stewart.Dv SOCK_STREAM 54d8b5fd91SRandall Stewartand 55d8b5fd91SRandall Stewart.Dv SOCK_SEQPACKET 56d8b5fd91SRandall Stewartabstractions. 57d8b5fd91SRandall Stewart.Tn SCTP 58d8b5fd91SRandall Stewartuses the standard 59d8b5fd91SRandall StewartInternet address format and, in addition, provides a per-host 60d8b5fd91SRandall Stewartcollection of 61d8b5fd91SRandall Stewart.Dq "port addresses" . 62d8b5fd91SRandall StewartThus, each address is composed of an Internet address specifying 63d8b5fd91SRandall Stewartthe host and network, with a specific 64d8b5fd91SRandall Stewart.Tn SCTP 65d8b5fd91SRandall Stewartport on the host identifying the peer entity. 66d8b5fd91SRandall Stewart.Pp 67d8b5fd91SRandall StewartThere are two models of programming in SCTP. 68d8b5fd91SRandall StewartThe first uses the 69d8b5fd91SRandall Stewart.Dv SOCK_STREAM 70d8b5fd91SRandall Stewartabstraction. 71d8b5fd91SRandall StewartIn this abstraction sockets utilizing the 72d8b5fd91SRandall Stewart.Tn SCTP 73d8b5fd91SRandall Stewartprotocol are either 74d8b5fd91SRandall Stewart.Dq active 75d8b5fd91SRandall Stewartor 76d8b5fd91SRandall Stewart.Dq passive . 77d8b5fd91SRandall StewartActive sockets initiate connections to passive 78d8b5fd91SRandall Stewartsockets. 79d8b5fd91SRandall StewartBy default, 80d8b5fd91SRandall Stewart.Tn SCTP 81d8b5fd91SRandall Stewartsockets are created active; to create a 82d8b5fd91SRandall Stewartpassive socket, the 83d8b5fd91SRandall Stewart.Xr listen 2 84d8b5fd91SRandall Stewartsystem call must be used after binding the socket with the 85d8b5fd91SRandall Stewart.Xr bind 2 86d8b5fd91SRandall Stewartor 87d8b5fd91SRandall Stewart.Xr sctp_bindx 3 88d8b5fd91SRandall Stewartsystem calls. 89d8b5fd91SRandall StewartOnly passive sockets may use the 90d8b5fd91SRandall Stewart.Xr accept 2 91d8b5fd91SRandall Stewartcall to accept incoming connections. 92d8b5fd91SRandall StewartOnly active sockets may use the 93d8b5fd91SRandall Stewart.Xr connect 2 94d8b5fd91SRandall Stewartcall to initiate connections. 95d8b5fd91SRandall Stewart.Pp 96d8b5fd91SRandall StewartThe other abstraction 97d8b5fd91SRandall Stewart.Dv SOCK_SEQPACKET 98d8b5fd91SRandall Stewartprovides a 99d8b5fd91SRandall Stewart.Dq connectionless 100d8b5fd91SRandall Stewartmode of operation in that the user may send to an address 101d8b5fd91SRandall Stewart(using any of the valid send calls that carry a 102d8b5fd91SRandall Stewartsocket address) and an association will be setup 103d8b5fd91SRandall Stewartimplicitly by the underlying 104d8b5fd91SRandall Stewart.Tn SCTP 105d8b5fd91SRandall Stewarttransport stack. 106d8b5fd91SRandall StewartThis abstraction is the only one capable of sending data on the 107d8b5fd91SRandall Stewartthird leg of the four-way handshake. 108d8b5fd91SRandall StewartA user must still call 109d8b5fd91SRandall Stewart.Xr listen 2 110d8b5fd91SRandall Stewartto allow the socket to accept connections. 111d8b5fd91SRandall StewartCalling 112d8b5fd91SRandall Stewart.Xr listen 2 113d8b5fd91SRandall Stewarthowever does not restrict the user from still initiating 114d8b5fd91SRandall Stewartimplicit connections to other peers. 115d8b5fd91SRandall Stewart.Pp 116d8b5fd91SRandall StewartThe 117d8b5fd91SRandall Stewart.Tn SCTP 118d8b5fd91SRandall Stewartprotocol directly supports multi-homing. 119d8b5fd91SRandall StewartSo when binding a socket with the 120d8b5fd91SRandall Stewart.Dq wildcard 121d8b5fd91SRandall Stewartaddress 122d8b5fd91SRandall Stewart.Dv INADDR_ANY , 123d8b5fd91SRandall Stewartthe 124d8b5fd91SRandall Stewart.Tn SCTP 125d8b5fd91SRandall Stewartstack will inform the peer about all of the local addresses 126d8b5fd91SRandall Stewartthat are deemed in scope of the peer. 127d8b5fd91SRandall StewartThe peer will then possibly have multiple paths to reach the local host. 128d8b5fd91SRandall Stewart.Pp 129d8b5fd91SRandall StewartThe 130d8b5fd91SRandall Stewart.Tn SCTP 131d8b5fd91SRandall Stewarttransport protocol is also multi-streamed. 132d8b5fd91SRandall StewartMulti-streaming refers to the ability to send sub-ordered flows of 133d8b5fd91SRandall Stewartmessages. 134d8b5fd91SRandall StewartA user performs this by specifying a specific stream in one of the 135d8b5fd91SRandall Stewartextended send calls such as the 136d8b5fd91SRandall Stewart.Xr sctp_send 3 137d8b5fd91SRandall Stewartfunction call. 138d8b5fd91SRandall StewartSending messages on different streams will allow parallel delivery 139d8b5fd91SRandall Stewartof data i.e., a message loss in stream 1 will not block the delivery 140d8b5fd91SRandall Stewartof messages sent in stream 2. 141d8b5fd91SRandall Stewart.Pp 142d8b5fd91SRandall StewartThe 143d8b5fd91SRandall Stewart.Tn SCTP 144d8b5fd91SRandall Stewarttransport protocol also provides a unordered service as well. 145d8b5fd91SRandall StewartThe unordered service allows a message to be sent and delivered 146d8b5fd91SRandall Stewartwith no regard to the ordering of any other message. 147d8b5fd91SRandall Stewart.Ss Extensions 148d8b5fd91SRandall StewartThe FreeBSD implementation of 149d8b5fd91SRandall Stewart.Tn SCTP 150d8b5fd91SRandall Stewartalso supports the following extensions: 151de00ad05SMichael Tuexen.Bl -tag -width "sctp partial reliability" 152d8b5fd91SRandall Stewart.It "sctp partial reliability" 153d8b5fd91SRandall StewartThis extension allows one to have message be skipped and 154d8b5fd91SRandall Stewartnot delivered based on some user specified parameters. 155d8b5fd91SRandall Stewart.It "sctp dynamic addressing" 156d8b5fd91SRandall StewartThis extension allows addresses to be added and deleted 157869978d4SRebecca Crandynamically from an existing association. 158d8b5fd91SRandall Stewart.It "sctp authentication" 159d8b5fd91SRandall StewartThis extension allows the user to authenticate specific 160d8b5fd91SRandall Stewartpeer chunks (including data) to validate that the peer 161d8b5fd91SRandall Stewartwho sent the message is in fact the peer who setup the 162d8b5fd91SRandall Stewartassociation. 163d8b5fd91SRandall StewartA shared key option is also provided for 164d8b5fd91SRandall Stewartso that two stacks can pre-share keys. 165d8b5fd91SRandall Stewart.It "packet drop" 166d8b5fd91SRandall StewartSome routers support a special satellite protocol that 167d8b5fd91SRandall Stewartwill report losses due to corruption. 168d8b5fd91SRandall StewartThis allows retransmissions without subsequent loss in bandwidth 169d8b5fd91SRandall Stewartutilization. 170d8b5fd91SRandall Stewart.It "stream reset" 171d8b5fd91SRandall StewartThis extension allows a user on either side to reset the 172d8b5fd91SRandall Stewartstream sequence numbers used by any or all streams. 173d8b5fd91SRandall Stewart.El 174de00ad05SMichael Tuexen.Ss Socket Options 175d8b5fd91SRandall Stewart.Tn SCTP 176d8b5fd91SRandall Stewartsupports a number of socket options which can be set with 177d8b5fd91SRandall Stewart.Xr setsockopt 2 178d8b5fd91SRandall Stewartand tested with 179d8b5fd91SRandall Stewart.Xr getsockopt 2 180d8b5fd91SRandall Stewartor 1812cacf8cfSPeter Pentchev.Xr sctp_opt_info 3 : 1821adc28f5SChristian Brueffer.Bl -tag -width indent 183d8b5fd91SRandall Stewart.It Dv SCTP_NODELAY 184d8b5fd91SRandall StewartUnder most circumstances, 185d8b5fd91SRandall Stewart.Tn SCTP 186d8b5fd91SRandall Stewartsends data when it is presented; when outstanding data has not 187d8b5fd91SRandall Stewartyet been acknowledged, it gathers small amounts of output to be 188d8b5fd91SRandall Stewartsent in a single packet once an acknowledgement is received. 189d8b5fd91SRandall StewartFor some clients, such as window systems that send a stream of 190d8b5fd91SRandall Stewartmouse events which receive no replies, this packetization may 191d8b5fd91SRandall Stewartcause significant delays. 192d8b5fd91SRandall StewartThe boolean option 193d8b5fd91SRandall Stewart.Dv SCTP_NODELAY 194d8b5fd91SRandall Stewartdefeats this algorithm. 195d8b5fd91SRandall Stewart.It Dv SCTP_RTOINFO 196d8b5fd91SRandall StewartThis option returns specific information about an associations 197d8b5fd91SRandall Stewart.Dq "Retransmission Time Out" . 198d8b5fd91SRandall StewartIt can also be used to change the default values. 199d8b5fd91SRandall Stewart.It Dv SCTP_ASSOCINFO 200d8b5fd91SRandall StewartThis option returns specific information about the requested 201d8b5fd91SRandall Stewartassociation. 202d8b5fd91SRandall Stewart.It Dv SCTP_INITMSG 203d8b5fd91SRandall StewartThis option allows you to get or set the default sending 204d8b5fd91SRandall Stewartparameters when an association is implicitly setup. 205c2025a76SJoel DahlIt allows you to change such things as the maximum number of 206d8b5fd91SRandall Stewartstreams allowed inbound and the number of streams requested 207d8b5fd91SRandall Stewartof the peer. 208d8b5fd91SRandall Stewart.It Dv SCTP_AUTOCLOSE 209d8b5fd91SRandall StewartFor the one-to-many model 210d8b5fd91SRandall Stewart.Dv ( SOCK_SEQPACKET ) 211d8b5fd91SRandall Stewartassociations are setup implicitly. 212d8b5fd91SRandall StewartThis option allows the user to specify a default number of idle 213d8b5fd91SRandall Stewartseconds to allow the association be maintained. 214d8b5fd91SRandall StewartAfter the idle timer (where no user message have been sent or have 215d8b5fd91SRandall Stewartbeen received from the peer) the association will be gracefully 216d8b5fd91SRandall Stewartclosed. 217d8b5fd91SRandall StewartThe default for this value is 0, or unlimited (i.e., no automatic 218d8b5fd91SRandall Stewartclose). 219d8b5fd91SRandall Stewart.It Dv SCTP_SET_PEER_PRIMARY_ADDR 220d8b5fd91SRandall StewartThe dynamic address extension allows a peer to also request a 221d8b5fd91SRandall Stewartparticular address of its be made into the primary address. 222d8b5fd91SRandall StewartThis option allows the caller to make such a request to a peer. 223d8b5fd91SRandall StewartNote that if the peer does not also support the dynamic address 224d8b5fd91SRandall Stewartextension, this call will fail. 225d8b5fd91SRandall StewartNote the caller must provide a valid local address that the peer has 226d8b5fd91SRandall Stewartbeen told about during association setup or dynamically. 227d8b5fd91SRandall Stewart.It Dv SCTP_PRIMARY_ADDR 228d8b5fd91SRandall StewartThis option allows the setting of the primary address 229d8b5fd91SRandall Stewartthat the caller wishes to send to. 230d8b5fd91SRandall StewartThe caller provides the address of a peer that is to be made primary. 231d8b5fd91SRandall Stewart.It Dv SCTP_ADAPTATION_LAYER 232d8b5fd91SRandall StewartThe dynamic address extension also allows a user to 233d8b5fd91SRandall Stewartpass a 32 bit opaque value upon association setup. 234d8b5fd91SRandall StewartThis option allows a user to set or get this value. 235d8b5fd91SRandall Stewart.It Dv SCTP_DISABLE_FRAGMENTS 236d8b5fd91SRandall StewartBy default 237d8b5fd91SRandall Stewart.Tn SCTP 238d8b5fd91SRandall Stewartwill fragment user messages into multiple pieces that 239d8b5fd91SRandall Stewartwill fit on the network and then later, upon reception, reassemble 240d8b5fd91SRandall Stewartthe pieces into a single user message. 241d8b5fd91SRandall StewartIf this option is enabled instead, any send that exceeds the path 242d8b5fd91SRandall Stewartmaximum transfer unit (P-MTU) will fail and the message will NOT be 243d8b5fd91SRandall Stewartsent. 244d8b5fd91SRandall Stewart.It Dv SCTP_PEER_ADDR_PARAMS 245d8b5fd91SRandall StewartThis option will allow a user to set or get specific 246d8b5fd91SRandall Stewartpeer address parameters. 247d8b5fd91SRandall Stewart.It Dv SCTP_DEFAULT_SEND_PARAM 248d8b5fd91SRandall StewartWhen a user does not use one of the extended send 249d8b5fd91SRandall Stewartcalls (e.g., 250d8b5fd91SRandall Stewart.Xr sctp_sendmsg 3 ) 251d8b5fd91SRandall Stewarta set of default values apply to each send. 252d8b5fd91SRandall StewartThese values include things like the stream number to send 253d8b5fd91SRandall Stewartto as well as the per-protocol id. 254d8b5fd91SRandall StewartThis option lets a caller both get and set these values. 255d8b5fd91SRandall StewartIf the user changes these default values, then these new values will 256d8b5fd91SRandall Stewartbe used as the default whenever no information is provided by the 257d8b5fd91SRandall Stewartsender (i.e., the non-extended API is used). 258d8b5fd91SRandall Stewart.It Dv SCTP_EVENTS 259d8b5fd91SRandall Stewart.Tn SCTP 260d8b5fd91SRandall Stewarthas non-data events that it can communicate 261d8b5fd91SRandall Stewartto its application. 262d8b5fd91SRandall StewartBy default these are all disabled since they arrive in the data path 263d8b5fd91SRandall Stewartwith a special flag 264d8b5fd91SRandall Stewart.Dv MSG_NOTIFICATION 265d8b5fd91SRandall Stewartset upon the received message. 266d8b5fd91SRandall StewartThis option lets a caller 267d8b5fd91SRandall Stewartboth get what events are current being received 268d8b5fd91SRandall Stewartas well as set different events that they may be interested 269d8b5fd91SRandall Stewartin receiving. 270d8b5fd91SRandall Stewart.It Dv SCTP_I_WANT_MAPPED_V4_ADDR 271d8b5fd91SRandall Stewart.Tn SCTP 272d8b5fd91SRandall Stewartsupports both IPV4 and IPV6. 273d8b5fd91SRandall StewartAn association may span both IPV4 and IPV6 addresses since 274d8b5fd91SRandall Stewart.Tn SCTP 275d8b5fd91SRandall Stewartis multi-homed. 276d8b5fd91SRandall StewartBy default, when opening an IPV6 socket, when 277d8b5fd91SRandall Stewartdata arrives on the socket from a peer's 278d8b5fd91SRandall StewartV4 address the V4 address will be presented with an address family 279d8b5fd91SRandall Stewartof AF_INET. 280c2025a76SJoel DahlIf this is undesirable, then this option 281d8b5fd91SRandall Stewartcan be enabled which will then convert all V4 addresses 282d8b5fd91SRandall Stewartinto mapped V6 representations. 283d8b5fd91SRandall Stewart.It Dv SCTP_MAXSEG 284d8b5fd91SRandall StewartBy default 285d8b5fd91SRandall Stewart.Tn SCTP 286d8b5fd91SRandall Stewartchooses its message fragmentation point 287d8b5fd91SRandall Stewartbased upon the smallest P-MTU of the peer. 288d8b5fd91SRandall StewartThis option lets the caller set it to a smaller value. 289d8b5fd91SRandall StewartNote that while the user can change this value, if the P-MTU 290d8b5fd91SRandall Stewartis smaller than the value set by the user, then the P-MTU 291d8b5fd91SRandall Stewartvalue will override any user setting. 292d8b5fd91SRandall Stewart.It Dv SCTP_DELAYED_ACK_TIME 293d8b5fd91SRandall StewartThis option lets the user both set and get the 294d8b5fd91SRandall Stewartdelayed ack time (in milliseconds) that 295d8b5fd91SRandall Stewart.Tn SCTP 296d8b5fd91SRandall Stewartis using. 297d8b5fd91SRandall StewartThe default is 200 milliseconds. 298d8b5fd91SRandall Stewart.It Dv SCTP_PARTIAL_DELIVERY_POINT 299d8b5fd91SRandall Stewart.Tn SCTP 300d8b5fd91SRandall Stewartat times may need to start delivery of a 301d8b5fd91SRandall Stewartvery large message before the entire message has 302d8b5fd91SRandall Stewartarrived. 303d8b5fd91SRandall StewartBy default SCTP waits until the incoming 304d8b5fd91SRandall Stewartmessage is larger than one fourth of the receive 305d8b5fd91SRandall Stewartbuffer. 306d8b5fd91SRandall StewartThis option allows the stacks value 307d8b5fd91SRandall Stewartto be overridden with a smaller value. 308d8b5fd91SRandall Stewart.It Dv SCTP_FRAGMENT_INTERLEAVE 309d8b5fd91SRandall Stewart.Tn SCTP 310d8b5fd91SRandall Stewartat times will start partial delivery (as mentioned above). 311d8b5fd91SRandall StewartIn the normal case successive reads will continue to return 312d8b5fd91SRandall Stewartthe rest of the message, blocking if needed, until all of 313d8b5fd91SRandall Stewartthat message is read. 314d8b5fd91SRandall StewartHowever this means other messages may have arrived and be ready 315d8b5fd91SRandall Stewartfor delivery and be blocked behind the message being partially 316d8b5fd91SRandall Stewartdelivered. 317d8b5fd91SRandall StewartIf this option is enabled, when a partial delivery 318d8b5fd91SRandall Stewartmessage has no more data to be received, then a subsequent 319d8b5fd91SRandall Stewartread may return a different message that is ready for delivery. 320d8b5fd91SRandall StewartBy default this option is off since the user must be using the 321d8b5fd91SRandall Stewartextended API's to be able to tell the difference between 322d8b5fd91SRandall Stewartmessages (via the stream and stream sequence number). 323d8b5fd91SRandall Stewart.It Dv SCTP_AUTH_CHUNK 324d8b5fd91SRandall StewartBy default only the dynamic addressing chunks are 325d8b5fd91SRandall Stewartauthenticated. 326d8b5fd91SRandall StewartThis option lets a user request an 327d8b5fd91SRandall Stewartadditional chunk be authenticated as well. 328d8b5fd91SRandall StewartNote that successive calls to this option will work and continue 329d8b5fd91SRandall Stewartto add more chunks that require authentication. 330d8b5fd91SRandall StewartNote that this option only effects future associations and 331d8b5fd91SRandall Stewartnot existing ones. 332d8b5fd91SRandall Stewart.It Dv SCTP_AUTH_KEY 333d8b5fd91SRandall StewartThis option allows a user to specify a shared 334d8b5fd91SRandall Stewartkey that can be later used to authenticate 335d8b5fd91SRandall Stewarta peer. 336d8b5fd91SRandall Stewart.It Dv SCTP_HMAC_IDENT 337d8b5fd91SRandall StewartThis option will let you get or set the list of 338d8b5fd91SRandall StewartHMAC algorithms used to authenticate peers. 339d8b5fd91SRandall StewartNote that the HMAC values are in priority order where 340c2025a76SJoel Dahlthe first HMAC identifier is the most preferred 341c2025a76SJoel Dahland the last is the least preferred. 342d8b5fd91SRandall Stewart.It Dv SCTP_AUTH_ACTIVE_KEY 343d8b5fd91SRandall StewartThis option allows you to make a key active for 344d8b5fd91SRandall Stewartthe generation of authentication information. 345d8b5fd91SRandall StewartNote that the peer must have the same key or else the 346d8b5fd91SRandall Stewartdata will be discarded. 347d8b5fd91SRandall Stewart.It Dv SCTP_AUTH_DELETE_KEY 348d8b5fd91SRandall StewartThis option allows you to delete an old key. 349d8b5fd91SRandall Stewart.It Dv SCTP_USE_EXT_RECVINFO 350d8b5fd91SRandall StewartThe sockets api document allows an extended 351d8b5fd91SRandall Stewartsend/receive information structure to be used. 352d8b5fd91SRandall StewartThe extended structure includes additional fields 353d8b5fd91SRandall Stewartrelated to the next message to be received (after the 354d8b5fd91SRandall Stewartcurrent receive completes) if such information is known. 355d8b5fd91SRandall StewartBy default the system will not pass this information. 356d8b5fd91SRandall StewartThis option allows the user to request this information. 357d8b5fd91SRandall Stewart.It Dv SCTP_AUTO_ASCONF 358d8b5fd91SRandall StewartBy default when bound to all address and the system administrator has 359d8b5fd91SRandall Stewartenables automatic dynamic addresses, the 360d8b5fd91SRandall Stewart.Tn SCTP 361d8b5fd91SRandall Stewartstack will automatically generate address changes into add and 362d8b5fd91SRandall Stewartdelete requests to any peers by setting this option to 363d8b5fd91SRandall Stewarttrue. 364d8b5fd91SRandall StewartThis option allows an endpoint to disable that behavior. 365d8b5fd91SRandall Stewart.It Dv SCTP_MAXBURST 366d8b5fd91SRandall StewartBy default 367d8b5fd91SRandall Stewart.Tn SCTP 368d8b5fd91SRandall Stewartimplements micro-burst control so that as the congestion window 369d8b5fd91SRandall Stewartopens up no large burst of packets can be generated. 370d8b5fd91SRandall StewartThe default burst limit is four. 371d8b5fd91SRandall StewartThis option lets the user change this value. 372d8b5fd91SRandall Stewart.It Dv SCTP_CONTEXT 373d8b5fd91SRandall StewartMany sctp extended calls have a context field. 374d8b5fd91SRandall StewartThe context field is a 32 bit opaque value that will be returned in 375d8b5fd91SRandall Stewartsend failures. 376d8b5fd91SRandall StewartThis option lets the caller set the default 377d8b5fd91SRandall Stewartcontext value to use when none is provided by the user. 378d8b5fd91SRandall Stewart.It Dv SCTP_EXPLICIT_EOR 379d8b5fd91SRandall StewartBy default, a single send is a complete message. 380d8b5fd91SRandall Stewart.Tn SCTP 381d8b5fd91SRandall Stewartgenerates an implied record boundary. 382d8b5fd91SRandall StewartIf this option is enabled, then all sends are part of the same message 383d8b5fd91SRandall Stewartuntil the user indicates an end of record with the 384d8b5fd91SRandall Stewartspecial flag 385d8b5fd91SRandall Stewart.Dv SCTP_EOR 386d8b5fd91SRandall Stewartpassed in the sctp_sndrcvinfo flags field. 387d8b5fd91SRandall StewartThis effectively makes all sends part of the same message 388f6ac2391SJoel Dahluntil the user specifies differently. 389d8b5fd91SRandall StewartThis means that a caller must NOT change the stream number until 390d8b5fd91SRandall Stewartafter the 391d8b5fd91SRandall Stewart.Dv SCTP_EOR 392d8b5fd91SRandall Stewartis passed to 393d8b5fd91SRandall Stewart.Tn SCTP 394d8b5fd91SRandall Stewartelse an error will be returned. 395d8b5fd91SRandall Stewart.It Dv SCTP_STATUS 39662cb31dcSWarner LoshThis option is a read-only option that returns 397d8b5fd91SRandall Stewartvarious status information about the specified association. 398d8b5fd91SRandall Stewart.It Dv SCTP_GET_PEER_ADDR_INFO 39962cb31dcSWarner LoshThis read-only option returns information about a peer 400d8b5fd91SRandall Stewartaddress. 401d8b5fd91SRandall Stewart.It Dv SCTP_PEER_AUTH_CHUNKS 40262cb31dcSWarner LoshThis read-only option returns a list of the chunks 403d8b5fd91SRandall Stewartthe peer requires to be authenticated. 404d8b5fd91SRandall Stewart.It Dv SCTP_LOCAL_AUTH_CHUNKS 40562cb31dcSWarner LoshThis read-only option returns a list of the locally 406d8b5fd91SRandall Stewartrequired chunks that must be authenticated. 407d8b5fd91SRandall Stewart.It Dv SCTP_RESET_STREAMS 408d8b5fd91SRandall StewartThis socket option is used to cause a stream sequence 409d8b5fd91SRandall Stewartnumber or all stream sequence numbers to be reset. 410d8b5fd91SRandall StewartNote that the peer 411d8b5fd91SRandall Stewart.Tn SCTP 412d8b5fd91SRandall Stewartendpoint must also support the stream reset extension 413d8b5fd91SRandall Stewartas well. 414d8b5fd91SRandall Stewart.El 415de00ad05SMichael Tuexen.Ss MIB Variables 416de00ad05SMichael TuexenThe 417de00ad05SMichael Tuexen.Tn SCTP 418de00ad05SMichael Tuexenprotocol implements a number of variables in the 419de00ad05SMichael Tuexen.Va net.inet.sctp 420de00ad05SMichael Tuexenbranch of the 421de00ad05SMichael Tuexen.Xr sysctl 3 422de00ad05SMichael TuexenMIB. 423de00ad05SMichael Tuexen.Bl -ohang 424de00ad05SMichael Tuexen.It Sy Congestion Control 425de00ad05SMichael Tuexen.Bl -tag -width indent 426de00ad05SMichael Tuexen.It Va default_cc_module 427de00ad05SMichael TuexenDefault congestion control module. 428de00ad05SMichael TuexenDefault value is 0. 429de00ad05SMichael TuexenThe minimum is 0, and the maximum is 3. 430de00ad05SMichael TuexenA value of 0 enables the default congestion control algorithm. 431de00ad05SMichael TuexenA value of 1 enables the High Speed congestion control algorithm. 432de00ad05SMichael TuexenA value of 2 enables the HTCP congestion control algorithm. 433de00ad05SMichael TuexenA value of 3 enables the data center congestion control (DCCC) algorithm. 434de00ad05SMichael Tuexen.It Va initial_cwnd 435de00ad05SMichael TuexenDefines the initial congestion window size in MTUs. 436de00ad05SMichael Tuexen.It Va cwnd_maxburst 437de00ad05SMichael TuexenUse congestion control instead of 'blind' logic to limit maximum burst when sending. 438de00ad05SMichael TuexenDefault value is 1. May be set to 0 or 1. 439de00ad05SMichael Tuexen.It Va ecn_enable 440de00ad05SMichael TuexenEnable Explicit Congestion Notification (ECN). 441de00ad05SMichael TuexenDefault value is 1. May be set to 0 or 1. 442de00ad05SMichael Tuexen.It Va rttvar_steady_step 443de00ad05SMichael TuexenNumber of identical bandwidth measurements DCCC takes to try step down the congestion window. 444de00ad05SMichael TuexenDefault value is 20. 445de00ad05SMichael TuexenThe minimum is 0, and the maximum is 65535. 446de00ad05SMichael Tuexen.It Va rttvar_eqret 447de00ad05SMichael TuexenWhether DCCC reduces the congestion window size when round-trip time and bandwidth remain unchanged. 448de00ad05SMichael TuexenDefault value is 0. 449de00ad05SMichael TuexenMay be set to 0 or 1. 450de00ad05SMichael Tuexen.It Va rttvar_bw 451de00ad05SMichael TuexenShift amount DCCC uses for bandwidth smoothing on round-trip-time calculation. 452de00ad05SMichael TuexenDefault value is 4. 453de00ad05SMichael TuexenThe minimum is 0, and the maximum is 32. 454de00ad05SMichael Tuexen.It Va rttvar_rtt 455de00ad05SMichael TuexenShift amount DCCC uses for round-trip-time smoothing on round-trip-time calculation. 456de00ad05SMichael TuexenDefault value is 5. 457de00ad05SMichael TuexenThe minimum is 0, and the maximum is 32. 458de00ad05SMichael Tuexen.It Va use_dcccecn 459de00ad05SMichael TuexenEnable ECN when using DCCC. 460de00ad05SMichael TuexenDefault value is 1. 461de00ad05SMichael TuexenMay be set to 0 or 1. 462de00ad05SMichael Tuexen.El 463de00ad05SMichael Tuexen.It Sy Misc 464de00ad05SMichael Tuexen.Bl -tag -width indent 465de00ad05SMichael Tuexen.It Va getcred 466de00ad05SMichael TuexenGet the ucred of a SCTP connection. 467de00ad05SMichael Tuexen.It Va assoclist 468de00ad05SMichael TuexenList of active SCTP associations. 469de00ad05SMichael Tuexen.It Va stats 470de00ad05SMichael TuexenSCTP statistics (struct sctp_stat). 471de00ad05SMichael Tuexen.It Va diag_info_code 472de00ad05SMichael TuexenDiagnostic information error cause code. 473de00ad05SMichael Tuexen.It Va blackhole 474de00ad05SMichael TuexenEnable SCTP blackholing. 475de00ad05SMichael TuexenSee 476de00ad05SMichael Tuexen.Xr blackhole 4 477de00ad05SMichael Tuexenfor more details. 478ae7cc6c9SMichael Tuexen.It Va sendall_limit 479ae7cc6c9SMichael TuexenMaximum message size (in bytes) that can be transmitted with SCTP_SENDALL flags set. 480de00ad05SMichael Tuexen.It Va buffer_splitting 481de00ad05SMichael TuexenEnable send/receive buffer splitting. 482de00ad05SMichael Tuexen.It Va vtag_time_wait 483de00ad05SMichael TuexenVtag wait time in seconds, 0 to disable. 484de00ad05SMichael Tuexen.It Va nat_friendly_init 485de00ad05SMichael TuexenEnable sending of the NAT-friendly SCTP option on INITs. 486de00ad05SMichael Tuexen.It Va enable_sack_immediately 487de00ad05SMichael TuexenEnable sending of the SACK-IMMEDIATELY bit. 488de00ad05SMichael Tuexen.It Va udp_tunneling_port 489de00ad05SMichael TuexenSet the SCTP/UDP tunneling port. 490de00ad05SMichael Tuexen.It Va mobility_fasthandoff 491de00ad05SMichael TuexenEnable SCTP fast handoff. 492de00ad05SMichael Tuexen.It Va mobility_base 493de00ad05SMichael TuexenEnable SCTP base mobility 494de00ad05SMichael Tuexen.It Va default_frag_interleave 495de00ad05SMichael TuexenDefault fragment interleave level. 496de00ad05SMichael Tuexen.It Va default_ss_module 497de00ad05SMichael TuexenDefault stream scheduling module. 498de00ad05SMichael Tuexen.It Va log_level 499de00ad05SMichael TuexenLtrace/KTR trace logging level. 500de00ad05SMichael Tuexen.It Va max_retran_chunk 501de00ad05SMichael TuexenNumber of retransmissions of a DATA chunk before an association is aborted. 502de00ad05SMichael Tuexen.It Va min_residual 503de00ad05SMichael TuexenMinimum residual data chunk in second part of split. 504de00ad05SMichael Tuexen.It Va strict_data_order 505de00ad05SMichael TuexenEnforce strict data ordering, abort if control inside data. 506de00ad05SMichael Tuexen.It Va abort_at_limit 507de00ad05SMichael TuexenAbort when one-to-one hits qlimit. 508de00ad05SMichael Tuexen.It Va hb_max_burst 509de00ad05SMichael TuexenConfirmation heartbeat max burst. 510de00ad05SMichael Tuexen.It Va do_sctp_drain 511de00ad05SMichael TuexenFlush chunks in receive queues with TSN higher than the cumulative TSN if the 512de00ad05SMichael Tuexensystem is low on mbufs. 513de00ad05SMichael Tuexen.It Va max_chained_mbufs 514de00ad05SMichael TuexenDefault max number of small mbufs on a chain. 515de00ad05SMichael Tuexen.It Va abc_l_var 516de00ad05SMichael TuexenSCTP ABC max increase per SACK (L). 517de00ad05SMichael Tuexen.It Va nat_friendly 518de00ad05SMichael TuexenSCTP NAT friendly operation. 519de00ad05SMichael Tuexen.It Va cmt_use_dac 520de00ad05SMichael TuexenCMT DAC on/off flag. 521de00ad05SMichael Tuexen.It Va cmt_on_off 522de00ad05SMichael TuexenCMT settings. 523de00ad05SMichael Tuexen.It Va outgoing_streams 524de00ad05SMichael TuexenDefault number of outgoing streams. 525de00ad05SMichael Tuexen.It Va incoming_streams 526de00ad05SMichael TuexenDefault number of incoming streams. 527de00ad05SMichael Tuexen.It Va add_more_on_output 528de00ad05SMichael TuexenWhen space-wise is it worthwhile to try to add more to a socket send buffer. 529de00ad05SMichael Tuexen.It Va path_pf_threshold 530de00ad05SMichael TuexenDefault potentially failed threshold. 531de00ad05SMichael Tuexen.It Va path_rtx_max 532de00ad05SMichael TuexenDefault maximum of retransmissions per path. 533de00ad05SMichael Tuexen.It Va assoc_rtx_max 534de00ad05SMichael TuexenDefault maximum number of retransmissions per association. 535de00ad05SMichael Tuexen.It Va init_rtx_max 536de00ad05SMichael TuexenDefault maximum number of retransmissions for INIT chunks. 537de00ad05SMichael Tuexen.It Va valid_cookie_life 538de00ad05SMichael TuexenDefault cookie lifetime in seconds. 539de00ad05SMichael Tuexen.It Va init_rto_max 540de00ad05SMichael TuexenDefault maximum retransmission timeout during association setup in ms. 541de00ad05SMichael Tuexen.It Va rto_initial 542de00ad05SMichael TuexenDefault initial retransmission timeout in ms. 543de00ad05SMichael Tuexen.It Va rto_min 544de00ad05SMichael TuexenDefault minimum retransmission timeout in ms. 545de00ad05SMichael Tuexen.It Va rto_max 546de00ad05SMichael TuexenDefault maximum retransmission timeout in ms. 547de00ad05SMichael Tuexen.It Va secret_lifetime 548de00ad05SMichael TuexenDefault secret lifetime in seconds. 549de00ad05SMichael Tuexen.It Va shutdown_guard_time 550de00ad05SMichael TuexenShutdown guard timer in seconds (0 means 5 times RTO.Max). 551de00ad05SMichael Tuexen.It Va pmtu_raise_time 552de00ad05SMichael TuexenDefault PMTU raise timer in seconds. 553de00ad05SMichael Tuexen.It Va heartbeat_interval 554de00ad05SMichael TuexenDefault heartbeat interval in ms. 555de00ad05SMichael Tuexen.It Va asoc_resource 556de00ad05SMichael TuexenMax number of cached resources in an association. 557de00ad05SMichael Tuexen.It Va sys_resource 558de00ad05SMichael TuexenMax number of cached resources in the system. 559de00ad05SMichael Tuexen.It Va sack_freq 560de00ad05SMichael TuexenDefault SACK frequency. 561de00ad05SMichael Tuexen.It Va delayed_sack_time 562de00ad05SMichael TuexenDefault delayed SACK timer in ms. 563de00ad05SMichael Tuexen.It Va chunkscale 564de00ad05SMichael TuexenTunable for scaling of number of chunks and messages. 565de00ad05SMichael Tuexen.It Va min_split_point 566de00ad05SMichael TuexenMinimum size when splitting a chunk. 567de00ad05SMichael Tuexen.It Va pcbhashsize 568de00ad05SMichael TuexenTunable for PCB hash table sizes. 569de00ad05SMichael Tuexen.It Va tcbhashsize 570de00ad05SMichael TuexenTunable for TCB hash table sizes. 571de00ad05SMichael Tuexen.It Va maxchunks 572de00ad05SMichael TuexenDefault max chunks on queue per association. 573de00ad05SMichael Tuexen.It Va fr_maxburst 574de00ad05SMichael TuexenDefault max burst for SCTP endpoints when fast retransmitting. 575de00ad05SMichael Tuexen.It Va maxburst 576de00ad05SMichael TuexenDefault max burst for SCTP endpoints. 577de00ad05SMichael Tuexen.It Va peer_chkoh 578de00ad05SMichael TuexenAmount to debit peers rwnd per chunk sent. 579de00ad05SMichael Tuexen.It Va strict_sacks 580de00ad05SMichael TuexenEnable SCTP Strict SACK checking. 581de00ad05SMichael Tuexen.It Va pktdrop_enable 582de00ad05SMichael TuexenEnable SCTP PKTDROP. 583de00ad05SMichael Tuexen.It Va nrsack_enable 584de00ad05SMichael TuexenEnable SCTP NR-SACK. 585de00ad05SMichael Tuexen.It Va reconfig_enable 586de00ad05SMichael TuexenEnable SCTP RE-CONFIG. 587de00ad05SMichael Tuexen.It Va asconf_enable 588de00ad05SMichael TuexenEnable SCTP ASCONF. 589de00ad05SMichael Tuexen.It Va auth_enable 590de00ad05SMichael TuexenEnable SCTP AUTH. 591de00ad05SMichael Tuexen.It Va pr_enable 592de00ad05SMichael TuexenEnable PR-SCTP. 593de00ad05SMichael Tuexen.It Va auto_asconf 594de00ad05SMichael TuexenEnable SCTP Auto-ASCONF. 595de00ad05SMichael Tuexen.It Va recvspace 596de00ad05SMichael TuexenMaximum incoming SCTP buffer size. 597de00ad05SMichael Tuexen.It Va sendspace 598de00ad05SMichael TuexenMaximum outgoing SCTP buffer size. 599de00ad05SMichael Tuexen.El 60078a49138SMichael Tuexen.El 601d8b5fd91SRandall Stewart.Sh SEE ALSO 602d8b5fd91SRandall Stewart.Xr accept 2 , 603d8b5fd91SRandall Stewart.Xr bind 2 , 604d8b5fd91SRandall Stewart.Xr connect 2 , 605d8b5fd91SRandall Stewart.Xr listen 2 , 606d8b5fd91SRandall Stewart.Xr sctp_bindx 3 , 607d8b5fd91SRandall Stewart.Xr sctp_connectx 3 , 608d8b5fd91SRandall Stewart.Xr sctp_opt_info 3 , 609d8b5fd91SRandall Stewart.Xr sctp_recvmsg 3 , 610de00ad05SMichael Tuexen.Xr sctp_sendmsg 3 , 611de00ad05SMichael Tuexen.Xr blackhole 4 612