1 /* if_dmc.h 6.3 84/12/20 */ 2 3 /* 4 * DMC-11 Interface 5 */ 6 7 struct dmcdevice { 8 char bsel0; 9 char bsel1; 10 char bsel2; 11 char bsel3; 12 short sel4; 13 short sel6; 14 }; 15 16 /* 17 * dmc software packet encapsulation. This allows the dmc 18 * link to be multiplexed among several protocols. 19 * The first eight bytes of the dmc header are garbage, 20 * since on a vax the uba has been known to mung these 21 * bytes. The next two bytes encapsulate packet type. 22 */ 23 struct dmc_header { 24 char dmc_buf[8]; /* space for uba on vax */ 25 short dmc_type; /* encapsulate packet type */ 26 }; 27 28 /* packet types */ 29 #define DMC_IPTYPE 1 30 #define DMC_TRAILER 2 31 #define DMC_NTRAILER 16 32 33 /* 34 * DMCMTU includes space for data (1024) + 35 * protocol header (256) + trailer descriptor (4). 36 * The software link encapsulation header (dmc_header) 37 * is handled separately. 38 */ 39 #define DMCMTU 1284 40 41 #define RDYSCAN 16 /* loop delay for RDYI after RQI */ 42 43 /* defines for bsel0 */ 44 #define DMC_BACCI 0 45 #define DMC_CNTLI 1 46 #define DMC_PERR 2 47 #define DMC_BASEI 3 48 #define DMC_WRITE 0 /* transmit block */ 49 #define DMC_READ 4 /* read block */ 50 #define DMC_RQI 0040 /* port request bit */ 51 #define DMC_IEI 0100 /* enable input interrupts */ 52 #define DMC_RDYI 0200 /* port ready */ 53 #define DMC0BITS "\10\8RDI\7IEI\6RQI" 54 55 /* defines for bsel1 */ 56 #define DMC_MCLR 0100 /* DMC11 Master Clear */ 57 #define DMC_RUN 0200 /* clock running */ 58 #define DMC1BITS "\10\8RUN\7MCLR" 59 60 /* defines for bsel2 */ 61 #define DMC_BACCO 0 62 #define DMC_CNTLO 1 63 #define DMC_OUX 0 /* transmit block */ 64 #define DMC_OUR 4 /* read block */ 65 #define DMC_IEO 0100 /* enable output interrupts */ 66 #define DMC_RDYO 0200 /* port available */ 67 #define DMC2BITS "\10\8RDO\7IEO" 68 69 /* defines for CNTLI mode */ 70 #define DMC_HDPLX 02000 /* half duplex DDCMP operation */ 71 #define DMC_SEC 04000 /* half duplex secondary station */ 72 #define DMC_MAINT 00400 /* enter maintenance mode */ 73 74 /* defines for BACCI/O and BASEI mode */ 75 #define DMC_XMEM 0140000 /* xmem bit position */ 76 #define DMC_CCOUNT 0037777 /* character count mask */ 77 #define DMC_RESUME 0002000 /* resume (BASEI only) */ 78 79 /* defines for CNTLO */ 80 #define DMC_CNTMASK 01777 81 82 #define DMC_DATACK 01 83 #define DMC_TIMEOUT 02 84 #define DMC_NOBUFS 04 85 #define DMC_MAINTREC 010 86 #define DMC_LOSTDATA 020 87 #define DMC_DISCONN 0100 88 #define DMC_START 0200 89 #define DMC_NEXMEM 0400 90 #define DMC_ERROR 01000 91 92 #define DMC_FATAL (DMC_ERROR|DMC_NEXMEM|DMC_START|DMC_LOSTDATA|DMC_MAINTREC) 93 #define CNTLO_BITS \ 94 "\10\12ERROR\11NEXMEM\10START\7DISC\5LSTDATA\4MAINT\3NOBUF\2TIMEO\1DATACK" 95