8.1-8.2 Encoding: Summary and Structure
8. ENCODING
8.1 Summary
Classes
0 1 2 3 4 Sect. Code
CR Connection Request x x x x x 8.3 1110xxxx
CC Connection Confirm x x x x x 8.4 1101xxxx
DR Disconnect Request x x x x x 8.5 10000000
DC Disconnect Confirm x x x x 8.6 11000000
DT Data x x x x x 8.7 11110000
ED Expedited Data x NF x x 8.8 00010000
AK Data Acknowledgement NRC NF x x 8.9 0110xxxx
(Note 1)
EA Expedited Data x NF x x 8.10 00100000
Acknowledgement
RJ Reject (Note 1) x x 8.11 0101xxxx
ERR TPDU Error x x x x x 8.12 01110000
not available (Note 2) - 00000000
not available (Note 2) - 00110000
not available (Note 2) - 1001xxxx
not available (Note 2) - 1010xxxx
Where xxxx (bits 4-1) is used to signal the CDT
Note 1: In extended header format, the code for AK=0110 0000 and the
code for RJ=0101 0000.
Note 2: These codes are already in use in compatible protocols
defines by standards organizations other than CCITT/ISO.
NF: Not available when the non explicit flow control option is
selected.
NRC: Not available when the receipt confirmation option is
selected.
8.2 Structure
As defined in the previous sections, all the Transport Protocol Data Units (TPDU) shall contain an integral number of octets. The octets in a TPDU are numbered starting from 1 and increasing in the order of transmission. The bits in an octet are numbered from 1 to 8, where bit 1 is the low-ordered bit.
There are tao types of TPDUs:
- Data TPDUs, used to transfer Transport Service Data Units (TSDUs). The structure of the TSDUs is maintained by means of the TSDU End Mark.
- Control TPDUs, used to control the transport protocol functions, including the optional functions.
Octets 1 2 3 4 n n+1 p p+1
------------ -------------- -------------- --------
LI| | | | ... | | | .... | | | .... |
------------ -------------- -------------- --------
<--- Fixed Part -----><-- Variable Part->
(including checksum
where applicable)
<--------------Header-------------------><----Data Field->
A TPDU is divided into four parts:
- Length Indicator Field (LI)
- Fixed Part
- Variable Part (may be omitted)
- Data Field (may be omitted)
The length Indicator Field, Fixed Part and Variable Part constitute the Header of the TPDU.
8.2.1 Length Indicator Field
This field is contained in the first octet of the TPDUs. The length is indicated by a binary number, with a maximum value of 254 (11111110). The length indicated is the header length, including parameters, but excluding the length indicator field and user data, if any. The value 255 (11111111) is reserved for possible extensions.
8.2.2 Fixed Part
The fixed part contains frequently occurring functions including the code of the TPDU. The length and the structure of the fixed part are defined by the TPDU code, defined by bits 5 to 8 of the second octet of the header.
8.2.2.1 TPDU Code
This field contains the TPDU code and is contained in Octet 2 of the header. It is used to define the structure of the remaining header. This field is a full octet except in the following cases:
1110 xxxx Connecting Request
1101 xxxx Connection Confirm
0101 xxxx Reject
0110 xxxx Data Acknowledgement
Where xxxx (bits 4-1) is used to signal the CDT.
Any other bit pattern may be used to define a TPDU Code. Only those codes defined in Section 8.1 are currently valid.
8.2.3 Variable Part
The variable part is used to define parameters relating to optional functions. If the variable part is present, it shall contain one or more parameters. The number of parameters that may be contained in the varialbe part is indicated by the length of the variable part which is a LI minus the length of the fixed part.
Since the currently defined minimum fixed part for headers which allow parameters is four octets, and since the length indication field is limited to a maximum of 254, the maximum length of the variable part is 250 octets.
Each parameter contained within the variable part is coded as follows:
Bits 8 7 6 5 4 3 2 1
Octets
n+1 Parameter Code
n+2 Parameter Length
Indication (e.g."m")
n+3 Parameter Value
n+2+m
- The parameter code field is coded in binary and, without extensions, provides a maximum number of 255 different parameters. However, as noted below, bits 8 and 7 indicates the source of definition, so the practical maximum number of different parameters is less. Parameter code 1111 1111 is reserved for possible extensions of the parameter code.
- The parameter length indication indicates the length, in octets, of the parameter value field. The length is indicated by a binary number, "m" with a theoretical maximum value of 255. The practical maximum value of "m" is lower. For example, in the case of a single parameter contained within the variable part, two octets are required for the Parameter Code and the Parameter Length Indication itself. Thus, the value of "m" is limited to 248. For larger fixed parts of the header and for each succeedimg parameter, the maximum value of "m" decreases.
- The parameter value field contains the value of the parameter identified in the parameter code field.
- No standard parameter codes use bits 8 and 7 with the value 00.
- Implementations shall accept the parameters defined in the variable part in any order. If any parameter is duplicated then the later value will be used.
8.2.3.1 Checksum Parameter (Class 4 only)
All TPDU types may contain a checksum parameter in their variable part. This parameter must always be present except when the non use of checksum option is selected.
Parameter Code: 1100 0011
Parameter Length: 2
Parameter Value: Result of checksum algorithm.
This algorithm is specified in
Section 6.18.
8.2.4 Data Field
This field contains transparent user data. Restrictions on its size are noted for each command.