1.\" Copyright (c) 1983, 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)en.4 6.5 (Berkeley) 3/27/91 33.\" $Id: en.4,v 1.2 1993/08/01 07:36:23 mycroft Exp $ 34.\" 35.Dd March 27, 1991 36.Dt EN 4 vax 37.Os BSD 4.2 38.Sh NAME 39.Nm en 40.Nd Xerox 3 Mb/s Ethernet interface 41.Sh SYNOPSIS 42.Cd "device en0 at uba0 csr 161000 vector enrint enxint encollide" 43.Sh DESCRIPTION 44The 45.Nm en 46interface provides access to a 3 Mb/s Ethernet network. 47Due to limitations in the hardware, 48.Tn DMA 49transfers 50to and from the network must take place in the lower 64K bytes 51of the 52.Tn UNIBUS 53address space, and thus this must be among the first 54.Tn UNIBUS 55devices enabled after boot. 56.Pp 57Each of the host's network addresses 58is specified at boot time with an 59.Dv SIOCSIFADDR 60.Xr ioctl 2 . 61The station address is discovered by probing the on-board Ethernet 62address register, and is used to verify the protocol addresses. 63No packets will be sent or accepted until 64a network address is supplied. 65.Pp 66The interface software implements an exponential backoff algorithm 67when notified of a collision on the cable. This algorithm utilizes 68a 16-bit mask and the 69.Tn VAX-11 Ns 's 70interval timer in calculating a series 71of random backoff values. The algorithm is as follows: 72.Pp 73.Bl -enum -offset indent 74.It 75Initialize the mask to be all 1's. 76.It 77If the mask is zero, 16 retries have been made and we give 78up. 79.It 80Shift the mask left one bit and formulate a backoff by 81masking the interval timer with the mask (this is actually 82the two's complement of the value). 83.It 84Use the value calculated in step 3 to delay before retransmitting 85the packet. 86.El 87.Pp 88The interface handles both Internet and 89.Tn NS 90protocol families. 91It normally tries to use a 92.Dq trailer 93encapsulation 94to minimize copying data on input and output. 95The use of trailers is negotiated with 96.Tn ARP . 97This negotiation may be disabled, on a per-interface basis, 98by setting the 99.Dv IFF_NOTRAILERS 100flag with an 101.Dv SIOCSIFFLAGS 102.Xr ioctl . 103.Sh DIAGNOSTICS 104.Bl -diag 105.It en%d: output error. 106The hardware indicated an error on 107the previous transmission. 108.Pp 109.It en%d: send error. 110After 16 retransmissions using the 111exponential backoff algorithm described above, the packet 112was dropped. 113.Pp 114.It en%d: input error. 115The hardware indicated an error 116in reading a packet off the cable. 117.Pp 118.It en%d: can't handle af%d. 119The interface was handed 120a message with addresses formatted in an unsuitable address 121family; the packet was dropped. 122.El 123.Sh SEE ALSO 124.Xr netintro 4 , 125.Xr inet 4 126.Sh HISTORY 127The 128.Nm 129driver appeared in 130.Bx 4.2 . 131.Sh BUGS 132The device has insufficient buffering to handle back to 133back packets. This makes use in a production environment 134painful. 135.Pp 136The hardware does word at a time 137.Tn DMA 138without byte swapping. 139To compensate, byte swapping of user data must either be done 140by the user or by the system. A kludge to byte swap only 141.Tn IP 142packets is provided if the 143.Dv ENF_SWABIPS 144flag is defined in 145the driver and set at boot time with an 146.Dv SIOCSIFFLAGS 147.Xr ioctl . 148