1 /* $NetBSD: if_dmcreg.h,v 1.1.24.4 2005/03/04 16:49:52 skrll Exp $ */
3 * Copyright (c) 1982, 1986 Regents of the University of California.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * @(#)if_dmc.h 7.5 (Berkeley) 6/28/90
56 * dmc software packet encapsulation. This allows the dmc
57 * link to be multiplexed among several protocols.
58 * The first eight bytes of the dmc header are garbage,
59 * since on a vax the uba has been known to mung these
60 * bytes. The next two bytes encapsulate packet type.
63 char dmc_buf
[8]; /* space for uba on vax */
64 short dmc_type
; /* encapsulate packet type */
70 #define DMC_NTRAILER 16
73 * DMCMTU includes space for data (1024) +
74 * protocol header (256) + trailer descriptor (4).
75 * The software link encapsulation header (dmc_header)
76 * is handled separately.
81 #define RDYSCAN 16 /* loop delay for RDYI after RQI */
83 /* defines for bsel0 */
88 #define DMC_WRITE 0 /* transmit block */
89 #define DMC_READ 4 /* read block */
90 #define DMC_RQI 0040 /* port request bit */
91 #define DMC_IEI 0100 /* enable input interrupts */
92 #define DMC_RDYI 0200 /* port ready */
93 #define DMC0BITS "\10\10RDI\7IEI\6RQI"
95 /* defines for bsel1 */
96 #define DMC_MCLR 0100 /* DMC11 Master Clear */
97 #define DMC_RUN 0200 /* clock running */
98 #define DMC1BITS "\10\10RUN\7MCLR"
100 /* defines for bsel2 */
103 #define DMC_OUX 0 /* transmit block */
104 #define DMC_OUR 4 /* read block */
105 #define DMC_IEO 0100 /* enable output interrupts */
106 #define DMC_RDYO 0200 /* port available */
107 #define DMC2BITS "\10\10RDO\7IEO"
109 /* defines for CNTLI mode */
110 #define DMC_HDPLX 02000 /* half duplex DDCMP operation */
111 #define DMC_SEC 04000 /* half duplex secondary station */
112 #define DMC_MAINT 00400 /* enter maintenance mode */
114 /* defines for BACCI/O and BASEI mode */
115 #define DMC_XMEM 0140000 /* xmem bit position */
116 #define DMC_CCOUNT 0037777 /* character count mask */
117 #define DMC_RESUME 0002000 /* resume (BASEI only) */
119 /* defines for CNTLO */
120 #define DMC_CNTMASK 01777
122 #define DMC_DATACK 01
123 #define DMC_TIMEOUT 02
124 #define DMC_NOBUFS 04
125 #define DMC_MAINTREC 010
126 #define DMC_LOSTDATA 020
127 #define DMC_DISCONN 0100
128 #define DMC_START 0200
129 #define DMC_NEXMEM 0400
130 #define DMC_ERROR 01000
132 #define DMC_FATAL (DMC_ERROR|DMC_NEXMEM|DMC_START|DMC_LOSTDATA|DMC_MAINTREC)
134 "\10\12ERROR\11NEXMEM\10START\7DISC\5LSTDATA\4MAINT\3NOBUF\2TIMEO\1DATACK"