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

  1. /*------------------------------------------------------------------*/
  2. /*               NETBIOS NCB DATA DECLARATIONS                      */
  3. /*------------------------------------------------------------------*/
  4.  
  5. struct     network_control_block
  6.  {
  7.   byte       ncb_command;               /* Netbios command code      */
  8.   byte       ncb_retcode;               /* Return code               */
  9.   byte       ncb_lsn;                   /* Local session number      */
  10.   byte       ncb_num;                   /* Number of application name*/
  11.   address    ncb_buffer_address;        /* Address of message buffer */
  12.   word       ncb_length;                /* length of message buffer  */
  13.   byte       ncb_callname[16];          /* Destination name          */
  14.   byte       ncb_name[16];              /* Source name               */
  15.   byte       ncb_rto;                   /* Receive timeout           */
  16.   byte       ncb_sto;                   /* Send timeout              */
  17.   union                                 /* Offset 44 parameters      */
  18.    {
  19.    address   ncb_post_address;          /* Address of post routine   */
  20.    struct
  21.     {
  22.     word     ncb_post_addr_offset;      /* Offset of post routine    */
  23.     word     ncb_dd_id;                 /* Device driver ID          */
  24.     } DD;
  25.    } off44;
  26.   byte       ncb_lana_num;              /* Adapter number            */
  27.   byte       ncb_cmd_cplt;              /* Command status            */
  28.   byte       ncb_reserve[14];           /* Reserved (except RESET)   */
  29.  };
  30.  
  31.  
  32. struct     ncb_status_information
  33.  {
  34.   byte       burned_in_addr[6];         /* Adapter's burned in addr  */
  35.   byte       reserved1[2];              /* RESERVED always X'0000'   */
  36.   word       software_level_number;     /* X'FFnn' - nn is level num */
  37.   word       reporting_period;          /* reporting period (minutes)*/
  38.   word       frmr_frames_received;      /* Number of FRMR received   */
  39.   word       frmr_frames_sent;          /* Number of FRMR sent       */
  40.   word       bad_iframes_received;      /* # bad Iframes received    */
  41.   word       aborted_transmissions;     /* # aborted transmits       */
  42.   dword      packets_transmitted;       /* # Successfully transmitted*/
  43.   dword      packets_received;          /* # Successfully received   */
  44.   word       bad_iframes_transmitted;   /* # bad Iframes transmitted */
  45.   word       lost_data_count;           /* Lost SAP buffer data cnt  */
  46.   word       t1_expiration_count;       /* Number of T1 expirations  */
  47.   word       ti_expiration_count;       /* Number of Ti expirations  */
  48.   address    extended_status_table;     /* Address of extended status*/
  49.   word       number_of_free_ncbs;       /* Number of NCBs available  */
  50.   word       max_configured_ncbs;       /* Configured NCB maximum    */
  51.   word       max_allowed_ncbs;          /* Maximum NCBs (always 255) */
  52.   word       busy_condition_count;      /* Local station busy count  */
  53.   word       max_datagram_size;         /* Maximum datagram packet   */
  54.   word       pending_sessions;          /* Number of pending sessions*/
  55.   word       max_configured_sessions;   /* Configured session maximum*/
  56.   word       max_allowed_sessions;      /* Maximum sessions (254)    */
  57.   word       max_data_packet_size;      /* Maximum session packet    */
  58.   word       number_of_names_present;   /* Number of names in table  */
  59.  };
  60.  
  61.  
  62. struct     ncb_extended_status
  63.  {
  64.   byte       reserved[40];              /* RESERVED                  */
  65.   byte       local_adapter_address[6];  /* Adapter's local address   */
  66.  };
  67.  
  68.  
  69. struct     ncb_session_status
  70.  {
  71.   byte       name_number_of_sessions;   /* Name number for sessions  */
  72.   byte       sessions_using_name;       /* # of sessions using name  */
  73.   byte       active_rcv_datagrams;      /* # of receive datagrams out*/
  74.   byte       active_receive_anys;       /* # of RECEIVE.ANY cmnds out*/
  75.   byte       local_session_number;      /* Local session number      */
  76.   byte       session_state;             /* State of session          */
  77.   byte       local_name[16];            /* Local name                */
  78.   byte       remote_name[16];           /* Remote name               */
  79.   byte       active_receives;           /* # of RECEIVE cmnds out    */
  80.   byte       active_sends;              /* # of SEND, CHAIN.SEND out */
  81.  };
  82.  
  83.  
  84. struct     ncb_find_name_info
  85.  {
  86.   word       nodes_responding;          /* Number of nodes responding*/
  87.   byte       reserved;                  /* RESERVED                  */
  88.   byte       name_status;               /* Unique/Group name flag    */
  89.  };
  90.  
  91.  
  92. struct     ncb_lan_header_entry
  93.  {
  94.   byte       lan_entry_length;          /* Length of entry           */
  95.   byte       lan_pcf0;                  /* Physical control field 0  */
  96.   byte       lan_pcf1;                  /* Physical control field 1  */
  97.   byte       lan_destination_addr[6];   /* Destination address       */
  98.   byte       lan_source_addr[6];        /* Source address            */
  99.   byte       lan_routing_info[18];      /* Routing information       */
  100.  };
  101.  
  102. struct     ncb_chain_send
  103.  {
  104.   byte       ncb_command;               /* Netbios command code      */
  105.   byte       ncb_retcode;               /* Return code               */
  106.   byte       ncb_lsn;                   /* Local session number      */
  107.   byte       not_used1;                 /* Not used                  */
  108.   address    ncb_buffer_address;        /* Address of message buffer */
  109.   word       ncb_length;                /* Length of message buffer  */
  110.   word       buffer_two_length;         /* Length of second buffer   */
  111.   address    buffer_two_address;        /* Address to second buffer  */
  112.   byte       reserved[10];              /* RESERVED                  */
  113.   byte       not_used2[18];             /* Not used                  */
  114.   union                                 /* Offset 44 parameters      */
  115.    {
  116.    address   ncb_post_address;          /* Address of post routine   */
  117.    struct
  118.     {
  119.     word     ncb_post_addr_offset;      /* Offset of post routine    */
  120.     word     ncb_dd_id;                 /* Device driver ID          */
  121.     } DD;
  122.    } off44 ;
  123.   byte       ncb_lana_num;              /* Adapter number            */
  124.   byte       ncb_cmd_cplt;              /* Command status            */
  125.   byte       ncb_reserve[14];           /* Reserved                  */
  126.  };
  127.  
  128.  
  129. struct     ncb_reset
  130.  {
  131.   byte       ncb_command;               /* Netbios command code      */
  132.   byte       ncb_retcode;               /* Return code               */
  133.   byte       ncb_lsn;                   /* Local session number      */
  134.   byte       ncb_num;                   /* Number of application name*/
  135.   address    dd_name_address;           /* Device drive name address */
  136.   byte       not_used1[2];              /* Not used                  */
  137.   byte       req_sessions;              /* # of sessions requested   */
  138.   byte       req_commands;              /* # of commands requested   */
  139.   byte       req_names;                 /* # of names requested      */
  140.   byte       req_name_one;              /* Name number one request   */
  141.   byte       not_used2[12];             /* Not used                  */
  142.   byte       act_sessions;              /* # of sessions obtained    */
  143.   byte       act_commands;              /* # of commands obtained    */
  144.   byte       act_names;                 /* # of names obtained       */
  145.   byte       act_name_one;              /* Name number one response  */
  146.   byte       not_used3[4];              /* Not used                  */
  147.   byte       load_session;              /* Number of sessions at load*/
  148.   byte       load_commands;             /* Number of commands at load*/
  149.   byte       load_names;                /* Number of names at load   */
  150.   byte       load_stations;             /* Number of stations at load*/
  151.   byte       not_used4[2];              /* Not used                  */
  152.   byte       load_remote_names;         /* Number of remote names    */
  153.   byte       not_used5[5];              /* Not used                  */
  154.   word       ncb_dd_id;                 /* NCB device driver ID      */
  155.   byte       ncb_lana_num;              /* Adapter number            */
  156.   byte       not_used6;                 /* Not used                  */
  157.   byte       ncb_reserve[14];           /* NCB error information     */
  158.  };
  159.