2.2.1 Header

The 16-byte SMP header has the following format.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

SMID

FLAGS

SID

LENGTH

SEQNUM

WNDW

SMID (1 byte): This unsigned integer is the SMP packet identifier and MUST always be assigned the value 0x53. This field indicates that the packet is an SMP packet, which helps to distinguish it from other protocol packets.

FLAGS (1 byte): This unsigned integer value contains the control flags, as defined in section 2.2.1.1.

SID (2 bytes): This unsigned integer is the session identifier. This value is a unique identifier for each session that is multiplexed over this connection.

LENGTH (4 bytes): This unsigned integer specifies the length, in bytes (including the header), of the SMP packet.

SEQNUM (4 bytes): This unsigned integer is the SMP sequence number for this packet in the session. The first DATA packet in each session MUST have a SEQNUM value of 0x00000001. For every DATA packet thereafter, this integer MUST monotonically increase by a value of 1 up to 0xffffffff, and then wraps back to a starting value of 0x00000000. Sequence numbers MUST only be incremented for DATA packets. For the ACK packet type, the sequence number MUST remain stable. For the FIN packet type, the sequence number SHOULD remain stable. For the SYN packet type, the sequence number SHOULD be 0x00000000.

WNDW (4 bytes): This unsigned integer indicates the maximum SEQNUM value permitted for a receive packet.

Note The difference between the values of the WNDW field of a received packet and the SEQNUM field of the last sent packet is the available send window size. Any subsequent packets that are sent MUST NOT contain a SEQNUM value that is greater than the value of the WNDW field of the last received packet.