summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick <nick@somerandomnick.ano>2010-06-14 02:42:56 +0000
committerNick <nick@somerandomnick.ano>2010-06-14 02:42:56 +0000
commit184b11b5f660476c9ae3081ff0951ce352e568de (patch)
treeea390024de4df315972d4bcb655a5966caeb7768 /doc
parent14c309b50e76c6d0cee556609f442e2bf44a201a (diff)
downloadresdb-184b11b5f660476c9ae3081ff0951ce352e568de.tar.gz
resdb-184b11b5f660476c9ae3081ff0951ce352e568de.zip
added some more customization capability for ASN names
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/ucis.ano/bgp_graph/path_list_to_dot.php16
1 files changed, 12 insertions, 4 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 7b29e44..e0ed547 100755
--- a/doc/ucis.ano/bgp_graph/path_list_to_dot.php
+++ b/doc/ucis.ano/bgp_graph/path_list_to_dot.php
@@ -23,16 +23,24 @@ foreach ($nodes as $node => $links) {
}
function static_nodename ($node) { switch ($node) {
- case '64731': return 'SRN (AS64731)';
- case '64766': return 'UFO (AS64766)';
+// case '64731': return 'SRN (AS64731)';
+// case '64766': return 'UFO (AS64766)';
+}; return NULL; };
+
+function nodenickname ($node) { switch ($node) {
+ case '64731': return 'SRN';
+ case '64766': return 'UFO';
}; return NULL; };
function nodename ($node) {
$node=preg_replace('/[^0-9]+/','',$node);
if (($name=static_nodename($node))!==NULL) return $name;
+ $nameparts=array();
+ if (($nick=nodenickname($node))!==NULL) $nameparts[]=$nick;
$name=rtrim(`echo $node | ./asn2adminc | ./hdl2person`);
- if (empty($name)) return 'AS'.$node;
-return 'AS'.$node.' ('.$name.')'; };
+ if (empty($name)) $name='AS'.$node; else $name="AS$node ($name)";
+ $nameparts[]=$name;
+return join(' - ',$nameparts); };
$nodelist=array();
foreach ($nodes as $node => $links) {