DIRECTORY Basics USING [bytesPerWord], Endian USING [FFromCard, FWORD, HWORD, CardFromF], Pup USING [Address, Socket]; PupType: CEDAR DEFINITIONS IMPORTS Endian = { BYTE: TYPE = [0..100H); maxOldGatewayBytes: NAT = 532; maxNewGatewayBytes: NAT = 1500-bytesOfPupOverhead; bytesInPupHeader: NAT = SIZE[HeaderWithoutChecksum, Basics.bytesPerWord]; bytesOfPupOverhead: NAT = bytesInPupHeader + SIZE[Endian.HWORD, Basics.bytesPerWord]; HeaderWithoutChecksum: TYPE = MACHINE DEPENDENT RECORD [ byteLength: Endian.HWORD, -- includes header and software checksum hopCount: [0..16), spares: [0..16), type: Type, id: Endian.FWORD, dest, source: Pup.Address ]; ErrorCode: TYPE = MACHINE DEPENDENT { badChecksum(1B), noSocket(2B), resourceLimits(3B), inconsistent(1001B), cantGetThere(1002B), hostDown(1003B), tooManyHops(1004B), tooBig(1005B), iAmNotAGateway(518), gatewayResourceLimits(519), noError(10000), connectionLimit(10001), filler(LAST[WORD]) }; Type: TYPE = MACHINE DEPENDENT { echoMe(1B), iAmEcho, badEcho, error(4B), rfc(10B), abort, end, endRep, data(20B), aData, ack, mark, int, intRep, aMark, eData(30B), eAck, eEnd, eAbort, rpp(40B), rpcCallEnd(140B), rpcDataEnd(141B), rpcAck(142B), rpcRfa(144B), rpcACallEnd(150B), rpcADataEnd(151B), rpcPing(152B), rpcARfa(154B), rpcCallMore(160B), rpcDataMore(161B), rpcACallMore(170B), rpcADataMore(171B), gatewayRequest(200B), gatewayInfo(201B), tenexTimeRequest(202B), tenexTimeReply, altoTimeRequest(206B), altoTimeReply, mailCheck(210B), mailIsNew, mailNotNew, mailError, mailCheckLaurel, nameLookup(220B), nameReply, nameError, addressLookup, addressReply, whereIsUser(230B), userIs, userError, netDirVersion(240B), sendNetDir, bootFileSend(244B), kissOfDeath(247B), userAuthReq(250B), userAuthOk, userAuthBad, bootDirReq(257B), bootDirReply(260B), microcodeRequest(264B), microcodeReply, nameCacheRequest(272B), addressCacheRequest, cacheEntry, slowMicrocodeRequest(275B), pageStoreRequest(300B), pageFetchRequest(301B), diskAddress(302B), diskStoreRequest(303B), diskFetchRequest(304B), bluejayVoice(372B), larkProbeReply(373B), larkFirstVoice(374B), larkRetransmitRequest(375B), larkVoice(376B), last(LAST[BYTE]) }; stringTimeRequest: Type = VAL[200B]; stringTimeReply: Type = VAL[201B]; sunBootRequest: Type = VAL[303B]; echoStatsRequest: Type = VAL[200B]; echoStatsReply: Type = VAL[201B]; statisticsRequest: Type = VAL[200B]; statisticsReply: Type = VAL[201B]; teledebugWordStore: Type = VAL[200B]; teledebugWordFetch: Type = VAL[201B]; teledebugGoRequest: Type = VAL[202B]; teledebugGoReply: Type = VAL[203B]; teledebugAck: Type = VAL[204B]; fileLookup: Type = VAL[200B]; fileLookupReply: Type = VAL[201B]; fileLookupError: Type = VAL[202B]; SocketFromCard: PROC [LONG CARDINAL] RETURNS [Pup.Socket] = LOOPHOLE[Endian.FFromCard]; CardFromSocket: PROC [Pup.Socket] RETURNS [LONG CARDINAL] = LOOPHOLE[Endian.CardFromF]; }. πPupType.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Hal Murray, June 2, 1986 11:04:33 am PDT Gateway buffer limits Old Gateways promise to forward packets not exceeding this size. New gateways can handle packets up to the 10MB Ethernet limit of 1500 bytes. (1478 Pup data bytes.) "1500" is really Driver.dataBytesInBuffer, but we don't want that compilation dependency. Pup Header There is a copy of this in PupBuffer. It is also defined here to get these length calculations and for use within the Germ or any other code calling the head directly. Data to/from the wire starts here Device dependent encapsulation goes here client data goes here one HWORD of sofware checksum comes after all the data room for hardware CRC and slop comes last ErrorCode BEWARE: This won't work on left handed machines. Pup got to the destination machine, but wasn't processed Pup didn't get to the destination machine used by ForwardBuffer for various hacks Pup Type 000-177 "Registered" for use by any socket RPC uses 140 through 177B 20 => not end 10 => please ack 00 => call 01 => data 02 => ack 03 => spare 04 => rfa 05, 06, 07 => unused 200-377 "Unregistered" check the socket number to see what it really means Socket 2 - Gateway info Socket 4 - Misc services Socket 60 TeleSwat and TeleDebugging Voice project Unregistered PupTypes that overlap Socket 4 Misc Services Socket 5 Echo Servicesr Socket 22 Statistics Socket 60 TeleSwat and TeleDebugging Socket 61 File Lookup Socket conversion utilities Κα˜codešœ ™ Kšœ Οmœ1™