Rahul Sharma (Editor)

SCTP packet structure

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

The Stream Control Transmission Protocol (SCTP) has a simpler basic packet structure than TCP. Each consists of two basic sections:

Contents

  1. The common header, which occupies the first 12 bytes. In the adjacent diagram, this header is highlighted in blue.
  2. 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 as well as different control messages.

Common header

All SCTP packets require the common header section (shown with a blue background).

Source port 
This field identifies the sending port.
Destination port 
This field identifies the receiving port that hosts use to route the packet to the appropriate endpoint/application.
Verification tag 
A 32-bit random value created during initialization to distinguish stale packets from a previous connection.
Checksum 
SCTP's original design catered for Adler-32; but RFC 3309 changed the protocol to use the CRC32c algorithm.

Chunks

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.

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 & length fields.

    List of chunk types

    RFC 2960 defines the following list of chunk types. More detailed information about each type is provided in the following subsections.

    Following this table each chunk and its parameters are defined. Please note the following color scheme:

  • gray: chunk fields
  • red: fixed parameters
  • green/blue: optional/variable-length parameters that alternate colors
  • Fixed parameters: Optional parameters: none. Fixed parameters have identical meaning as INIT ACK: Optional parameters appear with alternating background colors of green and blue:

    INIT ACK chunk

    The INIT ACK chunk replicates the INIT chunk except the chunk type is always two.

    Mandatory parameters, only in INIT ACK: Fixed parameters: Optional parameters appear with alternating background colors of green and blue: Fixed parameters: None Optional parameters are shown with alternating background colors of green and blue: Fixed parameters: None Optional parameters are shown with alternating background colors of green and blue:

    ABORT chunk

    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. Fixed parameters: Fixed parameters: None. Optional parameters are shown with alternating background colors of green and blue:

    ECNE chunk

    Not defined yet.

    CWR chunk

    Not defined yet.

    SHUTDOWN COMPLETE chunk

    Chunk length 
    This is the chunk length which has a fixed length of 4.

    References

    SCTP packet structure Wikipedia