|
|
1.1 root 1: /*
2: * Copyright (c) 1982, 1986 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution is only permitted until one year after the first shipment
6: * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and
7: * binary forms are permitted provided that: (1) source distributions retain
8: * this entire copyright notice and comment, and (2) distributions including
9: * binaries display the following acknowledgement: This product includes
10: * software developed by the University of California, Berkeley and its
11: * contributors'' in the documentation or other materials provided with the
12: * distribution and in all advertising materials mentioning features or use
13: * of this software. Neither the name of the University nor the names of
14: * its contributors may be used to endorse or promote products derived from
15: * this software without specific prior written permission.
16: * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19: *
20: * @(#)if_dmc.h 7.5 (Berkeley) 6/28/90
21: */
22:
23: /*
24: * DMC-11 Interface
25: */
26:
27: struct dmcdevice {
28: char bsel0;
29: char bsel1;
30: char bsel2;
31: char bsel3;
32: short sel4;
33: short sel6;
34: };
35:
36: /*
37: * dmc software packet encapsulation. This allows the dmc
38: * link to be multiplexed among several protocols.
39: * The first eight bytes of the dmc header are garbage,
40: * since on a vax the uba has been known to mung these
41: * bytes. The next two bytes encapsulate packet type.
42: */
43: struct dmc_header {
44: char dmc_buf[8]; /* space for uba on vax */
45: short dmc_type; /* encapsulate packet type */
46: };
47:
48: /* packet types */
49: #define DMC_IPTYPE 1
50: #define DMC_TRAILER 2
51: #define DMC_NTRAILER 16
52:
53: /*
54: * DMCMTU includes space for data (1024) +
55: * protocol header (256) + trailer descriptor (4).
56: * The software link encapsulation header (dmc_header)
57: * is handled separately.
58: #define DMCMTU 1284
59: */
60: #define DMCMTU 1500
61:
62: #define RDYSCAN 16 /* loop delay for RDYI after RQI */
63:
64: /* defines for bsel0 */
65: #define DMC_BACCI 0
66: #define DMC_CNTLI 1
67: #define DMC_PERR 2
68: #define DMC_BASEI 3
69: #define DMC_WRITE 0 /* transmit block */
70: #define DMC_READ 4 /* read block */
71: #define DMC_RQI 0040 /* port request bit */
72: #define DMC_IEI 0100 /* enable input interrupts */
73: #define DMC_RDYI 0200 /* port ready */
74: #define DMC0BITS "\10\10RDI\7IEI\6RQI"
75:
76: /* defines for bsel1 */
77: #define DMC_MCLR 0100 /* DMC11 Master Clear */
78: #define DMC_RUN 0200 /* clock running */
79: #define DMC1BITS "\10\10RUN\7MCLR"
80:
81: /* defines for bsel2 */
82: #define DMC_BACCO 0
83: #define DMC_CNTLO 1
84: #define DMC_OUX 0 /* transmit block */
85: #define DMC_OUR 4 /* read block */
86: #define DMC_IEO 0100 /* enable output interrupts */
87: #define DMC_RDYO 0200 /* port available */
88: #define DMC2BITS "\10\10RDO\7IEO"
89:
90: /* defines for CNTLI mode */
91: #define DMC_HDPLX 02000 /* half duplex DDCMP operation */
92: #define DMC_SEC 04000 /* half duplex secondary station */
93: #define DMC_MAINT 00400 /* enter maintenance mode */
94:
95: /* defines for BACCI/O and BASEI mode */
96: #define DMC_XMEM 0140000 /* xmem bit position */
97: #define DMC_CCOUNT 0037777 /* character count mask */
98: #define DMC_RESUME 0002000 /* resume (BASEI only) */
99:
100: /* defines for CNTLO */
101: #define DMC_CNTMASK 01777
102:
103: #define DMC_DATACK 01
104: #define DMC_TIMEOUT 02
105: #define DMC_NOBUFS 04
106: #define DMC_MAINTREC 010
107: #define DMC_LOSTDATA 020
108: #define DMC_DISCONN 0100
109: #define DMC_START 0200
110: #define DMC_NEXMEM 0400
111: #define DMC_ERROR 01000
112:
113: #define DMC_FATAL (DMC_ERROR|DMC_NEXMEM|DMC_START|DMC_LOSTDATA|DMC_MAINTREC)
114: #define CNTLO_BITS \
115: "\10\12ERROR\11NEXMEM\10START\7DISC\5LSTDATA\4MAINT\3NOBUF\2TIMEO\1DATACK"
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.