home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-st2-state-02.txt < prev    next >
Text File  |  1996-10-28  |  106KB  |  2,463 lines

  1.  
  2. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  3.                                                            M. Rajagopal
  4. Expiration: April 27, 1997                               S. Sergeant
  5. File: draft-ietf-st2-state-02.txt
  6.  
  7.  
  8.  
  9.                 Internet Stream Protocol Version 2 (ST2)
  10.                  Protocol State Machines - Version ST2+
  11.  
  12.  
  13.  
  14.  
  15.                             Status of this Memo
  16.  
  17.    This document is an Internet-Draft. Internet-Drafts are working
  18.    documents of the Internet Engineering Task Force (IETF), its Areas
  19.    and Working Groups. Note that other groups may also distribute
  20.    working documents as Internet-Drafts.  Internet-Drafts are draft
  21.    documents valid for a maximum of six months. Internet-Drafts may be
  22.    updated, replaced, or obsoleted by other documents at any time. It is
  23.    not appropriate to use Internet-Drafts as reference material or cite
  24.    them other than as "work in progress".  To learn the current status
  25.    of any Internet-Draft, please check the "lid-abstracts.txt" listing
  26.    contained in the Internet-Drafts Shadow directories on
  27.    ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu
  28.    (US West Coast), or munnari.oz.au (Pacific Rim).
  29.  
  30.    Abstract:
  31.  
  32.    This memo contains a description of state machines for the revised
  33.    specification of the Internet STream Protocol Version 2 (ST2+)
  34.    described in RFC 1819. The state machines in this document are
  35.    descriptions of the ST2+ protocol states and message sequence
  36.    specifications for normal behavior. Exception processsing issues are
  37.    defined and discussed for protocol compliance and implementation
  38.    options.
  39.  
  40.    Editor's Note:
  41.  
  42.    This memo is available both in ASCII format (file: draft-ietf-ST-
  43.    state-02.txt) and in PostScript (file: draft-ietf-ST-state-02.ps).
  44.    The PostScript version contains the essential state diagrams and is
  45.    absolutely required.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. Rajagopal, Sergeant         Expires April 26, 1997[Page 1]
  55.  
  56. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  57.  
  58.  
  59.    TABLE OF CONTENTS
  60.  
  61.  
  62.  
  63.       1   Introduction                                               4
  64.  
  65.       2   ST Agent Architecture                                      6
  66.           2.1     ST Protocol Characteristics                        6
  67.           2.2     The Stream FSM M odel                              7
  68.           2.3     ST Agent Roles  in an Internetwork                 7
  69.           2.4     The ST Agent Model                                 8
  70.           2.5     Origin, Next Hop, Previous Hop and
  71.                    Target Finite State                              10
  72.           2.6     Stream Finite State Machines                      11
  73.           2.6.1   Externally Communicating FSMs                     11
  74.           2.6.2   Internally Communicating FSMs                     11
  75.           2.7     Queues between External Communicating FSMs        11
  76.           2.8     Queues Inside an Agent                            12
  77.  
  78.       3   Stream Finite State Machines                              12
  79.           3.1     Assumptions                                       14
  80.           3.2     State Machine Model Conventions                   15
  81.           3.2.1   Naming Conventions and Notations                  15
  82.           3.2.2   Transmissions and Receptions                      15
  83.           3.2.3   Predicates                                        15
  84.           3.3     Normal Behavior versus Exception Processing       16
  85.           3.3.1   Context not Represented in Stream FSMs            17
  86.           3.3.2   Special Message Types                             17
  87.           3.3.3   Classes of Response Types                         18
  88.           3.4     Stream State Machines.                            19
  89.           3.4.1   Origin State Machine (OSM)                        19
  90.           3.4.2   Next Hop State Machine (NHSM)                     22
  91.           3.4.3   Previous Hop State Machine (PHSM)                 26
  92.           3.5     The Target State Machine (TSM)                    27
  93.  
  94.       4   ST Agent FSMs                                             29
  95.           4.1     Agent Database Context                            29
  96.           4.2     ST Dispatcher role for incoming Packet-switching, 30
  97.           4.3     ST Dispatcher functions for outgoing
  98.                    Packet switching, timer                          33
  99.           4.4     Retry FSM- RFSM for datalink reliability of
  100.                    PDU transmissions                                33
  101.           4.5     Agent , Neighbor and Stream Supervision           35
  102.           4.5.1   The MonitorFSM (MFSM) for Agent and Stream
  103.                    Supervision                                      35
  104.           4.5.2   The Nieghbor Detection Failure FSM for Neighbor
  105.                     Management                                      36
  106.           4.5.3   Service Model Interactions                        37
  107.  
  108.  
  109.  
  110. Rajagopal, Sergeant         Expires April 26, 1997[Page 2]
  111.  
  112. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  113.  
  114.  
  115.       5   Exception Processing                                      37
  116.           5.1     Additional Exception Processing                   38
  117.           5.1.1   ST Dispatcher detected inconsistencies
  118.                    Reason Codes:                                    38
  119.           5.1.2   MonitorFSM issues with neighbor failure and
  120.                    stream recovery                                  38
  121.           5.1.3    Retry and Timeout Failures Reason Codes:         39
  122.           5.1.4   Routing issues Reason Codes:                      39
  123.           5.1.5    LRM issue Reason Codes:                          40
  124.  
  125.       6   APPENDIX                                                  41
  126.           6.1     Glossary                                          41
  127.           6.2     ST Control Message Flow                           43
  128.           6.2.1   Message Type                                      43
  129.           6.2.2   Response                                          44
  130.           6.2.3   Possible causes for messages                       44
  131.           
  132.           ACKNOWLEDGEMENTS and AUTHORS                              45
  133.           LIST OF REFERENCES                                        45
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163. Rajagopal, Sergeant         Expires April 26, 1997[Page 3]
  164.  
  165. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  166.  
  167.  
  168.    1   Introduction
  169.  
  170.    This section gives a brief overview of the ST protocol terms and the
  171.    protocol Finite State Machine (FSM) issues addressed in this document.
  172.    It is assumed that the reader is familiar with the ST2+ Protocol
  173.    Specification document listed in [1]. Unless otherwise stated, ST in
  174.    this document refers to the enhanced ST protocol (ST2+).
  175.  
  176.    ST2+ is a connection-oriented internetworking protocol that operates
  177.    at the same layer as connectionless IP.  An ST stream is defined as a
  178.    connection established between an Origin sending data to one or more
  179.    Targets.  An ST Agent is a network node that participates in resource
  180.    reservation negotiations during stream setup along the path between
  181.    the Origin and Targets. The resource reservation request is based on
  182.    a Flow Specification sent by the Origin. The FlowSpec provides the
  183.    basis for the negotiated Quality of Service (QOS).
  184.  
  185.    This QOS is only established, monitored and maintained by nodes with
  186.    ST Agent capabilities.  Each hop in the ST stream routing tree is an
  187.    ST Agent.  ST Agents that are one hop away from a given node are
  188.    called Previous-Hops in the upstream direction and Next-Hops in the
  189.    downstream direction. ST Agent Previous-Hop and Next-Hop Agents are
  190.    called ST neighbors.
  191.  
  192.    Data transfer in the ST stream is simplex in the downstream
  193.    direction.  As such, a single Origin sending data to many Targets is
  194.    similar to a media broadcast model. However, each ST Agent may
  195.    simultaneously need to perform Origin, Previous-Hop, Next-Hop and
  196.    Target functions for a number of different streams. These streams may
  197.    be part of a conference ( as in the telephone model) or Group of
  198.    related streams, such that resource reservation and routing issues
  199.    may be interrelated. The streams may also be unrelated to each other,
  200.    but ranked by Precedence within an internetwork in the event that
  201.    limited or changing resources need to be reallocated. Origin
  202.    applications may request an automatic Recovery option in the event of
  203.    network failure or a Change to the QOS after the original setup.
  204.    Target applications may send a request to a stream ST Agent to allow
  205.    that Target to Join the stream, with or without Notifying the Origin.
  206.  
  207.    Thus, an ST Agent may be required to support a complex web of
  208.    intersecting streams with competing QOS requirements and changing
  209.    resource allocations or members. The ST Service Model supports the ST
  210.    protocol and ST QOS features for routing, resource management and
  211.    packet-switching.  This Protocol State Machine document addresses the
  212.    ST protocol in any ST Agent, regardless of the implementation
  213.    specifics of the ST Service Model.
  214.  
  215.    Stream Control Message Protocol (SCMP) messages form a request-
  216.  
  217.  
  218.  
  219. Rajagopal, Sergeant         Expires April 26, 1997[Page 4]
  220.  
  221. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  222.  
  223.  
  224.    response protocol where the particulars of the Flow Specification, as
  225.    well as other Protocol Data Unit (PDU) parameters, are interpreted by
  226.    the chosen QOS algorithms for routing, Local Resource Management
  227.    (LRM) and packet-switching. The ST2+ Specification explicitly defines
  228.    all required and allowable, functions and sequences of SCMP message
  229.    operations. The SCMP message types are: ACCEPT, ACK, CHANGE, CONNECT,
  230.    DISCONNECT, ERROR, HELLO, JOIN, JOIN-REJECT, NOTIFY, REFUSE, STATUS,
  231.    STATUS-RESPONSE.
  232.  
  233.    An ST Agent will direct incoming SCMP messages to the appropriate
  234.    FSMs for each stream.  An Origin State Machine (OSM) is associated
  235.    with every Origin ST application. A Next-Hop State Machine (NHSM) is
  236.    associated with every downstream ST neighbor. A Previous-Hop State
  237.    Machine (PHSM) is associated with every upstream ST neighbor. A
  238.    Target State Machine (TSM) is associated with every Target ST
  239.    application.
  240.  
  241.    The OSM, NHSM, PHSM and TSM have the same four fundamental states:
  242.    IDLE, ESTABLISHED, ADD and CHANGE. The basic transition from IDLE to
  243.    ESTABLISHED is through a CONNECT request with an ACCEPT response.
  244.    Additional CONNECT and JOIN requests may result in an ADD stream
  245.    state, while a CHANGE request would result in a CHANGE stream state.
  246.    DISCONNECT and REFUSE messages may remove one or more Targets while
  247.    the stream is in any state.
  248.  
  249.    A Retry FSM is used to monitor the datalink reliability between ST
  250.    Agents. Each SCMP request-response sequence is defined with next hop
  251.    ACKnowledgement,  ERROR, timeout and retry conditions. Such exception
  252.    processing is designed to resolve incomplete functions during times
  253.    of network or ST Agent failure.
  254.  
  255.    A Monitor FSM is used to manage ST neighbor and stream Recovery
  256.    issues for all streams managed by the ST Agent.  Each ST Agent
  257.    maintains state information describing the streams flowing through
  258.    it, and can actively gather and distribute such information.
  259.  
  260.    If, for example, an Intermediate ST Agent fails, the neighboring
  261.    Agents can recognize this via HELLO messages that are periodically
  262.    exchanged between the ST Agents that share streams. STATUS packets
  263.    can be used to ask other ST Agents about a particular stream. These
  264.    agents then send back a STATUS-RESPONSE message. NOTIFY messages
  265.    serve to inform ST Agents of additional mangement information.
  266.  
  267.  
  268.    ST Reason Codes are used to inform other ST Agents of the source and
  269.    type of problem such that the correct response sequences will be
  270.    followed.  These Reason Codes are inserted in the appropriate SCMP
  271.    PDUs and available to the ST Agent management functions. Thus an ST
  272.  
  273.  
  274.  
  275. Rajagopal, Sergeant         Expires April 26, 1997[Page 5]
  276.  
  277. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  278.  
  279.  
  280.    Agent not only manages the normal request- response protocol between
  281.    the Origin and Targets of each stream, but also is actively involved
  282.    in the detection and distribution of error and QOS implications.
  283.  
  284.    The ST Agent architecture and FSM models contained in this document
  285.    have been chosen to illustrate a method for an ST2+ protocol
  286.    implementation.  There are many alternative techniques. Every effort
  287.    has been made to note the relevant tradeoffs between protocol
  288.    requirements and implementation choices. The atomic components of this
  289.    model may be rearranged to accomodate platform and implementation
  290.    issues. Every effort has been made to ensure that the described state
  291.    tables accurately reflect state transitions of the ST2+ version of
  292.    SCMP, and that the described state diagrams accurately reflect the
  293.    state transition tables. If there are discrepancies, the tables take
  294.    precedence over the diagrams and the protocol specification takes
  295.    precedence over the tables.
  296.  
  297.  
  298.  
  299.    Section 2  ST Agent Architecture describes the organization of the
  300.    ST Agent model. Section 3 Stream Finite State Machines describes the
  301.    OSM, NHSM, PHSM and TSM Section 4 Agent Finite State Machines
  302.    describes the Monitor and Retry FSMs. Section 5 Exception Processing
  303.    Issues details the Reason Codes by category.
  304.  
  305.    2   ST Agent Architecture
  306.  
  307.    This section describes the ST Agent Finite State Machines (FSMs). The
  308.    architectural descriptions are necessarily at a high level and are
  309.    meant to serve as a guide to the protocol implementer. The state
  310.    machine models are expected to provide the implementer with useful
  311.    information such as valid message sequences.  The ST2+ Specification
  312.    provides the fully documented message detail.
  313.  
  314.    2.1     ST Protocol Characteristics
  315.  
  316.    The ST Agent FSM architecture is organized in a hierarchy of ST2
  317.    protocol characteristics. The characteristics are modeled as Agent
  318.    roles (i.e., Origin, Intermediate, Target, Previous Hop and Next
  319.    Hop), as well as protocol functions (e.g., individual SCMP
  320.    Request/Response patterns and reliability at both the PDU and Agent
  321.    level).
  322.  
  323.    Figure 1.  ST Agent Roles
  324.  
  325.    Each ST Agent has an ST Dispatcher to filter incoming PDUs, intercept
  326.    semantic errors and direct valid PDUs to the appropriate queues and
  327.    FSMs. FIFO queues and a Message Separator/Combinator in each ST Agent
  328.  
  329.  
  330.  
  331. Rajagopal, Sergeant         Expires April 26, 1997[Page 6]
  332.  
  333. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  334.  
  335.  
  336.    provide additional intra-Agent FSM communications.
  337.  
  338.    Table 1 below shows the Request/Response patterns of each SCMP
  339.    message name by the Agent type generating the message. The message
  340.    type may be either a Request, a Response or a local control for the
  341.    Agent and PDU reliability functions. The message direction can be
  342.    downstream (towards a Target) or upstream (towards the Origin). The
  343.    Monitor FSM and the Retry FSM manage network, Agent and link
  344.    reliability status with the local control SCMP messages.
  345.  
  346.  
  347.  
  348.    Table 1: Request/Response Patterns
  349.  
  350.  
  351.    2.2      The Stream FSM Model
  352.  
  353.    Figure 2 below shows the relationship between the ST Agents and FSMs
  354.    in each stream.
  355.  
  356.  
  357.  
  358.    Figure 2.  Stream FSM Model
  359.  
  360.    The Origin State Machine (OSM) provides communications between an
  361.    Origin application and one or more Next Hop State Machines (NHSM).
  362.  
  363.    An Intermediate Agent's Previous Hop State Machine (PHSM) has
  364.    communications with an Origin Agent's Next Hop State Machine (NHSM)
  365.    through their common network link and the respective Agent's ST
  366.    Dispatchers. In the same fashion, an Intermediate Agent's Next Hop
  367.    State Machine (NHSM) has communications with Intermediate and/or
  368.    Target Agent's Previous Hop State Machines(PHSM).
  369.  
  370.    The Target State Machine (TSM) provides communications between a
  371.    Target application and a Previous Hop State Machine (PHSM) in the
  372.    Target Agent.
  373.  
  374.  
  375.  
  376.    Figure 3.  Internetwork Diagram of ST Agent Roles
  377.  
  378.    2.3      ST Agent Roles in an Internetwork
  379.  
  380.    The internetwork diagram of ST Agents (Figure 3) indicates the Origin
  381.    (O), Intermediate (I) and Target (T) roles of each ST Agent in a
  382.    conference with 4 Origins. The Intermediate Agents I1, I2, I3 and I4
  383.    are each neighbors of an ST Agent acting as both an Origin and a
  384.  
  385.  
  386.  
  387. Rajagopal, Sergeant         Expires April 26, 1997[Page 7]
  388.  
  389. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  390.  
  391.  
  392.    Target for the other Origins. Each Origin is sending data in one
  393.    outgoing stream to three Targets, and simultaneously recieving data
  394.    on 3 incoming streams from the other Origins.
  395.  
  396.    All ST Agents in this illustration have multiple ST neighbors,
  397.    streams and interfaces to manage. Each ST Agent may be required to
  398.    manage multiple FSMs for any one stream, as well as all competitive,
  399.    intersecting streams in the internetwork topology.
  400.  
  401.    ST neighbor communications and SCMP exception processing can be used
  402.    to create a first line of defense for the ST stream FSMs.  Normal
  403.    operations for stream FSMs may be protected and simplified.  Network
  404.    errors and conflicting message sequences can be filtered out of the
  405.    fundamental stream state transitions.
  406.  
  407.    2.4     The ST Agent Model
  408.  
  409.    In Figure 4 , an ST Agent is depicted with an ST Dispatcher sending
  410.    and receiving ST PDUs from interface queues (and PDU surrogates from
  411.    application interfaces), representing a high order ST message
  412.    management scheme. This dispatcher unpacks or forwards incoming PDUs,
  413.    and creates and forwards outgoing PDUs.
  414.  
  415.  
  416.  
  417.    Figure 4.  ST Agent Model
  418.  
  419.    The forwarding of data or the forwarding of certain command sequences
  420.    that are not following a negotiatied QOS path (i.e., JOIN and/or JOIN
  421.    flooding messages) requires a packet-forwarding mechanism, separate
  422.    from the stream operations that unpack, interpret or create PDUs. The
  423.    efficient packet switching of ST PDUs through Intermediate hops is
  424.    the main reason for this filtering priority.
  425.  
  426.    A first level of filtering is designed to determine whether the
  427.    incoming PDU (or PDU surrogate) is data or one of the JOIN sequences
  428.    where the destination is, in fact, another ST Agent or an
  429.    application.  Such PDUs are then forwarded to the destination,
  430.    whether a resident Target or for replication to multiple Next-hop
  431.    Targets.
  432.  
  433.    The ST PDU validation and delivery functions manage information about
  434.    the the messaging success or failure, i.e. the Retry, timeout, ERROR
  435.   ,  or ACK status of messages. This information concerns datalink,
  436.    Agent and network reliability.  Stream state transitions may occur as
  437.    a result.
  438.  
  439.    Many Retry and Monitor FSM transitions may occur while any particular
  440.  
  441.  
  442.  
  443. Rajagopal, Sergeant         Expires April 26, 1997[Page 8]
  444.  
  445. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  446.  
  447.  
  448.    stream state exists. The Monitor FSM interprets and sends messages
  449.    with information relevant to multiple streams,  i.e., HELLO, STATUS,
  450.    STATUS-RESPONSE,  NOTIFY.
  451.  
  452.    Second-level filtering occurs when an ST Agent validates incoming
  453.    SCMP PDUs and sends the required ACKnowledge (or ERROR PDU, if there
  454.    are semantic errors) to the originator of the incoming PDU.
  455.    Conversely, incoming ACKnowledgement and ERROR PDUs trigger the Retry
  456.    FSM, where the timeout and retry values are updated or a signal is
  457.    generated to the appropriate stream FSM for specialized exception
  458.    processing.
  459.  
  460.    All SCMP PDUs, except ACK, ERROR, HELLO, STATUS and STATUS-RESPONSE,
  461.    require an ACK from the next hop Agent upon receipt.  An Agent or
  462.    datalink failure may be detected by either the Retry or the Monitor
  463.    FSM.  A signal is then sent to the appropriate stream FSMs. The
  464.    Monitor FSM then manages a reCONNECT sequence for all streams that
  465.    have specified this Recovery option.
  466.  
  467.    Once an ST Dispatcher has validated and filtered the PDUs, the stream
  468.    SCMP messages are separately queued into Requests (CONNECT, CHANGE,
  469.    JOIN) and Responses (ACCEPT, DISCONNECT, JOIN-REJECT, REFUSE).
  470.    Requests must wait for the completion of any preceding Requests for
  471.    the same stream, while Responses must be handled immediately without
  472.    regard to Request state transitions or queues.
  473.  
  474.    The Request and Response queues are directed to the Origin (OSM),
  475.    Next Hop (NHSM), Previous Hop (PHSM) and Target (TSM) state machines.
  476.    These state machines are referred to as the stream state machines,
  477.    rather than the Agent state machines.
  478.  
  479.    The stream state machines are designed to focus on normal (typical)
  480.    behavior rather than all pathological cases. Error control and
  481.    recovery in the architecture (i.e., ST Dispatcher filters, Monitor
  482.    and Retry FSMs) provide a firewall against many problems in the
  483.    stream FSMs.
  484.  
  485.    However, when the architecture of a particular Agent platform has ST
  486.    intra-Agent communications that are actually between multiple
  487.    processors, the Next-hop and Previous-hop FSM communications may
  488.    require the concept of multiple ST Agents within what might otherwise
  489.    appear to be one ST Agent. Thus the rationale for the filtering and
  490.    queueing of the SCMP messages,  not just the particular method of
  491.    illustration, is very important to the ST Agent Model.
  492.  
  493.    The convention of discussing issues in terms of individual stream
  494.    state transistions will be used throughout Section 3 (Stream FSMs) as
  495.    a way of simplifying the discussion. Section 4 (ST Agent FSMs) and
  496.  
  497.  
  498.  
  499. Rajagopal, Sergeant         Expires April 26, 1997[Page 9]
  500.  
  501. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  502.  
  503.  
  504.    Section 5 (Exception Processing) will provide more detail about the
  505.    architecture, filtering and queues used with the stream FSMs, such
  506.    that network failures can be managed with competing and intersecting
  507.    streams.
  508.  
  509.    2.5     Origin, Next Hop, Previous Hop and Target Finite State
  510.    Machines
  511.  
  512.    Communicating Finite State Machine (CFSM) models have been
  513.    extensively used in the trade to formally describe protocol behavior
  514.    [2]. Many variations of the basic CFSM model exist and our model is
  515.    also a variation of the basic model. Our model uses the basic CFSM
  516.    model with FIFO queues combined with predicates. The model describes
  517.    the ST protocol behavior and consists of ST SCMP messages along with
  518.    a number of predicates. These predicates are not part of the formal
  519.    ST Protocol specifications but are useful mechanisms that simplify
  520.    the state machine specifications
  521.  
  522.    Origin, Intermediate and Target ST Agents in Figure 2 are all modeled
  523.    separately. Because a stream diverges in a tree-like graph, every
  524.    Intermediate ST Agent has to communicate with one upstream ST Agent
  525.    and one or more downstream Agents.  An Intermediate Agent will
  526.    therefore have exactly one PHSM and one or more NHSMs for each
  527.    stream. Note that, it is possible to have more than one NHSM per
  528.    physical interface, when that interface has more than one Agent on
  529.    the associated communications link.
  530.  
  531.    The state machine model architecture at an Origin is similar to the
  532.    state machine architecture at an Intermediate (Figure  2). The Origin
  533.    may have one or more NHSMs. There is no PHSM in this case. However,
  534.    in the place of the PHSM there is an Origin State Machine (OSM) which
  535.    interfaces with the application. An OSM is a special case of the
  536.    PHSM.
  537.  
  538.    The Target is modeled with one PHSM (Figure  2). There are no NHSMs in
  539.    this example. However, in the place of a NHSM there are one or more
  540.    Target State Machine (TSM) that interface with the application. The
  541.    TSM is a special case of the NHSM.
  542.  
  543.    Because the role of each ST Agent (Origin, Intermediate, or Target)
  544.    is different, the finite state machine models are not identical.
  545.    However, the model for communication between FSMs inside or outside
  546.    an Agent is uniform.
  547.  
  548.    Consider a stream topology shown in Figure 2. The figure shows an ST
  549.    Origin (O) connected to 2 Intermediate Agents (I1 and I3). I1 is also
  550.    connected to I2 and a target T2. I2 is connected to Target T1 and I3
  551.    is connected to Targets T3 and T4.
  552.  
  553.  
  554.  
  555. Rajagopal, Sergeant         Expires April 21, 1996            [Page 10]
  556.  
  557. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  558.  
  559.  
  560.    The Origin is modeled with one OSM and 2 NHSMs (one per next hop).
  561.    Each Target is modeled with one PHSM and one or more TSMs.  I1 and I3
  562.    are both modeled with one PHSM and 2 NHSMs; I2 is modeled with one
  563.    PHSM and 2 NHSMs.
  564.  
  565.    2.6     Stream Finite State Machines
  566.  
  567.    2.6.1   Externally Communicating FSMs
  568.  
  569.    Communication between two ST agents is External Communication and
  570.    always happens between a NHSM and a PHSM pair (see Figure 2). Note
  571.    that, in the case of Origin and Target Agent as direct neighbors, it
  572.    is possible for a Target to be directly connected to an Origin.  It
  573.    is also possible that one Target Agent is an Intermediate Agent for
  574.    another Target in which case an Agent will have a PHSM communicating
  575.    with a TSM and one or more NHSMs.
  576.  
  577.    2.6.2   Internally Communicating FSMs
  578.  
  579.    Communicating entities inside an ST Agent is different for each Agent
  580.    type, i.e., Origin, Intermediate or Target. However, all FSMs inside
  581.    an Agent communicate via a Message Separator/Combiner box (MS/C). The
  582.    function of the MS/C box is described later in this section.
  583.  
  584.    Internal Communication within the Origin occurs:
  585.  
  586.        o   between the OSM and an Upper Layer module and
  587.  
  588.        o   between the OSM and one or more NHSMs via a MS/C box (Note
  589.    that the NHSMs themselves do not communicate with each other)
  590.  
  591.    Internal Communication within a Target occurs:
  592.  
  593.        o   between one or more TSMs and an Upper Layer module and
  594.  
  595.        o   between the TSM and a PHSM via a MS/C box
  596.  
  597.    Internal Communication within an Intermediate Agent occurs:
  598.  
  599.        o    between a PHSM and one or more NHSMs via a MS/C box (Note
  600.    that the NHSMs themselves do not communicate with each other)
  601.  
  602.    2.7     Queues between External Communicating FSMs
  603.  
  604.    For the purposes of modelling, assume that messages are filtered and
  605.    queued in FIFO queues for the case of external Communicating FSM
  606.    pairs, i.e. between any two ST Agents. However, as indicated in the
  607.    previous discussion and diagrams of the ST dispatcher and filtering
  608.  
  609.  
  610.  
  611. Rajagopal, Sergeant         Expires April 21, 1996            [Page 11]
  612.  
  613. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  614.  
  615.  
  616.    hierarchy, it is somewhat more complex in reality. The concept shown
  617.    below in Figure 5 allows the discussion of the inter-Agent and
  618.    intra-Agent state machines to focus on the stream FSM issues without
  619.    regard to message and neighbor management issues.
  620.  
  621.  
  622.  
  623.    Figure 5.  Implicit Queues between an External Communicating FSM pair
  624.  
  625.    2.8     Queues Inside an Agent
  626.  
  627.    Each Agent is modeled with at least 2 state machines for each stream.
  628.    These state machines also need to communicate just like the external
  629.    communicating FSM pairs described above. The queue model in this case
  630.    also requires filtering mechanisms.  This model requires a message
  631.    Separating and Combining function shown as Message Separator/Combiner
  632.    (MS/C) box in Figure  6.
  633.  
  634.    Figure 6 pictorially describes the multi-stage FIFO queue model for
  635.    an Agent. Implicit FIFO queues are assumed between the PHSM and the
  636.    MS/C, and also between the MS/C and one or more NHSMs. Use of such
  637.    FIFO queues eliminates the need for a separate synchronizing state
  638.    machine that would normally be required to synchronize the flows.
  639.  
  640.    Figure 6.  Queues between Internal Communicating FSMs inside an Agent
  641.  
  642.    The function of this Message Separator/Combiner box is many:
  643.  
  644.        o   Performing a multicasting function by replicating an OSM or
  645.    PHSM message and sending them to different NHSMs or TSMs
  646.  
  647.        o   Combining messages coming from different TSMs or NHSMs and
  648.    sending them to the appropriate OSM or PHSM
  649.  
  650.    Designing the Agent to contain separate upstream and downstream state
  651.    machines (PHSM and NHSMs respectively) with FIFO queues as shown in
  652.    Figure 6, offers several benefits:
  653.  
  654.        o   It simplifies the Agent design considerably by separating the
  655.    neighbor upstream and downstream communications
  656.  
  657.        o   Use of FIFO queues simplifies the Agent management since no
  658.    other synchronization mechanisms need to be used to streamline
  659.    messages flowing through the Agent.
  660.  
  661.    3   Stream Finite State Machines
  662.  
  663.    Each ST Agent must maintain state for each stream supported by that
  664.  
  665.  
  666.  
  667. Rajagopal, Sergeant         Expires April 21, 1996            [Page 12]
  668.  
  669. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  670.  
  671.  
  672.    Agent. There are many ways to represent the state that must be
  673.    maintained by Agents. This section presents the OSM, NHSM, PHSM and
  674.    TSM as a reference set of state machines.
  675.  
  676.    Implementations may support machines based on this section or may
  677.    even support a completely different set of state machines.  These
  678.    stream FSMs represent normal operations for the stream request-
  679.    response scenarios without regard to the functions performed by the
  680.    Retry and Monitor FSMs.  The model assumes that a data engine
  681.    separate from the control engine exists.
  682.  
  683.    This section represents stream state through four state machines. The
  684.    defined machines are:
  685.  
  686.        o   The Origin State Machine, or OSM. It represents the state of
  687.    a stream at the Origin Agent.
  688.  
  689.        o   The Next-Hop State Machine, or NHSM. It represents the state
  690.    of the stream for Targets reached via a particular next-hop.
  691.  
  692.        o   The Previous-Hop State Machine, or PHSM. It represents the
  693.    state of a stream at an Intermediate Agent or a Target Agent. The OSM
  694.    is essentially a special case of the PHSM, where the delivery of SCMP
  695.    to the Origin is via an API.
  696.  
  697.        o   The Target State Machine, or TSM. It represents the state of
  698.    a stream for a particular target application at the Target Agent.
  699.    This state machine is essentially a special case of the NHSM, where
  700.    there is only a ever a single Target per TSM and delivery of SCMP to
  701.    the Target is via an API.
  702.  
  703.    A number of NHSMs related to the same stream, could conceivably all
  704.    be running in parallel -one for each next hop. In some cases, where
  705.    there is a network-layer multipoint link (e.g., ethernet), it is even
  706.    possible to have more than one NHSM associated with the same physical
  707.    interface.
  708.  
  709.    A Message Separator/Combiner (MS/C) box separates all downstream
  710.    messages modifying the Targetlist and placing them in the respective
  711.    NHSM FIFO queues. The MS/C box also functions as a combiner of
  712.    messages flowing up stream. In this role it multiplexes all local
  713.    messages and places them in the PHSM FIFO queues. Note that the MS/C
  714.    relies on separate routing and LRM functions to determine the
  715.    appropriate separation since route and resource computation is not
  716.    part of ST protocol. Full-duplex FIFO queues are assumed between the
  717.    MS/C box and PHSM, and also between the MS/C box and the NHSMs.
  718.  
  719.    The multi-machine Agent model breaks the complexity that results with
  720.  
  721.  
  722.  
  723. Rajagopal, Sergeant         Expires April 21, 1996            [Page 13]
  724.  
  725. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  726.  
  727.  
  728.    only one large model with the aid of the FIFO queue buffers and a
  729.    MS/C box. The FIFO queues eliminate the need for a separate
  730.    synchronizing state machine while reducing the complexity.  The MS/C
  731.    reduces the explicit next-hop identification modelling that would
  732.    otherwise be required.
  733.  
  734.    The Intermediate Agent PHSM always communicates with a NHSM on the
  735.    upstream side and the NHSM always communicates with a PHSM on the
  736.    downstream side.
  737.  
  738.    3.1      Assumptions
  739.  
  740.    Some basic assumptions were made as part of the development of the
  741.    enclosed state machines. These included:
  742.  
  743.        o   All state machines exist as part of an ST Agent and that the
  744.    Agent will instantiate state machines as needed to represent state on
  745.    a per stream basis.
  746.  
  747.        o   The ST Agent implements logic that unpacks incoming SCMP
  748.    packets, validates the contents, updates the Agent databases and
  749.    routes the message signal to the appropriate stream and it's
  750.    associated state machine.
  751.  
  752.        o   Detection and handling of messages that are broken,
  753.    duplicates, or not valid for a particular stream state does not
  754.    affect stream state and is not represented in the state machines. The
  755.    mechanisms to prevent such misleading signals to individual state
  756.    machines are described in the Architecture, Agent FSM and Exception
  757.    Processing Sections.
  758.  
  759.        o   All reliable delivery of intra- and inter-Agent SCMP messages
  760.    is handled by the ST Agent independent of the described state
  761.    machines except in the case where stream state is dependent on the
  762.    outcome of the message delivery.
  763.  
  764.        o   All communication within the same Agent should follow the
  765.    same Request Response paradigm as inter-Agent messages in order to be
  766.    as reliable as SCMP communications. This assumes that all API
  767.    communications and intra-agent communications recreate the
  768.    reliability available with the ACK, timeout and retry paradigms. It
  769.    is an implementation specific choice.
  770.  
  771.        o   The described state tables accurately reflect state
  772.    transitions of the ST2+ version of SCMP.  The described state
  773.    diagrams accurately reflect the state transition tables for all
  774.    states, input trigger events and state transitions. Output events are
  775.    not shown in the diagrams, but are detailed in the tables. If there
  776.  
  777.  
  778.  
  779. Rajagopal, Sergeant         Expires April 21, 1996            [Page 14]
  780.  
  781. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  782.  
  783.  
  784.    are discrepancies, the tables take precedence over the diagrams and
  785.    the protocol specification takes precedence over the tables.
  786.  
  787.        o   API notations for the Origin and Target ST applications are
  788.    shown to illustrate the OSM and TSM interactions. The actual
  789.    defintion of an ST application API is outside the scope of this
  790.    document.
  791.  
  792.    3.2     State Machine Model Conventions
  793.  
  794.    3.2.1   Naming Conventions and Notations
  795.  
  796.    All state names are in bold and start out with a capital letter
  797.    followed by the lower case letters. All message names are in capitals
  798.    usually prefixed with a + or - sign. All messages with special
  799.    response conditions have suffixes indicating the condition, i.e.
  800.    _last, _all, _change. Predicates are in bold and lower case string.
  801.  
  802.  
  803.  
  804.    Tables show states, events, output, and transitions. Diagrams show
  805.    states, events and transitions. Initial states are indicated by an
  806.    asterisk "*".
  807.  
  808.    Messages that trigger events are proceeded by a plus sign "+".
  809.  
  810.    Outputs are proceeded by a minus sign "-".
  811.  
  812.    Transitions are represented by arrows in the diagrams and by ">>" in
  813.    the tables.
  814.  
  815.    3.2.2   Transmissions and Receptions
  816.  
  817.    In all the state machine models, the standard convention of prefixing
  818.    message transition labels, with a + or - symbol, is used to
  819.    explicitly indicate a transmission and reception respectively. The
  820.    prefixes are not part of the message syntax. In addition, the tables
  821.    will show both transmitted and received messages, but the diagrams
  822.    show only recieived messages. This simplifies the diagrams, but the
  823.    tables must be referenced for the message outputs.
  824.  
  825.    3.2.3    Predicates
  826.  
  827.    State transitions are sometimes dictated by conditions outside the
  828.    scope of the protocol specification. Predicates are mechanisms that
  829.    allow such transitions to occur. For example, terminating a protocol
  830.    session (a result of many conditions) should allow the Agent to
  831.    transition to either the initial state or some idle state. This
  832.  
  833.  
  834.  
  835. Rajagopal, Sergeant         Expires April 21, 1996            [Page 15]
  836.  
  837. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  838.  
  839.  
  840.    decision is of course Application-initiated but a means should
  841.    nevertheless exist to allow transitioning to the correct state. In
  842.    the ST protocol there is no message which accomplishes this.
  843.  
  844.    Predicates allow a state machine to express conditions and control
  845.    not explicitly possible with the protocol messages. Generally
  846.    speaking, they add clarity to the state diagram while reducing the
  847.    complexity in terms of states.  The addition of control predicates
  848.    allows user defined change of states. Predicates are meant to give
  849.    hints to the protocol implementer and are not part of the ST
  850.    protocol. A Glossary in the Appendix can be used to check the
  851.    explicit meaning of each message or predicate.
  852.  
  853.    API predicates are used to illustrate the OSM and TSM interactions
  854.    with ST applications. A predicate with an api_ prefix shows an API
  855.    message coming into the FSM. A predicate with an _api suffix shows a
  856.    message being sent to the API from an FSM.
  857.  
  858.    For example, an api_open and an api_close predicate are defined for
  859.    the OSM as a means to transfer control to and from the Init state.
  860.    The Origin application may open or maintain a stream in the Establd
  861.    state without any Targets being active or in the TargetList.
  862.  
  863.    NHSM, PHSM and TSM state machines have corresponding nh_open, ph_open
  864.    and tsm_open predicate definitions to allow the Agent to bring the
  865.    state machine into the Establd state when the Agent is ready to
  866.    process the initial CONNECT. Unlike the OSM, these state machines
  867.    return to the Init state when all Targets have been deleted, so no
  868.    predicate is required to close the NHSM, PHSM or TSM.
  869.  
  870.    Some triggers and events are combinations of implicit and explicit
  871.    message conditions. This is particularly true for the RetryTimeout
  872.    mechanisms, as well as the requirement that responses from all
  873.    Targets in a Request be complete before the Request state can
  874.    complete. See Section 3.3 below.
  875.  
  876.    No attempt has been made to illustrate the API interactions with
  877.    Routing and LRM functions. The results of these interactions affect
  878.    both how the TargetList is partitioned and what Reason Code has been
  879.    included in a DISCONNECT or REFUSE to indicate the source of a
  880.    Request failure. ST Agent management of such failures is discussed in
  881.    Section 4 ST Agent State Machines and Section 5 Exception Processing.
  882.  
  883.    3.3     Normal Behavior versus Exception Processing
  884.  
  885.    The stream FSMs describe the protocol under normal conditions. In
  886.    general, the architecture is designed to protect these stream FSMs
  887.    from error conditions handled in the Monitor and Retry FSMs. The SCMP
  888.  
  889.  
  890.  
  891. Rajagopal, Sergeant         Expires April 21, 1996            [Page 16]
  892.  
  893. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  894.  
  895.  
  896.    messages STATUS, STATUS-RESPONSE, NOTIFY and ERROR, as well as
  897.    detailed error handling will be discussed in both Section 4 and
  898.    Section 5.  Otherwise, if a core message transition is not specified
  899.    from a state, it implicitly means that this message is not allowed
  900.    from that state.
  901.  
  902.    3.3.1    Context not Represented in Stream FSMs
  903.  
  904.    The OSM, NHSM, PHSM and TSM diagrams and tables in this section
  905.    cannot represent state as the complete context of the stream. There
  906.    are context issues that are handled by the ST Agent Dispatcher, Retry
  907.    and Monitor FSMs and ST Agent database implementation. These stream
  908.    FSMs define the atomic elements of stream setup, maintenance and
  909.    teardown.
  910.  
  911.    The G-bit (all Targets), the S-bit (stream Recovery), the I-bit and
  912.    E-bit ( CHANGE stream teardown risk) involve combinations of FSM and
  913.    stream database interactions. The implementor must consider the best
  914.    way to manage these conditions with the other elements of the ST
  915.    Service Model. 
  916.  
  917.    Stream Recovery by the Monitor FSM is modeled such that the
  918.    reconnection heuristics are outside of the basic CONNECT
  919.    functionality in the stream FSMs.  The Monitor FSM initiates stream
  920.    teardown, and then initiates reCONNECT sequences. The individual
  921.    stream FSMs are not directly concerned with the Recovery option.
  922.  
  923.    MTU size limitations may cause multiple SCMP PDUs for the same
  924.    transaction or an SCMP propagation failure. This type of problem is
  925.    managed by the Dispatcher and Retry FSM filtering.
  926.  
  927.    Another issue not specifically addressed in this section is the
  928.    partitioning and management of the TargetList according to the NHSM
  929.    and ST Agent neighbor associated with each Target or set of Targets.
  930.  
  931.    3.3.2    Special Message Types
  932.  
  933.    In addition to the described predicates for API transactions and
  934.    state transitions, there are signals from the Retry FSM for ACK
  935.    failures, a signal for the timer expiration for the End-to-End
  936.    Response to a Request and special conditions for a REFUSE Response to
  937.    a CHANGE.
  938.  
  939.    The Retry FSM issues a RetryTimeout signal when no ACK has been
  940.    received for a Request after the configured number of retries have
  941.    been attempted. This signal is an implicit REFUSE to appropriate PHSM
  942.    or NHSM.
  943.  
  944.  
  945.  
  946.  
  947. Rajagopal, Sergeant         Expires April 21, 1996            [Page 17]
  948.  
  949. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  950.  
  951.  
  952.    In the following FSM explanations, you will note that a RetryTimeout
  953.    is an indicated signal only to the NHSM and the PHSM. The NHSM and
  954.    PHSM provide the inter-Agent communications for the stream FSMs. A
  955.    RetryTimeout is generated by the Retry FSM and forwarded to the
  956.    appropriate PHSM or NHSM, and that FSM then generates the appropriate
  957.    DISCONNECT and REFUSE messages as intra-Agent communications. For
  958.    example, an OSM would receive a REFUSE with Reason Code 41
  959.    RetransTimeout as the result of an NHSM receiving a RetryTimeout.
  960.  
  961.    Once an Origin (or Agent acting as an Origin) receives an ACK to a
  962.    Request in the Retry FSM, the End-to-End Response timer is set for
  963.    the maximum time to wait for Responses to this Request. If this End-
  964.    to-End timer expires before a Response has been recieved, the
  965.    E2ETimeout becomes an implicit REFUSE for all Targets that have not
  966.    yet Responded.  The Retry FSM communicates this failure to OSM (or
  967.    PHSM, in the case of an Agent acting as Origin) as an E2ETimeout. The
  968.    OSM issues the appropriate messages to the API and NHSM.
  969.  
  970.    If a CHANGE request is made with the I-bit set, the LRM may risk
  971.    losing the existing resources to allocate the requested resources. If
  972.    the I-bit is not set, application does not want to risk losing the
  973.    current resources for the sake of a CHANGE. Thus when a REFUSE to a
  974.    CHANGE is recieved, and the E-bit is zero, it means the REFUSE will
  975.    result in stream teardown. This is the normal result of a REFUSE.
  976.    However, if the the E-bit is set, it is a REFUSE_CHANGE, indicating
  977.    only that the CHANGE could not be completed, but the that the stream
  978.    still has the original QOS resources.
  979.  
  980.    3.3.3   Classes of Response Types
  981.  
  982.    The ST2+ protocol requires that all Responses be received from all
  983.    Targets in a TargetList before the Request state transition may be
  984.    completed and any other Request may be processed. The protocol,
  985.    however, allows immediate processing of all DISCONNECT and REFUSE
  986.    messages whether or not they are not initiated by the current
  987.    REQUEST. These requirements result in the need to differentiate three
  988.    classes of Responses.
  989.  
  990.    The first class is a Response that does not have any signifigance for
  991.    state change, where such Responses are not specifically either the
  992.    last one required to complete the TargetList of the current Request,
  993.    nor a deletion of the last of all Targets associated with that
  994.    stream's FSM.  Completion of the Responses for the current TargetList
  995.    is the second class. Removal of the last of all Targets for that
  996.    stream's FSM is the third class.
  997.  
  998.    All Responses in the second and third class are defined by predicates
  999.    that identify the message type with a suffix for either last (class
  1000.  
  1001.  
  1002.  
  1003. Rajagopal, Sergeant         Expires April 21, 1996            [Page 18]
  1004.  
  1005. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1006.  
  1007.  
  1008.    2) or all (class 3). All API references are illustrative and are not
  1009.    intended to fully define the application interface.
  1010.  
  1011.    Class 1 Responses:
  1012.  
  1013.    api_accept, api_disconnect, api_refuse, ACCEPT, DISCONNECT, REFUSE,
  1014.    REFUSE_CHANGE and RetryTimeout indicate that an individual TargetList
  1015.    member has signaled a Response. The api_disconnect, api_refuse,
  1016.    DISCONNECT and REFUSE messages may also be a Request to delete a
  1017.    Target( whether or not it is in the current TargetList of an Add or
  1018.    Change state transaction). Individual and/or Global Target deletion
  1019.    may occur at any time, but any Global (G-bit set) Target Response or
  1020.    deletion Request falls into one of the second two classes.
  1021.  
  1022.    Class 2 Responses:
  1023.  
  1024.    api_accept_last, api_disconnect_last, api_refuse_last, ACCEPT_LAST,
  1025.    DISCONNECT_LAST, REFUSE_LAST, REFUSE_CHANGE_LAST, RetryTimeout_last,
  1026.    E2E_Timeout_last are only relevant to the current stream Request and
  1027.    refer to the completion of the Request state by occurring as the
  1028.    Response that incidently completes the TargetList.
  1029.  
  1030.    Class 3 responses:
  1031.  
  1032.    api_disconnect_all, api_refuse_all, DISCONNECT_ALL and REFUSE_ALL
  1033.    refer to the Requests or Responses that remove the last active Target
  1034.    from that FSM for that stream.
  1035.  
  1036.    These classes delineate the asynchronous Request/Response activity
  1037.    that may occur. Network conditions may result in interruptions of any
  1038.    stream FSM operation.
  1039.  
  1040.    The OSM, NHSM, PHSM and TSM diagrams and tables in this section
  1041.    define stream state as it relates to atomic setup and teardown
  1042.    functions. Every attempt has been made to delineate the atomic SCMP
  1043.    request-response specifications such that implementors may reorganize
  1044.    the Agent architecture to address implementation-specific issues.
  1045.  
  1046.    3.4      Stream State Machines
  1047.  
  1048.    3.4.1   Origin State Machine (OSM)
  1049.  
  1050.    The Origin State Machine (OSM) communicates with one or more NHSMs.
  1051.    The OSM also talks to the Upper Layer module via primitives. This OSM
  1052.    to Upper Layer Interface is outside the scope of this document, but
  1053.    examples of API predicates are illustrated in the diagrams and
  1054.    tables.  All ST Dispatcher and MS/C Box diagrams have indicated that
  1055.    API messages could be included. The actual mechanism used for API
  1056.  
  1057.  
  1058.  
  1059. Rajagopal, Sergeant         Expires April 21, 1996            [Page 19]
  1060.  
  1061. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1062.  
  1063.  
  1064.    communications should be decided by implementation factors.
  1065.  
  1066.    The OSM consists of a small number of states: Init, Establd, Add and
  1067.    Change.
  1068.  
  1069.    Init: The initial state is called Init. An api_open predicate moves
  1070.    the control to the Establd state.  An api_close is required to return
  1071.    the stream to the Init state.
  1072.  
  1073.    Establd: The Establd state is the stable state from which all
  1074.    api_connect, JOIN and api_change requests may cause a transition to
  1075.    the Add or Change states. All Requests that occur while a stream is
  1076.    in either an Add or Change state will be queued up until the stream
  1077.    returns to the Establd state. Data transfer may occur to established
  1078.    Targets.  The removal of Targets from previous operations or current
  1079.    operations may occur in the Establd, Add or Change states with an
  1080.    api_disconnect or a REFUSE.
  1081.  
  1082.    It is possible for an Application at the Origin to add new Targets to
  1083.    an existing stream any time after the stream has been established.  A
  1084.    JOIN message received by an OSM indicates that the Origin Agent
  1085.    happens to be the first Agent for that stream in the path between the
  1086.    JOIN originator and the Origin.
  1087.  
  1088.    JOIN messages from potential Targets require the authorization
  1089.    process to determine if the JOIN will be allowed. The OSM then issues
  1090.    either a JOIN-REJECT message or a CONNECT message. If this validation
  1091.    is complete and the stream JOIN option allows authorization to be
  1092.    completed,the ST Agent at the Origin transitions to the Add state and
  1093.    then issues a CONNECT message that contains the SID, the FlowSpec,
  1094.    and the TargetList specifying the new Target, waiting an ACCEPT or
  1095.    REFUSE response.
  1096.  
  1097.    If this is not the case, a JOIN-REJECT message is sent to the Target
  1098.    with the appropriate ReasonCode (e.g., JoinAuthFailure,
  1099.    DuplicateTarget or RouteLoop). Issuing a JOIN-REJECT brings the OSM
  1100.    back to the Establd state.
  1101.  
  1102.    Add:Once in the Establd state the API may issue an api_connect. A
  1103.    transition to Add will create a CONNECT message that is placed in the
  1104.    FIFO queue between the OSM and the MS/C box. The CONNECT message
  1105.    contains the SID, an updated FlowSpec, and a TargetList. The MS/C box
  1106.    will then make a copy of the CONNECT message, partition the
  1107.    Targetlist parameter and place it the NHSMs queues. The spliting (or
  1108.    separating) information is derived from the implementation's routing
  1109.    and LRM functions.
  1110.  
  1111.    Once in the Add state the OSM waits to get ACCEPT or REFUSE
  1112.  
  1113.  
  1114.  
  1115. Rajagopal, Sergeant         Expires April 21, 1996            [Page 20]
  1116.  
  1117. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1118.  
  1119.  
  1120.    responses.  The stream will not transition back to the Establd state
  1121.    until all Targets have responded. A REFUSE may be generated by the
  1122.    local Routing or LRM functions, NHSM or Monitor FSMs as well as any
  1123.    Agent in the path between the Origin and the Target. Normal
  1124.    operations in the OSM treat all types of REFUSE responses to a
  1125.    CONNECT in the same manner. The Monitor FSM will manage the Recovery
  1126.    reCONNECT analysis and may also be expanded to include other ST
  1127.    Service Model functions.
  1128.  
  1129.    The OSM will record the status of each response from each Target. As
  1130.    each ACCEPT is received, the OSM updates its database and records the
  1131.    status of each Target and the resources that were successfully
  1132.    allocated along the path to it, as specified in the FlowSpec
  1133.    contained in the ACCEPT message. The Application may then use the
  1134.    information to either adopt or terminate the portion of the stream to
  1135.    each Target. When either an ACCEPT or REFUSE from all Targets has
  1136.    been received at the Origin, the stream state returns to Establd and
  1137.    any additional queued up requests may then be processed.
  1138.  
  1139.  
  1140.  
  1141.    Figure 7.  Origin State Machine (OSM)
  1142.  
  1143.  
  1144.  
  1145.    Table 2: OSM
  1146.  
  1147.  
  1148.    Once an ACCEPT is received by the OSM, the path to the Target is
  1149.    considered to be established and the ST Agent is allowed to forward
  1150.    the data along this path. When a REFUSE reaches the OSM, the OSM
  1151.    notifies the Application that the Target is no longer part of the
  1152.    stream. If there are no remaining Targets, the Application may wish
  1153.    to terminate the stream or keep the stream active to allow stream
  1154.    joining.
  1155.  
  1156.    To ensure that all Targets receive the data with the desired quality
  1157.    of service, an Application should send the data only after the whole
  1158.    stream has been established. Depending on the local API, an
  1159.    Application may not be prevented from sending data before the
  1160.    completion of all stream Targets.
  1161.  
  1162.    For each new Target in the TargetList, processing is much the same as
  1163.    for the original CONNECT. The CONNECT is acknowledged, propagated,
  1164.    and network resources are reserved. However, it may be possible to
  1165.    route to the new Targets using previously allocated paths or an
  1166.    existing multicast group. In that case, additional resources do not
  1167.    need to be reserved but more next-hops might have to be added to an
  1168.  
  1169.  
  1170.  
  1171. Rajagopal, Sergeant         Expires April 21, 1996            [Page 21]
  1172.  
  1173. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1174.  
  1175.  
  1176.    existing multicast group. These issues are managed by the
  1177.    implementation of the ST Service Model and stream state transitions
  1178.    remain the same.  Intermediate or Target ST Agents that are not
  1179.    already nodes in the stream behave as in the case of stream setup.
  1180.  
  1181.    The OSM may issue a DISCONNECT when an api_disconnect is received.
  1182.    This message may be processed in any state. The OSM then records this
  1183.    fact and appropriately updates its database.
  1184.  
  1185.    A REFUSE message may arrive at the OSM asynchronously at any
  1186.    time. This message is sent as a result of an Intermediate Agent
  1187.    failure or a Target leaving a stream.
  1188.  
  1189.    Change:The Application at the Origin may wish to change the FlowSpec
  1190.    of an established stream. To do so, it informs the ST Agent at the
  1191.    Origin of the new FlowSpec and of the list of Targets associated with
  1192.    the change with an api_change. The Origin then issues one CHANGE
  1193.    message with the new FlowSpec per next-hop and sends it to the
  1194.    relevant next-hop Agents. The control flow to the Change state is
  1195.    very similar to the control to the Add state from the Establd state.
  1196.    Depending on the CHANGE options selected and the resources
  1197.    avalailable in each of the stream paths, the CHANGE may result in
  1198.    either a simple refusal of any change or the disconnect of the entire
  1199.    stream. A REFUSE response to a CHANGE request with the E-bit set to
  1200.    zero means that the stream has been torn down for that Target. A
  1201.    REFUSE_CHANGE is a REFUSE with the E-bit set to 1 indicating that the
  1202.    CHANGE has been refused but the prior stream resources are unchanged
  1203.  
  1204.    3.4.2   Next Hop State Machine (NHSM)
  1205.  
  1206.    The NHSM is pictorially shown in Figure 8. This model is common to
  1207.    the Origin as well as an Intermediate Agent.The NHSM consists of the
  1208.    same fundamental states as the OSM: Init, Establd, Add and Change.
  1209.  
  1210.    Init:The state machine for each next hop enters its Init state at
  1211.    Agent start-up time. An asterisk indicates that this is the initial
  1212.    state. A nexthop_open predicate moves control to the Establd state
  1213.    when the next hop associated with an NHSM is required by Targets in a
  1214.    stream.
  1215.  
  1216.    Establd:Once in the Establd state a number of things can happen.
  1217.    Targets may be added by the Origin or Targets may request to join the
  1218.    stream.  However, the processing of a JOIN request is always handled
  1219.    by either an OSM or a PHSM. Within each ST Agent, the ST Dispatcher
  1220.    examines incoming JOIN requests and determines whether the stream
  1221.    referenced is a stream that that Agent supports. If not, the JOIN is
  1222.    forwarded on towards the Origin. Once a JOIN request reaches an Agent
  1223.    that can process the JOIN, the ST Dispatcher ACKs the JOIN and queues
  1224.  
  1225.  
  1226.  
  1227. Rajagopal, Sergeant         Expires April 21, 1996            [Page 22]
  1228.  
  1229. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1230.  
  1231.  
  1232.    it up to the resident OSM or PHSM. The NHSM only sees the resultant
  1233.    CONNECT when stream authorization has completed successfully and the
  1234.    OSM or PHSM has issued a CONNECT through the MS/C Box.
  1235.  
  1236.    As previously described in the OSM, an ST Agent can handle only one
  1237.    stream Add or Change at a time. If such a stream operation is already
  1238.    underway, further requests are queued and handled when the previous
  1239.    operation has been completed. Either a DISCONNECT or REFUSE for all
  1240.    Targets transfers control from the Establd state to the Init state.
  1241.  
  1242.    Add: A CONNECT that has been propagated from the NHSM Add state to
  1243.    the next hop Agent PHSM and will require a Response in the form an
  1244.    ACK. If an ACK is not received, the timeout and retry mechanisms of
  1245.    the Retry FSM will invoke a RetryTimeout signal.  Every PDU has a
  1246.    unique reference number, so that all ACKs may be matched to the
  1247.    appropriate Request or Response.
  1248.  
  1249.    The CONNECT message contains the SID, an updated FlowSpec, and a
  1250.    TargetList. In general, the FlowSpec and TargetList depend on both
  1251.    the next-hop and the intervening network. Each TargetList is a subset
  1252.    of the original TargetList, identifying the targets that are to be
  1253.    reached through the next-hop to which the CONNECT message is being
  1254.    sent. If the TargetList causes a PDU that is larger than the MTU
  1255.    size, CONNECT message to be generated, the CONNECT message is
  1256.    partitioned.
  1257.  
  1258.    The ACK, if it is received, does not need to be reported to the NHSM.
  1259.    However, if the ACK is not received and the retries are exhausted, a
  1260.    RetryTimeout signal will be reported to the NHSM and interpreted as a
  1261.    REFUSE. The NHSM will record all Target Responses until the last
  1262.    Target in the TargetList has sent an ACCEPT or REFUSE (or an implicit
  1263.    REFUSE due to Retry exhaustion). An Origin DISCONNECT may terminate
  1264.    this process when the End-to-End Response timer is exceeded.  A
  1265.    DISCONNECT or REFUSE signal may be due to the failure of a next hop
  1266.    or previous hop.
  1267.  
  1268.    If an Application at a Target does not wish to participate in the
  1269.    stream, it sends a REFUSE message back to the Origin with a
  1270.    ReasonCode (ApplDisconnect). When an NHSM receives a REFUSE message
  1271.    with ReasonCode (ApplDisconnect), the acknowledgement has already
  1272.    been sent by the ST Dispatcher as an ACK to the next-hop. The Agent
  1273.    considers which resources are to be released, deletes the Target
  1274.    entry from the internal database, and propagates the REFUSE message
  1275.    back to the OSM or PHSM.
  1276.  
  1277.    If, after deleting the specified Target, the next-hop has no
  1278.    remaining Targets, then those resources associated with that next-hop
  1279.    agent may be released. Note that network resources may not actually
  1280.  
  1281.  
  1282.  
  1283. Rajagopal, Sergeant         Expires April 21, 1996            [Page 23]
  1284.  
  1285. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1286.  
  1287.  
  1288.    be released if network multicasting is being used since they may
  1289.    still be required for traffic to other next-hops in the multicast
  1290.    group.
  1291.  
  1292.    Change: The Application at the Origin may wish to change the FlowSpec
  1293.    of an established stream. To do so, it informs the OSM of the new
  1294.    FlowSpec and of the list of Targets relative to the change. The OSM
  1295.    then issues one CHANGE message with the new FlowSpec per next-hop and
  1296.    sends it with the correct Targetlist. The MS/C box then places copies
  1297.    (as required) of this in the NHSM queues. This takes the control to
  1298.    the Change state from the Establd state. CHANGE messages are
  1299.    structured and processed similar to CONNECT messages.
  1300.  
  1301.    A next-hop agent that is an Intermediate Agent that receives a CHANGE
  1302.    message similarly determines if it can implement the new FlowSpec
  1303.    along the path to each of its next-hop agents, and if so, it
  1304.    propagates the CHANGE messages along the established paths. If this
  1305.    process succeeds, the CHANGE messages will eventually reach the
  1306.    Targets, which will each respond with an ACCEPT (or REFUSE) message
  1307.    that is propagated back to the OSM.
  1308.  
  1309.    Figure 8.        Next Hop State Machine (NHSM)
  1310.  
  1311.    At this point the Application decides whether all replies have been
  1312.    received. If the change to the FlowSpec is in a direction that makes
  1313.    fewer demands of the involved networks, then the change has a high
  1314.    probability of success along the path of the established stream. Each
  1315.    ST agent receiving the CHANGE message makes the necessary request
  1316.    changes to the network resource allocations, and if successful,
  1317.    propagates the CHANGE message along the established paths. If the
  1318.    change cannot be made, but the E-bit indicates that stream should be
  1319.    torn down, then the ST Agent must recover using DISCONNECT and REFUSE
  1320.    messages as in the case of a network failure. Note that a failure to
  1321.    change the resources requested for specific Targets should not cause
  1322.    other targets in the stream to be deleted. A REFUSE response to a
  1323.    CHANGE request with the E-bit set to zero means that the stream has
  1324.    been torn down for that Target. A REFUSE_CHANGE is a REFUSE with the
  1325.    E-bit set to 1 and the stream is unchanged
  1326.  
  1327.  
  1328.    Table 3: NHSM
  1329.  
  1330.    The Application at the Origin may specify a set of Targets that are
  1331.    to be removed from the stream with an appropriate ReasonCode
  1332.    (ApplDisconnect). The Targets are partitioned into multiple
  1333.    DISCONNECT messages based on the next-hop route towards the
  1334.    individual Targets. If the TargetList is too long to fit into one
  1335.    DISCONNECT message, it is partitioned.
  1336.  
  1337.  
  1338.  
  1339. Rajagopal, Sergeant         Expires April 21, 1996            [Page 24]
  1340.  
  1341. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1342.  
  1343.  
  1344.    If, after deleting the specified Targets, any next-hop has no
  1345.    remaining Targets, then those resources associated with that next-hop
  1346.    agent may be released. Note that the network resources may not
  1347.    actually be released if network multicasting is being used since they
  1348.    may still be required for traffic to other next-hops in the multicast
  1349.    group.
  1350.  
  1351.    When the DISCONNECT reaches a Target, the Target Agent sends an ACK
  1352.    to the upstream NHSM and notifies the Application (at target) that it
  1353.    is no longer part of the stream and for which reason. The ST Agent at
  1354.    the Target deletes the stream from its database after performing any
  1355.    necessary management and accounting functions. Note that the stream
  1356.    is not deleted if the ST Target Agent is also an Intermediate Agent
  1357.    for the stream and there are remaining downstream Targets.
  1358.  
  1359.    Data Forwarding: Once the Application or OSM determines that the
  1360.    stream is established Data may be transferred to the targets. An
  1361.    Application is not guaranteed that the data reaches its destinations:
  1362.    ST is unreliable and it does not make any attempt to recover from
  1363.    packet loss, e.g. due to the underlying network. In case the data
  1364.    reaches its destination, it does it accordingly to the negotiated
  1365.    quality of service. An ST Agent forwards the data only along already
  1366.    established paths to Targets.
  1367.  
  1368.    Since a path is considered to be established when the ST next-hop
  1369.    agent on the path sends an ACCEPT message, it implies that the target
  1370.    and all other intermediate ST Agents on the path to the Target are
  1371.    ready to handle the incoming data packets. In no case will an ST
  1372.    Agent forward data to a next-hop Agent that has not explicitly
  1373.    accepted the stream.
  1374.  
  1375.    At the end of the connection setup phase, the Origin, each Target,
  1376.    and each Intermediate ST Agent has a database entry that allows it to
  1377.    forward the data packets from the Origin to the Targets and to
  1378.    recover from failures of the Intermediate Agents or networks. The
  1379.    database should be optimized to make the packet forwarding task most
  1380.    efficient.  The time critical operation is an Intermediate Agent
  1381.    receiving a packet from the previous-hop Agent and forwarding it to
  1382.    the next- hop Agents.  The database entry must also contain the
  1383.    FlowSpec, utilization information, the address of the Origin and
  1384.    previous-hop, and the addresses of the Targets and next-hops, so it
  1385.    can perform enforcement and recover from failures. An ST Agent
  1386.    receives data packets encapsulated by an ST header. A data packet
  1387.    received by an ST Agent contains the SID. This SID was selected at
  1388.    the Origin so that it is globally unique and thus can be used as an
  1389.    index into the database, to obtain quickly the necessary replication
  1390.    and forwarding information.
  1391.  
  1392.  
  1393.  
  1394.  
  1395. Rajagopal, Sergeant         Expires April 21, 1996            [Page 25]
  1396.  
  1397. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1398.  
  1399.  
  1400.    The forwarding information will be network and implementation
  1401.    specific, but must identify the next-hop Agents. It is suggested that
  1402.    the cached information for a next-hop Agent include the local network
  1403.    address of the next- hop. If the data packet must be forwarded to
  1404.    multiple next- hops across a single network that supports multicast,
  1405.    the database may specify the next-hops by a (local network) multicast
  1406.    address. If the network does not support multicast, or the next-hops
  1407.    are on different networks, multiple copies of the data packet must be
  1408.    sent.
  1409.  
  1410.    No data fragmentation is supported during the data transfer phase.
  1411.    The Application is expected to segment its PDUs according to the
  1412.    minimum MTU over all paths in the stream. The Application receives
  1413.    information on the MTUs relative to the paths to the Targets as part
  1414.    of the FlowSpec contained in the ACCEPT message. The minimum MTU over
  1415.    all paths has to be calculated from the MTUs relative to the single
  1416.    paths. If the Application at the Origin sends a too large data
  1417.    packet, the ST Agent at the Origin generates an error and it does not
  1418.    forward the data.
  1419.  
  1420.    3.4.3   Previous Hop State Machine (PHSM)
  1421.  
  1422.    The Previous Hop State Machine Model is common to a Target or
  1423.    Intermediate Agent.  A PHSM communicates with an upstream NHSM and
  1424.    downstream with one or more NHSMs and/or a TSM via a MS/C box. When a
  1425.    CONNECT message is received, the Intermediate ST Agent invokes the
  1426.    routing function, reserves resources via the Local Resource Manager,
  1427.    and then propagates the CONNECT messages to its next-hops.  For the
  1428.    most part the Intermediate Agent behaves like a relay. In the cases
  1429.    when the Intermediate Agent is not able to successfully send out a
  1430.    CONNECT message to a downstream PHSM, a REFUSE message from the PHSM
  1431.    is sent to the upstream NHSM.
  1432.  
  1433.    The PHSM consists of a small number of states: Init, Establd, Add and
  1434.    Change.
  1435.  
  1436.    Init: The ST Agent initially takes control from the Init state to the
  1437.    Establd state via the phsm_open predicate. A DISCONNECT or REFUSE of
  1438.    all Targets in a stream will take the stream from the Establd to a
  1439.    terminating state which is also the Init state.
  1440.  
  1441.    Establd:Once in the Establd state, Targets may be added or changed by
  1442.    the Origin or Targets may request to join the stream. The processing
  1443.    of a JOIN request is always handled by either an OSM or a PHSM.
  1444.    Within each ST Agent, the ST Dispatcher examines incoming JOIN
  1445.    requests and determines whether the stream referenced is a stream
  1446.    that that Agent supports. If not, the JOIN is forwarded on towards
  1447.    the Origin. Once a JOIN request reaches an Agent that can process the
  1448.  
  1449.  
  1450.  
  1451. Rajagopal, Sergeant         Expires April 21, 1996            [Page 26]
  1452.  
  1453. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1454.  
  1455.  
  1456.    JOIN, the ST Dispatcher ACKs the JOIN and queues it up to the
  1457.    resident OSM or PHSM.  When stream authorization has completed
  1458.    successfully, the PHSM issues a CONNECT through the MS/C Box to
  1459.    either a NHSM or a TSM.
  1460.  
  1461.    As previously described in the OSM, an ST Agent can handle only one
  1462.    stream Add or Change at a time. If such a stream operation is already
  1463.    underway, further requests are queued and handled when the previous
  1464.    operation has been completed. Either a DISCONNECT or REFUSE for all
  1465.    Targets transfers control from the Establd state to the Init state.
  1466.  
  1467.    Add: Once in the Establd state the previous hop may relay a CONNECT
  1468.    message. A transition to Add will create a CONNECT message that is
  1469.    placed in the FIFO queue between the PHSM and the MS/C box. The
  1470.    CONNECT message contains the SID, an updated FlowSpec, and a
  1471.    TargetList. The MS/C box will then make a copy of the CONNECT
  1472.    message, partition the Targetlist parameter and place it the NHSM
  1473.    and/or TSM queues. The spliting (or separating) information is derived
  1474.    from the implementation's routing and LRM functions.
  1475.  
  1476.    Once in the Add state the OSM waits to get ACCEPT or REFUSE
  1477.    responses.  The stream will not transition back to the Establd state
  1478.    until all Targets have responded. The expiration of the retry timer
  1479.    and count (if the next hop is not ACKing the request) or the
  1480.    expiration of the end-to-end timer will be interpreted as an implicit
  1481.    refuse.
  1482.  
  1483.    Change:The Application at the Origin may wish to change the FlowSpec
  1484.    of an established stream. To do so, it informs the ST Agent at the
  1485.    Origin of the new FlowSpec and of the list of Targets relative to the
  1486.    change and this message will be propagated to through the NHSMs to
  1487.    the PHSMs and TSMs. The control flow to the Change state is very
  1488.    similar to the previous FSM discussions.
  1489.  
  1490.    Figure 9.  Previous Hop State Machine (PHSM)
  1491.  
  1492.  
  1493.    Table 4: PHSM
  1494.  
  1495.    3.5     The Target State Machine (TSM)
  1496.  
  1497.    The Target State Machine (TSM) is a high level state machine which
  1498.    communicates with a PHSM, or OSM if residing the same Agent as the
  1499.    Origin. The TSM also talks to the Upper Layer module via primitives.
  1500.    The TSM consists of a small number of states: Init, Establd, Add and
  1501.    Change.
  1502.  
  1503.    Init: The ST Agent initially takes control from the Init state to the
  1504.  
  1505.  
  1506.  
  1507. Rajagopal, Sergeant         Expires April 21, 1996            [Page 27]
  1508.  
  1509. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1510.  
  1511.  
  1512.    Establd state via the tsm_open predicate. A Target Application may
  1513.    request to join an existing stream. It has to collect information on
  1514.    the stream including the stream ID (SID) and the IP address of the
  1515.    stream's Origin. This can be done out-of- band, e.g. via regular IP.
  1516.    The information is then passed to the local ST Agent together with
  1517.    the FlowSpec. The Application directs the TSM to generate a JOIN
  1518.    message containing the Application's request to join the stream and
  1519.    sends it to the PHSM which in turn sends it upstream toward the
  1520.    stream Origin.
  1521.  
  1522.    An ST Agent receiving a JOIN message for which that Agent has a
  1523.    matching stream,  responds with an ACK. The ACK message must identify
  1524.    the JOIN message to which it corresponds by including the Reference
  1525.    number indicated by the Reference field of the Join message. If the
  1526.    ST Agent is not traversed by the stream that has to be joined, it
  1527.    propagates the JOIN message toward the stream's Origin. Eventually,
  1528.    an ST Agent traversed by the stream or the stream's Origin itself is
  1529.    reached. In any case, the TSM will eventually receive a JOIN-REJECT
  1530.    or CONNECT response.  This is shown as transitions to the Establd
  1531.    state and the Add state respectively.
  1532.  
  1533.    Add: The TSM may receive a CONNECT message any time. The ST Agent
  1534.    reserves local resources and inquires from the specified Application
  1535.    process whether or not it is willing to accept the connection. In
  1536.    particular, the Application must be presented with parameters from
  1537.    the CONNECT, such as the SID, FlowSpec, Options, and Group, to be
  1538.    used as a basis for its decision. The Application is identified by a
  1539.    combination of the NextPcol field and the SAP field included in the
  1540.    correspondent (usually single remaining) target of the TargetList.
  1541.    The contents of the SAP field may specify the port or other local
  1542.    identifier for use by the protocol layer above the host ST layer.
  1543.    Subsequently received data packets will carry the SID, that can be
  1544.    mapped into this information and be used for their delivery.
  1545.  
  1546.    The TSM responds with an ACCEPT or REFUSE - a result of the Upper
  1547.    Layer module decision.
  1548.  
  1549.    Change: The TSM may receive a CHANGE message any time it is in a
  1550.    Establd state. This happens always after a CONNECT. The TSM again
  1551.    responds with an ACCEPT or REFUSE after informing the Upper Layer
  1552.    Protocol.
  1553.  
  1554.    The TSM may at any time want to terminate its membership in the
  1555.    stream.  This is handled by the TSM sending out a REFUSE message. On
  1556.    the other hand it is possible for an Origin or IntermediateAgent to
  1557.    disconnect the Target from the stream. This is accomplished by the
  1558.    Agent or Origin sending a DISCONNECT message.
  1559.  
  1560.  
  1561.  
  1562.  
  1563. Rajagopal, Sergeant         Expires April 21, 1996            [Page 28]
  1564.  
  1565. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1566.  
  1567.  
  1568.    Figure 10.               Target State Machine (TSM)
  1569.  
  1570.  
  1571.    Table 5: TSM
  1572.  
  1573.    4   ST Agent FSMs
  1574.  
  1575.    This section describes the Retry FSM and the Monitor FSM for the
  1576.    datalink and ST Agent neighbor reliability functions. The OSM, NHSM,
  1577.    PHSM and TSM have been shown to model the stream specific Request-
  1578.    Response pattern. The Retry FSM models the datalink reliability
  1579.    provided by the ACK mechanisms with the associated timer and retry
  1580.    count. The Monitor FSM models the ST Agent reliabilty provided by the
  1581.    neighbor HELLO mechanisms, the STATUS and STATUS_RESPONSE messages,
  1582.    as well as the stream Recovery timer and retry count.
  1583.  
  1584.    The ST Agent FSMs are the unifying aspect of the total FSM model
  1585.    architecture. These models are dependent on how the SCMP messages
  1586.    traverse the ST Agents, and impact Agent databases and FSMs.
  1587.  
  1588.    4.1      Agent Database Context
  1589.  
  1590.    ST Agent stream database entries are intitated by the first CONNECT
  1591.    for that Stream Id.  The information initially correlated to each
  1592.    StreamId entry includes:
  1593.  
  1594.                  ST Neighbor Previous Hop and Next Hops
  1595.  
  1596.                  FlowSpec, Group, MulticastAddress, Origin, TargetList,
  1597.    ACK and Response timers
  1598.  
  1599.                  Stream Options for NoRecovery(S-bit) and Join
  1600.    Authorization Level (J-bit, N-bit)
  1601.  
  1602.                  Routing results for each Target's Next Hop
  1603.  
  1604.                  LRM results for each Next Hop's resource allocation
  1605.  
  1606.    Each Agent database is modified when the CONNECT Responses indicate
  1607.    some variation specified by a downstream Agent or Target Response.
  1608.    Subsequent Requests can also modify the database and include
  1609.    additional CONNECT, JOIN and CHANGE requests. Origin, Network or
  1610.    Agent Recovery and LRM initiated stream teardown can occur in the
  1611.    form of explicit DISCONNECT, REFUSE and Recovery initiated CONNECT
  1612.    messages or implicit conditions detected through the HELLO, STATUS,
  1613.    STATUS-RESPONSE and NOTIFY messages.
  1614.  
  1615.    The database context is then augmented with the history of Reason
  1616.  
  1617.  
  1618.  
  1619. Rajagopal, Sergeant         Expires April 21, 1996            [Page 29]
  1620.  
  1621. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1622.  
  1623.  
  1624.    Codes and prior stream characteristics. Transient state
  1625.    characteristics can also include the G-bit (Global stream
  1626.    TargetList), I-bit (CHANGE risking teardown of old resources)and E-
  1627.    bit (CHANGE REFUSE without teardown), R-bit (Restarted Agent) or ACK
  1628.    and Response retry values.
  1629.  
  1630.    While all control messages may have an indirect effect on stream
  1631.    state and databases,  only ACCEPT, CHANGE, CONNECT, DISCONNECT,
  1632.    JOIN-REJECT, JOIN and REFUSE directly affect each Agent's defintion
  1633.    of each stream.  ACK, ERROR, HELLO, NOTIFY, STATUS and STATUS-
  1634.    RESPONSE are the control messages that are primarily used to maintain
  1635.    ST Agent databases for datalink, neighbor and network management
  1636.    functions.
  1637.  
  1638.    As the ST PDUs traverse the network, each Agent presumably has a
  1639.    platform specific interface-to-packet-switching function that must
  1640.    intercept the ST packets for ST functions. The ST Dispatcher
  1641.    represents ST PDU validation, filtering and packet-switching. The ST
  1642.    Dispatcher in this model is organized as the Agent packet-switcher,
  1643.    rather than as a per-interface or per-next-hop packet-switcher. This
  1644.    function may be reorganized as a distributed function if the Agent
  1645.    platform architecture requires such distribution.
  1646.  
  1647.    4.2     ST Dispatcher role for incoming Packet-switching,
  1648.               ACKnowledgement and PDU validation
  1649.  
  1650.    An ST Dispatcher can validate an ST PDU for ST header and PDU syntax
  1651.    and semantic validity, and then rapidly switch Data packets,  .i.e to
  1652.    a local Target application SAP or to the appropriate next hop
  1653.    interface for remote Targets.
  1654.  
  1655.    When the PDU syntax are in error, an ERROR PDU with the corresponding
  1656.    Reason Code and the offending PDU contents are returned to the
  1657.    SenderIpAddress (instead of an ACK for those SCMP messages that
  1658.    require an ACK). The incoming PDU in ERROR is then discarded and does
  1659.    not directly impact any FSM state. The following Reason Codes detail the
  1660.    inconsistencies that could be reported in an ERROR Response:
  1661.  
  1662.                     2 ErrorUnknown An error not contained in this list
  1663.                                    has been detected. 
  1664.  
  1665.                     8 AuthentFailed The authentication function failed. 
  1666.  
  1667.                    13 CksumBadCtl Control PDU has a bad message
  1668.                                   checksum.
  1669.  
  1670.  
  1671.  
  1672. Rajagopal, Sergeant         Expires April 21, 1996            [Page 30]
  1673.  
  1674. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1675.  
  1676.  
  1677.                    14 CksumBadST PDU has a bad ST Header checksum.
  1678.  
  1679.                    23 InvalidSender Control PDU has an invalid
  1680.                                     SenderIPAddress field.
  1681.  
  1682.                    24 InvalidTotByt Control PDU has an invalid
  1683.                                     TotalBytes field.
  1684.  
  1685.    *               26 LnkRefUnknown Control PDU contains an unknown
  1686.                                     LnkReference.
  1687.  
  1688.                    31 OpCodeUnknown Control PDU has an invalid OpCode
  1689.                                      field.
  1690.  
  1691.                    32 PCodeUnknown Control PDU has a parameter with an
  1692.                                     invalid PCode.
  1693.  
  1694.                    33 ParmValueBad Control PDU contains an invalid
  1695.                                    parameter value                
  1696.  
  1697.                    35 ProtocolUnknown Control PDU contains an unknown
  1698.                                       next-higher layer protocol identifier.
  1699.  
  1700.                    37 RefUnknown Control PDU contains an unknown
  1701.                                    Reference.
  1702.  
  1703.                    45 SAPUnknown Control PDU contains an unknown next-
  1704.                                   higher layer SAP (port)   
  1705.  
  1706.    *               46 SIDUnknown Control PDU contains an unknown SID.
  1707.  
  1708.                    48 STVer3Bad A received PDU is not ST Version 3.
  1709.  
  1710.                    54 TruncatedCtl Control PDU is shorter than expected.
  1711.  
  1712.                    55 TruncatedPDU A received ST PDU is shorter than the
  1713.                                    ST Header indicates.
  1714.  
  1715.    In some cases, RFC1819 specifically requires that an error in a PDU
  1716.  
  1717.  
  1718.  
  1719. Rajagopal, Sergeant         Expires April 21, 1996            [Page 31]
  1720.  
  1721. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1722.  
  1723.  
  1724.    result in an ACK and then a response with the error code. An example
  1725.    of this is when a CONNECT or CHANGE request with an unknown SID
  1726.    results in an ACK followed by a REFUSE with Reason Code 46. In any
  1727.    event, the ST Dispatcher function is to direct only valid PDUs to the
  1728.    inidividual FSM logic.
  1729.  
  1730.    Figure 11.  ST Dispatcher Input
  1731.  
  1732.    The next level of PDU analysis involves Agent and stream consistency.
  1733.    The PDU is examined for content consistency with both Agent and
  1734.    stream database information. The following detected inconsistencies
  1735.    may result:
  1736.  
  1737.                     3 AccessDenied Access denied.
  1738.  
  1739.                     4 AckUnexpected An unexpected ACK was received.
  1740.  
  1741.                    15 DuplicateIgn Control PDU is a duplicate and is
  1742.                                     being acknowledged.
  1743.  
  1744.                    16 DuplicateTarget Control PDU contains a duplicate
  1745.                                        target, or an attempt to add an 
  1746.                                        existing target.
  1747.  
  1748.                    49 StreamExists A stream with the given SID already
  1749.                                      exists.
  1750.  
  1751.                    51 TargetExists A CONNECT was received that specified
  1752.                                     an existing target.
  1753.  
  1754.                    52 TargetUnknown A target is not a member of the
  1755.                                      specified stream.
  1756.  
  1757.                    53 TargetMissing A target parameter was expected and
  1758.                                      is not included, or is empty.
  1759.  
  1760.    Most SCMP PDUs (except ACK, ERROR, HELLO, STATUS, STATUS-RESPONSE,)
  1761.    will trigger an ACK to the ST neighbor that sent the PDU.
  1762.  
  1763.    CONNECT, CHANGE and JOIN Requests will be directed to the appropriate
  1764.    stream PHSM.
  1765.  
  1766.  
  1767.  
  1768.  
  1769. Rajagopal, Sergeant         Expires April 21, 1996            [Page 32]
  1770.  
  1771. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1772.  
  1773.  
  1774.    Incoming Responses are first correlated with any corresponding
  1775.    Request Reference so that the appropriate next hop or Response timer
  1776.    may be terminated. Then ACCEPT and REFUSE messages are queued up to
  1777.    the appropriate stream NHSM, while DISCONNECT and JOIN-REJECT
  1778.    messages are queued up to the appropriate stream PHSM.
  1779.  
  1780.    ACK and ERROR messages are correlated with a PDU Reference,
  1781.    terminating the appropriate timers, and then queued up to the stream
  1782.    Retry FSM.
  1783.  
  1784.    HELLO, STATUS and STATUS-RESPONSE messages are correlated with a PDU
  1785.    Reference so that the appropriate timers may be terminated and then
  1786.    queued up to the Monitor FSM.
  1787.  
  1788.    4.3      ST Dispatcher functions for outgoing Packet switching, timer
  1789.    and retry settings
  1790.  
  1791.    Figure 12.
  1792.  
  1793.    The ST Dispatcher also has the role of packaging and forwarding
  1794.    outgoing PDUs to the apprropriate interfaces. The outgoing PDU must
  1795.    be given it's own PDU Reference number and any correlated PDU
  1796.    Referencer number, as well as the semantics and context of the PDU
  1797.    database entries. This Agent architecture model assumes that the
  1798.    Agent and stream databases are the intra-Agent repository of all
  1799.    activities, such that the ST Dispatcher can efficiently create and
  1800.    distribute the PDUs. However, it is entirely possible that the
  1801.    accumulated contents of a PDU has exceeded an outgoing MTU
  1802.    restriction and the PDU would be truncated with the following Reason
  1803.    Codes:
  1804.  
  1805.                        6 UserDataSize UserData parameter too large to
  1806.                                       permit a message to fit into a 
  1807.                                       network's MTU.
  1808.  
  1809.                    36 RecordRouteSize RecordRoute parameter is too long
  1810.                                        to permit message to fit a network's
  1811.                                         MTU.
  1812.  
  1813.    4.4     Retry FSM- RFSM for datalink reliability of PDU transmissions
  1814.  
  1815.    The following table provides a quick reference for ST Recovery and
  1816.    Retry implications across ST Agent FSMs. Each SCMP message type that
  1817.    requires an ACK has configured values for the ACK timer and Retry
  1818.  
  1819.  
  1820.  
  1821. Rajagopal, Sergeant         Expires April 21, 1996            [Page 33]
  1822.  
  1823. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1824.  
  1825.  
  1826.    count. Each Request that requires an End-to-End Response has a
  1827.    configured value for the End-to-End Response timer. End-to-End
  1828.    Response timers are set by the Retry FSM when an ACK signals that the
  1829.    Request has successfully gone out to the network. The Recovery
  1830.    Option, STATUS and HELLO messages are managed by the Monitor FSM and
  1831.    follow a different paradigm.
  1832.  
  1833.    Table 6: Table of local control and End-to-End retry parameterss
  1834.  
  1835.  
  1836.    The Retry FSM conditions are explicit when an ST Agent neighbor ACK
  1837.    terminates the neighbor ACK timer and retry count for that
  1838.    transaction.  Any End-to-End Response will terminate the End-to-End
  1839.    Response timer.  Implicit conditions occur when any of the timer or
  1840.    the retry count values have been exhausted. The general paradigm is
  1841.    that an implicit REFUSE is generated for unsatisfied downstream
  1842.    Requests and an implicit DISCONNECT is generated for unsatisfied
  1843.    upstream Requests. The secondary consequence of a timeout is that
  1844.    explicit REFUSE and DISCONNECT messages may also be issued.
  1845.  
  1846.    Each table entry has its own variation of this basic paradigm.  In
  1847.    addition, the ST specification indicates many secondary and tertiary
  1848.    implications for SCMP message failures. As a particular example, once
  1849.    any ST Agent has completed a downstream Request-Response scenario, an
  1850.    upstream propagation problem may or may not cause the stream to be
  1851.    torn down. The I-bit (risk teardown)in CHANGE processing and the S-
  1852.    bit (Recovery) are examples of causes for the secondary and tertiary
  1853.    implications.
  1854.  
  1855.  
  1856.  
  1857.    Figure 13.  Retry State Machine (RFSM)
  1858.  
  1859.    
  1860.  
  1861.    The Retry FSM has three states - Init, Ack-wait and Resp-wait. The
  1862.    general paradigm for the Retry FSM is to move from the Init state to
  1863.    the Ack-wait state whenever a PDU requiring an ACK is sent.  The
  1864.    STATUS message does not require an ACK, but the required STATUS-
  1865.    RESPONSE performs the same function as an ACK.
  1866.  
  1867.    The Retry FSM waits for the resultant ACKs, Responses and/or
  1868.    timeouts.  PDUs requiring ACKs cycle through resends for the
  1869.    appropriate NAccept, NChange, NConnect, NDisconnect, NJoin,
  1870.    NJoinReject, NNotify and NRefuse configured counts.
  1871.  
  1872.    Since all ACKs are correlated by PDU Reference numbers, packets maybe
  1873.    correlated to the outstanding Retry FSM by the same mechanism. Either
  1874.  
  1875.  
  1876.  
  1877. Rajagopal, Sergeant         Expires April 21, 1996            [Page 34]
  1878.  
  1879. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1880.  
  1881.  
  1882.    an ACK or a RetryTimeout that is correlated to an ACCEPT, DISCONNECT,
  1883.    JOIN-REJECT, NOTIFY or REFUSE results in the Retry FSM transitions to
  1884.    Init.  Such PDUs have no End-to-End response requirements and
  1885.    generally have no secondary error processing when it can be assumed
  1886.    that the neighbor Agent and/or link layer reliability is gone. An
  1887.    ACCEPT is an exception. The failure of an ACCEPT is an implicit
  1888.    REFUSE upstream and DISCONNECT downstream, since this ACCEPT was an
  1889.    End-to-End Response that has now failed to completely traverse the
  1890.    stream Agents.
  1891.  
  1892.    An ACK on a CHANGE, CONNECT or JOIN causes the respective
  1893.    ToChange,ToConnect or ToJoin End-to-End timers to be set, and a state
  1894.    transition to Resp-wait.
  1895.  
  1896.    A legitimate Response, or an E2ETimeout on CHANGE, CONNECT or JOIN
  1897.    causes the transition to the Init state with the signal to be
  1898.    replicated to the appropriate stream FSM.
  1899.  
  1900.  
  1901.    4.5     Agent,  Neighbor and Stream Supervision
  1902.  
  1903.    4.5.1   The Monitor FSM (MFSM) for Agent and Stream Supervision
  1904.  
  1905.    Each ST Agent must monitor its own status, network conditions,
  1906.    neighbor Agent status and supervise the Recovery of streams whenever
  1907.    required and possible during a network failure. This MFSM is intended
  1908.    to be a general approach to these issues, rather than a fully
  1909.    specified FSM since the particular network, platform and
  1910.    implementation architecture will determine detail FSM considerations.
  1911.  
  1912.    What this MFSM model does suggest is that the MFSM provides a
  1913.    superstructure for the management of the Neighbor Detection Failure
  1914.    FSM(NDFSM), as well as any Agent NOTIFY, STATUS or STATUS-RESPONSE
  1915.    implications. The Service Model management (including application
  1916.    issues, routing and LRM or other Agent implementation specific
  1917.    issues), as well as datalink statistics analysis (e.g., broken or
  1918.    dropped PDUs or accumulated routing errors) may also be incorporated
  1919.    into this FSM.
  1920.  
  1921.    At the very least, stream Recovery requires careful analysis of the
  1922.    possible recursions in Agent, neighbor failure detection, routing and
  1923.    LRM conditions. The ST2+ specification defines parameters for a
  1924.    configured number of times that Recovery should be attempted
  1925.    (NRetryRoute), the configured time to wait for each Response
  1926.    (ToRetryRoute) and variations in the exception processing.
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933. Rajagopal, Sergeant         Expires April 21, 1996            [Page 35]
  1934.  
  1935. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1936.  
  1937.  
  1938.    Figure 14. MFSM
  1939.  
  1940.    During the course of a stream setup, the CONNECT contains a Recovery
  1941.    Timeout, as specified by the Origin. The resultant ACCEPTs contain
  1942.    the Agent's "supportable" Recovery Timeout such that the stream
  1943.    Recovery Timeout becomes the smallest Recovery Timeout for all
  1944.    Targets. The HELLO timer must be smaller than the smallest Recovery
  1945.    Timeout for all streams between these Agents, but an Agent may have
  1946.    various HELLO timers between different Agents, such that the
  1947.    management function of such timers should fall into the MFSM also. A
  1948.    Round Trip Time (RTT) estimation function is available with STATUS
  1949.    and STATUS-RESPONSE messages to aid in this area.
  1950.  
  1951.    The MFSM relies on the Nieghbor Detection Failure FSM (NDFSM) as the
  1952.    primary notification vehicle for stream and neighbor management.
  1953.    During the initial stream setup of any stream NHSM and PHSM, the MFSM
  1954.    is signalled to begin monitoring of the FSM neighbor Agents involved
  1955.    in the stream. The sending of HELLOs is begun once an ACCEPT is
  1956.    forwarded upstream. The receiving of HELLOs is acceptable as soon as
  1957.    an ACCEPT is received. HELLOs are terminated once an ACK is sent or
  1958.    received for the DISCONNECT or REFUSE associated with the last of all
  1959.    streams and Targets for that neighbor. This requires signalling and
  1960.    coordination with the ST Dispatcher, Retry FSM and database context,
  1961.    especially when the Restarted bit is active for either the local
  1962.    Agent of a neighbor.
  1963.  
  1964.    Agent network "inspection and repair" functions might also exist in
  1965.    the MFSM to extend the mechanisms of the NDFSM before attempting
  1966.    Recovery and/or stream teardown.
  1967.  
  1968.    Group management for Bandwidth-sharing, Fate-sharing, Path-sharing
  1969.    and Subnet resource- sharing can be intiated by any ST Agent and it
  1970.    may be adviseable to incorporate optimization algorithms in the MFSM
  1971.    to interact with Routing and LRM functions, thus allowing the MFSM to
  1972.    monitor and gauge the impact on the stream Recovery analysis.
  1973.  
  1974.    4.5.2   The Nieghbor Detection Failure FSM for Neighbor Management
  1975.  
  1976.    This FSM has a more atomic focus in that ST neighbor HELLOs are
  1977.    maintained and monitored only while there are one or more shared
  1978.    streams active. When the neighbor HELLOs and subsequent STATUS
  1979.    inquiry fails or the neighbor R-bit has been set, the neighbor is
  1980.    considered down and the streams involved in that neighbor
  1981.    relationship must be examined for Recovery conditions.
  1982.  
  1983.  
  1984.  
  1985.    Figure 15.  NFDSM
  1986.  
  1987.  
  1988.  
  1989. Rajagopal, Sergeant         Expires April 21, 1996            [Page 36]
  1990.  
  1991. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  1992.  
  1993.  
  1994.    Table 7: NFDSM
  1995.  
  1996.    4.5.3   Service Model Interactions
  1997.  
  1998.    Figure 16.  MS/C Box Communications inside an Agent
  1999.  
  2000.    The optimization of route and LRM functions can affect the selection
  2001.    from multiple path routes to a Target on initial CONNECTs, as well as
  2002.    CHANGE and Recovery procedures. This document's model follows a
  2003.    sequential process of integrating the route and LRM services with the
  2004.    MS/C Box for the atomic stream FSMs.
  2005.  
  2006.    Additional algorithms may be used in the MFSM, such that algorithms
  2007.    for Options and Group factors may be optimized in relation to the
  2008.    stream Recovery decisions.
  2009.  
  2010.    5   Exception Processing
  2011.  
  2012.    Various types of exception processing conditions have been referenced
  2013.    in the preceding sections. Not all have been spelled out in detail.
  2014.    The general paradigms fall into several categories and all of this
  2015.    document's models are based on a suggested approach. The secondary
  2016.    and tertiary conditions of some apects of exception processsing are
  2017.    especially subject to implementation preferences.
  2018.  
  2019.    The first topic of discussion might be the category SCMP datalink
  2020.    reliability as generally characterized in the Retry FSM. This
  2021.    document favors maintaining a coordinating Retry FSM versus
  2022.    incorporating the Retry states in each of the OSM, NHSM, PHSM and
  2023.    TSM, which is naturally an alternative.
  2024.  
  2025.    ERROR message generation for PDU semantics problems is discussed in
  2026.    Section 5 as an ST Dispatcher function. A special case occurs in PDU
  2027.    construction when the MTU size is exceeded, i.e.:
  2028.  
  2029.                       6 UserDataSize UserData parameter too large to
  2030.                                         permit a message to fit into a 
  2031.                                         network's MTU.
  2032.  
  2033.                    36 RecordRouteSize RecordRoute parameter is too long
  2034.                                         to permit message to fit a 
  2035.                                         network's MTU.
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041. Rajagopal, Sergeant         Expires April 21, 1996            [Page 37]
  2042.  
  2043. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2044.  
  2045.  
  2046.    However, all of the analysis and potential REFUSE message or signal
  2047.    generation, still seems best suited to the ST Dispatcher.
  2048.  
  2049.    5.1     Additional Exception Processing
  2050.  
  2051.    5.1.1   ST Dispatcher detected inconsistencies Reason Codes:
  2052.  
  2053.    The following errors can also be detected by the ST Dispatcher with
  2054.    the careful analysis of all Agent and stream database values:
  2055.  
  2056.                     3 AccessDenied Access denied.
  2057.  
  2058.                     4 AckUnexpected An unexpected ACK was received.
  2059.  
  2060.                    15 DuplicateIgn Control PDU is a duplicate and is
  2061.                                     being acknowledged.
  2062.  
  2063.                    16 DuplicateTarget Control PDU contains a duplicate
  2064.                                        target, or an attempt to add 
  2065.                                        an existing target.
  2066.  
  2067.                    49 StreamExists A stream with the given SID already
  2068.                                     exists.
  2069.  
  2070.                    51 TargetExists A CONNECT was received that specified
  2071.                                       an existing target.
  2072.  
  2073.                    52 TargetUnknown A target is not a member of the
  2074.                                       specified stream.
  2075.  
  2076.                    53 TargetMissing A target parameter was expected and
  2077.                                       is not included, or is empty.
  2078.  
  2079.    This means that the atomic FSMs do not have to incorporate this logic
  2080.    and this approach simplifies the atomic FSM paradigms.
  2081.  
  2082.    5.1.2   MonitorFSM issues with neighbor failure and stream recovery
  2083.    Reason Codes:
  2084.  
  2085.    The details of these specific instances can also be intertwined with
  2086.    Retry, Routing and LRM failures.
  2087.  
  2088.  
  2089.  
  2090. Rajagopal, Sergeant         Expires April 21, 1996            [Page 38]
  2091.  
  2092. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2093.  
  2094.  
  2095.                    12 CantRecover Unable to recover failed stream.
  2096.  
  2097.                    22 IntfcFailure A network interface failure has been
  2098.                                      detected.
  2099.  
  2100.                    27 NetworkFailure A network failure has been
  2101.                                      detected.
  2102.  
  2103.                    39 RestartLocal The local ST agent has recently
  2104.                                      restarted.
  2105.  
  2106.                    40 RestartRemote The remote ST agent has recently
  2107.                                      restarted.
  2108.  
  2109.                    47 STAgentFailure An ST agent failure has been
  2110.                                      detected.
  2111.  
  2112.    5.1.3    Retry and Timeout Failures Reason Codes:
  2113.  
  2114.                    38 ResponseTimeout Control message has been
  2115.                                        acknowledged but not answered
  2116.                                        by an appropriate control message.
  2117.  
  2118.                    41 RetransTimeout An acknowledgment has not been
  2119.                                      received after several retransmissions.
  2120.  
  2121.    5.1.4   Routing issues Reason Codes:
  2122.  
  2123.    Routing issues initiate special exception processing requirements.
  2124.    Some of these have been addressed in the ST2+ specification, but each
  2125.    implementation should consider the network and platform architecture,
  2126.    also.
  2127.  
  2128.                    9 BadMcastAddress IP Multicast address is
  2129.                                      unacceptable in CONNECT
  2130.  
  2131.                    28 NoRouteToAgent Cannot find a route to an ST agent.
  2132.  
  2133.                    29 NoRouteToHost Cannot find a route to a host.
  2134.  
  2135.                    30 NoRouteToNet Cannot find a route to a network.
  2136.  
  2137.                    34 PathConvergence Two branches of the stream join
  2138.                                       during the CONNECT setup.
  2139.  
  2140.  
  2141.  
  2142. Rajagopal, Sergeant         Expires April 21, 1996            [Page 39]
  2143.  
  2144. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2145.  
  2146.  
  2147.    
  2148.  
  2149.                    42 RouteBack Route to next-hop through same interface
  2150.                                   as previous-hop and is not previous-hop.
  2151.  
  2152.                    43 RouteInconsist A routing inconsistency has been
  2153.                                        detected.
  2154.  
  2155.                    44 RouteLoop A routing loop has been detected.
  2156.  
  2157.    5.1.5    LRM issue Reason Codes:
  2158.  
  2159.    Optimization of routing and LRM issues can also initiate special
  2160.    exception processing requirements. Some of these have been addressed
  2161.    in the ST2+ specification, but each implementation should also
  2162.    consider the network and platform architecture.
  2163.  
  2164.                    10 CantGetResrc Unable to acquire (additional)
  2165.                                         resources.
  2166.  
  2167.                    11 CantRelResrc Unable to release excess resources.
  2168.  
  2169.                    17 FlowSpecMismatch FlowSpec in request does not
  2170.                                         match existing FlowSpec.
  2171.  
  2172.                    18 FlowSpecError An error occurred while processing
  2173.                                         the FlowSpec.
  2174.  
  2175.                    19 FlowVerUnknown Control PDU has a FlowSpec Version
  2176.                                       Number that is not supported.
  2177.  
  2178.                    20 GroupUnknown Control PDU contains an unknown Group
  2179.                                       Name.
  2180.  
  2181.                    21 InconsistGroup An inconsistency has been detected
  2182.                                       with the streams forming a group.
  2183.  
  2184.  
  2185.  
  2186. Rajagopal, Sergeant         Expires April 21, 1996            [Page 40]
  2187.  
  2188. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2189.  
  2190.  
  2191.                    50 StreamPreempted The stream has been preempted by
  2192.                                      one with ahigher precedence.
  2193.  
  2194.    6   APPENDIX
  2195.  
  2196.    6.1     Glossary
  2197.  
  2198.    All stream FSMs have the following 4 states in common:
  2199.  
  2200.    Init: The stream has no active Targets.
  2201.  
  2202.    Establd: The stream is established and may or may not have Target
  2203.    members.
  2204.  
  2205.    Add: The stream is currently adding Targets as the result of a
  2206.    Connect or Join initiated Connect.
  2207.  
  2208.    Change: The stream is currently attempting to Change according to a
  2209.    new FlowSpec.
  2210.  
  2211.    A list of predicates, API interactions and combination conditions
  2212.    include the following:
  2213.  
  2214.    api_close - the Origin API explicitly terminates a stream, since a
  2215.    stream with no Targets at the Origin may remain Established.
  2216.  
  2217.    api_open - the Origin API explicitly establishes a stream to initiate
  2218.    all database setup functions whether or not any Targets are initially
  2219.    specified.
  2220.  
  2221.    api_connect- the Origin API adds Targets.
  2222.  
  2223.    api_change - the Origin API initiates a CHANGE to the FlowSpec.
  2224.  
  2225.    api_disconnect - the Origin API initiates a DISCONNECT to Targets.
  2226.  
  2227.    accept_api - the OSM propagates an ACCEPT received from either a TSM
  2228.    or a NHSM to the Origin API.
  2229.  
  2230.    notify_api - the OSM propagates a NOTIFY received from either a TSM
  2231.    or a NHSM to the Origin API.
  2232.  
  2233.  
  2234.  
  2235. Rajagopal, Sergeant         Expires April 21, 1996            [Page 41]
  2236.  
  2237. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2238.  
  2239.  
  2240.    refuse_api - the OSM propagates a REFUSE received from either a TSM
  2241.    or a NHSM to the Origin API.
  2242.  
  2243.    nexthop_open - the first time each unique NHSM is invoked for each
  2244.    unique stream in an Agent, the Agent explicitly establishes a NHSM
  2245.    database and Establd state.
  2246.  
  2247.    prevhop_open - the first time the PHSM is invoked for each unique
  2248.    stream in an Agent, the Agent explicitly establishes a PHSM database
  2249.    and Establd state.
  2250.  
  2251.    api_join - the Target API initiates a JOIN request.
  2252.  
  2253.    api_refuse - the Target API initiates a REFUSE to the TSM.
  2254.  
  2255.    api_refuse_change - the Target API initiates a REFUSE of a CHANGE
  2256.    request to the TSM.
  2257.  
  2258.    connect_api - the TSM propagates a CONNECT to the Target API.
  2259.  
  2260.    change_api - the TSM propagates a CHANGE to the Target API.
  2261.  
  2262.    join_reject_api - the TSM propagates a JOIN_REJECT to the Target API.
  2263.  
  2264.    disconnect_api - the TSM propagates a DISCONNECT to the Target API.
  2265.  
  2266.    JOIN_AUTH - a PHSM or OSM JOIN is authorized.
  2267.  
  2268.    JOIN_NOT_AUTH - a PHSM or OSM JOIN is not authorized.
  2269.  
  2270.    RetryTimeout - an FSM recieves an implicit REFUSE response to a
  2271.    CONNECT or CHANGE request to one Target in the TargetList by
  2272.    exceeding the ACK retry and timeout values (i.e., ToChange/NChange,
  2273.    ToConnect/NConnect timers and retry counts) for that particular
  2274.    transaction.
  2275.  
  2276.    The Add and Change states cannot transition back to the Establd state
  2277.    until all Targets have given implicit or explicit responses.
  2278.  
  2279.    ACCEPT_LAST - the last Target in the TargetList for a CONNECT or
  2280.    CHANGE has responded with an ACCEPT.
  2281.  
  2282.    DISC_LAST - the last Target in the TargetList for a CONNECT or CHANGE
  2283.    has responded with a DISCONNECT.
  2284.  
  2285.    REFUSE_LAST - the last Target in the TargetList for a CONNECT or
  2286.  
  2287.  
  2288.  
  2289. Rajagopal, Sergeant         Expires April 21, 1996            [Page 42]
  2290.  
  2291. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2292.  
  2293.  
  2294.    CHANGE has responded with a REFUSE.
  2295.  
  2296.    RetryTimeout_last - the last Target in the TargetList for a CONNECT
  2297.    or CHANGE has responded with an implicit REFUSE by exceeding the ACK
  2298.    retry and timeout values (i.e., ToChange/NChange, ToConnect/NConnect
  2299.    timers and retry counts).
  2300.  
  2301.    E2E_Timeout_last - the last Target in the TargetList for a CONNECT or
  2302.    CHANGE has responded with an implicit REFUSE by exceeding the End-
  2303.    to-End timeout value (i.e., ToChangeResp, ToConnectResp timers).
  2304.  
  2305.    Except in the case of the OSM (which must be explicitly closed by the
  2306.    Origin API, the Establd, Add and Change states transition back to the
  2307.    Init state when all Targets in the unique FSM TargetList have given
  2308.    implicit or explicit stream teardown instructions.
  2309.  
  2310.    DISC_ALL -a DISCONNECT has been received for the last Target in the
  2311.    entire TargetList for a stream FSM (as opposed to the TargetList for
  2312.    a particular CONNECT or CHANGE request).
  2313.  
  2314.    REFUSE_ALL - a REFUSE has been received for the last Target in the
  2315.    entire TargetList for a stream FSM (as opposed to the TargetList for
  2316.    a particular CONNECT or CHANGE request
  2317.  
  2318.  
  2319.  
  2320.    6.2     ST Control Message Flow
  2321.  
  2322.    Control Message Types
  2323.  
  2324.    ST control messages are generally of the Request -Response type.
  2325.    Table 8 summarizes these control messages alphabetically. The table
  2326.    has three major columns.
  2327.  
  2328.        o   Message type
  2329.  
  2330.        o   Response
  2331.  
  2332.        o   Possible causes for message
  2333.  
  2334.    6.2.1    Message Type
  2335.  
  2336.    Under the Message Type each control message is categorized either as
  2337.    a:
  2338.  
  2339.        -   Request message
  2340.  
  2341.        -   Response message
  2342.  
  2343.  
  2344.  
  2345. Rajagopal, Sergeant         Expires April 21, 1996            [Page 43]
  2346.  
  2347. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2348.  
  2349.  
  2350.    It is possible for a message to be more than one type depending on
  2351.    the usage, although this is not apparent from this table.
  2352.  
  2353.    6.2.2   Response
  2354.  
  2355.    The Response to each control message is given in the next major
  2356.    column under Response. Note that the Response to a message can be
  2357.    interpreted to mean either:
  2358.  
  2359.        1.  a Response to another control message
  2360.  
  2361.        2.  a Response to indicate the condition of receipt of the
  2362.    message,         driven primarily by the error control function
  2363.  
  2364.    The second interpretation of Response includes positive
  2365.    acknowledgments and negative acknowledgments (error response). Thus,
  2366.    this major column has the following categories:
  2367.  
  2368.        -   Error Response
  2369.  
  2370.        -   Mandatory Response
  2371.  
  2372.        -   Other response following mandatory response.
  2373.  
  2374.    An X or an entry in the table indicates classification of a message
  2375.    under a particular category shown under each major column.
  2376.  
  2377.    6.2.3   Possible causes for messages
  2378.  
  2379.    Finally, a control message might have been sent in response to
  2380.    another control message. This is shown in the last column. Note that
  2381.    it is possible that independently a number of control messages may be
  2382.    the cause for this control message in question Note that an entry
  2383.    does not necessarily mean that is the only cause. A blank entry in
  2384.    this column for instance means that the message was not invoked by
  2385.    another message.
  2386.  
  2387.    For example, an ACCEPT message is a Response Type message to either a
  2388.    CONNECT or a CHANGE message. It will be acknowledged (Mandatory
  2389.    response) with an ACK. It may be responded with an ERROR in case of
  2390.    error conditions. The state diagrams illustrate this sequencing more
  2391.    completely. It may be noted that the sequencing of messages gives the
  2392.    protocol semantics.
  2393.  
  2394.  
  2395.    Table 8: Message Types: Requests, Responses and Others
  2396.  
  2397.    
  2398.  
  2399.  
  2400.  
  2401. Rajagopal, Sergeant         Expires April 21, 1996            [Page 44]
  2402.  
  2403. Internet Draft        ST2+ Protocol State Machines     October 26, 1996
  2404.  
  2405.  
  2406.    
  2407.    ACKNOWLEDGEMENTS and AUTHORS:
  2408.  
  2409.    Many individuals have contributed to the work described in this memo.
  2410.    We thank the participants in the ST Working Group for their input,
  2411.    review, and constructive comments.
  2412.  
  2413.    We would also like to thank Luca Delgrossi and Louis Berger for
  2414.    allowing us to adopt the text from their [1] document.
  2415.  
  2416.    We would like to acknowledge inputs from Mark Pullen and his graduate
  2417.    students, Tim O'Malley, Eric Crowley, Muneyoshi Suzuki and many
  2418.    others.
  2419.  
  2420.    Murali Rajagopal EMail: murali@fbcs.com, Phone: 714-764-2952
  2421.  
  2422.    Sharon Sergeant EMail:sergeant@xylogics.com, Phone: 617-893-6142
  2423.  
  2424.    LIST OF REFERENCES:
  2425.  
  2426.    [1] L. Delgrossi and L. Berger: Internet STream Protocol Version 2
  2427.    (ST) - Protocol Specification- Version ST2+, RFC 1819,  April 1995.
  2428.  
  2429.    [2] D. Brand and P. Zafiropulo: On Communicating Finite-State
  2430.    Machines, J.ACM, 30, No.2, April 1983
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461. Rajagopal, Sergeant         Expires April 21, 1996            [Page 45]
  2462.  
  2463.