EthernetOneFace: CEDAR DEFINITIONS = { BYTE: TYPE = [0..100H); GetNextDevice: PROC [Handle] RETURNS [Handle]; GetHostNumber: PROC [Handle] RETURNS [host: BYTE]; AddCleanup: PROC [Handle]; TurnOn: PROC [handle: Handle, inInterrupt, outInterrupt: WORD]; TurnOff: PROC [handle: Handle]; HostArray: TYPE = PACKED ARRAY BYTE OF BOOL; SetInputHosts: PROC [handle: Handle, hosts: LONG POINTER TO HostArray]; SetOutputDelay: PROC [handle: Handle, microseconds: CARDINAL]; QueueOutput: PROC [handle: Handle, buffer: LONG POINTER, bytes: NAT, iocb: IOCB]; QueueInput: PROC [handle: Handle, buffer: LONG POINTER, bytes: NAT, iocb: IOCB]; MarkKilled: PROC [iocb: IOCB]; GetStatusAndLength: PROC [iocb: IOCB] RETURNS [status: Status, bytes: NAT]; GetStatusAndCollisions: PROC [iocb: IOCB] RETURNS [status: Status, collisions: NAT]; GetPacketsMissed: PROC [Handle] RETURNS [CARDINAL]; Handle: TYPE [2]; Status: TYPE = { pending, ok, overrun, -- Input data arrived when FIFO was full underrun, -- Output FIFO went empty before end of packet was set packetTooLong, -- Input packet didn't fit into buffer tooManyCollisions, -- More than 16 attempts to transmit the same packet crc, crcAndBadAlignment, badAlignmentButOkCrc, killedByDriver, otherError }; IOCB: TYPE = LONG POINTER TO ControlBlockRecord; ControlBlockRecord: TYPE; controlBlockSize: READONLY CARDINAL; nullHandle: READONLY Handle; hearSelf: READONLY BOOL; }. JEthernetOneFace.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. HGM on: September 5, 1980 12:41 AM) Andrew Birrell May 6, 1983 11:22 am Russ Atkinson (RRA) January 29, 1985 0:48:30 am PST Doug Wyatt, February 26, 1985 5:27:14 pm PST Hal Murray, February 4, 1986 11:04:40 pm PST Processor-independent interface for 3MB ethernet. Return handle of next device in physical order (starts and ends with nullHandle). Returns the host numbers from the switches (or Prom, or ...). Add the device cleanup procedure which is used to turn off an Ethernet controller around world swaps (see DeviceCleanup.mesa). Extra calls to AddCleanup are ignored. Turn on/off the device associated with this DeviceHandle. Calling TurnOn when the device is already on may forget any operations currently in progress. Extra calls to TurnOff are harmless. All IOCBs in progress are forgotten. NIL => revert to normal mode. TurnOn also sets normal mode. Specifies one or more host addresses to be recognized by the input microcode. This function is not a substitute for TurnOn[...], which must be called first to initialize the ethernet interface. Depending on how the microcode is written, up to one additional packet may be received before the hosts specified by inputHosts take effect. Note that receipt of broadcast packets will be disabled unless inputHosts[0] is TRUE. Other parameters required by the Ethernet interface must be specified in TurnOn[...] Normally, the microcode waits 1/2 ms before sending another packet to give Altos a chance to restart their hardware. This is critical when talking to an IFS. It is significant only if you are REALLY trying to go fast. Queue the buffer for transmit or receive. A (different) control block must be passed in with each call for the private use of the head. cb should be a pointer to a block of EtherNetFace.controlBlockSize words. It must be allocated within the first 64K and must be quad word aligned. The data buffer must be quad word aligned and less than 32K words long. When GetStatus[cb] returns anything other than pending, both the control block and the data buffer are available for reuse. Mark the status of this packet as killedByDriver. This is only valid IFF this packet is not on the either the input or output chain, for example, because TurnOff was recently called. Returns the status of the recv packet associated with this iocb. If status#pending, bytes is the number of bytes that arrived. See the comments on Status below. Returns the status of the transmit packet associated with this iocb. If status#pending, collisions is the number of collisions this packet encountered. See the comments on Status below. Returns the number of input packets missed because a buffer was not ready. Note: The error conditions are an open ended set to allow a smart driver to collect statistics. Thus new error conditions may be added to allow more sophisticated data collection, so a driver should not get upset if it encounters a strange error status that it does not understand. Dumb drivers should only check for pending or ok and consider everything else as an error. Κ˜codešœ™Kšœ Οmœ1™K™ΩK™—Kš Ÿ œžœžœžœ žœžœ˜Qš Ÿ œžœžœžœ žœžœ˜PKšœγ™γ——˜šŸ œžœžœ˜KšœEžœn™ΆK™—š Ÿœžœžœžœžœ˜KKšœ ™ —š Ÿœžœžœžœžœ˜TKšœΉ™Ή——˜šŸœžœ žœžœ˜3KšœJ™J—K˜Kšœžœ˜K˜šœžœ˜Kšœ˜Kšœ˜Kšœ Οc(˜2Kšœ  6˜AKšœ &˜6Kšœ 4˜HK˜K˜K˜K˜K˜ K˜Kšœφ™φ—K˜Kš žœžœžœžœžœ˜0Kšœžœ˜K˜Kšœžœžœ˜$K˜Kšœ žœ˜K˜Kšœ žœžœ˜—K™Kšœ˜K˜K˜K˜—…—–η