home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IE3802.ZIP / IEEE8022 / DLCGBLV.H < prev    next >
Text File  |  1991-12-06  |  3KB  |  110 lines

  1. /*---------------------------------------------------------------------------+
  2. │ Global variables for the DLCSAMPL package                                  │
  3. +---------------------------------------------------------------------------*/
  4.  
  5. /*------------------------------------------------------------------------+
  6. │  DLC status change message structure                                    │
  7. +------------------------------------------------------------------------*/
  8.  
  9. typedef struct DLCStatusTable {
  10.         word    stationid;
  11.         word    reg_ax;
  12.         byte    reasoncode[5];
  13.         byte    accessprty;
  14.         byte    remote_node[6];
  15.         byte    remote_sap;
  16.         byte    lana;
  17.         }DLC_STAT_TBL;
  18.  
  19. struct read_pt_status
  20.    {
  21.    word station_id;
  22.    byte option_idicator;
  23.    byte event_set;
  24.    byte event;
  25.    byte critical_subset;
  26.    dword notification_flag;
  27.    DLC_STAT_TBL status_tbl;
  28.    };
  29.  
  30. typedef struct {
  31.         byte   *next_buf_ptr;
  32.         byte    data[1];
  33.         } BUFFER;
  34.  
  35. byte ProductId[18];
  36. byte RoutingInfo[18];
  37.  
  38. union pt_add
  39.    {
  40. #ifdef E32TO16
  41.    unsigned char * _Seg16 address;
  42. #else
  43.    unsigned long int address;
  44. #endif
  45.    struct {
  46.       word offset;
  47.       word segment;
  48.       } part;
  49.    };
  50.  
  51. union pt_types
  52.    {
  53.    struct dlc_open_sap_parms open_sap;
  54.    struct dlc_connect_station_parms connect;
  55.    struct dlc_open_station_parms open_station;
  56.    struct dir_initialize_parms init;
  57.    struct dir_status_parms status;
  58.    struct receive_parms receive;
  59.    struct transmit_parms transmit;
  60.    struct read_pt_status read;
  61.    struct dir_open_adapter_parms open;
  62.    };
  63.  
  64. struct open_pt
  65.    {
  66.    struct dir_open_ad_parms  adpt;
  67.    struct dir_open_dlc_parms dlcpt;
  68.    };
  69.  
  70. struct ccb_pt
  71.    {
  72.    struct command_control_block_dlr ccb;
  73.    union pt_types  pt;
  74.    struct open_pt  opt;
  75.    };
  76.  
  77. struct ccb_pt workccb, rcvccb;
  78. union pt_add data_add;
  79. struct receive_not_contiguous * rbptr;
  80. struct lan_header lanheader;    /* get enough to hold a big one       */
  81. DLC_STAT_TBL *dsp;
  82.  
  83. word Sapid;
  84. word Stationid;
  85. word i, msglen;
  86.  
  87. byte retcode;
  88. byte ApplId;
  89. byte * dataptr;
  90. byte Mode;                      /* 0 = Send, 1 = Recv                 */
  91. byte Lana;                      /* 0 or 1                             */
  92. byte RmtAddr[6];                /* Address of remote adapter          */
  93. byte LclAddr[6];                /* Address of local adapter           */
  94. byte lanheaderlen;              /* size of the current lan header     */
  95. byte funcaddr[4] = {0x00, 0x01, 0x00, 0x00};
  96. byte message[] = "Gooooooo Longhorns!";
  97.  
  98. #define SEND    0               /* mode flag for SEND                 */
  99. #define RECV    1               /* mode flag for RECEIVE              */
  100. #define DISP    2               /* mode flag for DISPLAY              */
  101. #define No 0
  102. #define Yes 1
  103. #define SendSap 0xA4
  104. #define RecvSap 0xA6
  105. #define BELL_CHAR       '\007'
  106. #define READ_SAP 0x01           /* READ match options           */
  107. #define ZEROADDRESS     ((unsigned char *)(0L))
  108. #define SystemKey 0xCFB0
  109. #define ApplKey 0x000D
  110.