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