-- File: PupPktDefs.Mesa, Last Edit: HGM November 1, 1979 11:57 PM

-- Copyright Xerox Corporation 1979, 1980

DIRECTORY
PupStream: FROM "PupStream" USING [PupListener, PupOpenMode],
PupDefs: FROM "PupDefs" USING [Byte, PupBuffer, Tocks],
PupTypes: FROM "PupTypes" USING [Pair, PupAddress, PupS
ocketID];

PupPktDefs: DEF
INITIONS =
BEGIN

-- Packet Stream Interface
PupPktStreamCreate: PROCEDURE [remote: PupTypes.PupAddress, ti
cks: PupDefs.Tocks]
RETURNS [PupPktStream];
PupPktStreamMake: PROCEDURE [
local: PupTypes.PupSocketID, remote: PupTypes.
PupAddress, ticks: PupDefs.Tocks,
mode: PupStream.PupOpenMode,
id: PupTypes.Pair]
RETURNS [PupPktStream];
P
upPktStreamDestroy: PROCEDURE [PupPktStream];
PupPktStream: TYPE = POINTER TO PupPktStreamObject;
PupPktStre
amObject: TYPE = RECORD [
put: PROCEDURE
[PupDefs.PupBuffer],
putMark: PROCEDUR
E [PupDefs.Byte],
get: PROCEDURE RETURNS [PupDefs.PupBuffer], -- if none, wait, then return NIL
sendAttention: PROCEDURE,
waitForAttention: PROCEDURE,
getSenderSizeLimit: PROCEDURE RETURNS[CARDINAL],
getLocalAddress
: PROCEDURE RETURNS [PupTypes.PupAddress] ];

-- Listeners
PupListener: TYPE = PupStream.PupListe
ner;
CreatePupPktStreamListener: PROCEDURE [
local: PupTypes.Pu
pSocketID,
proc: PROCEDURE[PupPktStream,PupTypes.PupAddress],
t
icks: PupDefs.Tocks,
filter: P
ROCEDURE [PupTypes.PupAddress] ← DontReject ]
RETURNS [PupListener];
D
estroyPupListener: PROCEDURE [PupListener];
DontReject: PROCEDURE [PupTypes.PupAddress]
;
RejectThisRequest: ERROR [error: STRING];

END.