📄 if_vv.h
字号:
/* * 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 */ u_char vh_shost; /* source address */ /* the next three fields are the local network header */ u_char vh_version; /* header version */ u_char vh_type; /* packet type => protocol number */ short vh_info; /* protocol-specific information */};#define RING_VERSION 2 /* current version of v2lni header *//* * Packet types (protocol numbers) in proNET protocol header * Other types are defined, but are proprietary. */#define RING_IP 1#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#ifdef NEW_BROADCAST#define VV_BROADCAST 0xff /* hardware-defined broadcast address */#else#define VV_BROADCAST 0x00 /* hardware-defined broadcast address */#endif/* * Proteon proNET Hardware definitions * register bit definitions */#define VV_ENB 01 /* Enable Operation */#define VV_DEN 02 /* Enable DMA */#define VV_HEN 04 /* Host Relay Enable (Rcv) */#define VV_CPB 04 /* Clear Packet Buffer (Xmit) */#define VV_STE 010 /* Self Test Enable (Rcv) */#define VV_UT1 010 /* Unused (Xmit) */#define VV_LPB 020 /* Modem Disable (Rcv) */#define VV_INR 020 /* Initialize Ring (Xmit) */#define VV_RST 040 /* Reset */#define VV_IEN 0100 /* Interrupt Enable */#define VV_RDY 0200 /* Done */#define VV_DPR 0400 /* Data Present (Rcv) */#define VV_RFS 0400 /* Refused (Xmit) */#define VV_NXM 01000 /* Non Existent Memory */#define VV_OVR 02000 /* Overrun */#define VV_ODB 04000 /* Odd Byte (Rcv) */#define VV_UT2 04000 /* Unused (Xmit) */#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 VVRERR (VV_NXM|VV_OVR|VV_ODB|VV_BDF|VV_DPR) /* Rcv errs */#define VVFE (VV_NXM|VV_OVR) /* Fatal errors */#define VV_IBITS \"\10\20NIR\17BDF\16NOK\15LDE\14ODB\13OVR\12NXM\11DPR\10RDY\7IEN\6RST\5LPB\4STE\3HEN\2DEN\1ENB"#define VV_OBITS \"\10\20NIR\17BDF\16NOK\15OPT\13OVR\12NXM\11RFS\10RDY\7IEN\6RST\5INR\3HEN\2DEN\1ENB"/* device registers */struct vvreg { short vvicsr; /* input csr */ u_short vviwc; /* input word count */ u_short vviba; /* input addr lo */ u_short vviea; /* input addr hi */ short vvocsr; /* output csr */ u_short vvowc; /* output word count */ u_short vvoba; /* output addr lo */ u_short vvoea; /* output addr hi */};#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 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -