Changeset 290
- Timestamp:
- Sep 26, 2017, 3:17:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r289 r290 791 791 my ($oid_current) = $snmp_session->var_bind_names; 792 792 last LOOP_ON_OID_PORT if not Net::SNMP::oid_base_match($oid_search_ix, $oid_current); 793 793 794 794 my $port_ifIndex = $snmp_session->var_bind_list->{$oid_current}; 795 795 my ($port_ix) = reverse split /\./, $oid_current; # last number … … 798 798 # prepare next loop item 799 799 @args = (-varbindlist => [$oid_current]); 800 800 801 801 my $oid_search_ifName = $OID_NUMBER{'ifName'} .'.'. $port_ifIndex; 802 802 my $result = $snmp_session->get_request(-varbindlist => [$oid_search_ifName]); 803 803 next LOOP_ON_OID_PORT if not defined $result; 804 804 805 805 my $current_port_hr = normalize_port_human_readable($result->{$oid_search_ifName}); 806 806 printf "PORT2: $oid_search_ifName => $current_port_hr\n" if $verbose; 807 807 if ($current_port_hr eq $swport_hr) { 808 808 print "PORT3: $current_port_hr <-> $port_ix\n" if $verbose; 809 809 810 810 # return port number ifIndex need by OID portUpDown 811 811 $swport_id = $port_ifIndex; # other possible value could be $port_ix … … 1547 1547 # Link to uplink switch 1548 1548 next LOOP_ON_OUTPUT_SWITCH; 1549 1549 1550 1550 # Do not print anymore 1551 1551 my $mac_address = $db_switch{$db_switch_parent{$sw}->{'switch'}}->{'mac_address'}; … … 2127 2127 my %vlandb = snmp_get_vlan_list($session); 2128 2128 $session->close; 2129 2129 2130 2130 print "VLAN_ID - VLAN_NAME # $sw_name\n"; 2131 2131 for my $vlan_id (keys %vlandb) { … … 2815 2815 $db_building{$building}->{$location} ||= {}; 2816 2816 $db_building{$building}->{$location}{ $sw->{'hostname'} } = 'y'; 2817 2817 2818 2818 $db_switch_line{$sw} = 0; 2819 2819 } … … 2878 2878 print "\"$sw:$port_connect\" [label=\"".format_aggregator4dot($port_connect)."\", color=black, fillcolor=plum, peripheries=$peripheries, style=filled];\n"; 2879 2879 print "\"$sw:$port_connect\" -> \"$sw\" [len=2, style=bold, color=$color, arrowhead=normal, arrowtail=inv];\n"; 2880 2880 2881 2881 #$db_switch_line{$sw}++; 2882 2882 #if ($db_switch_line{$sw} % 9 == 0) { … … 3099 3099 This means that an C<fping> command is done at the beginning on all the IP of the network 3100 3100 and the computers that was not detected in this pass, but where their Klask entry is less than one week, 3101 will have an C<arping> 3101 will have an C<arping> 3102 3102 (some OS do not respond to C<ping> but a computer have to respond to C<arping> if it want to interact with other). 3103 3103 In the scan mode C<passive>, no C<fping> and no C<arping> are done.
Note: See TracChangeset
for help on using the changeset viewer.