DIRECTORY OISCPTypes USING [ExchangeClientType, ExchangeID, maxDataBytePerExchange, WaitTime], PrincOps USING [ByteBltBlock], NSAddress USING [NetworkAddress, SocketNumber]; PacketExchange: DEFINITIONS = BEGIN Block: TYPE = PrincOps.ByteBltBlock; ExchangeHandle: TYPE = REF PacketExchangeObject; PacketExchangeObject: TYPE; RequestHandle: TYPE = REF RequestObject; -- returned by WaitForRequest RequestObject: TYPE = RECORD [ nBytes: CARDINAL, -- the byte size of the request Block requestType: OISCPTypes.ExchangeClientType, requestersExchangeID: PRIVATE OISCPTypes.ExchangeID, requestersAddress: PRIVATE NSAddress.NetworkAddress]; maxBlockLength: CARDINAL = OISCPTypes.maxDataBytePerExchange; -- in bytes ErrorReason: TYPE = { blockTooBig, blockTooSmall, noDestinationSocket, noRouteToDestination, hardwareProblem, aborted, timeout}; defaultWaitTime: OISCPTypes.WaitTime = 60000; -- in msecs Error: ERROR [why: ErrorReason]; Timeout: SIGNAL; -- this may be RESUMEd CreateRequestor: PROCEDURE [waitTime: OISCPTypes.WaitTime _ defaultWaitTime] RETURNS [ExchangeHandle]; -- at any socket number SendRequest: PUBLIC PROCEDURE [h: ExchangeHandle, remote: NSAddress.NetworkAddress, requestBlk, replyBlk: Block, requestType: OISCPTypes.ExchangeClientType _ unspecified] RETURNS [nBytes: CARDINAL, replyType: OISCPTypes.ExchangeClientType]; CreateReplyer: PROCEDURE [localSocket: NSAddress.SocketNumber, requestCount: CARDINAL _ 1, waitTime: OISCPTypes.WaitTime _ defaultWaitTime] RETURNS [ExchangeHandle]; -- requestCount is estimate of number of "to be queued" requests WaitForRequest: PROCEDURE [h: ExchangeHandle, requestBlk: Block, requiredRequestType: OISCPTypes.ExchangeClientType _ unspecified] RETURNS [rH: RequestHandle]; SendReply: PUBLIC PROCEDURE [h: ExchangeHandle, rH: RequestHandle, replyBlk: Block, replyType: OISCPTypes.ExchangeClientType _ unspecified]; Delete: PROCEDURE [h: ExchangeHandle]; SetWaitTime: PROCEDURE [h: ExchangeHandle, waitTime: OISCPTypes.WaitTime]; END.\199b14B25i611I78i31I51i39I46i80I108i1I63i11I180i11I1i36bI5B27i1bI7B9i25t10 31bI15B12t0 50t10 9t0 14t10 1t0 1i24I1b12B246t10i16bI13B1i1I24t0 14t10 42t0 49t10 13t0 14t10 1t0 1i65I2i45bI14B162i52I3b9B144i69t10bI6B16t0 14t10 1t0 2t10b11B13t0 48t10 3t0 LOG Time: October 23, 1980 1:50 PM By: Dalal Action: created file. Time: January 13, 1981 5:01 PM By: BLyon Action: moved file to Pilot Communication. \1i μPacketExchange.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. BLyon on: January 20, 1981 3:00 PM The Packet Exchange Protocol is a request/reply protocol that provides a little more reliability than raw packets transmitetd from a socket, and less reliabilty than the Sequenced Packet Protocol. Usually one end will provide some service at a well known socket or at a network address that is available through a binding process involving the Clearinghouse. The other end acquires a socket and sends a request. The request will be retransmitted a number of times with the interval between retransmissions based on the delay to the remote entity. definitions types and constants. the next to fields are used in the reply; clients should not touch these. interface errors and signals procedures the requestor the replyer user must save rH inorder to send a reply upon success return of SendReply, rH is invalid. request and reply can both point to the same piece of storage. Κ”˜codešœ™Kšœ Οmœ1™Kšœžœ6˜LKšžœŸ@˜ZK˜—Kšœ)™)š œž œ'˜@K˜AKšžœ˜K˜—Kšœ2™2Kš  œžœž œq˜Œ˜Kšœ>™>—Kš œž œ˜&Kš  œž œ4˜JKšžœϊ˜ύK˜Kšž˜K˜Kšœžœ"˜AKšœžœ7˜VK˜K˜—…— pπ