home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / lan_3_c.h < prev    next >
C/C++ Source or Header  |  1998-10-01  |  34KB  |  695 lines

  1. /*------------------------------------------------------------------*/
  2. /*                GENERAL 802.2 DATA DECLARATIONS                   */
  3. /*------------------------------------------------------------------*/
  4.  
  5. /*------------------------------------------------------------------*/
  6. /*  COMMAND CONTROL BLOCK - DYNAMIC LINK ROUTINE (DLR)              */
  7. /*                                                                  */
  8. /*  THIS STRUCTURE IS FOR USE WITH THE DLR INTERFACE AND MAY        */
  9. /*  BE USED FOR ALL COMMANDS.                                       */
  10. /*------------------------------------------------------------------*/
  11. #ifdef E32TO16
  12. #pragma pack (1)
  13. #endif
  14.  
  15. struct     command_control_block_dlr
  16.  {
  17.  byte       ccb_adapter;                /* Adapter number            */
  18.  byte       ccb_command;                /* Command code              */
  19.  byte       ccb_retcode;                /* Return code               */
  20.  byte       ccb_work;                   /* Reserved work area        */
  21.  address    ccb_pointer;                /* CCB chain pointer         */
  22.  dword      ccb_cmpl_flag;              /* Completion flag           */
  23.  union                                  /* 4 bytes at offset 12      */
  24.   {
  25.   struct                                /* 2 at off 12,2 at off 14   */
  26.    {
  27.    union                                /* CCB offset 12             */
  28.     {
  29. #ifndef E32TO16
  30.     word    ccb_parm_offset;            /* Parameter table offset    */
  31. #endif
  32.     word    station_id;                 /* Station Id                */
  33.     word    timer_value;                /* Timer value from 1-13107  */
  34.     } off_12;
  35.    union                                /* CCB offset 14             */
  36.     {
  37.     word    ccb_parameter_1;            /* Parameter 1               */
  38.     word    open_station_id;            /* Opened link station id    */
  39.     word    reset_all_saps;             /* Reset all SAPs flag       */
  40.     byte    flow_control;               /* Flow control option byte  */
  41.     } off_14;
  42.    } parm;
  43. #ifdef E32TO16
  44.   address   ccb_parm_offset;            /* Parameter table address   */
  45. #endif
  46.   address   functional_address;         /* Functional address        */
  47.   address   group_address;              /* Group address             */
  48.   address   read_ccb_addr;              /* Read CCB addr to close    */
  49.   address   timer_ccb;                  /* Timer CCB addr to close   */
  50.   dword     timer_cmpl_flag;            /* Timer's CCB_CMPL_FLAG     */
  51.   } parm_1;
  52. #ifndef E32TO16
  53.  dword      ccb_semaphore;              /* System Semaphore handle   */
  54. #else
  55.  HSYSSEM _Seg16  ccb_semaphore;         /* System Semaphore handle   */
  56. #endif
  57.  byte       ccb_appl_id;                /* Application ID            */
  58.  byte       ccb_read_flag;              /* READ attached indicator   */
  59.  word       ccb_appl_key;               /* Application key           */
  60.  union                                  /* Parm 2 field - 2 bytes    */
  61.   {
  62.   word      ccb_parameter_2;            /* Parameter 2               */
  63.   word      system_key;                 /* System key                */
  64.   } parm_2;
  65.  };
  66.  
  67.  
  68. /*------------------------------------------------------------------*/
  69. /*  COMMAND CONTROL BLOCK - DEVICE DRIVER (DD)                      */
  70. /*                                                                  */
  71. /*  THIS STRUCTURE IS FOR USE WITH THE DEVICE DRIVER AND MAY        */
  72. /*  BE USED FOR ALL COMMANDS.                                       */
  73. /*------------------------------------------------------------------*/
  74. struct     command_control_block_dd
  75.  {
  76.  byte       ccb_adapter;                /* Adapter number            */
  77.  byte       ccb_command;                /* Command code              */
  78.  byte       ccb_retcode;                /* Return code               */
  79.  byte       ccb_work;                   /* Reserved work area        */
  80.  address    ccb_pointer;                /* CCB chain pointer         */
  81.  word       ccb_cmpl_appndg;            /* Completion appendage      */
  82.  word       reserved1;                  /* Reserved for application  */
  83.  union                                  /* 4 bytes at offset 12      */
  84.   {
  85.   struct                                /* 2 at off 12,2 at off 14   */
  86.    {
  87.    union                                /* CCB offset 12             */
  88.     {
  89. #ifndef E32TO16
  90.     word    ccb_parm_offset;            /* Parameter table offset    */
  91. #endif
  92.     word    station_id;                 /* Station Id                */
  93.     word    timer_cmpl_appndg;          /* Timer ccb cmpl appendage  */
  94.     word    timer_value;                /* Timer value from 1-13107  */
  95.     } off_12;
  96.    union                                /* CCB offset 14             */
  97.     {
  98.     word    ccb_parameter_1;            /* Parameter 1               */
  99.     word    open_station_id;            /* Opened link station id    */
  100.     byte    flow_control;               /* Flow control option byte  */
  101.     } off_14;
  102.    } parm;
  103. #ifdef E32TO16
  104.   address   ccb_parm_offset;            /* Parameter table address   */
  105. #endif
  106.   address   functional_address;         /* Functional address        */
  107.   address   group_address;              /* Group address             */
  108.   address   timer_ccb;                  /* Timer ccb addr to cancel  */
  109.   dword     timer_cmpl_flag;            /* Timer's CCB_CMPL_FLAG     */
  110.   } parm_1;
  111.  word       ccb_resource_id;            /* Resource id for structures*/
  112.  word       reserved2;                  /* Reserved for application  */
  113.  byte       ccb_appl_id;                /* Application ID            */
  114.  byte       reserved3;                  /* Reserved for application  */
  115.  word       ccb_appl_key;               /* Application key           */
  116.  union                                  /* Parm 2 field - 2 bytes    */
  117.   {
  118.   word      ccb_parameter_2;            /* Parameter 2               */
  119.   word      system_key;                 /* System key                */
  120.   word      purge_resource_id;          /* Resource ID to be purged  */
  121.   } parm_2;
  122.  };
  123.  
  124.  
  125. /*------------------------------------------------------------------*/
  126. /*  COMMAND COMPLETION INFORMATION TABLE IS RETURNED FOR            */
  127. /*  COMMANDS USING APPENDAGES TO POST COMPLETION OF COMMANDS.       */
  128. /*------------------------------------------------------------------*/
  129. struct     command_completion_info
  130.  {
  131.  word       ccb_count;                  /* Count of CCBs chained     */
  132.  address    event_ccb_pointer;          /* Pointer to chain of CCBs  */
  133.  word       buffer_count;               /* Count of buffers chained  */
  134.  address    first_buffer_addr;          /* Pointer to buffers chained*/
  135.  };
  136.  
  137.  
  138. struct     buffer_free_parms
  139.  {
  140.  word       station_id;                 /* Station ID                */
  141.  word       buffer_left;                /* Number of buffers left    */
  142.  byte       reserved[4];                /* RESERVED                  */
  143.  address    first_buffer;               /* Address of first buffer   */
  144.  };
  145.  
  146.  
  147. struct     buffer_get_parms
  148.  {
  149.  word       station_id;                 /* Station ID                */
  150.  word       buffer_left;                /* Number of buffers left    */
  151.  byte       buffer_get;                 /* Number of buffers to get  */
  152.  byte       reserved[3];                /* RESERVED                  */
  153.  address    first_buffer;               /* Address of first buffer   */
  154.  };
  155.  
  156.  
  157. struct     read_parms
  158.  {
  159.  word       station_id;                 /* Station ID                */
  160.  byte       option_indicator;           /* Read option indicator     */
  161.  byte       event_set;                  /* notification event set    */
  162.  byte       event;                      /* Posting event             */
  163.  byte       critical_subset;            /* Event subset identifier   */
  164.  dword      notification_flag;          /* User notification flag    */
  165.  word       ccb_count;                  /* Count of CCBs attached    */
  166.  address    event_ccb_pointer;          /* Pointer to CCB chain      */
  167.  word       buffer_count;               /* Count of buffers attached */
  168.  address    first_buffer_addr;          /* Pointer to buffer chain   */
  169.  word       rcv_frame_count;            /* Count of frames attached  */
  170.  address    rcv_frame_addr;             /* pointer to frame chain    */
  171.  word       event_error_code;           /* Exception error code      */
  172.  word       event_error_data[3];        /* Exception error data      */
  173.  };
  174.  
  175.  
  176. struct     receive_parms
  177.  {
  178.  word       station_id;                 /* Station ID                */
  179.  word       user_length;                /* Length of user space      */
  180.  union
  181.   {
  182.   byte      receive_flag[4];            /* Receive user flag         */
  183.   word      rcv_data_appndg;            /* Receive data appendage    */
  184.   }rcvparm;
  185.  address    first_buffer;               /* Address of first buffer   */
  186.  byte       options;                    /* Receive options           */
  187.  byte       reserved[3];                /* RESERVED                  */
  188.  byte       rcv_read_option;            /* READ posting option       */
  189.  };
  190.  
  191.  
  192. struct     receive_not_contiguous
  193.  {
  194.  address    buf_pointer;                /* Pointer to next buffer    */
  195.  word       rcv_len;                    /* length of entire frame    */
  196.  word       length_in_buffer;           /* length of data in buffer  */
  197.  word       user_offset;                /* offset to user space      */
  198.  word       user_length;                /* Length of user space      */
  199.  word       station_id;                 /* Receiving station ID      */
  200.  byte       options;                    /* Receive option            */
  201.  byte       message_type;               /* Type of message received  */
  202.  word       buffers_left;               /* Number of buffers left    */
  203.  byte       rcv_pcfe;                   /* Rcv physical control field*/
  204.  byte       adapter_num;                /* Adapter number            */
  205.  address    next_frame;                 /* Pointer to next rcv frame */
  206.  byte       lan_header_length;          /* Length of LAN header      */
  207.  byte       dlc_header_length;          /* Length of DLC header      */
  208.  byte       lan_header[32];             /* LAN header of rcv frame   */
  209.  byte       dlc_header[4];              /* DLC header of rcv frame   */
  210.  };
  211.  
  212.  
  213. struct     receive_contiguous
  214.  {
  215.  address    buf_pointer;                /* Pointer to next buffer    */
  216.  word       rcv_len;                    /* length of entire frame    */
  217.  word       length_in_buffer;           /* length of data in buffer  */
  218.  word       user_offset;                /* offset to user space      */
  219.  word       user_length;                /* Length of user space      */
  220.  word       station_id;                 /* Receiving station ID      */
  221.  byte       options;                    /* Receive option            */
  222.  byte       message_type;               /* Type of message received  */
  223.  word       buffers_left;               /* Number of buffers left    */
  224.  byte       rcv_pcfe;                   /* Rcv physical control field*/
  225.  byte       adapter_num;                /* Adapter number            */
  226.  address    next_frame;                 /* Pointer to next rcv frame */
  227.  };
  228.  
  229.  
  230. struct     receive_buffer_two
  231.  {
  232.  address    buf_pointer;                /* Pointer to next buffer    */
  233.  word       rcv_len;                    /* length of entire frame    */
  234.  word       length_in_buffer;           /* length of data in buffer  */
  235.  word       user_offset;                /* offset to user space      */
  236.  word       user_length;                /* Length of user space      */
  237.  };
  238.  
  239.  
  240. struct     receive_modify_parms
  241.  {
  242.  word       station_id;                 /* Station ID                */
  243.  word       user_length;                /* Length of user data       */
  244.  word       rcv_data_appndg;            /* Receive data appendage    */
  245.  word       reserved1;                  /* Reserved for application  */
  246.  address    first_buffer;               /* Address of first buffer   */
  247.  word       subroutine_addr;            /* Subroutine offset         */
  248.  word       reserved2;                  /* Reserved for application  */
  249.  };
  250.  
  251.  
  252. struct     transmit_parms
  253.  {
  254.  word       station_id;                 /* Station ID                */
  255.  byte       transmit_pcfe;              /* Transmit PCFE information */
  256.  byte       rsap;                       /* Remote SAP value          */
  257.  address    xmit_queue_one;             /* Address of transmit queue */
  258.  address    xmit_queue_two;             /* Address of transmit queue */
  259.  word       buffer_len_one;             /* Length of buffer one      */
  260.  word       buffer_len_two;             /* Length of buffer two      */
  261.  address    buffer_one;                 /* Transmit buffer one       */
  262.  address    buffer_two;                 /* Transmit buffer two       */
  263.  byte       xmit_read_option;           /* READ posting option       */
  264.  };
  265.  
  266.  
  267. struct     transmit_buffer
  268.  {
  269.  address    next_buf_pointer;           /* Pointer to next buffer    */
  270.  word       reserved;                   /* Reserved for application  */
  271.  word       length_in_buffer;           /* Length of data in buffer  */
  272.  word       user_data;                  /* User data                 */
  273.  word       user_length;                /* Length of user space      */
  274.  };
  275.  
  276.  
  277. struct     dir_initialize_parms
  278.  {
  279.  word       bring_ups;                  /* Bring-up error code       */
  280.  word       sram_address;               /* Configured addr of SRAM   */
  281.  byte       sram_page;                  /* Configured SRAM meg page  */
  282.  byte       reserved[15];               /* RESERVED                  */
  283.  address    shared_ram_address;         /* Virtual address of SRAM   */
  284.  address    mmio_address;               /* Virtual address of MMIO   */
  285.  address    data_seg_address;           /* Virtual address of DS     */
  286.  };
  287.  
  288. #ifndef E32TO16
  289. struct     dir_open_adapter_parms
  290.  {
  291.  word       adapter_parms_offset;       /* Offset to adapter parms   */
  292.  word       reserved1;                  /* Reserved for application  */
  293.  byte       reserved2[4];               /* RESERVED                  */
  294.  word       dlc_parms_offset;           /* Offset to DLC parms       */
  295.  word       reserved3;                  /* Reserved for application  */
  296.  byte       reserved4[4];               /* RESERVED                  */
  297.  };
  298. #else
  299. struct     dir_open_adapter_parms
  300.  {
  301.  address    adapter_parms_offset;       /* Address of adapter parms  */
  302.  byte       reserved2[4];               /* RESERVED                  */
  303.  address    dlc_parms_offset;           /* Address of DLC parms      */
  304.  byte       reserved4[4];               /* RESERVED                  */
  305.  };
  306. #endif
  307.  
  308. struct     dir_open_ad_parms
  309.  {
  310.  word       open_error_code;            /* Open adapter errors       */
  311.  word       open_options;               /* Open options              */
  312.  byte       node_address[6];            /* Station's Node address    */
  313.  address    group_address;              /* Station's Group address   */
  314.  byte       functional_address[4];      /* Station's Functional addr */
  315.  word       num_rcv_buffers;            /* Number of receive buffers */
  316.  word       rcv_buffer_len;             /* Length of receive buffers */
  317.  word       dhb_buffer_len;             /* Length of DHB buffers     */
  318.  byte       data_hold_buffers;          /* Number of DHB buffers     */
  319.  byte       reserved1[3];               /* RESERVED                  */
  320. #ifndef E32TO16
  321.  word       product_id_offset;          /* Offset to product ID      */
  322.  word       reserved2;                  /* Reserved for application  */
  323. #else
  324.  address    product_id_offset;          /* Address of product ID     */
  325. #endif
  326.  word       bring_ups;                  /* Bring-up errors           */
  327.  word       init_warnings;              /* Initialization warnings   */
  328.  word       semaphore_count;            /* Number of semaphores      */
  329.  address    sys_semaphore_table;        /* Addr to semaphore table   */
  330.  byte       ddname[8];                  /* Application's DD name     */
  331.  };
  332.  
  333.  
  334. struct     dir_open_dlc_parms
  335.  {
  336.  byte       dlc_max_sap;                /* Maximum SAPs              */
  337.  byte       dlc_max_station;            /* Maximum link stations     */
  338.  byte       dlc_max_gsap;               /* Maximum group SAPs        */
  339.  byte       dlc_max_gsap_mem;           /* Maximum Group SAP members */
  340.  byte       dlc_t1_tick_one;            /* T1 timer interval, group1 */
  341.  byte       dlc_t2_tick_one;            /* T2 timer interval, group1 */
  342.  byte       dlc_ti_tick_one;            /* TI timer interval, group1 */
  343.  byte       dlc_t1_tick_two;            /* T1 timer interval, group2 */
  344.  byte       dlc_t2_tick_two;            /* T2 timer interval, group2 */
  345.  byte       dlc_ti_tick_two;            /* Ti timer interval, group2 */
  346.  };
  347.  
  348.  
  349. struct     dir_open_direct_parms
  350.  {
  351.  word       dir_buf_size;               /* Size of buffers in pool   */
  352.  word       dir_pool_length;            /* Length of buffer pool     */
  353.  address    dir_pool_address;           /* Address of buffer pool    */
  354.  word       open_options;               /* Open options              */
  355.  };
  356.  
  357.  
  358. struct     dir_read_log_parms
  359.  {
  360.  word       log_id;                     /* Identify log to read      */
  361.  word       log_buf_length;             /* Size of log buffer        */
  362. #ifndef E32TO16
  363.  word       log_buf_offset;             /* Offset of log buffer      */
  364.  word       reserved;                   /* Reserved for application  */
  365. #else
  366.  address    log_buf_offset;             /* Address of log buffer     */
  367. #endif
  368.  word       log_act_length;             /* Actual length of log      */
  369.  };
  370.  
  371.  
  372. struct     dir_read_log_tokenring
  373.  {
  374.  byte       line_errors;                /* Line error count          */
  375.  byte       internal_errors;            /* Internal error count      */
  376.  byte       burst_errors;               /* Burst error count         */
  377.  byte       ari_fci_delimiter;          /* ARI/FCI delimiter         */
  378.  byte       abort_delimiter;            /* Abort delimiter           */
  379.  byte       reserved1;                  /* RESERVED                  */
  380.  byte       lost_frames;                /* Lost frame count          */
  381.  byte       receive_congestion;         /* Receive congestion count  */
  382.  byte       frame_copied_errors;        /* Frame copied error count  */
  383.  byte       frequency_errors;           /* Frequency error count     */
  384.  byte       token_errors;               /* Token-Ring error count    */
  385.  byte       reserved2[3];               /* RESERVED                  */
  386.  };
  387.  
  388.  
  389. struct     dir_read_log_pcnetwork
  390.  {
  391.  byte       crc_errors;                 /* CRC error count           */
  392.  byte       reserved1;                  /* RESERVED                  */
  393.  byte       alignment_errors;           /* Alignment error count     */
  394.  byte       reserved2;                  /* RESERVED                  */
  395.  byte       transmit_errors;            /* Transmit error count      */
  396.  byte       reserved3;                  /* RESERVED                  */
  397.  byte       collision_errors;           /* Collision error count     */
  398.  byte       rcv_congestion_errors;      /* Receive congestion count  */
  399.  byte       reserved4[6];               /* RESERVED                  */
  400.  };
  401.  
  402.  
  403. struct     dir_set_exception_parms_dlr
  404.  {
  405.  dword      adapter_check_flag;         /* Adapter check flag        */
  406.  dword      network_status_flag;        /* Ring/Network status flag  */
  407.  dword      pc_error_flag;              /* PC-detected error flag    */
  408.  dword      system_action_flag;         /* System action flag        */
  409.  };
  410.  
  411.  
  412. struct     dir_set_exception_parms_dd
  413.  {
  414.  word       adapter_check_appndg;       /* Adapter check appendage   */
  415.  word       reserved1;                  /* Reserved for apllication  */
  416.  word       network_status_appndg;      /* Ring/Network status appndg*/
  417.  word       reserved2;                  /* Reserved for apllication  */
  418.  word       pc_error_appndg;            /* PC-detected error appndg  */
  419.  word       reserved3;                  /* Reserved for apllication  */
  420.  word       system_action_appndg;       /* System action appendage   */
  421.  word       reserved4;                  /* Reserved for apllication  */
  422.  };
  423.  
  424.  
  425. struct     dir_status_parms
  426.  {
  427.  byte       burned_in_addr[6];          /* Adapter's burned in addr  */
  428.  byte       node_address[6];            /* Station's Node  address   */
  429.  byte       group_address[4];           /* Station's Group address   */
  430.  byte       function_address[4];        /* Station's Functional addr */
  431.  byte       max_sap;                    /* Maximum SAPs              */
  432.  byte       open_sap;                   /* Number of opened SAPs     */
  433.  byte       max_station;                /* Maximum link stations     */
  434.  byte       open_station;               /* Number of opened link stn */
  435.  byte       avail_station;              /* Available link stations   */
  436.  byte       adapter_config;             /* Adapter configuration     */
  437.  byte       microcode_level[10];        /* Microcode level           */
  438.  address    adapter_parms_addr;         /* Address of adapter parms  */
  439.  address    adapter_mac_addr;           /* Address of adapter MAC    */
  440.  address    tick_counter_addr;          /* Address of tick counter   */
  441.  word       last_ring_status;           /* Last Ring/Network status  */
  442.  word       adapter_type;               /* Adapter type              */
  443.  };
  444.  
  445.  
  446. struct     dir_status_tokenring
  447.  {
  448.  byte       phys_addr[4];               /* Adapter physical address  */
  449.  byte       up_node_addr[6];            /* Upstream node address     */
  450.  byte       up_phys_addr[4];            /* Upstream physical address */
  451.  byte       poll_addr[6];               /* Last poll address         */
  452.  byte       auth_env[2];                /* Authorized environment    */
  453.  byte       acc_priority[2];            /* Transmit access priority  */
  454.  byte       source_class[2];            /* Source class authorization*/
  455.  byte       att_code[2];                /* Last attention code       */
  456.  byte       source_addr[6];             /* Last source address       */
  457.  byte       beacon_type[2];             /* Last beacon type          */
  458.  byte       major_vector[2];            /* Last major vector         */
  459.  byte       ring_status[2];             /* Ring status               */
  460.  byte       soft_error[2];              /* Soft error timer value    */
  461.  byte       fe_error[2];                /* Front End error count     */
  462.  byte       local_ring[2];              /* Local ring number         */
  463.  byte       mon_error[2];               /* Monitor error code        */
  464.  byte       beacon_transmit[2];         /* Beacon transmit type      */
  465.  byte       beacon_receive[2];          /* Beacon receive type       */
  466.  byte       frame_correl[2];            /* Frame correlation save    */
  467.  byte       beacon_naun[6];             /* Beaconing station NAUN    */
  468.  byte       reserved[4];                /* RESERVED                  */
  469.  byte       beacon_phys[4];             /* Beaconing stn's phys addr */
  470.  };
  471.  
  472.  
  473. struct     dir_status_pcnetwork
  474.  {
  475.  byte       reserved1[28];              /* RESERVED                  */
  476.  byte       source_addr[6];             /* Last source address       */
  477.  byte       reserved2[2];               /* RESERVED                  */
  478.  byte       major_vector[2];            /* Last major vector         */
  479.  byte       network_status[2];          /* Network status            */
  480.  byte       report_error[2];            /* Error report timer value  */
  481.  byte       report_error_tick[2];       /* Error timer tick counter  */
  482.  byte       local_bus_number[2];        /* Local bus number          */
  483.  byte       reserved3[6];               /* RESERVED                  */
  484.  byte       frame_correl[2];            /* Frame correlation save    */
  485.  byte       reserved4[6];               /* RESERVED                  */
  486.  word       network_samples;            /* Number of samples         */
  487.  word       network_busy;               /* Number of busy samples    */
  488.  byte       reserved5[4];               /* RESERVED                  */
  489.  };
  490.  
  491.  
  492. struct     dlc_connect_station_parms
  493.  {
  494.  word       station_id;                 /* Station ID                */
  495.  byte       reserved1[2];               /* RESERVED                  */
  496. #ifndef E32TO16
  497.  word       routing_offset;             /* Offset to routing info    */
  498.  word       reserved2;                  /* Reserved for application  */
  499. #else
  500.  address    routing_offset;             /* Address of routing info   */
  501. #endif
  502.  };
  503.  
  504.  
  505. struct     dlc_modify_parms
  506.  {
  507.  byte       reserved1[2];               /* RESERVED                  */
  508.  word       station_id;                 /* SAP or Link Station ID    */
  509.  byte       timer_t1;                   /* T1 timer value            */
  510.  byte       timer_t2;                   /* T2 timer value            */
  511.  byte       timer_ti;                   /* Ti timer value            */
  512.  byte       maxout;                     /* Max transmits without ACK */
  513.  byte       maxin;                      /* Max receives without ACK  */
  514.  byte       maxout_incr;                /* Dynamic window increment  */
  515.  byte       max_retry_count;            /* Maximum retry count       */
  516.  byte       reserved2[3];               /* RESERVED                  */
  517.  byte       access_priority;            /* Ring access priority      */
  518.  byte       reserved3[4];               /* RESERVED                  */
  519.  byte       group_count;                /* Length of group list data */
  520. #ifndef E32TO16
  521.  word       group_list_offset;          /* Offset to group list      */
  522.  word       reserved4;                  /* Reserved for application  */
  523. #else
  524.  address    group_list_offset;          /* Address of group list     */
  525. #endif
  526.  };
  527.  
  528.  
  529. struct     dlc_open_sap_parms
  530.  {
  531.  word       station_id;                 /* SAP station ID            */
  532.  word       user_stat_value;            /* User value for DLC Status */
  533.  byte       timer_t1;                   /* Ti timer value            */
  534.  byte       timer_t2;                   /* T2 timer value            */
  535.  byte       timer_ti;                   /* Ti timer value            */
  536.  byte       maxout;                     /* Max transmits without ACK */
  537.  byte       maxin;                      /* Max receives without ACK  */
  538.  byte       maxout_incr;                /* Dynamic window increment  */
  539.  byte       max_retry_count;            /* Maximum retry count       */
  540.  byte       max_members;                /* Max SAPs for group list   */
  541.  word       max_i_field;                /* Max rcv data for I frames */
  542.  byte       sap_value;                  /* SAP value to be assigned  */
  543.  byte       options_priority;           /* SAP options/ring priority */
  544.  byte       sap_station_count;          /* Requested number of stns  */
  545.  byte       reserved1[2];               /* RESERVED                  */
  546.  byte       group_count;                /* Length of group list data */
  547. #ifndef E32TO16
  548.  word       group_list_offset;          /* Offset of group list      */
  549.  word       reserved2;                  /* Reserved for application  */
  550. #else
  551.  address    group_list_offset;          /* Address of group list     */
  552. #endif
  553.  union
  554.   {
  555.   address   dlc_status_flag;            /* DLC status user flag      */
  556.   word      dlc_status_appndg;          /* DLC status user appendage */
  557.   } status;
  558.  word       dlc_buf_size;               /* Size of buffers in pool   */
  559.  word       dlc_pool_len;               /* Length of buffer pool     */
  560.  address    dlc_pool_address;           /* Address of buffer pool    */
  561.  byte       adapter_available_stns;     /* Number of stns available  */
  562.  };
  563.  
  564.  
  565. struct     dlc_open_station_parms
  566.  {
  567.  word       station_id;                 /* SAP station ID            */
  568.  word       link_station_id;            /* Link station ID assigned  */
  569.  byte       timer_t1;                   /* Ti timer value            */
  570.  byte       timer_t2;                   /* T2 timer value            */
  571.  byte       timer_ti;                   /* Ti timer value            */
  572.  byte       maxout;                     /* Max transmits without ACK */
  573.  byte       maxin;                      /* Max receives without ACK  */
  574.  byte       maxout_incr;                /* Dynamic window increment  */
  575.  byte       max_retry_cnt;              /* Maximum retry count       */
  576.  byte       rsap_value;                 /* Remote SAP value          */
  577.  word       max_i_field;                /* Max rcv data for I frames */
  578.  byte       access_priority;            /* Ring access priority      */
  579.  byte       reserved1;                  /* RESERVED                  */
  580. #ifndef E32TO16
  581.  word       destination_offset;         /* Offset to remote dest add */
  582.  word       reserved2;                  /* Reserved for application  */
  583. #else
  584.  address    destination_offset;         /* Address of remote dest add*/
  585. #endif
  586.  };
  587.  
  588.  
  589. struct     dlc_reallocate_stns_parms
  590.  {
  591.  word       station_id;                 /* SAP station ID            */
  592.  byte       option_byte;                /* Increase/decrease flag    */
  593.  byte       station_count;              /* Number of link stations   */
  594.  byte       adapter_available_stns;     /* Adapter: available stns   */
  595.  byte       sap_available_stns;         /* SAP: available stns       */
  596.  byte       adapter_station_count;      /* Adapter: configured stns  */
  597.  byte       sap_station_count;          /* SAP: configured stns      */
  598.  };
  599.  
  600.  
  601. struct     dlc_set_threshold_parms
  602.  {
  603.  word       station_id;                 /* SAP station ID            */
  604.  word       buffer_threshold;           /* Buffer threshold number   */
  605. #ifndef E32TO16
  606.  dword      alert_semaphore;            /* System Semaphore handle   */
  607. #else
  608.  HSYSSEM _Seg16   alert_semaphore;      /* System semaphore handle   */
  609. #endif
  610.  };
  611.  
  612.  
  613. struct     dlc_statistics_parms
  614.  {
  615.  word       station_id;                 /* Identify log to read      */
  616.  word       log_buf_length;             /* Size of log buffer        */
  617. #ifndef E32TO16
  618.  word       log_buf_offset;             /* Offset to log buffer      */
  619.  word       reserved;                   /* Reserved for application  */
  620. #else
  621.  address    log_buf_offset;             /* Address of log buffer     */
  622. #endif
  623.  word       log_act_length;             /* Actual length of log      */
  624.  byte       options;                    /* Command options           */
  625.  };
  626.  
  627.  
  628. struct     sap_station_log
  629.  {
  630.  dword      frames_transmitted;         /* Frames transmitted count  */
  631.  dword      frames_received;            /* Frames received count     */
  632.  dword      frames_discarded;           /* Frames discarded count    */
  633.  dword      lost_data;                  /* Lost data count           */
  634.  word       available_buffers;          /* Number of buffers left    */
  635.  };
  636.  
  637.  
  638. struct     link_station_log
  639.  {
  640.  word       iframes_transmitted;        /* Iframes transmit count    */
  641.  word       iframes_received;           /* Iframes received count    */
  642.  byte       iframes_receive_errors;     /* Iframes received error    */
  643.  byte       iframes_transmit_errors;    /* Iframes transmit errors   */
  644.  word       ti_expired_count;           /* Ti expiration counts      */
  645.  byte       last_cmnd_resp_rcved;       /* Last command received     */
  646.  byte       last_cmnd_resp_sent;        /* Last command sent         */
  647.  byte       link_primary_state;         /* Link primary state        */
  648.  byte       link_secondary_state;       /* Link secondary state      */
  649.  byte       send_state_variable;        /* Send state variable       */
  650.  byte       receive_state_variable;     /* Receive state variable    */
  651.  byte       last_received_nr;           /* Last Received NR value    */
  652.  byte       lan_header_length;          /* Length of LAN header      */
  653.  };
  654.  
  655.  
  656. struct     dlc_header_iframe
  657.  {
  658.  byte       dsap;                       /* Destination SAP           */
  659.  byte       ssap;                       /* Source SAP                */
  660.  byte       control[2];                 /* Control information       */
  661.  };
  662.  
  663.  
  664. struct     dlc_header_non_iframe
  665.  {
  666.  byte       dsap;                       /* Destination SAP           */
  667.  byte       ssap;                       /* Source SAP                */
  668.  byte       control;                    /* Control information       */
  669.  };
  670.  
  671.  
  672. struct     lan_header
  673.  {
  674.  byte       pcf0;                       /* Physical control field 0  */
  675.  byte       pcf1;                       /* Physical control field 1  */
  676.  byte       dest_addr[6];               /* Destination address       */
  677.  byte       source_addr[6];             /* Source address            */
  678.  byte       routing_info_header[2];     /* Routing information hdr   */
  679.  };
  680.  
  681.  
  682. struct     lan_envelope_start
  683.  {
  684.  byte       s_del;                      /* Starting delimiter        */
  685.  struct    lan_header common;           /* LAN header information    */
  686.  };
  687.  
  688.  
  689. struct     lan_envelope_end
  690.  {
  691.  byte       fcs[4];                     /* Frame Check Sequence      */
  692.  byte       e_del;                      /* End delimiter             */
  693.  byte       pcf_e;                      /* PCF extension             */
  694.  };
  695.