-- File: PupPktPrivateDefs.mesa, Last Edit: HGM January 5, 1980 12:00 PM
-- Copyright Xerox Corporation 1979, 1980
DIRECTORY
Mopcodes: FROM "Mopcodes" USING [zEXCH],
CommUtilDefs: FROM "CommUtilDefs" USING [msPerTick],
PupStream: FROM "PupStream" USING [PupOpenMode, CloseReason],
PupPktDefs: FROM "PupPktDefs" USING [PupPktStreamObject],
PupDefs: FROM "PupDefs" USING [Pair, PupBuffer, PupSocket],
BufferDefs: FROM "BufferDefs" USING [QueueObject],
PupTypes: FROM "PupTypes" USING [PupAddress];
PupPktPrivateDefs: DEFINITIONS =
BEGIN
bytesPerPupHeader: CARDINAL = 22;
bytesPerAck: CARDINAL = bytesPerPupHeader+6;
dataBytesPerRFC: CARDINAL = 6;
byteAllocate: CARDINAL = 32000; -- lots and lots
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;
maxRetransmitTicks: CARDINAL = maxRetransmitTime/CommUtilDefs.msPerTick;
minRetransmitTicks: CARDINAL = 100/CommUtilDefs.msPerTick;
initialRetransmitTicks: CARDINAL = maxRetransmitTicks; -- BEWARE
ctlRetransmitTicks: CARDINAL = 2000/CommUtilDefs.msPerTick;
pingTicks: CARDINAL = 60000/CommUtilDefs.msPerTick; -- 1 min
duplicateWindow: CARDINAL = 10000;
clumpsBeforeBump: CARDINAL = 10;
Flip: PROCEDURE [PupDefs.Pair] RETURNS [LONG INTEGER] = MACHINE CODE
BEGIN
Mopcodes.zEXCH;
END;
Flop: PROCEDURE [LONG INTEGER] RETURNS [PupDefs.Pair] = MACHINE CODE
BEGIN
Mopcodes.zEXCH;
END;
Instance: TYPE = POINTER TO InstanceData;
InstanceData: TYPE = RECORD [
state: {idle, halfOpen, open, talking, finishing, end, closed},
-- 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
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.QueueObject,
sentQueue: BufferDefs.QueueObject,
retransmitterFork: PROCESS,
slurpFork: PROCESS,
waitingForInterrupt: CONDITION,
outIntSeq, inIntSeq, seenIntSeq: LONG INTEGER,
outIntPending: BOOLEAN,
outIntTime: CARDINAL,
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: CARDINAL, -- mostly used by send side, but used for pinging if state=open
retransmitTicks: CARDINAL,
connectionID: PupDefs.Pair,
nextInputID, nextOutputID, maxOutputID, ackedID: LONG INTEGER,
allocationID, allocatedID: LONG INTEGER,
whyClosed: PupStream.CloseReason,
text: STRING,
lock: MONITORLOCK,
slurp: PROCEDURE,
retransmitter: PROCEDURE,
me: PupPktDefs.PupPktStreamObject ];
PupPktHot: PROGRAM RETURNS [POINTER TO InstanceData];
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.