EtherTesterOps.mesa
last edited by Willie-Sue, January 9, 1986 1:51:45 pm PST
lifted from EtherTesterDefs.mesa, AOF, 26-Sep-83 16:19:51
DIRECTORY
NewEthernetFaceExtras USING [ModeFor10MBEther],
IO USING [STREAM],
NSPilotSystem USING [HostNumber],
NSTypes USING [BufferBody],
Rope USING [ROPE];
EtherTesterOps: DEFINITIONS =
BEGIN
For EtherTesterControlImpl
Pattern: TYPE = {
ignore, zeros, ones, alternating, pairs, oneTwentyFive, countBytes,
countWords, lenOne, lenSix};
StatsType: TYPE = {sent, coll, errOut, recv, noIn, noOut, errIn, echoed, late, lost, dally, idle};
tsOut: IO.STREAM;
counter: ARRAY [0..8) OF INT;
Global Flags and Variables Set Through Viewer
pattern: Pattern;
numberOfRecvBuffers: CARDINAL;
numberOfSendBuffers: CARDINAL;
recvSize, sendSize: CARDINAL;
ticksBeforeSend: CARDINAL;
promiscuous, broadcasting: BOOLEAN;
check, flipem, doChecksum, doStats: BOOLEAN;
bumpPacketNumber, dallyIfBehind, dallyBeforeOutput: BOOLEAN;
showRunts, showGarbage: BOOLEAN;
showStrangeStatus, showWrongLength: BOOLEAN;
showWrongData, showOnlyBadAlign: BOOLEAN;
me, source, dest: NSPilotSystem.HostNumber;
Procedures
UpdateNumbers: PROC;
ShowPacket: PROC [why: Rope.ROPE, this: Buffer];
EtherTesterMainImpl
StartTest: PUBLIC PROC [test: TestMode, board: CARDINAL] RETURNS [status: BOOLEAN];
StopTheWorld: PROC;
DontBeAHog: PROC RETURNS [stop: BOOLEAN];
InitializeCSBs: PROC;
CleanThingsUp: PROC;
activeProcesses: CARDINAL;
Buffer: TYPE = LONG POINTER TO BufferBody;
BufferBody: TYPE = MACHINE DEPENDENT RECORD [
iocb(0): LONG POINTER,
next(2): Buffer,
length(4): CARDINAL,
idle(5): BOOLEAN,
endPlusOne(6): LONG POINTER TO CARDINAL,
alignment(8): ARRAY [0..3) OF WORD,
header(11): Header, -- Watch the alignment!!!
header must be one word before a quadword boundary (i.e. -1 mod 4)
body(18): echo NSTypes.BufferBody]; -- body.echoWords[0] is used as a sequence number
Header: TYPE = RECORD [
dest: NSPilotSystem.HostNumber, source: NSPilotSystem.HostNumber, packetType: WORD];
TestMode: TYPE = {SendOnly, ReceiveOnly, SendAndReceive, EchoServer, EchoUser};
HWTestMode: TYPE = NewEthernetFaceExtras.ModeFor10MBEther;
hwMode: HWTestMode;
EtherTesterStatsImpl
Stats: TYPE = RECORD [
pktsOut, wdsOut: LONG CARDINAL,
collisions, coll1, coll2, coll3, coll4, coll5, coll6, coll7, coll8, coll9,
 coll10, coll11, coll12, coll13, coll14, coll15, collx: LONG CARDINAL,
loadOverflow: LONG CARDINAL,
lateCollisions, errsOut, funnyOut: LONG CARDINAL,
overrunOut: LONG CARDINAL,
pktsIn, wdsIn: LONG CARDINAL,
wrongLength, wrongPackets, wrongWords: LONG CARDINAL,
missed: LONG CARDINAL,
errsIn, funnyIn, shortIn, longIn: LONG CARDINAL,
shortBuffer, itIn, crcIn, crcItIn, overrunIn: LONG CARDINAL,
bc, bcWords, toMe, toOther, fromMe: LONG CARDINAL,
packetsEchoed, packetsNotEchoed, lateEchos, packetsTooLongToEcho, echosMissed,
dallyForEcho: LONG CARDINAL,
runts, runtsMarkedOk, multicastRunts: LONG CARDINAL];
stats: Stats;
realBackground: LONG CARDINAL;
StatsInit: PROC;
StatsPrint: PROC [partial: BOOLEAN];
StatsPeek: PROC;
In EtherTesterStorageImpl
AllocateOneBuffer: PROC [size: CARDINAL] RETURNS [b: LONG POINTER];
FreeOneBuffer: PROC [b: LONG POINTER];
AllocateOneIOCB: PROCEDURE RETURNS [iocb: LONG POINTER];
FreeOneIOCB: PROCEDURE [iocb: LONG POINTER];
END.