| Rev 39 |
|
Rev 46 |
| Line 57... |
|
Line 57... |
foreach $ol_name (@ol_names) |
|
foreach $ol_name (@ol_names) |
{ @ol_name_split=split(";",$ol_name); |
|
{ @ol_name_split=split(";",$ol_name); |
#compare IPs |
|
#compare IPs |
if ("$ol_name_split[1]" eq "$ol_string[2]") |
|
if ("$ol_name_split[1]" eq "$ol_string[2]") |
{ #print "jsou stejne $ol_name_split[0] a $ol_string[2]\n"; |
|
{ #print "jsou stejne $ol_name_split[0] a $ol_string[2]\n"; |
#name found so we will store it |
|
#name found so we will store it and we add a router ip to cover possible PtP links |
$ol_router=$ol_name_split[0]; |
|
$ol_router=$ol_name_split[0]." ".$ol_string[2]; |
} |
|
} |
} |
|
} |
if ("$ol_router" eq "$ol_string[2]") |
|
if ("$ol_router" eq "$ol_string[2]") |
{ #print "Router $ol_router neni v databazi!\n"; |
|
{ #print "Router $ol_router neni v databazi!\n"; |
} |
|
} |
|
|
|
|
|
|
|
|
|
# $ol_router=$ol_string[2]; |
|
# $ol_router=$ol_string[2]; |
$ol_link=""; |
|
$ol_link=""; |
} |
|
} |
|
|
|
#looking for first (central) side of link |
|
#looking for first (central) side of link |
if ($ol_line =~ /Designated/) |
|
if ($ol_line =~ /Designated/) |
| |
|
{ @ol_string=split(" ",$ol_line); |
| |
|
# print "ifA $ol_string[5]\n"; |
| |
|
$ol_link=$ol_string[5]; |
| |
|
} |
| |
|
|
| |
|
#looking for first (central) side of ptp link |
| |
|
if ($ol_line =~ /Neighboring/) |
{ @ol_string=split(" ",$ol_line); |
|
{ @ol_string=split(" ",$ol_line); |
# print "ifA $ol_string[5]\n"; |
|
# print "ifA $ol_string[5]\n"; |
$ol_link=$ol_string[5]; |
|
$ol_link=$ol_string[5]; |
} |
|
} |
|
|
|
| Line 183... |
|
Line 188... |
{ print "92;$ol_nameb[2];$ol_nameb[3];\n";} |
|
{ print "92;$ol_nameb[2];$ol_nameb[3];\n";} |
else |
|
else |
{ print "82;$ol_nameb[2];$ol_nameb[3];\n";} |
|
{ print "82;$ol_nameb[2];$ol_nameb[3];\n";} |
} |
|
} |
|
|
|
#now we will look into ospf links and all not found in basic link file (00) will be drawn in red color |
|
#now we will look into ospf links and all not found in basic link file (00) will be drawn in black color |
foreach $ol_linko (@ol_links_named) |
|
foreach $ol_linko (@ol_links_named) |
{ @ol_nameo=split(" ",$ol_linko); |
|
{ @ol_nameo=split(" ",$ol_linko); |
@ol_nameo = sort (@ol_nameo); |
|
@ol_nameo = sort (@ol_nameo); |
$ol_isnotpresent=1; |
|
$ol_isnotpresent=1; |
|
|
|
| Line 197... |
|
Line 202... |
if (("$ol_nameo[0]" eq "$ol_nameb[2]") && ("$ol_nameo[1]" eq "$ol_nameb[3]")) |
|
if (("$ol_nameo[0]" eq "$ol_nameb[2]") && ("$ol_nameo[1]" eq "$ol_nameb[3]")) |
{ $ol_isnotpresent=0; |
|
{ $ol_isnotpresent=0; |
}; |
|
}; |
}; |
|
}; |
if ($ol_isnotpresent) |
|
if ($ol_isnotpresent) |
{ print "01;$ol_nameo[0];$ol_nameo[1];\n";} |
|
{ print "12;$ol_nameo[0];$ol_nameo[1];\n";} |
} |
|
} |
|
|
|
#print "</pre></BODY></HTML>"; |
|
#print "</pre></BODY></HTML>"; |
|
|
|
exit |
|
exit |