BSD 4_4 release
[unix-history] / usr / src / sys / vax / if / if_vv.h
index 98ab06e..41c3358 100644 (file)
@@ -1,9 +1,53 @@
-/*     if_vv.h 4.2     82/08/01        */
 /*
 /*
- * Local network header for V2LNI Ring
- * This is arbitrated by "V2LNI-PEOPLE@MIT-MC"
- * (aka Joel N. Chiappa)
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)if_vv.h     7.4 (Berkeley) 6/28/90
+ */
+
+/*
+ * ECO 176-748 changed the braodcast address from 0 to 0xff, at
+ * CTL (p1002) serial number around 150.
+ * It was implemented in August, 1982. This is a field-installable ECO,
+ * which improves net reliability. If the broadcast address has not been
+ * changed, comment out the following line.
  */
  */
+#define        NEW_BROADCAST           /* new chip for broadcast problem */
+
+/*
+ * Local network header for proNET Ring
+ * This is arbitrated by "jas@proteon"
+ * (aka John Shriver, 617-655-3340)
+ */
+
 struct vv_header {
         /* the first two fields are required by the hardware */
        u_char  vh_dhost;       /* destination address */
 struct vv_header {
         /* the first two fields are required by the hardware */
        u_char  vh_dhost;       /* destination address */
@@ -14,26 +58,35 @@ struct vv_header {
        short   vh_info;        /* protocol-specific information */
 };
 
        short   vh_info;        /* protocol-specific information */
 };
 
-#define        RING_VERSION    1       /* current version of v2lni header */
+#define        RING_VERSION    2       /* current version of v2lni header */
 
 /*
 
 /*
- * Packet types (protocol numbers) in v2lni header
- *
- * NOTE: the Trailer format stuff is lifted right out of
- * the other drivers.  It will be changed to take advantage
- * of the fields in the vv_header, but the packet throw-away
- * code must first be improved.
+ * Packet types (protocol numbers) in proNET protocol header
+ * Other types are defined, but are proprietary.
  */
 #define        RING_IP         1
  */
 #define        RING_IP         1
-#define        RING_IPTrailer  2
-#define        RING_IPNTrailer 16
-#define        RING_WHOAMI     0xa5    /* insure some bit transitions */
+#define        RING_TRAILER    2       /* offset now in vh_info only */
+#define RING_ARP       3
+#define RING_HDLC      4
+#define RING_VAXDB     5
+#define RING_RINGWAY   6
+#define RING_RINGWAYM  8
+#define        RING_NOVELL     10
+#define RING_PUP       12
+#define RING_XNS       14
+#define        RING_DIAGNOSTICS 15     /* protocol type for testing */
+#define        RING_ECHO       16
+#define RING_8022      23
 
 
-#define        VV_BROADCAST    0       /* hardware-defined broadcast address */
+#ifdef NEW_BROADCAST
+#define        VV_BROADCAST    0xff    /* hardware-defined broadcast address */
+#else
+#define        VV_BROADCAST    0x00    /* hardware-defined broadcast address */
+#endif
 
 /*
 
 /*
- * Proteon V2LNI Hardware definitions
- * register bit definitions - new style
+ * Proteon proNET Hardware definitions
+ * register bit definitions
  */
 #define        VV_ENB  01              /* Enable Operation */
 #define        VV_DEN  02              /* Enable DMA */
  */
 #define        VV_ENB  01              /* Enable Operation */
 #define        VV_DEN  02              /* Enable DMA */
@@ -50,16 +103,17 @@ struct vv_header {
 #define        VV_RFS  0400            /* Refused (Xmit) */
 #define        VV_NXM  01000           /* Non Existent Memory */
 #define        VV_OVR  02000           /* Overrun */
 #define        VV_RFS  0400            /* Refused (Xmit) */
 #define        VV_NXM  01000           /* Non Existent Memory */
 #define        VV_OVR  02000           /* Overrun */
-#define        VV_ODB  04000           /* Odd Byte (Achtung, mein Fuehrer) (Rcv) */
+#define        VV_ODB  04000           /* Odd Byte (Rcv) */
 #define        VV_UT2  04000           /* Unused (Xmit) */
 #define        VV_UT2  04000           /* Unused (Xmit) */
-#define        VV_LDE  010000          /* Link Data Error (Rcv) */
+#define        VV_LDE  010000          /* Parity on 10 megabit (Rcv), */
+                               /* Link Data Error on 80 megabit (Rcv) */
 #define        VV_OPT  010000          /* Output Timeout (Xmit) */
 #define        VV_NOK  020000          /* Ring Not OK */
 #define        VV_BDF  040000          /* Bad Format in Operation */
 #define        VV_NIR  0100000         /* Not in Ring */
 
 #define        VVXERR  (VV_NXM|VV_OVR|VV_OPT|VV_BDF)   /* Xmit errs */
 #define        VV_OPT  010000          /* Output Timeout (Xmit) */
 #define        VV_NOK  020000          /* Ring Not OK */
 #define        VV_BDF  040000          /* Bad Format in Operation */
 #define        VV_NIR  0100000         /* Not in Ring */
 
 #define        VVXERR  (VV_NXM|VV_OVR|VV_OPT|VV_BDF)   /* Xmit errs */
-#define        VVRERR  (VV_NXM|VV_OVR|VV_ODB|VV_BDF)   /* Rcv errs */
+#define        VVRERR  (VV_NXM|VV_OVR|VV_ODB|VV_BDF|VV_DPR)    /* Rcv errs */
 #define        VVFE    (VV_NXM|VV_OVR)                 /* Fatal errors */
 
 #define VV_IBITS \
 #define        VVFE    (VV_NXM|VV_OVR)                 /* Fatal errors */
 
 #define VV_IBITS \
@@ -80,4 +134,7 @@ struct vvreg {
        u_short vvoea;          /* output addr hi */
 };
 
        u_short vvoea;          /* output addr hi */
 };
 
-#define        VVRETRY 7
+#define        VVRETRY 7               /* output retry limit */
+#define VVIDENTSUCC 5          /* number of successes required in self-test */
+#define VVIDENTRETRY 10                /* identify loop attempt limit */
+#define VVTIMEOUT 60           /* seconds before a transmit timeout */