home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 800s / rfc892.txt < prev    next >
Text File  |  1992-09-22  |  158KB  |  4,414 lines

  1. Network Working Group                                   ISO
  2. Request for Comments:  892                              December 1983
  3.  
  4.  
  5.                      ISO Transport Protocol Specification
  6.  
  7. This document is distributed as an RFC for information only.
  8. It does not specify a standard for the ARPA Internet.
  9.  
  10. Note:  This document appeared in:
  11.  
  12. ISO/TC97/SC16/WG6.  Information Processing Systems - Open Systems
  13.     Interconnection - Transport Protocol Specification.  Computer
  14.     Communication Review 12, 3-4 (July/October 1982), pp.  24-67.
  15.  
  16. and differs from it only in format.
  17.  
  18.  
  19. Table of Contents
  20.  
  21. 0.   Introduction
  22. 1.   Scope and Field of Application
  23. 2.   References
  24.  
  25. Section One - General
  26.  
  27. 3.   Definitions
  28. 4.   Symbols and Abbreviations
  29. 5.   Overview
  30.  
  31.      5.1  Service provided by the transport layer
  32.      5.2  Service assumed from the network layer
  33.      5.3  Functions of the transport layer
  34.      5.4  Model of the transport layer
  35.  
  36. Section Two - Transport Protocol Specification
  37.  
  38. 6.   Protocol Mechanisms
  39.      
  40.      6.1  Assignment to network connection
  41.      6.2  Transport protocol data unit (TPDU) transfer
  42.      6.3  Data TPDU length and segmenting
  43.      6.4  Concatenation and separation
  44.      6.5  Connection establishment
  45.      6.6  Connection refusal
  46.      6.7  Release
  47.      6.8  Implicit termination
  48.      6.9  Spurious disconnect
  49.      6.10 Data TPDU numbering
  50.      6.11 Expedited data transfer
  51.      6.12 Reassignment
  52.      6.13 Reassignment after failure
  53.  
  54. ISO Transport Protocol Specification                                    Page 2
  55. International Standards Organization
  56.  
  57.  
  58.      6.14 Retention until acknowledgement of TPDUs
  59.      6.15 Resynchronization
  60.      6.16 Multiplexing and demultiplexing
  61.      6.17 Explicit flow control
  62.      6.18 Checksum
  63.      6.19 Frozen references
  64.      6.20 Retransmission on timeout
  65.      6.21 Resequencing
  66.      6.22 Inactivity control
  67.      6.23 Treatment of protocol errors
  68.      6.24 Splitting and recombining
  69.  
  70. 7.   Protocol Classes
  71.      7.0  Protocol description of class 0:  simple class
  72.      7.1  Protocol description of class 1:  basic error recovery class
  73.      7.2  Protocol description of class 2:  multiplexing class
  74.      7.3  Protocol description of class 3:  error recovery and multiplexing
  75.                                             class
  76.      7.4  Protocol description of class 4:  error detection and recovery class
  77.  
  78. 8.   Encoding
  79.  
  80.      8.1  Summary
  81.      8.2  Structure
  82.      8.3  Connection Request (CR)
  83.      8.4  Connection Confirm (CC)
  84.      8.5  Disconnect Request (DR)
  85.      8.6  Disconnect Confirm (DC)
  86.      8.7  Data (DT
  87.      8.8  Expedited Data (ED)
  88.      8.9  Data Acknowledgement (AK)
  89.      8.10 Expedited Data Acknowledgement (EA)
  90.      8.11 Reject (RJ)
  91.      8.12 TPDU Error (ERR)
  92.  
  93. Section Three  -  Conformance
  94.  
  95. 9.   Conformance
  96.  
  97. 0.   Introduction
  98.  
  99.         The Transport Protocol Standard is one of a set of International
  100. Standards produced to facilitate the interconection of computer
  101. systems.  The set of standards covers the services and protocols
  102. required to achieve such interconnection.
  103.  
  104.         The Transport Protocol Standard is positioned with respect to
  105. other related standards by the layers defined in the Reference Model
  106. for Open Systems Interconnection (ISO 7498).  It is most closely
  107. related to, and lies within the field of application of the Transport
  108.  
  109. ISO Transport Protocol Specification                                    Page 3
  110. International Standards Organization
  111.  
  112.  
  113. Service Standard (DP aaaa).  It also uses and makes reference to the
  114. Network Service Standard (DP bbbb), whose provisions it assumes in
  115. order to accomplish the transport protocol's aims.  The
  116. interrelationship of these standards is depicted in Figure 1.
  117.  
  118. -----------------------------------TRANSPORT SERVICE DEFINITION-----
  119.  
  120.  Transport                --Reference to aims---------------
  121.  Protocol
  122.  Specification            --Reference to assumptions--------
  123.  
  124. ------------------------------------NETWORK SERVICE DEFINITION------
  125.  
  126. Figure 1  -  Relationship between the transport protocol and adjacent
  127.              services
  128.  
  129.         The standard specifies a common encoding and a number of 
  130. classes of transport protocol procedures to be used with different 
  131. network qualities of service.
  132.  
  133.         It is intended that the Transport Protocol should be simple 
  134. but general enough to cater for the total range of Network Service
  135. qualities possible, without restricting future extensions.
  136.  
  137.         The protocol is structured to give rise to classes of protocol 
  138. which are designed to minimize possible incompatibilities and 
  139. implementation costs.
  140.  
  141.         The classes are selectable with respect to the Transport and 
  142. Network Services in providing the required quality of service for the
  143. interconnection of two session entities (note that each class provides
  144. a different set of functions for enhancement of service qualities).
  145.  
  146.         This protocol standard is concerned with optimisation of network
  147. tariffs and the following qualities of service:
  148.  
  149.      a)  different throughput rates;
  150.      b)  different error rates;
  151.      c)  integrity of data requirements;
  152.      d)  reliability requirements.
  153.  
  154.         The aim of this standard is primarily to provide a definition 
  155. for implementors.  Since the protocol is complex, the document contains
  156. much material which is advisory or descriptive, but mandatory
  157. requirements on implementations are clearly identified. 
  158.  
  159.         It should be noted that, as the number of valid protocol sequences 
  160. is very large, it is not possible with current technology to verify that an
  161. implementation will operate the protocol defined in this document
  162. correctly under all circumstances.  It is possible by means of testing
  163.  
  164. ISO Transport Protocol Specification                                    Page 4
  165. International Standards Organization
  166.  
  167.  
  168. to establish confidence that an implementation correctly operates the
  169. protocol in a representative sample of circumstances.  It is, however,
  170. intended that this standard can be used in circumstances where two
  171. implementations fail to communicate in order to determine whether one
  172. or both have failed to operate the protocol correctly.
  173.  
  174.         The variations and options available within this standard are
  175. essential to enable a Transport Service to be provided for a wide
  176. variety of applications over a variety of network qualities.  Thus, a
  177. minimally conforming implementation will not be suitable for use in
  178. all possible circumstances.  It is important therefore to qualify all
  179. references to this standard with statements of the options provided or
  180. required or with statements of the intended purpose of provision or
  181. use.
  182.  
  183. 1.      Scope and Field of Application
  184.  
  185. 1.1     This International Standard Specifies:
  186.  
  187.         a)  five classes of procedures
  188.  
  189.                 1) Class 0.  Simple class;
  190.                 2) Class 1.  Basic error recovery class;
  191.                 3) Class 2.  Multiplexing class;
  192.                 4) Class 3.  Error recovery class;
  193.                 5) Class 4.  Error detection and recovery class,
  194.  
  195.                 for the transfer of data and control information from
  196.                 one transport entity to a peer transport entity;
  197.  
  198.         b)  the means of negotiating the class of procedures to be 
  199.             used by the transport entities;
  200.  
  201.         c)  the encoding of the transport protocol data units used for
  202.             the transfer of data and control information;
  203.  
  204.         d)  the functional requirements of equipment within a
  205.             computer system claiming to implement these procedures.
  206.  
  207. 1.2     The procedures are defined in terms of:
  208.  
  209.         a)  the interactions between peer transport entities through
  210.             the exchange of transport protocol data units;
  211.  
  212.         b)  the interactions between a transport entity and the
  213.             transport service user in the same system through the exchange of
  214.             transport service primitives;
  215.  
  216.         c)  the interactions between a transport entity and the
  217.             network service provider through the exchange of network
  218.  
  219. ISO Transport Protocol Specification                                    Page 5
  220. International Standards Organization
  221.  
  222.  
  223.             service primitives.
  224.  
  225. 1.3     This International Standard is applicable to equipment which 
  226.         supports the Transport Layer of the OSI Reference Model and which
  227.         wishes to interconnect in an open systems environment.
  228.  
  229. 2.      References
  230.  
  231. ISO 7498        Information processing systems - Open systems inter-
  232.                 connection - Basic Reference Model
  233.  
  234. DP aaaa         Information processing systems - Open systems inter-
  235.                 connection - Transport service definition (N1169).
  236.  
  237. DP bbbb         Information processing systems - Open systems inter-
  238.                 connection - Connection-oriented network service
  239.                 definition (N729)
  240.  
  241. Section One - General
  242.  
  243. 3.      Definitions
  244.  
  245. 3.1     Equipment:  Hardware or software or a combination of both; it
  246.         need not be physically distinct within a computer system.
  247.  
  248. 3.2     Transport service user:  An abstract representation of the
  249.         totality of those entities within a single system that make 
  250.         use of the transport service.
  251.  
  252. 3.3     Network service provider:  An abstract machine which models 
  253.         the totality of the entities providing the network service,
  254.         as viewed by a transport entity.
  255.  
  256.         Explanatory Notes
  257.  
  258.         1.  Definitions 3.1 to 3.3 relate to terms used in clause 1.
  259.  
  260.         2.  This standard makes use of the terms, concepts, and 
  261.             definition defined in ISO 7498.
  262.  
  263. 4.      Symbols and Abbreviations
  264.  
  265. 4.1     Data Units
  266.  
  267.         TPDU    Transport protocol data unit
  268.         TSDU    Transport service data unit
  269.         NSDU    Network service data unit
  270.  
  271. 4.2     Types of transport protocol data units
  272.  
  273.  
  274. ISO Transport Protocol Specification                                    Page 6
  275. International Standards Organization
  276.  
  277.  
  278.         CR TPDU         Connection request TPDU
  279.         CC TPDU         Connection confirm TPDU
  280.         DR TPDU         Disconnect request TPDU
  281.         DC TPDU         Disconnect confirm TPDU
  282.         DT TPDU         Data TPDU
  283.         ED TPDU         Expedited data TPDU
  284.         AK TPDU         Data acknowledge TPDU
  285.         EA TPDU         Expedited acknowledge TPDU
  286.         RJ TPDU         Rejected TPDU
  287.         ERR TPDU        Error TPDU
  288.  
  289. 4.3     TPDU fields
  290.  
  291.         LI              Length indicator (field)
  292.         CDT             Credit (field)
  293.         TSAP-ID         Transport service access point identifier
  294.                         (field)
  295.         DST-REF         Destination reference (field)
  296.         SCE-REF         Source reference (field)
  297.         EOT             End of TSDU mark
  298.         TPDU-NR         DT TPDU number (field)
  299.         ED-TPDU-NR      ED TPDU number (field)
  300.         YR-TU-NR        Sequence number response (field)
  301.  
  302. 4.4     Parameters
  303.  
  304.         T (R)           Receive sequence number
  305.         T (S)           Send sequence number
  306.  
  307. 4.5     Timer variables
  308.  
  309.         T1              Elapse time between retransmissions
  310.         N               The maximum number of retransmissions
  311.         L               Bound for the maximum time between the
  312.                         decision to transmit a TPDU and the receipt of
  313.                         any response relating to it
  314.         T-WAIT          Maximum time for a reassignment to take place
  315.                         before TC failure is assumed
  316.         I               Inactivity timer - Maximum time allowed to 
  317.                         elapse between receipt of TPDUs before TC 
  318.                         failure is assumed
  319.         W               Window timer - Maximum interval between trans-
  320.                         mission of up to date window information
  321.  
  322. 4.6     Other variables
  323.  
  324.         n               The number of bits in the sequence number
  325.                         field
  326.         p               The number of bits in the credit field of a 
  327.                         CR, CC or AK TPDU
  328.  
  329. ISO Transport Protocol Specification                                    Page 7
  330. International Standards Organization
  331.  
  332.  
  333. 4.7     Miscellaneous
  334.  
  335.         TS-user         Transport service user
  336.         TSAP            Transport service access point
  337.         NSAP            Network service access point
  338.         TC              Transport connection
  339.         NC              Network Connection
  340.  
  341. 5.      Overview of the Transport Protocol
  342.  
  343. 5.1     Service Provided by the Transport Layer
  344.  
  345.         The services provided by the protocol described in this
  346. document are connection-oriented services.  They are defined in
  347. document DP aaaa.  The Transport Service primitives provided are
  348. summarized in Figure 1.
  349.  
  350. ISO Transport Protocol Specification                                    Page 8
  351. International Standards Organization
  352.  
  353.  
  354.         Primitive                               Parameters
  355. ------------------------------------------------------------------------
  356. T-CONNECT       Request                 To Transport Address, From 
  357.                 Indication              Transport Address, Expedited
  358.                                         Data Option, Quality of
  359.                                         Service, TS-User data.
  360. ------------------------------------------------------------------------
  361. T-CONNECT       Response                Responding Address, Quality 
  362.                 Confirmation            of Service, Expedited Data
  363.                                         Option, TS-User data.
  364. ------------------------------------------------------------------------
  365. T-DATA          Request                 TS-User data.
  366.                 Indication
  367. ------------------------------------------------------------------------
  368. T-EXPEDITED     Request                 TS-User data.
  369. DATA            Indication      
  370. ------------------------------------------------------------------------
  371. T-DISCONNECT    Request                 TS-User data.
  372. ------------------------------------------------------------------------
  373. T-DISCONNECT    Indication              Disconnect reason, TS-User
  374.                                         data.
  375. ------------------------------------------------------------------------
  376.  
  377.                 Figure 1.  Transport Service Primitives
  378.  
  379. 5.2     Service Assumed from the Network Layer
  380.  
  381.         The transport protocol described in this document assumes of
  382. the Network Services described in DP bbbb.  The Network Service
  383. primitives used are summarized in Figure 2.
  384.  
  385. ISO Transport Protocol Specification                                    Page 9
  386. International Standards Organization
  387.  
  388.  
  389.         Primitive               X/Y             Parameters      X/Y/Z
  390. ------------------------------------------------------------------------
  391. N-CONNECT  Request               X              Called Address,    X
  392.            Indication            X              Calling Address,   X
  393.            Response              X              NS-User data,      Z
  394.            Confirmation          X              QOS.               X
  395. ------------------------------------------------------------------------
  396. N-DATA     Request                X              NS-User data,      X
  397.            Indication             X              Conf. Request      Y
  398. ------------------------------------------------------------------------
  399. N-DATA      Request               Y
  400. ACKNOWLEDGE Indication
  401. ------------------------------------------------------------------------
  402. N-EXPEDITED Request               Y     
  403. DATA        Indication                            NS-User data       Y
  404. ------------------------------------------------------------------------
  405. N-RESET      Request              X               
  406.              Indication           X
  407.              Response             X
  408.              Confirmation         X
  409. ------------------------------------------------------------------------
  410. N-DISCONNECT Request              X               NS-User data       Z
  411.              Indication           X
  412. ------------------------------------------------------------------------
  413.  
  414.         X - The Transport Protocol assumes that this facility is 
  415.             provided in all networks.
  416.  
  417.         Y - The Transport Protocol assumes that this facility is
  418.             provided in some networks and a mechanism is provided
  419.             to optionally use the facility.
  420.  
  421.         Z - The Transport Protocol does not use this parameter.
  422.  
  423.                 Figure 2.  Network Service Primitives
  424.  
  425. 5.3     Functions of the Transport Layer
  426.  
  427. 5.3.1   Connection Oriented Functions
  428.  
  429. 5.3.1.1  Overview of Functions
  430.  
  431.         The functions in the transport layer are at least those
  432. necessary to bridge the gap between the services available from the
  433. network layer and those to be offered to the transport users.
  434.  
  435.         The functions in the transport layer are concerned with the
  436. enhancement of quality of service, including all aspects of cost
  437. optimization.  They are described below; the descriptions are grouped
  438. into those concerned with the establishment phase, the data transfer
  439.  
  440. ISO Transport Protocol Specification                                   Page 10
  441. International Standards Organization
  442.  
  443.  
  444. phase, and the release phase.
  445.  
  446. 5.3.1.1.1  Establishment Phase
  447.  
  448.         The goal of the establishment phase is to establish a
  449. transport connection, i.e., between two transport users.  The
  450. functions of transport layer during this phase must match the
  451. requested class of services with the services provided by the network
  452. layer as follows:
  453.  
  454.         o  Select network service which best matches the requirement
  455.            of the TS-user taking into account charges for various
  456.            services.
  457.  
  458.         o  Decide whether to multiplex multiple transport connection
  459.            onto a single network connection.
  460.  
  461.         o  Establish the optimum TPDU size.
  462.  
  463.         o  Select the functions that will be operational upon entering
  464.            the data transfer phase.
  465.  
  466.         o  Map transport addresses onto network addresses.
  467.  
  468.         o  Provide a means to distinguish between two different
  469.            transport connections.
  470.  
  471.         o  Transportation of user's data.
  472.  
  473. 5.3.1.1.2  Data Transfer Phase
  474.  
  475.         The purpose of the data transfer phase is to permit two-way
  476. simultaneous transport of TSDUs between the session entities connected
  477. by the transport connection.  This purpose is achieved by means of
  478. two-way simultaneous communication in the Transport protocol and by
  479. the following functions. Each of these functions is used or not used
  480. in accordance with the result of the selection performed in the
  481. establishment phase.
  482.  
  483.         o  Concatenation and Separation
  484.  
  485.            A function used to collect several TPDUs into a single
  486.            NSDU; the destination transport entity separates the TPDUs.
  487.  
  488.         o  Segmenting and Reassembling
  489.  
  490.            The splitting of a single data TSDU into multiple TPDUs
  491.            which are reassembled into their original format at the 
  492.            destination.
  493.  
  494.  
  495. ISO Transport Protocol Specification                                   Page 11
  496. International Standards Organization
  497.  
  498.  
  499.         o  Multiplexing and Demultiplexing
  500.  
  501.            A function used to share a single network connection
  502.            between two or more transport connections.
  503.  
  504.         o  Splitting and Recombing
  505.  
  506.            A function allowing the simultaneous use of two or more
  507.            network connections to support the same transport connec-
  508.            tion.
  509.  
  510.         o  Flow Control
  511.  
  512.            A function used to regulate the flow of TPDUs between two
  513.            transport entities on one transport connection.
  514.  
  515.         o  Error Detection
  516.  
  517.            A function used to detect the loss, corruption,
  518.            duplication, misordering or misdelivery of TPDUs.
  519.  
  520.         o  Transport Connection Identification
  521.  
  522.            A means to uniquely identify a transport connection
  523.            between the pair of transport entities supporting the
  524.            connection during the lifetime of the transport
  525.            connection.
  526.  
  527.         o  Error Recovery
  528.  
  529.            A function used to recover from detected and signalled
  530.            errors.
  531.  
  532.         o  Expedited Data
  533.  
  534.            A function used to bypass the flow control of normal data 
  535.            TPDU.  Expedited data TPDUs' flow is controlled by 
  536.            separate flow control.
  537.  
  538.         o  TSDU Delimiting
  539.  
  540.            A function used to determine the beginning and ending of
  541.            a TSDU.
  542.  
  543. 5.3.1.1.3  Release Phase
  544.  
  545.         A function to provide a disconnection of the transport
  546.         connection, regardless of the current activity.
  547.  
  548. 5.3.1.2  Classes and Options
  549.  
  550. ISO Transport Protocol Specification                                   Page 12
  551. International Standards Organization
  552.  
  553.  
  554.         A class defines a set of functions.   In this protocol five
  555.         classes are defined:
  556.  
  557.         o  Class 0:  Simple Class
  558.         o  Class 1:  Basic Error Recovery Class
  559.         o  Class 2:  Multiplexing Class
  560.         o  Class 3:  Error Recovery and Multiplexing Class
  561.         o  Class 4:  Error Detection and Recovery Class.
  562.  
  563.         Note that with the exception of classes 0 and 1, transport 
  564.         connections of different class may be multiplexed together
  565.         onto the same network connection.
  566.  
  567. 5.3.1.2.2  Options within Classes
  568.  
  569.         Options define potential functions which may be used within
  570.         a class.
  571.  
  572. 5.3.1.2.3  Negotiation
  573.  
  574.         Classes and options within classes are negotiated during
  575.         the connection establishment phase.
  576.  
  577. 5.3.1.2.4  Choice of the Class of Protocol
  578.  
  579.         The choice will be made by the transport entities according
  580.         to:
  581.  
  582.         o  the users requirement expressed via T-CONNECT service
  583.            primitives.  In particular, for the choice of the
  584.            class of protocol, the following rules apply:
  585.  
  586.            - if the TS-User requests either transmission of 
  587.              user data during the connection phase, or use of
  588.              Expedited data transfer, then Class 0 cannot be
  589.              selected.
  590.  
  591.            - if the TS-User requests use of Expedited data 
  592.              transfer, then Class 2 with the non-explicit 
  593.              flow control option cannot be selected.
  594.  
  595.         o  the quality of the available Network services;
  596.  
  597.         o  the user required service versus cost ratio 
  598.            acceptable for the transport user.
  599.  
  600.         The following is a classification of network services in terms
  601. of quality with respect to error behavior relative to the user
  602. requirements.  Its main purpose is to provide a basis for the decision
  603. regarding which class of transport connection should be used on top of
  604.  
  605. ISO Transport Protocol Specification                                   Page 13
  606. International Standards Organization
  607.  
  608.  
  609. a given network connection.
  610.  
  611.         Type A: Network connection with acceptable residual error
  612.                 rate (for example not signalled by 'clear' or 'reset')
  613.                 and acceptable rate of signalled failures.
  614.  
  615.         Type B: Network connections with acceptable residual error
  616.                 rate (for example not signalled by 'clear' or 'reset')
  617.                 but unacceptable rate of signalled failures.    
  618.  
  619.         Type C: Network connections with residual error rate not 
  620.                 acceptable to the TS-user.
  621.  
  622.         It is assumed that each transport entity is aware of the
  623. quality of service provided by particular Network connections.
  624.  
  625. 5.3.1.3  Potential Functions
  626.  
  627.         The protocol described in this document does not include the
  628. following set of functions which have been identified as potential
  629. transport layer functions:
  630.  
  631.         o  provision for encryption
  632.  
  633.         o  provision for accounting mechanisms
  634.  
  635.         o  provision for status exchanges and monitoring of quality
  636.            of service
  637.  
  638.         o  provision for blocking
  639.         
  640.         o  temporary release of network connections
  641.  
  642. 5.4     Model of the Transport Layer
  643.  
  644.              TSAP                               TSAP
  645.  
  646.         Transport Protocol              Transport Protocol
  647.              Entity                           Entity
  648.                                                    
  649.                                                     
  650.               NSAP   -------                    NSAP  -------
  651.                |     (NSAP)                      |     (NSAP)
  652.                |       |                         |       |
  653.                |       |-------------------------|--------
  654.                |                                 |              
  655.                -----------------------------------
  656.  
  657.         A Transport Protocol entity within the Transport Layer
  658. communicates with a Transport User through a TSAP by means of the
  659.  
  660. ISO Transport Protocol Specification                                   Page 14
  661. International Standards Organization
  662.  
  663.  
  664. service primitives as defined by the transport service definition DP
  665. aaaa.  Service primitives will cause or be the result of Transport
  666. Protocol Data Unit exchanges between the peer Transport Protocol
  667. entities supporting a Transport Connection.  These protocol exchanges
  668. are effected using the services of the Network Layer as defined by the
  669. Network Service Definition DP bbbb through one or more NSAPs.
  670.  
  671.         Transport connection endpoints are identified in end systems
  672. by an internal, implementation dependent, mechanism so that the
  673. Transport User and the Transport Protocol entity can refer to each
  674. Transport connection.
  675.  
  676. Section Two - Transport Protocol Specification
  677.  
  678. 6.      Protocol Mechanisms
  679.  
  680.         Several functions are described as 'inherent' or 'pervasive'.
  681. Inherent functions must be invoked for every transport connection.
  682. Pervasive functions are optional, but if one is invoked for the first
  683. transport connection over a network connection, it must also be invoked
  684. for any and all other transport connections which use that network
  685. connection during its lifetime.
  686.  
  687. 6.1     Assignment to Network Connection
  688.  
  689.         Purpose:  Assignment of transport connections to network
  690.                   connections.
  691.  
  692.         Network Service Primitives:
  693.  
  694.         N-CONNECT
  695.         N-DISCONNECT
  696.  
  697.         Description:
  698.  
  699.         This function is inherent.
  700.  
  701.         Before a transport connection can be created or used, it must
  702. be assigned to one (or more if splitting function is being used)
  703. network connection(s).  Both transport entities involved must become
  704. aware of this assignment.  A transport connection may be assigned to a
  705. suitable existing network connection; one or more new network
  706. connections may also be created for the purpose.
  707.  
  708.         An existing network connection, which connects the relevant
  709. transport entities, is unsuitable for assignment of a transport
  710. connection if, for example:
  711.  
  712.         o  the quality of service needed for the transport connection
  713.            can not be met by using or enhancing the network
  714.  
  715. ISO Transport Protocol Specification                                   Page 15
  716. International Standards Organization
  717.  
  718.  
  719.            connection.
  720.  
  721.         o  the protocol class preferred or in use for the transport 
  722.            connection is incompatible with the current usage of the 
  723.            network connection as regards the use of pervasive
  724.            functions (e.g., multiplexing).
  725.  
  726.         When a new network connection is created, the quality of
  727. service requested is a local matter, though it will normally be
  728. related to the requirements of transport connection(s) expected to be
  729. assigned to it.
  730.  
  731.         A Network Connection with no transport connections will be
  732. available after initial establishment or because explicit
  733. disconnection of all the transport connections previously assigned to
  734. it has taken place.  Either Transport entity may as a local
  735. matter choose to disconnect the Network Connection or assign other
  736. Transport Connections to it.
  737.  
  738. 6.2     Transport Protocol Data Unit (TPDU) Transfer
  739.  
  740.         Purpose:  To convey transport protocol data unit in user 
  741.                   data fields of network service primitives.
  742.  
  743.         Network Service Primitives
  744.  
  745.         N-DATA
  746.         N-EXPEDITED DATA
  747.  
  748.         Description:
  749.  
  750.         This function is inherent.
  751.  
  752.         The Transport Protocol Data Units (TPDUs) defined for the
  753. protocol are listed in Figure 3.
  754.  
  755.                 TPDU name                Abbreviation
  756.  
  757.         Connection Request                      CR
  758.         Connection Confirm                      CC
  759.         Disconnect Request                      DR
  760.         Disconnect Confirm                      DC
  761.         Data                                    DT
  762.         Expedited Data                          ED
  763.         Data Acknowledge                        AK
  764.         Expedited Acknowledge                   EA
  765.         Reject                                  RJ
  766.         TPDU Error                              ERR
  767.  
  768.                 Figure 3.  Transport Protocol Data Units
  769.  
  770. ISO Transport Protocol Specification                                   Page 16
  771. International Standards Organization
  772.  
  773.  
  774.         TPDUs are conveyed using the NS-User data parameters of the
  775. Network Service primitives, primarily with the N-DATA, but also with
  776. N-EXPEDITED primitives.
  777.  
  778.         Transport entities shall accept all permissible assignments and
  779. may issue any permissible assignments.  The permissible assignments of
  780. TPDUs to these primitives are shown in Figure 4.  Concatenation of
  781. TPDUs is also permitted (see section 6.4).
  782.  
  783. Primitive               Applicable TPDUs                        Note
  784.  
  785. N-DATA                  CR, CC, DR, DT, ED,
  786.                         AK, EA, RJ, DC, ERR
  787.  
  788. N-EXPEDITED             ED, EA                                  1
  789.  
  790. Notes:
  791.  
  792. 1.  This assignment is permissible only when using class 1 and when
  793.     the network expedited variant has been agreed.
  794.  
  795. Figure 4.  Network Service Primitives which can convey TPDUs.
  796.  
  797. 6.3     Data TPDU Length and Segmenting
  798.  
  799.         Purpose:  Mapping between one TSDU and TPDUs.
  800.  
  801.         TPDUs and fields used:
  802.  
  803.         DT
  804.         -  End of TSDU (1 bit)
  805.  
  806.         Description:
  807.  
  808.         The data field of Data TPDUs may contain any number of octets
  809. up to an agreed maximum as negotiated at connection time.  
  810.  
  811.         A transport entity uses an End of TSDU mark as defined below:
  812.  
  813.         In each Data TPDU a transport entity may indicate the end of a
  814. TSDU.
  815.  
  816.         Category 1      Having the End of TSDU mark set to yes.  These
  817.                         TPDUs may or may not have the maximum length.
  818.  
  819.         Category 2      Having the End of TSDU mark set to no.  These
  820.                         TPDUs do not necessarily have the maximum
  821.                         length.
  822.  
  823.         A complete Data TPDU sequence is defined as being composed of
  824.  
  825. ISO Transport Protocol Specification                                   Page 17
  826. International Standards Organization
  827.  
  828.  
  829. either a single category 1 DT TPDU or consecutive category 2 followed
  830. by a category 1 DT TPDU.
  831.  
  832. 6.4     Concatenation and Separation
  833.  
  834.         Pupose:  Conveyance of multiple TPDUs in one NSDU.
  835.  
  836.         Description:
  837.  
  838.         All TPDUs carry in their TPDU header a length indicator (see
  839. Section 8.2.1).  Additionally, TPDUs are classified as either Data
  840. TPDUs or Control TPDUs.  Control TPDUs may or may not contain a data
  841. field.  For TPDUs containing data the length of the data field is
  842. indicated by the length of the NSDU.  These provisions permit any
  843. number of Control TPDUs that may not contain data to be concatenated
  844. with a single control TPDU which may contain data or with a single
  845. Data TPDU.  The control TPDUs without data must precede the TPDU with
  846. data, if any.  The number of TPDUs so concatenated is terminated by
  847. the end of the NSDU.
  848.  
  849.         The concatenated set of TPDUs may be for the same or different
  850. transport connections.  An implementation shall accept concatenated
  851. TPDUs and may concatenate TPDUs before transmission.  The transport
  852. entity shall not send a concatenated set of TPDUs which exceeds twice
  853. the overall maximum TPDU length for all the TCs assigned to the
  854. network connection.
  855.  
  856. 6.5     Connection Establishment
  857.  
  858.         Purpose:  Creation of a new transport connection.
  859.  
  860.         Network Service Primitives:
  861.  
  862.         N-DATA
  863.  
  864.         TPDUs and fields used:
  865.  
  866.         CR, CC
  867.         - source reference (16 bits)
  868.         - initial credit (if applicable)
  869.         - calling transport address (optional)
  870.         - called transport address (optional)
  871.         - user data (optional)
  872.         - TPDU size (optional)
  873.         - sequence number length (optional)
  874.         - checksum selection (optional)
  875.         - acknowledgement time (optional)
  876.         - quality of service (optional)
  877.         CR
  878.         - preferred protocol class
  879.  
  880. ISO Transport Protocol Specification                                   Page 18
  881. International Standards Organization
  882.  
  883.  
  884.         - alternative protocol classes (zero or more)
  885.         - version number (optional)
  886.         - security (optional)
  887.         - proposed options
  888.         CC
  889.         - destination reference (16 bits)
  890.         - selected protocol class
  891.         - selected options
  892.  
  893.         Description:
  894.  
  895.         This function is inherent:
  896.  
  897.         A transport connection is established by means of one
  898. transport entity (the initiator) transmitting a Connection Request
  899. (CR) TPDU to the other transport entity (the responder), which replies
  900. with a Connection Confirm (CC) TPDU.  Before sending the CR TPDU, the
  901. initiator assigns the transport connection being created to one (or
  902. more if the splitting function is being used) network connection(s).
  903. It is this set of network connections over which the TPDUs are sent.
  904. During this exchange, all information and parameters needed for the
  905. transport entities to operate must be exchanged or negotiated.
  906.  
  907.         The following information is exchanged:
  908.  
  909.         o  references.  Each transport entity chooses a reference which
  910.            is 16 bits long and which is arbitrary except for the following
  911.            restrictions:
  912.  
  913.            - it cannot already be in use or "frozen" (see "Frozen
  914.              References", Section 6.19).
  915.  
  916.            - it cannot be zero.
  917.  
  918.         Each transport entity is responsible for selecting the
  919. Reference which the partner will use.  This mechanism is symmetrical
  920. and therefore avoids the need to assign a status of master or slave to
  921. partners and avoids call collision.  This mechanism also provides
  922. identification of the transport connection independent of the network
  923. connection. The range of References used for transport connections, in
  924. a given transport entity, is a local system parameter.
  925.  
  926.         o  addresses (optional).  Indicate the calling and called
  927.            transport service access points.  When either network
  928.            address unambiguously defines the transport address this
  929.            information may be omitted.
  930.  
  931.         o  initial credit.  Only relevant for classes which include
  932.            the Explicit Flow Control Function.
  933.  
  934.  
  935. ISO Transport Protocol Specification                                   Page 19
  936. International Standards Organization
  937.  
  938.  
  939.         o  user data.  Not available in class 0.  Up to 32 octets in
  940.            in other classes.
  941.  
  942.         The following negotiations take place:
  943.  
  944.         o  protocol class.  The initiator shall propose a preferred
  945. class and any number of alternatives.  (Except that no alternatives are
  946. allowed when class 0 is the preference.)  The initiator should assume
  947. when it sends the CR TPDU that its preferred class will be agreed to,
  948. and commence the functions associated with that class.
  949.  
  950.         Note:  This means, for example, that when a class which
  951. includes resynchronization (see "Resynchronization", Section 6.15) is
  952. preferred, resynchronization will occur if a reset is signalled during
  953. connection establishment.
  954.  
  955.         When the responder has decided which class is to be used, it
  956. shall indicate this in the CC TPDU and shall invoke the appropriate
  957. functions for the class.  The responder may select the preferred
  958. class, or any of the alternative classes or may select class 0 if
  959. class 1 is proposed or class 2 if class 3 or 4 is proposed. (see
  960. Section 9)
  961.  
  962.         If the preferred class is not selected, then on receipt of the
  963. CC TPDU, the initiator shall adjust its functions accordingly.
  964.  
  965.         o  TPDU Size.  The initiator may propose a maximum size for
  966. TPDUs, and the responder may accept this value or respond with any
  967. value between the proposed value and 128 in the set of values
  968. available (see "Encoding", Section 8).
  969.  
  970.         o  sequence number length.  Either normal or extended is
  971. available.  When the sequence number is extended, the credit field (if
  972. applicable) is also extended.
  973.  
  974.         o  checksum selection.  This defines whether or not TPDUs of
  975. the connection are to include a checksum.
  976.  
  977.         o  version number.  This defines the version of the transport
  978. protocol standard used for this connection.
  979.  
  980.         o  security parameter.  This parameter and its semantics are
  981. user defined.
  982.  
  983.         o  quality of service parameter.  This defines the throughput,
  984. delay, priority and residual error rate.
  985.  
  986.         o  The non-use of explicit flow control in class 2 is
  987. negotiated.
  988.  
  989.  
  990. ISO Transport Protocol Specification                                   Page 20
  991. International Standards Organization
  992.  
  993.  
  994.         o  The use of Network Receipt Confirmation and Network
  995. expedited is negotiated when class 1 is to be used.
  996.  
  997.         The negotiation rules for the options are such that the
  998. initiator may propose either to use or not to use the option.  The
  999. responder may either accept the proposed choice or select the
  1000. mandatory alternative defined in Section 9.
  1001.  
  1002.         During the establishment phase of the transport connection,
  1003. the use of the expedited data option field of CR/CC  allows both
  1004. Transport Service user to negotiate the use or non use of the
  1005. expedited data transport service as described in the transport service
  1006. definitions.
  1007.  
  1008.         The following table summarizes the negotiation possibilities
  1009. for the options.
  1010.  
  1011.                                 Proposition Made        Possible
  1012.                                 by the Initiator        Selection by 
  1013.         Option                                          the Responder
  1014.  
  1015. Transport expedited data             Yes                  Yes or No
  1016. transfer service                     No                       No
  1017.  
  1018. Use of receipt confir-               Yes                  Yes or No
  1019. mation (class 1 only)                No                       No
  1020.  
  1021. Use of the network                   Yes                  Yes or No
  1022. expedited variant                    No                       No
  1023. (class 1 only)
  1024.  
  1025. Non use of checksum                  Yes                  Yes or No
  1026. (class 4 only)                       No                       No
  1027.  
  1028. Non use of explicit                  Yes                  Yes or No
  1029. flow control (class 2 only)          No                       No
  1030.  
  1031. Use of extended format               Yes                  Yes or No
  1032.                                      No                       No
  1033.  
  1034.         In class 2, whenever a transport entity requests or agrees to
  1035. the Transport Expedited data transfer service or to the use of
  1036. extended formats, it must also request or agree (respectively) to the
  1037. use of explicit flow control.
  1038.  
  1039. 6.6     Connection Refusal
  1040.  
  1041.         Purpose:        Refusal of the transport connection.
  1042.  
  1043.         TPDUs and fields used:
  1044.  
  1045. ISO Transport Protocol Specification                                   Page 21
  1046. International Standards Organization
  1047.  
  1048.  
  1049.         DR
  1050.         -  reason (1 octet)
  1051.         -  user data (maximum of 64 octets)
  1052.  
  1053.         ERR
  1054.         -  reject code (1 octet)
  1055.         -  rejected TPDU parameter
  1056.  
  1057.         Description:
  1058.  
  1059.         If a transport connection cannot be accepted, the called
  1060. transport entity shall respond to the CR TPDU with a DR TPDU.  The
  1061. clearing reason shall indicate why the connection was not accepted.
  1062. The source reference field in the DR TPDU is set to zero to indicate
  1063. an unassigned reference.
  1064.  
  1065.         If the CR is regarded as an invalid TPDU, the called transport
  1066. entity will respond by sending an ERR TPDU.  On receipt of this TPDU,
  1067. the calling entity will regard the connection as closed.
  1068.  
  1069. 6.7     Release
  1070.  
  1071.         Variants:  'implicit' or 'explicit'
  1072.  
  1073.         Purpose:  Termination of the transport connection.
  1074.  
  1075.         Network Service Primitives:
  1076.  
  1077.         N-DISCONNECT (implicit variant only)
  1078.         N-DATA
  1079.  
  1080.         TPDUs and fields used:
  1081.  
  1082.         DR
  1083.         - clearing reason (1 octet)
  1084.         - user data (maximum of 64 octets)
  1085.  
  1086.         DC
  1087.  
  1088.         Description:
  1089.  
  1090.         This function is inherent.
  1091.  
  1092.         In the 'implicit' variant, either transport entity disconnects
  1093. a transport connection by disconnecting the network connection to
  1094. which it is assigned.  Similarly when a transport entity is informed
  1095. that the network connection has been disconnected by the peer
  1096. transport entity, this should be considered as a transport
  1097. disconnect.
  1098.  
  1099.  
  1100. ISO Transport Protocol Specification                                   Page 22
  1101. International Standards Organization
  1102.  
  1103.  
  1104.         In the 'explicit' variant, either transport entity transmits a
  1105. Disconnect Request (DR) TPDU, and the other responds with a Disconnect
  1106. Confirm (DC) TPDU.  When the DC TPDU is sent or received by a
  1107. transport entity, that entity should consider the transport connection
  1108. not to exist (note 1).  After the sending of a DR TPDU, other TPDUs
  1109. received before the DC TPDU are ignored.  It is possible that a
  1110. disconnect collision will occur, when both transport entities send a
  1111. DR TPDU at about the same time.  This results in each transport entity
  1112. receiving a DR, after sending one.  Each transport entity shall
  1113. consider the received DR TPDU as a confirmation of its DR TPDU, and
  1114. shall not send or expect to receive a DC TPDU.
  1115.  
  1116.         The DR can convey a limited amount (up to 64 octets) of data.
  1117.  
  1118. 6.8     Implicit Termination
  1119.  
  1120.         Purpose:  Termination of a Transport Connection on the
  1121. occurrence of a signalled error for which recovery functions are not
  1122. operative.
  1123.  
  1124.         Network Service Primitives:
  1125.  
  1126.         N-DISCONNECT Indication
  1127.         N-RESET Indication
  1128.  
  1129.         Description:
  1130.  
  1131.         When, on the network connection to which a Transport
  1132. Connection is assigned, an N-DISCONNECT or N-RESET Indication occurs,
  1133. both transport entities shall consider that the transport connection
  1134. no longer exists, and so inform the session entities.
  1135.  
  1136. Note 1:
  1137.  
  1138.         When a connection has been released, after the exchange of DR
  1139. and DC, the reference can be re-used immediately (except in Class 4,
  1140. where the Frozen Reference function is used, see Section 6.19).  This
  1141. is because the releasing transport entity does not know with certainty
  1142. that the remote transport entity considers use of the reference to be
  1143. ended.  Therefore, the reference should not be re-used for further
  1144. connections.  (In practice, the reference may be re-used after a
  1145. reasonable period when it is possible to be reasonably certain that
  1146. the remote transport entity will not continue to use it).
  1147.  
  1148. 6.9     Spurious Disconnect
  1149.  
  1150.         Purpose:  To deal with the arrival of an "unknown" DR TPDU.
  1151.  
  1152.         TPDUs and fields used:
  1153.  
  1154.  
  1155. ISO Transport Protocol Specification                                   Page 23
  1156. International Standards Organization
  1157.  
  1158.  
  1159.         DR, DC
  1160.         - source reference
  1161.         - destination reference
  1162.  
  1163.         Description:
  1164.  
  1165.         A DR TPDU can be received for a transport connection which
  1166. does not exist.  Rather than treating this as an error, a DC TPDU
  1167. should be send back which reflects the references of the DR TPDU.
  1168.  
  1169. Note:
  1170.         This only applies when one or more transport connections using
  1171. a multiplexing class exist over the network connection, or when no
  1172. transport connections exist.  At other times it is a protocol error.
  1173.  
  1174. 6.10    Data TPDU Numbering
  1175.  
  1176.         Variants:  'normal' or 'extended'
  1177.  
  1178.         Purpose:   Numbering of DT TPDUs for use in recovery, 
  1179.                    flow control, or sequencing functions.
  1180.  
  1181.         TPDUs and Fields Used:
  1182.  
  1183.         DT
  1184.         - TPDU-NR (7 or 31 bits)
  1185.  
  1186.         Description:
  1187.  
  1188.         DT TPDUs transmitted in each direction on a transport 
  1189. connection bear a sequence number 'TPDU-NR'.  Its value in the first
  1190. DT TPDU in each direction after connection establishment will be zero.
  1191. Thereafter each TPDU had 'TPDU-NR' one greater than the previous.  
  1192. Modulo 2**7 arithmetic is used in the 'normal' variant, and modulo 2**31
  1193. in the 'extended' variant.
  1194.  
  1195.         In the sections that follow, the relationships 'greater than'
  1196. and 'less than' are used in connection with TPDU numbers.  In all 
  1197. such uses, the numbers being compared cover a range less than the 
  1198. modulus and in fact lie within a contiguous set of TPDU numbers called
  1199. a 'window'.  The window has a known starting TPDU number and finishing 
  1200. number.  The term 'less than' means 'occurring sooner in the window
  1201. sequence' and the term 'greater than' means 'occurring later in the
  1202. window sequence'.
  1203.  
  1204. 6.11    Expedited Data Transfer
  1205.  
  1206.         Variants:  'network expedited' or not
  1207.  
  1208.         Purpose:  Provision of the expedited data service
  1209.  
  1210. ISO Transport Protocol Specification                                   Page 24
  1211. International Standards Organization
  1212.  
  1213.  
  1214.         Network Service Primitives:
  1215.  
  1216.         N-DATA
  1217.         N-EXPEDITED DATA
  1218.  
  1219.         TPDUs and Fields Used:
  1220.  
  1221.         ED
  1222.         - ED TPDU-NR (7 or 31 bits)
  1223.  
  1224.         EA
  1225.         - YR-TU-NR (7 or 31 bits)
  1226.  
  1227.         Description:
  1228.  
  1229.         Each expedited TSDU is conveyed as the data field of an Expedited
  1230. Data (ED) TPDU.  
  1231.  
  1232.         Each ED TPDU received must be acknowledged by an Expedited
  1233. Acknowledge (EA) TPDU.  
  1234.  
  1235.         There may only be one ED TPDU unacknowledged at any time for each
  1236. direction of a transport connection.  
  1237.  
  1238.         In the 'network expedited' variant (available in class 1 only),
  1239. ED and EA TPDUs are conveyed in the data fields of N-EXPEDITED DATA
  1240. primitives.  Otherwise, N-DATA is used.  
  1241.  
  1242. 6.12    Reassignment
  1243.  
  1244.         Purpose:  Assignment of a Transport Connection to a different
  1245. Network Connection.
  1246.  
  1247.         TPDUs and Fields Used:
  1248.  
  1249.         CR
  1250.         - source reference
  1251.  
  1252.         RJ, DR
  1253.         - destination reference
  1254.  
  1255.         Description:
  1256.  
  1257.         When the Network Connection to which a Transport Connection was
  1258. assigned no longer exists, the Transport Connection can be assigned to
  1259. another Network Connection.  
  1260.  
  1261.         When one transport entity has assigned the Transport Connection,
  1262. it is important that the other transport entity recognise to which 
  1263. Network Connection it has been assigned.  This can only take place when it
  1264.  
  1265. ISO Transport Protocol Specification                                   Page 25
  1266. International Standards Organization
  1267.  
  1268.  
  1269. has received a TPDU for the Transport Connection on a Network Connection
  1270. with calling and called network addresses which imply 
  1271. the same transport entities as the old.  The TPDU will have been sent 
  1272. as a result of the assigning transport entity commencing resynchronization,
  1273. and will thus be a RJ, or a retransmitted CR or DR.  
  1274.  
  1275.         The Transport Connection shall be recognised as having been
  1276. assigned to the Network Connection on which the TPDU was received.  
  1277.  
  1278. 6.13    Reassignment After Failure
  1279.  
  1280.         Purpose:  Recovery from network provider initiated disconnect.
  1281.  
  1282.         Network Service Primitives:
  1283.  
  1284.         N-DISCONNECT Indication 
  1285.  
  1286.         Description:
  1287.  
  1288.         When a N-DISCONNECT Indication arrives for the network connection
  1289. to which a transport connection is assigned, the transport connection must 
  1290. be reassigned by its initiator (see "Reassignment")
  1291.  
  1292.         If the reassignment has not successfully occurred within a time
  1293. of T-wait seconds, then the transport connection must be considered as
  1294. non-existent by both transport entities.1
  1295.  
  1296.         1.      The CR TPDU does not have a destination reference;
  1297.                 nevertheless it can be distinguished from a new
  1298.                 connection attempt by having the same source 
  1299.                 reference.  
  1300.  
  1301.         NOTE:  The value of T-wait has to be agreed by the communicating
  1302. transport entities.  
  1303.  
  1304. 6.14    Retention Until Acknowledgement of TPDUs
  1305.  
  1306.         Variants:  'confirmation of receipt' or 'AK'
  1307.  
  1308.         Purpose:  To enable and minimize retransmission after
  1309. possible loss of TPDUs.
  1310.  
  1311.         Network Service Primitives:
  1312.  
  1313.         N-DATA
  1314.         N-DATA ACKNOWLEDGE
  1315.  
  1316.         TPDUs and Fields Used:
  1317.  
  1318.         CR, CC, DR, DC
  1319.  
  1320. ISO Transport Protocol Specification                                   Page 26
  1321. International Standards Organization
  1322.  
  1323.  
  1324.         RJ, AK, EA
  1325.         - YR-TU-NR (7 or 31 bits)
  1326.  
  1327.         DT
  1328.         - TPDU-NR (7 or 31 bits)
  1329.  
  1330.         ED
  1331.         - ED TPDU-NR (7 or 31 bits)
  1332.  
  1333.         Description:  
  1334.  
  1335.         Copies of the following TPDUs shall be retained upon transmission
  1336. to permit their later retransmission:
  1337.  
  1338.                 CR, CC, DR, DT, ED.
  1339.  
  1340.         NOTE:  If DR is sent in response to CR there is no need to 
  1341. retain a copy of the DR.
  1342.  
  1343.         In the 'confirmation of receipt' variant, applicable only 
  1344. in Class 1, transport entities receiving N-DATA Indications which
  1345. convey DT TPDUs and have the confirmation request field set shall
  1346. issue a N-DATA Acknowledge Request at the earliest possible
  1347. opportunity (1).  
  1348.  
  1349.         (1)     It is a local matter for each transport entity to 
  1350.                 decide which N-DATA Requests should have the 
  1351.                 confirmation request parameter set.  This decision
  1352.                 will normally be related to the amount of storage 
  1353.                 available for retained copies of the DT TPDUs.  
  1354.                 Use of the confirmation request parameter may
  1355.                 affect the quality of network service.  
  1356.  
  1357.         After each TPDU is acknowledged, as shown in Figure 5,
  1358. the copy need not be retained.  Copies may also be discarded when
  1359. the transport connection ceases to exist.  
  1360.  
  1361.         TPDU                            ACKNOWLEDGED BY
  1362.  
  1363.         CR              receipt of CC, DR, or ERR, TPDU
  1364.  
  1365.         DR              receipt of DC or DR (in case of collision)
  1366.                         TPDU
  1367.  
  1368.         CC              receipt of RJ, DT, AK, ED, EA TPDUs (or 
  1369.                         N-DATA ACKNOWLEDGE Indication.)
  1370.  
  1371.         DT              N-DATA ACKNOWLEDGE Indication when the 
  1372.         (Note 1)        DT TPDU was sent before or with the oldest
  1373.                         N-DATA which had the confirmation request
  1374.  
  1375. ISO Transport Protocol Specification                                   Page 27
  1376. International Standards Organization
  1377.  
  1378.  
  1379.                         field set.  
  1380.  
  1381.         DT              receipt of Data Acknowledge (AK) or
  1382.         (Note 2)        Reject (RJ) TPDU for which 'YR-TU-NR'
  1383.                         is greater than 'TPDU-NR' in the DT TPDU.
  1384.  
  1385.         ED              receipt of EA TPDU for which 'YR-TU-NR' 
  1386.                         is equal to 'ED-TPDU-NR' in the ED TPDU.        Notes:
  1387.   
  1388.  
  1389.         1.      Applies to 'confirmation of receipt' variant.
  1390.         2.      Applies to 'AK' variant.  
  1391.  
  1392.                 Figure 5.  Acknowledgement of TPDUs
  1393.  
  1394. 6.15    Resynchronization
  1395.  
  1396.         Purpose:  To restore the connection to normal after an 
  1397. error.  
  1398.  
  1399.         Network Service Primitives:
  1400.  
  1401.         N-RESET Indication
  1402.  
  1403.         TPDUs and Fields Used:
  1404.  
  1405.         CR, DR, CC, DC
  1406.  
  1407.         RJ, EA
  1408.         - YR-TU-NR (7 or 31 bits)
  1409.  
  1410.         DT                      
  1411.         - TPDU-NR (7 or 31 bits)
  1412.  
  1413.         ED
  1414.         - ED TPDU-NR (7 or 31 bits)
  1415.  
  1416.         Description:
  1417.  
  1418.         After the reset of an underlying network connection,
  1419. the resynchronization procedures below are carried out by both
  1420. transport entities.  
  1421.  
  1422.         After a network connection failure, the reassignment after
  1423. failure function is invoked and then the resynchronization function.  
  1424. The sequence of events at the two transport entities is the following:
  1425.  
  1426.         Events at the transport entity initiating reassignment:
  1427.         (the transport entity immediately commences resynchronization
  1428.          by sending a TPDU)
  1429.  
  1430. ISO Transport Protocol Specification                                   Page 28
  1431. International Standards Organization
  1432.  
  1433.  
  1434.         o       if a CR is retained then retransmit it.
  1435.  
  1436.         o       if a DR is retained then retransmit it.
  1437.  
  1438.         o       otherwise, resynchronize data:
  1439.  
  1440.                 -       send RJ TPDU with 'YR-TU-NR' field set to
  1441.                         the 'TPDU-NR' of the first unreceived DT
  1442.                         TPDU
  1443.  
  1444.                 -       when RJ TPDU has been received retransmit any
  1445.                         ED TPDUs then DT TPDUs which are unacknowledged
  1446.  
  1447.                 -       any ED TPDUs received which are duplicates shall
  1448.                         be acknowledged (by EA TPDUs) and discarded.  
  1449.  
  1450.         Events at the other transport entity:
  1451.  
  1452.         The transport entity shall not send any TPDUs until after 
  1453. receipt of the TPDU which commenced resynchronization.  This TPDU
  1454. therefore serves two purposes, namely indication of re-assignment
  1455. and commencement of resynchronization.  
  1456.  
  1457.         o       if the first received TPDU os a DR, then transmit
  1458.                 a DC TPDU.
  1459.  
  1460.         o       if the first received TPDU is a CR and the transport
  1461.                 connection is not idle, this means that a CC TPDU is
  1462.                 retained:  then retransmit it followed by any ED TPDU 
  1463.                 and then DT TPDUs which are outstanding (that may or
  1464.                 may not have been transmitted previously).  
  1465.  
  1466.         NOTE:  no TPDUs can be transmitted using network expedited until 
  1467. CC becomes acknowledged, to prevent the network expedited overtaking the 
  1468. CC.  
  1469.  
  1470.         o       if the first received TPDU is a RJ, then act as follows:
  1471.  
  1472.                 -       if a DR TPDU is retained, then retransmit it
  1473.  
  1474.                 -       if a CC TPDU remains unacknowledged, then carry
  1475.                         out the data resynchronization procedure described
  1476.                         below
  1477.  
  1478.                 -       otherwise resynchronize data:
  1479.  
  1480.                         -       send RJ TPDU with 'YR-TU-NR' field set to
  1481.                                 the 'TPDU-NR' of the first unreceived DT
  1482.                                 TPDU
  1483.  
  1484.  
  1485. ISO Transport Protocol Specification                                   Page 29
  1486. International Standards Organization
  1487.  
  1488.  
  1489.                         -       retransmit any ED TPDUs then DT TPDUs which
  1490.                                 are unacknowledged
  1491.  
  1492.                         -       any ED TPDUs received which are duplicates 
  1493.                                 should be acknowledged (by EA TPDUs) and 
  1494.                                 discarded.  
  1495.  
  1496.         NOTE:  It is possible for a transport entity using the Class 1
  1497. protocol to decide on a local basis to issue an N-RESET Request.  The effect
  1498. of this request at the remote transport entity is to force it to perform
  1499. the resynchronization mechanism.  This possibility may be used to remove 
  1500. congestion within the network connection.  
  1501.  
  1502. 6.16    Multiplexing and Demultiplexing
  1503.  
  1504.         Purpose:  Concurrent sharing of a network connection by several
  1505. transport connections.
  1506.  
  1507.         TPDUs and Fields Used:
  1508.  
  1509.         CC, DR, DC, DT, AK, ED, EA, RJ, ERR
  1510.         - destination reference
  1511.  
  1512.         Description:
  1513.  
  1514.         This function is pervasive.  
  1515.  
  1516.         When this function is in operation, more than one transport 
  1517. connection can be simultaneously assigned to the same network connection.
  1518.  
  1519.         Every TPDU (including DT TPDUs) must carry the destination 
  1520. reference, to identify the transport connection to which it refers.  
  1521.  
  1522. 6.17    Explicit Flow Control
  1523.  
  1524.         Purpose:  Regulation of flow of DT TPDUs independently of 
  1525. the flow control in the other layers.  
  1526.  
  1527.         TPDUs and Fields Used:
  1528.  
  1529.         CR, CC, AK, RJ
  1530.         - CDT (4 or 16 bits)
  1531.  
  1532.         DT
  1533.         - TPDU-NR (7 or 31 bits)
  1534.  
  1535.         AK, RJ
  1536.         - YR-TU-NR (7 or 31 bits)
  1537.         - subsequence number (optional)
  1538.         - flow control confirmation (optional)
  1539.  
  1540. ISO Transport Protocol Specification                                   Page 30
  1541. International Standards Organization
  1542.  
  1543.  
  1544.         Description:
  1545.  
  1546.         The mechanism depends on the class.  Thus the description can
  1547. be found in the section describing the class. 
  1548.  
  1549. 6.18    Checksum
  1550.  
  1551.         Purpose:  To detect corruption of TPDUs by the network service
  1552. provider.  
  1553.  
  1554.         TPDUs and Fields Used:
  1555.  
  1556.         All TPDUs
  1557.         - checksum (16 bits - 32 bits)
  1558.  
  1559.         Description:
  1560.  
  1561.         When a TPDU is to be transmited for a TC which has selected the
  1562. checksum option, the sending transport entity must generate a checksum
  1563. for the TPDU and store it in the checksum parameter in the variable
  1564. part of the TPDU header.  The checksum must be generated as follows:
  1565.  
  1566.         1.      Set up the complete TPDU, including the header and 
  1567. user data (if any).  The header must include the checksum parameter in
  1568. its variable part.  The value field of the checksum parameter must be
  1569. set to zero at this point.  
  1570.  
  1571.         2.      Initialize two variables to zero.  Let these variables 
  1572. be called C0 and C1.  
  1573.  
  1574.         3.      For each octet of the TPDU, including the header, 
  1575. variable part of the header and the user data, add the octet value to 
  1576. C0, and then add the value of C0 to C1.  Octets should be processed
  1577. sequentially, starting with the first octet (the Length Indicator) and
  1578. proceeding through the TPDU.  All addition is to be performed modulo 255.
  1579.  
  1580.         4.      Calculate the value field of the checksum parameter as
  1581. follows.  Let the offset into the TPDU of the first octet of the value 
  1582. field be 'n' (where the first octet of the TPDU, the Length Indicator
  1583. of the header, is considered to be at offset 1).  Let the length 
  1584. of the TPDU, i.e. the number of times the above operation was repeated,
  1585. be 'L'.  Let the first octet of the checksum value, i.e., the one at offset
  1586. 'n' be called 'X', and the second octet, at offset 'n+1', be called 'Y'.  
  1587. Then:  
  1588.  
  1589.         X = (((L - n) *  C0) - C1) modulo 255
  1590.         Y = (((L - n + 1) * (-C0)) + C1) modulo 255
  1591.  
  1592.         5.      Place the computed values of X and Y in the appropriate
  1593. octets of the TPDU.  
  1594.  
  1595. ISO Transport Protocol Specification                                   Page 31
  1596. International Standards Organization
  1597.  
  1598.  
  1599.                                 NOTE
  1600.  
  1601.         An implementation may use one's complete arithmetic as an
  1602.         alternative to modulo 255 arithmetic.  However, if either
  1603.         of the checksum octets X and Y has the value minus zero
  1604.         (i.e., 255) then it must be converted to plus zero 
  1605.         (i.e., 0) before being stored.  
  1606.  
  1607.         When a TPDU is received for a TC for which the checksum option
  1608. has been selected, the TPDU must be verified to ensure that it has been
  1609. received correctly.  This is done by computing the checksum, using the
  1610. same algorithm by which it was generated.  The nature of the checksum
  1611. algorithm is such that it is not necessary to compare explicitly the stored
  1612. checksum bytes.  The procedure described below may be used to verify that 
  1613. a TPDU has been correctly received.  
  1614.  
  1615.         1.      Initialize two variable to zero.  Let these variables
  1616. be called C0 and C1.  
  1617.  
  1618.         2.      For each octet in the received TPDU, add the value of
  1619. the octet to C0 and then add the value of C0 to C1, starting with the
  1620. first octet and proceeding sequentially through the TPDU.  All 
  1621. addition is to be performed modulo 255.  
  1622.  
  1623.         3.      When all octets have been sequentially processed, the
  1624. values of C0 and C1 should be zero.  If either or both of them is 
  1625. non-zero, the TPDU has been received incorrectly and the verification
  1626. has failed.  Otherwise, the TPDU has been received correctly and the 
  1627. TPDU should be processed normally.  
  1628.  
  1629.                                 NOTE
  1630.  
  1631.         An implementation may use one's complement arithmetic as an
  1632.         alternative to modulo 255 arithmetic.  In this case, if either
  1633.         C0 or C1 has the value minus zero (i.e., 255) it is to be 
  1634.         regarded as though it was plus zero (i.e., 0)
  1635.  
  1636.         If a checksum verification failure occurs, it is not possible
  1637. to determine the TC that the TPDU relates to, since the Reference field
  1638. of the TPDU may have been received incorrectly.  Therefore, all TCs
  1639. multiplexed onto the same NC must be treated as though a network signalled
  1640. error has occurred.  
  1641.  
  1642. 6.19    Frozen References
  1643.  
  1644.         Purpose:  To prevent re-use of a reference while TPDUs associated
  1645. with the old use of the reference may still exist.  
  1646.  
  1647.         Description:  When a transport entity determines that a particular
  1648. connection has terminated, the reference shall be placed in a frozen state 
  1649.  
  1650. ISO Transport Protocol Specification                                   Page 32
  1651. International Standards Organization
  1652.  
  1653.  
  1654. during which time it will not be reused.  The circumstances under which
  1655. this is done, and the period of time for which the reference remains
  1656. frozen depends on the class.   
  1657.  
  1658. 6.20    Retransmission on Timeout
  1659.  
  1660.         Purpose:  To cope with unsignalled loss of TPDUs by the network
  1661. service provider.  
  1662.  
  1663.         TPDUs and Fields Used:
  1664.  
  1665.         CR, CC, DR, DT, ED, AK
  1666.  
  1667.         Description:  
  1668.  
  1669.         The description is given in the section related to class 4.  
  1670.  
  1671. 6.21    Resequencing 
  1672.  
  1673.         Purpose:  To cope with misordering of TPDUs by the network
  1674. service provider.  
  1675.  
  1676.         TPDUs and Field Used:
  1677.  
  1678.         DT
  1679.         - TPDU NR
  1680.  
  1681.         ED
  1682.         - ED TPDU NR
  1683.  
  1684.         Description:
  1685.  
  1686.         The description is given in the section related to class 4.  
  1687.  
  1688. 6.22    Inactivity Control
  1689.  
  1690.         Purpose:  To cope with unsignalled termination of a network
  1691. connection.  
  1692.  
  1693.         TPDUs and Fields Used:
  1694.  
  1695.         AK
  1696.  
  1697.         Description:
  1698.  
  1699.         The description is given in the section related to class 4.  
  1700.  
  1701. 6.23    Treatment of Protocol Errors
  1702.  
  1703.         Purpose:  To deal with invalid TPDUs.
  1704.  
  1705. ISO Transport Protocol Specification                                   Page 33
  1706. International Standards Organization
  1707.  
  1708.  
  1709.         TPDUs and Fields Used:
  1710.  
  1711.         ERR
  1712.         - reject cause
  1713.         - TPDU in error (string of octets)
  1714.  
  1715.         DR
  1716.         - reason code
  1717.  
  1718.         Description:
  1719.  
  1720.         This function is inherent.  
  1721.  
  1722.         Any received TPDU which is invalid or which cannot be dealt with by
  1723. any operative function, or which is regarded as a violation of the protocol
  1724. rules of the class in use (e.g., receipt in a wrong state, window error,
  1725. sequencing error, TPDU with incorrect format), shall be considered as a 
  1726. protocol error.  Such an error shall be signalled to the transport entity
  1727. responsible by the sending of an TPDU Error (ERR) TPDU or by initiating a 
  1728. release.  The ERR TPDU conveys the octets of the offending TPDU up to
  1729. and including the octet where the error was detected.  
  1730.  
  1731.         In general, no further action is defined for the sender of 
  1732. ERR TPDU, since it is expected that the offender will either correct 
  1733. the error, or close the connection.  
  1734.  
  1735.         Action to be done by the receiver depends on local implementation
  1736. decision; e.g., freeze the connection, report to management, disconnect.  
  1737.  
  1738. NOTES:  
  1739.  
  1740.         1.      Further action is a local implementation issue.  Care
  1741. should be taken by the transport entity receiving several invalid TPDUs
  1742. or ERR TPDUs to avoid looping if the error is repeatedly generated.  
  1743.  
  1744.         2.      There are two cases in which specific action is defined
  1745. for the receiver of the ERR TPDU (see Sections 6.6 and 7.0.7).  
  1746.  
  1747. 6.24    Splitting and Recombining
  1748.  
  1749.         Purpose:  To allow a transport connection to make use of 
  1750. multiple network connections to provide additional resilience against
  1751. network failure, to increase throughput, or for other reasons.  
  1752.  
  1753.         Description:
  1754.  
  1755.         This function is available only in Class 4.  
  1756.  
  1757.         When this function is being used, a transport connection is 
  1758. assigned (see Section 6.1) to multiple network connections. TPDUs for the 
  1759.  
  1760. ISO Transport Protocol Specification                                   Page 34
  1761. International Standards Organization
  1762.  
  1763.  
  1764. connection may be sent over any assigned network connection.  The 
  1765. resequencing function of Class 4 (see Section 6.21) is used to ensure
  1766. that TPDUs are processed in the correct sequence.  
  1767.  
  1768.         If the use of Class 4 is not accepted by the remote transport
  1769. entity following the negotiation rules, only the network connection
  1770. over which the CR TPDU was sent may be used for this transport
  1771. connection.  
  1772.  
  1773.         The splitting function should only be used where the 
  1774. supporting network connections provide similar transmit delay.  
  1775.  
  1776.    Protocol Mechanism           Variant         0  1  2  3  4
  1777.  
  1778. Assignment to Network Conn.                     *  *  *  *  *
  1779.  
  1780. TPDU Transfer                                   *  *  *  *  *
  1781.  
  1782. DT TPDU Length and Segmenting                   *  *  *  *  *
  1783.  
  1784. Concatenation and Separation                       *  *  *  *
  1785.  
  1786. Connection Establishment                        *  *  *  *  *
  1787.  
  1788. Connection Refusal                              *  *  *  *  *
  1789.  
  1790. Release                         implicit        *
  1791.                                 explicit           *  *  *  *
  1792.  
  1793. Implicit Termination                            *     *
  1794.  
  1795. DT TPDU Numbering               normal             *  m  m  m
  1796.                                 extended            (1)o o  o
  1797.  
  1798. Expedited Data Transfer         network exp.      ao
  1799.                                 not "              m  *  *  *
  1800.                                                      (1)
  1801.  
  1802. Reassigment                                        *     *
  1803.  
  1804. Reassignment after Failure                         *     *
  1805.  
  1806. Retention until Acknowledge-    Conf. Receipt     ao
  1807. ment of TPDUs                   AK                 m     *  *
  1808.  
  1809. Resynchronization                                  *     *
  1810.  
  1811. Multiplexing and                                      *  *  *
  1812. Demultiplexing
  1813.  
  1814.  
  1815. ISO Transport Protocol Specification                                   Page 35
  1816. International Standards Organization
  1817.  
  1818.  
  1819. Explicit Flow Control With                            m  *  *
  1820.                       Without                   *  *  o 
  1821.  
  1822. Checksum   (use of)                                         m
  1823.            (non-use of)                         *  *  *  *  o
  1824.  
  1825. Frozen References                                           *
  1826.  
  1827. Retransmission on Timeout                                   *
  1828.  
  1829. Resequencing                                                *
  1830.  
  1831. Inactivity Control                                          *
  1832.  
  1833. Treatment of Protocol Errors                    *  *  *  *  *
  1834.  
  1835. Splitting and recombining                                   *
  1836.  
  1837. (1)  not applicable in class 2 when the non use of explicit flow
  1838. control is selected.  
  1839.  
  1840. 7.      PROTOCOL CLASSES
  1841.  
  1842.         The details of the implementation of the protocol 
  1843. mechanisms are in certain cases different for different classes.  
  1844. For this reason, the following table is not intended to provide a 
  1845. complete description of the classes, but more to give an overview of 
  1846. how each class works.  The exact definition of the protocol is given 
  1847. in the subsequent sections.
  1848.  
  1849.                             KEY
  1850.  
  1851.         *  include in the class (always)
  1852.  
  1853.         m  mandatory function (negotiable but always implemented)
  1854.  
  1855.         o  additional function (negotiable but not necessarily implemented)
  1856.  
  1857.         ao additional function (negotiable but not necessarily implemented).
  1858.              Use of this option depends on the willingness of both transport 
  1859.              entities and availability of network service.
  1860.  
  1861.         na not applicable.
  1862.  
  1863. 7.0     PROTOCOL DESCRIPTION OF CLASS 0: SIMPLE CLASS
  1864.  
  1865. 7.0.1   Characteristics of Class 0
  1866.  
  1867.         The characteristic of this class is that it provides 
  1868. the simplest type of transport connection and fully compatible 
  1869.  
  1870. ISO Transport Protocol Specification                                   Page 36
  1871. International Standards Organization
  1872.  
  1873.  
  1874. with the CCITT recommendations S.70 for Teletex terminals.
  1875.  
  1876.         The class is designed for use in association with 
  1877. network connections of type A (see 5.3.1.2.4.).
  1878.  
  1879. 7.0.2   Functions of Class 0
  1880.  
  1881.         This class is designed to have minimum functionality.
  1882. It provides only the functions needed for connection 
  1883. establishment with negotiation, data transfer with segmenting and 
  1884. protocol error reporting.
  1885.  
  1886.         Class 0 provides transport connections with flow 
  1887. control based on the network service provided flow control, and 
  1888. disconnection based on the network service disconnection.
  1889.  
  1890. 7.0.3   Protocol Mechanisms of Class 0
  1891.  
  1892. 7.0.3.1  Connection Establishment Phase
  1893.  
  1894.         Connection shall be made in accordance with the 
  1895. general rules (Assignment of Network Connection, Connection 
  1896. Establishment and Connection Refusal) with the following 
  1897. restrictions:
  1898.  
  1899.         o  No exchange of user data is allowed.
  1900.  
  1901.         o  Only TSAP-ID and TPDU size parameters are allowed.
  1902.  
  1903. 7.0.3.2  Data Transfer Phase
  1904.  
  1905.         o  Segmenting  (DT TDPU length and Segmenting)
  1906.  
  1907.         o  Detection and indication of procedural errors.
  1908.  
  1909. 7.0.3.3  Release Phase
  1910.  
  1911.         There is no explicit transport connection release 
  1912. procedure for this class.  The lifetime of the transport connection 
  1913. is directly correlated to the lifetime of the network connection.
  1914.  
  1915. 7.0.4   Connection Establishment for Class 0
  1916.  
  1917.         The connection establishment function is used 
  1918. with the contraint that only the transport entity which has 
  1919. requested the establishment of the network connection may send the 
  1920. CR TPDU.  If the calling transport entity receives a CR TPDU, it 
  1921. shall transfer a TPDU Error (ERR) TPDU to notify the called 
  1922. transport entity of the procedure error.
  1923.  
  1924.  
  1925. ISO Transport Protocol Specification                                   Page 37
  1926. International Standards Organization
  1927.  
  1928.  
  1929. 7.0.5   Data Transfer Procedures
  1930.  
  1931. 7.0.5.1  General 
  1932.  
  1933.         The data transfer procedures described in the 
  1934. following subsections apply only when the transport layer is in the 
  1935. data transfer phase, that is after completion of Transport 
  1936. Connection establishment.
  1937.  
  1938. 7.0.5.2  Transport Data TPDU maximum length
  1939.  
  1940.         For Class 0 the standard maximum transport data 
  1941. TPDU length is 128 octets including the data TPDU header octets.
  1942.  
  1943.         Other maximum TPDU lengths may be supported in 
  1944. conjunction with the optional transport data TPDU size negotiation 
  1945. function (see Section 8.3 and 8.4).  Optional maximum data field 
  1946. lengths shall be chosen from the following list:  256, 512, 1024 
  1947. and 2048 octets.
  1948.  
  1949.         TSDUs are transmitted using the segmenting function.
  1950.  
  1951. 7.0.6   Release  Procedure
  1952.  
  1953.         The "implicit" variant of the release function is used.
  1954.  
  1955. 7.0.7   Treatment of invalid TPDUs
  1956.  
  1957.         The "treatment of protocol errors' function is used.
  1958.  
  1959. 7.0.8   Behaviour after an error signalled by the network service.
  1960.  
  1961.         The implicit termination function is used and the 
  1962. high layer is informed about this disconnection.
  1963.  
  1964. 7.0.9   Supported Options
  1965.  
  1966.         None
  1967.  
  1968. 7.1     PROTOCOL DESCRIPTION OF CLASS 1:  BASIC ERROR RECOVERY CLASS
  1969.  
  1970. 7.1.1   Characteristics of Class 1
  1971.  
  1972.         The characteristic of this class is that it 
  1973. provides a basic transport connection with minimal overheads.
  1974.  
  1975.         The main purpose of the class if to recover from 
  1976. network signalled errors (network disconnect or reset).
  1977.  
  1978.         Selection of this class is usually based on 
  1979.  
  1980. ISO Transport Protocol Specification                                   Page 38
  1981. International Standards Organization
  1982.  
  1983.  
  1984. reliability criteria.  Class 1 has been designed to be used in 
  1985. association with type B network connections.
  1986.  
  1987. 7.1.2   Functions of Class 1
  1988.  
  1989.         Class 1 provides transport connections with flow 
  1990. control based on the network service provided flow control, error 
  1991. recovery, expedited data transfer, disconnection, and also the 
  1992. ability to support consecutive Transport connections on a network 
  1993. connection.
  1994.  
  1995.         This class provides the functionality of Class 0 
  1996. plus the ability to recover after a failure signalled by the Network 
  1997. Service, without involving the user of the Transport Service.
  1998.  
  1999. 7.1.3   Protocol Mechanisms of Class 1
  2000.  
  2001.         Class 1 protocol mechanisms include Class 0 
  2002. protocol mechanisms plus the following:
  2003.  
  2004. 7.1.3.1  User Data in the Connection Phase
  2005.  
  2006.         Class 1 provides the possibility of conveying 
  2007. data in the connection request and confirm commands.
  2008.  
  2009. 7.1.3.2  Numbering of Data TPDU
  2010.  
  2011.         Each Data TPDU transmitted between transport entities for 
  2012. each direction of transmission in a transport connection is 
  2013. sequentially numbered.
  2014.  
  2015. 7.1.3.3  Release
  2016.  
  2017.         The "explicit" variant of the release function is used.
  2018.  
  2019. 7.1.3.4  Error Recovery
  2020.  
  2021.         The sending Transport entity keeps a copy of transmitted 
  2022. TPDUs until it receives an acknowledgment which allows copies to be released.
  2023. After a failure is indicated by the nerwork service (Reset, 
  2024. Disconnect), the resynchronization function is used to determine
  2025. which TPDUs must be retransmitted.
  2026.  
  2027.         Resynchronization may also be invoked by a transport entity
  2028. as a local matter.  For that purpose the Resynchronization function is
  2029. used (see note at the end of Section 6.15).
  2030.  
  2031. 7.1.3.5  Acknowledgement
  2032.  
  2033.         Acknowledgements are used to release copies of retained TPDUs.
  2034.  
  2035. ISO Transport Protocol Specification                                   Page 39
  2036. International Standards Organization
  2037.  
  2038.  
  2039. Two methods of acknowledgment are provided in the Retention until 
  2040. Acknowledgement of TPDUs function:
  2041.  
  2042.         o  use of AK TPDU ("AK" variant) - mandatory
  2043.  
  2044.            Note:  The credit field of the AK TPDU is
  2045.            not used in this class (always Set to zero).
  2046.  
  2047.         o  use of network layer Confirmation of Receipt Service.
  2048.            ('confirmation of receipt' variant) - optional
  2049.  
  2050.         The variant to be used is negotiated during the 
  2051. Connection Establishment Phase.  The default option is the "AK TPDU" 
  2052. variant.  Use of Network Layer Receipt Confirmation is allowed only 
  2053. in Class 1, and depends on the availability of the network layer 
  2054. receipt confirmation service, the expected cost reduction, and the 
  2055. agreement of both transport entities to use it.
  2056.  
  2057. 7.1.4   Connection Establishment Procedures for Class 1
  2058.  
  2059.         The 'assignment to network connection' and 
  2060. 'connection establishment' mechanisms are used.  From the point at 
  2061. which a transport entity issues a CR proposing the use of Class 1 or 
  2062. a CC accepting the use of Class 1  the following mechanisms must be 
  2063. available to deal with signalled errors during connection 
  2064. establishment:
  2065.  
  2066.         o  Reassignment after failure
  2067.         o  Retention until Acknowledgement of TPDUs
  2068.         o  Resynchronization
  2069.  
  2070.         If no DT or ED TPDU is to be sent, receipt of a CC should be
  2071. acknowledged.
  2072.  
  2073. 7.1.5   Data Transfer Phase
  2074.  
  2075.         Data transfer is accomplished using the 'TPDU  
  2076. transfer' 'Concatenation' and 'DT TPDU Length and Segmenting' 
  2077. mechanisms.  'DT TPDU Numbering' and 'Retention until 
  2078. Acknowledgement of TPDUs' are used in support of error recovery.
  2079.  
  2080. 7.1.5.1  Behaviour after an error
  2081.  
  2082.         After receiving a network reset, the Resynchronization
  2083. mechanism is invoked.  After receiving a network disconnect, the
  2084. 'Reassignment after Failure' mechanism is invoked after which the
  2085. 'Resynchronization' mechanism is invoked.
  2086.  
  2087.         The 'Spurious Disconnect' mechanism is used to 
  2088. deal with receipt of a DR TPDU for an unrecognised Transport 
  2089.  
  2090. ISO Transport Protocol Specification                                   Page 40
  2091. International Standards Organization
  2092.  
  2093.  
  2094. Connection.
  2095.  
  2096. 7.1.5.2  Procedure for Expedited Data Transfer
  2097.  
  2098.         The Expedited Data Transfer mechanism is used.  
  2099. Two methods are possible to provide the function:
  2100.  
  2101.         o  non network expedited variant
  2102.  
  2103.            Note: (1) This method is always included in this class.
  2104.  
  2105.            Note: (2) The EDTPDU-NR of the ED TPDU contains an
  2106. identification number.  This number must be different for successive ED TPDUs.
  2107. That is, when an ED TPDU has been sent and an EA TPDU for the ED 
  2108. TPDU has been received, the next ED TPDU must have a different value 
  2109. in the EDTPDU-NR field.  No other significance is attached to 
  2110. EDTPDU-NR field.  It is recommended but not essential, that the 
  2111. values used be consecutive modulo 128.
  2112.  
  2113.         o  network expedited variant
  2114.  
  2115.            Note: (1) The use of this method is 
  2116. determined through negotiation during transport connection 
  2117. establishment.
  2118.  
  2119. 7.1.6   Release Procedures
  2120.  
  2121.         The 'explicit' variant of the Release mechanism is used.
  2122.  
  2123.         Receipt of an error indication by a transport 
  2124. entity, which, prior to this event has sent a DR, causes this 
  2125. transport entity to retransmit DR.  Only DC and DR will be accepted 
  2126. and interpreted as the completion of the connection release 
  2127. sequence.  The related Reference will become unassigned.
  2128.  
  2129. 7.1.7   Treatment of Unknown TPDUs
  2130.  
  2131.         The 'Treatment of Protocol Errors' mechanism is used.
  2132.  
  2133. 7.1.8   Supported Options
  2134.  
  2135.         Use of network receipt confirmation.
  2136.  
  2137.         Use of network expedited.
  2138.  
  2139. 7.2     PROTOCOL DESCRIPTION OF CLASS 2: MULTIPLEXING CLASS
  2140.  
  2141. 7.2.1   Characteristics of Class 2
  2142.  
  2143.         The characteristic of this class is to provide a 
  2144.  
  2145. ISO Transport Protocol Specification                                   Page 41
  2146. International Standards Organization
  2147.  
  2148.  
  2149. way to multiplex several transport connections onto a single network 
  2150. connection.  This class has been designed to be used in association 
  2151. with type A network connections.
  2152.  
  2153.         Use of Explicit Flow Control
  2154.  
  2155.         The objective is to provide flow control to help 
  2156. avoid congestion at end-points and on the network connection.  
  2157. Typical use is when traffic is heavy and continuous, or when there 
  2158. is intensive multiplexing.  Use of flow control can optimize 
  2159. response times and resource utilization.
  2160.  
  2161.         Non Use of Explicit Flow Control (optional)
  2162.  
  2163.         The objective is to provide a basic transport 
  2164. connection with minimal overheads suitable when independence of 
  2165. transport and network connection lifetime is desirable.  The class 
  2166. would typically be used for unsophisticated terminals, and when no  
  2167. multiplexing onto network connections is required.  Expedited data 
  2168. is never available.
  2169.  
  2170. 7.2.2   Functions of Class 2
  2171.  
  2172.         Class 2 provides transport connections with or 
  2173. without individual flow control - no error detection or error 
  2174. recovery is provided.
  2175.  
  2176.         If the network resets or clears, the transport 
  2177. connection is terminated without the transport clearing sequence 
  2178. and the transport user is informed.
  2179.  
  2180.         When explicit flow control is used a credit 
  2181. mechanism is defined allowing the receiver to inform the sender of 
  2182. the exact amount of data he is willing to receive and expedited data 
  2183. transfer is available.
  2184.  
  2185. 7.2.3   Protocol Mechanisms of Class 2
  2186.  
  2187. 7.2.3.1  Connection Establishment Phase
  2188.  
  2189.         The connection establishment function shall be used.
  2190.  
  2191. 7.2.3.1.1  User Data in the Connection Phase
  2192.  
  2193.         Class 2 provides the possibility to convey data in the 
  2194. connection request and confirm commands.
  2195.  
  2196. 7.2.3.2  Connection Identification
  2197.  
  2198.         In Class 2 each TPDU conveys a Destination Reference.  
  2199.  
  2200. ISO Transport Protocol Specification                                   Page 42
  2201. International Standards Organization
  2202.  
  2203.  
  2204. This uniquely identifies the transport connection within the 
  2205. receiving transport entity and thus allows multiplexing.
  2206.  
  2207. 7.2.3.3  Release Phase
  2208.  
  2209.         The release of a transport connection results either 
  2210. from the use of the 'explicit' variant of the release function or  
  2211. from the Implicit Termination function.
  2212.  
  2213. 7.2.3.4  Protocol Mechanisms when Explicit Flow Control is used.
  2214.  
  2215.         The following mechanisms are provided:
  2216.  
  2217. 7.2.3.4.1  Numbering of Data TPDU
  2218.  
  2219.         Each Data TPDU transmitted between transport entities 
  2220. for each direction of transmission in a transport connection is 
  2221. sequentially numbered.
  2222.  
  2223.         Each Data TPDU contains a Send Sequence Number T(S).
  2224.  
  2225. 7.2.3.4.2  Flow Control Principles
  2226.  
  2227.         The receiver of data TPDUs holds a count of the sequence
  2228. number of the next expected TPDU.  This count is called the 
  2229. Receive Sequence Number, T(R). The receiver indicated to the sender
  2230. the number of Data TPDUs he is ready to receive by means of a 'credit'
  2231. mechanism.  Credits are given using the credit field in the AK TPDU.
  2232. The value of the credit field, in conjunction with the value of T(R) 
  2233. transported by the YR-TU-NR (your TPDU number) field
  2234. of the AK TPDU, is used by the receiver of the AK TPDU to determine
  2235. whether and how many Data TPDUs may be accepted by the sender of the
  2236. AK TPDU. Precise definition of flow control principles appears in Section 
  2237. 7.2.5.5.3.
  2238.  
  2239. 7.2.3.4.3  Expedited Flow
  2240.  
  2241.         The non network expedited variant is used.  Normal 
  2242. flow is the flow of data subject to the flow control mechanism, 
  2243. expedited flow is the flow of data that the sender may send without 
  2244. explicit agreement of the receiver.  This expedited flow has a 
  2245. limited capability and could for example be used to carry session 
  2246. supervisory commands.
  2247.  
  2248.         The number of expedited data units outstanding at any 
  2249. time is limited to one and the amount of TS-user data is limited (up 
  2250. to 16 octets).
  2251.  
  2252.         An expedited data may arrive before normal data which 
  2253. was submitted earlier.  Normal data submitted after the expedited 
  2254.  
  2255. ISO Transport Protocol Specification                                   Page 43
  2256. International Standards Organization
  2257.  
  2258.  
  2259. data will arrive after the expedited data.
  2260.  
  2261. 7.2.4   Connection Establishment Procedures for Class 2
  2262.  
  2263. 7.2.4.1  References
  2264.  
  2265.         See Section 6.5 for reference assignment.  Receipt of 
  2266. any TPDU with a reference that is not assigned to a transport 
  2267. connection other than a Disconnect Request (DR) or Connection 
  2268. Request (CR) will be ignored.
  2269.  
  2270.         Receipt of a Disconnect Request (DR) for an unassigned
  2271. Reference will result in a Disconnect Confirm (DC) response.
  2272.  
  2273. 7.2.4.2  Connection Eastablishment
  2274.  
  2275.         This phase is achieved by exchange of CR/CC TPDU using 
  2276. the 'connection establishment' function.  Since the multiplexing 
  2277. function is in use, then more than one transport connection may be 
  2278. assigned to the same network connection concurrently.  The 
  2279. restrictions of Class 0 does not apply to this class and the other 
  2280. higher classes.
  2281.  
  2282. 7.2.5   Data Transfer Procedures for Class 2
  2283.  
  2284.         The data transfer procedures described in the 
  2285. following section apply independently to each transport connection 
  2286. existing between two transport entities.
  2287.  
  2288. 7.2.5.1  TPDU Maximum Length and Segmenting
  2289.  
  2290.         The general rules defined in Section 6.3 apply.
  2291.  
  2292. 7.2.5.2  Concatenation
  2293.  
  2294.         The general rules defined in Section 6.4 apply.
  2295.  
  2296. 7.2.5.3  Sending Data TPDU (No Explicit Flow Control Option)
  2297.  
  2298.         In this case the data TPDU is built in accordance 
  2299. with the rules stated in Section 6.2 and 6.3 and sent without any 
  2300. additional mechanisms.  Thus, the DT TPDU NR field may take any 
  2301. value and no AK TPDU is used.
  2302.  
  2303. 7.2.5.4  Sending Data TPDU (When Explicit Flow Control is Used)
  2304.  
  2305.         On each transport connection the transmission of Data 
  2306. TPDUs is controlled separately for each direction and is based on 
  2307. authorization from the receiver.
  2308.  
  2309.  
  2310. ISO Transport Protocol Specification                                   Page 44
  2311. International Standards Organization
  2312.  
  2313.  
  2314.         This authorization is provided through the use of 
  2315. the TPDUs Credit field.  Credit field values are only present in 
  2316. the following TPDUs:  CR, CC, AK..
  2317.  
  2318. 7.2.5.4.1  Numbering of Data TPDUs
  2319.  
  2320.         Each Data TPDU transmitted between transport entities, 
  2321. for each direction of transmission in a transport connection, is 
  2322. sequentially numbered.
  2323.  
  2324.         The sender of Data TPDUs holds a count of the next 
  2325. TPDU to be sent.  This count is called the Send Sequence Number
  2326. T(S).  The sender indicates to the receiver the number of the data 
  2327. TPDU he sends by putting the current T(S) value into the TPDU-NR 
  2328. field of the data TPDU.
  2329.  
  2330.         Sequence numbering is performed modulo 2**n, where n 
  2331. is the number of bits of the sequence number field.  The T(S) 
  2332. counter cycles through the entire range 0 to (2**n)-1.
  2333.  
  2334.         At connection establishment time both Transport 
  2335. entities initialize their T(S) and T(R) counts to zero (i.e. the 
  2336. first Data TPDU to be transmitted between transport entities for a 
  2337. given direction of data transmission after the connection 
  2338. establishment has a TPDU-NR field set to zero).
  2339.  
  2340.         Receipt of a Data TPDU whose TPDU-NR field is not 
  2341. equal to the expected value T(R), is to be regarded as a protocol 
  2342. error.
  2343.  
  2344.         Operations described above are summarized as follows:
  2345.  
  2346.         o  initalization
  2347.  
  2348.            T(S) = 0     T(R) = 0
  2349.  
  2350.                Sending of Data TPDU
  2351.                          put T(S) into the TPDU-NR field of 
  2352.                          the Data TPDU to be sent
  2353.  
  2354.                          T(S) = (T(S) + 1) (modulo 2**n)
  2355.  
  2356.                Receiving of Data TPDU
  2357.  
  2358.                          TPDU-NR field of the received data 
  2359.                          TPDU which is not equal to T(R) is 
  2360.                          a protocol error.
  2361.  
  2362.                          T(R) = (T(R) + 1) (modulo 2**n)
  2363.  
  2364.  
  2365. ISO Transport Protocol Specification                                   Page 45
  2366. International Standards Organization
  2367.  
  2368.  
  2369. 7.2.5.4.2  Window Definition
  2370.  
  2371.         For each transport connection and for each direction 
  2372. of data transmission a 'transmit window' is defined as the (possibly 
  2373. null) ordered set of consecutive data TPDUs authorized to be 
  2374. transmitted in that direction.  At any given time, the lowest 
  2375. sequence number of a data TPDU which a transport entity is 
  2376. authorized to transmit is referred to as the 'lowest window edge'.  
  2377. The 'upper window edge' is calculated  by adding the credit 
  2378. allocation, given by the value of the Credit (CDT) field contained 
  2379. in a received TPDU, to the lower window edge.  Note that a transport 
  2380. entity is authorized to send data TPDUs with sequence numbers up to 
  2381. but not including the upper window edge.
  2382.  
  2383. 7.2.5.4.3  Flow Control
  2384.  
  2385.         Flow control is performed as follows:
  2386.  
  2387.         o  initialization time
  2388.  
  2389.            Lower window edge = 0
  2390.  
  2391.            Upper window edge = N (Credit received either in
  2392.            CR or in CC and N < 2**p < 2** (n-1), where P is the number of 
  2393.            bits in credit field of CR and CC.
  2394.  
  2395.         o  Sending of a Data TPDU
  2396.  
  2397.            Send data TPDUs while T(S) is less than the upper window
  2398.            edge.  If T(S) equals the upper window edge then wait for 
  2399.            additional credit before sending.
  2400.  
  2401.         o  Reception of Data TPDU (with TPDU NR = T(R)
  2402.  
  2403.            If T(R) is greater than or equal to the upper window edge
  2404.            authorized to the sending transport entity, then the receiving
  2405.            transport entity shall use the Treatment of Protocol Errors 
  2406.            function.  Otherwise T(R) shall be incremented.
  2407.  
  2408.            Sending Credit
  2409.  
  2410.                     Send AK TPDU with YR-TU-NR = T(R) and Credit equals N.
  2411.                     (Where N = number of additional data 
  2412.                     TPDUs the entity is prepared to receive.)
  2413.  
  2414.            Receiving Credit in AK.
  2415.  
  2416.                     Lower window edge = YR-TU-NR received.
  2417.  
  2418.                     Upper window edge =  Lower window edge + N.
  2419.  
  2420. ISO Transport Protocol Specification                                   Page 46
  2421. International Standards Organization
  2422.  
  2423.  
  2424. 7.2.5.4.4  Reducing the Upper Window Edge
  2425.  
  2426.         The value of the upper window edge cannot be decreased 
  2427. in this class.  If, at a certain point of time, the upper window edge 
  2428. value is U, the reception of an AK TPDU having YR-TU-NR = M and CDT 
  2429. = N such that:
  2430.  
  2431.         (U-M) (mod. 2**n) > N
  2432.  
  2433. is a protocol error
  2434.  
  2435.         Provided the previous statements are respected, CDT 
  2436. field may take any value including zero.
  2437.  
  2438. 7.2.5.4.5  Procedure for Expedited Data Transfer
  2439.  
  2440.         The procedure of expedited data transfer allows a 
  2441. transport entity to transmit data to the remote transport entity 
  2442. without following the flow control procedure of the normal data 
  2443. flow.  This procedure can only apply in the transfer phase.
  2444.  
  2445.         The expedited procedure has no effect on the transfer 
  2446. and flow control applying to normal Data TPDUs.
  2447.  
  2448.         To transmit expedited data, the transport entity sends 
  2449. an expedited data TPDU (ED TPDU).  The size of a data field is 
  2450. limited (up to 16 octets).  The data field contains a complete ED 
  2451. TSDU.  The remote transport will then confirm the receipt of the ED 
  2452. TPDU by transmitting an expedited TPDU acknowledgement (EA TPDU).  
  2453. A transport entity can send another ED TPDU only after having 
  2454. received an EA TPDU for the previously transmitted ED TPDU.  In 
  2455. class 2 the ED TPDU NR field of the ED and YR-TU-NR field of the EA 
  2456. TPDU are not defined and may take any value.
  2457.  
  2458. 7.2.6   Release Procedures for Class 2
  2459.  
  2460.         The data phase ends after a transport entity has sent 
  2461. or received a Disconnect Request (DR).  The transport entity will 
  2462. ignore any incoming TPDU except DC or DR.
  2463.  
  2464.         If the network resets or clears the network 
  2465. connection, all transport connections are terminated without the 
  2466. transport clearing sequence.  The References become frozen.
  2467.  
  2468.         For Class 2 the explicit variant of the 'release' 
  2469. mechanism is used, enabling transport connections to be cleared 
  2470. independently of the underlying network connection.
  2471.  
  2472. 7.2.7   Treatment of Invalid TPDUs
  2473.  
  2474.  
  2475. ISO Transport Protocol Specification                                   Page 47
  2476. International Standards Organization
  2477.  
  2478.  
  2479.         The 'Treatment of Protocol Error' mechanism in Section 
  2480. 6.23 is used.
  2481.  
  2482. 7.2.8   Behaviour after an Error signalled by the Network Layer.
  2483.  
  2484.         The implicit termination mechanism is used.
  2485.  
  2486. 7.2.9   Supported Options
  2487.  
  2488.         Non use of explicit flow control.
  2489.         Extended formats.
  2490.  
  2491. 7.3     PROTOCOL DESCRIPTION OF CLASS 3: ERROR RECOVERY AND MULTIPLEXING CLASS
  2492.  
  2493. 7.3.1   Characteristics of Class 3
  2494.  
  2495.         The characteristics of Class 3 in addition to those of 
  2496. Class 2 is to mask errors indicated by the network.  Selection of 
  2497. this class is usually based upon reliability criteria.  Class 3 has 
  2498. been designed to be used in association with type B network connections.
  2499.  
  2500. 7.3.2   Functions of Class 3
  2501.  
  2502.         This class provides the functionality of Class 2 (with 
  2503. use of explicit flow control) plus the ability to recover after a 
  2504. failure signalled by the Network Layer without involving the user 
  2505. of the transport service.
  2506.  
  2507.         The mechanisms used to achieve this functionality also 
  2508. allow the implementation of more flexible flow control.
  2509.  
  2510. 7.3.3   Protocol Mechanisms of Class 3
  2511.  
  2512.         Class 3 mechanisms include Class 2 (with use of 
  2513. explicit flow control option) mechanisms and the ability to recover 
  2514. after a failure signalled by the network without informing the user 
  2515. of the transport connection.
  2516.  
  2517. 7.3.3.1  Error Recovery Principles
  2518.  
  2519.         The sending transport entity keeps a copy of 
  2520. transmitted Data TPDUs and ED TPDUs until it receives a positive 
  2521. aknowledgement which allows copies to be released.  It may also 
  2522. receive an RJ command inviting it to retransmit or transmit all Data 
  2523. TPDUs, if any, from the point in the sequence indicated in the  RJ 
  2524. command.
  2525.  
  2526.         This is especially the case, when a failure is 
  2527. indicated by the network.  The transport entity sends an RJ command 
  2528. in order to indicate the sequence number of the next expected TPDU.
  2529.  
  2530. ISO Transport Protocol Specification                                   Page 48
  2531. International Standards Organization
  2532.  
  2533.  
  2534.         Error recovery for ED TPDU is achieved by retransmission
  2535. (see 7.3.5.3).  
  2536.  
  2537. 7.3.3.2  Relationship between Flow Control and Error Recovery
  2538.  
  2539.         Acknowledgement is performed by use of the T(R) count.          A
  2540.  credit is associated with this acknowledgement which may
  2541. be equal to or greater than zero.  Thus it is possible to acknowledge
  2542. data without giving the right to send new data.  
  2543.  
  2544.         Credit may be reduced, by the use of the RJ TPDU.  
  2545.  
  2546. 7.3.4   Connection Establishment Procedure for Class 3
  2547.  
  2548.         The rules for Class 2 (with use of explicit flow 
  2549. control) apply with the addition of the following rules which apply 
  2550. on receipt of an eror indication from the Network layer.
  2551.  
  2552.         o  Reception of an error indication by a 
  2553.            transport entity which, prior to this event, has 
  2554.            sent a CR and has not yer received a CC, causes 
  2555.            the transport entity to retransmit CR.
  2556.  
  2557.         o  Reception of an error indication by a 
  2558.            transport entity to wait for reception of CR, RJ 
  2559.            or DR TPDU.  In this case:
  2560.  
  2561.            - Reception of CR will cause the transport 
  2562.              entity to retransmit CC.
  2563.  
  2564.            - Reception of RJ will cause the transport 
  2565.              entity to transmit an RJ with a YR-TU-NR 
  2566.              equal to zero and enter the data phase.
  2567.  
  2568.            - Reception of a DR will cause termination 
  2569.              of the transport connection as for Classes 1 
  2570.              and 2 (see 7.1.4).
  2571.  
  2572. 7.3.5   Data Transfer Procedures for Class 3
  2573.  
  2574. 7.3.5.1  Acknowledgement
  2575.  
  2576.         The 'AK' variant of the Retention until 
  2577. Acknowledgement of TPDUs function is used.
  2578.  
  2579. 7.3.5.2  Retransmission Procedure
  2580.  
  2581.         TPDU retransmission is a procedure which allows 
  2582. a transport entity to request retransmission of one or several 
  2583. consecutive Data TPDUs from the remote transport entity.  A 
  2584.  
  2585. ISO Transport Protocol Specification                                   Page 49
  2586. International Standards Organization
  2587.  
  2588.  
  2589. transport reject condition is signalled to the remote transport 
  2590. entity by transmission of an RJ TPDU whose YR-TU-NR field indicates 
  2591. the sequence number of the next expected Data TPDU.
  2592.  
  2593.         On receipt of a RJ TPDU, a Transport entity shall 
  2594. accept credit to the value contained in the credit field and shall 
  2595. re-transmit TPDUs, starting with the one whose number is specified in 
  2596. the YR-TU-NR field of the received RJ TPDU, subject to the new 
  2597. credit.
  2598.  
  2599.         The transport entity shall not specify a T(R) in the 
  2600. RJ TPDU less than that which has previously been acknowledged.  
  2601. Receipt of an RJ TPDU with a T(R) which has been previously
  2602. acknowledged will be considered a protocol error.
  2603.  
  2604.         Additional DT TPDUs pending initial transmission may 
  2605. follow the retransmitted DT TPDU(s) if the window is not closed.
  2606.  
  2607. 7.3.5.3  Reducing the upper window edge
  2608.  
  2609.         It is possible to decrease the value of the upper 
  2610. window edge down to the sequence number transported by YR-TU-NR 
  2611. field of the RJ TPDU.  Receipt of an DT TPDU which would have been 
  2612. inside the window before the reduction is not a protocol error and 
  2613. this TPDU may be discarded.
  2614.  
  2615.         Note:  In such a case the credit equal to zero  
  2616. achieves the effect of a Receive not Ready Condition.
  2617.  
  2618. 7.3.5.4  Behaviour after an error signalled by the network layer
  2619.  
  2620.         After receiving an error indication from the Network 
  2621. Service, the transport entity shall tranmit to the remove entity an 
  2622. RJ TPDU with YR-TU-NR field indicating the sequence number of the 
  2623. next expected Data TPDU.
  2624.  
  2625. 7.3.5.5  Procedure for Expedited Data Transfer
  2626.  
  2627.         In Class 3, the ED TPDU-NR field of the Expedited 
  2628. Data (ED) TPDU contains an identification number.  This number must 
  2629. be different for successive ED TPDUs.  That is, when an ED TPDU has 
  2630. been sent and an EA TPDU for the ED TPDU has been received, the next 
  2631. ED TPDU must have a different value in the NR field of the ED 
  2632. TPDU.  No other significance is attached to this field.  It is 
  2633. recommended, however, that the values used be consecutive modulo 
  2634. 2**n.  When a transport entity receives an ED TPDU for a transport 
  2635. connection, it shall respond by transmitting an expedited 
  2636. acknowledgement (EA) TPDU.
  2637.  
  2638.         It places in the YR-TU-NR field the value contained in 
  2639.  
  2640. ISO Transport Protocol Specification                                   Page 50
  2641. International Standards Organization
  2642.  
  2643.  
  2644. the NR field of the received ED TPDU.  If, and only if, this value 
  2645. is different from the NR field of the previously received ED TPDU, 
  2646. the data contained in the TPDU is to be passed to the session entity.
  2647.  
  2648.         If an error indication from the Network layer is 
  2649. received before the receipt of the expected Expedited Acknowledgement 
  2650. (EA) TPDU, the transport entity shall retransmit the ED TPDU with 
  2651. the same value in the NR field.  By the rule described in the 
  2652. previous paragraph, the session entity does not receive data 
  2653. corresponding to the same expedited TPDU more than once.
  2654.  
  2655. 7.3.6   Release Procedures for Class 3
  2656.  
  2657.         The rules for Class 2 apply with the addition of the  
  2658. following rule:
  2659.  
  2660.         Receipt of an eror indication by a transport entity, 
  2661. which prior to this event has sent a DR, causes this transport 
  2662. entity to retransmit DR.  Only DC and DR will be accepted and 
  2663. interpreted as the completion of the connection clearing sequence.  
  2664. The related Reference will become unassigned.
  2665.  
  2666. 7.3.7   Treatment of Invalid TPDUs
  2667.  
  2668.         The 'Treatment of Protocol Errors' mechanism is used.
  2669.  
  2670. 7.3.8   Supported Options
  2671.  
  2672.         Extended formats.
  2673.  
  2674. 7.4     PROTOCOL DESCRIPTION OF CLASS 4: ERROR DETECTION AND RECOVERY CLASS
  2675.  
  2676. 7.4.1   Characteristics of Class 4
  2677.  
  2678.         The characteristic of Class 4, in addition to those of 
  2679. Class 3, is the detection of errors which occur as a result of the 
  2680. low grade of service available from the network layer.  The kinds of 
  2681. errors to be detected include:  TPDU loss, TPDU delivery out of 
  2682. sequence, TPDU duplication.  These errors may afect control TPDUs as 
  2683. well as Data TPDUs.
  2684.  
  2685.         Class 4 has been designed to be usd in association 
  2686. with network connections of type C.
  2687.  
  2688. 7.4.2   Functions of Class 4
  2689.  
  2690.         This class provides the functionality of Class 3, plus 
  2691. the ability to detect and recover from lost, duplicated or out of 
  2692. sequence TPDUs without involving the user of the transport service.
  2693.  
  2694.  
  2695. ISO Transport Protocol Specification                                   Page 51
  2696. International Standards Organization
  2697.  
  2698.  
  2699.         This detection of errors is made by extended use of 
  2700. the sequence numbering of Classes 2 and 3, by a timeout mechanism, 
  2701. and by additional protocol mechanisms.
  2702.  
  2703.         This class additionally detects and recovers from 
  2704. damaged TPDUs by using a checksum mechamism.  The use of the 
  2705. checksum mechanism must be available but its use or its non use is 
  2706. subject to negotiation.  Class 4 does not attempt to deal with 
  2707. detection of errors due to the misdelivery of TPDUs.
  2708.  
  2709. 7.4.3   Protocol Mechanisms of Class 4
  2710.  
  2711. 7.4.3.1  Network Service Data Unit Lifetime
  2712.  
  2713.         The network layer is assumed to provide, as an aspect 
  2714. of its grade of service, for a bound on the maximum lifetime of 
  2715. NSDUs in the network.  This value is known by the Transport Layer.  
  2716. The maximum time which may elapse between the transmission of an 
  2717. NSDU into the network layer and the receipt of any copy of it is 
  2718. referred to as M.
  2719.  
  2720. 7.4.3.2  Average Transit Delay
  2721.  
  2722.         It is assumed that there is some value of transmit 
  2723. delay in the network, typically much less than M, which will be the 
  2724. maximum delay suffered by all but a small proportion of NSDUs.  This  
  2725. value is referred to as E.
  2726.  
  2727. 7.4.3.3  Remote Acknowledge Time Assumptions
  2728.  
  2729.         Any transport entity is assumed to provide a bound for the 
  2730. maximum time which can elapse between its receipt of a TPDU from
  2731. the Network Layer and its transmisssion of the Corresponding response.
  2732. this value is referred to as A/L.  The corresponding time given by the 
  2733. remote transport entity is referred to as A/R.  The values for these
  2734. timers may be conventionally established or may be established
  2735. at connection establishment time.  
  2736.  
  2737. 7.4.3.4  Local Retransmission Time
  2738.  
  2739.         The local transport entity is assumed to maintain a 
  2740. bound on the time it will wait for an acknowledgement before 
  2741. retransmitting the TPDU.  This time is the local retransmission time 
  2742. and is referred to as T1.
  2743.  
  2744.                   T1 = 2*E +  X  + Ar?
  2745.  
  2746.              Where X is a value to allow for TPDU processing in the 
  2747. local transport entity.
  2748.  
  2749.  
  2750. ISO Transport Protocol Specification                                   Page 52
  2751. International Standards Organization
  2752.  
  2753.  
  2754. 7.4.3.5  Persistence Time
  2755.  
  2756.         The local transport entity is assumed to provide a 
  2757. bound for the maximum time for which it may continue to retransmit 
  2758. a TPDU requiring positive acknowledgment.  This value is referred to 
  2759. as R.
  2760.  
  2761.         The value is clearly related to the time elapsed 
  2762. between retransmission, T1, and the maximum number of 
  2763. retransmissions, N.  It is not less than T1*N+X, where X is small 
  2764. quantity to allow for additional internal delays, the granularity of 
  2765. the mechanism used to implement T1 and so on.  Because R is a bound, 
  2766. the exact value of X is unimportant as long as it is bounded and 
  2767. the value of a bound is known.
  2768.  
  2769. 7.4.3.6  Bound on Reference Identifier and Sequence Numbers
  2770.  
  2771.         Using the above values, a bound L may be established 
  2772. for the maximum time between the decision to transmit a TPDU and the 
  2773. receipt of any response relating to it.  The value of L is given by:
  2774.  
  2775.                   L = 2*M+R+Ar
  2776.  
  2777.         It is necessary to wait for a period L before reusing 
  2778. any reference or sequence number, to avoid confusion in case a TPDU 
  2779. referring to it may be duplicated or delayed.
  2780.  
  2781.         (Note:  In practive, the value of L may be 
  2782. unacceptably large.  It may also be only a statistical figure at a 
  2783. certain confidence level.  A smaller value may therefore be used 
  2784. where this still allows the required quality of service to be 
  2785. provided).
  2786.  
  2787. 7.4.3.7  Inactivity Time
  2788.  
  2789.         To protect against unsignalled breaks in the network 
  2790. connection (Half-open connections), each transport entity maintains 
  2791. an inactivity time interval.   If the interval passes without 
  2792. receipt of some TPDU, the transport entity will terminate the TC by 
  2793. making use of the release procedure.  This interval is referred to 
  2794. as I.
  2795.  
  2796. 7.4.3.8  Window Time
  2797.  
  2798.         A transport entity maintains a time to ensure that 
  2799. there is a maximum interval between transmission of up-to-date 
  2800. window information.  This interval is referred to as the window 
  2801. time, W.
  2802.  
  2803. 7.4.3.9  Class 4 Error Recovery Principles
  2804.  
  2805. ISO Transport Protocol Specification                                   Page 53
  2806. International Standards Organization
  2807.  
  2808.  
  2809.         In class 4, the transport entity associates a response time
  2810. with TPDUs sent requiring a response.  If an appropriate response is 
  2811. not received within time T1, the recovery procedure must be invoked
  2812. by the sender.  This will usually involve the retransmission of the 
  2813. corresponding TPDU.  
  2814.  
  2815.         A TPDU may be transmitted a maximum number of times,  
  2816. This number is referred to a N.  The value of N is chosen so that 
  2817. the required quality of service can be provided given the known 
  2818. characteristics of the network connection.
  2819.  
  2820. 7.4.3.10  Relationship of Times and Intervals
  2821.  
  2822.         The following note describes the relationship between 
  2823. the time described in Section 7.4.3.1 - 7.4.3.9.
  2824.  
  2825.         Note:
  2826.  
  2827.              a.   The interrelationship of times for the worst case 
  2828.                   is as follows:
  2829.  
  2830.                   M:   maximum transit delay of the network (see 
  2831.                        7.4.3.1)
  2832.  
  2833.                   Ar  maximum acknowledgement time of the remote 
  2834.                        transport entity (see 7.4.3.3)
  2835.  
  2836.                   R:   maximum local retransmission time (see 
  2837.                        7.4.3.5)
  2838.  
  2839.                   N:   maximum number of transmission for a single 
  2840.                        TPDU (see 7.4.3.9)
  2841.  
  2842.                   L:   maximum time for a TPDU to be valid (see 
  2843.                        7.4.3.6)
  2844.  
  2845.                                              R = T * (N-1)
  2846.                                                   1
  2847.  
  2848.                             R
  2849.                              
  2850.                             *
  2851.                             M
  2852.              L              *
  2853.  
  2854.                             A                =2*M  +  A   + R
  2855.                              R                         R
  2856.  
  2857.                             *
  2858.                             M
  2859.  
  2860. ISO Transport Protocol Specification                                   Page 54
  2861. International Standards Organization
  2862.  
  2863.  
  2864.                                          
  2865.                                  t      t
  2866.  
  2867.              b.   The interrelationship of times for the average 
  2868.                   case is as follows (see 7.4.3.4)
  2869.  
  2870.                   E:        average transit delay for the network 
  2871.                             (E<<M)
  2872.  
  2873.                   X:        TPDU processing time
  2874.  
  2875.                   T :       average time from sending a TPDU until 
  2876.                    1        the receipt of its acknowledgement (see 
  2877.                             7.4.3.4)
  2878.  
  2879.                   A :       maximum acknowledgement time of the 
  2880.                    R        remote transport entity (see 7.4.3.3)
  2881.  
  2882.                          X
  2883.  
  2884.                          E
  2885.  
  2886.                          A         T  = 2*E + X + A
  2887.                           R         1              R
  2888.  
  2889.                          E
  2890. t                t
  2891.  
  2892. 7.4.3.11  Sequence Numbering
  2893.  
  2894.         In Class 4 sequence numbering is applied to certain 
  2895. control TPDUs and their acknowledgements, as well as to DT TPDUs.  
  2896. These are ED and its acknowledgement EA.
  2897.  
  2898.         The length of sequence numbers may be negotiated at 
  2899. connection establishment.  Where other than the default length is 
  2900. used, an extended header format is used for sequenced TPDUs 
  2901. containing additional octets of sequence numbers.  Extended header 
  2902. format includes a credit field on the appropriate TPDU types 
  2903. allowing extended credit allocation.
  2904.  
  2905. 7.4.4   Procedures for Connection Establishment Phase
  2906.  
  2907.         The following features pertain to connection 
  2908. establishment for Class 4:
  2909.  
  2910.         o  In Class 4, a connection is not considered 
  2911.            established until the successful completion 
  2912.            of a 3-way TPDU exchange.  The sender of a 
  2913.            CR TPDU must respond to the corresponding CC 
  2914.  
  2915. ISO Transport Protocol Specification                                   Page 55
  2916. International Standards Organization
  2917.  
  2918.  
  2919.            TPDU by immediately sending a DT, ED or AK TPDU.
  2920.  
  2921.         o  As a result of duplication, a CR TPDU may be 
  2922.            received specifying a source reference which 
  2923.            is already in use with the sending transport 
  2924.            entity.  If the receiving transport entity 
  2925.            is in the data transfer phase, having 
  2926.            completed the 3-way TPDU exchange procedure, 
  2927.            the receiving transport entity should ignore 
  2928.            such a TPDU.  Otherwise a CC TPDU should be 
  2929.            transmitted.
  2930.  
  2931.         o  As a result of duplication or 
  2932.            retransmission, a CC TPDU may be received 
  2933.            specifying a paired reference which is 
  2934.            already in use.  The receiving transport 
  2935.            entity should ignore such a CC TPDU.
  2936.  
  2937.         o  A CC TPDU may be received specifying a 
  2938.            reference which is in the frozen state.  The 
  2939.            response to such a TPDU should be a DR TPDU.
  2940.  
  2941. 7.4.4.1  Connection Request
  2942.  
  2943.         When a transport entity transmits a CR TPDU it starts 
  2944. timer T1.  If this timer expires before a CC TPDU is received, the 
  2945. CR TPDU is retransmitted and the timer restarted.  After 
  2946. transmission of the CR TPDU N times, the connection establishment 
  2947. procedure is abandoned and the failure reported to the transport 
  2948. user.  The reference must be placed in the frozen state for a period 
  2949. L (see section 7.4.3.6).
  2950.  
  2951. 7.4.4.2  Incomimg Connection Request
  2952.  
  2953.         An incoming connection request is processed as for Class 3
  2954.  
  2955. 7.4.4.3  Connection Confirm
  2956.  
  2957.         When a transport entity transmits a CC TPDU it starts 
  2958. timer T1.  If this timer expires before an AK or DT TPDU is 
  2959. received, the CC TPDU is retransmitted according to the 
  2960. retransmission principles in Section 7.4.3.9
  2961.  
  2962. 7.4.4.4  Incoming Connection Confirm
  2963.  
  2964.         When a CC TPDU is received, the receiving transport entity
  2965. enters the data transfer phase.  It must immediately transmit an
  2966. AK, ED or DT TPDU to complete the 3-way TPDU exchange.  The
  2967. CC TPDU is subject to the usual rules of the data transfer phase
  2968. regarding retransmission, see Section 7.4.5.3.  
  2969.  
  2970. ISO Transport Protocol Specification                                   Page 56
  2971. International Standards Organization
  2972.  
  2973.  
  2974. 7.4.4.5  Incoming Acknowledgement
  2975.  
  2976.         When an AK, DT or ED TPDU is received the receiving 
  2977. transport entity can enter the data transfer phase.  If the entity 
  2978. has data to send it may send DT TPDUs or an ED TPDU.  The DT TPDUs 
  2979. are subject to flow control.  Otherwise, the transport entity must 
  2980. obey the inactivity principles (see Section 7.4.5.8).
  2981.  
  2982. 7.4.4.6  Unsuccessful Connection
  2983.  
  2984.         When a DR TPDU is received in response to a CR TPDU, 
  2985. the timer T1 is cancelled and the reference placed in the frozen 
  2986. state for a period L (see Section 7.4.6.1).
  2987.  
  2988. 7.4.4.7  Initial Credit Allocation
  2989.  
  2990.         The CR and CC TPDUs may allocate an initial credit value 
  2991. to their respective recipients.  This value is limited to 15 by the 
  2992. encoding of the TPDU.  Where the extended header format is in use, 
  2993. credit values greater than 15 must be allocated using AK TPDUs.
  2994.  
  2995. 7.4.4.8  Exchange of Acknowledge Time
  2996.  
  2997.         A transport entity may transmit the value it intends 
  2998. to use for AL at connection establishment, as the 'Acknowledge 
  2999. Time' parameter in the CR or CC TPDU (depending on whether the 
  3000. transport entity is initiating or accepting the transport 
  3001. connection).  If this parameter is present in a received CR or CC 
  3002. TPDU, the value of AR should be set accordingly.  If this 
  3003. parameter is not present, AR may be assumed to be insignificant in 
  3004. comparison to E the typical maximum transit delay.
  3005.  
  3006. 7.4.5   Procedure for Data Transfer Phase
  3007.  
  3008. 7.4.5.1  Sequence Control
  3009.  
  3010.         The receiving transport entity is responsible for 
  3011. maintaining the proper sequence of DT TPDUs.
  3012.  
  3013.         DT TPDUs received out of sequence must not be 
  3014. delivered to the TS-user until in-sequence TPDUs have also been 
  3015. received.
  3016.  
  3017.         AK TPDUs also contain information allowing the 
  3018. receiving transport entity to process them in the correct order.
  3019.  
  3020. 7.4.5.2  Duplicate DT TPDUs
  3021.  
  3022.         Duplicate TPDUs can be detected because the T(S) value 
  3023. matches that of previously received TPDUs.  T(S) values must not be 
  3024.  
  3025. ISO Transport Protocol Specification                                   Page 57
  3026. International Standards Organization
  3027.  
  3028.  
  3029. reused for the period L after their previous use.  Otherwise, a  
  3030. new, valid TPDU could be confused with a duplicated TPDU which had 
  3031. previously been received and acknowledged.
  3032.  
  3033.         Duplicated DT TPDUs must be acknowledged, since the 
  3034. duplicated TPDU may be the result of a retransmission resulting from 
  3035. the loss of an AK TPDU.
  3036.  
  3037.         The data contained in a duplicated DT TPDU should be
  3038. ignored.
  3039.  
  3040. 7.4.5.3  Retransmission Principles
  3041.  
  3042.         When a transport entity has some outstanding DT or ED 
  3043. TPDUs that require acknowledgement, it will check that no T1 
  3044. interval elapses without the arrival of an AK or EA TPDU that 
  3045. acknowledges one of them.  If the timer expires, the first TPDU is 
  3046. retransmitted and the timer is restarted.  After N transmissions 
  3047. (N-1 retransmissions) the connection is assumed to have failed and 
  3048. the release phase is entered, and the transport user is informed.
  3049.  
  3050.         DT TPDUs which fall beyond the current window (due to 
  3051. reduction of the upper window edge) are not retransmitted until 
  3052. advancement of the upper window edge so permits.
  3053.  
  3054.      Note:     This requirement can be met by different 
  3055.                        means, for example.
  3056.  
  3057.              1.   One timer is associated with each TPDU.  If the 
  3058.                   timer expires, the associated TPDU will be 
  3059.                   retransmitted, and the timer T1 will be 
  3060.                   restarted for all subsequent DT TPDUs.
  3061.  
  3062.              2.   One timer is associated with each TC:
  3063.  
  3064.                   if the transport entity transmits a DT TPDU 
  3065.                   requiring acknowledgement, it starts timer 
  3066.                   T1,
  3067.  
  3068.                   if the transport entity receives a TPDU that 
  3069.                   acknowledges one of the TPDUs to be 
  3070.                   acknowledged, timer T1 is restarted,
  3071.  
  3072.                   if the transport entity receives a TPDU that 
  3073.                   acknowledges the last TPDU to be 
  3074.                   acknowledged, timer T1 is stopped.
  3075.  
  3076.         For the decision whether the retransmission timer T1 
  3077. is maintained on a per TPDU or on a per TC basis, throughput 
  3078. considerations have to be taken into account.
  3079.  
  3080. ISO Transport Protocol Specification                                   Page 58
  3081. International Standards Organization
  3082.  
  3083.  
  3084. 7.4.5.4  Acknowledgement Principles
  3085.  
  3086.         A transport entity operating class 4 must acknowledge 
  3087. all TPDUs received requiring acknowledgment.  To avoid unnecessary 
  3088. retransmissions and to avoid delays to transmission by the remote 
  3089. transport entity, the delay for acknowledgement should not exceed 
  3090. timer A  (see Section 7.4.3.2).
  3091.        L
  3092.  
  3093.         There are two TPDU types that must be acknowledged:  
  3094. ED and DT.  Receipt of an ED TPDU must be acknowledged by an EA 
  3095. TPDU.  A DT TPDU is acknowledged with an AK TPDU.
  3096.  
  3097.         An AK TPDU has the sequence number of the next DT 
  3098. TPDU the receiving transport entity expects to receive.  It thus 
  3099. acknowledges receipt of all DT TPDUs with sequence numbers less than 
  3100. the acknowledgement number.
  3101.  
  3102.         An AK TPDU may be repeated at any time, using the 
  3103. sequence number in the last AK TPDU sent.
  3104.  
  3105. 7.4.5.5  Flow Control Principles
  3106.  
  3107.         Flow control in Class 4 is subject to the same 
  3108. principles as in Classes 2 and 3.  The credit mechanism and window 
  3109. principle of those classes still apply, except that in class 4, the 
  3110. upper window edge can be reduced by the receiving transport entity 
  3111. by sending an AK TPDU with a smaller credit.
  3112.  
  3113.         A receiving transport entity may send an AK TPDU at 
  3114. any time to change the window size.  This AK TPDU may acknowledge a 
  3115. new DT TPDU or may repeat a previous acknowledgement.
  3116.  
  3117. 7.4.5.6  Window Synchronization Principles
  3118.  
  3119.         To ensure the synchronization of flow control 
  3120. information the window timer provokes the frequent exchange of AK 
  3121. TPDUs between transport entities.  The window timer maintains a 
  3122. minimum level of TPDU traffic between transport entities cooperating 
  3123. in a transport connection.
  3124.  
  3125.         In Class 4 the window size can be reduced in any AK 
  3126. TPDU.  Due to the possibility of misordering of AK TPDUs and the
  3127. associated loss of efficiency, the AK TPDU for class 4 
  3128. includes an additional field called the AK TPDU  subsequence 
  3129. parameter.
  3130.  
  3131.         An AK TPDU should contain the subsequence parameter 
  3132. whenever a duplicate AK TPDU is sent with the same sequence number 
  3133. but with reduced credit.  The value of the subsequence parameter is 
  3134.  
  3135. ISO Transport Protocol Specification                                   Page 59
  3136. International Standards Organization
  3137.  
  3138.  
  3139. set to one for the first time the AK TPDU is resent with reduced 
  3140. credit.
  3141.  
  3142.         When an AK TPDU is transmitted whose sequence 
  3143. number is increased, the 'sub-sequence' parameter is omitted 
  3144. until credit reduction takes place.
  3145.  
  3146.         When an AK TPDU is received, it must be processed 
  3147. (i.e., its contents made use of) only if:
  3148.  
  3149.         o  The sequence number is greater than in any
  3150.            previously received AK TPDU, or,
  3151.  
  3152.         o  The sequence number is equal to the highest 
  3153.            in any previously received AK TPDU, and the 
  3154.            sub-sequence parameter is greater than in 
  3155.            any previously received AK TPDU having the
  3156.            same sequence number (where an 
  3157.            absent sub-sequence parameter is regarded 
  3158.            as having a value of zero), or
  3159.  
  3160.         o  The sequence number and sub-sequence 
  3161.            parameter are both equal to the highest in 
  3162.            any previously received AK TPDU (where an 
  3163.            absent sub-sequence parameter is regarded as 
  3164.            having a value of zero), and the credit 
  3165.            field is greater than in any previously 
  3166.            received AK TPDU having the same sequence 
  3167.            and sub-sequence numbers. 
  3168.  
  3169.         When an AK TPDU is transmitted which opens a closed 
  3170. window (i.e. increases credit from zero), it should be retransmitted 
  3171. at an interval of T1.  Transmission should occur a maximum of N 
  3172. times, after which the usual inactivity retransmission timer should 
  3173. be reverted to.  Retransmission may also cease if the local 
  3174. transport entity becomes sure that the new credit information has 
  3175. been received by the remote transport entity.
  3176.  
  3177.         If a transport entity receives an AK TPDU containing 
  3178. a 'Flow Control Confirmation' parameter, whose Lower Window Edge and 
  3179. Your-Sub-Sequence fields are equal to its own lower window edge and 
  3180. sub-sequence number, it may note that the credit available at the 
  3181. remote transport entity (relative the Lower Window Edge field) is at 
  3182. least equal to the value conveyed as Your Credit.  This enables the 
  3183. transport entity to cease the frequent retransmission of window 
  3184. information, if it thereby knows that the remote window is open.
  3185.  
  3186.         A transport entity need not retransmit window 
  3187. information (except as described under Inactivity Principles) if it 
  3188. is aware by the receipt of DT TPDUs that the remote transport entity 
  3189.  
  3190. ISO Transport Protocol Specification                                   Page 60
  3191. International Standards Organization
  3192.  
  3193.  
  3194. has sufficient credit to prevent deadlock.  When an AK TPDU is 
  3195. transmitted in response to a DT TPDU, the transport entity may 
  3196. normally assume that the transmitter of the DT TPDU will ensure that 
  3197. the AK TPDU is received, be retransmission of the DT TPDU if 
  3198. necessary.  Therefore, it can normally be assumed that the credit 
  3199. conveyed in such an AK TPDU will be available to the remote 
  3200. transport entity, and frequent retransmission is unnecessary.
  3201.  
  3202.         The assumption that the DT TPDU will be retransmitted 
  3203. may be incorrect if credit reduction has taken place.  Therefore, a 
  3204. transport entity may not make this assumption if the 
  3205. sequence number of the DT TPDU is less than or equal to the highest 
  3206. value for which permission to transmit (i.e., credit) has been given 
  3207. and subsequently withdrawn.
  3208.  
  3209.         Upon receipt of an AK TPDU which increases the upper 
  3210. window edge, a transport entity may transmit an AK TPDU which 
  3211. repeats the information contained in the received TPDU in a 'Flow 
  3212. Control Confirmation' parameter in its variable part an thereby 
  3213. assures the transmitter of the original AK TPDU of its own state.  
  3214. Such an AK TPDU may be tranmmitted:
  3215.  
  3216.         o  Upon receipt of a duplicated AK TPDU 
  3217.            (i.e., one which is identical in all fields, 
  3218.            including the sub-sequence parameter if 
  3219.            present, to the most recently received AK 
  3220.            TPDU which was not discarded due to 
  3221.            detection of a sequence error), not 
  3222.            containing the 'Flow Control Confirmation' 
  3223.            parameter.
  3224.  
  3225.         o  Upon receipt of an AK TPDU which increases 
  3226.            the upper window edge but does not increase 
  3227.            the lower window edge, when the upper window 
  3228.            edge was formerly equal to the lower window 
  3229.            edge.
  3230.  
  3231. 7.4.5.7  Procedure for Expedited Data
  3232.  
  3233.         The procedure for expedited data is as for Class 3, 
  3234. with the following exceptions.
  3235.  
  3236.         The ED TPDU has a sequence number which is allocated 
  3237. from a separate sequence space from that of the DT TPDUs.  The EA 
  3238. TPDU carries the same sequence number as the corresponding ED TPDU.  
  3239. Only a single ED TPDU may be transmitted and awaiting 
  3240. acknowledgements at any time.
  3241.  
  3242.         Upon receipt of an unduplicated ED TPDU, a transport 
  3243. entity immediately forwards the data to the transport user.  The ED 
  3244.  
  3245. ISO Transport Protocol Specification                                   Page 61
  3246. International Standards Organization
  3247.  
  3248.  
  3249. TPDU sequence number is recorded in an EA TPDU sent to the other 
  3250. transport entity.
  3251.  
  3252.         The sender of an ED TPDU shall not send any new DT 
  3253. TPDU with higher T(S) until it receives the EA TPDU.  This 
  3254. guarantees the arrival of the ED TPDU before any subsequently sent 
  3255. DT TPDUs.
  3256.  
  3257. 7.4.5.8  Inactivity Principles
  3258.  
  3259.         If the Inactivity Time I passes without receipt of 
  3260. some TPDU, the transport entity will terminate the TC by making use 
  3261. of the release procedure.  To present expiration of the remote 
  3262. transport entity's inactivity times when no data is being sent, the 
  3263. local transport entity must send AK TPDUs at suitable intervals in 
  3264. the absence of data, having regard to the probability of TPDU loss.   
  3265. The Window Synchronization Principles (see 7.4.5.6) may ensure that 
  3266. this requirement is met.
  3267.  
  3268.         Note: It is likely that the release procedure 
  3269. initiated due to inactivity timer expiration will fail, as such 
  3270. expiration indicates probable failure of the supporting NC or of the 
  3271. remote transport entity.  This case is described in Section 7.4.6.
  3272.  
  3273. 7.4.6   Procedures for Release Phase
  3274.  
  3275.         The rules for class 3 apply.  The DR TPDU is subject 
  3276. to the usual retransmission procedure.  After N retransmissions, the 
  3277. transport connection is considered disconnected, the Reference is 
  3278. placed in the frozen state for a period L and retransmission ceases.
  3279.  
  3280.         The DC TPDU is sent only in response to a DR TPDU, and 
  3281. is not subject to the retransmission procedure.
  3282.  
  3283.         The DC TPDU when received allows the transport entity 
  3284. to release all resources maintained for the transport connection.
  3285.  
  3286.         The DR TPDU does not carry a sequence number.  Any 
  3287. previously transmitted TPDUs (including DT and ED) which are 
  3288. received after the DR TPDU result in a further DR TPDU but are 
  3289. otherwise ignored.  After disconnection, for whatever reason, the 
  3290. Reference is placed in the frozen state for a period L.
  3291.  
  3292. 7.4.6.1  Unassigned Frozen References
  3293.  
  3294.         When a transport connection is terminated, the 
  3295. corresponding references cannot be immediately reused since TPDUs 
  3296. containing these references may continue to exist in the network for 
  3297. a time up to L.  Therefore, these references will be placed in an 
  3298. unassignable, frozen state for this peiod.
  3299.  
  3300. ISO Transport Protocol Specification                                   Page 62
  3301. International Standards Organization
  3302.  
  3303.  
  3304.         After an event involving loss of transport entity 
  3305. state information, including the status of reference assignments, 
  3306. all references relating to network connections whose transport 
  3307. state information has been lost must be placed in the frozen state 
  3308. for a period L.
  3309.  
  3310.         If a DC TPDU is received for a local reference which 
  3311. is in the frozen state, or with a remore reference not matching the 
  3312. already recorded one, this DC TPDU shall be ignored.
  3313.  
  3314. 7.4.7   Treatment of Invalid TPDUs
  3315.  
  3316.         The 'Treatment of Protocol Erorrs' function is used.
  3317.  
  3318. 7.4.8   Supported Options
  3319.  
  3320.         Non use of checksum.
  3321.  
  3322.         Use of extended formats.
  3323.  
  3324. 8.      ENCODING
  3325.  
  3326. 8.1     Summary
  3327.  
  3328.                                     Classes
  3329.                                   0  1  2  3  4   Sect.       Code
  3330.  
  3331. CR Connection Request             x  x  x  x  x   8.3      1110xxxx
  3332.  
  3333. CC Connection Confirm             x  x  x  x  x   8.4      1101xxxx
  3334.  
  3335. DR Disconnect Request             x  x  x  x  x   8.5      10000000
  3336.  
  3337. DC Disconnect Confirm                x  x  x  x   8.6      11000000
  3338.  
  3339. DT Data                           x  x  x  x  x   8.7      11110000
  3340.  
  3341. ED Expedited Data                    x  NF x  x   8.8      00010000
  3342.  
  3343. AK Data Acknowledgement            NRC  NF x  x   8.9      0110xxxx
  3344.     (Note 1)
  3345.  
  3346. EA Expedited Data                    x  NF x  x   8.10     00100000
  3347.    Acknowledgement
  3348.  
  3349. RJ Reject (Note 1)                   x     x      8.11     0101xxxx
  3350.  
  3351. ERR TPDU Error                    x  x  x  x  x   8.12     01110000
  3352.  
  3353. not available (Note 2)                             -      00000000
  3354.  
  3355. ISO Transport Protocol Specification                                   Page 63
  3356. International Standards Organization
  3357.  
  3358.  
  3359. not available (Note 2)                             -      00110000
  3360.  
  3361. not available (Note 2)                             -      1001xxxx
  3362.  
  3363. not available (Note 2)                             -      1010xxxx
  3364.  
  3365. Where xxxx (bits 4-1) is used to signal the CDT
  3366.  
  3367. Note 1: In extended header format, the code for AK=0110 0000 and the 
  3368.         code for RJ=0101 0000.
  3369.  
  3370. Note 2: These codes are already in use in compatible protocols 
  3371.         defines by standards organizations other than CCITT/ISO.
  3372.  
  3373. NF:     Not available when the non explicit flow control option is 
  3374.         selected.
  3375.  
  3376. NRC:    Not available when the receipt confirmation option is 
  3377.         selected.
  3378.  
  3379. 8.2     Structure
  3380.  
  3381.         As defined in the previous sections, all the Transport 
  3382. Protocol Data Units (TPDU) shall contain an integral number of 
  3383. octets.  The octets in a TPDU are numbered starting from 1 and 
  3384. increasing in the order of transmission.  The bits in an octet are 
  3385. numbered from 1 to 8, where bit 1 is the low-ordered bit.
  3386.  
  3387.         There are tao types of TPDUs:
  3388.  
  3389.         o  Data TPDUs, used to transfer Transport Service 
  3390.            Data Units (TSDUs).  The structure of the TSDUs is 
  3391.            maintained by means of the TSDU End Mark.
  3392.  
  3393.         o  Control TPDUs, used to control the transport 
  3394.            protocol functions, including the optional 
  3395.            functions.
  3396.  
  3397. Octets  1  2  3  4           n  n+1          p  p+1
  3398.         ------------      --------------   --------------   --------   
  3399.         LI|  | |  |  ...    |  |   |    .... | |    |   .... |             
  3400.         ------------      --------------   --------------   --------
  3401.         
  3402.          <--- Fixed Part -----><-- Variable Part->
  3403.                                    (including checksum   
  3404.                                     where applicable)
  3405.  
  3406.         <--------------Header-------------------><----Data Field->  
  3407.  
  3408. A TPDU is divided into four parts:
  3409.  
  3410. ISO Transport Protocol Specification                                   Page 64
  3411. International Standards Organization
  3412.  
  3413.  
  3414.         o  Length Indicator Field (LI)
  3415.  
  3416.         o  Fixed Part
  3417.  
  3418.         o  Variable Part (may be omitted)
  3419.  
  3420.         o  Data Field (may be omitted)
  3421.  
  3422. The length Indicator Field, Fixed Part and Variable Part constitute 
  3423. the Header of the TPDU.
  3424.  
  3425. 8.2.1   Length Indicator Field
  3426.  
  3427.         This field is contained in the first octet of the 
  3428. TPDUs.  The length is indicated by a binary number, with a maximum 
  3429. value of 254 (11111110).  The length indicated is the header length, 
  3430. including parameters, but excluding the length indicator field and 
  3431. user data, if any.  The value 255 (11111111) is reserved for 
  3432. possible extensions.
  3433.  
  3434. 8.2.2   Fixed Part
  3435.  
  3436.         The fixed part contains frequently occurring functions 
  3437. including the code of the TPDU.  The length and the structure of the 
  3438. fixed part are defined by the TPDU code, defined by bits 5 to 8 of 
  3439. the second octet of the header.
  3440.  
  3441. 8.2.2.1  TPDU Code
  3442.  
  3443.         This field contains the TPDU code and is contained in 
  3444. Octet 2 of the header.  It is used to define the structure of the
  3445. remaining header.  This field is a full octet except in the 
  3446. following cases:
  3447.  
  3448.              1110 xxxx      Connecting Request
  3449.              1101 xxxx      Connection Confirm
  3450.              0101 xxxx      Reject
  3451.              0110 xxxx      Data Acknowledgement
  3452.  
  3453.         Where xxxx (bits 4-1) is used to signal the CDT.
  3454.  
  3455.         Any other bit pattern may be used to define a TPDU Code.
  3456.         Only those codes defined in Section 8.1 are currently valid.
  3457.  
  3458. 8.2.3   Variable Part
  3459.  
  3460.         The variable part is used to define parameters 
  3461. relating to optional functions.  If the variable part is present, it 
  3462. shall contain one or more parameters.  The number of parameters that 
  3463. may be contained in the varialbe part is indicated by the length of 
  3464.  
  3465. ISO Transport Protocol Specification                                   Page 65
  3466. International Standards Organization
  3467.  
  3468.  
  3469. the variable part which is a LI minus the length of the fixed part.
  3470.  
  3471.         Since the currently defined minimum fixed part for 
  3472. headers which allow parameters is four octets, and since the length 
  3473. indication field is limited to a maximum of 254, the maximum length 
  3474. of the variable part is 250 octets.
  3475.  
  3476.         Each parameter contained within the variable part is 
  3477. coded as follows:
  3478.  
  3479.                       Bits 8   7   6   5   4   3   2   1
  3480.         Octets
  3481.         n+1                            Parameter Code
  3482.         n+2                            Parameter Length 
  3483.                                         Indication (e.g."m")
  3484.         n+3                            Parameter Value
  3485.  
  3486.         n+2+m
  3487.  
  3488.         o       The parameter code field is coded in binary and, 
  3489.                 without extensions, provides a maximum number of 
  3490.                 255 different parameters.  However, as noted below, 
  3491.                 bits 8 and 7 indicates the source of definition, 
  3492.                 so the practical maximum number of different 
  3493.                 parameters is less.  Parameter code 1111 1111 is 
  3494.                 reserved for possible extensions of the parameter code.
  3495.  
  3496.         o       The parameter length indication indicates the length, 
  3497.                 in octets, of the parameter value field.  The length
  3498.                 is indicated by a binary number, "m" with a theoretical 
  3499.                 maximum value of 255.  The practical maximum value of 
  3500.                 "m" is lower.  For example, in the case of a single parameter 
  3501.                 contained within the variable part, two octets 
  3502.                 are required for the Parameter Code and the Parameter Length 
  3503.                 Indication itself.  Thus, the value of "m"  is limited 
  3504.                 to 248.  For larger fixed parts of the header and for 
  3505.                 each succeedimg parameter, the maximum value of "m" decreases.
  3506.  
  3507.         o       The parameter value field contains the value of the 
  3508.                 parameter identified in the parameter code field.
  3509.  
  3510.         o       No standard parameter codes use bits 8 and 7 with the 
  3511.                 value 00.
  3512.  
  3513.         o       Implementations shall accept the parameters defined in 
  3514.                 the variable part in any order.  If any parameter is 
  3515.                 duplicated then the later value will be used.
  3516.  
  3517. 8.2.3.1  Checksum Parameter (Class 4 only)
  3518.  
  3519.  
  3520. ISO Transport Protocol Specification                                   Page 66
  3521. International Standards Organization
  3522.  
  3523.  
  3524.         All TPDU types may contain a checksum parameter in 
  3525. their variable part.  This parameter must always be present except 
  3526. when the non use of checksum option is selected.
  3527.  
  3528.              Parameter Code:     1100 0011
  3529.              Parameter Length:      2
  3530.              Parameter Value:    Result of checksum algorithm.      
  3531.                                  This algorithm is specified in 
  3532.                                  Section 6.18.
  3533.  
  3534. 8.2.4   Data Field      This field contains transparent user data.  
  3535. Restrictions on its size are noted for each command.
  3536.  
  3537. 8.3     Connections Request (CR)
  3538.  
  3539. 8.3.1   Structure
  3540.  
  3541.         1     2         3        4     5    6     7     8     p   p+1
  3542.         LI  CR  CDT 00000000 00000000 SOURCE-   class  VARIABLE  USER DATA
  3543.                                       REFERENCE options   PART
  3544.  
  3545. 8.3.2   LI
  3546.  
  3547.         See Section  8.2.1
  3548.  
  3549. 8.3.3   Fixed Part (Octets 2 to 7)
  3550.  
  3551.              CR:       Connection Request Code:      1110
  3552.  
  3553.              CDT:      Initial Credit Allocation (set to 0000 in    
  3554.                        Classes 0 and 1 when specified as preferred class).
  3555.  
  3556.              SOURCE REFERENCE:        Reference selected by the transport 
  3557.                                       entity initiating the CR TPDU to 
  3558.                                       identify the requested TC.
  3559.  
  3560.              CLASSES:   Bits 8-5 octer 7 defines the preferred Transport 
  3561.                         Protocol class to be operated over the requested 
  3562.                         TC.  This field may take on one of the following 
  3563.                         values.
  3564.  
  3565.                                  0000           Class 0
  3566.                                  0001           Class 1
  3567.                                  0010           Class 2
  3568.                                  0011           Class 3
  3569.                                  0100           Class 4
  3570.  
  3571.         The CR contains the first choice of class in the fixed 
  3572. part as above.  Second and subsequent choices are listed in the 
  3573. variable part if required.
  3574.  
  3575. ISO Transport Protocol Specification                                   Page 67
  3576. International Standards Organization
  3577.  
  3578.  
  3579.         Bits 4-1 of octet 7 are reserved for options to be 
  3580. used on the requested transport connection.
  3581.  
  3582.         The use of bits 4-1 is as follows:
  3583.  
  3584.                   BIT            OPTION
  3585.  
  3586.                   4              0    always
  3587.  
  3588.                   3              0    always
  3589.  
  3590.                   2              =0   use of normal formats
  3591.                                  =1   use of extended formats
  3592.  
  3593.                   1              =0   use of explicit flow control 
  3594.                                       in Class 2
  3595.  
  3596.                                  =1   no use of explicit flow 
  3597.                                       control in Class 2
  3598.  
  3599.         Note:
  3600.  
  3601.         1.  It is not valid to request 'use of expedited data 
  3602.             transfer' (Additional option parameter) and no use of 
  3603.             explicit flow control in Class 2' (bit 1 = 1).
  3604.  
  3605.         2.  Bits 4 to 1 are always zero in Class 0 and have 
  3606.             no meaning.
  3607.  
  3608. 8.3.4   Variable Part (Octets 8 to p)
  3609.  
  3610.         The following parameters are permitted in the variable part:
  3611.  
  3612.         o  Transport Service Access Point Identifier (TSAP-ID)
  3613.  
  3614.            Parameter code 11000001 for the identifier of the Calling TSAP.
  3615.  
  3616.            11000010 for the identifier of the Called TSAP.
  3617.  
  3618.         If a TSPA-ID is given in the request it may be 
  3619. returned in the confirmation.
  3620.  
  3621.         o  TPDU size
  3622.  
  3623.         This parameter defines the proposed maximum TPDU size 
  3624. (in octets including the header) to be used over the requested 
  3625. transport connection.  The coding of this parameter is:
  3626.  
  3627.         Parameter Code 11000000
  3628.  
  3629.  
  3630. ISO Transport Protocol Specification                                   Page 68
  3631. International Standards Organization
  3632.  
  3633.  
  3634.         Parameter value field
  3635.  
  3636.         00001101  8192 octets (not allowed in Class 0 of 1)
  3637.  
  3638.         00001100  4096 octets (not allowed in Class 0 of 1)
  3639.  
  3640.         00001011  2048 octets
  3641.  
  3642.         00001010  1024 octets
  3643.  
  3644.         00001001  512 octets
  3645.  
  3646.         00001000  256 octets
  3647.  
  3648.         00000111  128 octets
  3649.  
  3650.         Default value is 00000111 (128 octets)
  3651.  
  3652.         Version Number (not used in Class 0)
  3653.  
  3654.         Parameter code 11000100
  3655.  
  3656.         Parameter value field 00000001
  3657.  
  3658.         Default value 00000001
  3659.  
  3660.         Default value 00000001 (not used in Class 0)
  3661.  
  3662.        o Security Parameter (not used in Class 0)
  3663.  
  3664.          This parameter is user defined.
  3665.  
  3666.          Parameter code 11000101
  3667.  
  3668.          Parameter value and length field are user defined
  3669.  
  3670.        o Checksum (not used in Classes 0 through 3)
  3671.  
  3672.              See Section 8.2.3.1
  3673.  
  3674.          This parameter must always be present in a CR TPDU  
  3675.          requesting Class 4, even if the checksum selection 
  3676.          parameter is used to request non-use of the checksum facility.
  3677.  
  3678.        o Additional Option Selection (not used in Class 0)
  3679.  
  3680.         This parameter defines the selection to be made as to 
  3681.         whether or not additional options are to be used.
  3682.  
  3683.         Parameter code 11000110
  3684.  
  3685. ISO Transport Protocol Specification                                   Page 69
  3686. International Standards Organization
  3687.  
  3688.  
  3689.         Parameter length:  1
  3690.         Parameter value field:
  3691.  
  3692.         Bits related to options particular to one class are 
  3693.         not meaningful and may take any value in the other classes.
  3694.  
  3695.              BITS                OPTION
  3696.  
  3697.              4    1=   Use of network expedited in Class 1
  3698.                   0=   Non use of network expedited in Class 1
  3699.  
  3700.              3    1=   Use of receipt confirmation in Class 1
  3701.                   0=   Use of explicit AK variant in Class 1
  3702.  
  3703.              2    0=   Checksums are to be used in Class 4
  3704.                   1=   Checksums are not to be used in Class 4
  3705.  
  3706.              1    1=   Use of transport expedited data transfer 
  3707.                        service
  3708.                   0=   No use of transport expedited data transfer 
  3709.                        service
  3710.  
  3711.              Default falue is 00000001
  3712.  
  3713.         o Alternative protocol class (not used in Class 0)
  3714.  
  3715.              Parameter code 11000111
  3716.  
  3717.              Parameter length  n
  3718.  
  3719.         Parameter value encoded as a sequence of single 
  3720. octets.  Each octet is encoded as for octet 7 but with bits 4-1 set 
  3721. to zero (i.e., no alternative option selections permitted).
  3722.  
  3723.         o  Acknowledge Time
  3724.  
  3725.         This parameter conveys the maximum acknowledge time 
  3726.         AL to the remote transport entity.  It is an indication only, and 
  3727.         is not subject to negotiation (see section 7.4.5.3).
  3728.  
  3729.         Parameter Code 10000101
  3730.  
  3731.         Parameter Value field: n a binary number (2 octets)
  3732.  
  3733.         n is the maximum acknowledge time, expressed in 
  3734.         milliseconds.
  3735.  
  3736.         o  Throughput      Parameter code:    10001001
  3737.  
  3738.                             Length         :    12
  3739.  
  3740. ISO Transport Protocol Specification                                   Page 70
  3741. International Standards Organization
  3742.  
  3743.  
  3744.                             1st 3 octets   :    Targer value, 
  3745.                                                 calling-called user 
  3746.                                                 direction
  3747.  
  3748.                             2nd 3 octets   :    Min. acceptable, 
  3749.                                                 calling-called  
  3750.                                                 user direction
  3751.  
  3752.                             3rd 3 octets    :   Target value, 
  3753.                                                 called-calling user 
  3754.                                                 direction
  3755.  
  3756.                             4th 3 octets  :     Min. acceptable, 
  3757.                                                 called-calling user 
  3758.                                                 direction
  3759.  
  3760.              Values are expressed in octets per second.
  3761.  
  3762.         o Residual          Parameter code:     10000110
  3763.           error rate
  3764.                             Length        :     3
  3765.  
  3766.                             1st octet     :     Target value, power 
  3767.                                                 of 10
  3768.  
  3769.                             2nd octet     :     Min. acceptable, 
  3770.                                                 power of 10
  3771.  
  3772.                             3rd octet     :     TSDU size of 
  3773.                                                 interest, expressed 
  3774.                                                 as a power of 2
  3775.  
  3776.         o  Priority         Parameter code:     10000111
  3777.  
  3778.                             Length        :     2
  3779.  
  3780.                             Value         :     Integer
  3781.  
  3782.         o  Transit          Parameter code:     10001000
  3783.              delay
  3784.  
  3785.                             Length        :     8
  3786.  
  3787.                             1st 2 octets  :     Target value, 
  3788.                                                 calling-called user 
  3789.                                                 direction
  3790.  
  3791.                             2nd 2 octets  :     Max. acceptable,
  3792.                                                 calling-called user
  3793.                                                 direction.
  3794.  
  3795. ISO Transport Protocol Specification                                   Page 71
  3796. International Standards Organization
  3797.  
  3798.  
  3799.                             3rd 2 octets  :     Target value, 
  3800.                                                 called-calling user 
  3801.                                                 direction.
  3802.  
  3803.                             4th 2 octets  :     Max. acceptable, 
  3804.                                                 called-calling user 
  3805.                                                 direction
  3806.  
  3807.              Values are expressed in milliseconds.
  3808.  
  3809. 8.3.5   User Data (Octets p+1 to the end)
  3810.  
  3811.         No user data are permitted in class 0, and are 
  3812. optional in the other classes.  Where permitted, it may not exceed 
  3813. 32 octets.
  3814.  
  3815. 8.4     Connection Confirm (CC)
  3816.  
  3817. 8.4.1   Structure
  3818.  
  3819.         1     2     3     4     5     6    7    8    p   p+1
  3820.  
  3821.         LI CC  CDT DST-REF SOURCE-REF  class  VARIABLE  USER DATA
  3822.           1101                         options  Part             
  3823.  
  3824. 8.4.2   LT
  3825.  
  3826.         See Section 8.2.1.  
  3827.  
  3828. 8.4.3   Fixed Part (Octets 2 to 7)
  3829.  
  3830.              CC                      :          Connection Confirm 
  3831.                                                 Code:  1101
  3832.  
  3833.              CDT                     :          Initial Credit 
  3834.                                                 Allocation (set to 
  3835.                                                 0000 in Classes 0 
  3836.                                                 and 1).
  3837.  
  3838.              DST-REFERENCE           :          Reference 
  3839.                                                 identifying the 
  3840.                                                 requested transport 
  3841.                                                 connection at the 
  3842.                                                 remote transport 
  3843.                                                 entity.
  3844.  
  3845.              SOURCE REFERENCE        :          Reference selected 
  3846.                                                 by the transport 
  3847.                                                 entity initiating 
  3848.                                                 the CC TPDU to 
  3849.  
  3850. ISO Transport Protocol Specification                                   Page 72
  3851. International Standards Organization
  3852.  
  3853.  
  3854.                                                 identify the 
  3855.                                                 confirmed TC.
  3856.  
  3857.              CLASSES                 :          Defines the selected 
  3858.                                                 transport protocol class to 
  3859.                                                 be operated over the accepted 
  3860.                                                 TC according to the 
  3861.                                                 negotiation rules specified 
  3862.                                                 in Section 6.5.
  3863.  
  3864. 8.4.4   Variable part (Octet 8 to p)
  3865.  
  3866.         See Section 8.3.4
  3867.  
  3868. 8.4.5   User Data (Octets p+1 to the end)
  3869.  
  3870.         See Section 8.3.5
  3871.  
  3872. 8.5     Disconnect Request (DR)
  3873.  
  3874. 8.5.1   Structure
  3875.  
  3876. LI  DR        DST-REF   SOURCE-REF    REASON    VARIABLE  USER DATA 
  3877.    10000000                                       PART               
  3878.  
  3879. 8.5.2   LI
  3880.  
  3881.              See Section 8.2.1
  3882.  
  3883. 8.5.3   Fixed Part (Octets 2 to 7)
  3884.  
  3885.         DR                :      Disconnect Request Code:   1000
  3886.  
  3887.         DST-REFERENCE     :      Reference identifying the TC at 
  3888.                                  the remote transport entity.
  3889.  
  3890.         SOURCE REFERENCE  :      Reference identifying the TC at 
  3891.                                  the transport entity initiating  
  3892.                                  the command.  Value zero when 
  3893.                                  reference is unassigned.
  3894.  
  3895.         REASON            :      Defines the reason for 
  3896.                                  disconnecting the TC.  This field 
  3897.                                  shall take one of the following 
  3898.                                  values:
  3899.  
  3900.                                  The following values can be used 
  3901.                                  for class 1 to 4:
  3902.  
  3903.                                  128 + 0 - Normal disconnect 
  3904.  
  3905. ISO Transport Protocol Specification                                   Page 73
  3906. International Standards Organization
  3907.  
  3908.  
  3909.                                  initiated by session entity.
  3910.  
  3911.                                  128 + 1 - Remote transport entity 
  3912.                                  congestion at connect request time
  3913.  
  3914.                                 *128 + 2 - Connection negotiation failed 
  3915.                                 (i.e. proposed class(es) not supported).
  3916.  
  3917.                                  128 + 3 - Duplicated connection detected
  3918.  
  3919.                                  128 + 4 - Mismatched references
  3920.  
  3921.                                  128 + 5 - Protocol error
  3922.  
  3923.                                  128 + 6 - Not used
  3924.  
  3925.                                  128 + 7 - Reference overflow
  3926.  
  3927.                                  128 + 8 - Connection request refused on this 
  3928.                                  network connection
  3929.  
  3930.                                  128 + 9 - Not used
  3931.  
  3932.                                  128 + 10 - Header or parameter length invalid
  3933.  
  3934.              The following values can be used for all classes.
  3935.  
  3936.                   0 -  Reason not specified
  3937.  
  3938.                   1 -  Congested at TSAP
  3939.  
  3940.                   *2   Session entity not attached to TSAP
  3941.  
  3942.                   *3   Address unknown
  3943.  
  3944.              Note:     Reasons marked with '*' may be reported to 
  3945.                        the TS-user as 'persistent', other reasons 
  3946.                        as 'transient'.
  3947.  
  3948. 8.5.4   Variable Part (Octets 8 to 10)
  3949.  
  3950.         o    A parameter may be provided to allow additional 
  3951.              information related to the clearing of the connection.
  3952.  
  3953.              Parameter code:       11100000
  3954.  
  3955.              Parameter Value Field:  Additional information.  This 
  3956.              field is intended to be used by the transport service 
  3957.              provider for internal purposes.
  3958.  
  3959.  
  3960. ISO Transport Protocol Specification                                   Page 74
  3961. International Standards Organization
  3962.  
  3963.  
  3964.         o    Checksum (see 8.2.3.1)
  3965.  
  3966. 8.5.5   User Data (Octets p+1 to the end)
  3967.  
  3968.         Not allowed in class 0,
  3969.  
  3970.         This field may not exceed 64 octers and is used 
  3971. to carry TS-User data.  The successful transfer of this data is not 
  3972. guaranteed.
  3973.  
  3974. 8.6     Disconnect Confirm (DC)
  3975.  
  3976.         (Not used in Class 0)
  3977.  
  3978. 8.6.1   Structure
  3979.  
  3980.         1     2         3       4       5      6        7        p
  3981.         LI             DST-REFERENCE  SOURCE-REFERENCE  Variable Part
  3982.            11000000
  3983.  
  3984. 8.6.2   LI
  3985.  
  3986.         See Section 8.2.1
  3987.  
  3988. 8.6.3   Fixed Part (Octets 2 to 6)
  3989.  
  3990.              DC            :     Disconnect Confirm Code:  1100
  3991.  
  3992.              DST-REFERENCE :     See Section 8.3.3
  3993.  
  3994.              SOURCE-REFERENCE:   See Section 8.4.3
  3995.  
  3996. 8.6.4   Variable Part
  3997.  
  3998.              Checksum (see 8.2.3.1)
  3999.  
  4000. 8.7     Data (DT)
  4001.  
  4002. 8.7.1   Structure
  4003.  
  4004.              Normal Format for Class 0 to 1
  4005.  
  4006.         1     2          3           4         5
  4007.  
  4008.         LI   DT     E    TPDU-NR    User Data
  4009.            11110000 0                        
  4010.                     T                        
  4011.  
  4012.              Normal format for Class 2, 3 and 4
  4013.  
  4014.  
  4015. ISO Transport Protocol Specification                                   Page 75
  4016. International Standards Organization
  4017.  
  4018.  
  4019. 1        2        3        4          5          6       p     p+1
  4020. LI             DST-REFERENCE    E   TPDU-NR   Variable Part  User Data
  4021.    11110000                     O
  4022.                                 T
  4023.  
  4024.         Extended Format for optional use in Classes 2,3 and 4
  4025.  
  4026.         1       2      3       4     5,6,7,8    9        p p+1
  4027.  
  4028.         LI   DT     DST-REFERENCE  E  TPDU-NR  Variable  User Data
  4029.            11110000                O
  4030.                                    T
  4031.  
  4032. 8.7.2   LI
  4033.  
  4034.         Section 8.2.1
  4035.  
  4036. 8.7.3   Fixed Part
  4037.  
  4038.         (Classes 0 to 1  : -  Octets  2 to 3; classes 2,3,4 
  4039. normal format:  Octets 2 to 5; classes 2,3,4 extended format: - 
  4040. Octets 2 to 8)
  4041.  
  4042.              DT             :    Data Transfer Code:  1111
  4043.  
  4044.              DST-REFERENCE  :    See Section 8.4.3
  4045.  
  4046.              EOT            :    When set to ONE, indicates that 
  4047.                                  the current DT TPDU is the last 
  4048.                                  Data Unit of a complete DT TPDU 
  4049.                                  sequence (End of TSDU).
  4050.  
  4051.              TPDU-NR        :    TPDU Send Sequence Number (Zero in 
  4052.                                  Class 0), may take any value in 
  4053.                                  Class 2 without explicit flow 
  4054.                                  control.
  4055.  
  4056. 8.7.4   Variable Part
  4057.  
  4058.         Checksum (See 8.2.3.1)
  4059.  
  4060. 8.7.5   User Data Field
  4061.  
  4062.         This field contains data of the TSDU being transmitted.
  4063. The length of this field is limited to the negotiated TPDU size for 
  4064. this transport connection minus 3 octets in Classes 0 and 1,
  4065. and minus 5 octets (normal header format) or 
  4066. 8 octets (extended header format) in the other classes.  The 
  4067. variable part, if presemt, amy further reduce the size of the user
  4068. data field.
  4069.  
  4070. ISO Transport Protocol Specification                                   Page 76
  4071. International Standards Organization
  4072.  
  4073.  
  4074. 8.8     Expedited Data (ED)
  4075.  
  4076.         (Not used in Class 2 when "no explicit flow 
  4077.          control" option is selected.)
  4078.  
  4079. 8.8.1   Structure
  4080.  
  4081.         Normal Format
  4082.  
  4083.      1        2      3        4        EOT 5        6     p        p + 1
  4084.  
  4085.      LI       ED    DST-REFERENCE     EDTPDU-NR    Variable Part  User Data
  4086.            00010000                 1.
  4087.  
  4088.         Extended Format
  4089.  
  4090.      1        2        3      4        EOT 5,6,7,8  9    p          p + 1
  4091.  
  4092.      LI       ED     DST-REFERENCE       EDTPDU-NR  Variable Part   User Data
  4093.            00010000                    1.
  4094.  
  4095. 8.8.2   LI
  4096.  
  4097.         See Section 8.2.1
  4098.  
  4099. 8.8.3   Fixed Part
  4100.  
  4101.         (Octets 2 to 5, normal format: 2 to 8, extended format)
  4102.  
  4103.         ED:            Expedited Data command code: 0001
  4104.  
  4105.         DST-REFERENCE: Same as Section 8.4.3
  4106.  
  4107.         ED TPDU-NR:    Expedited TPDU identification number 
  4108.                        (Classes 1, 3, and 4; may take any value in 
  4109.                        Class 2).
  4110.  
  4111. 8.8.4   Variable Part
  4112.  
  4113.         Checksum (See 8.2.3.1)
  4114.  
  4115. 8.8.5   User Data Field
  4116.  
  4117.         This field contains an expedited TSDU.  Up to 16 octets.
  4118.  
  4119. 8.9     Data Acknowledgement (AK)
  4120.  
  4121.         Not applicable for Class 0 and Class 2 when the "no 
  4122. explicit flow control" option is selected, and for Class 1 when the 
  4123. network receipt confirmation option is selected.
  4124.  
  4125. ISO Transport Protocol Specification                                   Page 77
  4126. International Standards Organization
  4127.  
  4128.  
  4129.         Flow Control Confirmation (class 4 only - optionally used)
  4130.  
  4131.         This parameter contains a copy of the information received 
  4132. in an AK TPDU, to allow the transmitter of the AK TPDU to be certain 
  4133. of the state of the receiving transport entity (See Section 7.4.5.6).
  4134.  
  4135.         Parameter Code:  100001011
  4136.  
  4137.         Parameter value field 64 bits, used as follows:
  4138.  
  4139.         o  Lower Window Edge (32 bits)
  4140.            Bit 32 is set to zero, bits 31 to 1 contain the 
  4141.            YR-TU-NR value of the received AK TPDU.  When normal 
  4142.            format is in use, only the least significant seven 
  4143.            bits (bits 1 to 7) of this field are significant.
  4144.  
  4145.         o  Your Sub-Sequence (16 bits)
  4146.            Contains the value of the sub-sequence parameter of 
  4147.            the received AK TPDU, or zero if this parameter was 
  4148.            not present.
  4149.  
  4150.         o  Your Credit (16 bits)
  4151.            Contains the value of the CDT field of the received AK 
  4152.            TPDU.  When normal format is in use, only the least 
  4153.            significant four bits (bits 1 to 4) of this field are 
  4154.            significant.
  4155.  
  4156. 8.10    Expedited Data Acknowledgement (EA)
  4157.  
  4158.         (Not applicable for Class 0 and Class 2 when the no 
  4159.         explicit flow control option is selected).
  4160.  
  4161. 8.10.1  Structure
  4162.  
  4163.         Normal Format
  4164.  
  4165.      1       2       3       4         5               6         p
  4166.  
  4167.      LI      EA      DST-REFERENCE      . YR-TU-NR     Variable Part
  4168.             00100000                  0.
  4169.  
  4170.         Extended Format
  4171.  
  4172.      1      2         3       4          5,6,7,8            9      p
  4173.  
  4174.      LI     EA        DST-REFERENCE       . YR-TU-NR        Variable Part
  4175.            00100000                     0.
  4176.  
  4177. 8.9.1   Structure
  4178.  
  4179.  
  4180. ISO Transport Protocol Specification                                   Page 78
  4181. International Standards Organization
  4182.  
  4183.  
  4184.         Normal Format
  4185.  
  4186.       1       2          3          4         5            6       p
  4187.  
  4188.       LI      AK CDT     DST-REFERENCE         . YR-TU-NR  Variable Part
  4189.              0110                            0.
  4190.  
  4191.         Extended Format
  4192.  
  4193.      1      2         3       4        5,6,7,8       9,10    11    p
  4194.  
  4195.      LI     AK        DST-REFERENCE     . YR-TU-NR   CDT     Variable Part
  4196.            01100000                   0.
  4197.  
  4198. 8.9.2   LI
  4199.  
  4200.         See Section 8.2.1
  4201.  
  4202. 8.9.3   Fixed Part
  4203.  
  4204.         (Octets 2 to 5, normal format:  2 to 10, extended format)
  4205.  
  4206.         AK:            Acknowledgement command code:  0110
  4207.  
  4208.         CDT:           Credit Value (set to 0 in class 1)
  4209.  
  4210.         DST-REFERENCE: Same as Section 8.4.3
  4211.  
  4212.         YR-TU-NR:      Sequence number indicating the next expected 
  4213.                        DT TPDU number.
  4214.  
  4215. 8.9.4   Variable Part
  4216.  
  4217.         Checksum (See 8.2.3.1)
  4218.  
  4219.         Sub-sequence number (class 4 only - optionally used).
  4220.  
  4221.         This parameter is used to ensure that AK TPDUs are 
  4222.         processed in the correct sequence.  If it is absent, this is 
  4223.         equivalent to transmitting the parameter with a value of zero.
  4224.  
  4225.         Parameter Code:  100001010
  4226.  
  4227.         Parameter Value: 16-bit sub-sequence number.
  4228.  
  4229. 8.10.2  LI
  4230.  
  4231.         See Section 8.2.1
  4232.  
  4233. 8.10.3  Fixed Part
  4234.  
  4235. ISO Transport Protocol Specification                                   Page 79
  4236. International Standards Organization
  4237.  
  4238.  
  4239.         (Octets 2 to 5, normal format; 2 to 8, extended 
  4240.         format)
  4241.  
  4242.         EA:            Acknowledgement command code:  0010
  4243.  
  4244.         DST-REFERENCE: Same as Section 8.4.3
  4245.  
  4246.         YR-TU-NR:      Identification of the ED TPDU being 
  4247.                        acknowledged.  May take any value in Class 2.
  4248.  
  4249. 8.10.4  Variable Part
  4250.  
  4251.         Checksum (See 8.2.3.1)
  4252.  
  4253. 8.11    Reject (RJ)
  4254.  
  4255.         (Not used in Classes 0, 2, and 4)
  4256.  
  4257. 8.11.1  Structure
  4258.  
  4259.         Normal Format
  4260.  
  4261.        1       2        3       4          EOT 5          6       p
  4262.  
  4263.        LI      RJ CDT   DST-REFERENCE       . YR-TU-NR    Variable Part
  4264.               0101                        0.
  4265.  
  4266.         Extended Format
  4267.  
  4268.       1        2       3        4          EOT 5,6,7,8    9,10     11      p
  4269.       LI       RJ      DST-REFERENCE        .  YR-TU-NR   CDT      Variable
  4270.               0l0l0000                                              Part
  4271.  
  4272. 8.11.2  LI
  4273.  
  4274.         See Section 8.2.1
  4275.  
  4276. 8.11.3  Fixed Part
  4277.  
  4278.         (Octets 2 to 5, normal format; 2 to 10, extended format)
  4279.  
  4280.         RJ:            Reject Command Code:  0101
  4281.  
  4282.         CDT:           Credit Value (set to 0 in class 1)
  4283.  
  4284.         DST-REFERENCE: Same as Section 8.4.3
  4285.  
  4286.         YR-TU-NR:      Sequence number indicating the next expected 
  4287.                        TPDU from which retransmission should occur.
  4288.  
  4289.  
  4290. ISO Transport Protocol Specification                                   Page 80
  4291. International Standards Organization
  4292.  
  4293.  
  4294. 8.11.4  Variable Part
  4295.  
  4296.         No parameters exclusive to this TPDU type.
  4297.  
  4298. 8.12    TPDU Error (ERR)
  4299.  
  4300.       1         2          3        4        5             6
  4301.  
  4302.       LI        ERR        DST-REFERENCE     Reject        Parameters
  4303.                01110000                      Cause
  4304.  
  4305. 8.12.1  LI
  4306.  
  4307.         See Section 8.2.1
  4308.  
  4309. 8.12.2  Fixed Part
  4310.  
  4311.         ERR:           TPDU Error Code: 0111
  4312.  
  4313.         DST-REFERENCE: Same as Section 8.4.3
  4314.  
  4315.         REJECT CAUSE:  
  4316.                        00000000  Reason not specified
  4317.  
  4318.                        00000001  Invalid parameter code
  4319.  
  4320.                        00000010  Invalid TPDU type
  4321.  
  4322.                        00000011  Invalid parameter value
  4323.  
  4324. 8.12.3  Variable Part (Octets 6 to the end)
  4325.  
  4326.         Parameter Code:  1100001
  4327.  
  4328.         Parameter Value Field:
  4329.  
  4330.         Contains the bit pattern of the rejected TPDU up to and 
  4331. including the octet which caused the rejection.  This parameter is 
  4332. mandatory in Class 0.
  4333.  
  4334.         Checksum (See Section 8.2.3.1)
  4335.  
  4336. SECTION THREE - CONFORMANCE
  4337.  
  4338. 9.      CONFORMANCE
  4339.  
  4340.         Implementations claiming conformance to this standard shall:
  4341.  
  4342.         1.   Implement either Class 0 or Class 2 or both.
  4343.  
  4344.  
  4345. ISO Transport Protocol Specification                                   Page 81
  4346. International Standards Organization
  4347.  
  4348.  
  4349.         2.   If other classes are implemented, the following rules 
  4350.              shall be observed:
  4351.  
  4352.              a)  If Class 3 or Class 4 is implemented then Class 2 
  4353.              must be implemented
  4354.  
  4355.              b)  If Class 1 is implemented then Class 0 must be 
  4356.              implemented.
  4357.  
  4358.         3.   The following table defines the requirements for the 
  4359.              implementation of the options defined in previous 
  4360.              sections:
  4361.  
  4362.                                                 Class
  4363.                                             0     1    2     3    4
  4364.  
  4365.         TPDU with Checksum                 no    no   no    no    m
  4366.         TPDU without Checksum               m     m    m     m    o
  4367.  
  4368.         Expedited Data Transfer            no     m    m     m    m
  4369.         No Expedited Data Transfer          m     m    m     m    m
  4370.  
  4371.         Flow Control in Class 2            no    no    m    no   no
  4372.         No Flow Control in Class 2         no    no    o    no   no
  4373.  
  4374.         7 bits format (normal)             m     m    m     m    m
  4375.         31 bits format (extended)          no    no    o     o    o
  4376.  
  4377.         Use of Receipt Confirmation in     no     o   no    no   no
  4378.         Class 1
  4379.         No use of Receipt Confirmation in  no     m   no    no   no
  4380.         Class 1
  4381.  
  4382.         Use of Network Expedited in Class  no     o   no    no   no
  4383.         1, if T-EXPEDITED DATA necessary
  4384.  
  4385.         No use of Network Expedited in     no     m   no    no   no
  4386.         Class 1, if T-EXPEDITED DATA necessary
  4387.  
  4388.         o  -  optional:     An implementation may or may not 
  4389.                             provide this user-selected option.
  4390.  
  4391.         m  -  mandatory:    An implementation must provide for this 
  4392.                             option
  4393.  
  4394.         no  -               An implementation shall not provide 
  4395.                             this option.
  4396.  
  4397.         4.   Implementations claiming conformance shall support a 
  4398.              TPDU length of 128 octets.  If larger maximum TPDU 
  4399.  
  4400. ISO Transport Protocol Specification                                   Page 82
  4401. International Standards Organization
  4402.  
  4403.  
  4404.              sizes can be supported in Classes 1,2,3, or 4, then 
  4405.              all permitted TPDU sizes between the maximum and 128 
  4406.              octets shall be supported.
  4407.  
  4408.         5.   Claims of conformance shall state:
  4409.  
  4410.              a)  which class of protocol is supported.
  4411.  
  4412.              b)  which additional options indicated by the letter 
  4413.              'o' in the above table are supported.
  4414.