INTERNATIONAL TELECOMMUNICATION UNION I T U - T X.224 TELECOMMUNICATION (11/93) STANDARDIZATION SECTOR OF ITU DATA NETWORKS AND OPEN SYSTEM COMMUNICATIONS OPEN SYSTEMS INTERCONNECTION - CONNECTION-MODE PROTOCOL SPECIFICATIONS PROTOCOL FOR PROVIDING THE OSI CONNECTION-MODE TRANSPORT SERVICE ITU-T Recommendation X.224 (Previously "CCITT Recommendation") FOREWORD The ITU-T (Telecommunication Standardization Sector) is a permanent organ of the International Telecommunication Union (ITU). The ITU-T is responsible for studying technical, operating and tariff questions and issuing Recommen dations on them with a view to standardizing telecommunications on a worldwide basis. The World Telecommunication Standardization Conference (WTSC), which meets every four years, etablishes the topics for study by the ITU-T Study Groups which, in their turn, produce Recommendations on these topics. The approval of Recommendations by the Members of the ITU-T is covered by the procedure laid down in WTSC Resolution No. 1 (Helsinki, March 1-12, 1993). ITU-T Recommendation X.224 was revised by ITU-T Study Group 7 (1993-1996) and was approved under the WTSC Resolution No. 1 procedure on the 16th of November 1993. ___________________ NOTE In this Recommendation, the expression "Administration" is used for conciseness to indicate both a telecommunication administration and a recognized operating agency. (C) ITU 1994 All rights reserved. No part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from the ITU. ITU-T X-SERIES RECOMMENDATIONS DATA NETWORKS AND OPEN SYSTEM COMMUNICATIONS (February 1994) ORGANIZATION OF X-SERIES RECOMMENDATIONS Subject area Recommendation series PUBLIC DATA NETWORKS Services and facilities X.1-X.19 Interfaces X.20-X.49 Transmission, signalling and switching X.50-X.89 Network aspects X.90-X.149 Maintenance X.150-X.179 Administrative arrangements X.180-X.199 OPEN SYSTEMS INTERCONNECTION Model and notation X.200-X.209 Service definitions X.210-X.219 Connection-mode protocol specifications X.220-X.229 Connectionless-mode protocol specifications X.230-X.239 PICS proformas X.240-X.259 Protocol identification X.260-X.269 Security protocols X.270-X.279 Layer managed objects X.280-X.289 Conformance testing X.290-X.299 INTERWORKING BETWEEN NETWORKS General X.300-X.349 Mobile data transmission systems X.350-X.369 Management X.370-X.399 MESSAGE HANDLING SYSTEMS X.400-X.499 DIRECTORY X.500-X.599 OSI NETWORKING AND SYSTEM ASPECTS Networking X.600-X.649 Naming, addressing and registration X.650-X.679 Abstract Syntax Notation One (ASN.1) X.680-X.699 OSI MANAGEMENT X.700-X.799 SECURITY X.800-X.849 OSI APPLICATIONS Commitment, concurrency and recovery X.850-X.859 Transaction processing X.860-X.879 Remote operations X.880-X.899 OPEN DISTRIBUTED PROCESSING X.900-X.999 Recommendation X.224 (11/93) i CONTENTS Recommendation X.224 (11/93) Page 1 Scope ............................................................................................................................................................ 1 2 References..................................................................................................................................................... 1 2.1 Identical Recommendations | International Standards ...................................................................... 2 2.2 Paired Recommendations | International Standards equivalent in technical content......................... 2 3 Definitions .................................................................................................................................................... 2 4 Abbreviations................................................................................................................................................ 4 4.1 Data units ........................................................................................................................................ 4 4.2 Types of Transport Protocol data units............................................................................................. 4 4.3 TPDU Fields.................................................................................................................................... 4 4.4 Times and associated variables ........................................................................................................ 5 4.5 Miscellaneous.................................................................................................................................. 5 5 Overview of the Transport Protocol............................................................................................................... 5 5.1 Service provided by the Transport Layer.......................................................................................... 6 5.2 Service assumed from the Network Layer ........................................................................................ 6 5.3 Functions of the Transport Layer ..................................................................................................... 8 5.4 Classes and options when operating over CONS ............................................................................. 9 5.5 Characteristics of class 4 transport protocol when operating over CLNS ......................................... 11 5.6 Model of the Transport Layer .......................................................................................................... 11 6 Elements of procedure................................................................................................................................... 12 6.1 Use of the network service............................................................................................................... 12 6.2 Transport protocol data unit (TPDU) transfer .................................................................................. 13 6.3 Segmenting and reassembling.......................................................................................................... 14 6.4 Concatenation and separation .......................................................................................................... 14 6.5 Connection establishment ................................................................................................................ 15 6.6 Connection refusal........................................................................................................................... 21 6.7 Normal release................................................................................................................................. 21 6.8 Error release when operating over CONS ........................................................................................ 23 6.9 Association of TPDUs with transport connections........................................................................... 24 6.10 Data TPDU numbering .................................................................................................................... 27 6.11 Expedited data transfer .................................................................................................................... 28 6.12 Reassignment after failure when operating over CONS ................................................................... 29 6.13 Retention and acknowledgement of TPDUs..................................................................................... 30 6.14 Resynchronization ........................................................................................................................... 32 6.15 Multiplexing and demultiplexing when operating over CONS......................................................... 34 6.16 Explicit flow control ........................................................................................................................ 34 6.17 Checksum ........................................................................................................................................ 35 6.18 Frozen references............................................................................................................................. 36 6.19 Retransmission on time-out.............................................................................................................. 37 6.20 Resequencing .................................................................................................................................. 37 6.21 Inactivity control.............................................................................................................................. 37 6.22 Treatment of protocol errors............................................................................................................. 38 6.23 Splitting and recombining when operating over CONS ................................................................... 39 7 Protocol classes............................................................................................................................................. 39 ii Recommendation X.224 (11/93) Page 8 Specification for class 0: Simple class........................................................................................................... 41 8.1 Functions of class 0 ......................................................................................................................... 41 8.2 Procedures for class 0 ...................................................................................................................... 41 9 Specification for class 1: Basic error recovery class ...................................................................................... 41 9.1 Functions of class 1 ......................................................................................................................... 41 9.2 Procedures for class 1 ...................................................................................................................... 42 10 Specification for class 2: Multiplexing class ................................................................................................. 43 10.1 Functions of class 2 ......................................................................................................................... 43 10.2 Procedures for class 2 ...................................................................................................................... 43 11 Specification for class 3: Error recovery and multiplexing class.................................................................... 45 11.1 Functions of class 3 ......................................................................................................................... 45 11.2 Procedures for class 3 ...................................................................................................................... 45 12 Specification for class 4: Error detection and recovery class ......................................................................... 47 12.1 Functions of class 4 ......................................................................................................................... 47 12.2 Procedures for class 4 ...................................................................................................................... 47 13 Structure and encoding of TPDUs................................................................................................................. 59 13.1 Validity............................................................................................................................................ 59 13.2 Structure.......................................................................................................................................... 60 13.3 Connection request (CR) TPDU ...................................................................................................... 62 13.4 Connection Confirm (CC) TPDU .................................................................................................... 66 13.5 Disconnect Request (DR) TPDU ..................................................................................................... 67 13.6 Disconnect Confirm (DC) TPDU..................................................................................................... 68 13.7 Data (DT) TPDU ............................................................................................................................. 69 13.8 Expedited data (ED) TPDU ............................................................................................................. 70 13.9 Data acknowledgement (AK) TPDU................................................................................................ 71 13.10 Expedited data acknowledgement (EA) TPDU ................................................................................ 72 13.11 Reject (RJ) TPDU............................................................................................................................ 73 13.12 TPDU error (ER) TPDU .................................................................................................................. 74 14 Conformance................................................................................................................................................. 75 Annex A - State tables........................................................................................................................................... 76 A.1 General ............................................................................................................................................ 76 A.2 Conventions..................................................................................................................................... 76 A.3 Tables .............................................................................................................................................. 77 A.4 State tables for classes 0 and 2......................................................................................................... 79 A.5 State tables for classes 1 and 3......................................................................................................... 82 A.6 State tables for class 4 over CONS................................................................................................... 88 A.7 State tables for class 4 over CLNS ................................................................................................... 94 Annex B - Network connection management subprotocol ..................................................................................... 98 B.1 Introduction ..................................................................................................................................... 98 B.2 Scope............................................................................................................................................... 98 B.3 Definitions....................................................................................................................................... 98 B.4 Abbreviations................................................................................................................................... 99 B.5 Overview of the protocol.................................................................................................................. 99 B.6 Elements of procedure ..................................................................................................................... 100 B.7 Protocol operation............................................................................................................................ 105 B.8 Structure and encoding of TPDUs ................................................................................................... 109 B.9 Conformance ................................................................................................................................... 111 B.10 State Table....................................................................................................................................... 112 B.11 Diagram for NCMS protocol operation ............................................................................................ 115 Recommendation X.224 (11/93) iii Page Annex C - PICS Proforma ..................................................................................................................................... 118 C.1 General ............................................................................................................................................ 118 C.2 Identification.................................................................................................................................... 118 C.3 Indices used in this annex................................................................................................................ 119 C.4 Based standard/recommendation conformance................................................................................. 121 C.5 General statement of conformance ................................................................................................... 121 C.6 Protocol implementation .................................................................................................................. 121 C.7 NCMS functions.............................................................................................................................. 121 C.8 Initiator/responder capability for protocol classes 0 - 4 .................................................................... 122 C.9 Supported functions......................................................................................................................... 122 C.10 Supported TPDUs............................................................................................................................ 128 C.11 Supported parameters of issued TPDUs ........................................................................................... 129 C.12 Supported parameters for received TPDUs....................................................................................... 136 C.13 User data in issued TPDUs .............................................................................................................. 137 C.14 User data in received TPDUs........................................................................................................... 137 C.15 Negotiation ...................................................................................................................................... 138 C.16 Error handling ................................................................................................................................. 142 C.17 Timers and protocol parameters ....................................................................................................... 143 Annex D - Checksum Algorithms.......................................................................................................................... 144 D.1 Symbols ........................................................................................................................................... 144 D.2 Arithmetic conventions.................................................................................................................... 144 D.3 Algorithm for generating checksum parameters ............................................................................... 144 D.4 Algorithm for checking checksum parameters.................................................................................. 144 Annex E - State tables for operation of class 4 over connection-mode and connectionless-mode network services 145 E.1 General ............................................................................................................................................ 145 E.2 Conventions..................................................................................................................................... 145 E.3 Tables .............................................................................................................................................. 145 E.4 State tables for Class 4..................................................................................................................... 145 Appendix I - Differences between Recommendation X.224 and ISO/IEC 8073:1992 ........................................... 154 I.1 Assignment to network connections................................................................................................. 154 I.2 Conformance ................................................................................................................................... 154 I.3 Class negotiation ............................................................................................................................. 154 I.4 Precedence....................................................................................................................................... 154 I.5 Difference between Recommendation X.224 and ISO/IEC 8073 ..................................................... 154 iv Recommendation X.224 (11/93) SUMMARY This Recommendation specifies a common encoding and a five classes of transport protocol procedures which provide connection-mode transport service over either connection-mode or connectionless-mode network service and to be used with different network qualities of service. Recommendation X.224 (11/93) v Introduction This Recommendation is one of a set of Recommendations produced to facilitate the interconnection of information processing systems. This set of Recommendations covers the services and protocols required to achieve such interconnection. The Transport Protocol is positioned with respect to other related Recommendations by the layers defined in the Reference Model for Open Systems Interconnection (CCITT Rec. X.200 | ISO 7498). It is most closely related to, and lies within the field of application of the Transport Service (ITU-T Rec. X.214 | ISO/IEC 8072). It also uses and makes reference to the Network Service Standard (CCITT Rec. X.213 | ISO/IEC 8348), whose provisions it assumes in order to accomplish the transport protocol's aims. The interrelationship of these Recommendations is illustrated in Figure 1. T0719300-94/d01 Transport Protocol Specification TRANSPORT SERVICE DEFINITION Reference to aims Reference to assumptions NETWORK SERVICE DEFINITION FIGURE 1/X.224 Relationship between the Transport Protocol and adjacent services FIGURE 1/X.224...[D01] = 3.5 CM This Recommendation specifies a common encoding and a number of classes of transport protocol procedures to be used with different network qualities of service. It is intended that the Transport Protocol should be simple but general enough to cater for the total range of Network Service qualities possible, without restricting future extensions. The protocol is structured to give rise to classes of protocol which are designed to minimize possible incompatibilities and implementation costs. The classes are selectable with respect to the Transport and Network Services in providing the required quality of service for the interconnection of two session entities (each class provides a different set of functions for enhancement of service qualities). This Recommendation defines mechanisms that can be used to optimize network tariffs and enhance the following qualities of service: a) different throughput; b) different error rates; c) integrity of data requirements; d) reliability requirements. It does not require an implementation to use all of these mechanisms, nor does it define methods for measuring achieved quality of service or criteria for deciding when to release transport connections following quality of service degradation. The primary aim of this Recommendation is to provide a set of rules for communication expressed in terms of the procedures to be carried out by peer entities at the time of communication. These rules for communication are intended to provide a sound basis for development in order to serve a variety of purposes i.e.: a) as a guide for implementors and designers; b) for use in the testing and procurement of equipment; c) as part of an agreement for the admittance of systems into the open systems environment; d) as a refinement of the understanding of OSI. vi Recommendation X.224 (11/93) As it is expected that the initial users of this Recommendation will be designers and implementors of equipment this Recommendation contains, in notes or in annexes, guidance on the implementation of the procedures defined herein. It should be noted that, as the number of valid protocol sequences is very large, it is not possible with current technology to verify that an implementation will operate the protocol defined in this Recommendation correctly under all circumstances. It is possible by means of testing to establish confidence that an implementation correctly operates the protocol in a representative sample of circumstances. It is, however, intended that this Recommendation can be used in circumstances where two implementations fail to communicate in order to determine whether one or both have failed to operate the protocol correctly. This Recommendation contains a clause on conformance of equipment claiming to implement the procedures in this Recommendation. To evaluate conformance of a particular implementation, it is necessary to have a statement of which capabilities and options have been implemented for a given OSI protocol. Such a statement is called a Protocol Implementation Conformance Statement (PICS). A PICS proforma is provided in Annex C. Attention is drawn to the fact that this Recommendation does not contain any tests to demonstrate this conformance. The variations and options available within this Recommendation are essential as they enable a transport service to be provided for a wide variety of applications over a variety of network qualities. Thus, a minimally conforming implementation will not be suitable for use in all possible circumstances. It is important, therefore, to qualify all references to this Recommendation with statements of the options provided or required or with statements of the intended purpose of provision or use. Recommendation X.224 (11/93) vii Recommendation X.224 Recommendation X.224 (11/93) PROTOCOL FOR PROVIDING THE OSI CONNECTION-MODE TRANSPORT SERVICE 1 ) (Malaga-Torremolinos, 1984; amended at Melbourne, 1988, and at Geneva, 1993) 1 Scope This Recommendation specifies a) five classes of procedures when operating over the connection-mode network service: 1) class 0: simple class; 2) class 1: basic error recovery class; 3) class 2: multiplexing class; 4) class 3: error recovery and multiplexing class; 5) class 4: error detection and recovery class; for the connection-mode transfer of data and control information from one transport entity to a peer transport entity; b) one class (class 4) of procedure when operating over the connectionless-mode network service; c) the means of negotiating the class of procedures to be used by the transport entities; d) the structure and encoding of the transport protocol data units used for the transfer of data and control information. The procedures are defined in terms of i) the interactions between peer transport entities through the exchange of transport protocol data units; ii) the interactions between a transport entity and the transport service user in the same system through the exchange of transport service primitives; iii) the interactions between a transport entity and the network service provider through the exchange of network service primitives. These procedures are defined in the main text of this Recommendation supplemented by state tables in Annex A. These procedures are applicable to instances of communication between systems which support the Transport Layer of the OSI Reference Model and which wish to interconnect in an open systems environment. This Recommendation specifies, in clause 14, conformance requirements for systems implementing these procedures and provides the PICS proforma in compliance with the relevant requirements, and in accordance with the relevant guidance, given in CCITT Rec. X.291 | ISO/IEC 9646-2. It does not contain tests which can be used to demonstrate this conformance. 2 References The following Recommendations and International Standards contain provisions, which through references in the text, constitute provisions of this Recommendation. At the time of publication, the editions indicated were valid. All Recommendations and Standards are subject to revision, and parties to agreements based on this Recommendation are encouraged to investigate the possibility of applying the most recent edition of the Recommendations and Standards ______________________________ 1) Recommendation X.224 and ISO/IEC 8073 (Information technology - Telecommunications and information exchange between systems - Open Systems Interconnection - Protocol for providing the connection-mode transport service) are technically aligned. Recommendation X.224 (11/93) 1 listed below. Members of IEC and ISO maintain registers of currently valid International Standards. The Telecommunication Standardization Bureau of the ITU maintains a list of the currently valid ITU-T Recommendations. 2.1 Identical Recommendations | International Standards - CCITT Recommendation X.213 (1992) | ISO/IEC 8348:1992, Information technology - Network service definition for Open Systems Interconnection . - ITU-T Recommendation X.214 (1993) | ISO/IEC 8072:1993, Information technology - Transport service definition for Open Systems Interconnection . 2.2 Paired Recommendations | International Standards equivalent in technical content - CCITT Recommendation X.290 (1992), OSI Conformance testing methodology and framework for protocol Recommendations for CCITT applications - General concepts . ISO/IEC 9646-1:1991, Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 1: General concepts . - CCITT Recommendation X.291 (1992), OSI Conformance testing methodology and framework for protocol Recommendations for CCITT applications - Abstract test suite specification . ISO/IEC 9646-2:1991, Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 2: Abstract test suite specification . - CCITT Recommendation X.650 (1992), Open Systems Interconnections (OSI) - Reference model for naming and addressing . ISO/IEC 7498-3:1991, Information processing systems - Open Systems Interconnection - Basic Reference Model - Part 3: Naming and addressing . - ITU-T Recommendation X.264 (1993), Transport protocol identification mechanism . ISO/IEC 11570:1992, Information technology - Telecommunications and information exchange between systems - Open Systems Interconnection - Transport protocol identification mechanism . - CCITT Recommendation X.200 (1988), Reference model of Open Systems Interconnection for CCITT applications . ISO 7498:1984, Information processing systems - Open Systems Interconnection - Basic Reference Model . 3 Definitions NOTE - The definitions contained in this clause make use of abbreviations defined in clause 4. 3.1 This Recommendation is based on the concepts developed in CCITT Rec. X.200 | ISO 7498 and CCITT Rec. X.650 | ISO/IEC 7498-3 and makes use of the following terms defined in them: a) concatenation and separation; b) segmenting and reassembling; c) multiplexing and demultiplexing; d) splitting and recombining; e) flow control; f) connectionless-mode transmission; g) nil selector value. 3.2 For the purposes of this Recommendation, the following definitions apply: 3.2.1 equipment: Hardware or software or a combination of both; it need not be physically distinct within a computer system. 3.2.2 transport service user: An abstract representation of the totality of those entities within a single system that make use of the transport service. 2 Recommendation X.224 (11/93) 3.2.3 network service provider: An abstract machine that models the totality of the entities providing the network service, as viewed by a transport entity. 3.2.4 local matter: A decision made by a system concerning its behavior in the Transport Layer that is not subject to the requirements of this protocol. 3.2.5 initiator: A transport entity that initiates a CR TPDU. 3.2.6 responder: A transport entity with whom an initiator wishes to establish a transport connection. NOTE - Initiator and responder are defined with respect to a single transport connection. A transport entity can be both an initiator and responder simultaneously. 3.2.7 sending transport entity: A transport entity that sends a given TPDU. 3.2.8 receiving transport entity: A transport entity that receives a given TPDU. 3.2.9 preferred class: The protocol class that the initiator indicates in a CR TPDU as its first choice for use over the transport connection. 3.2.10 alternative class: A protocol class that the initiator indicates in a CR TPDU as an alternative choice for use over the transport connection. 3.2.11 proposed class: A preferred class or an alternative class. 3.2.12 selected class: The protocol class that the responder indicates in a CC TPDU that it has chosen for use over the transport connection. 3.2.13 proposed parameter: The value for a parameter that the initiator indicates in a CR TPDU that it wishes to use over the transport connection. 3.2.14 selected parameter: The value for a parameter that the responder indicates in a CC TPDU that it has chosen for use over the transport connection. 3.2.15 error indication: An N-RESET indication, or an N-DISCONNECT indication with a reason code indicating an error, that a transport entity receives from the NS-provider. 3.2.16 invalid TPDU: A TPDU that does not comply with the requirements of this Recommendation for structure and encoding. 3.2.17 protocol error: A TPDU whose use does not comply with the procedures for the class. 3.2.18 sequence number: a) the number in the TPDU-NR field of a DT TPDU that indicates the order in which the DT TPDU was transmitted by a transport entity; b) the number in the YR-TU-NR field of an AK or RJ TPDU that indicates the sequence number of the next DT TPDU expected to be received by a transport entity. 3.2.19 transmit window: The set of consecutive sequence numbers which a transport entity has been authorized by its peer entity to send at a given time on a given transport connection. 3.2.20 lower window edge: The lowest sequence number in a transmit window. 3.2.21 upper window edge: The sequence number which is one greater that the highest sequence number in the transmit window. 3.2.22 upper window edge allocated to the peer entity: The value that a transport entity communicates to its peer entity to be interpreted as its new upper window edge. 3.2.23 closed window: A transmit window that contains no sequence number. 3.2.24 window information: Information contained in a TPDU relating to the upper and the lower window edges. 3.2.25 frozen reference: A reference that is not available for assignment to a connection because of the requirements of 6.18. 3.2.26 unassigned reference: A reference that is neither currently in use for identifying a transport connection nor which is in a frozen state. Recommendation X.224 (11/93) 3 3.2.27 transparent (data): TS-user data that is transferred intact between transport entities and which is unavailable for use by the transport entities. 3.2.28 owner (of a network connection): The transport entity that issued the N-CONNECT request leading to the creation of that network connection. Only applicable when operating over the connection-mode network service. 3.2.29 retained TPDU: A TPDU that is subject to the retransmission procedure or retention and acknowledgement procedure and is available for possible retransmission. 3.3 This Recommendation uses the following terms defined in CCITT Rec. X.213 | ISO/IEC 8348: a) connection-mode network service; b) connectionless-mode network service. 3.4 This Recommendation uses the following terms defined in CCITT Rec. X.290 | ISO/IEC 9646-1: a) PICS proforma; b) protocol implementation conformance statement (PICS). 4 Abbreviations 4.1 Data units TPDU Transport-protocol-data-unit TSDU Transport-service-data-unit NSDU Network-service-data-unit 4.2 Types of Transport Protocol data units CR TPDU Connection request TPDU CC TPDU Connection confirm TPDU DR TPDU Disconnect request TPDU DC TPDU Disconnect confirm TPDU DT TPDU Data TPDU ED TPDU Expedited data TPDU AK TPDU Data acknowledge TPDU EA TPDU Expedited acknowledge TPDU RJ TPDU Reject TPDU ER TPDU Error TPDU 4.3 TPDU Fields LI Length indicator (field) CDT Credit (field) TSAP-ID Transport-service-access-point identifier (field) DST-REF Destination reference (field) SRC-REF Source reference (field) EOT End of TSDU mark TPDU-NR DT TPDU number (field) 4 Recommendation X.224 (11/93) ED-TPDU-NRED TPDU number (field) YR-TU-NR Sequence number response (field) YR-EDTU-NR ED TPDU number response (field) ROA Request of acknowledgement mark 4.4 Times and associated variables T1 Local retransmission time N The maximum number of transmissions L Time bound on reference and sequence number I Inactivity time W Window time TTR Time to try reassignment/resynchronization TWR Time to wait for reassignment/resynchronization TS1 Supervisory timer 1 TS2 Supervisory timer 2 M LR NSDU lifetime local-to-remote M RL NSDU lifetime remote-to-local E LR Expected maximum transit delay local-to-remote E RL Expected maximum transit delay remote-to-local R Persistence time A L Local acknowledgement time A R Remote acknowledgement time I L Local inactivity time I R Remote inactivity time 4.5 Miscellaneous TS-user Transport-service user TSAP Transport-service-access-point NS-provider Network service provider NSAP Network-service-access-point QOS Quality of service CLNS Connectionless-mode network service CONS Connection-mode network service 5 Overview of the Transport Protocol NOTE - This overview is not exhaustive and has been provided for guidance. Recommendation X.224 (11/93) 5 5.1 Service provided by the Transport Layer The protocol specified in this Recommendation supports the Transport Service defined in ITU-T Rec. X.214 | ISO/IEC 8072. Information is transferred to and from the TS-user in the transport service primitives listed in Table 1. TABLE 1/X.224 Transport service primitives Primitives Parameters T-CONNECT request indication Called address Calling address Expedited data option Quality of service TS-user data T-CONNECT response confirm Responding address Quality of service Expedited data option TS-user-data T-DATA request indication TS-user-data T-EXPEDITED DATA request indication TS-user-data T-DISCONNECT request TS-user-data T-DISCONNECT indication Disconnect reason TS-user-data 5.2 Service assumed from the Network Layer The protocol specified in this Recommendation assumes the use of the Network Service defined in CCITT Rec. X.213 | ISO/IEC 8348. When operating over CONS, information is transferred to and from the NS-provider in the network service primitives listed in Table 2a). When operating over CLNS, information is transferred to and from the NS-provider in the network service primitives listed in Table 2b). NOTES 1 The parameters listed in Table 2a) are those in the current connection-mode network service (see CCITT Rec. X.213 | ISO/IEC 8348). 2 The parameters listed in Table 2b) are those in the current connectionless-mode network service (see CCITT Rec. X.213 | ISO/IEC 8348). 3 The way the parameters are exchanged between the transport entity and the NS-provider is a local matter. 6 Recommendation X.224 (11/93) TABLE 2a/X.224 Connection-mode network service primitives Primitives X/Y Parameters W/X/Y/Z N-CONNECT request indication X X Called address Calling address Receipt confirmation selection Expedited data selection QOS parameter set NS-user-data X X Y Y X Z N-CONNECT response confirm X X Responding address Receipt confirmation selection Expedited data selection QOS parameter set NS-user-data X Y Y X Z N-DATA request indication X X N-user-data Confirmation request X Y N-DATA ACKNOWLEDGE request indication Y Y N-EXPEDITED DATA request indication Y Y NS-user-data Y N-RESET request indication X X Reason Originator Reason W W W N-RESET response confirm X X - - N-DISCONNECT request indication X X Reason NS-user-data Responding address Originator Reason NS-user-data Responding address W Z Z W W Z Z W The usage of this parameter is a local matter, e.g. for diagnostic or to decide whether to attempt resynchronization. X The Transport Protocol assumes that this facility is provided in all networks. Y The Transport Protocol assumes that this facility is provided in some networks and a mechanism is provided to optionally use the facility. Z The Transport Protocol does not use this parameter. Recommendation X.224 (11/93) 7 TABLE 2b/X.224 Connectionless-mode network service primitives Primitives X/Y Parameters W/X/Y/Z N-UNITDATA request X Source address Destination address Quality of service NS-user-data X X X X indication X Source address Destination address Quality of service NS-user-data X X X X W The usage of this parameter is a local matter, e.g. for diagnostic or to decide whether to attempt resynchronization. X The Transport Protocol assumes that this facility is provided in all networks. Y The Transport Protocol assumes that this facility is provided in some networks and a mechanism is provided to optionally use the facility. Z The Transport Protocol does not use this parameter. 5.3 Functions of the Transport Layer 5.3.1 Overview of functions The functions in the Transport Layer are those necessary to bridge the gap between the services available from the Network Layer and those to be offered to the TS-users. The functions in the Transport Layer are concerned with the enhancement of quality of service, including aspects of cost optimization. These functions are grouped below into those used at all times during a transport connection and those concerned with connection establishment, data transfer and release. NOTE - This Recommendation does not include the following functions which are under consideration for inclusion in future editions of this Recommendation: a) encryption; b) accounting mechanisms; c) status exchanges and monitoring of QOS; d) blocking; e) temporary release of network connections; f) alternative checksum algorithm. 5.3.1.1 Functions used at all times The following functions, depending upon the selected class and options, are used at all times during a transport connection: a) Transmission of TPDUs (see 6.2 and 6.9). b) Multiplexing and demultiplexing (see 6.15) - A function used only when operating over CONS to share a single network connection between two or more transport connections. c) Error detections (see 6.10, 6.13 and 6.17) - A function used to detect the loss, corruption, duplication, misordering, or misdelivery of TPDUs. d) Error recovery (see 6.12, 6.14, 6.18, 6.19, 6.20, 6.21, and 6.22) - A function used to recover from detected and signalled errors. 8 Recommendation X.224 (11/93) 5.3.1.2 Connection establishment The purpose of connection establishment is to establish a transport connection between two TS-users. The following functions of the Transport Layer during this phase match the TS-users' requested quality of service with the services offered by the Network Layer: a) select the network service which best matches the requirement of the TS-user taking into account charges for various services (see 6.5); b) decide whether to multiplex multiple transport connections onto a single network connection only when operating over CONS (see 6.5); c) establish the optimum TPDU size (see 6.5); d) select the functions that will be operational upon entering the data transfer phase (see 6.5); e) map transport addresses onto network addresses; f) provide a means to distinguish between two different transport connections (see 6.5); g) transport of TS-user data (see 6.5); h) exchange values of Inactivity timers (see 6.5). 5.3.1.3 Data transfer The purpose of data transfer is to permit duplex transmission of TSDUs between the two TS-users connected by the transport connection. This purpose is achieved by means of two-way simultaneous communication and by the following functions, some of which are used or not used in accordance with the result of the selection performed in connection establishment. a) Concatenation and separation (see 6.4) - A function used to collect several TPDUs into a single NSDU at the sending transport entity and to separate the TPDUs at the receiving transport entity. b) Segmenting and reassembling (see 6.3) - A function used to segment a single data TSDU into multiple TPDUs at the sending transport entity and to reassemble them into their original format at the receiving transport entity. c) Splitting and recombining (see 6.23) - A function allowing, only when operating over CONS, the simultaneous use of two or more network connections to support the same transport connection. d) Flow control (see 6.16) - A function used to regulate the flow of TPDUs between two transport entities on one transport connection. e) Transport connection identification - A means to uniquely identify a transport connection between the pair of transport entities supporting the connection during the lifetime of the transport connection. f) Expedited data (see 6.11) - A function used to bypass the flow control of normal data TPDU. Expedited data TPDU flow is controlled by separate flow control. g) TSDU delimiting (see 6.3) - A function used to determine the beginning and ending of a TSDU. 5.3.1.4 Release The purpose of release (see 6.7 and 6.8) is to provide disconnection of the transport connection, regardless of the current activity. 5.4 Classes and options when operating over CONS 5.4.1 General The functions of the Transport Layer have been organized into classes and options. A class defines a set of functions. Options define those functions within a class which may or may not be used. This Recommendation defines five classes of protocol: a) class 0: simple class; b) class 1: basic error recovery class; c) class 2: multiplexing class; Recommendation X.224 (11/93) 9 d) class 3: error recovery and multiplexing class; e) class 4: error detection and recovery class. NOTES 1 Transport connections of classes 2, 3 and 4 may be multiplexed together onto the same network connection. 2 Classes 0 to 3 do not specify mechanisms to detect unsignalled network transmission failures. 5.4.2 Negotiation The use of classes and options is negotiated during connection establishment. The choice made by the transport entities will depend upon a) the TS-users' requirements expressed via T-CONNECT service primitives; b) the quality of the available network services; c) the user required service versus cost ratio acceptable to the TS-user. 5.4.3 Choice of network connection The following list classifies network services in terms of quality with respect to error behavior in relation to user requirements; its main purpose is to provide a basis for the decision regarding which class of transport protocol should be used in conjunction with given network connection: a) Type A - Network connection with acceptable residual error rate (for example, not signalled by disconnect or reset) and acceptable rate of signalled errors. b) Type B - Network connections with acceptable residual error rate (for example, not signalled by disconnect or reset) but unacceptable rate of signalled errors. c) Type C - Network connections with unacceptable residual error rate. It is assumed that each transport entity is aware of the quality of service provided by particular network connections. 5.4.4 Characteristics of class 0 Class 0 provides the simplest type of transport connection and is fully compatible with the CCITT Recommen dation T.70 for teletex terminals. Class 0 has been designed to be used with type A network connections. 5.4.5 Characteristics of class 1 Class 1 provides a basic transport connection with minimal overheads. The main purpose of the class is to recover from network disconnect or reset. Selection of this class is usually based on reliability criteria. Class 1 has been designed to be used with type B network connections. 5.4.6 Characteristics of class 2 5.4.6.1 General Class 2 provides a way to multiplex several transport connections onto a single network connection. This class has been designed to be used with type A network connections. 5.4.6.2 Use of explicit flow control The objective is to provide flow control to help avoid congestion at transport-connection-end-points and on the network connection. Typical use is when traffic is heavy and continuous, or when there is intensive multiplexing. Use of flow control can optimize response times and resource utilization. 10 Recommendation X.224 (11/93) 5.4.6.3 Non-use of explicit flow control The objective is to provide a basic transport connection with minimal overheads suitable when explicit disconnection of the transport connection is desirable. The option would typically be used for unsophisticated terminals, and when no multiplexing onto network connections is required. Expedited data is never available. 5.4.7 Characteristics of class 3 Class 3 provides the characteristics of class 2 plus the ability to recover from network disconnect or reset. Selection of this class is usually based upon reliability criteria. Class 3 has been designed to be used with type B network connections. 5.4.8 Characteristics of class 4 Class 4 provides the characteristics of class 3, plus the capability to detect and recover from errors which occur as a result of the low grade of service available from the NS-provider. The kind of errors to be detected include: TPDU loss, TPDU delivery out of sequence, TPDU duplication and TPDU corruption. These errors may affect control TPDUs as well as data TPDUs. This class also provides for increased throughput capability and additional resilience against network failure. Class 4 has been designed to be used with type C network connections. 5.5 Characteristics of class 4 transport protocol when operating over CLNS In operation over a connectionless-mode network service the class 4 transport procotol provides flow control between communicating peer transport entities, the capability to detect and recover from errors which occur as a result of a low grade of service available from the NS-provider, and resilience from failure of the peer entity. The kinds of error to be detected include: TPDU loss, TPDU delivery out of sequence, TPDU duplication and TPDU corruption. These errors may affect control TPDUs as well as data TPDUs. NOTE - The transport entity is incapable of distinguishing between failure of the network service and failure of the peer entity, except optionally, by some local means, in the case of the failure of the local interface to the network service (e.g. in the failure of the local transceiver on a local area network). There is no indication given to the transport entity about the ability of the network entity to fulfill the service requirements given in the N-UNITDATA primitive. However, it can be a local matter to make transport entities aware of the availability and characteristics (QOS) of connectionless-mode network services, as the corresponding NSAP associations, exist logically by the nature of the connectionless-mode network service and may be recognized by network entities. 5.6 Model of the Transport Layer A transport entity communicates with its TS-users through one or more TSAPs by means of the service primitives as defined by the transport service definition (see ITU-T Rec. X.214 | ISO/IEC 8072). Service primitives will cause or be the result of transport protocol data unit exchanges between the peer transport entities supporting a transport connection. These protocol exchanges are effected using the services of the Network Layer as defined by the network service definition (see CCITT Rec. X.213 | ISO/IEC 8348) through one or more NSAPs. (See Figure 2.) Transport connection endpoints are identified in end systems by an internal, implementation dependent, mechanism so that the TS-user and the transport entity can refer to each transport connection. Recommendation X.224 (11/93) 11 T0719310-94/d02 TSAP TSAP Transport entity Transport entity NSAP NSAP NOTE - For the purposes of illustration, Figure 2 shows only one TSAP and one NSAP for each transport entity. In certain instances, more than one TSAP and/or more than one NSAP may be associated with a particular transport entity. FIGURE 2/X.224 Model of the transport layer FIGURE 2/X.224...[D02] = 7.5 CM 6 Elements of procedure This clause contains elements of procedure which are used in the specification of protocol classes in clauses 7 to 12. These elements are not meaningful on their own. The procedures define the transfer of TPDUs whose structure and coding is specified in clause 13. Transport entities shall accept and respond to any TPDU received in a valid NSDU and may issue TPDUs initiating specific elements of procedure specified in this clause. NOTE - Where network service primitives, TPDUs and parameters used are not significant for a particular element of procedure, they have not been included in the specification. 6.1 Use of the network service 6.1.1 Assignment to network connection when operating over CONS This procedure is used only when operating over the connection-mode network service. 6.1.1.1 Purpose The procedure is used in all classes to assign transport connections to network connections. 6.1.1.2 Network service primitives The procedure uses the following network service primitives: a) N-CONNECT; b) N-DISCONNECT. 6.1.1.3 Procedure Each transport connection shall be assigned to a network connection. The initiator may assign the transport connection to an existing network connection of which it is the owner or to a new network connection (see Note 1) which it creates for this purpose. The initiator shall not assign or reassign the transport connection to an existing network connection if the protocol class(es) proposed for the class in use for the transport connection are incompatible with the current usage of the network connection with respect to multiplexing (see Note 2). 12 Recommendation X.224 (11/93) During the resynchronization (see 6.14) and reassignment after failure (see 6.12) procedures, the transport entity may reassign a transport connection to another network connection joining the same NSAPs, provided that it is the owner of the network connection and that the transport connection is assigned to only one network connection at any given time. During the splitting procedure (see 6.23), a transport entity may assign a transport connection to any additional network connection joining the same NSAPs, provided that it is the owner of the network connection and that either the network connection does not have another transport connection assigned to it; or multiplexing is possible on the network connection. The responder becomes aware of the assignment when it receives: a) a CR TPDU during the connection establishment procedure (see 6.5); or b) an RJ TPDU or a retransmitted CR or DR TPDU during the resynchronization (see 6.14) and reassignment after failure (see 6.12) procedures; or c) any TPDU when splitting (see 6.23) is used. NOTES 1 When a new network connection is created, the quality of service requested is a local matter, although it will normally be related to the requirements of transport connection(s) expected to be assigned to it. 2 An existing network connection may also not be suitable if, for example, the quality of service requested for the transport connection cannot be attained by using or enhancing the network connection. 3 A network connection with no transport connection(s) assigned to it, may be available after initial establishment, or because all of the transport connections previously assigned to it have been released. It is recommended that only the owner of such a network connection should release it. Furthermore, it is recommended that it not be released immediately after the transmission of the final TPDU of a transport connection; either a DR TPDU in response to CR TPDU or a DC TPDU in response to DR TPDU. An appropriate delay will allow the TPDU concerned to reach the other transport entity allowing the freeing of any resources associated with the transport connection concerned. 4 After the failure of a network connection, transport connections which were previously multiplexed together may be assigned to different network connections, and vice versa. 5 The transport protocol identification procedures specified in X.264 may need to be considered in conjunction with this procedure. 6.1.2 Transmission over CLNS This procedure is used only when operating over the connectionless-mode network service. 6.1.2.1 Purpose The procedure is used to transmit TPDUs over the connectionless-mode network service. 6.1.2.2 Network service primitives The procedure makes use of the following network service primitive: N-UNITDATA. 6.1.2.3 Procedure Each TPDU shall be transmitted in a single invocation of the connectionless-mode network service, over a pre-existing association between a pair of NSAPs. The association is considered by transport entities as permanently established and available. 6.2 Transport protocol data unit (TPDU) transfer 6.2.1 Purpose The TPDU transfer procedure is used in all classes to convey transport protocol data units in user data fields of network service primitives. 6.2.2 Network service primitives The procedure uses the following network service primitives when operating over CONS: a) N-DATA; b) N-EXPEDITED DATA. Recommendation X.224 (11/93) 13 The procedure uses the following network service primitive when operating over CLNS: N-UNITDATA. 6.2.3 Procedure The transport protocol data units (TPDUs) defined for the protocol are listed in 4.2. When operating over CLNS, the transport entities shall transmit and receive all TPDUs as NS-user data parameters of N-UNITDATA primitives. When operating over CONS and when the network expedited variant has been selected for class 1, the transport entities shall transmit and receive ED and EA TPDUs as NS-user data parameters of N-EXPEDITED DATA primitives. In all other cases, transport entities shall transmit and receive TPDUs as NS-user data parameters of N-DATA primitives. When a TPDU is put into an NS-user data parameter, the significance of the bits within an octet and the order of octets within a TPDU shall be defined in 13.2. NOTE - TPDUs may be concatenated (see 6.4). 6.3 Segmenting and reassembling 6.3.1 Purpose The segmenting and reassembling procedure is used in all classes to map TSDUs onto TPDUs. 6.3.2 TPDU and parameter used The procedure makes use of the following TPDU and parameter: DT TPDU - end of TSDU. 6.3.3 Procedure A transport entity shall map a TSDU onto an ordered sequence of one or more DT TPDUs. This sequence shall not be interrupted by other DT TPDUs on the same transport connection. All DT TPDUs except the last DT TPDU in a sequence greater than one shall have a length of data greater than zero. NOTES 1 The EOT parameter of a DT TPDU indicates whether or not there are subsequent DT TPDUs in the sequence. 2 There is no requirement that the DT TPDUs shall be of the maximum length selected during connection establishment. 6.4 Concatenation and separation 6.4.1 Purpose The procedure for concatenation and separation is used in classes 1, 2, 3 and 4 to convey multiple TPDUs in one NSDU. 6.4.2 Procedure A transport entity may concatenate TPDUs from the same or different transport connections, while maintaining the order of TPDUs for a given transport connection compatible with the protocol operation. A valid set of concatenated TPDUs may contain a) any number of TPDUs from the following list: AK, EA, RJ, ER, DC TPDUs, provided that these TPDUs come from different transport connections; b) no more than one TPDU from the following list: CR, DR, CC, DT, ED TPDUs; if this TPDU is present, it shall be placed last in the set of concatenated TPDUs. 14 Recommendation X.224 (11/93) A transport entity shall accept a valid set of concatenated TPDUs. NOTES 1 The TPDUs within a concatenated set may be distinguished by means of the length indicator parameter. 2 The end of a TPDU containing data is indicated by the termination of the NSDU. 3 When operating over CONS, the number of concatenated TPDUs referred to in 6.4.2 a) is bounded by the maximum number of transport connections which are multiplexed together except during assignment or reassignment. When operating over CLNS, the number of TPDUs that may be concatenated is bounded by the number of transport connections established between two NSAPs and/or the maximum available NSDU size. 6.5 Connection establishment 6.5.1 Purpose The procedure for connection establishment is used in all classes to create a new transport connection. 6.5.2 Network service primitives When operating over CONS, the procedure uses the following network service primitive: N-DATA. When operating over CLNS, the procedure uses the following network service primitive: N-UNITDATA. 6.5.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) CR TPDU - CDT; - DST-REF (set to zero); - SRC-REF; - CLASS and OPTIONS (i.e. preferred class, use of extended format, non-use of explicit flow control in class 2); - calling TSAP-ID; - called TSAP-ID; - TPDU size (proposed); - preferred maximum TPDU size (proposed); - version number; - protection parameter; - checksum; - additional option selection (i.e. use of network expedited in class 1, use of receipt confirmation in class 1, non-use of checksum in class 4, use of transport expedited data transfer service, use of selective acknowledgement, use of request acknowledgement); - alternative protocol class(es); - acknowledgement time; - inactivity time; - throughput (proposed); - residual error rate (proposed); - priority (proposed); - transit delay (proposed); - reassignment time; - user data; Recommendation X.224 (11/93) 15 b) CC TPDU - CDT; - DST-REF; - SRC-REF; - CLASS and OPTIONS (selected); - calling TSAP-ID; - called TSAP-ID; - TPDU size (selected); - the preferred maximum TPDU size (selected); - protection parameter; - checksum; - additional option selection (selected); - acknowledgement time; - inactivity time; - throughput (selected); - residual error rate (selected); - priority (selected); - transit delay (selected); - user data. 6.5.4 Procedure for operating over CONS A transport connection is established by means of one transport entity (the initiator) transmitting a CR TPDU to the other transport entity (the responder), which replies with a CC TPDU. Before sending the CR TPDU, the initiator assigns the transport connection being created to one (or more if the splitting procedure is being used) network connection(s). It is this set of network connections over which the TPDUs are sent. NOTE 1 - Even if the initiator assigns the transport connection to more than one network connection, all the CR TPDUs (if repeated) or DR TPDUs with DST-REF set to zero which are sent prior to the receipt of the CC TPDU shall be sent on the same network connection, unless an N-DISCONNECT indication is received. (This is necessary because the remote entity may not support class 4 and therefore may not recognize splitting.) If the initiator has made other assignments, it will use them only after receipt of a class 4 CC TPDU (see also the splitting procedure 6.23). During this exchange, all information and parameters needed for the transport entities to operate shall be exchanged or negotiated. NOTE 2 - Except in class 4, it is recommended that the initiator starts an optional timer TS1 at the time the CR TPDU is sent. This timer should be stopped when the connection is considered as accepted or refused or unsuccessful. If the timer expires, the initiator should reset or disconnect the network connection, and in classes 1 and 3, freeze the reference (see 6.18). For all other transport connection(s) multiplexed on the same network connection, the procedures for reset or disconnect as appropriate should be followed. When an unexpected duplicated CR TPDU is received (with class 4 as preferred class) it shall be ignored in classes 0, 1, 2, and 3 and a CC TPDU shall be returned in class 4. After receiving the CC TPDU for a class which includes the procedure for retention until acknowledgement of TPDUs the initiator shall acknowledge the CC TPDU as defined in Table 5 (see 6.13). When the network expedited variant of the expedited data transfer (see 6.11) has been agreed (possible in class 1 only), the responder shall not send an ED TPDU before the CC TPDU is acknowledged. The following information is exchanged: a) References - Each transport entity chooses a reference to be used by the peer entity which is 16 bits long and which is arbitrary under the following restrictions: 1) it shall not already be in use nor frozen (see 6.18); 2) it shall not be zero. 16 Recommendation X.224 (11/93) This mechanism is symmetrical and provides identification of the transport connection independent of the network connection. The range of references used for transport connections, in a given transport entity, is a local matter. b) Calling and called TSAP-IDs (optional) - When either network address unambiguously defines the transport address, this information may be omitted. c) Initial credit - Only relevant for classes which include the explicit flow control function. d) User data - Not available if class 0 is the preferred class (see Note 3). Up to 32 octets in other classes. NOTE 3 - If class 0 is a valid response according to Table 3, inclusion of user data in the CR TPDU may cause the responding entity to refuse the connection (for example, if it only supports class 0). TABLE 3/X.224 Valid responses corresponding to the preferred class and any alternative class proposed in the CR TPDU Preferred class Alternative class 0 1 2 3 4 None 0 Not valid Not valid Not valid Not valid Not valid Class 0 1 Class 1 or 0 Class 1 or 0 Not valid Not valid Not valid Class 1 or 0 2 Class 2 or 0 Not valid Class 2 Not valid Not valid Class 2 3 Class 3, 2 or 0 Class 3, 2, 1 or 0 Class 3 or 2 Class 3 or 2 Not valid Class 3 or 2 4 Class 4, 2 or 0 Class 4, 2, 1 or 0 Class 4 or 2 Class 4, 3 or 2 Class 4 or 2 Class 4 or 2 e) Acknowledgement time - Only in class 4. f) Checksum parameter - Only in class 4. g) Protection parameter - This parameter and its semantics are user defined. h) Inactivity time - Only in class 4. The inactivity time parameter shall not be included in a CC TPDU if it was not present in the corresponding CR TPDU. The following negotiations take place: i) Protocol class - The initiator shall propose a preferred class and may propose any number of alternative classes which permit a valid response as defined in Table 3. The initiator should assume when it sends the CR TPDU that its preferred class will be agreed to, and commence the procedures associated with that class, except that if class 0 or class 1 is an alternative class, multiplexing shall not commence until a CC TPDU selecting the use of classes 2, 3 or 4 has been received. NOTE 4 - This means, for example, that when the preferred class includes resynchronization (see 6.14) the resynchronization will occur if a reset is signalled during connection establishment. The responder shall select one class defined in Table 3 as a valid response corresponding to the preferred class and to the class(es), if any, contained in the alternative class parameter of the CR TPDU. It shall indicate the selected class in the CC TPDU and shall follow the procedures for the selected class. If the preferred class is not selected, then on receipt of the CC TPDU the initiator shall adjust its operation according to the procedures of the selected class. Recommendation X.224 (11/93) 17 NOTE 5 - The valid responses indicated in Table 3 result from both explicit negotiation, whereby each of the classes proposed is a valid response, and implicit negotiation whereby a) if class 3 or 4 is proposed, then class 2 is a valid response; b) if class 1 is proposed, then class 0 is a valid response. NOTE 6 - Negotiation from class 2 to class 1 and from any class to an higher-numbered class is not valid. NOTE 7 - Redundant combinations are not a protocol error. j) TPDU size - The initiator may propose a maximum size for TPDUs, and the responder may accept this value or respond with any value between 128 and the proposed value in the set of values available (see 13.3.4 b). NOTE 8 - The length of the CR TPDU does not exceed 128 octets (see 13.3). NOTE 9 - The transport entities may have knowledge, by some local means, of the maximum available NSDU size. k) Preferred maximum TPDU size - The value of this parameter, multiplied by 128, yields the proposed or accepted maximum TPDU size in octets. The initiator may proposed a preferred maximum size for TPDUs and the responder may accept this value or respond with a smaller value. NOTE 10 - If this parameter is used in a CR TPDU without also including the TPDU size parameter, this will result in a maximum TPDU size of 128 octets being selected if the remote entity does not recognize the preferred TPDU size parameter. Therefore, it is recommended that both parameters be included in the CR TPDU. If the preferred maximum TPDU size parameter is present in a CR TPDU the responder shall - either: ignore the preferred maximum TPDU size parameter and follow TPDU size negotiation as defined in 6.5.4 j); - or: use the preferred maximum TPDU size parameter to determine the maximum TPDU size requested by the initiator and ignore the TPDU size parameter. In this case the responder shall use the preferred maximum TPDU size parameter in the CC TPDU and shall not include the TPDU size parameter in the CC TPDU. If the preferred maximum TPDU size parameter is not present in the CR TPDU it shall not be included in the corresponding CC TPDU. In this case TPDU size negotiation is as defined in 6.5.4 j). l) Normal or extended format - Either normal or extended is available. When extended is used, this applies to CDT, TPDU-NR , ED-TPDU-NR, YR-TU-NR and YR-EDTU-NR parameters. m) Checksum selection - This defines whether or not TPDUs of the connection are to include a checksum. n) Quality of service parameters - This defines the throughput, transit delay, priority and residual error rate. NOTE 11 - The transport service defines transit delay as requiring a previously stated average TSDU size as a basis for any specification. This protocol as specified in 13.3.4 m), uses a value at 128 octets. Conversion to and from specifications based upon some other value is a local matter. o) The non-use of explicit flow control in class 2. p) The use of network receipt confirmation and network expedited when class 1 is to be used. q) Use of expedited data transfer service - This allows both TS-users to negotiate the use or non-use of the expedited data transport service as defined in the transport service (see ITU-T Rec. X.214 | ISO/IEC 8072). r) The use of selective acknowledgement - This allows the transport entities to decide whether to use procedures that allow acknowledgement of DT TPDUs that are received out-of-sequence (only in class 4). s) The use of request acknowledgement - This allows both transport entities to negotiate the use or non-use of the request acknowledgement facility specified in 6.13.4.2 (only in classes 1, 3, 4). The following information is sent only in the CR TPDU: t) Version number - This defines the version of the transport protocol standard used for this connection. u) Reassignment time parameter - This indicates the time for which the initiator will persist in following the reassignment after failure procedure. 18 Recommendation X.224 (11/93) The negotiation rules for the options are such that the initiator may propose either to use or not to use the option. The responder may either accept the proposed choice or select an alternative choice as defined in Table 4. When a parameter [which is valid for the proposed class(es)] is absent and a default value is defined in this Recommendation, this is equivalent to the presence of the parameter with the default value. In class 2, whenever a transport entity requests or agrees to the transport expedited data transfer service or to the use of extended formats, it shall also request or agree (respectively) to the use of explicit flow control. TABLE 4/X.224 Negotiation of options during connection establishment Option Proposal made by the initiator Valid selection by the responder Transport expedited data transfer service (classes 1, 2, 3, 4 only) Yes No Yes or No No Use of receipt confirmation (class 1 only) Yes No Yes or No No Use of the network expedited variant (class 1 only) Yes No Yes or No No Non-use of checksum (class 4 only) Yes No Yes or No No Non-use of explicit flow control (class 2 only) Yes No Yes or No No Use of extended format (classes 2, 3, 4 only) Yes No Yes or No No Use of selective acknowledgement (class 4 only) Yes No Yes or No No Use of request acknowledgement (classes 1, 3, 4 only) Yes No Yes or No No NOTE - Table 4 defines the procedures for negotiation of options. This negotiation has been designed such that if the initiator proposes the mandatory implementation option specified in clause 14, the responder has to accept use of this option over the transport connection except for the use of the transport expedited data transfer service which may be rejected by the TS-user. If the initiator proposes a non-mandatory implementation option, the responder is entitled to select use of the mandatory implementation option for use over the transport connection. 6.5.5 Procedure for operating over CLNS A transport connection is established by means of one transport entity (the initiator) transmitting a CR TPDU to the other transport entity (the responder), which replies with a CC TPDU. During this exchange, all information and parameters needed for the transport entities to operate shall be exchanged or negotiated. When an unexpected duplicated CR TPDU is received (with class 4 as preferred class) a CC TPDU shall be returned. After receiving the CC TPDU, the initiator shall acknowledge the CC TPDU as defined in Table 5 (see 6.13). The following information is exchanged: a) References - Each transport entity chooses a reference to be used by the peer entity which is 16 bits long and which is arbitrary under the following restrictions: 1) it shall not already be in use nor frozen (see 6.18); 2) it shall not be zero. Recommendation X.224 (11/93) 19 This mechanism is symmetrical and provides identification of the transport connection itself. The range of references used for transport connections, in a given transport entity, is a local matter. b) Called and calling TSAP-IDs (optional) - Indicates the calling and called transport service access points. When either network address unambiguously defines the transport address, this information may be omitted. c) Initial credit . d) User data - Up to 32 octets. e) Acknowledgment time . f) Checksum parameter . g) Protection parameter - This parameter and its semantics are user defined. h) Inactivity time - The inactivity time parameter shall not be included in a CC TPDU if it was not present in the corresponding CR TPDU. i) Protocol class - Class 4 is the only valid value for the preferred protocol class proposed by the initiator, and for the class selected by the responder. An alternative class is not permitted. The following negotiations take place: j) TPDU size - The initiator may propose a maximum size for TPDUs in the set of values available [see 13.3.4 b)]. This value may be limited by the maximum available NSDU size if known, and cannot exceed the maximum NSDU size for connectionless-mode network service as defined in CCITT Rec. X.213 | ISO/IEC 8348. The responder may accept this value or respond with any value between 128 and the proposed value in the set of values available [see 13.3.4 b)]. NOTE 1 - The length of the CR TPDU does not exceed 128 octets (see 13.3). NOTE 2 - The transport entities may have knowledge, by some local means, of the maximum available NSDU size. k) Preferred maximum TPDU size - The value of this parameter, multiplied by 128, yields the proposed or accepted maximum TPDU size in octets. The initiator may propose a preferred maximum size for TPDUs and the responder may accept this value or respond with a smaller value. NOTE 3 - If this parameter is used in a CR TPDU without also including the TPDU size parameter, this will result in a maximum TPDU size of 128 octets being selected if the remote entity does not recognize the preferred TPDU size parameter. Therefore, it is recommended that both parameters be included in the CR TPDU. If the preferred maximum TPDU size parameter is present in a CR TPDU the responder shall - either: ignore the preferred maximum TPDU size parameter and follow TPDU size negotiation as defined in 6.5.5 j); - or: use the preferred maximum TPDU size parameter to determine the maximum TPDU size requested by the initiator and ignore the TPDU size parameter. In this case the responder shall use the preferred maximum TPDU size parameter in the CC TPDU and shall not include the TPDU size parameter in the CC TPDU. If the preferred maximum TPDU size parameter is not present in the CR TPDU it shall not be included in the corresponding CC TPDU. In this case TPDU size negotiation is as defined in 6.5.5 j). l) Normal or extended format - Either normal or extended is available. When extended is used, this applies to CDT, TPDU-NR, ED TPDU-NR, YR-TU-NR and YR-EDTU-NR parameters. m) Checksum selection - This defines whether or not TPDUs of the connection are to include a checksum. n) Quality of service parameters - This defines the throughput, transit delay, priority and residual error rate. NOTE 4 - The transport service defines transit delay as requiring a previously stated average TSDU size as a basis for any specification. This protocol as specified in 13.3.4 m), uses a value at 128 octets. Conversion to and from specifications based upon some other value is a local matter. o) Use of expedited data transfer service - This allows both TS-users to negotiate the use or non-use of the expedited data transport service as defined in the transport service (ITU-T Rec. X.214 | ISO/IEC 8072). 20 Recommendation X.224 (11/93) p) The use of selective acknowledgement - This allows the transport entities to decide whether to use procedures that allow acknowledgement of DT TPDUs that are received out-of-sequence. q) The use of request acknowledgement - This allows both transport entities to negotiate the use or non-use of the request acknowledgement facility specified in 6.13.4.3. The following information is sent only in the CR TPDU: r) Version number - This defines the version of the transport protocol standard used for this connection. 6.6 Connection refusal 6.6.1 Purpose The connection refusal procedure is used in all classes when a transport entity refuses a transport connection in response to a CR TPDU. 6.6.2 TPDUs and parameters used The procedure uses the follow TPDUs and parameters: a) DR TPDU - SRC-REF; - reason; - user data; b) ER TPDU - reject cause; - invalid TPDU. 6.6.3 Procedure If a transport connection cannot be accepted, the responder shall respond to the CR TPDU with a DR TPDU. The reason shall indicate why the connection was not accepted. The source reference field in the DR TPDU shall be set to zero to indicate an unassigned reference. If a DR TPDU is received, the initiator shall regard the connection as released. The responder shall respond to an invalid CR TPDU by sending an ER or DR TPDU. If an ER TPDU is received in response to a CR TPDU, the initiator shall regard the connection as released. NOTES 1 When the invalid CR TPDU can be identified as having class 0 as the preferred class, it is recommended to respond with an ER TPDU. For all other invalid CR TPDUs either an ER TPDU or DR TPDU may be sent. 2 If the optional supervisory timer TS1 has been set for this connection, then the initiator should stop the timer on receipt of the DR or ER TPDU. 3 It is a local matter whether the initiator releases the network connection if no transport connections are now assigned to it. 6.7 Normal release 6.7.1 Normal release when operating over CONS 6.7.1.1 Purpose The release procedure is used by a transport entity in order to terminate a transport connection. The implicit variant is used only in class 0. The explicit variant is used in classes 1, 2, 3 and 4. NOTES 1 When the implicit variant is used (i.e. in class 0), the lifetime of the transport connection is directly correlated with the lifetime of the network connection. 2 The use of the explicit variant of the release procedure enables the transport connection to be released independently of the underlying network connection. Recommendation X.224 (11/93) 21 6.7.1.2 Network service primitives The procedure uses the following network service primitives: a) N-DISCONNECT; b) N-DATA. 6.7.1.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters a) DR TPDU - reason; - user data; - SRC-REF; - DST-REF; b) DC TPDU. 6.7.1.4 Procedure for implicit variant In the implicit variant either transport entity disconnects a transport connection by disconnecting the network connection to which it is assigned. When a transport entity receives an N-DISCONNECT this should be considered as the release of the transport connection. 6.7.1.5 Procedure for explicit variant When the release of a transport connection is to be initiated, a transport entity a) If it has previously sent or received a CC TPDU (see Note 3) shall 1) send a DR TPDU; 2) discard all subsequently received TPDUs other than a DR or DC TPDU; 3) consider the transport connection released on receipt of a DR or DC TPDU. b) If a) is not applicable and if there is an outstanding CR TPDU, it shall 1) for classes other than class 4 wait for the acknowledgement of the outstanding CR TPDU; if it receives a CC TPDU, it shall follow the procedures in 6.7.1.5 a); 2) for class 4 either send a DR TPDU with a zero value in the DST-REF field or follow the procedure in 6.7.1.5 b) 1). In the former case further receipt of a CC TPDU specifying class 4 will be ignored. Receipt of CC TPDU with another class will be processed as follows: If the class is 0 the network connection shall be disconnected, otherwise a DR TPDU with the DST-REF field set to the value of the SRC-REF field of the received CC TPDU shall be sent and the release procedure of the class is continued. A transport entity that receives a DR TPDU shall c) If it has previously sent a DR TPDU for the same transport connection, consider the transport connection released. d) If it has previously sent a CR TPDU that has not been acknowledged by a CC TPDU, consider the connection refused (see 6.6), if the SRC-REF is not zero a DC TPDU shall be sent using the SRC-REF as the DST-REF. NOTE 1 - In this case, the DR has been associated regardless of its SRC-REF field (see 6.9.1.4 and 6.9.2.4). e) If c) and d) are not applicable, send a DC TPDU and consider the transport connection released. If the received DR has the DST-REF field set to zero, then a DC with SRC-REF set to zero shall be sent, regardless of the local reference. NOTE 2 - If the entity receiving such a DR TPDU has previously decided to negotiate down the class, this entity is always entitled to consider such a DR TPDU as spurious. Since no association has been made the transport connection is not released at the responder side but the CC TPDU, when sent, will be answered by a DR TPDU (spurious CC TPDU). NOTE 3 - This requirement ensures that the transport entity is aware of the remote reference for the transport connection. NOTE 4 - When the transport connection is considered as released, the local reference is either available for re use or is frozen (see 6.18). 22 Recommendation X.224 (11/93) NOTE 5 - After the release of a transport connection, the network connection can be released or retained to enable its re-use for the assignment of other transport connections (see 6.1.1). NOTE 6 - Except in class 4, it is recommended that, if a transport entity does not receive acknowledgement of a DR TPDU within time TS2, it should either reset or disconnect the network connection, and freeze the reference when appropriate (see 6.18). For all other transport connection(s) multiplexed on this network connection the procedures for reset or disconnect as appropriate should be followed. NOTE 7 - When a transport entity is waiting for a CC TPDU before sending a DR TPDU and the network connection is reset or released, it should consider the transport connection released and, in classes other than classes 0 and 2, freeze the reference (see 6.18). 6.7.2 Normal release when operating over CLNS 6.7.2.1 Purpose The release procedure is used by a transport entity in order to terminate a transport connection. 6.7.2.2 Network service primitives The procedures makes use of the following network service primitive: N-UNITDATA. 6.7.2.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters a) DR TPDU; - reason; - user data; - SRC-REF; - DST-REF; b) DC TPDU. 6.7.2.4 Procedure When the release of a transport connection is to be initiated, a transport entity shall send a DR TPDU and shall discard all subsequently received TPDUs except for a DR or a DC TPDU. On the receipt of a DR or a DC TPDU, it shall consider the transport connection to be released and the local reference shall be frozen (see 6.18). If a CC TPDU has been previously sent or received by the transport connection, then the remote reference is known and shall be used for the DST-REF in the DR TPDU to be sent. If the remote reference is not known, then the DST-REF in the DR TPDU may be set to zero, or the entity may wait until a CC TPDU is received before sending the DR TPDU. NOTE - In case that the entity decides to wait for the arrival of the CC TPDU for the connection, deadlock could result from a CC TPDU that never arrives. Such a deadlock is prevented by the expiration of the CR TPDU retransmission counter, which forces the DR TPDU to be sent. A transport entity which receives a DR TPDU shall a) consider the transport connection to be released if it has previously sent a DR TPDU for that connection; b) consider the transport connection to be refused (see 6.6) if it has previously sent a CR TPDU for that connection and no CC TPDU has been received in acknowledgment; c) consider the transport connection to be released and send a DC TPDU in all other cases. If the received DR TPDU has the DST-REF field set to zero, then a DC TPDU with SRC-REF set to zero shall be sent, regardless of the local reference. 6.8 Error release when operating over CONS 6.8.1 Purpose This procedure is used only in classes 0 and 2 to release a transport connection on the receipt of an N-DISCONNECT or N-RESET indication. Recommendation X.224 (11/93) 23 6.8.2 Network service primitives The procedure uses the following service primitives: a) N-DISCONNECT request; b) N-DISCONNECT indication; c) N-RESET indication; d) N-RESET response. 6.8.3 Procedure When, on the network connection to which a transport connection is assigned, an N-DISCONNECT or N-RESET indication is received, both transport entities shall consider that the transport connection is released and so inform the TS-users. On receipt of an N-RESET indication: - in class 0, an N-DISCONNECT request shall be issued; - in class 2, it is a local choice to issue an N-RESET response or an N-DISCONNECT request; one of these primitives shall be issued. However, if the Network Connection has other Transport Connections of a different class assigned to it, the error recovery procedure of that class shall be used to determine which primitive is issued. 6.9 Association of TPDUs with transport connections 6.9.1 Association of TPDUs with transport connections when operating over CONS 6.9.1.1 Purpose This procedure is used in all classes to interpret a received NSDU as TPDU(s) and, if possible, to associate each such TPDU with a transport connection. 6.9.1.2 Network service primitives The procedure uses the following network service primitives: a) N-DATA indication; b) N-EXPEDITED DATA indication; c) N-RESET request; d) N-DISCONNECT request. 6.9.1.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) any TPDU except CR TPDU, DT TPDU in classes 0 or 1 and AK TPDU in class 1 - DST-REF; b) CR, CC, DR and DC TPDUs - SRC-REF; c) DT TPDU in classes 0 or 1 and AK TPDU in class 1. 6.9.1.4 Procedures 6.9.1.4.1 Identification of TPDUs If the received NSDU or expedited NSDU cannot be decoded (i.e. does not contain one or more correct TPDUs) or is corrupted (i.e. contains a TPDU with a wrong checksum), then the transport entity shall a) if the network connection on which the error is detected has a class 0 or 1 transport connection assigned to it, treat as a protocol error (see 6.22) for that transport connection; 24 Recommendation X.224 (11/93) b) otherwise: 1) if the NSDU can be decoded but contains corrupted TPDUs, discard the TPDUs (class 4 only) and optionally apply 6.9.1.4.1 b) 2); 2) if the NSDU cannot be decoded issue an N-RESET or N-DISCONNECT request for the network connection and for all the transport connections assigned to this network connection (if any), apply the procedures defined for handling of network signalled reset or disconnect. If the NSDU can be decoded and is not corrupted, the transport entity shall a) if the network connection on which the NSDU was received has a class 0 transport connection assigned to it, consider the NSDU as forming one TPDU and associate the TPDU with the transport connection (see 6.9.1.4.2); b) otherwise, invoke the separation procedures and for each of the individual TPDUs in the order in which they appear in the NSDU apply the procedure defined in 6.9.1.4.2. 6.9.1.4.2 Association of individual TPDU If the received TPDU is a CR TPDU, and if the SRC-REF parameter and the remote NSAP indicate an existing transport connection at that receiving entity, then the CR TPDU is associated with that transport connection, otherwise it is processed as requesting the creation of a new transport connection. If the received TPDU is a DT TPDU and the network connection has no TC assigned to it, and the DT TPDU is a class 0 or class 1 TPDU (as recognized by the absence of a DST-REF field), then the TPDU should be ignored. Otherwise, the DST-REF parameter of the TPDU is used to identify the transport connection. The following cases are distinguished: a) If the DST-REF is not allocated to a transport connection, then no association with a transport connection is made and there are three cases: 1) If the TPDU is a CC TPDU the transport entity shall respond on the same network connection with a DR TPDU. The SRC-REF of the DR TPDU may be either 0 or the DST-REF from the received CC TPDU. 2) If the TPDU is a DR TPDU the transport entity shall respond on the same network connection with a DC TPDU; except in the case that the DR is carrying an SRC-REF set to zero, then no DC TPDU shall be sent, or in the case where the transport entity only supports class 0 then the network connection shall be disconnected. 3) If the TPDU is neither a CC or DR it shall be discarded. b) If the DST-REF is allocated to a transport connection, but the TPDU is received on a network connection to which this connection has not been assigned, then there are four cases: 1) If the transport connection is of class 4 and if the TPDU is received on a network connection with the same pair of NSAPs as that of the CR TPDU, then the TPDU is associated with this transport connection and considered as performing assignment. 2) If the transport connection is not assigned to any network connection (waiting for reassignment after failure) and if the TPDU is received on a network connection with the same pair of NSAPs as that of the CR TPDU, then the association with that transport connection is made, except in the case of DC, DR and CC TPDUs which are respectively described in 6.9.1.4.2 c), d), e). 3) In classes 1 and 3, it is also possible to receive a TPDU performing reassignment prior to the notification of the disconnect of the current network connection (i.e. the transport connection is assigned to a network connection, but a TPDU containing the appropriate DST-REF is received on another network connection). In this case it is recommended that the transport entity: - issue an N-DISCONNECT request on the network connection to which the transport connection is currently assigned, - apply to all transport connections assigned to this network connection the procedure for processing a received N-DISCONNECT indication, - and then process the TPDU performing reassignment. Recommendation X.224 (11/93) 25 4) Otherwise, the TPDU is considered as having a DST-REF not allocated to a transport connection [case a)]. c) If the TPDU is a DC TPDU then it is associated with the transport connection to which the DST-REF is allocated, unless the SRC-REF is not the expected one, in which case the DC TPDU is discarded. d) If the TPDU is a DR TPDU, then there are four cases: 1) If the SRC-REF is not as expected then a DC TPDU with DST-REF equal to the SRC-REF of the received DR TPDU is sent back and no association is made, except that in the case where the transport entity only supports class 0 and cannot transmit a DC TPDU, it disconnects the network connection instead of transmitting a DC TPDU. 2) If a CR TPDU is unacknowledged then the DR TPDU is associated with the transport connection, regardless of the value of its SRC-REF parameter. 3) If the transport entity implements class 4 and if the DST-REF is zero and there is an unacknowledged CC TPDU or T-CONNECT RESPONSE is awaited, then the DR TPDU shall be associated with the transport connection holding the SRC-REF as the remote reference. 4) Otherwise, the DR TPDU is associated with the transport connection identified by the DST-REF parameter. e) If the TPDU is a CC TPDU whose DST-REF parameter identifies an open connection (one for which a CC TPDU has been previously received), and the SRC-REF in the CC TPDU does not match the remote reference, then a DR TPDU is sent back with DST-REF equal to the SRC-REF of the received CC TPDU and no association is made. f) If none of the above cases apply then the TPDU is associated with the transport connection identified by the DST-REF parameter. 6.9.2 Association of TPDUs with transport connections when operating over CLNS 6.9.2.1 Purpose This procedure is used to interpret a received NSDU as TPDU(s) and, if possible, to associate each such TPDU with a transport connection. 6.9.2.2 Network service primitives This procedure makes use of the following network service primitive: N-UNITDATA. 6.9.2.3 TPDUs and parameters used This procedure makes use of the following TPDUs and parameters: a) all TPDUs except CR TPDU; - DST-REF; b) CR, CC, DR and DC TPDUs; - SRC-REF. 6.9.2.4 Procedures 6.9.2.4.1 Identification of TPDUs If the received NSDU cannot be decoded (i.e. does not contain one or more correct TPDUs) or is corrupted (i.e. contains a TPDU with a wrong checksum), then the transport entity shall ignore (discard) the TPDUs. If the NSDU can be decoded and is not corrupted, the transport entity shall invoke the separation procedures and for each of the individual TPDUs in the order in which they appear in the NSDU apply the procedure in 6.9.2.4.2. 26 Recommendation X.224 (11/93) 6.9.2.4.2 Association of individual TPDUs Association of a received TPDU with a transport connection is generally performed by attempting to match the DST-REF in the received TPDU and the NSAP pair over which it was received with those of an existing transport connection. There are three exceptions to this general procedure: when the received TPDU is a CR TPDU, the SRC-REF is used instead of the DST-REF; when the received TPDU is either a DR or a DC TPDU, the SRC-REF is used in addition to the DST-REF; and when the received TPDU is a CC TPDU, whose DST-REF parameter identifies an open connection (one for which a CC TPDU has been previously received), then the SRC-REF is used in addition to the DST-REF. The following actions shall be taken in consequence to the inability to match the TPDU to an existing transport connection: a) for a CR TPDU, a new transport connection shall be created; b) for a CC TPDU, a DR TPDU shall be sent using the SRC-REF and DST-REF from the received CC TPDU as the DST-REF and SRC-REF, respectively, of the DR TPDU; c) for a DR TPDU, there are four cases: 1) if a CR TPDU is unacknowledged for the connection identified by the DST-REF in the DR TPDU, then the DR TPDU is associated with that connection regardless of the SRC-REF in the DR TPDU; 2) if the CR TPDU for the connection identified by the DST-REF of the DR TPDU has been acknowledged and the SRC-REF is not as expected, then a DC TPDU using the SRC-REF of the DR TPDU as DST-REF is sent and no association is made; 3) if the DST-REF in the DR TPDU is zero and there is an unacknowledged CC TPDU or a T-CONNECT response is awaited for a transport connection holding remote reference equal to the SRC-REF of the DR TPDU, then the DR TPDU is associated with that transport connection; 4) in all other situations, the DR TPDU is associated with the transport connection identified by the DST-REF of the DR TPDU; d) for all other TPDU types, the TPDU is discarded. 6.10 Data TPDU numbering 6.10.1 Purpose Data TPDU numbering is used in classes 1, 2 (except when the non-use of explicit flow control option is selected), 3 and 4. Its purpose is to enable the use of recovery, flow control and resequencing functions. 6.10.2 TPDUs and parameters used The procedure uses the following TPDU and parameter: DT TPDU - TPDU-NR. 6.10.3 Procedure A transport entity shall allocate the sequence number zero to the TPDU-NR of the first DT TPDU which it transmits for a transport connection. For subsequent DT TPDUs sent on the same transport connection, the transport entity shall allocate a sequence number one greater than the previous one. When a DT TPDU is retransmitted, the TPDU-NR parameter shall have the same value as in the first transmission of that DT TPDU. Modulo 2 7 arithmetic shall be used when normal formats have been selected and modulo 2 31 arithmetic shall be used when extended formats have been selected. In this Recommendation the relationships "greater than" and "less than" apply to a set of contiguous TPDU numbers whose range is less than the modulus and whose starting and finishing numbers are known. The term "less than" means "occurring sooner in the window sequence" and the term "greater than" means "occurring later in the window sequence". Recommendation X.224 (11/93) 27 6.11 Expedited data transfer 6.11.1 Expedited data transfer when operating over CONS 6.11.1.1 Purpose Expedited data transfer procedures are selected during connection establishment. The network normal data variant may be used in classes 1, 2, 3 and 4. The network expedited variant is only used in class 1. 6.11.1.2 Network service primitives The procedure uses the following network service primitives: a) N-DATA; b) N-EXPEDITED DATA. 6.11.1.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) ED TPDU - ED TPDU-NR; b) EA TPDU - YR-EDTU-NR. 6.11.1.4 Procedures The TS-user data parameter of each T-EXPEDITED DATA request shall be conveyed as the data field of an Expedited Data (ED) TPDU. Each ED TPDU received shall be acknowledged by an Expedited Acknowledge (EA) TPDU. No more than one ED TPDU shall remain unacknowledged at any time for each direction of a transport connection. An ED TPDU with a zero length data field shall be treated as a protocol error. NOTES 1 The network normal data variant is used, except when the network expedited variant (available in class 1 only), has been agreed, in which case ED and EA TPDUs are conveyed in the data fields of N-EXPEDITED DATA primitives (see 6.2.3). 2 No TPDU can be transmitted using the network expedited variant until the CC TPDU becomes acknowledged, to prevent the network expedited variant from overtaking the CC TPDU. 6.11.2 Expedited data transfer when operating over CLNS 6.11.2.1 Purpose Expedited data transfer procedures are selected during connection establishment. 6.11.2.2 Network service primitives The procedure makes use of the following network service primitive: N-UNITDATA. 6.11.2.3 TPDUs and parameters used The procedure makes use of the following TPDUs and parameters: a) ED TPDU - ED TPDU-NR; b) EA TPDU - YR-EDTU-NR. 28 Recommendation X.224 (11/93) 6.11.2.4 Procedures The TS-user data parameter of each T-EXPEDITED DATA request shall be conveyed as the data field of an Expedited Data (ED) TPDU. Each ED TPDU received shall be acknowledged by an Expedited Acknowledge (EA) TPDU. No more than one ED TPDU shall remain unacknowledged at any time for each direction of a transport connection. An ED TPDU with a zero length data field shall be treated as a protocol error (see 6.22). 6.12 Reassignment after failure when operating over CONS 6.12.1 Purpose The reassignment after failure procedure is used in classes 1 and 3 to commence recovery from an NS-provider signalled disconnect. 6.12.2 Network service primitives The procedure uses the following network service primitive: N-DISCONNECT indication. 6.12.3 Procedure When an N-DISCONNECT indication is received for the network connection to which a transport connection is assigned, the initiator shall apply one of the following alternatives: a) If the TTR timer has not already run out and no DR TPDU is retained 1) assign the transport connection to a different network connection (see 6.1.1) and start its TTR timer if not already started; 2) while waiting for the completion of assignment if - an N-DISCONNECT indication is received, repeat the procedure from 6.12.3 a); - the TTR timer expires, begin procedure 6.12.3 b); 3) when reassignment is complete perform active resynchronization by executing the procedure described in 6.14.4.1, and, if 6.14.4.1 b) has been performed, wait for the next event as follows: - if a valid TPDU is received as the result of the resynchronization, stop the TTR timer, or - if TTR runs out, wait for the next event, or - if an N-DISCONNECT indication is received, begin either procedure 6.12.3 a) or 6.12.3 b) depending on the TTR timer. NOTE - After TTR expires and while waiting for the next event, it is recommended that the initiator set a timer with a value equal to TWR. If this timer expires before the next event, the initiator should begin the procedure in 6.12.3 b). b) If the TTR timer has run out, consider the transport connection as released and freeze the reference (see 6.18). c) If a DR TPDU is retained and the TTR timer has not run out, then follow the actions in either 6.12.3 a) or 6.12.3 b). The responder shall start its TWR timer if not already started. The arrival of the first TPDU related to the transport connection (because of resynchronization by the initiator) completes the reassignment after failure procedure. The TWR timer is stopped and the responder shall continue with resynchronization (see 6.14). If reassignment does not take place within this time, the transport connection is considered released and the reference is frozen (see 6.18). Recommendation X.224 (11/93) 29 6.12.4 Timers The reassignment after failure procedure uses two timers: a) TTR, the time to try reassignment/resynchronization timer; b) TWR, the time to wait for reassignment/ resynchronization timer. The TTR timer is used by the initiator. Its value shall not exceed 2 min minus the sum of the maximum disconnect propagation delay and the maximum transit delay of the network connections (see Note 1). The value for the TTR timer may be indicated in the CR TPDU. The TWR timer is used by the responder. If the reassignment time parameter is present in the CR TPDU, the TWR timer value shall be greater than the sum of the TTR timer plus the maximum disconnect propagation delay plus the maximum transit delay of the network connections. If the reassignment time parameter is not present in the CR TPDU, a default value of 2 min shall be used for the TWR timer. NOTES 1 Provided that the required quality of service is met, TTR may be set to zero (i.e. no reassignment). This may be done, for example, if the rate of NS-provider generated disconnects is very low. 2 Inclusion of the reassignment time parameter in the CR TPDU allows the responder to use a TWR value of less than 2 min. 3 If the optional TS1 and TS2 timers are used, it is recommended a) to stop TS1 or TS2 if running when TTR or TWR is started; b) to restart TS1 or TS2 if necessary when the corresponding TPDU (CR TPDU or DR TPDU respectively) is repeated; c) to select for TS1 and TS2 values greater than TTR. 6.13 Retention and acknowledgement of TPDUs 6.13.1 Purpose The retention and acknowledgement of TPDUs procedure is used in classes 1, 3 and 4 to enable and minimize retransmission after possible loss of TPDUs. The confirmation of receipt variant is used only in class 1 when it has been agreed during connection establishment (see the Note). The AK variant is used in classes 3 and 4 and also in class 1 when the confirmation of receipt variant has not been agreed during connection establishment. In addition, in class 4, the option of using selective acknowledgement may be agreed to during connection establishment. The request acknowledgement procedure is selected during connection establishment and may be used in classes 3 and 4, and in class 1 when the confirmation of receipt variant has not been agreed during connection establishment. It allows a transport entity to request acknowledgement of retained DT TPDUs by setting the ROA parameter in a transmitted DT TPDU. NOTE - Use of the confirmation of receipt variant depends on the availability of the network layer receipt confirmation service and the expected cost reduction. 6.13.2 Network service primitives When operating over CONS, the procedure uses the following network service primitives: a) N-DATA; b) N-DATA ACKNOWLEDGE. When operating over CLNS, the procedure uses the following network service primitive: N-UNIT DATA. 30 Recommendation X.224 (11/93) 6.13.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) CR, CC, DR and DC TPDUs; b) AK TPDU - YR-TU-NR - selective acknowledgement parameters; c) RJ TPDU - YR-TU-NR; d) DT TPDU - TPDU-NR; e) ED TPDU - ED-TPDU-NR; f) EA TPDU - YR-EDTU-NR. 6.13.4 Procedures 6.13.4.1 Retention until acknowledgement of TPDUs Copies of the following TPDUs shall be retained upon transmission to permit their later retransmission: CR, CC, DR, DT and ED TPDUs. except in the following case: if a DR TPDU is sent in response to a CR TPDU there is no need to retain a copy of the DR TPDU. A copy of each of these TPDUs shall be retained until a) it is acknowledged, as specified in Table 5; or b) the transport connection is released. TABLE 5/X.224 Acknowledgement of TPDUs Retained TPDU Variant Retained until acknowledged by: CR Both CC, DR or ER TPDU DR Both DC or DR (in case of collision) TPDU CC Confirmation of receipt variant N-DATA ACKNOWLEDGE indication, RJ, DT, EA or ED TPDU CC AK variant RJ, DT, AK, ED or EA TPDU DT Confirmation of receipt variant N-DATA ACKNOWLEDGE indication corresponding to an N-DATA request which conveyed, or came after, the DT TPDU DT AK variant AK or RJ TPDU for which the YR-TU-NR is greater than TPDU-NR in the DT TPDU. In case of selective acknowledgement, if the selective acknowledgement parameters in the AK TPDU include the TPDU-NR of the DT TPDU ED Both EA TPDU for which the YR-EDTU-NR is equal to the ED-TPDU-NR in the ED TPDU Recommendation X.224 (11/93) 31 6.13.4.2 Confirmation of receipt variant In the confirmation of receipt variant, applicable only in class 1, transport entities shall a) set the confirmation request parameter only if the data parameter contains a CC or DT TPDU (see Notes 1 and 2 in 6.13.4.4); b) issue an N-DATA ACKNOWLEDGE request when it receives an N-DATA indication with the confirmation request parameter set. 6.13.4.3 Request of acknowledgement option If the request acknowledgement procedure has been negotiated, transport entities a) may request acknowledgement of retained DT TPDUs by setting the ROA parameter in a transmitted DT TPDU. The decision as to when the sending transport entity should request acknowledgement is a local matter (see Note 4 in 6.13.4.4); b) on receipt of a DT TPDU with the ROA parameter set shall transmit an AK TPDU containing up-to-date window information. 6.13.4.4 Selective acknowledgement option If the selective acknowledgement option has been negotiated, transport entities a) may include selective acknowledgement parameters in a transmitted AK TPDU. These selective acknowledgement parameters, if included, shall contain acknowledgement of blocks of TPDUs not acknowledged by the YR-TU-NR field of the AK TPDU. This procedure allows transport entities to acknowledge DT TPDUs that are within the window but that are not in sequence; b) on receipt of an AK TPDU containing selective acknowledgement parameter(s) shall discard the DT TPDUs specified. NOTES (Notes 1 to 3 only apply when operating over CONS) 1 It is a local matter for each transport entity to decide which N-DATA requests should have the confirmation request parameter set. This decision will normally be related to the amount of storage available for retained copies of the DT TPDUs. 2 Use of the confirmation request parameter may affect the quality of network service. 3 In class 3, and in class 1, when use of explicit AK variant is selected, if a transport entity does not send an AK TPDU after reception of each DT TPDU, it is recommended that it - starts a timer after reception of DT TPDU; - sends an AK TPDU with up-to-date window information at expiration of the timer if an AK TPDU with the same window information has not been previously sent. Selection of the value of this timer is a local matter but may affect performance. 4 It is recommended that, if the sending transport entity has a restriction in the number of DT TPDUs that it can retain, then it set the ROA parameter to avoid a delay in transmitting DT TPDUs due to the remote transport entity operating an AK withholding policy. 6.14 Resynchronization 6.14.1 Purpose The resynchronization procedures are used in classes 1 and 3 to restore the transport connection to normal after a reset or during reassignment after failure according to 6.12. 6.14.2 Network service primitives The procedure uses the following network service primitive: N-RESET indication. 6.14.3 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) CR, DR, CC and DC TPDUs; b) RJ TPDU - YR-TU-NR; 32 Recommendation X.224 (11/93) c) DT TPDU - TPDU-NR; d) ED TPDU - ED-TPDU-NR; e) EA TPDU - YR-EDTU-NT. 6.14.4 Procedure A transport entity which is notified of the occurrence of a N-RESET shall: a) if the transport entity is the responder, carry out the passive resynchronization procedure (see 6.14.4.2); b) if the transport entity has elected not to reassign, do nothing; c) otherwise, execute the active resynchronization procedure described in 6.14.4.1 and, if 6.14.4.1 b) has been performed, wait for the next event as follows: - if a valid TPDU is received as the result of the resynchronization, stop the TTR timer, or - if TTR runs out, wait for the next event, or - if an N-RESET indication is received, perform 6.14.4. 6.14.4.1 Active resynchronization procedures The transport entity shall carry out one of the following actions: a) if the TTR timer has been previously started and has run out (i.e. no valid TPDU has been received), the procedures defined in 6.12.3 a) 3) shall apply; b) otherwise, the TTR timer shall be started (unless it is already running) and the first which become applicable of the following actions shall be taken: 1) if a CR TPDU is unacknowledged, then the transport entity shall retransmit it; 2) if a DR TPDU is unacknowledged, then the transport entity shall retransmit it; 3) otherwise, the transport entity shall carry out the data resynchronization procedures (6.14.4.3). 6.14.4.2 Passive resynchronization procedures The transport entity shall not send any TPDUs until a TPDU has been received. The transport entity shall start its TWR timer if it has not already been started (due to a previous N-DISCONNECT or N-RESET indication). If the timer runs out prior to the receipt of a valid TPDU which commences resynchronization (i.e. CR or DR or ED or RJ TPDU), the transport connection is considered as released and the reference is frozen (see 6.18). When a valid TPDU is received the transport entity shall stop its TWR timer and carry out one of the following appropriate actions, depending on the TPDU: a) if it is a DR TPDU, then the transport entity shall send a DC TPDU; b) if it is a repeated CR TPDU (see Note 1) the transport entity shall carry out the appropriate action from the following: 1) if a CC TPDU has already been sent, and acknowledged: treat as a protocol error; 2) if the responder wants to release the transport connection or refuse the CR TPDU: (re)transmit the DR TPDU, setting the source reference to zero; 3) if the T-CONNECT response has not yet been received from the user: take no action; 4) otherwise: (re)transmit the CC TPDU, followed by retransmission of any unacknowledged ED TPDU (see Note 2) and retransmission of the unacknowledged DT TPDUs, subject to any applicable flow control procedures. Recommendation X.224 (11/93) 33 NOTES 1 A repeated CR TPDU can be identified by being on a network connection with the appropriate network addresses and having a correct source reference. 2 The transport entity should not use network expedited until the CC TPDU is acknowledged (see 6.5). This rule prevents the network expedited from overtaking the CC TPDU. c) if it is an RJ or ED TPDU, then one of the following actions shall be taken: 1) if a DR TPDU is unacknowledged, then the transport entity shall retransmit it; 2) if a CC TPDU is unacknowledged, the RJ or ED TPDU shall be considered as acknowledging the CC TPDU, and the transport entity shall carry out the data resynchronization procedures (6.14.4.3); 3) otherwise, the transport entity shall carry out the data resynchronization procedures (6.14.4.3). 6.14.4.3 Data resynchronization procedures The transport entity shall carry out the following actions in the following order: a) (re)transmit any ED TPDU which is unacknowledged. b) transmit an RJ TPDU with YR-TU-NR field set to the TPDU-NR of the next expected DT TPDU; c) wait for the next TPDU from the other transport entity, unless an RJ or DR TPDU has already been received; if a DR TPDU is received the transport entity shall send a DC TPDU, freeze the reference, inform the TS-user of the disconnection and take no further action [i.e. it shall not follow the procedures in 6.14.4.3 d)]. If an RJ TPDU is received, the procedure of 6.14.4.3 d) shall be followed. If an ED TPDU is received the procedures as described in 6.11 shall be followed. If it is a duplicated ED-TPDU the transport entity shall acknowledge it with an EA TPDU, discard the duplicated ED TPDU and wait again for the next TPDU; d) (re)transmit any DT TPDUs which are unacknowledged, subject to any applicable flow control procedures (see the Note). NOTE - The RJ TPDU may have reduced the credit. 6.15 Multiplexing and demultiplexing when operating over CONS 6.15.1 Purpose The multiplexing and demultiplexing procedures are used in classes 2, 3 and 4 to allow several transport connections to share a network connection at the same time. 6.15.2 TPDUs and parameters used The procedure uses the following TPDUs and parameters: CC, DR, DC, DT, AK, ED, EA, RJ, and ER TPDUs - DST-REF. 6.15.3 Procedure The transport entities shall be able to send and receive on the same network connection TPDUs belonging to different transport connections. NOTES 1 When performing demultiplexing, the transport connection to which the TPDUs apply is determined by the procedures defined in 6.9. 2 Multiplexing allows the concatenation of TPDUs belonging to different transport connections to be transferred in the same N-DATA primitive (see 6.4). 6.16 Explicit flow control 6.16.1 Purpose The explicit flow control procedure is used in classes 2, 3 and 4 to regulate the flow of DT TPDUs independently of the flow control in the other layers. 34 Recommendation X.224 (11/93) 6.16.2 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) CR, CC, AK and RJ TPDUs - CDT; b) DT TPDU - TPDU-NR; - ROA; c) AK TPDU - YR-TU-NR; - subsequence number; - flow control confirmation; - selective acknowledgement parameters; d) RJ TPDU - YR-TU-NR. 6.16.3 Procedure The procedures differ in different classes. They are defined in the clauses specifying the separate classes. 6.17 Checksum 6.17.1 Purpose The checksum procedure is used to detect corruption of TPDUs by the NS-provider. NOTE - Although a checksum algorithm has to be adapted to the type of errors expected on the network connection, at present, only one algorithm is defined. 6.17.2 TPDUs and parameters used The procedure uses the following TPDUs and parameters: All TPDUs - checksum. 6.17.3 Procedure The checksum shall be used only in class 4. It shall always be used for the CR TPDU, and shall be used for all other TPDUs unless the non-use of the checksum was selected during connection establishment. The sending transport entity shall transmit TPDUs with the checksum parameter set such that the following formulae are satisfied: * i = 1 L a i = 0 (modulo 255) * i = 1 L ia i = 0 (modulo 255) where i is the number (i.e. position) of an octet within the TPDU (see 13.2); a i is the value of octet in position i ; L is the length of TPDU in octets. Recommendation X.224 (11/93) 35 A transport entity which receives a TPDU for a transport connection for which the use of the checksum has been agreed and which does not satisfy the above formulae shall discard the TPDU (see also Note 2). When a spurious TPDU is received and an answer has to be sent, the transport entity shall a) if it supports the checksum algorithm and the received TPDU contains a checksum parameter, include a checksum parameter in the answering TPDU; or b) in all other cases, not include a checksum parameter in the answering TPDU. An entity not supporting the checksum may always suppose that a CR TPDU with class 4 proposed is correct and therefore negotiate down to a class lower than 4. NOTES 1 An efficient algorithm for determining the checksum parameters is given in Annex B. 2 If the checksum is incorrect, it is impossible to know with certainty to which transport connection the TPDU is related; further action may be required dependent on the type of network service in use (see 6.9.1 for CONS and 6.9.2 for CLNS). 3 The checksum proposed is easy to calculate and so will not impose a heavy burden on implementations. However, it will not detect insertion or loss of leading or trailing zeros and will not detect some octets misordering. 4 When CONS is used and a TPDU is received on a network connection, it is impossible to know with certainty that only class 4 transport connections use this network connection as it may be a TPDU performing reassignment. Consequently, the only way to check the validity is as follows: a) if the network connection is used by a class 0 or class 1 transport connection, there is no checksum; b) examine the TPDU code; c) deduce the fixed part length; d) from LI, deduce the variable part; e) go through parameters and if the checksum parameter is found, then verify it; f) if it is incorrect, then assume that transport connection is class 4 and drop it; g) if it is correct, then associate the TPDU with a transport connection; if the transport connection uses the checksum, it is correct; otherwise, it shall be considered as a protocol error. 6.18 Frozen references 6.18.1 Purpose This procedure shall be used in order to prevent re-use of a reference while TPDUs associated with the old use of the reference may still exist. 6.18.2 Procedure When a transport entity determines that a particular connection is released it shall place the reference which it has allocated to the connection in a frozen state according to the procedures of the class. While frozen, the reference shall not be re-used. NOTE - The frozen reference procedure is necessary because retransmission or misordering can cause TPDUs bearing a reference to arrive at an entity after it has released the connection for which it allocated the reference. Retransmission, for example, can arise when the class includes either resynchronization (see 6.14) or retransmission on time-out (see 6.19). 6.18.2.1 Procedure for classes 0 and 2 This Recommendation does not specify frozen reference procedures for classes 0 and 2. NOTE - For consistency with other classes, references may be frozen as a local matter. 6.18.2.2 Procedure for classes 1 and 3 The frozen reference procedure is used except in the following cases (see Note 1): a) when the transport entity receives a DC TPDU in response to a DR TPDU which it has sent (see Note 2); b) when the transport entity sends a DR or ER TPDU in response to a CR TPDU which it has received (see Note 3); c) when the transport entity has considered the connection to be released after the expiration of the TWR timer (see Note 4); 36 Recommendation X.224 (11/93) d) when the transport entity receives a DR or ER TPDU in response to a CR TPDU which it has sent; e) when the reference is zero. The period of time for which the reference remains frozen shall be greater than the TWR time. NOTES 1 However, even in these cases, for consistency freezing the reference may be done as a local decision. 2 When the DC TPDU is received it is certain that the other transport entity considers the connection released. 3 When the DR or ER TPDU is sent the peer transport entity has not been informed of any reference assignment and thus cannot possibly make use of a reference (this includes the case where a CC TPDU was sent, but was lost). 4 In c) the transport entity has already effectively frozen the reference for an adequate period. 6.18.2.3 Procedure for class 4 The frozen reference procedure shall be used in class 4. The period for which the reference remains frozen shall be greater than L (see 12.2.1.1.6). 6.19 Retransmission on time-out 6.19.1 Purpose The procedure is used in class 4 to cope with unsignalled loss of TPDUs by the NS provider. 6.19.2 TPDUs used The procedure uses the following TPDUs: CR, CC, DR, DT, ED, AK TPDUs. 6.19.3 Procedure The procedure is specified in the procedures for class 4 [see 12.2.1.2 i) and 12.2.1.3 g)]. 6.20 Resequencing 6.20.1 Purpose The resequencing procedure is used in class 4 to cope with misordering of TPDUs by the network service provider. 6.20.2 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) DT TPDU - TPDU-NR; b) ED TPDU - ED TPDU-NR. 6.20.3 Procedure The procedure is specified in the procedures for class 4 (see 12.2.3.5). 6.21 Inactivity control 6.21.1 Purpose The inactivity control procedure is used in class 4 to cope with unsignalled termination of a network connection when using CONS and the failure of a remote transport entity when using CONS or CLNS. Recommendation X.224 (11/93) 37 6.21.2 Procedure The procedure is specified in the procedures for class 4 (see 12.2.3.3). 6.22 Treatment of protocol errors 6.22.1 Treatment of protocol errors when operating over CONS 6.22.1.1 Purpose The procedure for treatment of protocol errors is used in all classes to deal with invalid TPDUs. 6.22.1.2 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) ER TPDU - reject cause; - invalid TPDU; b) DR TPDU - reason code. 6.22.1.3 Procedure A transport entity that receives a TPDU that can be associated to a transport connection and is invalid or constitutes a protocol error (see 3.2.16 and 3.2.17) shall take one of the following actions so as not to jeopardize any other transport connections not assigned to that network connection: a) transmit an ER TPDU; b) reset or close the network connection; or c) invoke the release procedures appropriate to the class. Under certain circumstances it is also possible to discard the TPDU. If an ER TPDU is sent in class 0 it shall contain the octets of the invalid TPDU up to and including the octet where the error was detected (see Notes 3, 4 and 5). If the TPDU cannot be associated with a particular transport connection the transport entity shall follow the procedures in 6.9. NOTES 1 In general, no further action is specified for the receiver of the ER TPDU but it is recommended that it initiates the release procedure appropriate to the class. If the ER TPDU has been received as an answer to a CR TPDU then the connection is regarded as released (see 6.6). 2 Care should be taken by a transport entity receiving several invalid TPDUs or ER TPDUs to avoid looping if the error is generated repeatedly. 3 If the invalid received TPDU is greater than the selected maximum TPDU size-inclusion in the invalid TPDU parameter of the ER TPDU may not be possible. 4 It is recommended that the sender of the ER TPDU starts an optional timer TS2 to ensure the release of the connection. If the timer expires, the transport entity shall initiate the release procedures appropriate to the class. The timer should be stopped when a DR TPDU or an N-DISCONNECT indication is received. 5 In classes other than 0, it is recommended that the invalid TPDU be also included in the ER TPDU. 6.22.2 Treatment of protocol errors when operating over CLNS 6.22.2.1 Purpose The procedure for treatment of protocol errors is used to deal with invalid TPDUs. 38 Recommendation X.224 (11/93) 6.22.2.2 TPDUs and parameters used The procedure uses the following TPDUs and parameters: a) ER TPDU - reject cause; - invalid TPDU; b) DR TPDU - reason. 6.22.2.3 Procedure Invalid TPDUs and protocol errors shall be ignored (no action and TPDU discarded, or responded to with an ER TPDU), except for the following case: a CC TPDU is received in which the class field does not specify class 4 and a previously sent CR TPDU has not yet been acknowledged. In this case, the transport connection shall be terminated (see 6.7). NOTE - It is recommended that the sender of the ER TPDU starts an optional timer TS2 to ensure the release of the connection. If the timer expires, the transport entity shall initiate the release procedure appropriate to class 4. The timer should be stopped when a DR TPDU is received. 6.23 Splitting and recombining when operating over CONS 6.23.1 Purpose This procedure is used only in class 4 to allow a transport connection to make use of multiple network connections to provide additional resilience against network failure, to increase throughput, or for other reasons. 6.23.2 Procedure When this procedure is being used, a transport connection may be assigned (see 6.1) to multiple network connections (see Note 1). TPDUs for the connection may be sent over any such network connection. If the use of class 4 is not accepted by the remote transport entity following the negotiation rules, then no network connection except that over which the CR TPDU was sent may have the transport connection assigned to it. NOTES 1 The resequencing function of class 4 (see 6.20) is used to ensure that TPDUs are processed in the correct sequence. 2 Either transport entity may assign the connection to further network connections of which it is the owner at any time during the life of the transport connection, provided the following constraints are respected: - the initiator does not start splitting before having received the CC TPDU; - as soon as a new assignment is carried out it is recommended to send a TPDU on this network connection in order to make the remote entity aware of this assignment. 3 A transport entity performing splitting should ensure that TPDUs are sent at intervals on each supporting network connection, for example, by sending successive TPDUs on successive network connections, where the set of network connections is used cyclically. When splitting is used the inactivity control procedure defined in 12.2.3.3 will not normally detect unsignalled network connection failure. Any method of monitoring network connections to detect such failure is a local matter. 7 Protocol classes Table 6 gives an overview of which elements of procedure are included in each class. In certain cases, the elements of procedure within different classes are not identical and, for this reason, Table 6 cannot be considered as part of the definitive specification of the protocol. Recommendation X.224 (11/93) 39 TABLE 6/X.224 Allocation of elements of procedures within classes Protocol mechanism Cross reference Variant or Option 0 1 2 3 4 CONS 4 CLNS Assignment to network connection 6.1.1 x x x x x TPDU transfer 6.2 x x x x x x Segmenting and reassembling 6.3 x x x x x x Concatenation and separation 6.4 x x x x x Connection establishment 6.5 x x x x x x Connection refusal 6.6 x x x x x x Normal release 6.7 Implicit Explicit x x x x x x Error release 6.8 x x Association of TPDUs with transport connection 6.9 x x x x x x TPDU numbering 6.10 Normal Extended x m (Note 1) o (Note 1) m o m o m o Expedited data transfer 6.11 Network Normal Network Expedited m ao x (Note 1) x x x Reassignment after failure 6.12 x x (Note 3) Retention and acknowledgement of TPDUs 6.13 Confirmation of receipt ao AK m x x x Use of selective acknowledgement o o Use of request acknowledgement o (Note 4) o o o Resynchronization 6.14 x x (Note 3) Multiplexing and demultiplexing 6.15 x (Note 2) x x Explicit flow control (with) Explicit flow control (without) 6.16 x x m o x x x Checksum (use of) Checksum (non-use of) 6.17 x x x x m o m o Frozen references 6.18 x x x x Retransmission on time-out 6.19 x x Resequencing 6.20 x x Inactivity control 6.21 x x Treatment of protocol errors 6.22 x x x x x x Splitting and recombining 6.23 x x Procedure always included in class Not applicable m Negotiable procedure whose implementation in equipment is mandatory o Negotiable procedure whose implementation in equipment is optional ao Negotiable procedure whose implementation in equipment is optional and where use depends of availability within the network service NOTES 1 Not applicable in class 2 when non-use of explicit flow control is selected. 2 Multiplexing may lead to degradation of the quality of service if the non-use of explicit flow control has been selected. 3 This function is provided in class 4 using procedures other than those used in the cross-reference. 4 This option is not applicable in class 1, when the confirmation of receipt variant has been selected. 40 Recommendation X.224 (11/93) 8 Specification for class 0: Simple class Recommendation X.224 (11/93) 8.1 Functions of class 0 Class 0 is designed to have minimum functionality. It provides only the functions needed for connection establishment with negotiation, data transfer with segmenting and protocol error reporting. Class 0 provides transport connections with flow control based on the network service provided flow control, and disconnection based on the network service disconnection. 8.2 Procedures for class 0 8.2.1 Procedures applicable at all times The transport entities shall use the following procedures: a) TPDU transfer (see 6.2); b) association of TPDUs with transport connections (see 6.9); c) treatment of protocol errors (see 6.22); d) error release (see 6.8). 8.2.2 Connection establishment The transport entities shall use the following procedures: a) assignment to network connection (see 6.1.1); then b) connection establishment (see 6.5) and, if appropriate, connection refusal (see 6.6); subject to the following constraints: 1) the CR and CC TPDUs shall contain no parameter fields in the variable part of the header other than those for TSAP-ID, maximum TPDU size, and preferred maximum TPDU size; 2) the CR and CC TPDUs shall not contain a data field. 8.2.3 Data transfer The transport entities shall use the segmenting and reassembling procedure (see 6.3). 8.2.4 Release The transport entities shall use the implicit variant of the normal release procedure (see 6.7.1.4). NOTE - The lifetime of the transport connection is directly correlated with the lifetime of the network connection. 9 Specification for class 1: Basic error recovery class 9.1 Functions of class 1 Class 1 provides transport connections with flow control based on the network service provided flow control, error recovery, expedited data transfer, disconnection, and also the ability to support consecutive transport connections on a network connection. This class provides the functionality of class 0 plus the ability to recover after a failure signalled by the Network Service, without involving the TS-user. Recommendation X.224 (11/93) 41 9.2 Procedures for class 1 9.2.1 Procedures applicable at all times The transport entities shall use the following procedures: a) TPDU transfer (see 6.2); b) association of TPDU with transport connections (see 6.9); c) treatment of protocol errors (see 6.22); d) reassignment after failure (see 6.12); e) resynchronization (see 6.14), or reassignment after failure (see 6.12) together with resynchronization (see 6.14); f) concatenation and separation (see 6.4); g) retention and acknowledgement of TPDUs (see 6.13); the variant used, AK or confirmation of receipt, shall be as selected during connection establishment (see the notes); h) frozen references (see 6.18). NOTES 1 The negotiation of the variant of retention and acknowledgement of TPDUs procedure to be used over the transport connection has been designed such that if the initiator proposes the use of the AK variant (i.e. the mandatory implementation option), the responder has to accept use of this option and if the initiator proposes use of the confirmation of receipt variant the responder is entitled to select use of the AK variant. 2 The AK variant makes use of AK TPDUs to release copies of retained DT TPDUs. The CDT parameter of AK TPDUs in class 1 is not significant, and is set to 1111. 3 The confirmation of receipt variant is restricted to this class and its use depends on the availability of the network layer receipt confirmation service, and the expected cost reduction. 9.2.2 Connection establishment The transport entities shall use the following procedures: a) assignment to network connection (see 6.1.1); then b) connection establishment (see 6.5) and, if appropriate, connection refusal (see 6.6). 9.2.3 Data transfer 9.2.3.1 General The sending transport entity shall use the following procedures: a) segmenting (see 6.3); then b) the normal format variant of DT TPDU numbering (see 6.10). The receiving transport entity shall use the following procedures: 1) the normal format variant of DT TPDU numbering (see 6.10); then 2) reassembling (see 6.3). NOTE - The decision to issue an N-RESET request in order to force the remote entity to carry out the resynchronization (see 6.14) may be made on a local basis. 9.2.3.2 Expedited data The transport entities shall use either the network normal data or the network expedited variants of the expedited data transfer procedure (see 6.11) if their use has been selected during connection establishment (see Note 1). The sending transport entity shall not allocate the same EDTPDU-NR to successive ED TPDUs (see Notes 2 and 3). When acknowledging an ED TPDU by sending an EA TPDU the transport entity shall put into the YR-EDTU-NR parameter of the EA TPDU the value received in the ED-TPDU-NR parameter of the ED TPDU. 42 Recommendation X.224 (11/93) NOTES 1 The negotiation of the variant of expedited data transfer procedure to be used over the transport connection has been designed such that if the initiator proposes the use of the network normal data variant (i.e. the mandatory implementation option), the responder has to accept use of this option and if the initiator proposes use of the network expedited variant, the responder is entitled to select use of the network normal data variant. 2 This numbering enables the receiving transport entity to discard repeated ED TPDUs when resynchronization (see 6.14) has taken place. 3 No other significance is attached to the ED-TPDU-NR parameter. It is recommended, but not essential, that the values used be consecutive modulo 128. 4 The use of RJ TPDUs during resynchronization (see 6.14) can lead to retransmission. Thus, the receipt of a duplicate ED TPDU is possible. Such an ED TPDU is discarded. 9.2.4 Release The transport entities shall use the explicit variant of the release procedure (see 6.7.1.5). 10 Specification for class 2: Multiplexing class 10.1 Functions of class 2 Class 2 provides transport connections with or without individual flow control; no error detection or error recovery is provided. If the network connection resets or disconnects, the transport connection is terminated without the transport release procedure and the TS-user is informed. When explicit flow control is used, a credit mechanism is defined allowing the receiver to inform the sender of the exact amount of data he is willing to receive and that the expedited data transfer is available. 10.2 Procedures for class 2 10.2.1 Procedures applicable at all times The transport entities shall use the following procedures a) association of TPDUs with transport connection (see 6.9); b) TPDU transfer (see 6.2); c) treatment of protocol errors (see 6.22.1); d) concatenation and separation (see 6.4); e) error release (see 6.8). Additionally the transport entities may use the following procedures: f) multiplexing and demultiplexing (see 6.15). 10.2.2 Connection establishment The transport entities may use the following procedures: a) assignment to network connection (see 6.1.1); then b) connection establishment (see 6.5) and, if applicable, connection refusal (see 6.6). 10.2.3 Data transfer when non-use of explicit flow control has been selected If this option has been selected as a result of the connection establishment, the transport entities shall use the segmenting procedure (see 6.3). The TPDU-NR field of DT TPDUs is not significant and may take any value. NOTE - Expedited data transfer is not applicable (see 6.5). Recommendation X.224 (11/93) 43 10.2.4 Data transfer when use of explicit flow control has been selected 10.2.4.1 General The sending transport entity shall use the following procedures: a) segmenting (see 6.3); then b) DT TPDU numbering (see 6.10). The receiving transport entity shall use the following procedures: 1) DT TPDU numbering (see 6.10); if a DT TPDU is received which is out of sequence it shall be treated as a protocol error; then 2) reassembling (see 6.3). The variant of the DT TPDU numbering which is used by both transport entities shall be that which was agreed at connection establishment. 10.2.4.2 Flow control The transport entities shall send an initial credit (which may be zero) in the CDT field of the CR or CC TPDU. This credit represents the initial value of the upper window edge allocated to the peer entity. The transport entity that receives the CR or the CC TPDU shall consider its lower window edge as zero, and its upper window edge as the value of the CDT field in the received TPDU. In order to authorize the transmission of DT TPDUs, by its peer, a transport entity may transmit an AK TPDU at any time, subject to the following constraints: a) the YR-TU-NR parameter shall be at most one greater than the TPDU-NR field of the last received DT TPDU or shall be zero if no DT TPDU has been received; b) if an AK TPDU has previously been sent the value of the YR-TU-NR parameter shall not be lower than that in the previously sent AK TPDU; c) the sum of the YR-TU-NR and CDT fields shall not be less than the upper window edge allocated to the remote entity (see Note 1). A transport entity which receives an AK TPDU shall consider the YR-TU-NR field as its new lower window edge, and the sum of YR-TU-NR and CDT as its new upper window edge. If either of these have been reduced or if the lower window edge has become more than one greater than the TPDU-NR of the last transmitted DT TPDU, this shall be treated as a protocol error (see 6.22.1). A transport entity shall not send a DT TPDU with a TPDU-NR outside of the transmit window (see Notes 2 and 3). NOTES 1 This means that credit reduction is not applicable. 2 This means that a transport entity is required to stop sending if the TPDU-NR field of the next DT TPDU which would be sent would be the upper window edge. Sending of DT TPDU may be resumed if an AK TPDU is received which increases the upper window edge. 3 The rate at which a transport entity progresses the upper window edge allocated to its peer entity constrains the throughput attainable on the transport connection. 10.2.4.3 Expedited data The transport entities shall follow the network normal data variant of the expedited data transfer procedure in 6.11.1 if its use has been agreed during connection establishment. ED and EA TPDUs are not subject to the flow control procedures in 10.2.4.2. The ED-TPDU-NR and YR-ETDU-NR fields of ED and EA TPDUs respectively are not significant and may take any value. 10.2.5 Release The transport entities shall use the explicit variant of the release procedure in 6.7.1. 44 Recommendation X.224 (11/93) 11 Specification for class 3: Error recovery and multiplexing class 11.1 Functions of class 3 Class 3 provides the functionality of class 2 (with use of explicit flow control) plus the ability to recover after a failure signalled by the Network Layer without involving the TS-user. The mechanisms used to achieve this functionality also allow the implementation of more flexible flow control. 11.2 Procedures for class 3 11.2.1 Procedures applicable at all times The transport entities shall use the following procedures: a) association of TPDUs with transport connections (see 6.9); b) TPDU transfer (see 6.2) and retention and acknowledgement of TPDUs (AK variant only) (see 6.13); c) treatment of protocol errors (see 6.22.1); d) concatenation and separation (see 6.4); e) reassignment after failure (see 6.12), together with resynchronization (see 6.14); f) frozen references (see 6.18). Additionally, the transport entities may use the following procedure: g) multiplexing and demultiplexing (see 6.15). 11.2.2 Connection establishment The transport entities shall use the following procedures: a) assignment to network connections (see 6.1.1); then b) connection establishment (see 6.5) and, if appropriate, connection refusal (see 6.6). 11.2.3 Data transfer 11.2.3.1 General The sending transport entity shall use the following procedures: a) segmenting (see 6.3); then b) DT TPDU numbering (see 6.10); after receipt of an RJ TPDU (see 11.2.3.2) the next DT TPDU to be sent may have a value which is not the previous value of TPDU-NR plus one. The receiving transport entity shall use the following procedures: 1) DT TPDU numbering (see 6.10); the TPDU-NR field of each received DT TPDU shall be treated as a protocol error if it exceeds the greatest value received in a previous DT TPDU by more than one (see the Note); then 2) Reassembling (see 6.3); duplicated TPDUs shall be eliminated before reassembling is performed. NOTE - The use of RJ TPDUs (see 11.2.3.2) can lead to retransmission and reduction of credit. Thus the receipt of a DT TPDU which is a duplicate, or which is greater than or equal to the upper window edge allocated to the peer entity, is possible and is therefore not treated as a protocol error. 11.2.3.2 Use of an RJ TPDU A transport entity may send an RJ TPDU at any time in order to invite retransmission or to reduce the upper window edge allocated to the peer entity (see Note 1). Recommendation X.224 (11/93) 45 When an RJ TPDU is sent, the following constraints shall be respected: a) the YR-TU-NR parameter shall be at most one greater than the greatest value received in a previous DT TPDU, or shall be zero if no DT TPDU has yet been received (see Note 2); b) if an AK or RJ TPDU has been sent previously the YR-TU-NR parameter shall not be lower than that in the AK or RJ TPDU sent previously. When a transport entity receives an RJ TPDU (see Note 3): c) the next DT TPDU to be transmitted, or retransmitted, shall be that for which the value of the TPDU-NR parameter is equal to the value of the YR-TU-NR parameter of the RJ TPDU; d) the sum of the values of the YR-TU-NR and CDT parameters of the RJ TPDU becomes the new upper window edge (see Note 4). NOTES 1 An RJ TPDU can also be sent as part of the resynchronization (see 6.14) and reassignment after failure (see 6.12) procedures. 2 It is recommended that the YR-TU-NR parameter be equal to the TPDU-NR parameter of the next expected DT TPDU. 3 These rules are a subset of those specified for the case when an RJ TPDU is received during resynchronization (see 6.14) and reassignment after failure (see 6.12). 4 This means that an RJ TPDU can be used to reduce the upper window edge allocated to the peer entity (credit reduction). 11.2.3.3 Flow control The procedures shall be as defined in 10.2.4.2, except that a) a credit reduction may lead to the reception of a DT TPDU with a TPDU-NR parameter whose value is not, but would have been less than the upper window edge allocated to the remote entity prior to the credit reduction. This shall not be treated as a protocol error; b) receipt of an AK TPDU which sets the lower window edge more than one greater than the TPDU-NR of the last transmitted DT TPDU shall not be treated as a protocol error, provided that all acknowledged DT TPDUs have been previously transmitted (see Notes 1 and 2). NOTES 1 This can only occur during retransmission following receipt of an RJ TPDU. 2 The transport entity may either continue retransmission as before or retransmit only those DT TPDUs, not acknowledged by the AK TPDU. In either case, copies of the acknowledged DT TPDUs need not be retained. 11.2.3.4 Expedited data The transport entities shall follow the network normal data variant of the expedited data transfer procedure in 6.11.1 if its use has been agreed during connection establishment. The sending transport entity shall not allocate the same ED-TPDU-NR to successive ED TPDUs. The receiving transport entity shall transmit an EA TPDU with the same value in its YR-EDTU-NR parameter. If, and only if, this number is different from that of the ED TPDU perceived previously, shall it generate a T-EXPEDITED DATA indication to convey the data to the TS-user (see Note 2). NOTES 1 No other significance is attached to the ED-TPDU-NR parameter. It is recommended, but not essential that the values be consecutive modulo 2 n , where n is the number of bits of the parameter. 2 This procedure ensures that the TS-user does not receive data corresponding to the same ED TPDU more than once. 11.2.4 Release The transport entities shall use the explicit variant of the release procedure in 6.7.1. 46 Recommendation X.224 (11/93) 12 Specification for class 4: Error detection and recovery class 12.1 Functions of class 4 12.1.1 Functions of class 4 when operating over CONS Class 4 provides the functionality of class 3, plus the ability to detect and recover from lost, duplicated, or out of sequence TPDUs without involving the TS-user. This detection of errors is made by extended use of the DT TPDU numbering of class 2 and class 3, by time-out mechanisms, and by additional procedures. Class 4 detects signalled and unsignalled network failures (i.e. resets or disconnects or inactivity) and recovers from these failures by using time-out mechanisms. This class detects and recovers from damaged TPDUs by using a checksum mechanism. The checksum mechanism shall be available but its use or its non-use is subject to negotiation. This class also provides additional resilience against network failure and increased throughput capability by allowing a transport connection to make use of multiple network connections. 12.1.2 Functions of class 4 when operating over CLNS Class 4 provides flow control between peer transport entities, the capability to detect and recover from errors which occur as a result of a low grade service available from the network service provider and resilience from failure of the peer entity - the kind of errors to be detected include: TPDU loss, TPDU delivery out of sequence, TPDU duplication and TPDU corruption - these errors may affect control TPDUs as well as data TPDUs. The detection of errors is made by use of TPDU numbering on DT, AK, ED and EA TPDUs, by time-out mechanisms and additional procedures such as the use of a checksum mechanism. The use of the checksum mechanism shall be available but its use or its non-use is subject to negotiation. 12.2 Procedures for class 4 12.2.1 Procedures available at all times 12.2.1.1 Timers used at all times This subclause defines timers that apply at all times in class 4. These timers are listed in Table 7. This Recommendation does not define specific values for the timers, and the derivations described in this subclause are not mandatory. The values should be chosen so that the required quality of service can be provided, given the known characteristics of the network. Timers that apply only to specific procedures are defined under the appropriate procedure. 12.2.1.1.1 NSDU lifetime ( M LR , M RL ) The Network Layer is assumed to provide, as an aspect of its grade of service, for a bound on the maximum lifetime of NSDUs in the network. This value may be different in each direction of transfer through a network between two transport entities. The values, for both directions of transfer, are assumed to be known by the transport entities. The maximum NSDU lifetime local-to-remote ( M LR ) is the maximum time which may elapse between the transmission of an NSDU from the local transport entity to the network and receipt of any copy of the NSDU from the network at the remote transport entity. The maximum NSDU lifetime remote-to-local ( M RL ) is the maximum time which may elapse between the transmission of an NSDU from the remote transport entity to the network and receipt of any copy of the NSDU from the network at the local transport entity. Recommendation X.224 (11/93) 47 TABLE 7/X.224 Time parameters related to the operation of class 4 Symbol Name Definition M LR NSDU lifetime local-to remote A time bound for the maximum time which may elapse between the transmission of an NDSU by a local transport entity and the receipt of any copy of it by a remote peer entity. M RL NSDU lifetime remote-to local A time bound for the maximum time which may elapse between the transmission of an NSDU from a remote transport entity and the receipt of any copy of it by the local peer entity. E LR Expected maximum transit delay local-to-remote A time bound for the maximum delay suffered by all but a small proportion of NSDUs transferred from the local transport entity to a remote peer entity. E RL Expected maximum transit delay remote-to-local A time bound for the maximum delay suffered by all but a small proportion of NSDUs transferred from a remote peer entity to the local transport entity. A L Local acknowledgement time A time bound for the maximum time which can elapse between the receipt of a TPDU by the local transport entity from the network layer and the transmission of the corresponding acknowledgement. A R Remote acknowledgement time As A L , but for the remote entity. T1 Local retransmission time A time bound for the maximum time the local transport entity will wait for acknowledgement before retransmitting a TPDU. R Persistence time A time bound for the maximum time the local transport entity will continue to transmit a TPDU that requires acknowledgement. N Maximum number of transmissions A time bound for the maximum number of times which the local transport entity will continue to transmit a TPDU that requires acknowledgement. L Time bound on references and sequence numbers A time bound for the maximum time between the transmission of a TPDU and the receipt of any acknowledgement relating to it. I L Local inactivity time A lower bound for the time after which the local transport entity will, if it does not receive a TPDU, initiate the release procedure to terminate the transport connection. (See Note) I R Remote inactivity time A lower bound for the time after which the remote transport entity will, if it does not receive a TPDU, initiate the release procedure to terminate the transport connection. (See Note) W Window time A time bound for the maximum time a transport entity will wait before retransmitting up-to-date window information. NOTE - This parameter is required for protection against unsignalled failures. 12.2.1.1.2 Expected maximum transit delay ( E LR , E RL ) The Network Layer is assumed to provide, as an aspect of its grade of service, an expected maximum transit delay for NSDUs in the network. This value may be different in each direction of transfer through a network between two transport entities. The values, for both directions of transfer, are assumed to be known by the transport entities. The expected maximum transit delay local-to-remote ( E LR ) is the maximum delay suffered by all but a small proportion of NSDUs transferred through the network from the local transport entity to the remote transport entity. The expected maximum transit delay remote-to-local ( E RL ) is the maximum delay suffered by all but a small proportion of NSDUs transferred through the network from the remote transport entity to the local transport entity. 48 Recommendation X.224 (11/93) 12.2.1.1.3 Acknowledgement time ( A R , A L ) Any transport entity is assumed to provide a bound for the maximum time which can elapse between its receipt of a TPDU from the Network Layer and its transmission of the corresponding response. This value is referred to as A L . The corresponding time given by the remote transport entity is referred to as A R . 12.2.1.1.4 Local retransmission time ( T1 ) The local transport entity is assumed to maintain a bound on the time it will wait for an acknowledgement before retransmitting the TPDU. Its value is given by T1 = E LR + E RL + A R + x where E LR is the expected maximum transit delay local-to-remote; E RL is the expected maximum transit delay remote-to-local; A R is the remote acknowledgement time; x is the local processing time for a TPDU. NOTE - During connection establishment the value of A R is not known. In this case a suitable bound for T1 may be established either by estimating (or having a priori knowledge of) A R or by applying a suitable algorithm to the transport connection establishment delay QOS parameter. 12.2.1.1.5 Persistence time ( R ) The local transport entity is assumed to provide a bound for the maximum time for which it may continue to retransmit a TPDU requiring positive acknowledgement and which is not outside the current transmit window, even after credit reduction. This value is referred to as R . The value is clearly related to the time elapsed between retransmission, T1 , and the maximum number of transmissions, N . It is not less than T1 * ( N - 1) + x , where x is a small quantity to allow for additional internal delays, the granularity of the mechanism used to implement T1 , etc. Because R is a bound, the exact value of x is unimportant as long as it is bounded and the value of a bound is known. 12.2.1.1.6 Time bound of references and sequence numbers ( L ) A bound for the maximum time between the decision to transmit a TPDU and the receipt of any acknowledgement relating to it (L) is given by: L = M LR + M RL + R + A R where M LR is the NSDU lifetime local-to-remote; M RL is the NSDU lifetime remote-to-local; R is the persistence time; A R is the remote acknowledgement time. It is necessary to wait for a period of time before reusing any reference or sequence number in order to avoid confusion when a TPDU referring to it is duplicated or delayed. The period of time during which the sequence numbers for DT TPDUs should be frozen is the period L , starting from the time when the sequence number has fallen below the lower window edge. NOTES 1 In practice, the value of L may be too large. It may also be only a statistical figure at a certain confidence level. A smaller value may therefore be used where this still allows the required quality of service to be provided. 2 The relationships between times discussed above are illustrated in Figures 3 and 4. Recommendation X.224 (11/93) 49 12.2.1.1.7 Inactivity timer ( I L , I R ) Any transport entity is assumed to provide a lower bound for the time which can elapse without receipt of a TPDU before it will initiate the release procedure to terminate the transport connection. This value is referred to as I L . The corresponding time given by the remote transport entity is referred to as I R . T0719520-94/d03 E E A x R L R L R T 1 = E + E + A + x L R R L R t t FIGURE 3/X.224 Interrelationship of times for the average case in class 4 T0719530-94/d04 L M A R M R L R L R L = M + M + R + A R = T1 * (N - 1) + x LR RL R FIGURE 4/X.224 Interrelationshp of times for maximum delay in class 4 12.2.1.2 General procedures when operating over CONS The transport entity shall use the following procedures: a) TPDU transfer (see 6.2); b) association of TPDUs with transport connections (see 6.9.1); c) treatment of protocol errors (see 6.22.1); d) checksum (see 6.17); e) splitting and recombining (see 6.23); f) multiplexing and demultiplexing (see 6.15); 50 Recommendation X.224 (11/93) g) retention and acknowledgement of TPDUs (see 6.13); h) frozen references (see 6.18); i) retransmission procedures; when a transport entity has some outstanding TPDUs that require acknowledgement, it will check that no T1 interval elapses without the arrival of a TPDU that acknowledges at least one of the outstanding TPDUs. If the timer expires, the first TPDU is retransmitted and the timer is restarted except if the TPDU to be retransmitted is a DT TPDU and is outside the transmit window due to credit reduction. Retransmission of a TPDU is subject to the availability of a network connection. If no network connection is available, and the retransmission timer runs out, then the retransmission counter may be incremented without sending the TPDU subject to the retransmission procedure. After N transmissions (i.e. N - 1 retransmissions) it is assumed that useful two-way communication is no longer possible and the release procedure is used, and the TS-user is informed; NOTES 1 This procedure may be implemented by different means. For example: a) one interval is associated with each TPDU. If the timer expires the associated TPDU will be retransmitted and the timer T1 will be restarted for all subsequent TPDUs; or b) one interval is associated with each transport connection: 1) if the transport entity transmits a TPDU requiring acknowledgement, it starts timer T1 ; 2) if the transport entity receives a TPDU that acknowledges one of the TPDUs to be acknowledged, it restarts timer T1 unless the received TPDU is an AK which explicitly closes the transmit window; 3) if the transport entity receives a TPDU that acknowledges the last TPDU to be acknowledged, it stops timer T1 . For a decision whether the retransmission timer T1 is maintained on a per TPDU or on a per transport connection basis, throughput considerations have to be taken into account. 2 For DT TPDUs it is a local choice to retransmit either only the first DT TPDU or all TPDUs waiting for an acknowledgement up to the upper window edge. 3 It is recommended that after N transmissions, the transport entity waits T1 + W + M RL in order to provide a higher possibility of receiving an acknowledgement before entering the release phase. For other TPDU types which may be retransmitted, it is recommended that after N transmissions the transport entity waits T1 + M RL in order to provide a greater possibility of receiving the expected reply. 4 If use of selective acknowledgement has been negotiated, a selective acknowledgement implicitly identifies DT TPDUs not received. Since such a DT TPDU could be a lost DT TPDU, or simply a delayed DT TPDU, it is a local matter whether DT TPDUs not acknowledged in a selective acknowledgement should be retransmitted immediately. j) concatenation and separation (see 6.4). 12.2.1.3 General procedures when operating over CLNS The transport entity shall use the following procedures: a) TPDU transfer (see 6.2); b) association of TPDUs with transport connections (see 6.9.1); c) treatment of protocol errors (see 6.22.2); d) checksum (see 6.17); e) retention and acknowledgment of TPDUs (see 6.13); f) frozen references (see 6.18); g) retransmission procedures; when a transport entity has some outstanding TPDUs that require acknowledgment, it will check that no T1 interval elapses without the arrival of a TPDU that acknowledges at least one of the outstanding TPDUs. If the timer expires, except if the TPDU to be retransmitted is a DT TPDU and it is outside the transmit window due to credit reduction, the first TPDU is retransmitted and the timer is restarted. After N transmissions (i.e. N - 1 retransmissions) it is assumed that useful two-way communication is no longer possible and the release procedure is used, and the TS-user is informed; Recommendation X.224 (11/93) 51 NOTES 1 This procedure may be implemented by different means. For example: a) one interval is associated with each TPDU. If the timer expires the associated TPDU will be transmitted and the timer T1 will be restarted for all subsequent TPDUs; or b) one interval is associated with each transport connection: 1) if the transport entity transmits a TPDU requiring acknowledgment, it starts timer T1 ; 2) if the transport entity receives a TPDU that acknowledges one of the TPDUs to be acknowledged, it restarts timer T1 unless the received TPDU is an AK which explicitly closes the transmit window; 3) if the transport entity receives a TPDU that acknowledges the last TPDU to be acknowledged, it stops timer T1 . For a decision whether the retransmission timer T1 is maintained on a per TPDU or on a per transport connection basis, throughput considerations have to be taken into account. 2 For DT TPDUs it is a local choice to retransmit either only the first DT TPDU or all TPDUs waiting for an acknowledgment up to the upper window edge. 3 It is recommended that after N transmissions, the transport entity waits T1 + W + M RL to provide a higher possibility for receiving an acknowledgment before entering the release phase. For other TPDU types which may be retransmitted, it is recommended that after N transmissions the transport entity waits T1 + M RL to provide a higher possibility of receiving the expected reply. 4 If use of selective acknowledgement has been negotiated, a selective acknowledgement implicitly identifies DT TPDUs not received. Since such a DT TPDU could be a lost DT TPDU, or simply a delayed DT TPDU, it is a local matter whether DT TPDUs not acknowledged in a selective acknowledgement should be retransmitted immediately. h) concatenation and separation (see 6.4). 12.2.2 Procedures for connection establishment 12.2.2.1 Timers used in connection establishment There are no timers specific to connection establishment. 12.2.2.2 General procedures when operating over CONS The transport entities shall use the following procedures: a) assignment to network connection (see 6.1.1); When a network connection to which the transport connection is assigned is released (NDISind received): 1) if a CC TPDU is awaited the initiator shall perform a new assignment according to QOS and the retransmission procedure (i.e. not sending the CR TPDU for more than N * T1 ); 2) if there is at least one other network connection to which the transport connection is assigned both initiator and acceptor may either perform a new assignment or continue operation using one of the remaining network connections; 3) if the transport connection becomes unassigned the acceptor may either perform a new assignment or wait (there is no risk of deadlock as either T1 or I L will be running); the initiator shall perform a new assignment (except in the closing state); b) connection establishment (see 6.5) and if appropriate connection refusal (see 6.6) together with the additional procedures: 1) a connection is not considered established until the successful completion of a 3-way TPDU exchange. The sender of a CR TPDU shall respond to the corresponding CC TPDU by immediately sending a DT, ED, DR, or AK TPDU; 2) as a result of duplication or transmission, a CR TPDU may be received specifying a source reference which is already in use with the sending transport entity. If the receiving transport entity is in the data transfer phase, having completed the 3-way TPDU exchange procedure, or is waiting for the T-CONNECT response from the TS-user, the receiving transport entity shall discard such a TPDU. Otherwise a CC TPDU shall be transmitted; 3) as a result of duplication or retransmission, a CC TPDU may be received specifying a paired reference which is already in use. The receiving transport entity shall only acknowledge the duplicate CC TPDU according to the procedure in 12.2.2.2.b)1); 52 Recommendation X.224 (11/93) 4) a CC TPDU may be received specifying a reference which is in the frozen state. The response to such a TPDU shall be a DR TPDU; 5) the retransmission procedures (see 12.2.1.2) are used for both the CR TPDU and CC TPDU. NOTE - After receiving a CR TPDU, it is recommended that the transport entity enforce a time limit upon the transport service user so that late acceptance of the transport connection will not cause a delayed CC TPDU to be sent. 12.2.2.3 General procedures when operating over CLNS The transport entity shall use the procedure of connection establishment (see 6.5) and if appropriate connection refusal (see 6.6) together with the additional procedures: 1) a connection is not considered established until the successful completion of a three-way TPDU exchange. The sender of a CR TPDU shall respond to the corresponding CC TPDU by immediately sending a DT, ED, DR or AK TPDU; 2) as a result of duplication or retransmission, a CR TPDU may be received specifying a source reference which is already in use with the sending transport entity. If the receiving transport entity is in the data transfer phase, having completed the three-way TPDU exchange procedure, or is waiting for the T-CONNECT response from the TS-user, the receiving transport entity shall discard such a TPDU. Otherwise a CC TPDU shall be transmitted; 3) as a result of duplication or retransmission, a CC TPDU may be received specifying a paired reference which is already in use. The receiving transport entity shall only acknowledge the duplicate CC TPDU according to the procedure in 12.2.2.3.1); 4) a CC TPDU may be received specifying a reference which is in the frozen state. The response to such a TPDU shall be a DR TPDU; 5) the retransmission procedures (see 12.2.1.3) are used for both the CR TPDU and CC TPDU. NOTE - After receiving a CR TPDU, it is recommended that the transport entity enforce a time limit upon the transport service user so that late acceptance of the transport connection will not cause a delayed CC TPDU to be sent. 12.2.3 Procedures for data transfer 12.2.3.1 Timers used in data transfer 12.2.3.1.1 Timers used in data transfer when operating over CONS The data transfer procedures use one additional timer: - Window timer ( W ) A transport entity maintains a timer interval to ensure that there is a bound on the maximum interval between window updates. NOTE - A suitable upper bound value for W is such that W < I R - E LR . It is recommended that the value for W be sufficiently less than ( I R - E LR ) such that the inactivity control procedure in 12.2.3.3 can be operated having regard to the possibility of TPDU loss. 12.2.3.1.2 Timers used in data transfer when operating over CLNS The data transfer procedures use one additional timer: - Window timer ( W ) A transport entity maintains a timer interval to ensure that there is a bound on the maximum interval between window updates. NOTE - A suitable upper band value for W is such that W < I R - E LR . It is recommended that the value for W be sufficiently less than ( I R - E LR ) such that the inactivity control procedure in 12.2.3.3 can be operated having regard to the possibility of TPDU loss. Recommendation X.224 (11/93) 53 12.2.3.2 General procedures for data transfer The transport entities shall use the following procedures: a) inactivity control (see 6.21); b) expedited data (see 6.11); c) explicit flow control (see 6.16). The sending transport entity shall use the following procedures in the following order: 1) segmenting (see 6.3); 2) DT TPDU numbering (see 6.10). The receiving transport entity shall use the following procedures in the following order: - DT TPDU numbering (see 6.10); - resequencing (see 6.20); - reassembling (see 6.3). 12.2.3.3 Inactivity control If the interval of the inactivity timer I expires without receipt of some TPDU, the transport entity shall initiate the release procedures. To prevent expiration of the remote transport entity's inactivity timer when no data is being sent, the local transport entity must send AK TPDUs at suitable intervals in the absence of data, having regard to the probability of TPDU loss. The window synchronization procedures (see 12.2.3.8) ensure that this requirement is met. NOTE - It is likely that the release procedure initiated due to the expiration of the inactivity timer will fail, as such expiration indicates probable failure of the supporting network connection or of the remote transport entity. 12.2.3.4 Expedited data 12.2.3.4.1 Expedited data when operating over CONS The transport entities shall follow the network normal data variant of the expedited data transfer procedures (see 6.11.1), if the use of the transport expedited service option has been agreed during connection establishment. The ED TPDU shall have a TPDU-NR which is allocated from a separate sequence space from that of the DT TPDUs. A transport entity shall allocate the sequence number zero to the ED TPDU-NR of the first ED TPDU which it transmits for a transport connection. For subsequent ED TPDUs sent on the same transport connection, the transport entity shall allocate a sequence number one greater than the previous one. Modulo 2 7 arithmetic shall be used when normal formats have been selected and modulo 2 31 arithmetic shall be used when extended formats have been selected. The receiving transport entity shall transmit an EA TPDU with the same sequence number in its YR-EDTU-NR field. If this number is one greater than in the previously received in-sequence ED TPDU, the receiving transport entity shall transfer the data in the ED TPDU to the TS-user. If a transport entity does not receive an EA TPDU in acknowledgement to an ED TPDU it shall follow the retransmission procedures (see Note and 12.2.1.2). The sender of an ED TPDU shall not send any new DT TPDU created from a T-DATA request subsequent to the T-EXPEDITED DATA request, until it receives the EA TPDU. NOTE - This procedure ensures that ED TPDUs are delivered to the TS-user in sequence and that the TS-user does not receive data corresponding to the same ED TPDU more than once. Also it guarantees the arrival of the ED TPDU before any data subsequently sent by the TS user. 12.2.3.4.2 Expedited data when operating over CLNS The transport entities shall follow the expedited data transfer procedures in 6.11.2, if the use of the transport expedited data service option has been agreed during connection establishment. The ED TPDU shall have a TPDU-NR which is allocated from a separate sequence space from that of the DT TPDUs. 54 Recommendation X.224 (11/93) A transport entity shall allocate the sequence number zero to the ED TPDU-NR of the first ED TPDU which it transmits for a transport connection. For subsequent ED TPDUs sent on the same transport connection, the transport entity shall allocate a sequence number one greater than the previous one. Modulo 2 7 arithmetic shall be used when normal formats have been selected and modulo 2 31 arithmetic shall be used when extended formats have been selected. The receiving transport entity shall transmit an EA TPDU with the same sequence number in its YR-EDTU-NR field. If this number is one greater than in the previously received in-sequence ED TPDU, the receiving transport entity shall transfer the data in the ED TPDU to the TS-user. If a transport entity does not receive an EA TPDU in acknowledgment to an ED TPDU it shall follow the retransmission procedures (see Note and 12.2.1.3). The sender of an ED TPDU shall not send any new DT TPDU created from a T-DATA request subsequent to the T-EXPEDITED DATA request, until it receives the EA TPDU. NOTE - This procedure ensures that ED TPDUs are delivered to the TS-user in sequence and that the TS-user does not receive data corresponding to the same ED TPDU more than once. Also it guarantees the arrival of the ED TPDU before any data subsequently sent by the TS user. 12.2.3.5 Resequencing The receiving transport entity shall deliver all DT TPDUs to the TS-user in the order specified by the sequence number field. DT TPDUs received out-of-sequence but within the transmit window shall not be delivered to the TS-user until all in sequence TPDUs have been received. DT TPDUs received out-of-sequence and outside the transmit window shall be discarded but may result in transmission of an AK TPDU with up-to-date window information (see 12.2.3.8). If the selective acknowledgement option has been agreed to at connection establishment, DT TPDUs that have been selectively acknowledged shall be retained by the receiving transport entity until delivered to the TS-user. They shall be retained even if the selectively acknowledged DT TPDUs later fall outside the transmit window due to a subsequent credit reduction. NOTE - It is recommended that the transport entity sending the AK TPDU maintains a bound on the number of times a DT TPDU is selectively acknowledged in order to reduce the processing at the transport entity receiving the AK TPDU. Duplicate TPDUs can be detected because the sequence number matches that of previously received TPDUs. Sequence numbers shall not be reused for the period L after their previous use. Otherwise, a new, valid TPDU could be confused with a duplicated TPDU which had previously been received and acknowledged. Duplicated DT TPDUs shall be acknowledged, since the duplicated TPDU may be the result of a retransmission resulting from the loss of an AK TPDU. The data contained in a duplicated DT TPDU shall be discarded. 12.2.3.6 Explicit flow control The transport entities shall send an initial credit (which may take the value 0) in the CDT field of the CR TPDU or CC TPDU. This credit represents the initial value of the upper window edge of the peer entity. The transport entity which receives the CR TPDU or CC TPDU shall consider its lower window edge as zero and its upper window edge as the value in the CDT field in the received TPDU. In order to authorize the transmission of DT TPDUs by its peer, a transport entity may transmit an AK TPDU at any time. The sequence number of an AK TPDU shall not exceed the sequence number of the next expected DT TPDU, i.e. it shall not be greater than the highest sequence number of a received DT TPDU, plus one. A transport entity may send a duplicate AK TPDU containing the same sequence number, CDT, and subsequence number field at any time. A transport entity may increase or decrease the upper window edge at any time. Recommendation X.224 (11/93) 55 A transport entity which receives an AK TPDU shall consider the value of the YR-TU-NR field as its new lower window edge if it is greater than any previously received in a YR-TU-NR field, and the sum of YR-TU-NR and CDT as its new upper window edge subject to the procedures for sequencing AK TPDUs (see 12.2.3.8). A transport entity shall not transmit or retransmit a DT TPDU with a sequence number outside the transmit window. 12.2.3.7 Sequencing of received AK TPDUs To allow a receiving transport entity to properly sequence a series of AK TPDUs that all contain the same sequence number and thereby use the correct CDT value, AK TPDUs may contain a subsequence parameter. For the purpose of determining the correct sequence of AK TPDUs, the absence of the subsequence parameter shall be equivalent to the value of the parameter set to zero. An AK TPDU is defined to be in sequence if a) the sequence number is greater than any previously received AK TPDU, or b) the sequence number is equal to the highest in any previously received AK TPDU, and the subsequence parameter is greater than in any previously received AK TPDU having the same value for YR-TU-NR field, or c) the sequence number and subsequence parameter are both equal to the highest in any previously received AK TPDU and the credit field is greater than or equal to that in any previously received AK TPDU having the same YR-TU-NR field. When the receiving transport entity recognizes an out-of-sequence AK TPDU it shall discard it. 12.2.3.8 Procedures for transmission of AK TPDUs 12.2.3.8.1 Transmission of AK TPDUs An in-sequence DT TPDU shall be acknowledged within time A L , by the transmission of an AK TPDU whose YR-TU-NR parameter is set to at least the sequence number of the received DT TPDU plus one. If the selective acknowledgement option has been agreed to at connection establishment, out of sequence DT TPDUs may also be acknowledged within time A L . The YR-TU-NR parameter shall be set to one greater than the highest sequence number of an in-sequence DT TPDU and the selective acknowledgement parameter will be appropriately set. An AK TPDU shall be transmitted containing up-to-date window information if a) a DT TPDU is received whose sequence number is lower than the lower window edge, but greater than or equal to the lower window edge minus the maximum credit value ever given for this transport connection, or b) a DT TPDU is received whose sequence number is above the current upper window edge, but following credit reduction is within the upper window edge which has been granted and then withdrawn. NOTE 1 - A simpler implementation may send an AK TPDU upon reception of any DT TPDU outside the transmit window. NOTE 2 - The procedure a) is required so that loss of an AK TPDU is correctly recovered, i.e. when the sender of the DT TPDU retransmits it following non-receipt of an acknowledgement. NOTE 3 - The procedure b) is required due to the possibility of loss of the AK TPDU indicating the upper window edge reduction, which could otherwise cause incorrect termination of the transport connection. NOTE 4 - Wherever procedures a) and b) are invoked and selective acknowledgement option is being used, the selective acknowledgement parameters, if required, of the AK TPDU will be appropriately set. A transport entity shall not allow an interval W to pass without the transmission of an AK TPDU. If the transport entity is not using the procedure following setting CDT to zero (see 12.2.3.8.3) or reduction of the upper window edge (see 12.2.3.8.4), and does not have to acknowledge receipt of any DT TPDU, then it shall achieve this by retransmission of the most recent AK TPDU, with up-to-date window information. NOTE 5 - The use of the procedures defined in 12.2.3.8.3 and 12.2.3.8.4 is optional for any transport entity. The protocol operates correctly either with or without these procedures which are defined to enhance the efficiency of its operation. 56 Recommendation X.224 (11/93) 12.2.3.8.2 Sequence control for transmission of AK TPDUs To allow the receiving transport entity to process AK TPDUs in the correct sequence, as described in 12.2.3.7, the subsequence parameter shall be included following reduction of CDT. If the value of the subsequence number to be transmitted is zero, then the parameter should be omitted. The value of the subsequence parameter, if used, shall be zero (either explicitly or by absence of the parameter) if the sequence number is greater than the parameter in previous AK TPDUs, sent by the transport entity. If the sequence number is the same as the previous AK TPDU sent and the CDT field is equal to or greater than the CDT field in the previous AK TPDU sent then the subsequence parameter, if used, shall be equal to that in the previously sent AK TPDU. If the sequence number is the same as the previous AK TPDU sent and the CDT field is less than the value of the CDT field in the previous AK TPDU sent then the subsequence parameter, if used, shall be one greater than the value in the previous AK TPDU. NOTE - If a transport entity never reduces credit, then it does not need to use the subsequence number. 12.2.3.8.3 Retransmission of AK TPDUs after CDT set to zero Due to the possibility of loss of AK TPDUs, the upper window edge as perceived by the transport entity transmitting an AK TPDU may differ from that perceived by the intended recipient. To avoid the possibility of extra delay, the retransmission procedure (see 12.2.1.2 and 12.2.1.3) can be followed for an AK TPDU, if it opens the transmit window which has previously been closed by sending an AK TPDU with CDT field set to zero. The retransmission procedure, if used, terminates and the procedure in 12.2.3.8.1 is used when a) an AK TPDU is received containing the flow control confirmation parameter, whose lower window edge and your subsequence fields are equal to the sequence number and subsequence number in the retained AK TPDU and whose credit field is not zero; b) an AK TPDU is transmitted with a sequence number higher than that in the retained AK TPDU, due to reception of a DT TPDU whose sequence number is equal to the lower window edge; c) N transmissions of the retained AK TPDU have taken place. In this case the transport entity shall continue to transmit the AK TPDU at an interval of W . An AK TPDU which is subject to the retransmission procedure shall not contain the flow control confirmation parameter. If it is required to transmit this parameter concurrently, an additional AK TPDU shall be transmitted having the same values in the sequence, subsequence (if applicable) and credit fields. 12.2.3.8.4 Retransmission procedures following reduction of the upper window edge This subclause specifies the procedure for retransmission of AK TPDUs after a transport entity has reduced the upper window edge (see 12.2.3.6). This procedure is used until the lower window edge exceeds the highest value of the upper window edge ever transmitted (i.e. the value existing at the time of credit reduction, unless a higher value is retained from a previous credit reduction). The retransmission procedure should be followed for any AK TPDU which increases the upper window edge, unless it is known that the remote transport entity has an open window. This is known if - a flow control confirmation (FCC) parameter has been received corresponding to an AK TPDU transmitted following the most recent credit reduction, and; - this FCC parameter conveys an upper window edge value (i.e. the sum of the lower window edge and credit fields) which is greater than the lower window edge of the transmitted AK TPDU. Recommendation X.224 (11/93) 57 This retransmission procedure for any particular AK TPDU shall terminate when a) an AK TPDU is received containing the flow control confirmation parameter, whose lower window edge and your subsequence fields are equal to the lower window edge and subsequence number in the retained AK TPDU; or b) N transmissions of the retained AK TPDU have taken place. In this case the transport entity shall continue to transmit the AK TPDU at an interval of W . An AK TPDU which is subject to the retransmission procedure shall not contain the flow control confirmation parameter. If it is required to transmit this parameter concurrently, an additional AK TPDU shall be transmitted having the same values in the sequence, subsequence (if applicable) and credit fields. NOTE - Retransmission of AK TPDUs is normally not necessary, except following explicit closing of the window (i.e. transmission of an AK TPDU with CDT field set to zero). If data are available for transmission, the retransmission procedure for DT TPDUs will ensure that an AK TPDU is received granting further credit where this is available; following credit reduction, this may no longer be so, because retransmission may be inhibited by the credit reduction. The rules described in this clause avoid extra delay. The rules for determining whether to apply the retransmission procedure to an AK TPDU may be expressed alternatively as follows. Let LWE = Lower window edge UWE = Upper window edge KUWE = Lower bound on upper window edge held by remote transport entity. The retransmission procedure is to be applied whenever: (UWE > LWE) and (KUWE = LWE) i.e. when the window is opened and it is not known definitely that the remote transport entity is aware of this. KUWE is maintained as follows: When credit is reduced, KUWE is set to LWE. Subsequently, it is increased only upon receipt of a valid flow control confirmation (i.e. one which matches the retained lower window edge and subsequence). In this case KUWE is set to the implied upper window edge of the flow control confirmation, i.e. the sum of its lower window edge and your credit fields. By using this method, it can be ensured that KUWE is always less than or equal to the actual upper window edge used by the transmitter of DT TPDUs. 12.2.3.9 Use of flow control confirmation parameter An AK TPDU containing a flow control confirmation parameter may be transmitted at any time. The lower window edge, your subsequence and your credit fields shall be set to the same values as the corresponding fields in the most recently received in-sequence AK TPDU. An AK TPDU containing a flow control confirmation parameter should be transmitted whenever a) a duplicate AK TPDU is received, with the value of YR-TU-NR, CDT, and subsequence fields equal to the most recently received in sequence AK TPDU, but not itself containing the flow control confirmation parameter; b) an AK TPDU is received which increases the upper window edge but not the lower window edge, and the upper window edge was formerly equal to the lower window edge; or c) an AK TPDU is received which increases the upper window edge but not the lower window edge, and the lower window edge is lower than the highest value of the upper window edge received and subsequently reduced (i.e. following credit reduction). 12.2.4 Procedures for release 12.2.4.1 Timers used for release There are no timers used only for release. 58 Recommendation X.224 (11/93) 12.2.4.2 General procedures for release The transport entity shall use the explicit variant of normal release (see 6.7). Although the retransmission procedure also apply to the DR TPDU in the release phase, the transport entity may however consider that the transport connection has been released if it would be necessary to open a new network connection in order to retransmit the DR TPDU. 13 Structure and encoding of TPDUs 13.1 Validity Table 8 specifies those TPDUs which are valid for each class and the code for each TPDU. TABLE 8/X.224 TPDU codes Validity within classes See sub 0 1 2 3 4 clause Code CR Connection request x x x x x 13.30 1110 xxxx CC Connection confirm x x x x x 13.40 1101 xxxx DR Disconnect request x x x x x 13.50 1000 0000 DC Disconnect confirm x x x x 13.60 1100 0000 DT Data x x x x x 13.70 1111 000y ED Expedited data x NF x x 13.80 0001 0000 AK Data acknowledgement NRC NF x x 13.90 0110 zzzz EA Expedited data acknowledgement x NF x x 13.10 0010 0000 RJ Reject x x 13.11 0101 zzzz ER TPDU error x x x x x 13.12 0111 0000 Not available (see the Note) -- 0000 0000 -- 0011 0000 -- 1001 xxxx -- 1010 xxxx xxxx (bits 4 to 1) Used to signal the CDT (set to 0000 in classes 0 to 1). zzzz (bits 4 to 1) Used to signal CDT in classes 2, 3, 4 set to 1111 in class 1. y (bit 1) Used to signal ROA if the request acknowledgement procedure has been agreed at connection establishment (classes 1, 3, 4 only). This bit shall be set to 0 if the request acknowledgement procedure has not been agreed. NF Not available when the non-explicit flow control option is selected. NRC Not available when the receipt confirmation option is selected. NOTE - These codes are already in use in related protocols defined by standards organizations other than ITU-T and ISO/IEC. Recommendation X.224 (11/93) 59 13.2 Structure All the transport protocol data units (TPDUs) shall contain an integral number of octets. The octets in a TPDU are numbered starting from 1 and increasing in the order they are put into an NDSU. The bits in an octet are numbered from 1 to 8, where bit 1 is the lowest order bit. When consecutive octets are used to represent a binary number, the lower octet number has the most significant value. NOTES 1 The numbering of bits within an octet is a convention local to this Recommendation. 2 The use of the terms "high order" and "low order" is common to this Recommendation and to adjacent layer standards. 3 The use of the above conventions does not affect the order of bit transmission on a serial communications link. 4 As described in 6.2.3, both transport entities respect these bit and octet ordering conventions, thus allowing communication to take place. 5 In this clause the encoding of TPDUs is represented in the following form: a) octets are shown with the lowest numbered octet to the left; higher numbered octets being further to the right; b) within an octet, bits are shown with bit 8 to the left and bit 1 to the right. TPDUs shall contain, in the following order: a) the header, comprising 1) the length indicator (LI) field; 2) the fixed part; 3) the variable part, if present; b) the data field, if present. The structure is illustrated below: Octets 1 2 3 4 ... n n + 1 ... p p + 1 ... end LI Fixed part Variable part Data field * - - - - - - - - - - - - - - Header - - - - - - - - - - - - - - * 13.2.1 Length indicator field The field is contained in the first octet of the TPDUs. The length is indicated by a binary number, with a maximum value of 254 (1111 1110). The length indicated shall be the header length in octets including parameters, but excluding the length indicator field and user data, if any. The value 255 (1111 1111) is reserved for possible extensions. If the length indicated exceeds or is equal to the size of the NS-user data which is present, this is a protocol error. 13.2.2 Fixed part 13.2.2.1 General The fixed part contains frequently occurring parameters including the code of the TPDU. The length and the structure of the fixed part are defined by the TPDU code and in certain cases by the protocol class and the formats in use (normal or extended). If any of the parameters of the fixed part have an invalid value, or if the fixed part cannot be contained within the header (as defined by LI), this is a protocol error. NOTE - In general, the TPDU code defines the fixed part unambiguously. However, different variants may exist for the same TPDU code (see normal and extended formats). 60 Recommendation X.224 (11/93) 13.2.2.2 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 Connection request 1101 xxxx Connection confirm 1111 000y Data 0101 xxxx Reject 0110 xxxx Data acknowledgement where xxxx (bits 4 to 1) is used to signal the CDT. y (bit 1) is used to signal ROA if the request acknowledgement has been agreed at connection establishment (class 1, 3, 4 only). This bit shall be set to 0 if the request acknowledgement procedure has not been agreed. Only those codes defined in 13.1 are valid. 13.2.3 Variable part The variable part is used to define less frequently used parameters. If the variable part is present, it shall contain one or more parameters. NOTE 1 - The number of parameters that may be contained in the variable part is indicated by the length of the variable part which is LI minus the length of the fixed part. Each parameter contained within the variable part is structured as follows: Octets Bits 8 7 6 5 4 3 2 1 n + 1 Parameter code n + 2 Parameter length indication (for example m) n + 3 n + 2 + m Parameter value The parameter code field is coded in binary. NOTE 2 - Without extensions, it provides a maximum number of 255 different parameters. However, as noted below, bits 8 and 7 cannot take every possible value, 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. NOTE 3 - 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 succeeding parameter, the maximum value of m decreases. The parameter value field contains the value of the parameter identified in the parameter code field. No parameter code uses bits 8 and 7 with the value 00. The parameters defined in the variable part may be in any order. If any parameter is duplicated then the last value shall be used. A parameter not defined in this Recommendation shall be treated as a protocol error in any received TPDU except a CR TPDU; in a CR TPDU it shall be ignored. A called TSAP-ID parameter in a CC TPDU with a length indicator set to zero shall be treated as having the "nil selector value" (see 9.5.2 of CCITT Rec. X.650 | ISO/IEC 7498-3). If the responding transport entity selects a class for which a parameter of the CR TPDU is not defined, it may ignore this parameter, except if it is the class and option parameter, or the alternative protocol class parameter which shall always be interpreted. A parameter defined in this Recommendation but having an invalid Recommendation X.224 (11/93) 61 value shall be treated as a protocol error in any received TPDU except a CR TPDU. In a CR TPDU it shall be treated as a protocol error if it is either the class and option parameter or the alternative class parameter; bits 8 to 7, and bits 6 to 1, if not meaningful for the class proposed, of the additional options parameter shall be ignored; otherwise it shall be either ignored or treated as a protocol error. 13.2.3.1 Checksum parameter (class 4 only) All TPDU types may contain a 16-bit checksum parameter in their variable part. This parameter shall be present in a CR TPDU and shall be present in all other TPDUs 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 6.17. 13.2.4 Data field This field contains transparent user data. Restrictions on its size are noted for each TPDU. 13.3 Connection request (CR) TPDU The length of the CR TPDU shall not exceed 128 octets. 13.3.1 Structure The structure of the CR TPDU shall be as follows: 1 2 3 4 5 6 7 8 p p + 1 end LI | CR CDT 1110 xxxx | | DST-REF 0000 0000 0000 0000 | | SRC-REF | CLASS OPTION Variable part User data 13.3.2 LI See 13.2.1. 13.3.3 Fixed part (octets 2 to 7) The structure of this part shall contain: a) CR: Connection request code: 1110. Bits 8 to 5 of octet 2; b) CDT: Initial credit allocation (set to 0000 in classes 0 and 1 when specified as preferred class). Bits 4 to 1 of octet 2; c) DST-REF: Set to zero; d) SRC-REF: Reference selected by the transport entity initiating the CR TPDU to identify the requested transport connection; e) CLASS and OPTION: Bits 8 to 5 of octet 7 define the preferred transport protocol class to be operated over the requested transport connection. When operating over CONS, this field shall take one of the following values: 0000 Class 0 0001 Class 1 0010 Class 2 0011 Class 3 0100 Class 4 When operating over CLNS, this field shall take the value 0100 to indicate class 4. 62 Recommendation X.224 (11/93) The CR TPDU contains the first choice of class in the fixed part. Second and subsequent choices are listed in the variable part if required. Bits 4 to 1 of octet 7 define options to be used on the requested transport connection as follows: Bit Option 4 = 0 Always 3 = 0 Always 2 = 0 Use of normal formats in all classes = 1 Use of extended formats in classes 2, 3, and 4 1 = 0 Use of explicit flow control in class 2 = 1 No use of explicit flow control in class 2 Bits related to options particular to a class are not meaningful if that class is not proposed and may therefore take any value. NOTES 1 The connection establishment procedure (see 6.5) does not permit a given CR TPDU to request use of transport expedited data transfer service (additional option parameter) and not use of explicit flow control in class 2 (bit 1 = 1). 2 Bits 4 to 1 are always zero in class 0 and have no meaning. 13.3.4 Variable part (octets 8 to p) The following parameters are permitted in the variable part: a) Transport Service Access Point Identifier (TSAP-ID) Parameter code: 1100 0001 for the identifier of the calling TSAP 1100 0010 for the identifier of the called TSAP Parameter length: not defined in this Recommendation Parameter value: identifier of the calling or called TSAP respectively. If a TSAP-ID is given in the request it may be returned in the confirmation. b) TPDU size This parameter defines the proposed maximum TPDU size (in octets including the header) to be used over the requested transport connection. The coding of this parameter is Parameter code: 1100 0000 Parameter length: 1 octet Parameter value: 0000 1101 8 192 octets (not allowed in class 0) 0000 1100 4 096 octets (not allowed in class 0) 0000 1011 2 048 octets 0000 1010 1 024 octets 0000 1001 1 512 octets 0000 1000 1 256 octets 0000 0111 1 128 octets Default value: 0000 0111 (128 octets). Recommendation X.224 (11/93) 63 c) Preferred maximum TPDU size This parameter defines the proposed maximum TPDU size (in octets including the header) to be used over the requested transport connection. The coding of this parameter is: Parameter Code: 1111 0000 Parameter length: up to 4 Parameter value: a binary value. The binary value indicates the maximum TPDU size, expressed as a multiple of 128 octets [see 6.5.4 k) and 6.5.5 k)]. This binary value shall be greater than or equal to 1. d) Version number (not used if class 0 is the preferred class) Parameter code: 1100 0100 Parameter length: 1 octet Parameter value field: 0000 0001 Default value: 0000 0001 (not used in class 0). e) Protection parameters (not used is class 0 is the preferred class) This parameter is user defined. Parameter code: 1100 0101 Parameter length: user defined Parameter value: user defined. f) Checksum (used only if class 4 is the preferred class) (see 13.2.3.1) This parameter shall always be present in a CR TPDU requesting class 4, even if the checksum selection parameter is used to request non-use of the checksum facility. g) Additional option selection (not used if class 0 is the preferred class) This parameter defines the selection to be made as to whether or not additional options are to be used. Parameter code: 1100 0110 Parameter length: 1 Parameter value: Bit Option 6 = 1 Use of request acknowledgement in class 1, 3, 4 = 0 Non-use of request acknowledgement in classes 1, 3, 4 5 = 1 Use of selective acknowledgement in class 4 = 0 Non-use of selective acknowledgement in class 4 4 = 1 Use of network expedited in class 1 = 0 Non-use of network expedited in class 1 3 = 1 Use of receipt confirmation in class 1 = 0 Use of explicit AK variant in class 1 2 = 0 16-bit checksum defined in 6.17 shall be used in class 4 = 1 16-bit checksum defined in 6.17 shall not be used in class 4 1 = 1 Use of transport expedited data transfer service = 0 Non-use of transport expedited data transfer service Default value: 0000 0001. Bits 8 and 7 shall be set to zero when sending the TPDU and ignored upon receipt. Bits related to options particular to a class are not meaningful if that class is not proposed and may therefore take any value. 64 Recommendation X.224 (11/93) h) Alternative protocol class(es) (not used if class 0 is the preferred class or when operating over CLNS) Parameter code: 1100 0111 Parameter length: n Parameter value: Encoded as a sequence of single octets; each encoded as for octet 7 but with bits 4 to 1 set to zero (i.e. no alternative option selections permitted). i) Acknowledgement time (used only if class 4 is the preferred class) This parameter conveys the maximum acknowledgement time A L to the remote transport entity. It is an indication only, and is not subject to negotiation (see 12.2.1.1.3). Parameter code: 1000 0101 Parameter length: 2 Parameter value: n , a binary number where n is the maximum acknowledgement time, expressed in milliseconds. j) Throughput (not used if class 0 is the preferred class) Parameter code: 1000 1001 Parameter length: 12 or 24 Parameter value: 1st 12 octets: maximum throughput, as follows: - first 3 octets: target value, calling-called user direction; - second 3 octets: minimum acceptable, calling-called user direction; - third 3 octets: target value, called-calling user direction; - fourth 3 octets: minimum acceptable, called-calling user direction. 2nd 12 octets (optional): average throughput, as follows: - fifth 3 octets: target value, calling-called user direction; - sixth 3 octets: minimum acceptable, calling-called user direction; - seventh 3 octets: target value, called-calling user direction; - eighth 3 octets: minimum acceptable, called-calling user direction. Where average throughput is omitted, it is considered to have the same value as the maximum throughput. Values are expressed in octets per second. k) Residual error rate (not used if class 0 is the preferred class) Parameter code: 1000 0110 Parameter length: 3 Parameter value: - 1st octet: target value, power of 10; - 2nd octet: minimum acceptable, power of 10; - 3rd octet: TSDU size of interest, expressed as a power of 2. l) Priority (not used if class 0 is the preferred class) Parameter code: 1000 0111 Parameter length: 2 Parameter value: integer (0 is the highest priority) m) Transit delay (not used if class 0 is the preferred class) Parameter code: 1000 1000 Parameter length: 8 Recommendation X.224 (11/93) 65 Parameter value: - first 2 octets: target value, calling-called user direction; - second 2 octets: maximum acceptable, calling-called user direction; - third 2 octets: target value, called-calling user direction; - fourth 2 octets: maximum acceptable, called-calling user direction. Values are expressed in milliseconds, and are based upon a TSDU size of 128 octets. n) Reassignment time (not used if class 0 or 2 is the preferred class; if class 4 is preferred and class 3 is an alternate, it may be used) This parameter conveys the Time to Try Reassignment (TTR) which shall be used when following the procedure for reassignment after failure (see 6.12). Parameter code: 1000 1011 Parameter length: 2 Parameter value: n , a binary number where n is the TTR value expressed in seconds. o) Inactivity timer (used only if class 4 is the preferred or selected class) This parameter conveys the inactivity timer I L to the remote transport entity. It is an indication only, and is not subject to negotiation (see 12.2.1.1.7). Parameter code: 1111 0010 Parameter length: 4 Parameter value: a binary value. This binary value indicates the inactivity time expressed in milliseconds. 13.3.5 User data (octets p ++ 1 to the end) No user data are permitte