Changeset 157


Ignore:
Timestamp:
Jun 8, 2016, 10:34:02 PM (8 years ago)
Author:
g7moreau
Message:
  • Add ifIndex redirection
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r156 r157  
    149149   vlanName        => '1.3.6.1.2.1.17.7.1.4.3.1.1',   # string
    150150   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
    151152   ifName          => '1.3.6.1.2.1.31.1.1.1.1',       # Interface name (give port number)
    152153   );
     
    673674   my ($snmp_session, $swport) = @_;
    674675   
    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(
    677685      -varbindlist => [$research_hr]
    678686      );
    679687   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;
    681689   return $swport_hr;
    682690   }
Note: See TracChangeset for help on using the changeset viewer.