PupHop.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Hal Murray, June 2, 1986 12:25:54 pm PDT
Routing in the Pup world is currently very simple: shortest path, each gateway counts as 1 hop. Each gateway periodically broadcasts it's routing table. Each client selects the best path. (Gateways use the same algorithim.)
DIRECTORY
BasicTime USING [Pulses],
Pup USING [Address, Net];
PupHop: CEDAR DEFINITIONS = {
Milliseconds: TYPE = INT;
Pulses: TYPE = BasicTime.Pulses;
Routing
maxHop: NAT = 15;
unreachable: NAT = maxHop+1;
Anything more than maxHops away is unreachable.
Hop: TYPE = [0..maxHop+1];
RoutingTableEntry: TYPE = RECORD [
hop: Hop, -- 0 => directly connected
immediate: Pup.Address, -- socket will be null
time: CARDINAL ];
GetHop: PROC [Pup.Net] RETURNS [Hop];
Returns unreachable if there is no route to that net.
Errors: None.
GetRouting: PROC [Pup.Net] RETURNS [RoutingTableEntry];
Returns hop=unreachable if there is no route to that net.
Errors: None.
Fast: PROC [Pup.Net] RETURNS [yes: BOOL];
Phone lines aren't fast. Directly connected ethernets are.
Returns FALSE if there is no route to that net.
Errors: None.
Retransmission timing
Several places compute a retransmission time based on hop count. That's a very hard problem because the routing protocols don't (yet) tell anybody the speed of the phone lines involved. This code is an attempt to identify that sort of code so we can correct things when necessary and/or do it right if we ever figure out how.
base is the time the server normally takes to process the request.
Beware: Be sure your base timeout is generous. Congested phone lines are no fun.
InitialTimeout: PROC [net: Pup.Net, base: Milliseconds] RETURNS [Milliseconds];
InitialTimeoutPulses: PROC [net: Pup.Net, base: Pulses] RETURNS [Pulses];
Returns 0 if there is no route to that net.
Errors: None.
}.