-- File: AltoPRStats.mesa, Last Edit: HGM October 21, 1980 5:56 AM DIRECTORY AltoPRDefs, StatsDefs USING [StatGetCounter], DriverDefs USING [Network], PupDefs USING [PupBuffer]; AltoPRStats: PROGRAM IMPORTS StatsDefs, AltoPRDefs EXPORTS DriverDefs = BEGIN OPEN AltoPRDefs, StatsDefs; PacketRadioStats: PUBLIC PROCEDURE [ b: PupDefs.PupBuffer, network: DriverDefs.Network] RETURNS [BOOLEAN] = BEGIN myVars: LONG POINTER TO PRDriverVars _ network.stats; prse: LONG POINTER TO PRStatsEntry _ LOOPHOLE[@b.pupWords[1]]; pia: LONG POINTER TO PRAliveTable _ LOOPHOLE[@prse.hostsUp]; b.pupWords[0] _ prStatsReply; prse^ _ [version: prVersion, packetsReceived: StatsDefs.StatGetCounter[statPRPacketsReceived], imAliveReceived: StatsDefs.StatGetCounter[statPRImAliveReceived], oneFragPupRcvd: StatsDefs.StatGetCounter[statPROneFragRcvd], twoFragPupRcvd: StatsDefs.StatGetCounter[statPRTwoFragsRcvd], threeFragPupRcvd: StatsDefs.StatGetCounter[statPRThreeFragsRcvd], wordsReceived: StatsDefs.StatGetCounter[statPRWordsReceived], packetsSent: StatsDefs.StatGetCounter[statPRPacketsSent], imAliveSent: StatsDefs.StatGetCounter[statPRImAliveSent], oneFragPupSent: StatsDefs.StatGetCounter[statPROneFragSent], twoFragPupSent: StatsDefs.StatGetCounter[statPRTwoFragsSent], threeFragPupSent: StatsDefs.StatGetCounter[statPRThreeFragsSent], wordsSent: StatsDefs.StatGetCounter[statPRWordsSent], topsSent: StatsDefs.StatGetCounter[statPRTOPsSent], assemblyTimeout: StatsDefs.StatGetCounter[statPRAssemblyTimeout], assemblyOverflow: StatsDefs.StatGetCounter[statPRAssemblyQOvf], destinationDown: StatsDefs.StatGetCounter[statPRDestinationDown], inputFilter: StatsDefs.StatGetCounter[statPRInputBufferOvf] + StatsDefs.StatGetCounter[ statPRBadMagic] + StatsDefs.StatGetCounter[statPRNotForMe] + StatsDefs.StatGetCounter[statPRTooManyFragments] + StatsDefs.StatGetCounter[statPRTotalTooBig], oldPackets: StatsDefs.StatGetCounter[statPROldPackets], skippedPackets: StatsDefs.StatGetCounter[statPRPacketsSkipped], sequencerResets: StatsDefs.StatGetCounter[statPRSequenceReset], outputPacketsDiscarded: StatsDefs.StatGetCounter[statPRLengthOvf] + StatsDefs.StatGetCounter[ statPRInvalidAddress] + StatsDefs.StatGetCounter[statPRDestinationDown] + StatsDefs.StatGetCounter[statPROutputQOvf] + StatsDefs.StatGetCounter[ statPRConnectionLimit] + StatsDefs.StatGetCounter[ statPROutPacketsDiscarded], transferTimeout: StatsDefs.StatGetCounter[statPRTransferTimeout], maxHosts: maxPRPupAddress, hostsUp:]; pia^ _ myVars.youAreOK; b.pupLength _ 22 + 2*(1 + SIZE[PRStatsEntry] + maxPRPupAddress); RETURN[TRUE]; END; -- initialization END. -- AltoPRStats