Routing
maxHops: NAT ~ 15;
unreachable:
NAT ~ maxHops+1;
Anything more than maxHops away is unreachable.
Hops: TYPE ~ [0..maxHops+1];
RoutingTableEntry:
TYPE ~
RECORD [
hops: Hops, -- 0 => directly connected
immediate: XNS.Address, -- socket is null
time: CARDINAL ];
GetHops: PROC [XNS.Net] RETURNS [Hops];
GetRouting: PROC [XNS.Net] RETURNS [RoutingTableEntry];
Enumerate:
PROC [
low: Hops ← 0, high: Hops ← unreachable,
proc: PROC [XNS.Net, RoutingTableEntry] ];
Enumerate routine table entries with delay between low and high, inclusive, calling proc on each of them. Client may abort the enumeration by raising an exception in proc and catching it in the caller of Enumerate. It's okay for proc to send/receive packets.
Fast:
PROC [
XNS.Net]
RETURNS [yes:
BOOL];
Phone lines aren't fast. Directly connected ethernets are.