Implement v_index as a function, since the OID is not-accessible and

can't be walked.
This commit is contained in:
Bill Fenner
2007-02-20 03:06:04 +00:00
parent 7ad7d1e338
commit e5c81896aa

View File

@@ -71,7 +71,6 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
'vtp_d_pruning' => 'managementDomainPruningState',
'vtp_d_ver' => 'managementDomainVersionInUse',
# CISCO-VTP-MIB::vtpVlanTable
'v_index' => 'vtpVlanIndex',
'v_state' => 'vtpVlanState',
'v_type' => 'vtpVlanType',
'v_name' => 'vtpVlanName',
@@ -118,6 +117,19 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
%MUNGE = (
);
sub v_index {
my $vtp = shift;
my $partial = shift;
my $v_name = $vtp->v_name($partial);
my %v_index;
foreach my $idx (keys %$v_name) {
my ($mgmtdomain, $vlan) = split(/\./, $idx);
$v_index{$idx} = $vlan;
}
return \%v_index;
}
sub i_vlan {
my $vtp = shift;
my $partial = shift;