home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / FSC.ZIP / FSC-0006.TXT < prev    next >
Text File  |  1987-09-21  |  46KB  |  829 lines

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