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