home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / BSRC_250.LZH / JANUS.H < prev    next >
Text File  |  1991-09-15  |  6KB  |  109 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*                                                                          */
  3. /*                                                                          */
  4. /*      ------------         Bit-Bucket Software, Co.                       */
  5. /*      \ 10001101 /         Writers and Distributors of                    */
  6. /*       \ 011110 /          Freely Available<tm> Software.                 */
  7. /*        \ 1011 /                                                          */
  8. /*         ------                                                           */
  9. /*                                                                          */
  10. /*  (C) Copyright 1987-91, Bit Bucket Software Co., a Delaware Corporation. */
  11. /*                                                                          */
  12. /*                                                                          */
  13. /*                   Janus definitions for BinkleyTerm                      */
  14. /*                                                                          */
  15. /*                                                                          */
  16. /*    For complete  details  of the licensing restrictions, please refer    */
  17. /*    to the License  agreement,  which  is published in its entirety in    */
  18. /*    the MAKEFILE and BT.C, and also contained in the file LICENSE.250.    */
  19. /*                                                                          */
  20. /*    USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  21. /*    BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  22. /*    THIS  AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,  OR IF YOU DO    */
  23. /*    NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  24. /*    SOFTWARE CO.  AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  25. /*    SHOULD YOU  PROCEED TO USE THIS FILE  WITHOUT HAVING  ACCEPTED THE    */
  26. /*    TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  27. /*    AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.      */
  28. /*                                                                          */
  29. /*                                                                          */
  30. /* You can contact Bit Bucket Software Co. at any one of the following      */
  31. /* addresses:                                                               */
  32. /*                                                                          */
  33. /* Bit Bucket Software Co.        FidoNet  1:104/501, 1:343/491             */
  34. /* P.O. Box 460398                AlterNet 7:491/0                          */
  35. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  36. /*                                Internet f491.n343.z1.fidonet.org         */
  37. /*                                                                          */
  38. /* Please feel free to contact us at any time to share your comments about  */
  39. /* our software and/or licensing policies.                                  */
  40. /*                                                                          */
  41. /*--------------------------------------------------------------------------*/
  42.  
  43.  
  44. /* Misc. Constants */
  45. #define BUFMAX 2048          /* Max packet contents length                   */
  46. #define NUM_FLAGS 4          /* Number of mail-type flag characters (O,D,C,H)*/
  47. #define JANUS_EFFICIENCY 95  /* Estimate Janus xfers at 95% throughput       */
  48.  
  49. /* Positions of transfer status line fields */
  50. #define POS_X 21
  51. #define LEN_X 30
  52. #define ETA_X 40
  53. #define MSG_X 50
  54.  
  55. /* File Transmission States */
  56. #define XDONE        0       /* All done, no more files to transmit          */
  57. #define XSENDFNAME   1       /* Send filename packet                         */
  58. #define XRCVFNACK    2       /* Wait for filename packet ACK                 */
  59. #define XSENDBLK     3       /* Send next block of file data                 */
  60. #define XRCVEOFACK   4       /* Wait for EOF packet ACK                      */
  61. #define XSENDFREQNAK 5       /* Send file request NAK (no matches found)     */
  62. #define XRCVFRNAKACK 6       /* Wait for ACK to file request NAK             */
  63.  
  64. /* File Reception States */
  65. #define RDONE      0         /* All done, nothing more to receive            */
  66. #define RRCVFNAME  1         /* Wait for filename packet                     */
  67. #define RRCVBLK    2         /* Wait for next block of file data             */
  68.  
  69. /* Packet Types */
  70. #define NOPKT        0       /* No packet received yet; try again later      */
  71. #define BADPKT      '@'      /* Bad packet received; CRC error, overrun, etc.*/
  72. #define FNAMEPKT    'A'      /* Filename info packet                         */
  73. #define FNACKPKT    'B'      /* Filename packet ACK                          */
  74. #define BLKPKT      'C'      /* File data block packet                       */
  75. #define RPOSPKT     'D'      /* Transmitter reposition packet                */
  76. #define EOFACKPKT   'E'      /* EOF packet ACK                               */
  77. #define HALTPKT     'F'      /* Immediate screeching halt packet             */
  78. #define HALTACKPKT  'G'      /* Halt packet ACK for ending batch             */
  79. #define FREQPKT     'H'      /* File request packet                          */
  80. #define FREQNAKPKT  'I'      /* File request NAK (no matches for your req)   */
  81. #define FRNAKACKPKT 'J'      /* ACK to file request NAK                      */
  82.  
  83. /* Non-byte values returned by rcvbyte() */
  84. #define BUFEMPTY  (-1)
  85. #define PKTSTRT   (-2)
  86. #define PKTEND    (-3)
  87. #define NOCARRIER (-4)
  88. #define PKTSTRT32 (-5)
  89.  
  90. /* Bytes we need to watch for */
  91. #define PKTSTRTCHR   'a'
  92. #define PKTENDCHR    'b'
  93. #define PKTSTRTCHR32 'c'
  94.  
  95. /* Various action flags */
  96. #define GOOD_XFER    0
  97. #define FAILED_XFER  1
  98. #define INITIAL_XFER 2
  99. #define ABORT_XFER   3
  100.  
  101. #define DELETE_AFTER '-'
  102. #define TRUNC_AFTER  '#'
  103.  
  104. /* Protocol capability flags */
  105. #define CANCRC32 0x80
  106. #define CANFREQ  0x40
  107.  
  108. #define OURCAP (CANCRC32 | CANFREQ)
  109.