Changeset 157
- Timestamp:
- Jun 8, 2016, 10:34:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r156 r157 149 149 vlanName => '1.3.6.1.2.1.17.7.1.4.3.1.1', # string 150 150 hpicfReset => '1.3.6.1.4.1.11.2.14.11.1.4.1', # HP reboot switch 151 ifIndex => '1.3.6.1.2.1.17.1.4.1.2', # dot1dBasePortIfIndex - Interface index redirection 151 152 ifName => '1.3.6.1.2.1.31.1.1.1.1', # Interface name (give port number) 152 153 ); … … 673 674 my ($snmp_session, $swport) = @_; 674 675 675 my $research_hr = $OID_NUMBER{ifName} .'.'. $swport; 676 my $result = $snmp_session->get_request( 676 my $research_index = $OID_NUMBER{ifIndex} .'.'. $swport; 677 my $result_index = $snmp_session->get_request( 678 -varbindlist => [$research_index] 679 ); 680 my $swifindex = $swport; 681 $swifindex = $result1->{$research_index}) if defined $result_index; 682 683 my $research_hr = $OID_NUMBER{ifName} .'.'. $swifindex; 684 my $result_hr = $snmp_session->get_request( 677 685 -varbindlist => [$research_hr] 678 686 ); 679 687 my $swport_hr = $swport; 680 $swport_hr = get_port_human_readable_short($result->{$research_hr}) if defined $result ;688 $swport_hr = get_port_human_readable_short($result->{$research_hr}) if defined $result_hr; 681 689 return $swport_hr; 682 690 }
Note: See TracChangeset
for help on using the changeset viewer.