📄 sdla_fr.h
字号:
unsigned short dlci PACKED; /* 03h: DLCI */ unsigned char attr PACKED; /* 05h: FECN/BECN/DE/CR */ unsigned short tmstamp PACKED; /* 06h: time stamp */ unsigned short rsrv[2] PACKED; /* 08h: */ unsigned long offset PACKED; /* 0Ch: buffer absolute address */} fr_buf_ctl_t;/*---------------------------------------------------------------------------- * Global Configuration Block. Passed to FR_SET_CONFIG command when dlci == 0. */typedef struct fr_conf{ unsigned short station PACKED; /* 00h: CPE/Node */ unsigned short options PACKED; /* 02h: configuration options */ unsigned short kbps PACKED; /* 04h: baud rate in kbps */ unsigned short port PACKED; /* 06h: RS-232/V.35 */ unsigned short mtu PACKED; /* 08h: max. transmit length */ unsigned short t391 PACKED; /* 0Ah: */ unsigned short t392 PACKED; /* 0Ch: */ unsigned short n391 PACKED; /* 0Eh: */ unsigned short n392 PACKED; /* 10h: */ unsigned short n393 PACKED; /* 12h: */ unsigned short cir_fwd PACKED; /* 14h: */ unsigned short bc_fwd PACKED; /* 16h: */ unsigned short be_fwd PACKED; /* 18h: */ unsigned short cir_bwd PACKED; /* 1Ah: */ unsigned short bc_bwd PACKED; /* 1Ch: */ unsigned short be_bwd PACKED; /* 1Eh: */ unsigned short dlci[0] PACKED; /* 20h: */} fr_conf_t;/* 'station_type' defines */#define FRCFG_STATION_CPE 0#define FRCFG_STATION_NODE 1/* 'conf_flags' defines */#define FRCFG_IGNORE_TX_CIR 0x0001#define FRCFG_IGNORE_RX_CIR 0x0002#define FRCFG_DONT_RETRANSMIT 0x0004#define FRCFG_IGNORE_CBS 0x0008#define FRCFG_THROUGHPUT 0x0010 /* enable throughput calculation */#define FRCFG_DIRECT_RX 0x0080 /* enable direct receive buffer */#define FRCFG_AUTO_CONFIG 0x8000 /* enable auto DLCI configuration *//* 'baud_rate' defines */#define FRCFG_BAUD_1200 12#define FRCFG_BAUD_2400 24#define FRCFG_BAUD_4800 48#define FRCFG_BAUD_9600 96#define FRCFG_BAUD_19200 19#define FRCFG_BAUD_38400 38#define FRCFG_BAUD_56000 56#define FRCFG_BAUD_64000 64#define FRCFG_BAUD_128000 128/* 'port_mode' defines */#define FRCFG_MODE_EXT_CLK 0x0000#define FRCFG_MODE_INT_CLK 0x0001#define FRCFG_MODE_V35 0x0000 /* S508 only */#define FRCFG_MODE_RS232 0x0002 /* S508 only *//*---------------------------------------------------------------------------- * Channel configuration. * This structure is passed to the FR_SET_CONFIG command when dlci != 0. */typedef struct fr_dlc_conf{ unsigned short conf_flags PACKED; /* 00h: configuration bits */ unsigned short cir_fwd PACKED; /* 02h: */ unsigned short bc_fwd PACKED; /* 04h: */ unsigned short be_fwd PACKED; /* 06h: */ unsigned short cir_bwd PACKED; /* 08h: */ unsigned short bc_bwd PACKED; /* 0Ah: */ unsigned short be_bwd PACKED; /* 0Ch: */} fr_dlc_conf_t;/*---------------------------------------------------------------------------- * S502 interrupt mode control block. * This structure is passed to the FR_SET_INTR_FLAGS and returned by the * FR_READ_INTR_FLAGS commands. */typedef struct fr502_intr_ctl{ unsigned char mode PACKED; /* 00h: interrupt enable flags */ unsigned short tx_len PACKED; /* 01h: required Tx buffer size */} fr502_intr_ctl_t;/*---------------------------------------------------------------------------- * S508 interrupt mode control block. * This structure is passed to the FR_SET_INTR_FLAGS and returned by the * FR_READ_INTR_FLAGS commands. */typedef struct fr508_intr_ctl{ unsigned char mode PACKED; /* 00h: interrupt enable flags */ unsigned short tx_len PACKED; /* 01h: required Tx buffer size */ unsigned char irq PACKED; /* 03h: IRQ level to activate */ unsigned char flags PACKED; /* 04h: ?? */ unsigned short timeout PACKED; /* 05h: ms, for timer interrupt */} fr508_intr_ctl_t;/*---------------------------------------------------------------------------- * Channel status. * This structure is returned by the FR_READ_STATUS command. */typedef struct fr_dlc_Status{ unsigned char status PACKED; /* 00h: link/DLCI status */ struct { unsigned short dlci PACKED; /* 01h: DLCI number */ unsigned char status PACKED; /* 03h: DLCI status */ } circuit[1] PACKED;} fr_dlc_status_t;/* 'status' defines */#define FR_LINK_INOPER 0x00 /* for global status (DLCI == 0) */#define FR_LINK_OPER 0x01#define FR_DLCI_DELETED 0x01 /* for circuit status (DLCI != 0) */#define FR_DLCI_ACTIVE 0x02#define FR_DLCI_WAITING 0x04#define FR_DLCI_NEW 0x08#define FR_DLCI_REPORT 0x40/*---------------------------------------------------------------------------- * Global Statistics Block. * This structure is returned by the FR_READ_STATISTICS command when * dcli == 0. */typedef struct fr_link_stat{ unsigned short rx_too_long PACKED; /* 00h: */ unsigned short rx_dropped PACKED; /* 02h: */ unsigned short rx_dropped2 PACKED; /* 04h: */ unsigned short rx_bad_dlci PACKED; /* 06h: */ unsigned short rx_bad_format PACKED; /* 08h: */ unsigned short retransmitted PACKED; /* 0Ah: */ unsigned short cpe_tx_FSE PACKED; /* 0Ch: */ unsigned short cpe_tx_LIV PACKED; /* 0Eh: */ unsigned short cpe_rx_FSR PACKED; /* 10h: */ unsigned short cpe_rx_LIV PACKED; /* 12h: */ unsigned short node_rx_FSE PACKED; /* 14h: */ unsigned short node_rx_LIV PACKED; /* 16h: */ unsigned short node_tx_FSR PACKED; /* 18h: */ unsigned short node_tx_LIV PACKED; /* 1Ah: */ unsigned short rx_ISF_err PACKED; /* 1Ch: */ unsigned short rx_unsolicited PACKED; /* 1Eh: */ unsigned short rx_SSN_err PACKED; /* 20h: */ unsigned short rx_RSN_err PACKED; /* 22h: */ unsigned short T391_timeouts PACKED; /* 24h: */ unsigned short T392_timeouts PACKED; /* 26h: */ unsigned short N392_reached PACKED; /* 28h: */ unsigned short cpe_SSN_RSN PACKED; /* 2Ah: */ unsigned short current_SSN PACKED; /* 2Ch: */ unsigned short current_RSN PACKED; /* 2Eh: */ unsigned short curreny_T391 PACKED; /* 30h: */ unsigned short current_T392 PACKED; /* 32h: */ unsigned short current_N392 PACKED; /* 34h: */ unsigned short current_N393 PACKED; /* 36h: */} fr_link_stat_t;/*---------------------------------------------------------------------------- * DLCI statistics. * This structure is returned by the FR_READ_STATISTICS command when * dlci != 0. */typedef struct fr_dlci_stat{ unsigned long tx_frames PACKED; /* 00h: */ unsigned long tx_bytes PACKED; /* 04h: */ unsigned long rx_frames PACKED; /* 08h: */ unsigned long rx_bytes PACKED; /* 0Ch: */ unsigned long rx_dropped PACKED; /* 10h: */ unsigned long rx_inactive PACKED; /* 14h: */ unsigned long rx_exceed_CIR PACKED; /* 18h: */ unsigned long rx_DE_set PACKED; /* 1Ch: */ unsigned long tx_throughput PACKED; /* 20h: */ unsigned long tx_calc_timer PACKED; /* 24h: */ unsigned long rx_throughput PACKED; /* 28h: */ unsigned long rx_calc_timer PACKED; /* 2Ch: */} fr_dlci_stat_t;/*---------------------------------------------------------------------------- * Communications error statistics. * This structure is returned by the FR_READ_ERROR_STATS command. */typedef struct fr_comm_stat{ unsigned char rx_overruns PACKED; /* 00h: */ unsigned char rx_bad_crc PACKED; /* 01h: */ unsigned char rx_aborts PACKED; /* 02h: */ unsigned char rx_too_long PACKED; /* 03h: */ unsigned char tx_aborts PACKED; /* 04h: */ unsigned char tx_underruns PACKED; /* 05h: */ unsigned char tx_missed_undr PACKED; /* 06h: */ unsigned char dcd_dropped PACKED; /* 07h: */ unsigned char cts_dropped PACKED; /* 08h: */} fr_comm_stat_t;/*---------------------------------------------------------------------------- * Defines for the FR_ISSUE_IS_FRAME command. */#define FR_ISF_LVE 2 /* issue Link Verification Enquiry */#define FR_ISF_FSE 3 /* issue Full Status Enquiry */#ifdef _MSC_# pragma pack()#endif#endif /* _SDLA_FR_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -