6.16-6.21 Multiplexing, Flow Control, Checksum and Related Functions
6.16 Multiplexing and Demultiplexing
Purpose: Concurrent sharing of a network connection by several transport connections.
TPDUs and Fields Used:
CC, DR, DC, DT, AK, ED, EA, RJ, ERR
- destination reference
Description:
This function is pervasive.
When this function is in operation, more than one transport connection can be simultaneously assigned to the same network connection.
Every TPDU (including DT TPDUs) must carry the destination reference, to identify the transport connection to which it refers.
6.17 Explicit Flow Control
Purpose: Regulation of flow of DT TPDUs independently of the flow control in the other layers.
TPDUs and Fields Used:
CR, CC, AK, RJ
- CDT (4 or 16 bits)
DT
- TPDU-NR (7 or 31 bits)
AK, RJ
- YR-TU-NR (7 or 31 bits)
- subsequence number (optional)
- flow control confirmation (optional)
Description:
The mechanism depends on the class. Thus the description can be found in the section describing the class.
6.18 Checksum
Purpose: To detect corruption of TPDUs by the network service provider.
TPDUs and Fields Used:
All TPDUs
- checksum (16 bits - 32 bits)
Description:
When a TPDU is to be transmited for a TC which has selected the checksum option, the sending transport entity must generate a checksum for the TPDU and store it in the checksum parameter in the variable part of the TPDU header. The checksum must be generated as follows:
-
Set up the complete TPDU, including the header and user data (if any). The header must include the checksum parameter in its variable part. The value field of the checksum parameter must be set to zero at this point. -
Initialize two variables to zero. Let these variables be called C0 and C1. -
For each octet of the TPDU, including the header, variable part of the header and the user data, add the octet value to C0, and then add the value of C0 to C1. Octets should be processed sequentially, starting with the first octet (the Length Indicator) and proceeding through the TPDU. All addition is to be performed modulo 255. -
Calculate the value field of the checksum parameter as follows. Let the offset into the TPDU of the first octet of the value field be 'n' (where the first octet of the TPDU, the Length Indicator of the header, is considered to be at offset 1). Let the length of the TPDU, i.e. the number of times the above operation was repeated, be 'L'. Let the first octet of the checksum value, i.e., the one at offset 'n' be called 'X', and the second octet, at offset 'n+1', be called 'Y'. Then:
X = (((L - n) * C0) - C1) modulo 255
Y = (((L - n + 1) * (-C0)) + C1) modulo 255
-
Place the computed values of X and Y in the appropriate octets of the TPDU.
NOTE
An implementation may use one's complete arithmetic as an
alternative to modulo 255 arithmetic. However, if either
of the checksum octets X and Y has the value minus zero
(i.e., 255) then it must be converted to plus zero
(i.e., 0) before being stored.
When a TPDU is received for a TC for which the checksum option has been selected, the TPDU must be verified to ensure that it has been received correctly. This is done by computing the checksum, using the same algorithm by which it was generated. The nature of the checksum algorithm is such that it is not necessary to compare explicitly the stored checksum bytes. The procedure described below may be used to verify that a TPDU has been correctly received.
-
Initialize two variable to zero. Let these variables be called C0 and C1. -
For each octet in the received TPDU, add the value of the octet to C0 and then add the value of C0 to C1, starting with the first octet and proceeding sequentially through the TPDU. All addition is to be performed modulo 255. -
When all octets have been sequentially processed, the values of C0 and C1 should be zero. If either or both of them is non-zero, the TPDU has been received incorrectly and the verification has failed. Otherwise, the TPDU has been received correctly and the TPDU should be processed normally.
NOTE
An implementation may use one's complement arithmetic as an
alternative to modulo 255 arithmetic. In this case, if either
C0 or C1 has the value minus zero (i.e., 255) it is to be
regarded as though it was plus zero (i.e., 0)
If a checksum verification failure occurs, it is not possible to determine the TC that the TPDU relates to, since the Reference field of the TPDU may have been received incorrectly. Therefore, all TCs multiplexed onto the same NC must be treated as though a network signalled error has occurred.
6.19 Frozen References
Purpose: To prevent re-use of a reference while TPDUs associated with the old use of the reference may still exist.
Description: When a transport entity determines that a particular connection has terminated, the reference shall be placed in a frozen state during which time it will not be reused. The circumstances under which this is done, and the period of time for which the reference remains frozen depends on the class.
6.20 Retransmission on Timeout
Purpose: To cope with unsignalled loss of TPDUs by the network service provider.
TPDUs and Fields Used:
CR, CC, DR, DT, ED, AK
Description:
The description is given in the section related to class 4.
6.21 Resequencing
Purpose: To cope with misordering of TPDUs by the network service provider.
TPDUs and Field Used:
DT
- TPDU NR
ED
- ED TPDU NR
Description:
The description is given in the section related to class 4.