home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / fido / ftsc_all.z43 / FTS-0006.TXT < prev    next >
Text File  |  1989-07-12  |  48KB  |  876 lines

  1. FTS-0006
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                             YOOHOO and YOOHOO/2U2
  13.  
  14.                     The netmail handshake used by Opus-CBCS
  15.              and other intelligent Fidonet mail handling packages
  16.  
  17.  
  18.                 This document obsoletes and replaces FTS-0003
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. LEGAL STUFF
  30. -----------
  31.  
  32. The original  protocol and documentation are by Wynn Wagner III.  Updates
  33. have been made  to  this  document  by Vincent E.  Perriello, who also is
  34. responsible for most of the sample routine included with this document.
  35.  
  36. They are released to  the public domain for any use whatsoever as long as
  37. you don't modify any transmitted  structure  or try to make money hawking
  38. either the sample code or this document as if you owned them.
  39.  
  40. If you choose to use the  method  or  the  sample  routines,  you  do  so
  41. entirely at your own risk.  It  is  possible that the routines will cause
  42. physical damage to your equipment, an invasion of  fire ants, the plague,
  43. or an extended visit from in-laws.  If any  of  that  stuff  (or anything
  44. else) happens, you accept the consequences totally.
  45.  
  46.  
  47. CREDITS
  48. -------
  49.  
  50. Fido  and  Fidonet  are  registered  trademarks of Tom Jennings and  Fido
  51. Software.
  52.  
  53. SEAdog is a product of System Enhancement Associates.
  54.  
  55. The ZModem protocol was designed by Chuck Forsberg.  The Sealink protocol
  56. is copyrighted  by System Enhancment Associates.  The TeLink protocol was
  57. designed and first implemented by Tom Jennings.
  58.  
  59. The state charts in this document were done by Vince Perriello.
  60.  
  61. Rick Huebner designed  and  implemented  the  basic  WaZOO  file  request
  62. method.  Update request functionality was added by Vince Perriello.
  63.  
  64. YooHoo and YooHoo/2u2                                              Page 2
  65. Overview
  66.  
  67.  
  68.  
  69. UPFRONT
  70. -------
  71.  
  72. YOOHOO and YOOHOO/2U2 are  the  initial  handshakes  for the WaZOO e-mail
  73. protocol.  They are designed to let two systems establish a common ground
  74. for a netmail session while making  sure  that non-WaZOO software doesn't
  75. get upset by material it can't understand.
  76.  
  77. The YOOHOO procedure begins as a single  byte  (0xf1).   If the system on
  78. the other end doesn't reply to that byte,  no  further  YOOHOO  or  WaZOO
  79. transmissions are attempted.  To a non-WaZOO netmail system,  the  YOOHOO
  80. byte will simply seem like a byte of debris.
  81.  
  82. The  calling  system  initiates  the  YOOHOO  by  sending  the  attention
  83. character.   If the receiving system seems interested, the calling system
  84. sends a  128  byte packet containing such information as system and sysop
  85. names as well as a "capability mask." A 16-bit CRC protects the integrity
  86. of the 128-byte packet.
  87.  
  88. In response, the receiving  system  prepares  a  128  byte packet to send
  89. back.  This is the YOOHOO/2U2 procedure.
  90.  
  91.  
  92.  
  93. FEATURES
  94. --------
  95.  
  96. The features of YOOHOO and YOOHOO/2U2 include
  97.  
  98.          * non-interference with systems that don't understand the
  99.            handshake
  100.  
  101.          * almost foolproof method for identifying a remote system
  102.            and establishing a common ground for transmission
  103.  
  104.          * built-in room to expand the capabilities of WaZOO without
  105.            having to resort to a kludge
  106.  
  107.  
  108.  
  109. USAGE
  110. -----
  111.  
  112. A calling system simply uses  a  routine  that  transmits both YooHoo and
  113. TSYNC  handshake initiating characters to the  called  system.    If  the
  114. called system responds with an XMODEM 'NAK',  an FTS-0001 session will be
  115. initiated.  If an 'ENQ' is received, the  `YooHoo_Sender()'  routine will
  116. be invoked to handle the session negotiation.
  117.  
  118. A  receiving  system  can call a routine like `YooHoo_Receiver()'  if  it
  119. detects the YOOHOO character, or just drop into the FTS-0001  logic if it
  120. sees a TSYNC.
  121.  
  122. This simple method allows a mailer to take care of both the TSYNC and the
  123. YOOHOO handshakes.
  124.  
  125. YooHoo and YooHoo/2u2                                              Page 3
  126. WaZOO Protocols
  127.  
  128.  
  129.  
  130. PROTOCOLS
  131. ---------
  132.  
  133. Currently there are two WaZOO methods in use:
  134.  
  135.          DietIFNA ... similar to the method described by the FidoNet
  136.                       Technical Standards Committee.
  137.  
  138.                       VARIATION:  * file attaches don't even attempt to
  139.                                     do a modem7 file name.
  140.  
  141.                                   * SEAlink run-ahead is based on the
  142.                                     baud rate and can be as high as 24
  143.                                     packets for 9600 baud.
  144.  
  145.                                   * If the calling system transmits a
  146.                                     .REQ file for file requests, the
  147.                                     receiving system can respond to it.
  148.                                     See "WaZOO File Requests" (below)
  149.                                     for information on the .REQ file.
  150.  
  151.                                   * When there is nothing to send, a
  152.                                     system should remain quiet.  In
  153.                                     other words, the end of a session
  154.                                     can be determined by a timeout.
  155.  
  156.                                   * Under no circumstances should "BARK"
  157.                                     file request logic be activated
  158.                                     during a DietIFNA session. File
  159.                                     requests, if any, should be
  160.                                     transmitted using a .REQ file.
  161.  
  162.          ZedZap ..... a zmodem variant. The originator does a batch send
  163.                       then goes into a receive batch mode.  The called
  164.                       system does receive then send. In the event of a
  165.                       file request (see description below) made by the
  166.                       called system, one more turnaround is made to
  167.                       service the request.
  168.  
  169.                       VARIATION:  * Unlike the true zmodem protocol
  170.                                     described by Chuck Forsberg, ZedZap
  171.                                     routines must be able to handle a
  172.                                     batch mode that has no actual files.
  173.                                     In other words, it is possible for
  174.                                     there to be a init sequence
  175.                                     followed immediately by a ZFIN.
  176.  
  177.                                   * The maximum packet size is based on
  178.                                     the baud rate.  For example, at 2400
  179.                                     baud it's 2048 bytes.  At 9600 baud,
  180.                                     the packets are 8192 bytes. THIS IS
  181.                                     A SIGNIFICANT VARIATION FROM STRICT
  182.                                     ZMODEM IMPLEMENTATION. (There's
  183.                                     another YooHoo capability bit for
  184.                                     those systems which cannot handle
  185.                                     this block size)
  186.  
  187. YooHoo and YooHoo/2u2                                              Page 4
  188. WaZOO Filename conventions
  189.  
  190.  
  191.  
  192. WaZOO FILENAMES
  193. ---------------
  194.  
  195.  
  196.          MESSAGE BUNDLES...xxxxxxxx.PKT
  197.  
  198.                            Normal (unarchived) messages are sent in a file
  199.                            name that has a tag of .PKT.  The "x" characters
  200.                            should be hex digits.
  201.  
  202.                            IMPLEMENTATION NOTE
  203.                            -------------------
  204.                            There is no real requirement that a .PKT file be
  205.                            part of a netmail session.  Opus 1.03 and below
  206.                            require a .PKT file for DietIFNA, but this is
  207.                            a mistake that will be corrected.  The correct
  208.                            way to do things is to send only what needs to
  209.                            be sent.  If the calling system is doing a "poll"
  210.                            then only the YooHoo and a SEAlink (or TeLink)
  211.                            end-of-batch sequence should be all that is
  212.                            required.
  213.  
  214.  
  215.          LZ BUNDLES........xxxxxxxx.{MO|TU|WE|TH|FR|SA|SU}#
  216.  
  217.                            Message bundles are often shipped in an archive
  218.                            that has been compressed with some LZ utility.
  219.  
  220.                            The file name consists of a name with hex digits.
  221.                            The tag  is  one  of  seven  two-character
  222.                            prefixes ("MO","TU","WE","TH","FR","SA" or "SU")
  223.                            and a number (0-9).
  224.  
  225.  
  226.          FILE REQUESTS.....xxxxxxxx.REQ
  227.  
  228.                            This is explained below.
  229.  
  230.                            In a nutshell, the file name consists of the
  231.                            receiving system's Fidonet address expressed
  232.                            as two 4-digit hex numbers.  The file tag is .REQ.
  233.  
  234. YooHoo and YooHoo/2u2                                              Page 5
  235. Flow of a DietIFNA Session
  236.  
  237.  
  238.  
  239. DIETIFNA FLOW AND NOTES
  240. -----------------------
  241.  
  242.          All file transfer is done using either Sealink or TeLink. In the
  243.          case of TeLink, the modem7 file name transfer part is not used,
  244.          and the file name is extracted from the first block.
  245.  
  246.          The sealink run-ahead (number of blocks in the slide) is based
  247.          on the baud rate:  BlocksToSlide = BaudRate / 400, up to a max
  248.          of 24 blocks.
  249.  
  250.  
  251.  
  252.          The calling system:
  253.  
  254.                   * Send YooHoo
  255.  
  256.                   * Receive YooHoo/2u2
  257.  
  258.                   * Send bundles, files, file request (.REQ) files
  259.                     (in that order)
  260.  
  261.                   * Receive bundles, files, requested files (in that order)
  262.  
  263.  
  264.          Receiving system:
  265.  
  266.                   * Receive YooHoo
  267.  
  268.                   * Send YooHoo/2u2
  269.  
  270.                   * Receive bundles, files, file requests (in that order)
  271.  
  272.                   * Send bundles, files, and respond to file requests that
  273.                     arrived from the remote system.
  274.  
  275. YooHoo and YooHoo/2u2                                              Page 6
  276. Flow of a ZedZap session
  277.  
  278.  
  279.  
  280. ZEDZAP FLOW
  281. -----------
  282.  
  283.          The calling system:
  284.  
  285.                   * Send YooHoo
  286.  
  287.                   * Receive YooHoo/2u2
  288.  
  289.                   * Send bundles, files, file request (.REQ) files
  290.                     (in that order)
  291.  
  292.                   * Receive bundles, files, file requests
  293.  
  294.                   * If a file request (.REQ) file came in,
  295.                     respond to it
  296.  
  297.  
  298.          Receiving system:
  299.  
  300.                   * Receive YooHoo
  301.  
  302.                   * Send YooHoo/2u2
  303.  
  304.                   * Receive bundles, files, file requests
  305.  
  306.                   * Send bundles, files, our file requests, and
  307.                     respond to file requests that arrived from the
  308.                     remote system.
  309.  
  310.                   * If we sent a .REQ file in the preceding step,
  311.                     wait for the other system to respond.
  312.  
  313. YooHoo and YooHoo/2u2                                              Page 7
  314. WaZOO File Requests
  315.  
  316.  
  317.  
  318. WAZOO FILE REQUESTS
  319. -------------------
  320.  
  321. Rick Huebner, who adapted the ZModem routines for Opus, designed the
  322. .REQ file-based file request system.
  323.  
  324.  
  325. REQ FILE:
  326.  
  327. A WaZOO file request is based on a request file.  The name of a request
  328. file is similar to the .OUT and .FLO files used by Opus-CBCS.
  329.  
  330.          TEMPLATE: netnode.REQ
  331.  
  332.          EXAMPLE:  00010002.REQ   ... a request being sent to 1/2
  333.  
  334. The .REQ file is simply a text file that contains the files we want from
  335. the remote system.  Those file names can include wildcards, but should
  336. not contain a path.  Optionally, there can be a password... if the sending
  337. system requires one.
  338.  
  339. The "netnode" part of the file name is built from the remote systems net
  340. and node numbers.  Both numbers become 4-character hex numbers in the
  341. file name.
  342.  
  343. Let's say we're requesting THIS.ARC and all node lists from 12/2.  The
  344. file name would be 000C0002.REQ.  The contents would look like this:
  345.  
  346.                   this.arc
  347.                   nodelist.*
  348.  
  349. If the sysop of 12/2 requires a password of THAT to get the file THIS.ARC,
  350. the REQ file contents would have to change:
  351.  
  352.                   this.arc !that
  353.                   nodelist.*
  354.  
  355. Transaction-level passwords (of 6 or fewer characters) follow the file name:
  356.  
  357.                   <filename><single-space-character>!<password><cr>
  358.  
  359. YooHoo and YooHoo/2u2                                              Page 8
  360. WaZOO File Requests
  361.  
  362.  
  363.  
  364.  
  365. If the request is of the "update" genre, the type of update and the time,
  366. expressed as a UNIX-style long decimal ASCII number, follows the name, or
  367. in the event that there is a transaction-level password, the password. For
  368. example, an update request for file NEWOPUS.*, where you already have a file
  369. dated 1-January 1989, 00:00 and you live on the East Coast (GMT+06) would be:
  370.  
  371.                   NEWOPUS.* +599634000
  372.  
  373. The sign is required, it indicates the type of update request. A '+' means
  374. that all files matching the filespec "NEWOPUS.*" newer than the shown time
  375. will be sent, a '-' means that all matching files with dates up to and
  376. including the indicated time will be sent.
  377.  
  378.  
  379. The complete format of an action line in an REQ file is, then:
  380.  
  381.           <filename>[<space>!<password>][<space><+/-><time>]<cr>
  382.  
  383.  
  384.  
  385. MECHANISM:
  386.  
  387. During the WaZOO session, the .REQ file is simply transmitted to the
  388. other system.  It goes "as is" like any other file.
  389.  
  390. The other system can ignore the request, send some of the files, or send
  391. all of the files.  There is no accounting or responsibilities on the
  392. part of the remote system.
  393.  
  394. If your implementation is unable to process the update information for any
  395. reason, then you should process the line as a "regular" file request.
  396.  
  397.  
  398.  
  399. NOTE:
  400.  
  401. In the YooHoo packet, there's a bit that lets you know if the remote
  402. system currently accepts .REQ files.  This will be a clue as to whether
  403. a .REQ file would be a waste of time or not. Procedurally it's probably
  404. best to not send a .REQ file to a system which indicates that it won't
  405. process it.
  406.  
  407. YooHoo and YooHoo/2u2                                              Page 9
  408. Structures and Definitions
  409.  
  410.  
  411.  
  412. STRUCTURES AND DECLARATIONS
  413. ---------------------------
  414.  
  415.  
  416. #define ACK    0x06
  417. #define NAK    0x15
  418. #define ENQ    0x05
  419. #define YOOHOO 0xf1
  420. #define TSYNC  0xae
  421.  
  422. struct   _Hello
  423.     {
  424.     word     signal;           /* always 'o'     (0x6f)                   */
  425.     word     hello_version;    /* currently 1    (0x01)                   */
  426.     word     product;          /* product code                            */
  427.     word     product_maj;      /* major revision of the product           */
  428.     word     product_min;      /* minor revision of the product           */
  429.     char     my_name[60];      /* Other end's name                        */
  430.     char     sysop[20];        /* sysop's name                            */
  431.     word     my_zone;          /* 0== not supported                       */
  432.     word     my_net;           /* out primary net number                  */
  433.     word     my_node;          /* our primary node number                 */
  434.     word     my_point;         /* 0== not supported                       */
  435.     byte     my_password[8];   /* This is not necessarily null-terminated */
  436.     byte     reserved2[8];     /* reserved by Opus                        */
  437.     word     capabilities;     /* see below                               */
  438.     byte     reserved3[12];    /* for non-Opus systems with "approval"    */
  439.     };                         /*          total size 128 bytes           */
  440.  
  441.  
  442.  
  443. /*------------------------------------------------------------------------*/
  444. /* YOOHOO<tm> CAPABILITY VALUES                                           */
  445. /*------------------------------------------------------------------------*/
  446. #define Y_DIETIFNA 0x0001  /* Can do fast "FTS-0001"  0000 0000 0000 0001 */
  447. #define FTB_USER   0x0002  /* Full-Tilt Boogie        0000 0000 0000 0010 */
  448. #define ZED_ZIPPER 0x0004  /* Does ZModem, 1K blocks  0000 0000 0000 0100 */
  449. #define ZED_ZAPPER 0x0008  /* Can do ZModem variant   0000 0000 0000 1000 */
  450. #define DOES_IANUS 0x0010  /* Can do Janus            0000 0000 0001 0000 */
  451. #define Bit_5      0x0020  /* reserved by FTSC        0000 0000 0010 0000 */
  452. #define Bit_6      0x0040  /* reserved by FTSC        0000 0000 0100 0000 */
  453. #define Bit_7      0x0080  /* reserved by FTSC        0000 0000 1000 0000 */
  454. #define Bit_8      0x0100  /* reserved by FTSC        0000 0001 0000 0000 */
  455. #define Bit_9      0x0200  /* reserved by FTSC        0000 0010 0000 0000 */
  456. #define Bit_a      0x0400  /* reserved by FTSC        0000 0100 0000 0000 */
  457. #define Bit_b      0x0800  /* reserved by FTSC        0000 1000 0000 0000 */
  458. #define Bit_c      0x1000  /* reserved by FTSC        0001 0000 0000 0000 */
  459. #define Bit_d      0x2000  /* reserved by FTSC        0010 0000 0000 0000 */
  460. #define Bit_e      0x4000  /* reserved by FTSC        0100 0000 0000 0000 */
  461. #define WZ_FREQ    0x8000  /* WZ file req. ok         1000 0000 0000 0000 */
  462.  
  463. YooHoo and YooHoo/2u2                                              Page 10
  464. State Tables
  465.  
  466.  
  467.  
  468.  +--------------------------------------------------------------------------+
  469.  |                                                                          |
  470.  |  YOOHOO<tm>: SENDER (CALLING System)                                     |
  471.  |                                                                          |
  472.  |  ##   Status/Action  Stimulus            Action (comment)       Goto     |
  473.  | ----+---------------+-------------------+---------------------+--------- |
  474.  |     |               |                   |                     |          |
  475.  |  s1 | Set 30.second |                   |                     |  s2      |
  476.  |     | failsafe      |                   |                     |          |
  477.  |     | timer         |                   |                     |          |
  478.  |     |               |                   |                     |          |
  479.  | ----+---------------+-------------------+---------------------+--------- |
  480.  |     |               |                   |                     |          |
  481.  |  s2 | Send YOOHOO   |                   |                     |  s3      |
  482.  |     | character     |                   |                     |          |
  483.  |     |               |                   |                     |          |
  484.  | ----+---------------+-------------------+---------------------+--------- |
  485.  |     |               |                   |                     |          |
  486.  |  s3 | Send TSYNC    |                   |                     |  s4      |
  487.  |     | character     |                   |                     |          |
  488.  |     | (SEE NOTE #1) |                   |                     |          |
  489.  |     |               |                   |                     |          |
  490.  | ----+---------------+-------------------+---------------------+--------- |
  491.  |     |               |                   |                     |          |
  492.  |  s4 | Read char     | Nothing in 3 sec  | report not a WaZOO  | return   |
  493.  |     |               | or lost carrier   |                     |          |
  494.  |     |               | or timer elapsed  |                     |          |
  495.  |     |               |                   |                     |          |
  496.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  497.  |     |               |                   |                     |          |
  498.  |     |               | Received ENQuire  | send handshake      |  s8      |
  499.  |     |               |                   |                     |          |
  500.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  501.  |     |               |                   |                     |          |
  502.  |     |               | Received 'C'      | Other end may be    |  s5      |
  503.  |     |               |                   | SEAdog responding   |          |
  504.  |     |               |                   | to the TSYNC.  Need |          |
  505.  |     |               |                   | further checking.   |          |
  506.  |     |               |                   |                     |          |
  507.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  508.  |     |               |                   |                     |          |
  509.  |     |               | Received NAK      | Could be a FTS-0001 |  s6      |
  510.  |     |               |                   | mailer responding   |          |
  511.  |     |               |                   | to the TSYNC.  Need |          |
  512.  |     |               |                   | further checking.   |          |
  513.  |     |               |                   |                     |          |
  514.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  515.  |     |               |                   |                     |          |
  516.  |     |               | Received 01 Hex   | Other end may be    |  s7      |
  517.  |     |               |                   | SEAdog responding   |          |
  518.  |     |               |                   | to the TSYNC.  Need |          |
  519.  |     |               |                   | further checking.   |          |
  520.  |     |               |                   |                     |          |
  521.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  522.  |     |               |                   |                     |          |
  523.  |     |               | Received debris   | try again           |  s4      |
  524.  |     |               |                   |                     |          |
  525.  | ----+---------------+-------------------+---------------------+--------- |
  526.  |     |               |                   |                     |          |
  527.  |  s5 | Read char     | Nothing in 3 sec  | Pretend other side  | return   |
  528.  |     |               |                   | is FTS-0001 mailer  |          |
  529.  |     |               |                   | responding to TSYNC |          |
  530.  |     |               |                   |                     |          |
  531.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  532.  |     |               |                   |                     |          |
  533.  |     |               | Timer elapsed     | report not a WaZOO  | return   |
  534.  |     |               | or Carrier lost   |                     |          |
  535.  |     |               |                   |                     |          |
  536.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  537.  |     |               |                   |                     |          |
  538.  |     |               | Received ENQuire  | send handshake      |  s8      |
  539.  |     |               |                   |                     |          |
  540.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  541.  |     |               |                   |                     |          |
  542.  |     |               | Received NAK      | Could be a FTS-0001 |  s6      |
  543.  |     |               |                   | mailer responding   |          |
  544.  |     |               |                   | to the TSYNC.  Need |          |
  545.  |     |               |                   | further checking.   |          |
  546.  |     |               |                   |                     |          |
  547.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  548.  |     |               |                   |                     |          |
  549.  |     |               | Received 01 Hex   | Other end IS a      | return   |
  550.  |     |               | Received 00 Hex   | SEAdog responding   |          |
  551.  |     |               | Received 'C'      | to the TSYNC        |          |
  552.  |     |               |                   |                     |          |
  553.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  554.  |     |               |                   |                     |          |
  555.  |     |               | Received debris   | try again           |  s4      |
  556.  |     |               |                   |                     |          |
  557.  | ----+---------------+-------------------+---------------------+--------- |
  558.  |     |               |                   |                     |          |
  559.  |  s6 | Read char     | Nothing in 3 sec  | report not a WaZOO  | return   |
  560.  |     |               | or lost carrier   |                     |          |
  561.  |     |               | or timer elapsed  |                     |          |
  562.  |     |               |                   |                     |          |
  563.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  564.  |     |               |                   |                     |          |
  565.  |     |               | Received ENQuire  | send handshake      |  s8      |
  566.  |     |               |                   |                     |          |
  567.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  568.  |     |               |                   |                     |          |
  569.  |     |               | Received 'C'      | Other end may be    |  s5      |
  570.  |     |               |                   | SEAdog responding   |          |
  571.  |     |               |                   | to the TSYNC.  Need |          |
  572.  |     |               |                   | further checking.   |          |
  573.  |     |               |                   |                     |          |
  574.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  575.  |     |               |                   |                     |          |
  576.  |     |               | Received NAK      | It IS a FTS-0001    | return   |
  577.  |     |               |                   | mailer responding   |          |
  578.  |     |               |                   | to the TSYNC        |          |
  579.  |     |               |                   |                     |          |
  580.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  581.  |     |               |                   |                     |          |
  582.  |     |               | Received 01 Hex   | Other end may be    |  s7      |
  583.  |     |               |                   | SEAdog responding   |          |
  584.  |     |               |                   | to the TSYNC.  Need |          |
  585.  |     |               |                   | further checking.   |          |
  586.  |     |               |                   |                     |          |
  587.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  588.  |     |               |                   |                     |          |
  589.  |     |               | Received debris   | try again           |  s4      |
  590.  |     |               |                   |                     |          |
  591.  | ----+---------------+-------------------+---------------------+--------- |
  592.  |     |               |                   |                     |          |
  593.  |  s7 | Read char     | Nothing in 3 sec  | report not a WaZOO  | return   |
  594.  |     |               | or lost carrier   |                     |          |
  595.  |     |               | or timer elapsed  |                     |          |
  596.  |     |               |                   |                     |          |
  597.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  598.  |     |               |                   |                     |          |
  599.  |     |               | Received ENQuire  | send handshake      |  s8      |
  600.  |     |               |                   |                     |          |
  601.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  602.  |     |               |                   |                     |          |
  603.  |     |               | Received 'C'      | Other end may be    |  s5      |
  604.  |     |               |                   | SEAdog responding   |          |
  605.  |     |               |                   | to the TSYNC.  Need |          |
  606.  |     |               |                   | further checking.   |          |
  607.  |     |               |                   |                     |          |
  608.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  609.  |     |               |                   |                     |          |
  610.  |     |               | Received NAK      | Might be a FTS-0001 |  s6      |
  611.  |     |               |                   | mailer responding   |          |
  612.  |     |               |                   | to the TSYNC.  Need |          |
  613.  |     |               |                   | further checking.   |          |
  614.  |     |               |                   |                     |          |
  615.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  616.  |     |               |                   |                     |          |
  617.  |     |               | Received 01 Hex   | Other end may be    |  s7      |
  618.  |     |               |                   | SEAdog responding   |          |
  619.  |     |               |                   | to the TSYNC.  Need |          |
  620.  |     |               |                   | further checking.   |          |
  621.  |     |               |                   |                     |          |
  622.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  623.  |     |               |                   |                     |          |
  624.  |     |               | Received FE Hex   | Other end IS a      | return   |
  625.  |     |               |                   | SEAdog responding   |          |
  626.  |     |               |                   | to the TSYNC        |          |
  627.  |     |               |                   |                     |          |
  628.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  629.  |     |               |                   |                     |          |
  630.  |     |               | Received debris   | try again           |  s4      |
  631.  |     |               |                   |                     |          |
  632.  | ----+---------------+-------------------+---------------------+--------- |
  633.  |     |               |                   |                     |          |
  634.  |  s8 | Send HELLO    | Successful        | Looks like WaZOO    |  s9      |
  635.  |     | (see hello    |                   |                     |          |
  636.  |     |     chart)    +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  637.  |     |               |                   |                     |          |
  638.  |     |               | Not successful    | Repeat whole thing  |  s2      |
  639.  |     |               |                   |                     |          |
  640.  | ----+---------------+-------------------+---------------------+--------- |
  641.  |     |               |                   |                     |          |
  642.  |  s9 | Read char     | Nothing in 5 sec  | repeat whole thing  |  s2      |
  643.  |     |               | or lost carrier   |                     |          |
  644.  |     |               | or timer elapsed  |                     |          |
  645.  |     |               |                   |                     |          |
  646.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  647.  |     |               |                   |                     |          |
  648.  |     |               | Received YOOHOO   | Another WaZOO, go   |  s10     |
  649.  |     |               |                   | process receive     |          |
  650.  |     |               |                   |                     |          |
  651.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  652.  |     |               |                   |                     |          |
  653.  |     |               | Received debris   | Repeat whole thing  |  s2      |
  654.  |     |               |                   |                     |          |
  655.  | ----+---------------+-------------------+---------------------+--------- |
  656.  |     |               |                   |                     |          |
  657.  | s10 | Process other | Information       | Report Success      |  return  |
  658.  |     | side's YOOHOO | Successfully      |                     |          |
  659.  |     | (See "Receive | Exchanged         |                     |          |
  660.  |     | Hello Packet" |                   |                     |          |
  661.  |     | chart)        +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  662.  |     |               |                   |                     |          |
  663.  |     |               | Failure           | Repeat whole thing  |  s2      |
  664.  |     |               |                   |                     |          |
  665.  | ----+---------------+-------------------+---------------------+--------- |
  666.  +--------------------------------------------------------------------------+
  667.  
  668.  
  669.          NOTE #1. Sending the TSYNC character is needed only if you
  670.                   are also supporting the FTS-0001 method.  TSYNC is
  671.                   not part of YooHoo/WaZOO.
  672.  
  673.  
  674.  +--------------------------------------------------------------------------+
  675.  |                                                                          |
  676.  |  YOOHOO: RECEIVER   (CALLED system)                                      |
  677.  |                                                                          |
  678.  |                                                                          |
  679.  |  ##   Status/Action  Stimulus            Action (comment)       Goto     |
  680.  | ----+---------------+-------------------+---------------------+--------- |
  681.  |     |               |                   |                     |          |
  682.  |  v1 | Got YOOHOO    |                   | Smells interesting  |  v3      |
  683.  |     |               |                   |                     |          |
  684.  | ----+---------------+-------------------+---------------------+--------- |
  685.  |     |               |                   |                     |          |
  686.  |  v2 | Got TSYNC     |                   | Report FTS-0001     | return   |
  687.  |     |               |                   |                     |          |
  688.  | ----+---------------+-------------------+---------------------+--------- |
  689.  |     |               |                   |                     |          |
  690.  |  v3 | Get HELLO     | Successful        | Let's send ours now |  v4      |
  691.  |     | packet from   |                   |                     |          |
  692.  |     | remote (see   +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  693.  |     | "Receive Hello|                   |                     |          |
  694.  |     | packet")      | Not successful    | Report failure      | return   |
  695.  |     |               |                   |                     |          |
  696.  | ----+---------------+-------------------+---------------------+--------- |
  697.  |     |               |                   |                     |          |
  698.  |  v4 | Look for ENQ  | Timer elapsed?    | 10 sec. timeout     |  v5      |
  699.  |     |               |                   |                     |          |
  700.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  701.  |     |               |                   |                     |          |
  702.  |     |               | Character not ENQ | Debris              |  v4      |
  703.  |     |               |                   |                     |          |
  704.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  705.  |     |               |                   |                     |          |
  706.  |     |               | ENQ received      | Transmit Hello      |  v6      |
  707.  |     |               |                   |                     |          |
  708.  | ----+---------------+-------------------+---------------------+--------- |
  709.  |     |               |                   |                     |          |
  710.  |  v5 | Clear inbound | Count expired?    | 5 retrys, failed.   |  return  |
  711.  |     | Send YOOHOO   |                   |                     |          |
  712.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  713.  |     |               |                   |                     |          |
  714.  |     |               | Count not expired | Try again           |  v4      |
  715.  |     |               |                   |                     |          |
  716.  | ----+---------------+-------------------+---------------------+--------- |
  717.  |     |               |                   |                     |          |
  718.  |  v6 | Send HELLO    | Successful        | Success             |  return  |
  719.  |     | (see "Send    |                   |                     |          |
  720.  |     | Hello" chart) +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  721.  |     |               |                   |                     |          |
  722.  |     |               | Not successful    | Repeat whole thing  |  v1      |
  723.  |     |               |                   |                     |          |
  724.  | ----+---------------+-------------------+---------------------+--------- |
  725.  +--------------------------------------------------------------------------+
  726.  
  727.  
  728.  
  729.  
  730.  +--------------------------------------------------------------------------+
  731.  |                                                                          |
  732.  | SEND HELLO PACKET                                                        |
  733.  |                                                                          |
  734.  | ----+---------------+-------------------+---------------------+--------- |
  735.  |     |               |                   |                     |          |
  736.  |  h1 | Disable XON   |                   |                     |  h2      |
  737.  |     | Disable ^C/^K |                   |                     |          |
  738.  |     |               |                   |                     |          |
  739.  | ----+---------------+-------------------+---------------------+--------- |
  740.  |     |               |                   |                     |          |
  741.  |  h2 | Send Header   | Transmit the 128  |                     |  h3      |
  742.  |     |               | byte HELLO struct |                     |          |
  743.  |     |               |                   |                     |          |
  744.  | ----+---------------+-------------------+---------------------+--------- |
  745.  |     |               |                   |                     |          |
  746.  |  h3 | Clear inbound |                   |                     |  h4      |
  747.  |     | buffer        |                   |                     |          |
  748.  |     |               |                   |                     |          |
  749.  | ----+---------------+-------------------+---------------------+--------- |
  750.  |     |               |                   |                     |          |
  751.  |  h4 | Send CRC      | Transmit the 16   |                     |  h5      |
  752.  |     |               | bit CRC of HELLO  |                     |          |
  753.  |     |               | as two bytes, MSB |                     |          |
  754.  |     |               | followed by LSB   |                     |          |
  755.  |     |               |                   |                     |          |
  756.  | ----+---------------+-------------------+---------------------+--------- |
  757.  |     |               |                   |                     |          |
  758.  |  h5 | Read char     | Received ACK      | Success             |  return  |
  759.  |     |               |                   |                     |          |
  760.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  761.  |     |               |                   |                     |          |
  762.  |     |               | Received '?'      | Try header again    |  h2      |
  763.  |     |               |                   |                     |          |
  764.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  765.  |     |               |                   |                     |          |
  766.  |     |               | Received ENQ      | Might be out of sync|  h5      |
  767.  |     |               |                   |                     |          |
  768.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  769.  |     |               |                   |                     |          |
  770.  |     |               | Received debris   | Might be line noise |  h5      |
  771.  |     |               |                   |                     |          |
  772.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  773.  |     |               |                   |                     |          |
  774.  |     |               | Time out          | Failure             |  return  |
  775.  |     |               | (30 sec timer)    |                     |          |
  776.  |     |               |                   |                     |          |
  777.  | ----+---------------+-------------------+---------------------+--------- |
  778.  +--------------------------------------------------------------------------+
  779.  
  780.  
  781.  
  782.  +--------------------------------------------------------------------------+
  783.  |                                                                          |
  784.  |  RECEIVE HELLO PACKET                                                    |
  785.  |                                                                          |
  786.  |                                                                          |
  787.  |  ##   Status/Action  Stimulus            Action (comment)       Goto     |
  788.  | ----+---------------+-------------------+---------------------+--------- |
  789.  |     |               |                   |                     |          |
  790.  |  r1 | Clear buffers |                   |                     |  r2      |
  791.  |     | Disable XON   |                   |                     |          |
  792.  |     | Disable ^C/^K |                   |                     |          |
  793.  |     | Set timer     |                   |                     |          |
  794.  |     |               |                   |                     |          |
  795.  | ----+---------------+-------------------+---------------------+--------- |
  796.  |     |               |                   |                     |          |
  797.  |  r2 | Send ENQuire  |                   | Let other end know  |  r3      |
  798.  |     |               |                   | we heard YOOHOO.    |          |
  799.  |     |               |                   |                     |          |
  800.  | ----+---------------+-------------------+---------------------+--------- |
  801.  |     |               |                   |                     |          |
  802.  |  r3 | Watch for Hex | Timeout           | 10 sec. elapsed.    |  r4      |
  803.  |     | 1f (Header)   |                   |                     |          |
  804.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  805.  |     |               |                   |                     |          |
  806.  |     |               | Carrier loss      | Report failure      | return   |
  807.  |     |               |                   |                     |          |
  808.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  809.  |     |               |                   |                     |          |
  810.  |     |               | Got header char   | Get Hello string    |  r5      |
  811.  |     |               |                   |                     |          |
  812.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  813.  |     |               |                   |                     |          |
  814.  |     |               | Got a YooHoo      | Resync - send ENQ   |  r2      |
  815.  |     |               |                   |                     |          |
  816.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  817.  |     |               |                   |                     |          |
  818.  |     |               | Character not     | Keep watching       |  r3      |
  819.  |     |               | header (0x1f)     |                     |          |
  820.  |     |               |                   |                     |          |
  821.  | ----+---------------+-------------------+---------------------+--------- |
  822.  |     |               |                   |                     |          |
  823.  |  r4 | Bump          | Count expired?    | No YooHoo, 10 retrys| return   |
  824.  |     | Retry         |                   |                     |          |
  825.  |     | Count         +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  826.  |     |               |                   |                     |          |
  827.  |     |               | Still a few turns | Try again           |  r2      |
  828.  |     |               |                   |                     |          |
  829.  | ----+---------------+-------------------+---------------------+--------- |
  830.  |     |               |                   |                     |          |
  831.  |  r5 | Receive 128   | Nothing for 30sec | Report failure      | return   |
  832.  |     | bytes (hello) |                   |                     |          |
  833.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  834.  |     |               |                   |                     |          |
  835.  |     |               | Got all 128 bytes |                     |  r6      |
  836.  |     |               |                   |                     |          |
  837.  | ----+---------------+-------------------+---------------------+--------- |
  838.  |     |               |                   |                     |          |
  839.  |  r6 | Get CRC       | One or both CRC   | Short packet        |  r7      |
  840.  |     | (two bytes,   | characters timed  |                     |          |
  841.  |     | MSB followed  | out (over 10 sec) |                     |          |
  842.  |     | by LSB)       |                   |                     |          |
  843.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  844.  |     |               |                   |                     |          |
  845.  |     |               | Error             | CRC isn't what it   |  r7      |
  846.  |     |               |                   | should be           |          |
  847.  |     |               |                   |                     |          |
  848.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  849.  |     |               |                   |                     |          |
  850.  |     |               | CRC compares      | Successful transfer |  r8      |
  851.  |     |               |                   |                     |          |
  852.  | ----+---------------+-------------------+---------------------+--------- |
  853.  |     |               |                   |                     |          |
  854.  |  r7 | Error handler | Count expired?    | 10 failures to get  | return   |
  855.  |     | Send '?'      |                   | hello. Hang up.     |          |
  856.  |     | (0x3f)        |                   |                     |          |
  857.  |     |               +- - - - - - - - - -+- - - - - - - - - - -+- - - - - |
  858.  |     |               |                   |                     |          |
  859.  |     |               | Count not expired | Try again           |  r3      |
  860.  |     |               |                   |                     |          |
  861.  | ----+---------------+-------------------+---------------------+--------- |
  862.  |     |               |                   |                     |          |
  863.  | r8  | Clear inbound |                   | Report success      | return   |
  864.  |     | Send ACK      |                   |                     |          |
  865.  |     | Send YOOHOO   |                   |                     |          |
  866.  |     |               |                   |                     |          |
  867.  | ----+---------------+-------------------+---------------------+--------- |
  868.  +--------------------------------------------------------------------------+
  869.  
  870.  
  871.  
  872.  
  873.  
  874.                                       ###
  875.  
  876.