Mercurial > hg > anonet-resdb
comparison doc/ucis.ano/bgp_graph/path_list_to_dot.php @ 36:14e97bffdd55 draft
was generating malformed dot
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Fri, 11 Jun 2010 20:04:28 +0000 |
parents | bec289fc3b4a |
children | fd9b90f6fbc1 |
comparison
equal
deleted
inserted
replaced
35:bec289fc3b4a | 36:14e97bffdd55 |
---|---|
31 if (!array_key_exists($node,$nodelist)) $nodelist[$node]=nodename($node); | 31 if (!array_key_exists($node,$nodelist)) $nodelist[$node]=nodename($node); |
32 foreach ($links as $link => $dummy) | 32 foreach ($links as $link => $dummy) |
33 if (!array_key_exists($link,$nodelist)) $nodelist[$node]=nodename($link); | 33 if (!array_key_exists($link,$nodelist)) $nodelist[$node]=nodename($link); |
34 }; | 34 }; |
35 | 35 |
36 print("graph BGP_nodes {\n"); | |
36 foreach ($nodelist as $node => $name) | 37 foreach ($nodelist as $node => $name) |
37 print "\t".$node.' [label="'.$name.'"]'."\n"; | 38 print "\t".$node.' [label="'.$name.'"]'."\n"; |
38 | 39 |
39 print("graph BGP_nodes {\n"); | |
40 foreach ($nodes as $node => $links) { | 40 foreach ($nodes as $node => $links) { |
41 foreach ($links as $link => $dummy) { | 41 foreach ($links as $link => $dummy) { |
42 print("\t".$node.' -- '.$link.";\n"); | 42 print("\t".$node.' -- '.$link.";\n"); |
43 } | 43 } |
44 } | 44 } |