Você está na página 1de 10

SCTP packet Format The (SCTP) has a simpler basic packet structure than.

Each consists of two basic sections:

1. The common header, which occupies the first 12 bytes. In the diagram to the
right, 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. A chunk contains either control information or user data. Multiple chunks can be bundled into one SCTP packet except for the INIT, INIT ACK, and SHUTDOWN COMPLETE chunks.

SCTP Common Header Field Descriptions : Source port and Destination Port: (16 bits) field identifies the sending and receiving port. Verification Tag: 32 bits (unsigned integer) It is used for validate the sender of this SCTP packet. A random value created during initialization. While transmitting, the value of this Verification Tag MUST be set to the value of the Initiate Tag received from the peer endpoint during the association initialization, with the following exceptions: - A packet containing an INIT chunk MUST have a zero Verification Tag. - A packet containing a SHUTDOWN-COMPLETE chunk with the T-bit set MUST have the Verification Tag copied from the packet with the SHUTDOWN-ACK chunk. - A packet containing an ABORT chunk may have the verification tag copied from the packet which caused the ABORT to be sent.

An INIT chunk MUST be the only chunk in the SCTP packet carrying it. Chunk Field Descriptions: 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 value General purpose data field whose definition varies with the chunk type. 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.

Chunk types are described below:

Chunk Value: The Chunk Value field contains the actual information to be transferred in the chunk. The total length of a chunk (including Type, Length and Value fields) MUST be a multiple of 4 bytes. If the length of the chunk is not a multiple of 4 bytes, the sender MUST pad the chunk with all zero bytes. Data Chunk Descriptions:

Chunk type : Always zero for payload data (DATA). I bit : 1 bit SACK chunk being sent back without delay. U bit: 1 bit The (U)nordered bit, if set to 1, indicates that this is an unordered DATA chunk, B bit: 1 bit The (B)eginning fragment bit, E bit: 1 bit The (E)nding fragment bit, Fixed Parameters: Transmission Sequence Number: 32 bits (unsigned integer) This value represents the SN for the entire DATA stream. The valid range of TSN is from 0 to 4294967295 (2**32 1). TSN wraps back to 0 after reaching 4294967295. Stream Identifier S: 16 bits (unsigned integer) Identifies the stream to which the following user data belongs. Stream Sequence Number n: 16 bits (unsigned integer) This value represents the stream sequence number of the following user data(message) within the stream S. Valid range is 0 to 65535. When a user message is fragmented by SCTP for transport, the same stream sequence number MUST be carried in each of the fragments of the message. Payload protocol identifier Application-specific protocol identifier. SCTP makes no use of this or modification of it. However, devices along the path or the endpoints may use it. Data Application-specific data. Optional parameters: NONE. INIT Chunk:

This chunk is used to initiate a SCTP association between two endpoints.

Chunk type: always one for initiation (INIT). Chunk flags There are currently no flags used. Chunk length 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 It 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 allocated for this association.

# 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. INIT ACK chunk The INIT ACK chunk replicates the INIT chunk except the chunk type is always two. 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 SACK chunk

Chunk type always three for initiation (SACK). Chunk flags There are currently no flags used. Chunk length 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 received in sequence so is the sequence number of the last received byte. The immediate value after this one has not been received yet. 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 block start and gap ACK block end pairs included. Number of duplicate TSNs Indicates the number of duplicate TSNs the endpoint has received. Optional parameters appear with alternating background colors of green and blue: Gap ACK block #n start Indicates the TSN (added to the cumulative TSN ACK) of a block of TSNs to acknowledge. Gap ACK block #n end Indicates the TSN (added to the cumulative TSN ACK) of a block of TSNs to acknowledge.

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. Heartbeat Chunk Chunk type For heartbeat (HEARTBEAT), this value is always four. Chunk flags There are currently no flags used. Chunk length This is the chunk length which has a minimum value of 8 with no parameter value added. Fixed parameters: None Optional parameters are shown with alternating background colors of green and blue: Parameter type = 1 This parameter contains the sender-specific heartbeat info

Heartbeat Ack Chunk Chunk type For heartbeat acknowledgement (HEARTBEAT ACK), this value is always five. Chunk flags There are currently no flags used. Chunk length This is the chunk length which has a minimum value of 8 with no parameter value added. Fixed parameters: None Optional parameters are shown with alternating background colors of green and blue: Parameter type = 1 This parameter contains the sender-specific heartbeat info received in the request. Abort chunk

Chunk type always six for abort (ABORT). Chunk flags There is currently only one flag used: T

Set if the sender didn't have a TCB; not set if the sender had one (that it destroyed). 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. SHUTDOWN chunk:

Chunk type For shutdown (SHUTDOWN), this value is always seven. Chunk flags There are currently no flags used. Chunk length This is the chunk length which has a fixed length of 8. Fixed parameters: Cumulative TSN ACK Contains the last TSN received in sequence by the sender. SHUTDOWN ACK Chunk:

Chunk type For shutdown acknowledgement (SHUTDOWN ACK), this value is always eight. Chunk flags There are currently no flags used. Chunk length This is the chunk length which has a fixed length of 4. Cookie Echo chunk

Chunk type always ten for cookie echo (COOKIE ECHO). Chunk flags There are currently no flags used. Chunk length This is the chunk length. Chunk value Contains the cookie data. Cookie Ack Chunk

Chunk type For cookie acknowledgement (COOKIE ACK), this value is always eleven. Chunk flags There are currently no flags used. Chunk length This is the chunk length and is always 4. SHUTDOWN Complete

Chunk type For shutdown complete (SHUTDOWN COMPLETE), this value is always fourteen. Chunk flags There is currently only one flag defined T Set if the sender didn't have a TCB; not set if the sender had one (that it destroyed). Chunk length This is the chunk length which has a fixed length of 4.

Você também pode gostar