|
|
1.1 ! root 1: BEGIN { ! 2: printf "from %s to %s:\n", AGENT, DEST; ! 3: tried[AGENT] = 1; ! 4: INVALID = 2; DIRECT = 3; ! 5: ! 6: while (DEST != AGENT) { ! 7: dr = 0; ! 8: if ((hop = ipRouteNextHop[addr = DEST]) \ ! 9: && (type = ipRouteType[addr]) == INVALID) ! 10: hop = 0; ! 11: if (!hop \ ! 12: && (hop = ipRouteNextHop[addr = "0.0.0.0"]) \ ! 13: && (type = ipRouteType[addr]) != INVALID) ! 14: dr = 1; ! 15: if (hop) { ! 16: printf " via %-15s metric %2d%s\n", ! 17: hop, ipRouteMetric1[addr], ! 18: dr ? " (default route)" : ""; ! 19: } ! 20: else { ! 21: printf "\nno path to %s from %s\n%s\n", ! 22: DEST, AGENT, DIAGNOSTIC; ! 23: exit(1); ! 24: } ! 25: ! 26: if (type == DIRECT) ! 27: exit(0); ! 28: ! 29: if (hop in tried) ! 30: printf "\nrouting loop!\n"; ! 31: else ! 32: tried[hop] = 1; ! 33: AGENT = hop; ! 34: } ! 35: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.