# HG changeset patch # User Nick # Date 1276286332 0 # Node ID bec289fc3b4af16604276f65bd248ae9ac186717 # Parent e429d8af6e447c1d2da8652a678a89a5b5d6c6f1 attempt at testing AS names diff -r e429d8af6e44 -r bec289fc3b4a doc/ucis.ano/bgp_graph/path_list_to_dot.php --- a/doc/ucis.ano/bgp_graph/path_list_to_dot.php Fri Jun 11 16:43:18 2010 +0000 +++ b/doc/ucis.ano/bgp_graph/path_list_to_dot.php Fri Jun 11 19:58:52 2010 +0000 @@ -22,6 +22,20 @@ } } +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) {