home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / NETWORK / TEL23SRC.ZIP / INCLUDE / BICC.H next >
Encoding:
C/C++ Source or Header  |  1990-12-13  |  4.6 KB  |  114 lines

  1. #ifndef BICC_H
  2. /*
  3.  *      Command codes for ISOLAN MPS SW
  4.  */
  5.  
  6. #define PORT_STATUS             0xB3    /* XPORT & SFB */
  7.  
  8. #define FAST_TIMER              0xF0    /* XPORT & SFB */
  9. #define L_ACTIVATE              0xF2    /* XPORT & SFB */
  10. #define L_DEACTIVATE            0xF3    /* XPORT & SFB */
  11. #define L_DATA_SEND             0xF4    /* XPORT & SFB */
  12. #define M_ACTIVATE              0xFA    /* XPORT & SFB */
  13. #define M_DEACTIVATE            0xFB    /* XPORT & SFB */
  14.  
  15. #define L_ACTIVATE_CONF         0x03    /* Returned Event Code */
  16. #define L_DEACTIVATE_CONF       0x05    /* Returned Event Code */
  17. #define L_DATA_IND              0x08    /* Returned Event Code, LLC Data */
  18. #define M_DATA_IND              0x0a    /* Returned Event Code, Blue Book MAC Data */
  19. #define M_ACTIVATE_CONF         0x12    /* Returned Event Code */
  20. #define M_DEACTIVATE_CONF       0x14    /* Returned Event Code */
  21.  
  22. #define FALSE                   0
  23. #define TRUE                    1
  24.  
  25. #define BUF_SIZE                1504
  26. #define MAX_VC                  32
  27.  
  28. /*
  29.  *      DATA STRUCTURES
  30.  */
  31.  
  32. union adr_ptr
  33. {
  34.         char    far *pt;
  35.         struct  
  36.         {
  37.                 unsigned short  start_type;
  38.                 unsigned short  end_type;
  39.         } type;
  40.         struct mps_status *status;
  41. };
  42.  
  43. struct tcb         /* Transfer Control Block */
  44. {
  45.         unsigned char   tcbcommand;     /* command code                         */
  46.         unsigned char   tcbcid;         /* command identity                     */
  47.         unsigned char   tcbvcid;        /* virtual circuit id                   */
  48.         unsigned short  tcblength;      /* buffer length                        */
  49.         union adr_ptr   tcbbaddr;       /* address of data                      */
  50.         unsigned char   tcbexpedited;   /* expedited data flag                  */
  51.         unsigned char   tcbcancelable;  /* cancelable flag                      */
  52.         unsigned char   tcbladdr[16];   /* local network address                */
  53.         unsigned char   tcbraddr[16];   /* remote address                       */
  54.         unsigned short  (far *tcbasync)(); /* address of async notification routine*/
  55.         unsigned long   tcblnet;        /* local network number                 */
  56.         unsigned long   tcbrnet;        /* remote network number                */
  57.         unsigned char   tcbrto;         /* call timeout                         */
  58.         unsigned char   tcbsto;         /* not used                             */
  59.         unsigned char   tcbres2[8];     /* reserved                             */
  60.         unsigned char   tcbcmdex;       /* command code extension               */
  61.         unsigned short  tcbstatus;      /* Blue Book MAC type                   */
  62. };
  63.  
  64.  
  65. struct acb              /* Asynchronous Control Block */
  66. {
  67.         unsigned char   acbcid;         /* return cid from TCB          */
  68.         unsigned char   acbvcid;        /* return vcid from TCB         */
  69.         unsigned char   acberr;         /* error code                   */
  70.         unsigned char   acbcmd;         /* return command from TCB      */
  71.         unsigned short  acblen;         /* actual length of message     */
  72.         unsigned char   acbraddr[16];   /* remote network address       */
  73.         unsigned long   acbrnet;        /* remote network number        */
  74.         unsigned char   acbladdr[16];   /* local network address        */
  75.         unsigned long   acblnet;        /* local network number         */
  76.         unsigned short  acbstatus;      /* Blue Book MAC type           */
  77.         unsigned char   acbeventcode;   /* copy of board event code     */
  78.         union adr_ptr   acbbaddr;       /* address of data              */
  79.         unsigned char   acbexpedited;   /* expedited data flag          */
  80. };
  81.  
  82. struct recany_rec               /* receive any record */
  83. {
  84.         unsigned char   recany_count;   
  85.         unsigned char   recany_list[MAX_VC];
  86. };
  87.  
  88.  
  89. struct mps_status       
  90. {
  91.         unsigned char address[16];
  92.         unsigned long network;
  93.         unsigned char status;
  94.         unsigned char version;
  95.         unsigned int  maxcon;
  96.         unsigned int  maxcom;
  97.         unsigned long pack_sent;
  98.         unsigned long pack_rec;
  99.         unsigned int  pack_lost;
  100.         unsigned int  pack_abort;
  101.         unsigned int  pack_frame;
  102.         unsigned int  pack_crc;
  103.         unsigned char address_mask[16];
  104.         unsigned int  board_segment;
  105.         unsigned int  board_offset;
  106.         unsigned int  gen_tsel;
  107.         unsigned int  broad_tsel;
  108.         unsigned char reserved[0x3e];
  109. };
  110.  
  111. #define BICC_H
  112. #endif
  113.  
  114.