home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / tel2305s.zip / INCLUDE / BICC.H next >
C/C++ Source or Header  |  1992-04-07  |  5KB  |  114 lines

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