Structure and Encoding of PDUs (Part 1)
7.1 Structure
All Protocol Data Units shall contain an integral number of octets. The octets in a PDU are numbered starting from one (1) and increasing in the order in which they are submitted to the underlying service. The bits in an octet are numbered from one (1) to eight (8), where bit one (1) is the low-order (least significant) bit.
When consecutive octets are used to represent a binary number, the lower octet number has the most significant value.
Any implementation supporting this protocol is required to state in its specification the way in which octets are transferred, using the terms "most significant bit" and "least significant bit". The PDUs of this protocol are defined using the terms "most significant bit" and "least significant bit".
Note: When the encoding of a PDU is represented using a diagram in this Clause the following representation is used:
a) octets are shown with the lowest numbered octet to the left, higher number octets being further to the right;
b) within an octet, bits are shown with bit eight (8) to the left and bit one (1) to the right.
PDUs shall contain, in the following order:
- the fixed part;
- the address part;
- the segmentation part, if present;
- the Options part, if present;
and the data field, if present. This structure is illustrated in Figure 2:
7.2 Fixed Part
7.2.1 General
The fixed part of the PDU header contains frequently occurring parameters including the type code (DT or ER) of the protocol data unit. The length and the structure of the fixed part are defined by the PDU code.
The fixed part has the following format:
Part Described in
___________________________________
| Fixed Part | Section 7.2
|_________________________________|
| Address Part | Section 7.3
|_________________________________|
| Segmentation Part | Section 7.4
|_________________________________|
| Options Part | Section 7.5
|_________________________________|
| Data | Section 7.6
|_________________________________|
Figure 2: PDU Structure
Octet
________________________________________
| Network Layer Protocol Identifier | 1
|______________________________________|
| Length Indicator | 2
|______________________________________|
| Version/Protocol Id Extension | 3
|______________________________________|
| Lifetime | 4
|______________________________________|
| SP vline M S vline e/R | Type | 5
|______________________________________|
| Segment Length | 6,7
|______________________________________|
| Checksum | 8,9
|______________________________________|
Figure 3: PDU Header -- Fixed Part
7.2.2 Network Layer Protocol Identifier
The value of this field is set to binary 1000 0001 to identify this Network Layer protocol as ISO 8473, Protocol for Providing the Connectionless- mode Network Service. The value of this field is set to binary 0000 0000 to identify the Inactive Network Layer protocol subset.
7.2.3 Length Indicator
The length is indicated by a binary number, with a maximum value of 254 (1111 1110). The length indicated is the length in octets of the header, as described in Clause 7.1. The value 255 (1111 1111) is reserved for possible future extensions.
Note: The rules for forwarding and segmentation guarantee that the header length is the same for all segments (Derived PDUs) of the Initial PDU, and is the same as the header length of the Initial PDU. The size of a PDU header will not change due to operation of any protocol function.
7.2.4 Version/Protocol Identifier Extension
The value of this field is binary 0000 0001, which identifies the standard Version 1 of ISO 8473, Protocol for Providing the Connectionless-mode Network Service.
7.2.5 PDU Lifetime
The PDU Lifetime field is encoded as a binary number representing the remaining lifetime of the PDU, in units of 500 milliseconds.
7.2.6 Flags
7.2.6.1 Segmentation Permitted
The Segmentation Permitted flag indicates whether segmentation is permitted. Its value is determined by the originator of the PDU and cannot be changed by any other network-entity for the lifetime of the Initial PDU and any Derived PDUs.
A value of one (1) indicates that segmentation is permitted. A value of zero (0) indicates that the non-segmenting protocol subset is employed. When the value of zero is selected, the segmentation part of the PDU header is not present, and the Segment Length field serves as the Total Length field (see Clause 7.2.8).
7.2.6.2 More Segments
The More Segments flag indicates whether the data segment in this PDU contains (as its last octet) the last octet of the User Data in the NSDU. When the More Segments flag is set to one (1), segmentation has taken place and the last octet of the NSDU is not contained in this PDU. The More Segments flag cannot be set to one (1) if the Segmentation Permitted flag is not set to one (1).
When the More Segments flag is set to zero (0), the last octet of the Data Part of the PDU is the last octet of the NSDU.
7.2.6.3 Error Report
When the Error Report flag is set to one, the rules in Clause 6.10 are used to determine whether to generate an Error Report PDU if it is necessary to discard this Data PDU.
When the Error Report flag is set to zero, discard of the Data PDU will not cause the generation of an Error Report PDU.
7.2.7 Type Code
The Type code field identifies the type of the protocol data unit. Allowed values are given in Table 5:
__________________________________________________
| | Bits 5 4 3 2 1 |
|_________|______________________________________|
| DT PDU | 1 1 1 0 0 |
|_________|______________________________________|
| ER PDU | 0 0 0 0 1 |
|_________|______________________________________|
Table 5: Valid PDU Types
7.2.8 PDU Segment Length
The Segment Length field specifies the entire length, in octets, of the Derived PDU, including both header and data (if present). When the full protocol is employed and a PDU is not segmented, the value of this field is identical to the value of the Total Length field located in the Segmentation Part of the header.
When the non-segmenting protocol subset is employed, no segmentation part is present in the header. In this subset, the Segment Length field specifies the entire length of the Initial PDU, including both header and data (if present). The Segment Length field is not changed for the lifetime of the PDU.
7.2.9 PDU Checksum
The checksum is computed on the entire PDU header. For the Data PDU, this includes the segmentation and options parts (if present). For the Error Report PDU, this includes the reason for discard field as well.
A checksum value of zero is reserved to indicate that the checksum is to be ignored. The operation of the PDU Header Error Detection function (Clause 6.11) ensures that the value zero does not represent a valid checksum. A non-zero value indicates that the checksum must be processed. If the checksum calculation fails, the PDU must be discarded.
7.3 Address Part
7.3.1 General
Address parameters are distinguished by their location, immediately following the fixed part of the PDU header. The address part is illustrated Figure 4:
Octet
____________________________________________
| Destination Address Length Indicator | 10
|___________________________________________|
| | 11
: Destination Address :
| | m - 1
|___________________________________________|
| Source Address Length Indicator | m
|___________________________________________|
| | m + 1
: Source Address :
| | n - 1
|___________________________________________|
Figure 4: PDU Header -- Address Part
7.3.1.1 Destination and Source Addresses
The Destination and Source addresses used by this protocol are Network Service Access Point addresses as defined in ISO 8348/AD2, Addendum to the Network Service Definition Covering Network Layer Addressing.
The Destination and Source Addresses are variable length. The Destination and Source Address fields are encoded as Network Protocol Address Information using the Preferred Binary Encoding defined in Clause 8.3.1 of ISO 8348/AD2.
The Destination Address Length Indicator field specifies the length of the Destination Address in octets. The Destination Address field follows the Destination Address Length Indicator field.
The Source Address Length Indicator field specifies the length of the Source Address in octets. The Source Address Length Indicator field follows the Destination Address field. The Source Address field follows the Source Address Length Indicator field.
Each address parameter is encoded as illustrated in Table 5:
______________________________________________
| Octet | Address parameter Length Indicator |
| n | (e.g., 'm') |
|________|____________________________________|
| Octets | |
| n + 1 | Address Parameter Value |
| thru | |
| n + m | |
|________|____________________________________|
Figure 5: Address Parameters
7.4 Segmentation Part
If the Segmentation Permitted Flag in the Fixed Part of the PDU Header (Octet 4, Bit 8) is set to one, the segmentation part of the header, illustrated in Figure 6, must be present:
If the Segmentation Permitted flag is set to zero, the non-segmenting protocol subset is in use.
Octet
________________________
| Data Unit Identifier | n, n + 1
|______________________|
| Segment Offset | n + 2, n + 3
|______________________|
| Total Length | n + 4, n + 5
|______________________|
Figure 6: PDU Header -- Segmentation Part
7.4.1 Data Unit Identifier
The Data Unit Identifier identifies an Initial PDU (and hence, its Derived PDUs) so that a segmented data unit may be correctly reassembled. The Data Unit Identifier size is two octets.
7.4.2 Segment Offset
For each Derived PDU, the Segment Offset field specifies the relative position of the segment contained in the data field of the Derived PDU with respect to the start of the data field of the Initial PDU. The offset is measured in units of octets. The offset of the first segment (and hence, the Initial PDU) is zero; an unsegmented (Initial PDU) has a segment offset value of zero (0). The value of this field shall be a multiple of eight 8).
7.4.3 PDU Total Length
The Total Length field specifies the entire length of the Initial PDU, including both the header and data. This field is not changed for the lifetime of the Initial PDU (and hence, its Derived PDUs).