home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / fido / ftsc_all.z43 / FTS-0008.EXT < prev    next >
Text File  |  1990-06-17  |  27KB  |  465 lines

  1. Document: FTS-0008
  2. Version:  002
  3. Date:     17-Jun-90
  4. Updates:  FTS-0001
  5.  
  6.  
  7.  
  8.                   An Enhanced FidoNet(r) Technical Standard
  9.                  Extending FTS-0001 to include Bark requests
  10.  
  11.                                June 17, 1990
  12.  
  13.  
  14.  
  15.  
  16. Status of this document:
  17.  
  18.     This document specifies an optional standard for the FidoNet community.
  19.     Implementation of the protocols defined in this document is not mandatory,
  20.     but all implementations of these protocols are expected to adhere to this
  21.     standard.  Distribution of this document is subject to the limitations of
  22.     the copyright notice displayed below.
  23.  
  24.  
  25.  
  26.     Copyright 1990 by Philip L. Becker.  Portions of this document are
  27.     copyright 1990 by the International FidoNet Association and are
  28.     incorporated with their consent.  The right to distribute for 
  29.     non-commercial use is granted to the FidoNet Technical Standards
  30.     Committee, provided that no fee is charged.  This may be posted on FidoNet
  31.     electronic BBSs which charge no fee for accessing this document.   Any and
  32.     all other reproduction or excerpting requires theexplicit written consent
  33.     of the copyright holders.
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  A. Introduction
  68.  
  69.  1. This Document
  70.  
  71.     This document describes the standard for "Bark" type FidoNet file
  72.     request operation.  Bark file requests are an extension to the basic
  73.     FTS-0001 mail session, and this document presents these requests as a
  74.     modification to that document.
  75.  
  76.  2. What are File Requests?
  77.  
  78.     File Requests are a way of requesting that a specific file be sent during
  79.     a FidoNet mail session.  This has many advantages over simply logging on to
  80.     a BBS and downloading a file:
  81.  
  82.        o  You need not be a validated user
  83.  
  84.        o  You don't have to spend time searching for the file on the BBS
  85.  
  86.        o  You can schedule the file request to take place at any time without
  87.           your being near your computer.
  88.  
  89.     There are two commonly used types of file requests on FidoNet today, WaZOO
  90.     and Bark requests.  WaZOO requests are used by Opus and BinkleyTerm, and
  91.     are not documented here.  See the document FTS-0006 by V. Perriello for a
  92.     description of these.   Bark requests were the first file request extension
  93.     to the FTS-0001 protocol, and are supported (at least partially) by many
  94.     mailers, including SEAdog, Dutchie, BinkleyTerm, and to a certain extent
  95.     Opus.  This document describes how to implement Bark-type file requests.
  96.  
  97.  
  98.  B. Terms Used in this Document
  99.  
  100.  1. The diagrams and notations used in this document are the same as those used
  101.     in the FTS-0001 document.  Please see FTS-0001 for a description of these.
  102.     This document should be considered as an extension to the FTS-0001 session
  103.     layer protocol, and you will require FTS-0001 in addition to this document
  104.     to fully understand what is presented here.
  105.   
  106.     In addition to the data description language described in FTS-0001 section
  107.     A.4, one extra terminal used in this notation:
  108.   
  109.     (* terminals *)
  110.     someName<max> - String of up to max chars, NOT null terminated
  111.  C. Performing File Requests
  112.  
  113.  1. Introduction
  114.  
  115.     A Bark request consists of transmitting a special Bark Request packet which
  116.     contains a filename, a date (used for update requests), and optionally a
  117.     password.  The system receiving the request then decides if it can send the
  118.     requested file or not, and if it can does so using the same protocol used
  119.     to send attached files.  Bark request handling is always controlled by the
  120.     answering system, and consists of two phases.  In phase one, the receiving
  121.     system asks the calling system to honor requests it may have to ask for
  122.     files from the caller.  In phase two, the receiving system allows the
  123.     calling system to request files from it.
  124.  
  125.     Update file requests are the same as normal file requests, with one
  126.     exception.  If the date in the Bark Request packet (described below) is
  127.     greater than or equal to the date of the actual file requested, the file
  128.     will not be sent.  The requestor should set the date to the date of the
  129.     the actual file on its own end if an update request is desired.
  130.  
  131.  
  132.  D. The Bark Request Packet
  133.  
  134.  1. Data Link Layer Data Definition.
  135.  
  136.     The Bark Request packet is a variable-sized packet containing a header, a
  137.     filename, a date (which is used only for update requests - in a normal file
  138.     request it's 0) and an optional password. When receiving a Bark Request
  139.     packet, the ETX may be used to determine the end of the data portion. Note
  140.     that the CRC is sent in the reverse byte order of a normal CRC XMODEM data
  141.     block (see FTS-0001 section G.1).
  142.  
  143.     Note: some systems will send a password in the data block even if none is
  144.     needed.  Incoming passwords should be ignored unless the other system is
  145.     trying to request a passworded file.
  146.  
  147.   
  148.  
  149.                           Bark File Request Packet
  150.       Offset
  151.       dec hex
  152.               ┌───────────────────────────────────────────────┐
  153.         0   0 │       ACK - Start of Bark Request - 06H       │
  154.               ├───────────────────────────────────────────────┤
  155.         1   1 │     Filename - Packed DOS file format         │
  156.               ├───────────────────────────────────────────────┤
  157.         n   n │              SPACE - 20H                      │
  158.               ├───────────────────────────────────────────────┤
  159.         n   n │              Date (0 if not Update Request)   │
  160.               ├───────────────────────────────────────────────┤
  161.         n   n │      SPACE - 20H  (only if pswd follows)      │
  162.               ├───────────────────────────────────────────────┤
  163.         n   n │         Password (optional)                   │
  164.               ├───────────────────────────────────────────────┤
  165.         n   n │       ETX -  End of RESYNC packet  - 03H      │
  166.               ├───────────────────────────────────────────────┤
  167.         n   n │     (*1)     CRC  low order byte              │
  168.               ├───────────────────────────────────────────────┤
  169.         n   n │     (*1)     CRC high order byte              │
  170.               └───────────────────────────────────────────────┘
  171.  
  172.               *1 - CRC does not include the ACK or ETX and is
  173.                    in the reverse byte order from the CRC in a
  174.                    normal XMODEM data packet.
  175.  2. Data Description Notation of Bark Request Packet
  176.  
  177.     DataBlock (no password) = ACK
  178.                               Filename<12>
  179.                               Space
  180.                               Date<11>
  181.                               ETX
  182.                               CRC
  183.   
  184.     DataBlock (with password) = ACK
  185.                                 Filename<12>
  186.                                 Space
  187.                                 Date<11>
  188.                                 Space
  189.                                 Password<6|8>
  190.                                 ETX
  191.                                 CRC
  192.   
  193.     ACK   = 06H       (* Header for file request block *)
  194.     Space = 20H       (* Space character *)
  195.     ETX   = 03H       (* End of block *)
  196.   
  197.     Filename          (* Name of file requested *)
  198.     Date              (* ASCII string; the number of seconds
  199.                          since midnight, January 1, 1970 *)
  200.     Password          (* The password needed to request this
  201.                          file, if any.  Maximum length is 6 for
  202.                          BinkleyTerm and Opus, 8 for SEAdog
  203.                          and Dutchie. *)
  204.   
  205.     CRC = crc[2]      (* CCITT Cyclic Redundancy Check.  The
  206.                          same algorithm as used for XModem
  207.                          CRCs.  The CRC is calculated on
  208.                          all data in the block between but
  209.                          not including the ACK and the ETX *)
  210.  E. Session Layer Protocol:
  211.  
  212.     This section describes the modified FTS-0001 session layer protocol.  This
  213.     is the only area of FTS-0001 which is modified to implement Bark style file
  214.     requests.  File Requests are performed at the end of the normal FidoNet
  215.     mail session, after any mail pickup is performed.
  216.  
  217.     The diagrams below desribe the session level protocol with Bark file
  218.     requests implemented.  The state tables have been broken into subroutines
  219.     but the FTS-0001 portion is not functionally changed.  FTS-0001 sender
  220.     states S4 through S7 are now table "Send Mail SM0".  FTS-0001 receiver
  221.     states R3 through R6 are now table "Receive Mail RM0".  They are not
  222.     functionally changed in any way from FTS-0001, they are just broken out
  223.     to allow them to be used as subroutines.  Finally Sender states S0 through
  224.     S3 are unchanged, as are Receiver states R0 through R2.
  225.  
  226.     The remaining FTS-0001 states are enhanced to implement the Bark file
  227.     request protocol. In addition, the subroutine state tables "Send Bark SB0"
  228.     and "Receive Bark RB0" have been added to handle the actual file requests.
  229.  
  230.     The following diagrams fully replace the Session Layer protocol state
  231.     tables in FTS-0001.  No other changes to FTS-0001 are required to implement
  232.     the Bark File request feature.
  233.     Sender  (Top level)
  234.  
  235.     ┌─────┬──────────┬─────────────────────────┬─────────────────────────┬─────┐
  236.     │State│ State    │ Predicate(s)            │ Action(s)               │ Next│
  237.     │  #  │ Name     │                         │                         │ St  │
  238.     ├─────┼──────────┼─────────────────────────┼─────────────────────────┼─────┤
  239.     │ S0  │ SendInit │                         │ dial modem              │ S1  │
  240.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  241.     │ S1  │ WaitCxD  │1│ carrier detected      │ delay 1-5 seconds       │ S2  │
  242.     │     │  (*1)    │ │                       │ Set SLO if > 2400bps,   │     │
  243.     │     │          │ │                       │ Reset SLO if <= 2400bps │     │
  244.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  245.     │     │          │2│ busy, etc.            │ report no connection    │ exit│
  246.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  247.     │     │          │3│ voice                 │ report no carrier       │ exit│
  248.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  249.     │     │          │4│ carrier not detected  │ report no connection    │ exit│
  250.     │     │          │ │ within 60 seconds     │                         │     │
  251.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  252.     │ S2  │ WhackCRs │1│ over 30 seconds       │ report no response <cr> │ exit│
  253.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  254.     │     │          │2│ ?? <cr>s received     │ delay 1 sec             │ S3  │
  255.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  256.     │     │          │3│ <cr>s not received    │ send <cr> <sp> <cr> <sp>│ S2  │
  257.     │     │          │ │                       │   delay ??? secs        │     │
  258.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  259.     │ S3  │ WaitClear│1│ no input for 0.5 secs │ send TSYNCH = AEH       │ S4  │
  260.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  261.     │     │          │2│ over 60 seconds       │ hang up, report garbage │ exit│
  262.     │     │          │ │ and line not clear    │                         │     │
  263.     ├─────┼──────────┼─┴───────────────────────┼─────────────────────────┼─────┤
  264.     │ S4  │ SendMail │                         │ (Send Mail SM0)         │ S5  │
  265.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  266.     │ S5  │ TryPickup│1│ Rcv TSYNC             │ (Receive Mail RM0)      │ S5  │
  267.     │     │   (*2)   ├─┼───────────────────────┼─────────────────────────┼─────┤
  268.     │     │          │2│ Rcv SYN               │ (Receive Bark Req RB0)  │ S5  │
  269.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  270.     │     │          │3│ Rcv ENQ               │ (Do Bark Requests SB0)  │ S5  │
  271.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  272.     │     │          │4│ Rcv 'C' or NAK        │ Send EOT                │ S5  │
  273.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  274.     │     │          │5│ Rcv Other Char        │ Send SUB                │ S5  │
  275.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  276.     │     │          │6│ No Data for 45 secs   │ Hang Up                 │ exit│
  277.     └─────┴──────────┴─┴───────────────────────┴─────────────────────────┴─────┘
  278.  
  279.     *1 - This state is shown for the extended SEAlink protocol.  Omit the
  280.          set/reset SLO actions if adding Bark to a strict FTS-0001 protocol
  281.          implementation, or if not implementing overdrive in SEAdog.
  282.    
  283.     *2 - To refuse to pickup mail (S5.1) may send a CAN and stay in (S5).
  284.  
  285.     Note: Although the above shows the sender emitting only one TSYNCH, it is
  286.     recommended that a timeout of 5-20 seconds should initiate another TSYNCH.
  287.     The receiver should tolerate multiple TSYNCHs.
  288.     Receiver (Top Level)
  289.  
  290.     The  receiving FSM is given  an external timer, the expiration of  which
  291.     will cause termination with a result of 'no calls' (R0.2).
  292.     ┌─────┬──────────┬─────────────────────────┬─────────────────────────┬─────┐
  293.     │State│ State    │ Predicate(s)            │ Action(s)               │ Next│
  294.     │  #  │ Name     │                         │                         │ St  │
  295.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  296.     │ R0  │ WaitCxD  │1│ carrier detected      │                         │ R1  │
  297.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  298.     │     │          │2│ external timer expires│ report no calls         │ exit│
  299.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  300.     │ R1  │ WaitBaud │1│ baud rate detected    │ send signon with <cr>s  │ R2  │
  301.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  302.     │     │          │2│ no detect in ?? secs  │ hang up, report no baud │ exit│
  303.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  304.     │ R2  │ WaitTsync│1│ TSYNCH received       │ ignore input not TSYNCH │ R3  │
  305.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  306.     │     │          │2│ 60 seconds timeout    │ hang up, report not Fido│ exit│
  307.     ├─────┼──────────┼─┴───────────────────────┼─────────────────────────┼─────┤
  308.     │ R3  │ RecMail  │                         │ (Receive Mail RM0)      │ R4  │
  309.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  310.     │ R4  │ AllowPkup│1│ Have pickup for sender│ Send Tsync,             │ R5  │
  311.     │     │          │ │                       │   Set T1=1 sec          │     │
  312.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  313.     │     │          │2│ No pickup for sender  │                         │ R6  │
  314.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  315.     │ R5  │ WtPickup │1│ Rcv NAK or 'C'        │ (Send Mail SM0)         │ R6  │
  316.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  317.     │     │          │2│ Rcv SUB               │ Send Tsync,             │ R5  │
  318.     │     │          │ │                       │   Set T1=1 sec          │     │
  319.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  320.     │     │          │3│ Rcv CAN               │ Report Mail Refused     │ R6  │
  321.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  322.     │     │          │4│ T1 expired            │ Send Tsync,             │ R5  │
  323.     │     │          │ │                       │   Set T1=1 sec          │     │
  324.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  325.     │     │          │5│ 45 secs in R5         │ Hang Up, report error   │ exit│
  326.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  327.     │ R6  │ AskBark  │1│ Wish to make requests │ Send SYN                │ R7  │
  328.     │     │   (*1)   ├─┼───────────────────────┼─────────────────────────┼─────┤
  329.     │     │          │2│ No requests to make   │                         │ R8  │
  330.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  331.     │ R7  │ DoRequest│1│ Rcv CAN               │ Report Requests Refused │ R8  │
  332.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  333.     │     │          │2│ Rcv ENQ               │ (Send Bark SB0)         │ R8  │
  334.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  335.     │     │          │3│ Rcv SUB               │ Send SYN                │ R7  │
  336.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  337.     │     │          │4│ Rcv NAK or 'C'        │ Send EOT                │ R6  │
  338.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  339.     │     │          │5│ Rcv Other             │ eat character           │ R7  │
  340.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  341.     │     │          │6│ 5 sec, no input       │ Send SYN                │ R7  │
  342.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  343.     │     │          │7│ 45 secs in R7         │                         │ R8  │
  344.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  345.     │ R8  │ WtPickup │1│ Allow File Request    │ (Receive Bark RB0),     │ exit│
  346.     │     │          │ │                       │   Hang Up               │     │
  347.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  348.     │     │          │2│ Disallow Requests     │ Hang Up                 │ exit│
  349.     └─────┴──────────┴─┴───────────────────────┴─────────────────────────┴─────┘
  350.     *1 - Some implementations always do (R6.1) even if they have no requests.
  351.     Sender - Send Mail
  352.  
  353.     ┌─────┬──────────┬─────────────────────────┬─────────────────────────┬─────┐
  354.     │State│ State    │ Predicate(s)            │ Action(s)               │ Next│
  355.     │  #  │ Name     │                         │                         │ St  │
  356.     ├─────┼──────────┼─────────────────────────┼─────────────────────────┼─────┤
  357.     │ SM0 │ SendMail │                         │ (XMODEM send packet XS0)│ SM1 │
  358.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  359.     │ SM1 │ CheckMail│1│ XMODEM successful     │ (Fido registers success)│ SM2 │
  360.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  361.     │     │          │2│ XMODEM fail or timeout│ hang up, report mail bad│ exit│
  362.     ├─────┼──────────┼─┴───────────────────────┼─────────────────────────┼─────┤
  363.     │ SM2 │ SendFiles│                         │ (BATCH send files BS0)  │ SM3 │
  364.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  365.     │ SM3 │ CheckFile│1│ BATCH send successful │ report success          │ exit│
  366.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  367.     │     │          │2│ BATCH send failed     │ hang up, rept files fail│ exit│
  368.     └─────┴──────────┴─┴───────────────────────┴─────────────────────────┴─────┘
  369.  
  370.  
  371.  
  372.     Sender - Send Bark
  373.  
  374.     ┌─────┬──────────┬─────────────────────────┬─────────────────────────┬─────┐
  375.     │State│ State    │ Predicate(s)            │ Action(s)               │ Next│
  376.     │  #  │ Name     │                         │                         │ St  │
  377.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  378.     │ SB0 │ SendBark │1│ File to request       │ Build Bark Request Pkt, │ SB1 │
  379.     │     │          │ │                       │   Set tries = 0         │     │
  380.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  381.     │     │          │2│ No more files to req  │ Send ETB                │ exit│
  382.     ├─────┼──────────┼─┴───────────────────────┼─────────────────────────┼─────┤
  383.     │ SB1 │ AskFile  │                         │ Send Bark Packet        │ SB2 │
  384.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  385.     │ SB2 │ RcvFile  │1│ Rcv ACK               │ (Batch Receive BR0)     │ SB3 │
  386.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  387.     │     │          │2│ Tries > 5             │ Send ETB, report failed │ exit│
  388.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  389.     │     │          │3│ Rcv Other             │ Purge input, Incr tries │ SB1 │
  390.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  391.     │     │          │4│ 10 sec w/o ACK        │ Incr tries              │ SB1 │
  392.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  393.     │ SB3 │ NxtFile  │1│ Rcv ENQ               │                         │ SB0 │
  394.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  395.     │     │          │2│ Rcv Other             │ Purge Input             │ SB3 │
  396.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  397.     │     │          │3│ 5 sec, no input       │ Send SUB                │ SB3 │
  398.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  399.     │     │          │4│ 45 sec in SB3         │ Hang up, report error   │ exit│
  400.     └─────┴──────────┴─┴───────────────────────┴─────────────────────────┴─────┘
  401.     Sender & Receiver - Receive Mail
  402.  
  403.     ┌─────┬──────────┬─────────────────────────┬─────────────────────────┬─────┐
  404.     │State│ State    │ Predicate(s)            │ Action(s)               │ Next│
  405.     │  #  │ Name     │                         │                         │ St  │
  406.     ├─────┼──────────┼─────────────────────────┼─────────────────────────┼─────┤
  407.     │ RM0 │ RecMail  │                         │ (XMODEM rec packet XR0) │ RM1 │
  408.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  409.     │ RM1 │ XRecEnd  │1│ XMODEM successful     │ delay 1 second          │ RM2 │
  410.     │     │          │ │                       │   flush input           │     │
  411.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  412.     │     │          │2│ XMODEM failed         │ hang up, rept mail fail │ exit│
  413.     ├─────┼──────────┼─┴───────────────────────┼─────────────────────────┼─────┤
  414.     │ RM2 │ RecFiles │                         │ (BATCH rec files BR0)   │ RM3 │
  415.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  416.     │ RM3 │ ChkFiles │1│ BATCH recv successful │ delay 2 secs, rprt good │ exit│
  417.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  418.     │     │          │2│ BATCH recv failed     │ hang up, report bad file│ exit│
  419.     └─────┴──────────┴─┴───────────────────────┴─────────────────────────┴─────┘
  420.  
  421.  
  422.     Sender & Receiver - Receive Bark
  423.  
  424.     ┌─────┬──────────┬─────────────────────────┬─────────────────────────┬─────┐
  425.     │State│ State    │ Predicate(s)            │ Action(s)               │ Next│
  426.     │  #  │ Name     │                         │                         │ St  │
  427.     ├─────┼──────────┼─┬───────────────────────┼─────────────────────────┼─────┤
  428.     │ RB0 │ HonorReq │1│ Ok to honor request   │ Purge Input, Send ENQ,  │ RB1 │
  429.     │     │          │ │                       │   Set T1 = 2 seconds    │     │
  430.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  431.     │     │          │2│ Don't wish to honor   │ Send CAN                │ exit│
  432.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  433.     │ RB1 │ WaitBark │1│ Got ACK               │ Rcv Bark Packet (*1)    │ RB2 │
  434.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  435.     │     │          │2│ Got ETB               │ Report done             │ exit│
  436.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  437.     │     │          │3│ Got ENQ               │ Send ETB                │ RB0 │
  438.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  439.     │     │          │4│ T1 expired            │ Purge Input, Send ENQ,  │ RB1 │
  440.     │     │          │ │                       │   Set T1 = 2 seconds    │     │
  441.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  442.     │     │          │5│ 20 seconds in RB1     │ Hang Up, Report error   │ exit│
  443.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  444.     │ RB2 │ AckBark  │1│ Bark Pkt Rcvd Good    │ Send ACK                │ RB3 │
  445.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  446.     │     │          │2│ Bark Pkt Rcv Error    │ Send NAK                │ RB1 │
  447.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  448.     │ RB3 │ WaitStrt │1│ Got 'C' or NAK        │                         │ RB4 │
  449.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  450.     │     │          │2│ No data for 3 seconds │ Send ACK                │ RB3 │
  451.     │     │          ├─┼───────────────────────┼─────────────────────────┼─────┤
  452.     │     │          │3│ 15 seconds in RB3     │ Hang Up, Report Error   │ exit│
  453.     ├─────┼──────────┼─┼───────────────────────┼─────────────────────────┼─────┤
  454.     │ RB4 │ SendFile │1│ Can snd requested file│ (Batch Send File BS0)   │ RB0 │
  455.     │     │   (*2)   ├─┼───────────────────────┼─────────────────────────┼─────┤
  456.     │     │          │2│ Can't send file       │ Send EOT                │ RB0 │
  457.     └─────┴──────────┴─┴───────────────────────┴─────────────────────────┴─────┘
  458.     *1 - If SUB (16H) received before ETX go to RB0 to resync bark receive
  459.  
  460.     *2 - While deciding if file exists, and if the password allows it to be
  461.          sent etc., a NUL may be sent to buy 20 seconds more on the timeout
  462.          on the other end if it is using the SEAlink extended FTS-0001
  463.          specification protocol.  Sending a NUL is harmless for a strict
  464.          FTS-0001 session, but will not buy more time.
  465.