Blame | Last modification | View Log | Download
/*============================================================================* Copyright (C) 1994, CYBERLOGIC Technologies Inc.*=============================================================================** Module Name :* netlib.h** Abstract:* This file should be included by every module that makes calls to* functions in the netlib.obj interface library file.** Author:* Paul Mikulski** ---------+-----+-----------------------------------------------------------* DATE | BY | DESCRIPTION / REASON FOR MODIFICATION* ---------+-----+-----------------------------------------------------------* 03-09-94 | PM | Start of development* ---------+-----+-----------------------------------------------------------* ..-..-94 | |*==========+=====+==========================================================*//*==========================================================================*//* Include files/*==========================================================================*/#ifndef NETBIOS_INCLUDED#include "netbios.h"#endif#define SA85_DIAGNOSTICS 0x55AA/** definition of the network status structure*/typedef struct _mbp_net_stat {unsigned short diag; // diagnostics, must contain 0xAA55unsigned short node_type; // Node type idunsigned short version; // SA85.SYS version and error cnt defineunsigned short address; // network address for this stationunsigned short mac_state; // MAC state variableunsigned short peer_status; // provide status of this unit relative to the networkunsigned short token_pass_cnt; // Toke pass counterunsigned short token_rot_time; // token rotaion time in msunsigned char dm_token_failed; // Data Master failed during token ownership bit mapunsigned char pm_token_failed; // Program Master failed during token ownership bit mapunsigned char dm_token_bitmap; // Data Master token owner work bit mapunsigned char pm_token_bitmap; // Program Master token owner work bit mapunsigned char ds_token_bitmap; // Data Slave token owner work bit mapunsigned char ps_token_bitmap; // Program Slave token owner work bit mapunsigned short ds_txf_req_bitmap; // Data slave/get slave command transfer request bit mapunsigned char pm_txf_rsp_bitmap; // Program Master/get master rsp transfer request bit mapunsigned char ps_txf_req_bitmap; // Program slave/get slave command transfer request bit mapunsigned char pm_connect_bitmap; // Program Master connect status bit mapunsigned char ps_alogout_bitmap_req; // Program Slave automatic logout request bit mapunsigned char pretx_error_cnt; // Pretransmit deferral error counterunsigned char rx_dma_overrun; // receive buffer DMA ovverrun error counterunsigned char rep_cmd_rx_cnt; // repeated command receive counterunsigned char frame_size_err_cnt; // frame size error counterunsigned char cable_A_framing_err; // cable A framing errorunsigned char cable_B_framing_err; // cable B framing errorunsigned char rx_crc_error; // Receiver CRC error counterunsigned char packet_len_err; // bad packet length error counterunsigned char link_address_err; // bad link address error counterunsigned char tx_dma_underrun; // transmit buffer DMA-underrun error counterunsigned char internal_packet_len; // bad internal packet length error counterunsigned char mac_fnc_code_err; // bad MAC function code error counterunsigned char com_retry; // communication retry error counterunsigned char com_failed; // communication error failed error counterunsigned char rx_packet_ok; // good receive packet succes counterunsigned char rx_no_rsp_cnt; // no response received error counterunsigned char rx_exc_rsp_cnt; // exception response received error counterunsigned char unexp_path_err_cnt; // unexpected path error counterunsigned char unexc_rsp_cnt; // unexpected response error counterunsigned char forgotten_err_cnt; // forgotten transaction error counterunsigned char active_station[8]; // active station table bitmapunsigned char token_station[8]; // token station table bitmapunsigned char global_data_present[8]; // global data present table bitmapunsigned char rx_buf_inuse[5]; // receive buffer in use table bitmapunsigned char station_mgmt_cmd; // station management command processed initiation counterunsigned char dm_output_path[8]; // Data Master output path command initiator counterunsigned char ds_input_path[8]; // Data Slave input path command initiator counterunsigned char pm_output_path[8]; // Program Master output path command initiator counterunsigned char ps_input_path[8]; // Program Slave input path command initiator counter} MBP_NET_STAT;/*==========================================================================*//* Function prototypes/*==========================================================================*/intAPIENTRYncb_reset(int adaptno);intAPIENTRYncb_sa85off(int adaptno);intAPIENTRYncb_status(PNCB ncbp,int adaptno);intAPIENTRYncb_send(PNCB ncbp,int length,PCHAR buffer,UCHAR timeout);intAPIENTRYncb_receive_wait(PNCB ncbp,PCHAR buffer,UCHAR timeout);PNCBAPIENTRYncb_open(PCHAR name,int lan);intAPIENTRYncb_receive(PNCB ncbp,PCHAR buffer);PNCBAPIENTRYncb_open(PCHAR name,int lan);intAPIENTRYncb_close(PNCB ncbp);intAPIENTRYncb_send_datagram(PNCB ncbp,int length,PCHAR buffer,UCHAR timeout,int adaptno);intAPIENTRYncb_receive_datagram(PNCB ncbp,int node,PCHAR buffer,UCHAR timeout,int adaptno);intAPIENTRYncb_cancel(PNCB ncbp);intAPIENTRYncb_set_slave_login(PNCB ncbp,UCHAR login_status);