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