Annotation of Net2/arch/vax/if/if_vv.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1982, 1986 Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * Redistribution and use in source and binary forms, with or without
                      6:  * modification, are permitted provided that the following conditions
                      7:  * are met:
                      8:  * 1. Redistributions of source code must retain the above copyright
                      9:  *    notice, this list of conditions and the following disclaimer.
                     10:  * 2. Redistributions in binary form must reproduce the above copyright
                     11:  *    notice, this list of conditions and the following disclaimer in the
                     12:  *    documentation and/or other materials provided with the distribution.
                     13:  * 3. All advertising materials mentioning features or use of this software
                     14:  *    must display the following acknowledgement:
                     15:  *     This product includes software developed by the University of
                     16:  *     California, Berkeley and its contributors.
                     17:  * 4. Neither the name of the University nor the names of its contributors
                     18:  *    may be used to endorse or promote products derived from this software
                     19:  *    without specific prior written permission.
                     20:  *
                     21:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     22:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     23:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     24:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     25:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     26:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     27:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     28:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     29:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     30:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     31:  * SUCH DAMAGE.
                     32:  *
                     33:  *     @(#)if_vv.h     7.4 (Berkeley) 6/28/90
                     34:  */
                     35: 
                     36: /*
                     37:  * ECO 176-748 changed the braodcast address from 0 to 0xff, at
                     38:  * CTL (p1002) serial number around 150.
                     39:  * It was implemented in August, 1982. This is a field-installable ECO,
                     40:  * which improves net reliability. If the broadcast address has not been
                     41:  * changed, comment out the following line.
                     42:  */
                     43: #define        NEW_BROADCAST           /* new chip for broadcast problem */
                     44: 
                     45: /*
                     46:  * Local network header for proNET Ring
                     47:  * This is arbitrated by "jas@proteon"
                     48:  * (aka John Shriver, 617-655-3340)
                     49:  */
                     50: 
                     51: struct vv_header {
                     52:         /* the first two fields are required by the hardware */
                     53:        u_char  vh_dhost;       /* destination address */
                     54:        u_char  vh_shost;       /* source address */
                     55:        /* the next three fields are the local network header */
                     56:        u_char  vh_version;     /* header version */
                     57:        u_char  vh_type;        /* packet type => protocol number */
                     58:        short   vh_info;        /* protocol-specific information */
                     59: };
                     60: 
                     61: #define        RING_VERSION    2       /* current version of v2lni header */
                     62: 
                     63: /*
                     64:  * Packet types (protocol numbers) in proNET protocol header
                     65:  * Other types are defined, but are proprietary.
                     66:  */
                     67: #define        RING_IP         1
                     68: #define        RING_TRAILER    2       /* offset now in vh_info only */
                     69: #define RING_ARP       3
                     70: #define RING_HDLC      4
                     71: #define RING_VAXDB     5
                     72: #define RING_RINGWAY   6
                     73: #define RING_RINGWAYM  8
                     74: #define        RING_NOVELL     10
                     75: #define RING_PUP       12
                     76: #define RING_XNS       14
                     77: #define        RING_DIAGNOSTICS 15     /* protocol type for testing */
                     78: #define        RING_ECHO       16
                     79: #define RING_8022      23
                     80: 
                     81: #ifdef NEW_BROADCAST
                     82: #define        VV_BROADCAST    0xff    /* hardware-defined broadcast address */
                     83: #else
                     84: #define        VV_BROADCAST    0x00    /* hardware-defined broadcast address */
                     85: #endif
                     86: 
                     87: /*
                     88:  * Proteon proNET Hardware definitions
                     89:  * register bit definitions
                     90:  */
                     91: #define        VV_ENB  01              /* Enable Operation */
                     92: #define        VV_DEN  02              /* Enable DMA */
                     93: #define        VV_HEN  04              /* Host Relay Enable (Rcv) */
                     94: #define        VV_CPB  04              /* Clear Packet Buffer (Xmit) */
                     95: #define        VV_STE  010             /* Self Test Enable (Rcv) */
                     96: #define        VV_UT1  010             /* Unused (Xmit) */
                     97: #define        VV_LPB  020             /* Modem Disable (Rcv) */
                     98: #define        VV_INR  020             /* Initialize Ring (Xmit) */
                     99: #define        VV_RST  040             /* Reset */
                    100: #define        VV_IEN  0100            /* Interrupt Enable */
                    101: #define        VV_RDY  0200            /* Done */
                    102: #define        VV_DPR  0400            /* Data Present (Rcv) */
                    103: #define        VV_RFS  0400            /* Refused (Xmit) */
                    104: #define        VV_NXM  01000           /* Non Existent Memory */
                    105: #define        VV_OVR  02000           /* Overrun */
                    106: #define        VV_ODB  04000           /* Odd Byte (Rcv) */
                    107: #define        VV_UT2  04000           /* Unused (Xmit) */
                    108: #define        VV_LDE  010000          /* Parity on 10 megabit (Rcv), */
                    109:                                /* Link Data Error on 80 megabit (Rcv) */
                    110: #define        VV_OPT  010000          /* Output Timeout (Xmit) */
                    111: #define        VV_NOK  020000          /* Ring Not OK */
                    112: #define        VV_BDF  040000          /* Bad Format in Operation */
                    113: #define        VV_NIR  0100000         /* Not in Ring */
                    114: 
                    115: #define        VVXERR  (VV_NXM|VV_OVR|VV_OPT|VV_BDF)   /* Xmit errs */
                    116: #define        VVRERR  (VV_NXM|VV_OVR|VV_ODB|VV_BDF|VV_DPR)    /* Rcv errs */
                    117: #define        VVFE    (VV_NXM|VV_OVR)                 /* Fatal errors */
                    118: 
                    119: #define VV_IBITS \
                    120: "\10\20NIR\17BDF\16NOK\15LDE\14ODB\13OVR\12NXM\11DPR\10RDY\7IEN\6RST\5LPB\4STE\3HEN\2DEN\1ENB"
                    121: 
                    122: #define VV_OBITS \
                    123: "\10\20NIR\17BDF\16NOK\15OPT\13OVR\12NXM\11RFS\10RDY\7IEN\6RST\5INR\3HEN\2DEN\1ENB"
                    124: 
                    125: /* device registers */
                    126: struct vvreg {
                    127:        short   vvicsr;         /* input csr */
                    128:        u_short vviwc;          /* input word count */
                    129:        u_short vviba;          /* input addr lo */
                    130:        u_short vviea;          /* input addr hi */
                    131:        short   vvocsr;         /* output csr */
                    132:        u_short vvowc;          /* output word count */
                    133:        u_short vvoba;          /* output addr lo */
                    134:        u_short vvoea;          /* output addr hi */
                    135: };
                    136: 
                    137: #define        VVRETRY 7               /* output retry limit */
                    138: #define VVIDENTSUCC 5          /* number of successes required in self-test */
                    139: #define VVIDENTRETRY 10                /* identify loop attempt limit */
                    140: #define VVTIMEOUT 60           /* seconds before a transmit timeout */

unix.superglobalmegacorp.com

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