Changeset 9
- Timestamp:
- Jan 30, 2008, 6:15:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r8 r9 404 404 } 405 405 406 # liste l'ensemble des routeurs du réseau 407 sub get_list_main_router { 408 my @network = @_; 409 410 my @res = (); 411 412 for my $net (@network) { 413 push @res, $switchdb->{network}{$net}{'main-router'}; 414 } 415 416 return @res; 417 } 418 406 419 sub get_human_readable_port { 407 420 my $sw = shift; … … 512 525 my %router_mac_ip = (); 513 526 DETECT_ALL_ROUTER: 514 for my $one_router ('194.254.66.254') { 527 # for my $one_router ('194.254.66.254') { 528 for my $one_router ( get_list_main_router(@network) ) { 515 529 my %resol_arp = resolve_ip_arp_host($one_router); 516 530 $router_mac_ip{ $resol_arp{mac_address} } = $resol_arp{ipv4_address}; … … 547 561 my %resol_arp = resolve_ip_arp_host($one_computer,$current_interface); 548 562 549 # do not search router connection563 # do not search on router connection (why ?) 550 564 if ( exists $router_mac_ip{$resol_arp{mac_address}}) { 551 565 $computer_not_detected{$one_computer} = $current_interface; … … 553 567 } 554 568 555 # do not search switchconnection569 # do not search on switch inter-connection 556 570 if (exists $switch_level{$resol_arp{hostname_fq}}) { 557 571 $computer_not_detected{$one_computer} = $current_interface; … … 752 766 753 767 DETECT_ALL_ROUTER: 754 for my $one_computer ('194.254.66.254') { 768 # for my $one_computer ('194.254.66.254') { 769 for my $one_computer ( get_list_main_router(get_list_network()) ) { 755 770 my %resol_arp = resolve_ip_arp_host($one_computer,'*','low'); #resolution arp 756 771 next DETECT_ALL_ROUTER if $resol_arp{mac_address} eq 'unknow';
Note: See TracChangeset
for help on using the changeset viewer.