Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2003 12:54:56 +0100 (CET)
From:      Janos Mohacsi <mohacsi@niif.hu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        edwin@FreeBSD.org
Subject:   ports/48001: New port: ASpath-tree a IPv6 route stability and correctness monitoring tool 
Message-ID:  <200302061154.h16BsuXV058353@skye.ki.iif.hu>

next in thread | raw e-mail | index | archive | help

>Number:         48001
>Category:       ports
>Synopsis:       New port: ASpath-tree a IPv6 route stability and correctness monitoring tool
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 06 04:00:30 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Janos Mohacsi
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
NIIF
>Environment:
System: FreeBSD skye.ki.iif.hu 4.7-STABLE FreeBSD 4.7-STABLE #0: Wed Jan 29 09:11:48 CET 2003 mohacsi@skye.ki.iif.hu:/usr/obj/usr/src/sys/SKYE i386

>Description:
New port: Aspath-tree version 4.1. A IPv6 route stability and correctness 
monitoring tool. It is working on Cisco/Juniper/Zebra routers.


>How-To-Repeat:

Apply this shar.

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	aspathtree
#	aspathtree/pkg-plist
#	aspathtree/pkg-descr
#	aspathtree/pkg-comment
#	aspathtree/distinfo
#	aspathtree/Makefile
#	aspathtree/files
#	aspathtree/files/patch-update-rtree
#	aspathtree/files/patch-readme.txt
#	aspathtree/files/patch-etc::ASpath-tree.config
#	aspathtree/files/patch-lib::getbgptable.pl
#	aspathtree/pkg-message
#	aspathtree/scripts
#	aspathtree/scripts/configure
#
echo c - aspathtree
mkdir -p aspathtree > /dev/null 2>&1
echo x - aspathtree/pkg-plist
sed 's/^X//' >aspathtree/pkg-plist << 'END-of-aspathtree/pkg-plist'
Xaspathtree/etc/ASpath-tree.config.orig
Xaspathtree/etc/ASpath-tree.config.bak
Xaspathtree/etc/ASpath-tree.config.dist
Xaspathtree/htdocs/icons/bnew.gif
Xaspathtree/htdocs/icons/bold.gif
Xaspathtree/htdocs/icons/e.gif
Xaspathtree/htdocs/icons/h.gif
Xaspathtree/htdocs/icons/l.gif
Xaspathtree/htdocs/icons/p.gif
Xaspathtree/htdocs/icons/t.gif
Xaspathtree/htdocs/icons/v.gif
Xaspathtree/lib/getbgptable.pl.orig
Xaspathtree/lib/bgp-tree-changes.pl
Xaspathtree/lib/bgp-tree.pl
Xaspathtree/lib/create-homepage.pl
Xaspathtree/lib/elaborate-aspaths.pl
Xaspathtree/lib/history.pl
Xaspathtree/lib/ipv6prefix.pl
Xaspathtree/lib/odd-as.pl
Xaspathtree/lib/odd-routes.pl
Xaspathtree/lib/route-stability.pl
Xaspathtree/lib/getbgptable.pl
Xaspathtree/lib/utility.pl
Xaspathtree/lib/ASmain.pl
Xaspathtree/data/6bone.db
Xaspathtree/data/force.as.name
Xaspathtree/data/rirs.db
Xaspathtree/DISCLAIMER
Xaspathtree/update-rtree.bak
Xaspathtree/update-rtree
Xaspathtree/readme.txt.orig
Xaspathtree/readme.txt
Xaspathtree/changes.txt
Xaspathtree/update-rtree.orig
X@dirrm aspathtree/etc
X@dirrm aspathtree/htdocs/changes
X@dirrm aspathtree/htdocs/details
X@dirrm aspathtree/htdocs/icons
X@dirrm aspathtree/htdocs/trash
X@dirrm aspathtree/htdocs
X@dirrm aspathtree/history/bbtree
X@dirrm aspathtree/history/completetree
X@dirrm aspathtree/history/othertree
X@dirrm aspathtree/history/other
X@dirrm aspathtree/history/ptlas
X@dirrm aspathtree/history
X@dirrm aspathtree/lib
X@dirrm aspathtree/data
X@dirrm aspathtree/log
X@dirrm aspathtree
END-of-aspathtree/pkg-plist
echo x - aspathtree/pkg-descr
sed 's/^X//' >aspathtree/pkg-descr << 'END-of-aspathtree/pkg-descr'
XASpath-tree program
X============================
X
XASpath-tree is a tool designed to be used by an IPv6 site involved
Xin the experimentation of the BGP4+ protocol inside the 6Bone network.
XIt generates summary of:
X
X    * the number of route entries (valid/total/suppressed/damped/history)
X    * the number of AS in table (total, originating only, originating/transit, 
X      transit only, private and reserved)
X    * the number of active AS paths
X    * the number of active BGP neighbours (i.e. announcing routing information)
X    * an analysis of the network size, in terms of AS distances
X    * the number of circulating prefixes (total, 6Bone pTLAs, sTLAs, 6to4, 
X      others) 
X
XThe current version supports:
X    * 6Bone pTLAs
X    * RIR's assigned sTLAs 
X    * Juniper/Cisco/Zebra routers
X
XWWW: http://carmen.ipv6.cselt.it/ipv6/tools/ASpath-tree/index.html
X
Xjanos.mohacsi@bsd.hu
END-of-aspathtree/pkg-descr
echo x - aspathtree/pkg-comment
sed 's/^X//' >aspathtree/pkg-comment << 'END-of-aspathtree/pkg-comment'
XChecks IPv6 routes' stability and correctness on 6Bone/IPv6 internet
END-of-aspathtree/pkg-comment
echo x - aspathtree/distinfo
sed 's/^X//' >aspathtree/distinfo << 'END-of-aspathtree/distinfo'
XMD5 (ASpath-tree-v4.1.tar.gz) = 1c5d7f84c00b6b30da2705bd1feedd27
END-of-aspathtree/distinfo
echo x - aspathtree/Makefile
sed 's/^X//' >aspathtree/Makefile << 'END-of-aspathtree/Makefile'
X# New ports collection makefile for:    aspathtree
X# Date created:         06.05.2002
X# Whom: Janos Mohacsi <janos.mohacsi@bsd.hu>
X#
X# $FreeBSD$
X
XPORTNAME=	aspathtree
XPORTVERSION=	4.1
XCATEGORIES=	ipv6 net
XMASTER_SITES=	#http://carmen.ipv6.cselt.it/ipv6/tools/ASpath-tree/index.html
XDISTNAME=	ASpath-tree-v${PORTVERSION}
X
XMAINTAINER=	Janos.Mohacsi@bsd.hu
X
XRUN_DEPENDS=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/Telnet.pm:${PORTSDIR}/net/p5-Net-Telnet \
X		ripewhois:${PORTSDIR}/net/ripetools
X
XWRKSRC=			${WRKDIR}/ASpath-tree-v4.1/
XRESTRICTED=		"not redistributable, license agreement required"
XNO_CDROM=	${RESTRICTED}
XNO_PACKAGE=	${RESTRICTED}
XNO_BUILD=	yes
XUSE_PERL5=	yes
XSCRIPTS_ENV+=	PERL5=${PERL5}
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
Xdo-fetch:
X	@if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
X	${ECHO} '======================================================='; \
X	${ECHO} 'You need to read the license and disclaimer on '; \
X	${ECHO} 'http://carmen.ipv6.tilab.com/cgi-bin/download.pl?pkg=ASpath-tree'; \
X	${ECHO} 'and fetch on your own.'; \
X	${ECHO} 'Once ${DISTFILES} has been downloaded, move it to '; \
X	${ECHO} '${DISTDIR} and then restart this build '; \
X	${ECHO} '======================================================='; \
X	fi
X
Xdo-install:
X	@if [ ! -d ${PREFIX}/aspathtree ]; then \
X		${MKDIR} ${PREFIX}/aspathtree ; fi
X	${CP} -R ${WRKSRC}/* ${PREFIX}/aspathtree/
X	${CHMOD} +x ${PREFIX}/aspathtree/update-rtree
X
Xpost-install:
X	@${SED} -e "s:%%PREFIX%%:${PREFIX}:g" pkg-message >${PKGMESSAGE}
X.if !defined(BATCH)
X	@${ECHO}
X	@${CAT} ${PKGMESSAGE}
X	@${ECHO}
X.endif
X
X.include <bsd.port.mk>
END-of-aspathtree/Makefile
echo c - aspathtree/files
mkdir -p aspathtree/files > /dev/null 2>&1
echo x - aspathtree/files/patch-update-rtree
sed 's/^X//' >aspathtree/files/patch-update-rtree << 'END-of-aspathtree/files/patch-update-rtree'
X--- update-rtree.orig	Thu Feb  6 12:10:14 2003
X+++ update-rtree	Thu Feb  6 12:14:52 2003
X@@ -1,13 +1,13 @@
X-#!/usr/local/bin/perl
X+#!%%PATHPERLBIN%%
X #### ASpath-tree v.4.1 - Released on Tue DEC 10 2002, h.10:02:25
X #### File: update-rtree Last modified on Mon DEC 9 2002, h.22:42:19
X 
X # Main ASpath-tree script
X # Configuration File
X-my $CONFIGFILE = "/etc/ASpath-tree.config";
X+my $CONFIGFILE = "%%PREFIX%%/etc/ASpath-tree.config";
X 
X # Global variables
X-use vars qw ($HOMEDIR $RSHDIR $ROUTER $LOCAL $ROUTERADDR $ROUTERUSER $CONTACTNAME $CONTACTMAIL $SITENAME $SITEPICTURE $HTMLDIR
X+use vars qw ($HOMEDIR $RSHDIR $ROUTER $LOCAL $ROUTERADDR $ROUTERUSER $ROUTERUSERPASS $CONTACTNAME $CONTACTMAIL $SITENAME $SITEPICTURE $HTMLDIR
X              $WHOISLINK $QUIET $DEBUG $FILTEROUT $RIPEWHOISCLIENT);
X use vars qw ($DATADIR $ROOTPICTURE $LIB $ICONS $WARNINGTIME $HISTORYPERIOD $FLAG_COLLECT $LONGDATE $CURRENTTIME $LASTRUN);
X use vars qw ($SIXBONEDB $IPV6PREFIXTABLE $PTLA_FILE $HISTORYFILE $LASTRUNFILE $OLDASPATHSFILE $OLDDATEFILE $OLDBBASPATHSFILE
X@@ -95,6 +95,7 @@
X 		if ($line =~ /^\s*LOCAL\s*=\s*(.*)/)         {$LOCAL = $1}
X 		if ($line =~ /^\s*ROUTERADDR\s*=\s*(.*)/)    {$ROUTERADDR = $1}
X 		if ($line =~ /^\s*ROUTERUSER\s*=\s*(.*)/)    {$ROUTERUSER = $1}
X+		if ($line =~ /^\s*ROUTERUSERPASS\s*=\s*(.*)/)    {$ROUTERUSERPASS = $1}
X 		if ($line =~ /^\s*CONTACTNAME\s*=\s*(.*)/)   {$CONTACTNAME = $1}
X 		if ($line =~ /^\s*CONTACTMAIL\s*=\s*(.*)/)   {$CONTACTMAIL = $1}
X 		if ($line =~ /^\s*SITENAME\s*=\s*(.*)/)      {$SITENAME = $1}
X@@ -111,7 +112,7 @@
X 	die "ERROR in configuration file: parameter HOMEDIR not correct!\n"    unless (-e "$HOMEDIR/update-rtree");
X 	# enabling log to file if required
X 	$LOGDIR = "$HOMEDIR/log";
X-	unless (-e "$LOGDIR") {mkdir("$LOGDIR", 0777)};
X+	unless (-e "$LOGDIR") {mkdir("$LOGDIR", 0775)};
X 	if ($DEBUG) {
X 		open(LOGFILE,"> $LOGDIR/runlog.txt");
X 		print LOGFILE "ASpath-tree DEBUG log file\n\n";
X@@ -229,28 +230,28 @@
X 
X # Creating directories if required...
X 
X-	unless (-e "$PTLASHISTORYDIR") {mkdir("$PTLASHISTORYDIR", 0777); &log_it("$PTLASHISTORYDIR created.")};
X-	unless (-e "$OTHERHISTORYDIR") {mkdir("$OTHERHISTORYDIR", 0777); &log_it("$OTHERHISTORYDIR created.")};
X-	unless (-e "$HOMEDIR/history/bbtree") {mkdir("$HOMEDIR/history/bbtree", 0777); &log_it("$HOMEDIR/history/bbtree created.")};
X-	unless (-e "$HOMEDIR/history/completetree") {mkdir("$HOMEDIR/history/completetree", 0777); &log_it("$HOMEDIR/history/completetree created.")};
X-	unless (-e "$HOMEDIR/history/othertree") {mkdir("$HOMEDIR/history/othertree", 0777); &log_it("$HOMEDIR/history/othertree created.")};
X-	unless (-e "$DETAILDIR") {mkdir("$DETAILDIR", 0777); &log_it("$DETAILDIR created.")};
X-	unless (-e "$DETAILDIRCO") {mkdir("$DETAILDIRCO", 0777); &log_it("$DETAILDIRCO created.")};
X-	unless (-e "$DETAILDIRBB") {mkdir("$DETAILDIRBB", 0777); &log_it("$DETAILDIRBB created.")};
X-	unless (-e "$DETAILDIRIANA") {mkdir("$DETAILDIRIANA", 0777); &log_it("$DETAILDIRIANA created.")};
X-	unless (-e "$HISTORYHTMLDIR") {mkdir("$HISTORYHTMLDIR", 0777); &log_it("$HISTORYHTMLDIR created.")};
X-	unless (-e "$CHANGESDIR") {mkdir("$CHANGESDIR", 0777); &log_it("$CHANGESDIR created.")}
X-	unless (-e "$HTMLDIR_LOCAL/trash") {mkdir("$HTMLDIR_LOCAL/trash", 0777); &log_it("$HTMLDIR_LOCAL/trash created.")}
X+	unless (-e "$PTLASHISTORYDIR") {mkdir("$PTLASHISTORYDIR", 0775); &log_it("$PTLASHISTORYDIR created.")};
X+	unless (-e "$OTHERHISTORYDIR") {mkdir("$OTHERHISTORYDIR", 0775); &log_it("$OTHERHISTORYDIR created.")};
X+	unless (-e "$HOMEDIR/history/bbtree") {mkdir("$HOMEDIR/history/bbtree", 0775); &log_it("$HOMEDIR/history/bbtree created.")};
X+	unless (-e "$HOMEDIR/history/completetree") {mkdir("$HOMEDIR/history/completetree", 0775); &log_it("$HOMEDIR/history/completetree created.")};
X+	unless (-e "$HOMEDIR/history/othertree") {mkdir("$HOMEDIR/history/othertree", 0775); &log_it("$HOMEDIR/history/othertree created.")};
X+	unless (-e "$DETAILDIR") {mkdir("$DETAILDIR", 0775); &log_it("$DETAILDIR created.")};
X+	unless (-e "$DETAILDIRCO") {mkdir("$DETAILDIRCO", 0775); &log_it("$DETAILDIRCO created.")};
X+	unless (-e "$DETAILDIRBB") {mkdir("$DETAILDIRBB", 0775); &log_it("$DETAILDIRBB created.")};
X+	unless (-e "$DETAILDIRIANA") {mkdir("$DETAILDIRIANA", 0775); &log_it("$DETAILDIRIANA created.")};
X+	unless (-e "$HISTORYHTMLDIR") {mkdir("$HISTORYHTMLDIR", 0775); &log_it("$HISTORYHTMLDIR created.")};
X+	unless (-e "$CHANGESDIR") {mkdir("$CHANGESDIR", 0775); &log_it("$CHANGESDIR created.")}
X+	unless (-e "$HTMLDIR_LOCAL/trash") {mkdir("$HTMLDIR_LOCAL/trash", 0775); &log_it("$HTMLDIR_LOCAL/trash created.")}
X 	else {system "rm -rf $HTMLDIR_LOCAL/trash/*"; &log_it("Trash empty")}
X 	if (-d $HTMLDIR) {
X-		unless (-e "$HTMLDIR/details") {mkdir("$HTMLDIR/details", 0777); &log_it("$HTMLDIR/details created.")}
X-		unless (-e "$HTMLDIR/details/complete") {mkdir("$HTMLDIR/details/complete", 0777); &log_it("$HTMLDIR/details/complete created.")}
X-		unless (-e "$HTMLDIR/details/backbone") {mkdir("$HTMLDIR/details/backbone", 0777); &log_it("$HTMLDIR/details/backbone created.")}
X-		unless (-e "$HTMLDIR/details/otherIANA") {mkdir("$HTMLDIR/details/otherIANA", 0777); &log_it("$HTMLDIR/details/otherIANA created.")}
X-		unless (-e "$HTMLDIR/24h_history") {mkdir("$HTMLDIR/24h_history", 0777); &log_it("$HTMLDIR/24h_history created.")}
X-		unless (-e "$HTMLDIR/changes") {mkdir("$HTMLDIR/changes", 0777); &log_it("$HTMLDIR/changes created.")}
X+		unless (-e "$HTMLDIR/details") {mkdir("$HTMLDIR/details", 0775); &log_it("$HTMLDIR/details created.")}
X+		unless (-e "$HTMLDIR/details/complete") {mkdir("$HTMLDIR/details/complete", 0775); &log_it("$HTMLDIR/details/complete created.")}
X+		unless (-e "$HTMLDIR/details/backbone") {mkdir("$HTMLDIR/details/backbone", 0775); &log_it("$HTMLDIR/details/backbone created.")}
X+		unless (-e "$HTMLDIR/details/otherIANA") {mkdir("$HTMLDIR/details/otherIANA", 0775); &log_it("$HTMLDIR/details/otherIANA created.")}
X+		unless (-e "$HTMLDIR/24h_history") {mkdir("$HTMLDIR/24h_history", 0775); &log_it("$HTMLDIR/24h_history created.")}
X+		unless (-e "$HTMLDIR/changes") {mkdir("$HTMLDIR/changes", 0775); &log_it("$HTMLDIR/changes created.")}
X 		unless (-e "$HTMLDIR/icons") {
X-			mkdir("$HTMLDIR/icons", 0777);
X+			mkdir("$HTMLDIR/icons", 0775);
X 			system("cp $ICONSDIR/* $HTMLDIR/icons");
X 			&log_it("$HTMLDIR/icons created and template icons copied.");
X 		}
END-of-aspathtree/files/patch-update-rtree
echo x - aspathtree/files/patch-readme.txt
sed 's/^X//' >aspathtree/files/patch-readme.txt << 'END-of-aspathtree/files/patch-readme.txt'
X--- readme.txt.orig	Thu Feb  6 11:50:12 2003
X+++ readme.txt	Thu Feb  6 12:07:49 2003
X@@ -62,7 +62,7 @@
X (up to 8) and FreeBSD (up to 4.5) platforms and it should work
X without problems on any Unix platform (Linux, etc.) with
X Perl (version equal or greater than 5.0) installed.
X-BGP routes are collected using rsh commands. The current release
X+BGP routes are collected using rsh or telnet commands. The current release
X works with cisco routers, zebra routers and juniper routers running
X IPv6 capable software versions.
X 
X@@ -114,8 +114,9 @@
X The main script is "update-rtree"; to be executed properly it must be
X customized by editing the text file
X            "etc/ASpath-tree.config"
X-and the target router must be configured to accept rsh commands from
X-the workstation which is running the ASpath-tree scripts.
X+and the target router must be configured to accept rsh commands or 
X+telnet access from the workstation which is running the ASpath-tree 
X+scripts.
X 
X Configuring the target router
X -----------------------------
X@@ -125,6 +126,12 @@
X The administrator of the cisco router must perform the following
X configurations:
X 
X+Option 1: rsh collection
X+------------------------
X+The router must be configured to accept rsh commands coming from the
X+remote workstation which is running the ASpath-tree scripts in the
X+following way:
X+
X   ip rcmd remote-host <router-username> <remote-ip-address> <remote-
X   username>
X   ip rcmd rsh-enable
X@@ -154,9 +161,28 @@
X scripts to collect the routing information available on the cisco
X router.
X 
X+Option 2: telnet collection
X+---------------------------
X+The router must be configured to accept telnet commands coming from the
X+remote workstation which is running the ASpath-tree scripts.
X+
X+<router-username> is the name of the telnet user enabled to show the bgp
X+table on the cisco router.
X+
X+<router-username-password> is the corresponding password of the telnet user
X+enabled to show the bgp table on the cisco router.
X+
X+Consult the Cisco documentations, how to configure such a settings.
X+
X+If you configure ROUTERUSERPWD then the telnet option automatically selected.
X+
X+
X JUNIPER
X -------
X 
X+Option 1: rsh collection
X+------------------------
X+
X With a juniper router, you have first to enable the rsh service
X on the router, then to set the permission to receive rsh commands
X from the ASpath-tree WS. Let's assume you have configured a user
X@@ -188,6 +214,13 @@
X This is exactly the rsh command used by the ASpath-tree scripts to
X collect the routing information available on the juniper router.
X 
X+Option 2: telnet collection
X+---------------------------
X+
X+configure an user <router-username> with password <router-password on
X+the Juniper router with view permisssion. Consult your Juniper 
X+documentation about that.
X+
X ZEBRA
X -----
X To use ASpath-tree with zebra routers, the "vtysh" CLI emulator must
X@@ -257,7 +290,12 @@
X              router have IPv6 capable rsh implementations.
X 
X ROUTERUSER   is the username on the router that you have to use to
X-             run remote rsh commands.
X+             run remote rsh commands or telnet. 
X+
X+ROUTERUSERPASS
X+             is an optional parameter to use for telnet collection. If you
X+             configure this parameter telnet mode will be used automatically.
X+             DO NOT SPECIFY this parameter if you use RSH collection.
X 
X HTMLDIR      is the full path to the directory where the generated
X              html files have to be placed. If you do not specify this
X@@ -592,6 +630,9 @@
X         Raffaele D'Albenzio, Ivano Guardini and Paolo Fasano
X         <ipv6@tilab.com>
X         ----------------------------------------------------
X+	Telnet modul addition
X+        Janos Mohacsi <mohacsi@niif.hu> - 6NET project
X+	----------------------------------------------------
X 
X #### ASpath-tree v.4.1 - Released on Tue DEC 10 2002, h.10:02:25
X #### File: readme.txt Last modified on Mon DEC 9 2002, h.22:46:11
END-of-aspathtree/files/patch-readme.txt
echo x - aspathtree/files/patch-etc::ASpath-tree.config
sed 's/^X//' >aspathtree/files/patch-etc::ASpath-tree.config << 'END-of-aspathtree/files/patch-etc::ASpath-tree.config'
X--- etc/ASpath-tree.config.orig	Tue Dec 10 10:02:25 2002
X+++ etc/ASpath-tree.config	Thu Feb  6 12:38:15 2003
X@@ -9,7 +9,7 @@
X # Full path to the directory where you have installed the ASpath-tree
X # scripts. It is the directory where the script create-bgp-pages is
X # located
X-HOMEDIR = /usr/local/ASpath-tree-v4.1
X+HOMEDIR = %%PREFIX%%/aspathree/
X 
X # Router you are using. Currently supported platforms include Cisco, Juniper
X # and Zebra routers. Allowed values are "CISCO", "JUNIPER" , "ZEBRA" and
X@@ -37,8 +37,14 @@
X # command:
X #         ip rcmd remote-host
X #              <router-user> <client-ip-address>  <client-user>
X+# or the telnet user. See ROUTERUSERPASS also.
X ROUTERUSER = router
X 
X+# The password of the telnet user which have been enabled on the cisco 
X+# router to issue 'show bgp ipv6' command. Set up only if you want to
X+# use the telnet mode.
X+# ROUTERUSERPASS = router
X+
X # The full path to the directory where the generated html files have to be
X # placed. If you do not specify this option the html files are stored under
X # the htdocs/ directory which comes with the distribution
X@@ -46,15 +52,15 @@
X # HTMLDIR = /usr/local/httpd/htdocs/bgp
X 
X # The contactname which is placed at the bottom of the generated html pages
X-CONTACTNAME = IPv6 group
X+CONTACTNAME = Your IPv6 group
X 
X # e-mail address of the contact person. It is placed at the bottom of the
X # generated html pages together with the contactname
X- CONTACTMAIL = me@myhost.com
X+ CONTACTMAIL = your@ipv6.mail
X 
X # The name of your IPv6 site. It is used as the root of the BGP4+ routing
X # tree displayed by the generated html pages
X-SITENAME = TILAB
X+SITENAME = Your IPv6 project
X 
X # The name of the image file (for instance a graphical logo representing
X # your IPv6 site) to be placed at the beginning of the generated html
X@@ -71,7 +77,7 @@
X # WHOISLINK = http://whois.6bone.net/cgi-bin/whois
X 
X # A flag to enable the display of the last changes on the tree. Set
X-# CHANGESFLAG = 1
X+CHANGESFLAG = 1
X # to see the display as html pages accessible from a link within the tree pages
X 
X # A flag to control which routes are filtered out from the output of
X@@ -83,7 +89,7 @@
X # installed on the same WS that hosts ASpath-tree
X # This parameter is needed only if you want to update via ASpath-tree the
X # useful information available on whois DBs connected to the Internet
X-# RIPEWHOISCLIENT = /usr/local/bin/whois3
X+RIPEWHOISCLIENT = /usr/local/bin/ripewhois
X 
X #### ASpath-tree v.4.1 - Released on Tue DEC 10 2002, h.10:02:25
X #### File: etc/ASpath-tree.config Last modified on Mon DEC 9 2002, h.15:52:30
END-of-aspathtree/files/patch-etc::ASpath-tree.config
echo x - aspathtree/files/patch-lib::getbgptable.pl
sed 's/^X//' >aspathtree/files/patch-lib::getbgptable.pl << 'END-of-aspathtree/files/patch-lib::getbgptable.pl'
X--- lib/getbgptable.pl.orig	Thu Feb  6 11:25:26 2003
X+++ lib/getbgptable.pl	Thu Feb  6 11:43:58 2003
X@@ -24,10 +24,55 @@
X #     ASs  (all the ASs in the router BGP table)
X # Finally this routine produces a text file containing the raw version of the router table
X # and if required log files of both the raw router table and the normalized table.
X+
X+
X sub get_bgp_table {
X 	my ($parser, $command, $line) = ('', '', '');
X 	my (@lines) = ();
X 
X+	use Socket;
X+        use Net::Telnet;
X+
X+	if (defined($ROUTERUSERPASS)) {
X+
X+# TELNET module to get BGP4+ AS Path table
X+
X+	if ($ROUTER =~ /^JUNIPER$/i) {
X+		$parser = "juniper";
X+		$STATUSCODES = "*&gt; active";
X+        	my $telnet_session = new Net::Telnet(
X+	        prompt => '/[\w().-]*[\$#]\s*$/'
X+       		);
X+
X+	        $telnet_session->open($ROUTERADDR);
X+       		$telnet_session->login($ROUTERUSER, $ROUTERUSERPASS);
X+	        $telnet_session->cmd(String => "set cli screen-length 0", Timeout => 1800);
X+
X+       		 @lines = $telnet_session->cmd(String => "show route table inet6.0 all terse",
X+                                  Timeout => 1800);
X+	        $telnet_session->close;
X+	} else {
X+		$ROUTER = "CISCO";
X+		$parser = "cisco";
X+		$STATUSCODES = "s suppressed, d damped, h history, * valid, &gt; best, r RIB-failure";
X+       		my $telnet_session = new Net::Telnet(
X+	        prompt => '/[\w().-]*[\$#]\s*$/'
X+       		);
X+
X+	        $telnet_session->open($ROUTERADDR);
X+       		$telnet_session->login($ROUTERUSER, $ROUTERUSERPASS);
X+	        $telnet_session->cmd(String => "terminal length 0", Timeout => 1800);
X+
X+       		@lines = $telnet_session->cmd(String => "show bgp ipv6",
X+                                  Timeout => 1800);
X+	        $telnet_session->close;
X+	}
X+# end TELNET module
X+
X+        } else {
X+
X+# RSH module to get BGP4+ AS Path table
X+
X 	if ($ROUTER =~ /^JUNIPER$/i) {
X 		$parser = "juniper";
X 		$STATUSCODES = "*&gt; active";
X@@ -58,6 +103,7 @@
X 		push(@lines, $_);
X 	}
X 	close(OUTPUT);
X+	}
X 	chomp(@lines);
X # Write log and for web files (raw table)
X 	open(TXTFILE,"> $BGPTABLEFILE");
END-of-aspathtree/files/patch-lib::getbgptable.pl
echo x - aspathtree/pkg-message
sed 's/^X//' >aspathtree/pkg-message << 'END-of-aspathtree/pkg-message'
XFor to configuration information please look at 
X%%PREFIX%%/aspathtree/readme.txt. 
X
XCopy %%PREFIX%%/aspathtree/etc/ASpath-tree.config.dist to 
X%%PREFIX%%/etc/ASpath-tree.config
Xand modify accordingly to your environment.
END-of-aspathtree/pkg-message
echo c - aspathtree/scripts
mkdir -p aspathtree/scripts > /dev/null 2>&1
echo x - aspathtree/scripts/configure
sed 's/^X//' >aspathtree/scripts/configure << 'END-of-aspathtree/scripts/configure'
X#!/bin/sh
X#
X# $FreeBSD$
X
XFILES_CONF="update-rtree etc/ASpath-tree.config"
X
Xfor f in $FILES_CONF ; do
X	mv ${WRKSRC}/${f} ${WRKSRC}/$f.bak && sed <${WRKSRC}/${f}.bak \
X		s+%%PATHPERLBIN%%+${PERL5}+g >${WRKSRC}/${f}
X	mv ${WRKSRC}/${f} ${WRKSRC}/$f.bak && sed <${WRKSRC}/${f}.bak \
X		s+%%PREFIX%%+${PREFIX}+g >${WRKSRC}/${f}
Xdone
X
X# rename to dist
Xmv ${WRKSRC}/etc/ASpath-tree.config ${WRKSRC}/etc/ASpath-tree.config.dist
END-of-aspathtree/scripts/configure
exit


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302061154.h16BsuXV058353>