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