summaryrefslogtreecommitdiff
path: root/doc/ucis.ano
diff options
context:
space:
mode:
authorNick <nick@somerandomnick.ano>2010-06-14 02:04:24 +0000
committerNick <nick@somerandomnick.ano>2010-06-14 02:04:24 +0000
commit14c309b50e76c6d0cee556609f442e2bf44a201a (patch)
treef47e95c810f8a072bc30028c1f430227b4b74f2f /doc/ucis.ano
parent645152f983b59d93b9729333382b9332c3e367e8 (diff)
downloadresdb-14c309b50e76c6d0cee556609f442e2bf44a201a.tar.gz
resdb-14c309b50e76c6d0cee556609f442e2bf44a201a.zip
now pulls AS info from dn42 registry
Diffstat (limited to 'doc/ucis.ano')
-rwxr-xr-xdoc/ucis.ano/bgp_graph/path_list_to_dot.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/ucis.ano/bgp_graph/path_list_to_dot.php b/doc/ucis.ano/bgp_graph/path_list_to_dot.php
index e6a449f..7b29e44 100755
--- a/doc/ucis.ano/bgp_graph/path_list_to_dot.php
+++ b/doc/ucis.ano/bgp_graph/path_list_to_dot.php
@@ -22,9 +22,17 @@ foreach ($nodes as $node => $links) {
}
}
-function nodename ($node) { switch ($node) {
+function static_nodename ($node) { switch ($node) {
case '64731': return 'SRN (AS64731)';
-}; return 'AS'.$node; };
+ case '64766': return 'UFO (AS64766)';
+}; return NULL; };
+
+function nodename ($node) {
+ $node=preg_replace('/[^0-9]+/','',$node);
+ if (($name=static_nodename($node))!==NULL) return $name;
+ $name=rtrim(`echo $node | ./asn2adminc | ./hdl2person`);
+ if (empty($name)) return 'AS'.$node;
+return 'AS'.$node.' ('.$name.')'; };
$nodelist=array();
foreach ($nodes as $node => $links) {