summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick <nick@somerandomnick.ano>2010-06-11 19:58:52 +0000
committerNick <nick@somerandomnick.ano>2010-06-11 19:58:52 +0000
commit2e8b757b64e8d8449cefb870581ac4d49dba32e9 (patch)
tree3a0f62d26668fb6b387fcb6c97491dbe2b1e8c0e /doc
parent451562c3f594347870c9c961ddc0aa41d0278f2d (diff)
downloadresdb-2e8b757b64e8d8449cefb870581ac4d49dba32e9.tar.gz
resdb-2e8b757b64e8d8449cefb870581ac4d49dba32e9.zip
attempt at testing AS names
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/ucis.ano/bgp_graph/path_list_to_dot.php14
1 files changed, 14 insertions, 0 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 1c54583..5ad8152 100755
--- a/doc/ucis.ano/bgp_graph/path_list_to_dot.php
+++ b/doc/ucis.ano/bgp_graph/path_list_to_dot.php
@@ -22,6 +22,20 @@ foreach ($nodes as $node => $links) {
}
}
+function nodename ($node) { switch ($node) {
+ case '64731': return 'SRN';
+}; return $node; };
+
+$nodelist=array();
+foreach ($nodes as $node => $links) {
+ if (!array_key_exists($node,$nodelist)) $nodelist[$node]=nodename($node);
+ foreach ($links as $link => $dummy)
+ if (!array_key_exists($link,$nodelist)) $nodelist[$node]=nodename($link);
+};
+
+foreach ($nodelist as $node => $name)
+ print "\t".$node.' [label="'.$name.'"]'."\n";
+
print("graph BGP_nodes {\n");
foreach ($nodes as $node => $links) {
foreach ($links as $link => $dummy) {