|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1988 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_dmv.h 7.4 (Berkeley) 6/28/90 ! 21: */ ! 22: ! 23: /* ! 24: * DMV-11 Driver ! 25: * ! 26: * Qbus Sync DDCMP interface - DMV operated in full duplex, point to point mode ! 27: * ! 28: * Written by Bob Kridle of Mt Xinu ! 29: * starting from if_dmc.h version 6.4 dated 6/8/85 ! 30: */ ! 31: ! 32: struct dmvdevice { ! 33: union { ! 34: u_char xbsel[2]; ! 35: u_short xwsel; ! 36: } xw0; ! 37: union { ! 38: u_char xbsel[2]; ! 39: u_short xwsel; ! 40: } xw1; ! 41: union { ! 42: u_char xbsel[2]; ! 43: u_short xwsel; ! 44: } xw2; ! 45: union { ! 46: u_char xbsel[2]; ! 47: u_short xwsel; ! 48: } xw3; ! 49: union { ! 50: u_char xbsel[2]; ! 51: u_short xwsel; ! 52: } xw4; ! 53: }; ! 54: ! 55: #define bsel0 xw0.xbsel[0] ! 56: #define bsel1 xw0.xbsel[1] ! 57: #define bsel2 xw1.xbsel[0] ! 58: #define bsel3 xw1.xbsel[1] ! 59: #define bsel4 xw2.xbsel[0] ! 60: #define bsel5 xw2.xbsel[1] ! 61: #define bsel6 xw3.xbsel[0] ! 62: #define bsel7 xw3.xbsel[1] ! 63: #define bsel10 xw4.xbsel[0] ! 64: #define bsel11 xw4.xbsel[1] ! 65: ! 66: #define wsel0 xw0.xwsel ! 67: #define wsel2 xw1.xwsel ! 68: #define wsel4 xw2.xwsel ! 69: #define wsel6 xw3.xwsel ! 70: #define wsel10 xw4.xwsel ! 71: ! 72: /* ! 73: * dmv software packet encapsulation. This allows the dmv ! 74: * link to be multiplexed among several protocols. ! 75: * The first eight bytes of the dmc header are garbage, ! 76: * since on a vax the uba has been known to mung these ! 77: * bytes. The next two bytes encapsulate packet type. ! 78: */ ! 79: struct dmv_header { ! 80: short dmv_type; /* encapsulate packet type */ ! 81: }; ! 82: ! 83: /* packet types */ ! 84: #define DMV_IPTYPE 1 ! 85: #define DMV_TRAILER 2 ! 86: #define DMV_NTRAILER 16 ! 87: ! 88: /* ! 89: * DMVMTU includes space for data (1024) + ! 90: * protocol header (256) + trailer descriptor (4). ! 91: * The software link encapsulation header (dmv_header) ! 92: * is handled separately. ! 93: */ ! 94: #define DMVMTU 1284 ! 95: ! 96: #define RDYSCAN 16 /* loop delay for RDYI after RQI */ ! 97: ! 98: /* defines for bsel0 */ ! 99: ! 100: #define DMV_IEI 0x01 /* interrupt enable, input */ ! 101: #define DMV_IEO 0x10 /* interrupt enable, output */ ! 102: #define DMV_RQI 0x80 /* request input */ ! 103: #define DMV0BITS "\10\8RQI\5IEO\1IEI" ! 104: ! 105: /* defines for bsel1 */ ! 106: ! 107: #define DMV_MCLR 0x40 /* master clear */ ! 108: #define DMV_RUN 0x80 /* run */ ! 109: #define DMV1BITS "\10\8RUN\7MCLR" ! 110: ! 111: /* defines for bsel2 */ ! 112: ! 113: #define DMV_CMD 0x07 /* command/response type field */ ! 114: ! 115: ! 116: /* input commands */ ! 117: ! 118: #define DMV_BACCR 0x00 /* buffer address, char. count - rec */ ! 119: #define DMV_BACCX 0x04 /* buffer address, char. count - xmit */ ! 120: #define DMV_MDEFI 0x02 /* mode definition input */ ! 121: #define DMV_CNTRLI 0x01 /* control input */ ! 122: ! 123: /* response identifiers */ ! 124: ! 125: #define DMV_CNTRLO 0x01 /* control output */ ! 126: #define DMV_MDEFO 0x02 /* information output */ ! 127: #define DMV_BDRUS 0x00 /* buffer definition - rec. used */ ! 128: #define DMV_BDRUNUS 0x03 /* buffer disposition - rec. unused */ ! 129: #define DMV_BDXSA 0x04 /* buffer dispostiion - sent & ack */ ! 130: #define DMV_BDXSN 0x06 /* buffer dispostiion - sent & not ack*/ ! 131: #define DMV_BDXNS 0x07 /* buffer dispostiion - not sent */ ! 132: ! 133: #define DMV_22BIT 0x08 /* buffer address in 22 bit format */ ! 134: #define DMV_RDI 0x10 /* ready for input */ ! 135: #define DMV_RDO 0x80 /* ready for output */ ! 136: #define DMV2BITS "\10\8RDO\5RDI" ! 137: ! 138: /* defines for CNTRLI mode */ ! 139: ! 140: #define DMV_RDTSS 0x20 /* read tributary status slot */ ! 141: #define DMV_RDCTSS 0x40 /* read/clear tributary status slot */ ! 142: #define DMV_WRTSS 0x80 /* write tributary status slot */ ! 143: #define DMV_TRIBN 0x1f /* tributary number */ ! 144: #define DMV_RQKEY 0x1f /* control command request key */ ! 145: #define DMV_ECBP 0x100 /* establish common buffer pool */ ! 146: ! 147: /* relevant command request keys */ ! 148: ! 149: #define DMV_NOP 0x00 /* no-op */ ! 150: #define DMV_ESTTRIB 0x01 /* establish tributary */ ! 151: #define DMV_REQSUS 0x03 /* request start up state */ ! 152: #define DMV_REQHS 0x05 /* request halt state */ ! 153: #define DMV_WMC 0x10 /* write modem control */ ! 154: #define DMV_RMC 0x11 /* read modem control */ ! 155: ! 156: /* some interesting CNTRLO codes ! 157: * ! 158: * use the manual if yours isn't here!! ! 159: */ ! 160: ! 161: #define DMV_RTE 0002 /* receive threshold error */ ! 162: #define DMV_TTE 0004 /* xmit threshold error */ ! 163: #define DMV_STE 0006 /* select threshold error */ ! 164: #define DMV_ORUN 0024 /* other end enters run state */ ! 165: #define DMV_NXM 0302 /* non-existant memory */ ! 166: #define DMV_MODD 0304 /* modem disconnected */ ! 167: #define DMV_QOVF 0306 /* response queue overflow */ ! 168: #define DMV_CXRL 0310 /* modem cxr lost */ ! 169: ! 170: #define DMV_EEC 0377 /* CNTRLO error code mask */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.