 Hello and welcome to the session on packet format of stream control transmission protocol sctp part 1. At the end of this session students will be able to list and describe different packet types used in sctp. Students will be able to discuss the purpose and of each field in each packet. Here figure shows the general format of an sctp packet. An sctp packet has a mandatory general header and a set of blocks called chunks. There are two types of chunks, control chunks and data chunks. A control chunk controls and maintains the association. A data chunk carries user data. In a packet the control chunks come before the data chunks. Here the figure shows an sctp packet control chunks come before data chunks. Here the figure shows the general header. The general header also called as packet header defines the end points of each association to which the packet belongs. Which guarantees that the packet belongs to a particular association and preserves the integrity of the contents of the packets including the header itself. There are four fields in the general header. The field one is source port address. This is a 16 bit field that defines the port number of the process sending the packet. Second field is destination port address. This is a 16 bit field that defines the port number of the process receiving the packet. Third field is verification tag. This is a number that matches a packet to an association. This prevents a packet from a previous association from being mistaken as a packet in this association. It serves as an identifier for the association. It is repeated in every packet during the association. There is a separate verification used for each direction in the association. The fourth field is checksum. This 32 bit field contains a CRC32 checksum. Here note that the size of the checksum is increased from 16 bits as in UDP, TCP and IP protocol to 32 bits in SETP to allow the use of the CRC32 checksum. Chunks control information or user data are carried in chunks. Chunks have a common layout as shown in the figure. The first three fields are common to all chunks. The information field depends on the type of chunk. The important point to remember is that SETP requires the information section to be a multiple of four bytes. If not, padding bytes that is eight zeros are added at the end of the section. Chunks need to terminate on 32 bit that is four byte boundary. The description of the common fields are type. This 8 bit field can define up to 256 types of chunks. Only a few have been defined so far and the rest are reserved for future use. The flag field. This 8 bit field defines special flags that a particular chunk may need. Each bit has a different meaning depending on the type of chunk. The length field. Since the size of the information section is dependent on the type of chunk, here we define the chunk boundaries. This 16 bit field defines the total size of the chunk in bytes including the type flag and length fields. If a chunk carries no information, the value of the length field is four that is four bytes. Here note that the length of the padding, if any, is not included in the calculation of the length field. This helps the receiver find out how many useful bytes a chunk carries. If the value is not a multiple of four, the receiver knows there is a padding. For example, when the receiver sees a length of 17, it knows that the next number that is a multiple of four is 20. So, there are three bytes of padding that must be discarded. But if the receiver sees a length of 16, it knows that there is no padding. Here the table shows list of chunks and their descriptions with their type number. For example, type number 0, the chunk is data chunk which carries user data. For type 2 init ack that is acknowledges init chunks, for type 4 heartbeat probes the peer of loveliness. For type 7 shutdown, the terminates an association. The number of padding bytes is not included in the value of the length field, data. The data chunks carries the user data. A packet may contain zero or more data chunks. Here the figure shows the format of a data chunk. The descriptions of a common field are the same. The type field has a value of zero. The flag field has five reserved bits and three defined bits, U, B and E. The U unordered field when set to 1 signals unordered data. In this case, the value of the stream sequence number is ignored. B is beginning and E is end bits together define the position of a chunk in a message that is fragmented. When B is equal to 1 and E is equal to 1, there is no fragmentation, first and last. And the whole message is carried in one chunk. When B is equal to 1 and E is equal to 0, it is the first fragment. When B is equal to 0 and E is equal to 1, it is the last fragment. When B is equal to 0 and E is equal to 0, it is a middle fragment, neither the first nor the last. Here note that the value of the length field does not include padding. This value cannot be less than 17 because a data chunk must always carries at least one byte of data. Transmission sequence number. This 32-bit field defines the transmission sequence number. It is a sequence number that is initialized in an init chunk for one direction and in the init ack chunk for the opposite direction. Stream identifier. The 16-bit field defines each stream in an association. All chunks belonging to the same stream in one direction carry the same stream identifier. The stream sequence number. The 16-bit field defines a chunk in a particular stream in one direction. Protocol identifier. This 32-bit field can be used by the application program to define the type of data. It is ignored by the stp layer. User data. This field carries the actual user data. STP has some specific rules about the user data field. First, no chunk can carry data belonging to more than one message but a message can be spread over several data chunks. Second, this field cannot be empty. It must have at least one byte of user data. And the third is if the data cannot end at 32-bit boundary, padding must be added. A data chunk cannot carry data belonging to more than one message but a message can be split into several chunks. Here pause the video, think and answer. In stp, a data chunk is numbered using answer A that is a TSN. Then pause the video, think and answer. To distinguish between different data chunks belonging to the same stream STP uses, the answer is C that is SSNs. Here is the reference. Thank you.