ETHER(4)
NAME
ether − standard 10Mbps Ethernet network interface device driver (type eth)
SYNOPSIS
#include <deqna.h>
#include <ether.h>
read(device buffer, length)
write(device, buffer, length)
init(device)
DESCRIPTION
The eth device driver provides input and output for a 10 Mbps Ethernet local area network. The standard Xinu device name for Ethernet devices is ETHER.
Implemented on a Digital Equipment Corporation DEQNA (Digital Equipment Q-Bus Network Adapter), the eth driver handles DMA input and output at the physical network level, transmitting complete frames between user processes and the device.
The driver honors the following operations:
read(device buffer, length)
Reads one frame into buffer, copying no more than length characters. It returns the length of the frame read; the count includes the 14-octet header.
write(device, buffer, length)
Writes a frame of length characters found in buffer. It returns OK if the frame was acceptable, SYSERR otherwise. It it important to note that buffer must specify the address of a valid buffer allocated from GETBUF(2), and that the driver does not copy the contents of the buffer. The call to write will return once output has been started, but the buffer will be in use until the device finishes. The driver calls FREEBUF(2) to dispose of the buffer once the device finishes using it.
init(device)
Initializes the device and driver, including DEQNA setup packet processing. The driver sets the device to accept only those packets addressed directly to the devices’ physical address and broadcast packets (all 1’s address).
NOTES
Although the DEQNA supports chaining back-to-back operations on both input and output, the driver forces a context switch and a new call from READ(2) or WRITE(2) to restart I/O, and depends on the hardware to buffer packets from the Ethernet.
December 01, 1986 — Xinu Programmer’s Manual