|
|
1.1 root 1: /*
2: * Copyright (c) 1982, 1986 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_vv.h 7.4 (Berkeley) 6/28/90
21: */
22:
23: /*
24: * ECO 176-748 changed the braodcast address from 0 to 0xff, at
25: * CTL (p1002) serial number around 150.
26: * It was implemented in August, 1982. This is a field-installable ECO,
27: * which improves net reliability. If the broadcast address has not been
28: * changed, comment out the following line.
29: */
30: #define NEW_BROADCAST /* new chip for broadcast problem */
31:
32: /*
33: * Local network header for proNET Ring
34: * This is arbitrated by "jas@proteon"
35: * (aka John Shriver, 617-655-3340)
36: */
37:
38: struct vv_header {
39: /* the first two fields are required by the hardware */
40: u_char vh_dhost; /* destination address */
41: u_char vh_shost; /* source address */
42: /* the next three fields are the local network header */
43: u_char vh_version; /* header version */
44: u_char vh_type; /* packet type => protocol number */
45: short vh_info; /* protocol-specific information */
46: };
47:
48: #define RING_VERSION 2 /* current version of v2lni header */
49:
50: /*
51: * Packet types (protocol numbers) in proNET protocol header
52: * Other types are defined, but are proprietary.
53: */
54: #define RING_IP 1
55: #define RING_TRAILER 2 /* offset now in vh_info only */
56: #define RING_ARP 3
57: #define RING_HDLC 4
58: #define RING_VAXDB 5
59: #define RING_RINGWAY 6
60: #define RING_RINGWAYM 8
61: #define RING_NOVELL 10
62: #define RING_PUP 12
63: #define RING_XNS 14
64: #define RING_DIAGNOSTICS 15 /* protocol type for testing */
65: #define RING_ECHO 16
66: #define RING_8022 23
67:
68: #ifdef NEW_BROADCAST
69: #define VV_BROADCAST 0xff /* hardware-defined broadcast address */
70: #else
71: #define VV_BROADCAST 0x00 /* hardware-defined broadcast address */
72: #endif
73:
74: /*
75: * Proteon proNET Hardware definitions
76: * register bit definitions
77: */
78: #define VV_ENB 01 /* Enable Operation */
79: #define VV_DEN 02 /* Enable DMA */
80: #define VV_HEN 04 /* Host Relay Enable (Rcv) */
81: #define VV_CPB 04 /* Clear Packet Buffer (Xmit) */
82: #define VV_STE 010 /* Self Test Enable (Rcv) */
83: #define VV_UT1 010 /* Unused (Xmit) */
84: #define VV_LPB 020 /* Modem Disable (Rcv) */
85: #define VV_INR 020 /* Initialize Ring (Xmit) */
86: #define VV_RST 040 /* Reset */
87: #define VV_IEN 0100 /* Interrupt Enable */
88: #define VV_RDY 0200 /* Done */
89: #define VV_DPR 0400 /* Data Present (Rcv) */
90: #define VV_RFS 0400 /* Refused (Xmit) */
91: #define VV_NXM 01000 /* Non Existent Memory */
92: #define VV_OVR 02000 /* Overrun */
93: #define VV_ODB 04000 /* Odd Byte (Rcv) */
94: #define VV_UT2 04000 /* Unused (Xmit) */
95: #define VV_LDE 010000 /* Parity on 10 megabit (Rcv), */
96: /* Link Data Error on 80 megabit (Rcv) */
97: #define VV_OPT 010000 /* Output Timeout (Xmit) */
98: #define VV_NOK 020000 /* Ring Not OK */
99: #define VV_BDF 040000 /* Bad Format in Operation */
100: #define VV_NIR 0100000 /* Not in Ring */
101:
102: #define VVXERR (VV_NXM|VV_OVR|VV_OPT|VV_BDF) /* Xmit errs */
103: #define VVRERR (VV_NXM|VV_OVR|VV_ODB|VV_BDF|VV_DPR) /* Rcv errs */
104: #define VVFE (VV_NXM|VV_OVR) /* Fatal errors */
105:
106: #define VV_IBITS \
107: "\10\20NIR\17BDF\16NOK\15LDE\14ODB\13OVR\12NXM\11DPR\10RDY\7IEN\6RST\5LPB\4STE\3HEN\2DEN\1ENB"
108:
109: #define VV_OBITS \
110: "\10\20NIR\17BDF\16NOK\15OPT\13OVR\12NXM\11RFS\10RDY\7IEN\6RST\5INR\3HEN\2DEN\1ENB"
111:
112: /* device registers */
113: struct vvreg {
114: short vvicsr; /* input csr */
115: u_short vviwc; /* input word count */
116: u_short vviba; /* input addr lo */
117: u_short vviea; /* input addr hi */
118: short vvocsr; /* output csr */
119: u_short vvowc; /* output word count */
120: u_short vvoba; /* output addr lo */
121: u_short vvoea; /* output addr hi */
122: };
123:
124: #define VVRETRY 7 /* output retry limit */
125: #define VVIDENTSUCC 5 /* number of successes required in self-test */
126: #define VVIDENTRETRY 10 /* identify loop attempt limit */
127: #define VVTIMEOUT 60 /* seconds before a transmit timeout */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.