Message Numbers
All normal-flow messages that are transmitted between the SLU and the PLU during an LU-LU session are numbered in sequence. The SLU maintains a sequence number for normal-flow messages from the SLU to the PLU and another sequence number for normal-flow messages from the PLU to the SLU. Each normal-flow message gets a sequence number one greater than the sequence number of the preceding normal-flow message. There is one pair of sequence numbers for each session that is established between an SLU and a PLU.
For LU-LU expedited-flow messages and for all SSCP-LU and SSCP-PU messages, unsequenced identifiers are used instead of sequence numbers.
When a session is reestablished or a CLEAR command is sent, the PLU and the SLU set their sequence numbers to 0. The PLU can change the sequence numbers with the Set and Test Sequence Numbers (STSN) command. This enables correct sequence numbering when a session is recovered or restarted.
When the SLU encounters a sequence number error, it sends a negative response to the PLU if a response was requested. When the SLU reads a response, the SLU uses the response sequence number to correlate the response with the original request. When the SLU writes a response, the SLU must supply the sequence number of the original request.