Annotation of 43BSDTahoe/sys/vaxif/if_dmv.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.