-#define PI13 1 /* PI13 vs. DR11B device depandant code */
-#ifndef HYLOG
-#define HYLOG 1 /* enable logging of errors */
-#endif
-
-/*
- * Structure of a HYPERchannel adapter header
- */
-struct hy_hdr {
- short hyh_ctl; /* control */
- short hyh_access; /* access code */
- union { /* to/from addresses */
- short hyh_addr; /* full address */
- char hyh_baddr[2]; /* adapter/port number from address */
- } hyhu_to, hyhu_from;
-#define hyh_to hyhu_to.hyh_addr
-#define hyh_from hyhu_from.hyh_addr
-#define hyh_to_adapter hyhu_to.hyh_baddr[0]
-#define hyh_to_port hyhu_to.hyh_baddr[1]
-#define hyh_from_adapter hyhu_from.hyh_baddr[0]
-#define hyh_from_port hyhu_from.hyh_baddr[1]
- short hyh_param; /* parameter (for loopback) */
- char hyh_type; /* record type */
- char hyh_off; /* offset from end of hy_hdr to ip data */
-};
-
-/*
- * Structure of a HYPERchannel message header (from software)
- */
-struct hym_data {
- short hymd_mplen; /* message proper length, if associated data */
-};
-
-struct hym_hdr {
- struct hym_data hym_d;
-#define hym_mplen hym_d.hymd_mplen
- struct hy_hdr hym_hdr; /* hardware header, MUST BE LAST */
-};
-
-/*
- * HYPERchannel header word control bits
- */
-#define H_XTRUNKS 0x00F0 /* transmit trunks */
-#define H_RTRUNKS 0x000F /* remote trunks to transmit on for loopback */
-#define H_ASSOC 0x0100 /* has associated data */
-#define H_LOOPBK 0x00FF /* loopback command */
-
-/*
- * Structure of Statistics Record (counters)
- */
-struct hy_stat {
- u_long hyc_msgcnt; /* # messages transmitted */
- u_long hyc_dbcnt; /* # data buffers transmitted */
- u_long hyc_tbusy; /* # available trunks busy */
- u_long hyc_hwret; /* # hardware retransmits */
- u_long hyc_crcbad; /* # crc errors on trunk */
- u_long hyc_mcret; /* # microcode retransmits */
- u_long hyc_tdabort; /* # trunk driver aborts */
- u_char hyc_atype[3]; /* adapter type and revision level */
- u_char hyc_uaddr; /* adapter unit number */
-};
-
-/*
- * Structure of the Status Record
- */
-struct hy_status {
- u_char hys_gen_status; /* general status byte */
- u_char hys_last_fcn; /* last function code issued */
- u_char hys_resp_trunk; /* trunk response byte */
- u_char hys_status_trunk; /* trunk status byte */
- u_char hys_recd_resp; /* recieved response byte */
- u_char hys_error; /* error code */
- u_char hys_caddr; /* compressed addr of 1st msg on chain */
- u_char hys_pad; /* not used */
-};
-
-/*
- * Get port number from status record
- */
-#define PORTNUM(p) (((p)->hys_gen_status >> 6) & 0x03)