head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.8 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.6 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.4 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.2 pkgsrc-2011Q2-base:1.3 pkgsrc-2010Q4:1.2.0.16 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.14 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.12 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.10 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.8 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.6 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.4 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.2 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.1.0.16 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.14 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.12 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.10 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.8 pkgsrc-2008Q1:1.1.0.6 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.4 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.2 pkgsrc-2007Q3-base:1.1; locks; strict; comment @# @; 1.3 date 2011.03.19.19.59.47; author spz; state dead; branches; next 1.2; 1.2 date 2009.02.14.16.17.06; author spz; state Exp; branches; next 1.1; 1.1 date 2007.09.07.21.26.33; author spz; state Exp; branches; next ; desc @@ 1.3 log @remove obsolete irrtoolset-nox11 @ text @$NetBSD: patch-df,v 1.2 2009/02/14 16:17:06 spz Exp $ --- src/prtraceroute/prtraceroute.cc.orig 2002-04-09 13:48:47.000000000 +0200 +++ src/prtraceroute/prtraceroute.cc @@@@ -103,6 +103,7 @@@@ extern IRR * irr; // defined in irr.cc int opt_rusage = 0; +int opt_asdot = true; int policy_flag = 1; int nflag = 0; @@@@ -171,6 +172,7 @@@@ main (int argc, char **argv, char **envp ICMPProbeReply reply; // wait for incoming icmp's Timer t1, t2; int ttl, got_there = 0, unreachable = 0; + char buf[64]; printf ("prtraceroute to %s (%s), %d hops max, %d byte packets\n", dst, dstip->getIpaddr(), max_ttl, datalen); @@@@ -192,7 +194,8 @@@@ main (int argc, char **argv, char **envp ipAddr *ipaddr = new ipAddr (newaddr); if (policy_flag) { path.addHop(ipaddr, ttl); - printf (" [AS%d]", path.getHopAS(ttl)); + asnum_string(buf, path.getHopAS(ttl)); + printf (" [%s]", buf); } if (!nflag) { printf (" %s (%s)", ipaddr->getName(), @@@@ -401,6 +404,9 @@@@ init_and_set_options (int argc, char **a IRR_COMMAND_LINE_OPTIONS, + {"-asplain", ARGV_BOOL, (char *) NULL, (char *) &opt_asdot, + "print AS numbers in asplain format."}, + // prtraceroute specific arguments {"-g", ARGV_FUNC, (char *)gFlag, (char *)NULL, "Gateway"}, @@@@ -690,6 +696,7 @@@@ Path::process_policies() { const AutNum * autnum; char test[80]; + char buf[64]; actiondictionary = new ActionDictionary; @@@@ -796,7 +803,8 @@@@ Path::process_policies() { for (i = last_ttl; i >= 0; i--) { if (hops[i] != NULL) { //cout << i << " AS" << getHopAS(i) << " "; - printf ("%3d AS%d", i, getHopAS(i)); + asnum_string(buf, getHopAS(i)); + printf ("%3d %s", i, buf); if (nflag) // XXX, this is a global, and is bad!!! //cout << hops[i]->ipaddr->getIpaddr(); printf (" %-35s", hops[i]->ipaddr->getIpaddr()); @ 1.2 log @add new option -asplain that makes extended autnums be output as simple numbers instead of in asdot format. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @patches irrtoolset to handle extended autnums most changes supplied by mlelstv@@NetBSD.org (Michael van Elst) patch to src/rpsl/rpsl/rptype.cc supplied by he@@NetBSD.org (Havard Eidnes) also fixes PR pkg/36807 @ text @d5 9 a13 1 @@@@ -171,6 +171,7 @@@@ main (int argc, char **argv, char **envp d21 1 a21 1 @@@@ -192,7 +193,8 @@@@ main (int argc, char **argv, char **envp d31 11 a41 1 @@@@ -690,6 +692,7 @@@@ Path::process_policies() { d49 1 a49 1 @@@@ -796,7 +799,8 @@@@ Path::process_policies() { @