jablonka.czprosek.czf

netmap

Subversion Repositories:
[/] [gen_ospf_link.pl] - Diff between revs 27 and 28

Show entire file Ignore whitespace

Rev 27 Rev 28
Line 14... Line 14...
   
@ol_names=`cat /home/www/cgi-bin/netmap/data/jablonecka.comp`; @ol_names=`cat /home/www/cgi-bin/netmap/data/jablonecka.comp`;
#@ol_database=`/home/www/cgi-bin/ospfd_database.cgi`; #@ol_database=`/home/www/cgi-bin/ospfd_database.cgi`;
@ol_database=`wget -q http://10.33.0.11/cgi-bin/ospfd_database.cgi -O -`; @ol_database=`wget -q http://10.33.0.11/cgi-bin/ospfd_database.cgi -O -`;
#print @ol_names; #print @ol_names;
  @ol_basiclinks=`cat /home/www/cgi-bin/netmap/data/jablonecka.link.basic | grep ^00`;
   
foreach $ol_line (@ol_names) foreach $ol_line (@ol_names)
{ {
@ol_pole=split(";",$ol_line); @ol_pole=split(";",$ol_line);
#print "$ol_pole[0] $ol_pole[1]\n"; #print "$ol_pole[0] $ol_pole[1]\n";
Line 160... Line 161...
} }
# #
push(@ol_links_named, $ol_ipa." ".$ol_ipb ); push(@ol_links_named, $ol_ipa." ".$ol_ipb );
} }
   
#print "\n\n@ol_links_named\n"; #now we will look into basic link file and all not found basic links (00) will be drawn in red color
foreach $ol_link (@ol_links_named) foreach $ol_linkb (@ol_basiclinks)
{ @ol_name=split(" ",$ol_link); { @ol_nameb=split(/;/,$ol_linkb);
print "92;$ol_name[0];$ol_name[1];\n"; @ol_nameb = sort (@ol_nameb);
} $ol_ispresent=0;
  #print $ol_name[3];
   
  foreach $ol_linko (@ol_links_named)
  { @ol_nameo=split(" ",$ol_linko);
  @ol_nameo = sort (@ol_nameo);
  if (("$ol_nameo[0]" eq "$ol_nameb[2]") && ("$ol_nameo[1]" eq "$ol_nameb[3]"))
  { $ol_ispresent=1;
  # print "92;$ol_nameo[0];$ol_nameo[1];\n";
   
  };
  };
  if ($ol_ispresent)
  { print "92;$ol_nameb[2];$ol_nameb[3];\n";}
  else
  { print "82;$ol_nameb[2];$ol_nameb[3];\n";}
  }
   
#print "</pre></BODY></HTML>"; #print "</pre></BODY></HTML>";
   
exit exit
   

Powered by WebSVN 2.2.1