cool stuff
Marten Terpstra
Thu Nov 17 16:01:33 CET 1994
cengiz at ISI.EDU (Cengiz Alaettinoglu) writes * Very cool indeed. Is new prtraceroute released? May I get a copy? Here is the latest. Not yet a real release but sort of works I guess. The structure may seem a bit weird, but that is because I automatically include some files that are elsewhere to make a distribution. So never mind all the "1;" and RCS headers everywhere.... Of course the documentation is not updated ;-) The policy parsing bits are in routine isnexthop. Enjoy, -Marten #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: prtraceroute.pl hostname.c prtraceroute.8 Makefile README # INSTALL CHANGES TODO # Wrapped by marten at rijp.ripe.net on Thu Nov 17 15:56:00 1994 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f prtraceroute.pl -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"prtraceroute.pl\" else echo shar: Extracting \"prtraceroute.pl\" \(22443 characters\) sed "s/^X//" >prtraceroute.pl <<'END_OF_prtraceroute.pl' X#!PERL X# X# X# Copyright (c) 1993, 1994 The RARE Association X# X# All Rights Reserved X# X# Permission to use, copy, modify, and distribute this software and its X# documentation for any purpose and without fee is hereby granted, X# provided that the above copyright notice appear in all copies and that X# both that copyright notice and this permission notice appear in X# supporting documentation, and that the name of the author not be X# used in advertising or publicity pertaining to distribution of the X# software without specific, written prior permission. X# X# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL X# AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY X# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN X# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF X# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. X# X# X# X# $RCSfile: prtraceroute.pl,v $ X# $Revision: 1.1 $ X# $Author: marten $ X# $Date: 1994/10/03 10:11:47 $ X# X# X# This program will do a normal traceroute, and will add some AS info to X# the output, and will compare the real output with what is in the X# database concerning routing policies. X# X# This version has a built in RIPE whois client, just to avoid compatibility X# problems. The default host to query is whois.ripe.net, if you have a RIPE X# whois server closer to home, change the variable WHOISHOST in the Makefile. X# Please note that a query to a non RIPE whois server makes no sense X# whatsoever, besides you may get some nice errors because of special flags X# used. X# Xrequire "getopts.pl"; X X# Temporary for new library X# @INC = (@INC, "/ncc/pride/lib"); X# require "whois.pl"; X# require "nexthops.pl"; X# require "misc.pl"; X X# $RCSfile: whois.pl,v $ X# $Revision: 1.1 $ X# $Author: marten $ X# $Date: 1994/03/02 15:40:14 $ X X# whois.pl - open whois connection, and returns socket descriptor. X# X# Local whois client, to avoid forks and compatibility problems X# It basically is a fully-fledged RIPE version of the whois client. X# It leaves the socket descriptor open, the routine reading from the X# socket is supposed to close the socket again. Besides, the server X# will most probably close the connection, once all data has been output X X# $whoishost = "bwhois.ripe.net"; X# $fast = 1; X Xsub whois { X X local($string) = @_; X X# print STDERR "QUERY: $string\n"; X local($key) = ""; X $port = 43; X $AF_INET = 2; X $SOCK_STREAM = 1; X local($type); X X if (!$connected) { X $sockaddr = 'S n a4 x8'; X ($name, $aliases, $type, $len, $thataddr) = gethostbyname($whoishost); X $that = pack($sockaddr, $AF_INET, $port, $thataddr); X socket(S, $AF_INET, $SOCK_STREAM, $proto) || die "socket failed\n"; X if ( connect(S, $that) ) { X if ( $opt_d) { X printf "** connecting to whois host %s\n", $whoishost; X } X if ($keepopen) { X $connected = 1; X } X } else { X die "Connect to whois host $whoishost failed\n"; X } X if ( $opt_d ) { X printf "** connected ok\n"; X } X } X select(S); $| = 1; select(STDOUT); X X if ($string =~ /^-a/) { X ($tmp, $key) = split(/[\t\s]+/,$string, 2); X print S "-a "; X } X else { X $key = $string; X } X if($keepopen) { X print S "-k "; X } X if($fast) { X print S "-F "; X } X X if($version) { X printf S "-Vpt%s ", $versionno; X } X print S "-r $key\n"; X return S; X} X X1; X# $RCSfile$ X# $Revision$ X# $Author$ X# $Date$ X# X# netinfo.pl - do all stuff needed to read as network information X X#require "whois.pl"; X#require "misc.pl"; X Xsub netinfo { X X local($host) = @_; X X print STDERR "netinfo - called for $host\n" if $opt_d; X X local($netint) = &quad2int($host); X local($net)=$host; X X if (!$donenet{$net}) { X print STDERR "netinfo for $net not yet done\n" if $opt_d; X eval "\%net$netint = &getnetinfo(\"$net\");"; X $donenet{$net} = "net$netint"; X } X eval "\*cur = \*$donenet{$net};"; X X print STDERR "\$cur{\"rt\"} = $cur{\"rt\"}\n" if $opt_d; X return *cur; X} X Xsub getnetinfo { X X local($net) = @_; X local(%en) = (); X local($gotpol) = 0; X local($haveaninetnum) = 0; X local($newline) = 0; X X &whois("-a -T in -T rt -T ir $net"); X X while (<S>) { X X# print STDERR "NETINFO Read: $_"; X X chop; X X if ($keepopen) { X if (/^\s*$/) { X last if $newline == 1; X $newline = 1; X next; X } X $newline = 0; X } X # Backward compatibility options. First an inetnum should come out X # then a route if it exists. The route values will always overwrite X # the inetnum values ... X X if (/^inetnum:\s+(.*)$/ || /^\*in:\s+(.*)$/) { X $haveaninetnum = 1; X $en{"rt"} = $1; X next; X } X X if (/^aut-sys:\s+(.*)$/ || /^\*as:\s+(.*)/) { X $en{"or"} = $1; X $gotpol = 1; X next; X } X X if (/^comm-list:\s+(.*)$/ || /^\*cl:\s+(.*)/) { X $en{"cl"} .= " " if $en{"cl"}; X $en{"cl"} .= $1; X $gotpol = 1; X next; X } X X if (/^ias\-int:\s+(\S+)\s+(\S+)/ || /^\*ii:\s+(\S+)\s+(\S+)/) { X $en{$1} = $2; X $dmz{$en{"rt"}} = 1; X $dmzas{"$en{\"rt\"}%$2"} = 1; X $dmzas{"$en{\"rt\"}%$en{\"or\"}"} = 1; X $gotpol = 1; X next; X } X X if (/^route:\s+(.*)$/ || /^\*rt:\s+(.*)$/) { X $en{"rt"} = $1; X next; X } X X if (/^origin:\s+(.*)$/ || /^\*or:\s+(.*)/) { X $en{"or"} = $1; X $gotpol = 1; X next; X } X X if (/^comm-list:\s+(.*)$/ || /^\*cl:\s+(.*)/) { X $en{"cl"} .= " " if $en{"cl"}; X $en{"cl"} .= $1; X $gotpol = 1; X next; X } X if (/^remarks:\s+ias\-int:\s+(\S+)\s+(\S+)/ || X /^\*rm:\s+ias\-int:\s+(\S+)\s+(\S+)/) { X $en{$1} = $2; X $dmz{$en{"rt"}} = 1; X $dmzas{"$en{\"rt\"}%$2"} = 1; X $dmzas{"$en{\"rt\"}%$en{\"or\"}"} = 1; X $gotpol = 1; X next; X } X X if (/^\inet\-rtr:\s+(.*)$/ || /^\*ir:\s+(.*)$/) { X next; X } X if (/^localas:\s+(.*)$/ || /^\*la:\s+(.*)$/) { X $en{"or"} = $1; X $gotpol = 1; X next; X } X X if (/^\s*$/ && $gotpol) { X next; X } X } X return %en; X} X X1; X# $RCSfile$ X# $Revision$ X# $Author$ X# $Date$ X# X# asinfo.pl - do all stuff needed to read as information X X# require "whois.pl"; X Xsub asinfo { X X local($as) = @_; X X if (!$doneas{$as}) { X eval "\%AS$as = &getinfo($as);"; X $doneas{$as} = "AS$as"; X } X eval "\*cur = \*$doneas{$as};"; X X return *cur; X} X Xsub getinfo { X X local($as) = @_; X local(%en) = (); X local($gotpol) = 0; X local($newline) = 0; X X &whois("-a -T an $as"); X X while (<S>) { X# print STDERR "AS INFO Read: $_"; X chop; X X if ($keepopen) { X if (/^\s*$/) { X last if $newline == 1; X $newline = 1; X next; X } X $newline = 0; X } X X if (/^aut-num:\s+(.*)$/ || /^\*an:\s+(.*)/) { X $en{"an"} .= "\n" if $en{"an"}; X $en{"an"} .= $1; X next; X } X X if (/^default:\s+(.*)$/ || /^\*df:\s+(.*)/) { X $en{"df"} .= "\n" if $en{"df"}; X $en{"df"} .= $1; X next; X } X X if (/^as\-in:\s+(.*)$/ || /^\*ai:\s+(.*)/) { X ($peer, $weight, $policy) = split(/\s+/, $1, 3); X if (($peer eq $prevpeer) && ($weight eq $prevweight)) { X $en{"ai"} .= " $policy"; X } else { X $en{"ai"} .= "\n" if $en{"ai"}; X $en{"ai"} .= "$peer $weight $policy"; X } X $prevpeer = $peer; X $prevweight = $weight; X $gotpol = 1; X next; X } X X if (/^as\-out:\s+(.*)$/ || /^\*ao:\s+(.*)/) { X $en{"ao"} .= "\n" if $en{"ao"}; X $en{"ao"} .= $1; X next; X } X X if (/^descr:\s+(.*)$/ || /^\*de:\s+(.*)/) { X $en{"de"} = $1 if !$en{"de"}; X next; X } X X if (/^\s*$/ && $gotpol) { X next; X } X } X X $en{"de"} = "??" if !$en{"de"}; X X return %en; X} X X1; Xsub expandmacro { X local($macro) = @_; X local($result); X local($newline) = 0; X X if ($asmacroknown{$macro}) { X return $asmacroknown{$macro}; X } X X &whois("-T am $macro"); X X while (<S>) { X# print STDERR "MACRO Read: $_"; X if ($keepopen) { X if (/^\s*$/) { X last if $newline == 1; X $newline++; X next; X } X $newline = 0; X } X if (/^as\-list:\s+(.*)$|^\*al:\s+(.*)$/) { X local($value) = $1; X $value = $2 unless $value; X foreach (split(/\s+/, $value)) { X if ($result) { X $result .= " OR "; X } X if (/^AS\-/) { X $result .= &expandmacro($_); X } else { X $result .= $_; X } X } X next; X } X } X $asmacroknown{$macro} = "( $result ) "; X# print STDERR "Total for $macro is ( $result )\n"; X return "( $result ) "; X} X Xsub quad2int { X local($quad) = @_; X local(@quads); X local($i, $j, $result); X X @quads = split(/\./, $quad); X X $result = 0; X for ($i=0; $i<4; $i++) { X $j = $quads[$i]; X ($j>=0&&$j<256) || die "quad2int: illegal ip number '$quad'\n"; X $result += ($j<<(8*(3-$i))); X } X return $result; X} X Xsub int2quad { X local($int) = @_; X local($i, $j, $result); X X $result = ""; X for ($i=3; $i>=0; $i--) { X $j = ($int>>($i*8))&0xff; X $result = $result . "$j."; X } X chop($result); X return $result; X} X X1; X# $RCSfile$ X# $Revision$ X# $Author$ X# $Date$ X# X# isnexthop - takes a ripe-81 expression, and target values for X# AS and communities (AS in a scalar, communities in a normal array) X Xsub isnexthop { X X local(*ripe81expr, *targetAS, *targetCOM, *targetPrefix) = @_; X local($KEYWORDS) = 'NOT|OR|AND|\(|\)|\{|\}'; X local($newexpr, $expr); X local(@matches) = ($targetPrefix, @targetCOM, $targetAS, "ANY"); X X# print STDERR "Targets: $targetAS, $targetPrefix, ", @targetCOM, "\n"; X X $ripe81expr =~ s:(\(|\)|\{|\}): \1 :g; X X local(@blah) = split(/\s+/, $ripe81expr); X X foreach $i (0..$#blah-1) { X next if $blah[$i] =~ /^$KEYWORDS$/; X next if $blah[$i+1] =~ /^$KEYWORDS$/; X $blah[$i] .= " OR"; X } X for $i (0..$#blah) { X if ($blah[$i] =~ /^AS\-[A-Z0-9]+/) { X splice(@blah, $i, 1, &expandmacro($blah[$i])); X } X $newexpr .= $blah[$i]." "; X } X X# print STDERR "evaluating $newexpr now\n"; X foreach $i (split(/\s+|$/, $newexpr)) { X X next if $i eq ""; X X if ($i eq "NOT") { X $expr .= "!"; X next; X } X if ($i eq "AND") { X $expr .= "&"; X next; X } X if ($i eq "OR") { X $expr .= "|"; X next; X } X if ($i eq "(") { X $expr .= "("; X next; X } X if ($i eq ")") { X $expr .= ")"; X next; X } X if (($i eq "{")) { X $expr .= "("; X next; X } X if ($i eq "}") { X $expr .= ")"; X next; X } X if ($i eq ",") { X next; X } X X foreach $j (@matches) { X if ($i eq $j) { X $expr .= "1"; X $found = 1; X last; X } X } X if (!$found) { X $expr .= "0"; X } X $found = 0; X } X local($result) = eval "$expr;"; X# print "$ripe81expr -> ", $result ? "Y" : "N", "\n"; X return eval "$expr;"; X} X X1; X X# $RCSfile$ X# $Revision$ X# $Author$ X# $Date$ X# X# nexthops.pl - find all nexthops, takes as input an AS number and a X# target host address. Looks up info for these two if needed. Returns X# a string with all nexthops space weight, seperated by %. X X# require "asinfo.pl"; X# require "netinfo.pl"; X# require "isnexthop.pl"; X Xsub nexthops { X X local($as, $target) = @_; X local(@nexthop) = (); X X print STDERR "nexthops - called with ($as, $target)\n" if $opt_d; X X *asen = &asinfo($as); X *neten = &netinfo($target); X X local($targetas) = $neten{"or"}; X local(@targetcom) = split(/\s+/, $neten{"cl"}); X local($targetprefix) = $neten{"rt"}; X X print STDERR "nexthops got all main info, looking at policy now\n" if $opt_d; X foreach (split(/\n/, $asen{"ai"})) { X local($peer, $weight, $policy) = split(/\s+/, $_, 3); X if (&isnexthop(*policy, *targetas, *targetcom, *targetprefix)) { X $nexthop[$index++] = "$weight $peer"; X } X } X if ($asen{"df"}) { X foreach (split(/\n/, $asen{"df"})) { X local($peer, $weight) = split(/\s+/, $_); X $weight+=1000; X $nexthop[$index++] = "$weight $peer (D)"; X } X } X X X# foreach (sort numerically @nexthop) { X# print STDERR "$_\n"; X# } X return sort numerically @nexthop; X} X X1; X X# &nexthops($ARGV[0], $ARGV[1]); X X#print "next hops for $ARGV[1] from $ARGV[0] are:\n"; X#for $i (sort numerically @nexthop) { X# print "$i\n"; X#} X X X X X# This is a associative array used for netinfo. Must be used globally. X X%neti = (); X%asi = (); X X# X$whoishost = "WHOISHOST"; X$traceroutecmd = "TRACEROUTE"; X$hostcmd = "HOSTCMD"; X$keepopen = "KEEPOPEN"; X$fast = "FAST"; X$version = "VERSION"; X$port = PORT; X$AF_INET = 2; X$SOCK_STREAM = SOCKSTREAM; X# X&Getopts('vdlm:q:w:h:p:g:KFV'); X# X$usage="Usage: $0 [-v] [-l] host\nOther: [-d] [-m maxhops] [-q nqueries] [-w waittime] [-g gateway]\n [-h whoishost] [-p port]"; X Xif ($#ARGV != 0) { X print STDERR "$usage\n"; X exit 1; X} X Xif ($ENV{"PRIDEHOST"}) { X $whoishost = &getfqdn($ENV{"PRIDEHOST"}); X} Xif ($opt_h) { X $whoishost = &getfqdn($opt_h); X} Xif ($ENV{"PRIDEPORT"}) { X $port = $ENV{"PRIDEPORT"}; X} Xif ($opt_p) { X $port = $opt_p; X} X Xif ($opt_m) { X $maxhops = $opt_m; X $traceroutecmd = $traceroutecmd." -m ".$maxhops; X} X Xif ($opt_q) { X $queries = $opt_q; X $traceroutecmd = $traceroutecmd." -q ".$queries; X} X Xif ($opt_w) { X $waittime = $opt_w; X $traceroutecmd = $traceroutecmd." -w ".$waittime; X} X Xif ($opt_g) { X $viahost = &getfqdn($opt_g); X $traceroutecmd = $traceroutecmd." -g "."$opt_g"; X} Xif ($keepopen =~ /^TRUE$/) { X $keepopen = 1; X} else { X $keepopen = 0; X} Xif ($opt_K) { X $keepopen = 0; X} Xif ($fast =~ /^TRUE$/) { X $fast = 1; X} else { X $fast = 0; X} Xif ($opt_F) { X $fast = 0; X} Xif ($version=~ /^TRUE$/ ) { X $versionno = "\$Revision: 1.1 $"; #" Need to fool emacs with this quote X $versionno =~ s/\$Revision\: //; X $versionno =~ s/ \$$//; X $version = 1; X} else { X $version = 0; X} Xif ($opt_V) { X $version = 0; X} X X Xif ($opt_d) { X printf "** %s use keepopen feature\n", X $keepopen ? "will" : "will not" ; X} X X X# Needed for sorting things numerically in stead of alphabetically X Xsub numerically { $a <=> $b ; } X X X# X# Return the UTC time for verbose output X# Xsub gettime { X X ($s, $m, $h, $md, $mo, $y, $wd, $yd, $is) = gmtime(time); X X $thismonth = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mo]; X X $s = "0".$s unless $s > 9; X $m = "0".$m unless $m > 9; X $h = "0".$h unless $h > 9; X X $date = sprintf("%3s %2d %2s:%2s:%2s UTC", X $thismonth, $md, $h, $m , $s ); X return $date; X X} X# X# Return an IP address from a name. X# Xsub getadr { X local($host) = @_; X local($name, $alias, $addrtype, $length, @addr) = gethostbyname($host); X if (defined($addr[0])) { X local($a, $b, $c, $d) = unpack('C4', $addr[0]); X $addr = $a.".".$b.".".$c.".".$d; X return($addr); X } else { X print STDERR "$0: unknown address for $host\n"; X exit 1; X } X} X# X# Return the fully qualified domain name. X# Xsub getfqdn { X local($host) = @_; X# X# resolve an address first X# X if($host =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { X local($fqdntmp) = pack('C4', $1, $2, $3, $4); X local($name, $alias, $addrtype, $length, @addr) = gethostbyaddr($fqdntmp,2); X if (defined($name)) { X return($name); X } else { X return($host); X } X } X# X# okay then try a name X# X ($name, $alias, $addrtype, $length, @addr) = gethostbyname($host); X X if (!defined($name)) { X print STDERR "$0: unknown host $host\n"; X exit 1; X } X return($name); X} X Xsub isipaddr { X local($addr) = @_; X if($addr =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { X return 1; X } else { X return 0; X } X} X Xif ($opt_d) { X printf "** traceroute command will be \"%s\"\n", $traceroutecmd." ".$ARGV[0]; X} X X$destname = &getfqdn($ARGV[0]); X Xopen(TRACE, "$traceroutecmd $ARGV[0] 2>&1|"); X Xwhile (<TRACE>) { X X# strip leading spaces, trailing newlines and stars (traceroute timeouts, X# they mess up the ordering of fields, making it impossible to parse) X X s/^[\s\t]+//; X s/\*//g; X chop; X X if (/traceroute: /) { X ($nothing, $error) = split(/:/, $_); X print STDERR "$0: $error\n"; X exit 1; X } X X# First let's find out the AS for the destination network. X X if (/^traceroute/) { # first output line X ($tmp1, $tmp2, $hostname, $net, $rest) = split(/[\s\t]+/, $_); X $net =~ /(\d+\.\d+\.\d+\.\d+)/; X $destnum = $1; X *neti = &netinfo($destnum); X $destnet = $neti{"rt"}; X $das = $neti{"or"}; X if ($neti{$destnum}) { X $das = $neti{$destnum}; X } X if($opt_g) { X if(&isipaddr($opt_g)) { X $viaaddr = $opt_g; X } else { X $viaaddr = &getadr($viahost); X } X *neti = &netinfo($viaadr); X $viaas = $neti{"or"}; X if ($neti{$viaadr}) { X $viaas = $neti{$viaadr}; X } X } X if (!$das) { X print STDERR "** WARNING ** Destination AS unknown ". X "for $hostname \($destnum\)\n"; X $setnopolicy = 1; X } X if ($opt_g && !$viaas) { X print STDERR "** WARNING ** Gateway AS unknown ". X "for $viahost \($viaaddr\)\n"; X $setnopolicy = 1; X } X if ($setnopolicy) { X print STDERR "** WARNING ** Policy information is not ". X "possible - setting to \"?\"\n\n"; X } X X# Try to get the originating AS and other local information. X X local($tmph) = `$hostcmd`; X chop($tmph); X $localhost = &getfqdn($tmph); X $localaddr = &getadr($localhost); X X *neti = &netinfo($localaddr); X $localas = $neti{"or"}; X if ($neti{$localaddr}) { X $localas = $neti{$localaddr}; X } X if ($localas) { X $aspath[++$pathindex] = $localas; X } X if($opt_g) { X $destas = $viaas; X } else { X $destas = $das; X } X if ($opt_v) { X $time = &gettime(); X if (!$localas) { X $localas = "???"; X } X printf "traceroute with AS and policy additions [%s]\n\n", $time; X printf "\t\tfrom %6s %s \(%s\)\n", X $localas ? $localas : "???", $localhost, $localaddr; X if($opt_g) { X printf "\t\tvia %6s %s \(%s\)\n", X $viaas ? $viaas : "???" , &getfqdn($viahost), $viaaddr; X } X printf "\t\tto %6s %s \(%s\)\n\n", X $das ? $das : "???", &getfqdn($hostname), $destnum; X } X else { X printf "traceroute to %s \(%s\) with AS and policy additions\n\n", $hostname, $destnum; X } X next; X } X X# Here come all the hops X X# X# Do something special for first hop. You could be in another AS X# X if (/^1 /) { X $firsthop = 1; X } X X if (/^[0-9]+/) { X X# Get the IP address out of the traceroute output X X ($hop, $hostname, $nettmp, $rest) = split(/[\s\t]+/, $_,4); X $nettmp2 = substr($nettmp, 1); X $netnum = substr($nettmp2, 0, length($nettmp2) - 1); X if ( $firsthop == 1 ) { X $prevas = $localas; X $firsthop = 0; X } else { X $prevas = $as; X } X X# Get the as number for this IP address: X X *neti = &netinfo($netnum); X $as = $neti{"or"}; X X if ($neti{$netnum}) { X $as = $neti{$netnum}; X } X X $lookupnet = $neti{"rt"}; X X X# See if we figure out what kind of routing decision this was according X# to policy in the database X X if (!$as) { X $as = "???"; X } X X if (($as eq $prevas) && ($as !~ /\?/)) { X $type = "I"; X } X elsif ($as =~ /\?/) { X $type = "?"; X } X elsif ($prevas =~ /\?/) { X $type = "?"; X } X else { X @nexthops = &nexthops($prevas, $destnum); X $level = 0; X $cost = 0; X $prevcost = 0; X for $i (0..$#nexthops) { X print "** looking at nexthop $nexthops[$i]\n" if $opt_d; X $prevcost = $cost; X $cost = sprintf("%d", $nexthops[$i]); X if ($prevcost - $cost != 0) { X $level++; X } X if ($nexthops[$i] =~ /$as/) { X print STDERR "$nexthops[$i] matches $as\n" if $opt_d; X if ($nexthops[$i] =~ /\(D\)/) { X $type = "D$level"; X } else { X $type = "E$level"; X } X } X last if $type; X } X X# This is the possible next hop stuff, leave that for a bit later X X if (!$type) { X if (!@nexthops) { X $type = "?"; X } else { X ($tmp, $possas, $tmp) = split(/\s+/, $nexthops[0]); X# $possas =~ s/AS//; X if ($dmzas{"$destnet%$prevas"} && X ($lookupnet eq $destnet)) { X $type = "C"; X } elsif ($dmzas{"$lookupnet%$possas"}) { X local($tmp) = $possas; X# $tmp =~ s/AS//; X if($destas) { X $aspath[++$pathindex] = "[?".$tmp."?]"; X } X &asinfo($tmp); X $type = "?NH $possas"; X } else { X $type = "ERROR"; X } X } X } X } X X if($opt_g && ($as eq $viaas)) { X $as = $viaas; X $destas = $das; X } X } X X X# And print the output X X $rest =~ s/\(\S+\)//g; X $rest =~ s/\s+/ /g; X $icmpmess = $rest; X $icmpmess =~ tr/ ![HPFS]*//cd; X $icmpmess =~ s/\s+$//; X $icmpmess =~ s/\s+/ /g; X $icmpmess =~ s/^\s+//; X if ( $opt_l) { X X# X# Try to do something sensible with this - not too easy as traceroute can X# give very unpredictable results X# This is only really a first stab for those wanting a possibilty to see RTT's X# May try better with this later. X# X $rest =~ s/ \![HPFS]//g; X $rest =~ s/ ms//g; X $rest =~ s/(\S)\s*$/$1 ms/; X printf "%2d %6s %-30s %-18s %s %s%s\n", X $hop, $as, substr($hostname,0,30), $netnum, X $setnopolicy ? "[?]" : "[".$type."]", $rest, X $icmpmess ? " $icmpmess" : ""; X $rest = ""; X } else { X printf "%2d %6s %-30s %-18s %s%s\n", X $hop, $as, substr($hostname,0,30), $netnum, X $setnopolicy ? "[?]" : "[".$type."]", X $icmpmess ? " $icmpmess" : "" ; X } X $type = ""; X $icmpmess = ""; X X# Update the path X X if ($as ne $prevas) { X $aspath[++$pathindex] = "$as"; X } X} X X# End of traceroute output X Xclose(TRACE); X Xprint STDERR "closed trace and whois output now\n" if $opt_d; X# Print path, legend and whois stats X Xif ($#aspath >= 1) { X print "\nAS Path followed: @aspath\n\n"; X for $i (1..$#aspath) { X if ($aspath[$i] ne "???") { X if ($aspath[$i] =~ m/\[.(\S+).]/) { X $aspath[$i] = $1; X } X if (!$done{$aspath[$i]}) { X *asi = &asinfo($aspath[$i]); X printf "%6s = %s\n", X $aspath[$i], $asi{"de"}, X $done{$aspath[$i]} = 1; X } X } X } X} Xclose(S); X X# X# Give some debug stats for those who like this sort of thing X# Xif ($opt_d) { X printf "\n** (needed %d whois queries - %d network, %d asnumbers)\n", X $netwhoisq+$aswhoisq,$netwhoisq, $aswhoisq; X} END_OF_prtraceroute.pl if test 22443 -ne `wc -c <prtraceroute.pl`; then echo shar: \"prtraceroute.pl\" unpacked with wrong size! fi # end of overwriting check fi if test -f hostname.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"hostname.c\" else echo shar: Extracting \"hostname.c\" \(377 characters\) sed "s/^X//" >hostname.c <<'END_OF_hostname.c' X/* X * X * $RCSfile: hostname.c,v $ X * $Revision: 0.11 $ X * $Author: tony $ X * $Date: 1993/11/16 15:08:24 $ X * X * Super simple hostname command. do a "man gethostname" X */ X#include <stdio.h> X Xmain() X{ X char hostname[64]; /* that's what sys/param.h says */ X X if (gethostname(hostname, sizeof(hostname))) { X perror("gethostname"); X exit(-1); X } X puts(hostname); X exit(0); X} END_OF_hostname.c if test 377 -ne `wc -c <hostname.c`; then echo shar: \"hostname.c\" unpacked with wrong size! fi # end of overwriting check fi if test -f prtraceroute.8 -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"prtraceroute.8\" else echo shar: Extracting \"prtraceroute.8\" \(10618 characters\) sed "s/^X//" >prtraceroute.8 <<'END_OF_prtraceroute.8' X.\" X.\" X.\" Copyright (c) 1993 The RARE Association X.\" X.\" All Rights Reserved X.\" X.\" Permission to use, copy, modify, and distribute this software and its X.\" documentation for any purpose and without fee is hereby granted, X.\" provided that the above copyright notice appear in all copies and that X.\" both that copyright notice and this permission notice appear in X.\" supporting documentation, and that the name of the author not be X.\" used in advertising or publicity pertaining to distribution of the X.\" software without specific, written prior permission. X.\" X.\" THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL X.\" AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY X.\" DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN X.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF X.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. X.\" X.\" $RCSfile: prtraceroute.8,v $ X.\" $Revision: 0.18 $ X.\" $Author: tony $ X.\" $Date: 1994/05/19 13:50:42 $ X.\" X.\" X.\" X.TH prtraceroute 8 "January 5th, 1994" X.UC 6 X.SH NAME Xprtraceroute \- print the route, AS and policy information packets take to a network host X.SH SYNOPSIS X.B prtraceroute X[ X.B \-d X] [ X.B \-l X] [ X.B \-v X] [ X.B \-m Xmaxhops X] [ X.B \-q Xnqueries X] [ X.B \-w Xwaittime X] [ X.B \-g Xgateway X] [ X.B \-p Xport X] [ X.B \-h Xwhoishost X] X.I host X.SH DESCRIPTION XThe Internet is a large and complex aggregation of Xnetwork hardware, connected together by gateways. XTracking the route one's packets follow (or finding the miscreant Xgateway that's discarding your packets) can be difficult. XFor routing purposes the Internet is split into "autonomous systems" X(ASes) which exchange routing information. XThese ASes can register their routing exchanges in a routing registry. X.I Prtraceroute Xis a version of traceroute that presents this routing policy Xinformation together with the real time Xpacket trace obtained from traceroute. It adds AS information to Xthe normal traceroute output, making use of Routing Registry (RR) database Xinformation. It also Xchecks with the RR database to see how the chosen route compares with the Xthe registered routing Xpolicies in the RR database. X.PP XOptions are: X.SH OPTIONS X.TP 6 X.B \-l XPrint out a X.I longform Xoutput including round-trip-times (RTT's) in milliseconds. X.TP X.B \-d XDebug output. Gives additional internal information and should not be Xused for general use. X.TP X.B \-v XVerbose output. This gives additional information including a timestamp Xin UTC plus a summary of where the prtraceroute was initiated from. XThis is useful when including prtraceroute output in fault reports, trouble Xtickets, etc. X.TP X.BI \-m " maxhops" XSet the max time-to-live (max number of hops) used in outgoing probe Xpackets. The default is 30 hops. X.TP X.BI \-q " nqueries" XSet the desired number of probe queries. The default is 3. X.TP X.BI \-w " waittime" XSet the time (in seconds) to wait for a response to a probe (default 3 Xsec.). X.TP X.BI \-g " gateway" XEnable the IP LSRR (Loose Source Record Route) option. XThis is useful for asking how somebody else, at the specified gateway, Xreaches a particular target. It should be noted that many implementations Xdo not output the interface address if they are the gateway. This can cause X\-g to look a little strange. However, this problem also exists in the Xexisting traceroute. X.TP X.BI \-h " whoishost" XSpecify an alternate whois server to the configured one for routing registry X(RR) data. X.TP X.BI \-p " port" XSpecify an alternate port for the RR whois server. X.SH INTERNALS XThe program makes direct use of the X.I traceroute Xprogram and uses this information to check on AS and RR policy Xinformation. It then uses the X.I whois Xprotocol (which is built in) to derive the RR policy information Xfrom the traceroute output. X.SH EXAMPLES XA sample use and output might be: X X.DS L X.nf X.if t .ft C X% prtraceroute ns0.ja.net Xtraceroute to ns0.ja.net (128.86.1.20) with AS and policy additions X X 1 AS1104 hef-router.nikhef.nl (192.87.45.80) [D1] X 2 AS1103 Amsterdam1.router.surfnet.nl (192.16.183.112) [E1] X 3 AS1103 Amsterdam2.router.surfnet.nl (145.41.9.130) [I] X 4 AS2043 amsterdam4.empb.net (193.172.4.17) [E1] X 5 AS2043 london1.empb.net (193.172.4.5) [I] X 6 AS2043 int-gw.ulcc.ac.uk (193.172.27.14) [I] X 7 AS 786 ns0.ja.net (128.86.1.20) [E1] X XAS Path followed: 1104 1103 2043 786 X XAS1104 = NIKHEF-H XAS1103 = SURFnet IP XAS2043 = European Multiprotocol Backbone XAS 786 = The JANET IP Service X.fi X.DE X.PP XHere is an explanation of the output: X X.DS L X.nf X.if t .ft CB X1st field: Traceroute hopcount X2nd : AS number of the network interface of the router X3rd : Domain name of the interface X4th : IP address of the incoming interface X5th : Policies of the step between the previous line and this line X where: X X I = Internal route (hop within the same AS) X Dn = Default route, the nth choice according policy X so D1 would indicate the primary default route, D2 X the secondary default route, etc X En = External route, the nth choice according to policy X C = The next hop was reached by having a connected interface X and not from a specific routing exchange with the peer. X ? = no information. Either the current AS, or the previous X AS is unknown, so we can not do any useful RR tracing. X ?NH ASn = Possibly making use of a next hop obtained from X ASn. X ERROR = hop is not supposed to be taken according to the X RR information. X X.fi X.DE X.PP XAn AS path summary will be given, and a description of all XASes passed (if they are in the RR database). X X.PP XSome other interesting examples: X X.DS C X.nf X.if t .ft C X% prtraceroute jolly.nis.garr.it Xtraceroute to jolly.nis.garr.it (192.12.192.5) with AS and policy additions X X 1 AS1104 hef-router.nikhef.nl (192.87.45.80) [D1] X 2 AS1103 Amsterdam1.router.surfnet.nl (192.16.183.112) [ERROR] X 3 AS1103 Amsterdam2.router.surfnet.nl (145.41.9.130) [I] X 4 AS2043 amsterdam4.empb.net (193.172.4.17) [E1] X 5 AS2043 pisa1.empb.net (193.172.4.23) [I] X 6 AS2043 garr-gw.cnr.it (193.172.21.2) [I] X 7 AS 137 jolly.nis.garr.it (192.12.192.5) [E1] X XAS Path followed: 1104 1103 2043 137 X XAS1104 = NIKHEF-H XAS1103 = SURFnet IP XAS2043 = European Multiprotocol Backbone XAS 137 = GARR X X.fi X.DE X.PP XIn this example, you see an ERROR in the second hop. This is because the Xrouting policy for AS1104 does not show that it is expecting to receive Xroutes for AS137 from peer AS1103. This is probably an oversight in this Xcase and would immediately alert the AS1104 routing policy object Xmaintainer to this fact. X XHere is another interesting example: X X.DS C X.if t .ft C X.nf X% prtraceroute dfnnoc.gmd.de Xtraceroute to dfnnoc.gmd.de (192.88.108.8) with AS and policy additions X X 1 AS1104 hef-router.nikhef.nl (192.87.45.80) [D1] X 2 AS1103 Amsterdam1.router.surfnet.nl (192.16.183.112) [E1] X 3 AS1103 Amsterdam2.router.surfnet.nl (145.41.9.130) [I] X 4 AS2043 amsterdam4.empb.net (193.172.4.17) [E1] X 5 AS2043 duesseldorf1.empb.net (193.172.4.6) [I] X 6 AS ??? 192.129.8.133 (192.129.8.133) [?] X 7 AS1274 dfnvmgate.gmd.de (192.76.246.23) [?] X 8 AS1275 dfnnoc.gmd.de (192.88.108.8) [ERROR] X XAS Path followed: 1104 1103 2043 ??? 1274 1275 X XAS1104 = NIKHEF-H XAS1103 = SURFnet IP XAS2043 = European Multiprotocol Backbone XAS1274 = GMD XAS1275 = GMD-DFN X.fi X.DE X.PP XHere we see a number of unknowns ("?"s). They start at hop 6. The first Xis due to not being able to see what AS network 192.129.8.0 belongs to. This Xhas the added "knock-on" effect of making impossible to tell if the Xrouting is correct for hop 5 to 6 and hop 6 to 7. X X.PP XAn example of the X.I longform Xformat is given: X X.DS C X.nf X.if t .ft C X% prtraceroute -l ns0.ja.net Xtraceroute to ns0.ja.net (193.63.94.20) with AS and policy additions X X 1 AS1104 hef-router.nikhef.nl (192.87.45.80) [D1] 3 3 ms X 2 AS1103 Amsterdam1.router.surfnet.nl (192.16.183.112) [E1] 3 2 ms X 3 AS1103 Amsterdam2.router.surfnet.nl (145.41.9.130) [I] 4 3 ms X 4 AS2043 amsterdam4.empb.net (193.172.4.17) [E1] 6 22 ms X 5 AS2043 london1.empb.net (193.172.4.5) [I] 22 22 ms X 6 AS2043 int-gw.ulcc.ac.uk (193.172.27.14) [I] 23 25 ms X 7 AS 786 ns0.ja.net (193.63.94.20) [E1] 27 40 ms X XAS Path followed: 1104 1103 2043 786 X XAS1104 = NIKHEF-H XAS1103 = SURFnet IP XAS2043 = European Multiprotocol Backbone XAS 786 = The JANET IP Service X X.fi X.DE X.PP XAs you can see RTTs are given after the normal prtraceroute output. Note Xthat this output is somewhat different to the normal traceroute output. XIt should also be noted that using the \-l flag will not always produce Xconsistent results. X.SH ENVIRONMENT X.IP "PRIDEHOST" 8 XThis will change the RR whoishost to use. The \-h option will override this. XThe default is WHOISHOST. X.IP "PRIDEPORT" 8 XThe will change the port number to use to connect to the RR. The \-p port Xwill override this. The default is port XPORT. X.SH LIMITATIONS XIf the destination network is not labeled with an AS number in the RR, the program Xwarns you of this and set the policy information field to unknown as it can't compute Xpolicy information without this information.. XGeneral lack of information in the RR Xdatabase will generate lots of question Xmarks as we have untraceable policies. XNeeds quite a number of whois queries, but never the same information Xtwice. XNeeds good "whois" connectivity to the whois server. X.SH AUTHORS XAll the tricky bits were done by Marten Terpstra with a lot of cosmetic work Xfrom Tony Bates. Daniel Karrenberg helped in the co-development of the idea Xand design for prtraceroute. Of course, none of this would be Xpossible without Van XJacobson's wonderful traceroute program. X.SH BUGS XThe \-l output does not produce consistent results. X.SH SEE ALSO Xwhois(1), perl(1), ping(8), traceroute(8). X.PP X"Representation of IP Routing Policies in the RIPE Database - ripe-81", XTony Bates, Jean-Michel Jouanigot, Daniel Karrenberg, Peter Lothberg, Marten XTerpstra. END_OF_prtraceroute.8 if test 10618 -ne `wc -c <prtraceroute.8`; then echo shar: \"prtraceroute.8\" unpacked with wrong size! fi # end of overwriting check fi if test -f Makefile -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"Makefile\" else echo shar: Extracting \"Makefile\" \(2786 characters\) sed "s/^X//" >Makefile <<'END_OF_Makefile' X# X# X# Copyright (c) 1993 The RARE Association X# X# All Rights Reserved X# X# Permission to use, copy, modify, and distribute this software and its X# documentation for any purpose and without fee is hereby granted, X# provided that the above copyright notice appear in all copies and that X# both that copyright notice and this permission notice appear in X# supporting documentation, and that the name of the author not be X# used in advertising or publicity pertaining to distribution of the X# software without specific, written prior permission. X# X# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL X# AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY X# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN X# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF X# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. X# X# X# X# $RCSfile: Makefile,v $ X# $Revision: 1.1 $ X# $Author: marten $ X# $Date: 1994/10/03 13:31:02 $ X# X# Makefile for policy routing tools X XSRC= prtraceroute.pl hostname.c XMAN= prtraceroute.8 X X#CC= cc XCC= gcc X# X# Local install stuff XBINDIR= /usr/local/bin XPERL= /usr/local/bin/perl XMANDIR= /usr/local/man XMANEXT= 8 XHOSTCMD= /bin/hostname XTRACEROUTE= traceroute XWHOISHOST= dbase.ripe.net XPORT= 43 X# X# If you are running Solaris 2.* set SOCKSTREAM to 2 X# otherwise leave it as it is X# XSOCKSTREAM= 1 X# XKEEPOPEN= TRUE XFAST= TRUE XVERSION= TRUE XSHAR= shar -odist.shar X XOBJ= prtraceroute XDIST= $(SRC) $(MAN) Makefile README INSTALL CHANGES TODO X Xprtraceroute: prtraceroute.pl Makefile $(DEP) X sed -e 's:WHOISHOST:$(WHOISHOST):' \ X -e 's: PORT: $(PORT):' \ X -e 's:PERL:$(PERL):' \ X -e 's:HOSTCMD:$(HOSTCMD):' \ X -e 's:TRACEROUTE:$(TRACEROUTE):' \ X -e 's:KEEPOPEN:$(KEEPOPEN):' \ X -e 's:SOCKSTREAM:$(SOCKSTREAM):' \ X -e 's:FAST:$(FAST):' \ X -e 's:VERSION:$(VERSION):' \ X < prtraceroute.pl | \ X $(PERL) -e 'while(<>) { chop; s/\s*$$//; next if (/^# #/); if(/(^.*)(# #.*$$)/) { printf "$$1\n"; next; } print "$$_\n"; }' > $@ X chmod 755 $@ X Xlib: prtraceroute.pl.lib X ./parseincludes < prtraceroute.pl.lib > prtraceroute.pl X Xinstall: $(OBJ) Makefile $(MAN) $(DEP) X sed -e 's:WHOISHOST:$(WHOISHOST):' \ X -e 's:XPORT:$(PORT):' $(MAN) > $(MAN).tmp X -install -m 755 $(OBJ) $(BINDIR) X -install -m 644 ${MAN}.tmp ${MANDIR}/man${MANEXT}/${MAN} X -rm $(MAN).tmp X Xhostname: hostname.o X $(CC) $(CFLAGS) -o hostname hostname.o X strip hostname X Xdist.shar: $(DIST) X $(SHAR) $(DIST) X X Xdist: dist.shar X Xall: prtraceroute hostname dist X Xman: $(MAN) X -install -m 644 ${MAN} ${MANDIR}/man${MANEXT}/${MAN} X Xclean: X -rm -f core a.out dist.shar *.o ,* $(OBJ) X X END_OF_Makefile if test 2786 -ne `wc -c <Makefile`; then echo shar: \"Makefile\" unpacked with wrong size! fi # end of overwriting check fi if test -f README -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"README\" else echo shar: Extracting \"README\" \(1390 characters\) sed "s/^X//" >README <<'END_OF_README' X# X# $RCSfile: README,v $ X# $Revision: 0.15 $ X# $Author: tony $ X# $Date: 1993/11/26 16:53:18 $ X X THIS IS THE README FOR PRTRACEROUTE X X XINTRODUCTION X X Prtraceroute is part of the PRIDE Tools release. It comes with a X simple installation procedure. It relies on having the following:- X X o perl X o traceroute X X built on your system. X X "perl" and "traceroute" can be obtained from any of the well known X ftp archive sites (preferably somewhere near to you). X X Prtraceroute is a version of traceroute that gives additional routing X policy information. It adds AS information to the normal traceroute X output, making use of Routing Registry (RR) database information. X It also checks with the RR database to see how the chosen route X compares with the the registered routing policies in the RR database. X X For more details look at the manual page. X XINSTALLATION X X See the file "INSTALL" for more details on installing prtraceroute. X X XPORTING ISSUES X X prtraceroute has been tested on both SUNOS and BSDI with various X versions of perl and traceroute without any problems. X prtraceroute uses "hostname". A simple version is supplied if your X system doesn't have this. X XBUG REPORTS, FIXES, COMMENTS AND HELP X X Please report bugs, enhancements and comments to the mailing X list below: X X pride-tools at ripe.net X X Enjoy !!!! END_OF_README if test 1390 -ne `wc -c <README`; then echo shar: \"README\" unpacked with wrong size! fi # end of overwriting check fi if test -f INSTALL -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"INSTALL\" else echo shar: Extracting \"INSTALL\" \(2936 characters\) sed "s/^X//" >INSTALL <<'END_OF_INSTALL' X# X# $RCSfile: INSTALL,v $ X# $Revision: 0.16 $ X# $Author: tony $ X# $Date: 1994/04/27 11:10:20 $ X XINSTALL - prtraceroute X XInstallation: X X- Edit the Makefile for X X BINDIR - Installation directory (default: /usr/local/bin) X X HOSTCMD - the hostname command for your system. X (A simple version is supplied which should work X on most platforms - probably not needed anyway). X X KEEPOPEN - Enables or disables keeping the tcp connection X for the built-in whois client. This will only work X with RIPE whoisd. Possible values are TRUE or FALSE. X (default: TRUE as using whois.ripe.net by default). X X MANDIR - Man directory (default: /usr/local/man) X X TRACEROUTE - the traceroute command on your system X (default: traceroute) X X X PERL - the full path of Perl on your system X (default: /usr/local/bin/perl) X X X WHOISHOST - Alternative RIPE whois server X (default: whois.ripe.net) X X PORT - Atlernate port for whois server X (default: 43) X X SOCKSTREAM - value of SOCK_STREAM. The default is 1. X On Solaris 2.* it is 2. If unsure you'll X need to check in sys/socket.h of your X system include files. Normally somewhere like X /usr/include/sys/socket.h and look for the X value of SOCK_STREAM. On most systems (not Solaris X 2.*) this will look like this. X #define SOCK_STREAM 1 /* stream socket */ X X X FAST - Used for getting whois data out of the daemon faster X This will only work the *latest* RIPE whoisd. X Possible values are TRUE or FALSE. X (default: TRUE as using whois.ripe.net by default). X X VERSION - Used for telling the daemon the version number of the X client. This will only work X with RIPE whoisd. Possible values are TRUE or FALSE. X (default: TRUE as using whois.ripe.net by default). X X XType the following: X X"make" - This will install a executable version in the current directory X X"make install" - This will install executable version in BINDIR X X"make clean" - This make clean, including executable versions in current dir X XOptionally: X X"make dist" - This will make a distribution in shar format (requires shar, or X you need to change the SHAR variable in the Makefile) X X"make hostname" - Probably not needed but in case. Makes a very simple version X of hosname. It WILL NOT install it anywhere (this is up to X you). Then edit HOSTCMD (setting it to simple hostname path) X the re-make. END_OF_INSTALL if test 2936 -ne `wc -c <INSTALL`; then echo shar: \"INSTALL\" unpacked with wrong size! fi # end of overwriting check fi if test -f CHANGES -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"CHANGES\" else echo shar: Extracting \"CHANGES\" \(1155 characters\) sed "s/^X//" >CHANGES <<'END_OF_CHANGES' X# X# X# $RCSfile: CHANGES,v $ X# $Revision: 0.15 $ X# $Author: tony $ X# $Date: 1994/04/27 11:10:20 $ X XThis FILE IS NOT UP TO DATE SORRY. X XChanges from the BETA-1 Release X----------------------------- X1. Added in FAST support. X This is needed due to the size of some of the RIPE-81 policy objects. X See AS1755. X X2. Added in VERSION support. X This is used to track the use of PRIDE tools. X X=========== X Xalpha-1.8 X Fixed local variable bug X Xalpha-1.7 X If no destination AS can be found, the program exits X because otherwise the output will be highly unpredictable X Xalpha-1.6 X Fixed silly bug where traceroute put some output on stderr X other on stdout, and the program got confused. X Xalpha-1.5 X RIPE whois client built in to avoid many forks and whois X compatibilty issues. X X All variables that may need to be altered are now in the X Makefile, and make will automatically alter them X X Argument checking, no extra arguments passed to traceroute X most give rubbish output. X X Corrected bug where RIPE whois servers did not return AS X information yet and the output got silly X Xalpha-1.4 X first "usable" release, although never released ;-) END_OF_CHANGES if test 1155 -ne `wc -c <CHANGES`; then echo shar: \"CHANGES\" unpacked with wrong size! fi # end of overwriting check fi if test -f TODO -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"TODO\" else echo shar: Extracting \"TODO\" \(143 characters\) sed "s/^X//" >TODO <<'END_OF_TODO' X# X# X# X# $RCSfile: TODO,v $ X# $Revision: 1.3 $ X# $Author: marten $ X# $Date: 1994/11/17 14:51:07 $ X XTo be filled in .... END_OF_TODO if test 143 -ne `wc -c <TODO`; then echo shar: \"TODO\" unpacked with wrong size! fi # end of overwriting check fi echo shar: End of shell archive. exit 0 -------- Logged at Thu Nov 17 18:34:25 MET 1994 ---------
[ rr-impl Archive ]