DIRECTORY Process USING [Abort, Pause, SecondsToTicks, Ticks], XNS USING [Host, Net, unknownHost, unknownSocket], XNSRouter USING [Enumerate, RoutingTableEntry], XNSRouterPrivate USING [Network, Route]; XNSRefreshGatewayTranslationCaches: CEDAR MONITOR IMPORTS Process, XNSRouter, XNSRouterPrivate ~ BEGIN worker: PROCESS _ NIL; workerSweepSeconds: INT _ 150; workerSweepTicks: Process.Ticks _ Process.SecondsToTicks[workerSweepSeconds]; Start: ENTRY PROC ~ { ENABLE UNWIND => NULL; IF worker = NIL THEN worker _ FORK Worker[]; }; Stop: ENTRY PROC ~ { ENABLE UNWIND => NULL; IF worker # NIL THEN TRUSTED { Process.Abort[worker]; JOIN worker; worker _ NIL }; }; Worker: PROC ~ { EachEntry: PROC[net: XNS.Net, entry: XNSRouter.RoutingTableEntry] ~ { network: XNSRouterPrivate.Network; host: XNS.Host; [network, host] _ XNSRouterPrivate.Route[ [net~net, host~XNS.unknownHost, socket~XNS.unknownSocket]]; IF network.xns.translation = NIL THEN RETURN; [] _ network.xns.getEncapsulation[network, host]; }; DO XNSRouter.Enumerate[proc~EachEntry]; Process.Pause[workerSweepTicks]; ENDLOOP; }; Start[]; END. δXNSRefreshGatewayTranslationCaches.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Demers, December 10, 1986 1:22:48 pm PST This is a kludge to get XNS stream creation to work okay from 3Mb nets despite the short timeout of the gateway translation caches. The idea is periodically to ping each gateway with a translation request packet (calling network.getEncapsulation[...] does this as a side effect). Daemon to ping all routers on directly connected nets Κτ˜šœ'™'Icodešœ Οmœ1™