1*47674Scael.\" Copyright (c) 1983, 1991 The Regents of the University of California. 236756Sbostic.\" All rights reserved. 320716Smckusick.\" 443582Strent.\" %sccs.include.redist.man% 520716Smckusick.\" 6*47674Scael.\" @(#)en.4 6.5 (Berkeley) 03/27/91 736756Sbostic.\" 8*47674Scael.Dd 9*47674Scael.Dt EN 4 vax 10*47674Scael.Os BSD 4.2 11*47674Scael.Sh NAME 12*47674Scael.Nm en 13*47674Scael.Nd Xerox 3 Mb/s Ethernet interface 14*47674Scael.Sh SYNOPSIS 15*47674Scael.Cd "device en0 at uba0 csr 161000 vector enrint enxint encollide" 16*47674Scael.Sh DESCRIPTION 1720716SmckusickThe 18*47674Scael.Nm en 1920716Smckusickinterface provides access to a 3 Mb/s Ethernet network. 20*47674ScaelDue to limitations in the hardware, 21*47674Scael.Tn DMA 22*47674Scaeltransfers 2320716Smckusickto and from the network must take place in the lower 64K bytes 24*47674Scaelof the 25*47674Scael.Tn UNIBUS 26*47674Scaeladdress space, and thus this must be among the first 27*47674Scael.Tn UNIBUS 28*47674Scaeldevices enabled after boot. 29*47674Scael.Pp 3028251SkarelsEach of the host's network addresses 31*47674Scaelis specified at boot time with an 32*47674Scael.Dv SIOCSIFADDR 33*47674Scael.Xr ioctl 2 . 34*47674ScaelThe station address is discovered by probing the on-board Ethernet 3528251Skarelsaddress register, and is used to verify the protocol addresses. 3628251SkarelsNo packets will be sent or accepted until 3728251Skarelsa network address is supplied. 38*47674Scael.Pp 3920716SmckusickThe interface software implements an exponential backoff algorithm 4020716Smckusickwhen notified of a collision on the cable. This algorithm utilizes 41*47674Scaela 16-bit mask and the 42*47674Scael.Tn VAX-11 Ns 's 43*47674Scaelinterval timer in calculating a series 4420716Smckusickof random backoff values. The algorithm is as follows: 45*47674Scael.Pp 46*47674Scael.Bl -enum -offset indent 47*47674Scael.It 4820716SmckusickInitialize the mask to be all 1's. 49*47674Scael.It 5020716SmckusickIf the mask is zero, 16 retries have been made and we give 5120716Smckusickup. 52*47674Scael.It 5320716SmckusickShift the mask left one bit and formulate a backoff by 5420716Smckusickmasking the interval timer with the mask (this is actually 5520716Smckusickthe two's complement of the value). 56*47674Scael.It 5720716SmckusickUse the value calculated in step 3 to delay before retransmitting 5820716Smckusickthe packet. 59*47674Scael.El 60*47674Scael.Pp 61*47674ScaelThe interface handles both Internet and 62*47674Scael.Tn NS 63*47674Scaelprotocol families. 64*47674ScaelIt normally tries to use a 65*47674Scael.Dq trailer 66*47674Scaelencapsulation 6728251Skarelsto minimize copying data on input and output. 68*47674ScaelThe use of trailers is negotiated with 69*47674Scael.Tn ARP . 7028251SkarelsThis negotiation may be disabled, on a per-interface basis, 71*47674Scaelby setting the 72*47674Scael.Dv IFF_NOTRAILERS 73*47674Scaelflag with an 74*47674Scael.Dv SIOCSIFFLAGS 75*47674Scael.Xr ioctl . 76*47674Scael.Sh DIAGNOSTICS 77*47674Scael.Bl -diag 78*47674Scael.It en%d: output error. 7920716SmckusickThe hardware indicated an error on 8020716Smckusickthe previous transmission. 81*47674Scael.Pp 82*47674Scael.It en%d: send error. 8320716SmckusickAfter 16 retransmissions using the 8420716Smckusickexponential backoff algorithm described above, the packet 8520716Smckusickwas dropped. 86*47674Scael.Pp 87*47674Scael.It en%d: input error. 8820716SmckusickThe hardware indicated an error 8920716Smckusickin reading a packet off the cable. 90*47674Scael.Pp 91*47674Scael.It en%d: can't handle af%d. 9220716SmckusickThe interface was handed 9320716Smckusicka message with addresses formatted in an unsuitable address 9420716Smckusickfamily; the packet was dropped. 95*47674Scael.El 96*47674Scael.Sh SEE ALSO 97*47674Scael.Xr netintro 4 , 98*47674Scael.Xr inet 4 99*47674Scael.Sh HISTORY 100*47674ScaelThe 101*47674Scael.Nm 102*47674Scaeldriver appeared in 103*47674Scael.Bx 4.2 . 104*47674Scael.Sh BUGS 10520716SmckusickThe device has insufficient buffering to handle back to 10620716Smckusickback packets. This makes use in a production environment 10720716Smckusickpainful. 108*47674Scael.Pp 109*47674ScaelThe hardware does word at a time 110*47674Scael.Tn DMA 111*47674Scaelwithout byte swapping. 11220716SmckusickTo compensate, byte swapping of user data must either be done 11320716Smckusickby the user or by the system. A kludge to byte swap only 114*47674Scael.Tn IP 115*47674Scaelpackets is provided if the 116*47674Scael.Dv ENF_SWABIPS 117*47674Scaelflag is defined in 118*47674Scaelthe driver and set at boot time with an 119*47674Scael.Dv SIOCSIFFLAGS 120*47674Scael.Xr ioctl . 121