home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / BSRC_250.LZH / COM.H < prev    next >
C/C++ Source or Header  |  1991-09-15  |  6KB  |  146 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. /*                Communications 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. #define BITS_7          0x02
  44. #define BITS_8          0x03
  45. #define STOP_1          0x00
  46. #define STOP_2          0x04
  47. #define ODD_PARITY      0x08
  48. #define EVEN_PARITY     0x18
  49. #define NO_PARITY       0x00
  50.  
  51. #ifndef OS_2
  52. #define BAUD_300        0x040
  53. #define BAUD_1200       0x080
  54. #define BAUD_2400       0x0A0
  55. #define BAUD_4800       0x0C0
  56. #define BAUD_9600       0x0E0
  57. #define BAUD_19200      0x000
  58. #define BAUD_38400      0x020
  59. #else
  60. #define BAUD_300        300
  61. #define BAUD_1200       1200
  62. #define BAUD_2400       2400
  63. #define BAUD_4800       4800
  64. #define BAUD_9600       9600
  65. #define BAUD_19200      19200
  66. #define BAUD_38400      38400
  67. #endif
  68.  
  69. /* Bit definitions for the Line Status Register */
  70.  
  71. #define DATA_READY      0x0100
  72. #define OVERRUN_ERR     0x0200
  73. #define PARITY_ERR      0x0400
  74. #define FRAMING_ERR     0x0800
  75. #define BREAK_INT       0x1000
  76. #define TX_HOLD_EMPTY   0x2000
  77. #define TX_SHIFT_EMPTY  0x4000
  78.  
  79. /* Bit definitions for the driver flags */
  80.  
  81. #define USE_XON         0x01
  82. #define USE_CTS         0x02
  83. #define USE_DSR         0x04
  84. #define OTHER_XON       0x08
  85.  
  86. #define BRK             0x01
  87. #define MDM             0x02
  88.  
  89. struct LINE_CONTROL
  90.    {
  91.    int carrier_mask;
  92.    int handshake_mask;
  93.    };
  94.  
  95. struct baud_str
  96.    {
  97.    unsigned rate_value;
  98.    unsigned rate_mask;
  99.    };
  100.  
  101.  
  102. struct parse_list {
  103.         int p_length;
  104.         char p_string[20];
  105.         };
  106.  
  107. struct secure {
  108.         char *rq_OKFile;
  109.         char *rq_FILES;
  110.         char *rq_About;
  111.         char *rq_Template;
  112.         char *sc_Inbound;
  113.         int rq_Limit;
  114.         int time_Limit;
  115.         long byte_Limit;
  116.         int rq_Cum_Limit;
  117.         long time_Cum_Limit;
  118.         long byte_Cum_Limit;
  119.         };
  120.  
  121. struct req_accum {
  122.         long CumBytes;
  123.         long CumFiles;
  124.         long CumTime;
  125. /*
  126.  * This is measured in SECONDS of request processing time, as
  127.  * opposed to time, below, which is the "here and now" time.
  128.  * The reason for the Cum v non-Cum stuff is to allow for two sets of
  129.  * verbs - one for a session limit,    one for a cumulative limit.
  130.  * We also need a verb to shut the accumulation shit off. 
  131.  */
  132.         int files;
  133.         long bytes;
  134.         long time;
  135.         long LastTime;
  136.         };
  137.  
  138. #ifndef OS_2
  139. #include "com_dos.h"
  140. #else  /* OS_2 */
  141. #include "com_os2.h"
  142. #endif /* OS_2 */
  143.  
  144. /* END OF FILE: com.h */
  145.  
  146.