- Use Q-BRIDGE-MIB for macsuck from bridge class rather than redefining

- Model cosmetics
This commit is contained in:
Eric Miller
2007-10-10 02:38:36 +00:00
parent e87e076b6a
commit a2d94315c3

View File

@@ -66,7 +66,8 @@ $VERSION = '1.05';
%SNMP::Info::MAU::FUNCS,
# Normal BRIDGE-MIB has issues on some devices, duplicates and
# non-increasing oids, Use Q-BRIDGE-MIB for macsuck
'fw_port' => 'dot1qTpFdbPort',
'fw_mac' => 'qb_fw_mac',
'fw_port' => 'qb_fw_port',
);
%MUNGE = (
@@ -88,6 +89,7 @@ sub model {
my $model = &SNMP::translateObj($id);
$model =~ s/^etsysOidDev//i;
$model =~ s/^etsysOidPhy//i;
return $id unless defined $model;
return $model;
@@ -153,27 +155,6 @@ sub i_duplex_admin {
return $enterasys->mau_i_duplex_admin($partial);
}
# dot1qTpFdbAddress doesn't return values but is used as the index for the table
# so extract mac from index of dot1qTpFdbPort
sub fw_mac {
my $enterasys = shift;
my $enterasys_fw_port = $enterasys->fw_port();
my %fw_mac;
foreach my $iid (keys %$enterasys_fw_port){
# iid is dot1qFdbId.dot1qTpFdbAddress so strip dot1qFdbId
my $mac = $iid;
$mac =~ s/^\d+\.//;
# Convert the remaining 0.254.123.456 index entry to a MAC address.
$mac = join(':',map {sprintf("%02x",$_)} split(/\./,$mac));
next unless defined $mac;
$fw_mac{$iid}=$mac;
}
return \%fw_mac;
}
# Use CDP and/or LLDP
sub hasCDP {