The common header, which occupies the first 12 bytes. In the adjacent diagram, this header is highlighted in blue.
The data chunks, which form the remaining portion of the packet. In the diagram, the first chunk is highlighted in green and the last of N chunks (Chunk N) is highlighted in red. There are several types, including payload data and different control messages.
Each SCTP packet consists, in addition to the common header, of chunks.
Each chunk has a common format, but the contents can vary.
The green bytes in the diagram above signify one chunk.
Chunk type
An 8-bit value predefined by the IETF to identify the contents of the chunk value field.
Chunk flags
Eight flag-bits whose definition varies with the chunk type. The default value is zero.
Chunk length
A 16-bit unsigned value specifying the total length of the chunk in bytes (excludes any padding) that includes chunk type, flags, length, and value fields.
Chunk data
General-purpose data field whose definition varies with the chunk type.
If the chunk length does not equate to a multiple of 4 bytes, then the protocol implicitly pads the chunk with trailing zeros.
Optional/variable-length parameter definition
+
Bits 0–15
16–31
0
Parameter type
Parameter length
32
Parameter value
Additionally, each chunk type may define a set of parameters which it includes inside the chunk value field (and, consequently, their length in the chunk length).
Two types of parameter exist:
fixed parameters — they must appear and in the order specified,
variable-length or optional parameters — they appear after the fixed parameters and may appear in any order and in any number.
For optional/variable-length parameters, the parameter type, parameter length, and parameter value fields all behave just like their chunk counterparts.
The minimum size of parameter is 4 bytes, and this occurs when the parameter value field is empty and the parameter consists only of the type and length fields.
U — If set, this indicates that this data is an unordered chunk and the stream sequence number is invalid. If an unordered chunk is fragmented, then each fragment has this flag set.
B — If set, this marks the beginning fragment. An unfragmented chunk has this flag set.
E — If set, this marks the end fragment. An unfragmented chunk has this flag set.
Chunk length
The chunk length has a minimum value of 17 as data of size less than one byte is not allowed.
Fixed parameters:
Transmission sequence number (TSN)
The sequence number for the entire DATA stream (used in fragmentation for reassembly).
Stream identifier
Identifier of the stream that this data chunk belongs to.
Stream sequence number
Identifier of the sequence number for the message in this stream. If a message is fragmented then this value is maintained for all fragments.
Payload protocol identifier
Application-specific protocol identifier.[4] SCTP makes no use of this or modification of it. However, devices along the path or the endpoints may use it. A value of 0 indicates that no payload protocol is specified.
This is the chunk length which has a minimum value of 20 when chunk value is empty and no optional parameters are used.
Fixed parameters have identical meaning as INIT ACK:
Initiate tag
Unsigned 32-bit number that is used in every SCTP packet in the verification tag within the common header.
Advertised receiver window credit (a_rwnd)
Amount of dedicated buffer space for this association that should never be reduced.
# of outbound streams
Number of outbound streams (from the sender of the INIT) it wishes to use for this association. Zero is an invalid value, and the receiver should ABORT the association upon receiving a zero.
# of inbound streams
Identical to # of outbound streams but number of inbound streams. No negotiation takes place on the established number, but the minimum of requested and offered should be used.
Initial TSN
Initial transmission sequence number to be used and may be any value.
Optional parameters appear with alternating background colors of green and blue:
Parameter type = 5
This parameter lists all the IPv4 addresses used at the sending endpoint. If it is a multihomed connection, then the IP address of each may be included.
Parameter type = 6
This parameter lists all the IPv6 addresses used at the sending endpoint. If it is a multihomed connection, then the IP address of each may be included.
Parameter type = 9
This parameter provides a suggested life-span increment the receiver should add to its default cookie life-span (in milliseconds).
Parameter type = 11
This parameter is a hostname as defined in RFC 1123, section 2.1. Actual resolution of this name is outside the scope of SCTP. Additionally, a null terminating character must be included and must be included in the parameter length.
Parameter type = 12
This parameter lists the address types the sender supports (e.g., IPv4 = 5, IPv6 = 6, hostname = 11).
Parameter type = 32768
This parameter is reserved for explicit congestion notification support.
The INIT ACK chunk replicates the INIT chunk except the chunk type is always 2.
Mandatory parameters, only in INIT ACK:
Parameter type = 7 (state cookie)
The state cookie holds the minimal information to recreate the transmission control block and is signed with the sender's private key. The format of the cookie is not specified.
This is the chunk length, which has a minimum value of 16 when no gaps or duplicates are sent.
Fixed parameters:
Cumulative TSN ACK
Acknowledges all sequence numbers up to and including this number. Chunks with TSNs above this number have not been received yet – except those included in the optional gap ACK blocks (see below).
Advertised receiver window credit
Amount of dedicated buffer space for this association that should never be reduced.
Number of gap ACK blocks
Indicates the number of gap ACK blocks (i.e. pairs of start and end TSNs) included in this chunk.
Number of duplicate TSNs
Indicates the number of duplicate TSNs reported in this chunk.
Optional parameters appear with alternating background colors of green and blue:
Gap ACK block #N start
Indicates a positive offset (with reference to the cumulative TSN ACK value) to the first TSN of an additional block of TSNs that are acknowledged.
Gap ACK block #N end
Indicates a positive offset (with reference to the cumulative TSN ACK value) to the last TSN of an additional block of TSNs that are acknowledged.
Duplicate TSN #X
A TSN that was received more than once. A TSN will appear in this list for each time it is received after the first time.
Set if the sender sent its own verification tag (that receiver should check); not set if the sender sent peer's verification tag (which should be checked anyway).
Chunk length
This is the chunk length, which has a minimum value of 4 with no error causes given.
Optional parameters (the error causes) are defined in the ERROR chunk.
This is the chunk length, which has a minimum value of 8 when only one error is sent with no parameter value. The size is 4 bytes plus the size of all error causes.
Fixed parameters: None.
Optional parameters are shown with alternating background colors of green and blue:
Parameter type = 1
This parameter identifies that the sender received an invalid stream-identifier.
Parameter type = 2
This parameter indicates that the sender received an INIT or INIT ACK chunk with missing mandatory parameters.
Parameter type = 3
This parameter indicates receipt of a valid state cookie but it was stale by a given number of microseconds.
Parameter type = 4
This parameter indicates the sender is out of resources; this usually accompanies an ABORT chunk.
Parameter type = 5
This parameter identifies an address that the sender could not resolve (possibly because it does not support the address type); this usually accompanies an ABORT chunk.
Parameter type = 6
This parameter identifies an unrecognized chunk when the chunk type's most-significant bits are 01 or 11.
Parameter type = 7
This parameter identifies a mandatory parameter in an INIT or INIT ACK chunk has an invalid value.
Parameter type = 8
This parameter is directed to the originator of an INIT ACK chunk that contained an unrecognized parameter.
Parameter type = 9
This parameter indicates a DATA chunk contained no user data; this usually accompanies an ABORT chunk.
Parameter type = 10
This parameter indicates the sender received a COOKIE ECHO while the endpoint was in a SHUTDOWN-ACK-SENT state.
This parameter is used by a sender to inform the receiver that it wishes to reset the sequence numbers (or message-ids if I-DATA is used) for its outgoing streams.
+
Bits 0–15
16–31
0
Parameter type = 13
Parameter length
32
Re-configuration request sequence number
64
Re-configuration response sequence number
96
Senders last assigned TSN
128
Stream number 1
Stream number 2
...
...
96 + 16N
Stream number N − 1
Stream number N
Parameter type
always 13 for the outgoing SSN reset request parameter.
Parameter length
16 + 2N.
Fixed parameters:
Re-configuration request sequence number
Sequence number of this re-configuration request.
Re-configuration response sequence number
Sequence number of the last re-configuration request received.
Sender's last assigned TSN
Last TSN assigned by the sender (strictly speaking: one less than the next TSN to be assigned).
Optional parameters:
Stream number 1..N
Stream numbers for which the SSN or MID must be reset. If none specified, all SSNs/MIDs will be reset.
This parameter is used by a sender to request that the receiver resets the sequence numbers (or message-ids if I-DATA is used) for its outgoing streams.
+
Bits 0–15
16–31
0
Parameter type = 14
Parameter length
32
Re-configuration request sequence number
64
Stream number 1
Stream number 2
...
...
32 + 16N
Stream number N − 1
Stream number N
Parameter type
always 14 for the incoming SSN reset request parameter.
Parameter length
8 + 2N.
Fixed parameters:
Re-configuration request sequence number
Sequence number of this re-configuration request.
Optional parameters:
Stream number 1..N
Stream numbers for which the SSN or MID must be reset. If none specified, all SSNs/MIDs will be reset.
This parameter is used as a response to a re-configuration request, except possibly for an incoming SSN reset request, which elicits an outgoing SSN reset request parameter if granted.
+
Bits 0–15
16–31
0
Parameter type = 16
Parameter length
32
Re-configuration response sequence number
64
Result
96
Sender's next TSN
128
Receiver's next TSN
Parameter type
always 16 for the re-configuration response parameter
Parameter length
12 or 20
Fixed parameters:
Re-configuration response sequence number
Sequence number of the corresponding re-configuration request.
Result
Result code
Result code
Description
Result code
Description
0
Success – Nothing to do
4
Error – Request already in progress
1
Success – Performed
5
Error – Bad sequence number
2
Denied
6
In progress
3
Error – Wrong SSN
Optional parameters: (either both or none must be present)
Sender's next TSN
Next TSN that the sender of the response will use. Only in response to SSN/TSN reset request.
Receiver's next TSN
Next TSN that the receiver of the response must use. Only in response to SSN/TSN reset request.
The I-DATA chunk was introduced to avoid a large message in one stream blocking messages in all other streams from being transmitted: SCTP primarily uses the TSN to achieve reliability. In some cases, the TSN is also needed to distinguish different DATA chunks.[8]
When a message is fragmented, the DATA TSN additionally doubles as a fragment sequence number. This means that all fragments in a message must be sent using consecutive TSNs, effectively blocking all other data. The I-DATA chunk disentangles the different uses of the TSN in DATA chunks.
As DATA and I-DATA chunks are not compatible, they may not both be used in the same association.
+
Bits 0–7
8–11
12
13
14
15
16–31
0
Chunk type = 64
Reserved
I
U
B
E
Chunk length
32
TSN
64
Stream identifier
Reserved
96
Message identifier
128
Payload protocol identifier / Fragment sequence number
160
Data
Chunk type
always 64 for payload data supporting interleaving (I-DATA).
U — If set, this indicates this data is an unordered chunk. If an unordered chunk is fragmented, then each fragment has this flag set.
B — If set, this marks the beginning fragment. An unfragmented chunk has this flag set.
E — If set, this marks the end fragment. An unfragmented chunk has this flag set.
Chunk length
The chunk length has a minimum value of 21, as data of size less than one byte is not allowed.
Fixed parameters:
Transmission sequence number (TSN)
The sequence number for the entire DATA stream (used for acknowledgement and retransmission).
Stream identifier
Identifier of the stream that this data chunk belongs to.
Message identifier (MID)
Identifier of the message in this stream. If a message is fragmented then the same value is used for all fragments. For ordered messages, the MID also specifies the order in which the messages should be delivered to the upper layer. Ordered and unordered messages in the same stream use independent MID sequences.
Payload protocol identifier
Application-specific protocol identifier,[4] only present if the B flag is set. SCTP makes no use of this or modification of it. However, devices along the path or the endpoints may use it. A value of 0 indicates that no payload protocol is specified.
Fragment sequence number
Fragment number for fragmented packets. Only present if the B flag is not set. If the B flag is set, then the fragment sequence number is implicitly zero, and the payload protocol identifier occupies the same space instead.
The FORWARD-TSN chunk was introduced to support selective unreliability: it allows the sender to tell the receiver that it will not retransmit some number of chunks, and requests that the receiver consider all these chunks as received.
+
Bits 0–7
8–15
16–31
0
Chunk type = 192
Chunk flags
Chunk length
32
New cumulative TSN
64
Stream identifier 1
Stream sequence number 1
...
...
...
32 + N × 32
Stream identifier N
Stream sequence number N
Chunk type
always 192 for the forward TSN chunk (FORWARD-TSN).
Chunk flags
There are currently no flags used.
Chunk length
Depends on the number of new stream sequence numbers included.
Fixed parameters:
New cumulative transmission sequence number (TSN)
The next TSN that the receiver should expect. Any previous TSNs should be considered received.
Optional parameters:
Stream identifier 1..N
Stream identifiers of streams that were skipped by this chunk.
Stream sequence 1..N
New stream sequence numbers associated with the streams that were skipped.
^Castagnoli, G.; S. Brauer; M. Herrmann (June 1993). "Optimization of Cyclic Redundancy-Check Codes with 24 and 32 Parity Bits". IEEE Transactions on Communications. 41 (6): 883. doi:10.1109/26.231911.. Castagnoli's et al. work on algorithmic selection of CRC polynomials
^Although RFC 4895 mentions padding, strictly speaking, the padding is not part of the AUTH chunk: it is not included in the chunk length, and its presence is already ensured by the SCTP protocol itself, mandated by RFC 4960 (section 3.2).
^RFC 4821 - Packetization Layer Path MTU Discovery
^The order of two ordered chunks may depend on the combination of TSN and SSN, and two otherwise identical unordered chunks are only distinguishable by their TSNs.