1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)ec.4 8.1 (Berkeley) 06/05/93 7.\" 8.Dd 9.Dt EC 4 vax 10.Os BSD 4.2 11.Sh NAME 12.Nm ec 13.Nd 3Com 10 Mb/s Ethernet interface 14.Sh SYNOPSIS 15.Cd "device ec0 at uba0 csr 161000 vector ecrint eccollide ecxint flags 0" 16.Sh DESCRIPTION 17The 18.Nm ec 19interface provides access to a 10 Mb/s Ethernet network through 20a 3com controller. 21.Pp 22The hardware has 32 kilobytes of dual-ported memory on the 23.Tn UNIBUS . 24This memory 25is used for internal buffering by the board, and the interface code reads 26the buffer contents directly through the 27.Tn UNIBUS . 28The address of this memory is given in the 29.Ar flags 30field 31in the configuration file. 32The first interface normally has its memory at Unibus address 0. 33.Pp 34Each of the host's network addresses 35is specified at boot time with an 36.Dv SIOCSIFADDR 37.Xr ioctl 2 . 38The 39.Nm ec 40interface employs the address resolution protocol described in 41.Xr arp 4 42to dynamically map between Internet and Ethernet addresses on the local 43network. 44.Pp 45The interface normally tries to use a 46.Dq trailer 47encapsulation 48to minimize copying data on input and output. 49The use of trailers is negotiated with 50.Tn ARP . 51This negotiation may be disabled, on a per-interface basis, 52by setting the 53.Dv IFF_NOTRAILERS 54flag with an 55.Dv SIOCSIFFLAGS 56.Xr ioctl . 57.Pp 58The interface software implements an exponential backoff algorithm 59when notified of a collision on the cable. This algorithm utilizes 60a 16-bit mask and the 61.Tn VAX-11 Ns 's 62interval timer in calculating a series 63of random backoff values. The algorithm is as follows: 64.Bl -enum -offset indent 65.It 66Initialize the mask to be all 1's. 67.It 68If the mask is zero, 16 retries have been made and we give 69up. 70.It 71Shift the mask left one bit and formulate a backoff by 72masking the interval timer with the smaller of the complement of this mask 73and a 5-bit mask, resulting in a pseudo-random number between 0 and 31. 74This produces the number of slot times to delay, 75where a slot is 51 microseconds. 76.It 77Use the value calculated in step 3 to delay before retransmitting 78the packet. 79The delay is done in a software busy loop. 80.El 81.Sh DIAGNOSTICS 82.Bl -diag 83.It ec%d: send error. 84After 16 retransmissions using the 85exponential backoff algorithm described above, the packet 86was dropped. 87.Pp 88.It ec%d: input error (offset=%d). 89The hardware indicated an error 90in reading a packet off the cable or an illegally sized packet. 91The buffer offset value is printed for debugging purposes. 92.Pp 93.It ec%d: can't handle af%d. 94The interface was handed 95a message with addresses formatted in an unsuitable address 96family; the packet was dropped. 97.El 98.Sh SEE ALSO 99.Xr netintro 4 , 100.Xr inet 4 , 101.Xr arp 4 102.Sh HISTORY 103The 104.Nm 105driver appeared in 106.Bx 4.2 . 107.Sh BUGS 108The hardware is not capable of talking to itself. The software 109implements local sending and broadcast by sending such packets to the 110loop interface. This is a kludge. 111.Pp 112Backoff delays are done in a software busy loop. This can degrade the 113system if the network experiences frequent collisions. 114