DIRECTORY PrincOps USING [zEXCH], PupStream USING [PupOpenMode, CloseReason], PupDefs USING [Pair, PupBuffer, PupSocket], BufferDefs USING [Queue], PupTypes USING [Pair, PupAddress, PupSocketID], Rope USING [ROPE]; PupPktOps: DEFINITIONS = BEGIN bytesPerPupHeader: CARDINAL = 22; bytesPerAck: CARDINAL = bytesPerPupHeader + 6; dataBytesPerRFC: CARDINAL = 6; byteAllocate: CARDINAL = 32000; -- lots and lots Pulses: TYPE = LONG CARDINAL; retransmitionsBeforeAbort: CARDINAL = probesBeforePanic + 3*60/5; -- about 3 min initialRetransmissions: CARDINAL = 2*retransmitionsBeforeAbort/3; -- 1 min pingRetransmissions: CARDINAL = retransmitionsBeforeAbort/3; -- 2 (more) min probesBeforePanic: CARDINAL = 10; maxRetransmitTime: CARDINAL = 5000; maxRetransmitPulses: Pulses; -- 5 sec minRetransmitPulses: Pulses; -- 100 ms initialRetransmitPulses: Pulses; -- 5 sec ctlRetransmitPulses: Pulses; -- 2 sec pingPulses: Pulses; -- 1 min duplicateWindow: CARDINAL = 10000; clumpsBeforeBump: CARDINAL = 10; Flip: PROCEDURE [PupDefs.Pair] RETURNS [LONG INTEGER] = MACHINE CODE BEGIN PrincOps.zEXCH; END; Flop: PROCEDURE [LONG INTEGER] RETURNS [PupDefs.Pair] = MACHINE CODE BEGIN PrincOps.zEXCH; END; Instance: TYPE = REF InstanceData; InstanceData: TYPE = MONITORED RECORD [ state: {idle, halfOpen, open, talking, finishing, end, closed}, c: PupDefs.PupBuffer, -- this is a kludge socket: PupDefs.PupSocket, dontWait: BOOLEAN, local: PupTypes.PupAddress, remote: PupTypes.PupAddress, mode: PupStream.PupOpenMode, dataBytesPerPup: CARDINAL, stateChange: CONDITION, inputReady: CONDITION, retransmitterReady: CONDITION, inputQueue: BufferDefs.Queue, sentQueue: BufferDefs.Queue, retransmitterFork: PROCESS, slurpFork: PROCESS, waitingForInterrupt: CONDITION, outIntSeq, inIntSeq, seenIntSeq: LONG INTEGER, outIntPending: BOOLEAN, outIntTime: Pulses, outEnd: CARDINAL, probeCounter: CARDINAL, ping: BOOLEAN, myMaxAllocate: CARDINAL, pathMaxAllocate: CARDINAL, hisMaxAllocate: CARDINAL, throttle: CARDINAL, unackedPups, allocatedPups: CARDINAL, clumpsSinceBump: CARDINAL, sentBuffer: PupDefs.PupBuffer, pleaseDie, sameNet, sendAck, aDataOut: BOOLEAN, timer: Pulses, retransmitPulses: Pulses, connectionID: PupDefs.Pair, nextInputID, nextOutputID, maxOutputID, ackedID: LONG INTEGER, allocationID, allocatedID: LONG INTEGER, whyClosed: PupStream.CloseReason, text: Rope.ROPE]; MakeLocal: PROCEDURE [ him: Instance, l: PupTypes.PupSocketID, r: PupTypes.PupAddress, m: PupStream.PupOpenMode, id: PupTypes.Pair]; DestroyLocalLocked: PROCEDURE [him: Instance]; Slurp: PROCEDURE [Instance]; Retransmitter: PROCEDURE [Instance]; GetSenderSizeLimit: PROCEDURE [Instance] RETURNS [CARDINAL]; GetLocalAddress: PROCEDURE [Instance] RETURNS [PupTypes.PupAddress]; GotOther: PROCEDURE [Instance, PupDefs.PupBuffer]; SmashClosed: PROCEDURE [Instance, PupStream.CloseReason]; SendRfc: PROCEDURE [Instance]; SendEnd: PROCEDURE [Instance]; SendInt: PROCEDURE [Instance]; SendAbort: PROCEDURE [Instance]; StreamDied: PROCEDURE [Instance, PupDefs.PupBuffer]; END. ΄PupPktOps.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. HGM February 10, 1981 6:39 PM Birrell June 22, 1983 4:57 pm halfOpen is when we have an unanswered RFC outstanding talking is like open except that we have unAcked packets out end is when we have an unanswered End outstanding finishing is when we get an end, but we have unAcked packets out mostly used by send side, but used for pinging if state=open ΚI˜codešœ™Kšœ Οmœ1™Kšœžœžœ˜(K˜!Kšœ žœ˜K˜—š  œž œ˜K˜?K˜-—Kš œž œ˜.K˜Kš œž œ ˜Kš  œž œ ˜$K˜Kš œž œ žœžœ˜