1.\" $NetBSD: en.4,v 1.14 2017/08/01 11:11:17 wiz 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. 69This algorithm uses a 16-bit mask and the 70.Tn VAX-11 Ns 's 71interval timer in calculating a series 72of random backoff values. 73The algorithm is as follows: 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 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 2 . 103.Sh DIAGNOSTICS 104.Bl -diag 105.It en%d: output error. 106The hardware indicated an error on 107the previous transmission. 108.It en%d: send error. 109After 16 retransmissions using the 110exponential backoff algorithm described above, the packet 111was dropped. 112.It en%d: input error. 113The hardware indicated an error 114in reading a packet off the cable. 115.It en%d: can't handle af%d. 116The interface was handed 117a message with addresses formatted in an unsuitable address 118family; the packet was dropped. 119.El 120.Sh SEE ALSO 121.Xr inet 4 , 122.Xr netintro 4 123.Sh HISTORY 124The 125.Nm 126driver appeared in 127.Bx 4.2 . 128.Sh BUGS 129The device has insufficient buffering to handle back to 130back packets. 131This makes use in a production environment painful. 132.Pp 133The hardware does word at a time 134.Tn DMA 135without byte swapping. 136To compensate, byte swapping of user data must either be done 137by the user or by the system. 138A kludge to byte swap only 139.Tn IP 140packets is provided if the 141.Dv ENF_SWABIPS 142flag is defined in 143the driver and set at boot time with an 144.Dv SIOCSIFFLAGS 145.Xr ioctl 2 . 146