Report L2 capability on PacketFront devices if they have bridge ports

This commit is contained in:
Jeroen van Ingen
2015-06-29 17:02:48 +02:00
parent c8fceeb75b
commit bbc9695075
2 changed files with 21 additions and 0 deletions

View File

@@ -1560,6 +1560,7 @@ sub device_type {
4526 => 'SNMP::Info::Layer2::Netgear', 4526 => 'SNMP::Info::Layer2::Netgear',
5624 => 'SNMP::Info::Layer3::Enterasys', 5624 => 'SNMP::Info::Layer3::Enterasys',
6486 => 'SNMP::Info::Layer3::AlcatelLucent', 6486 => 'SNMP::Info::Layer3::AlcatelLucent',
9303 => 'SNMP::Info::Layer3::PacketFront',
11898 => 'SNMP::Info::Layer2::Orinoco', 11898 => 'SNMP::Info::Layer2::Orinoco',
14179 => 'SNMP::Info::Layer2::Airespace', 14179 => 'SNMP::Info::Layer2::Airespace',
14525 => 'SNMP::Info::Layer2::Trapeze', 14525 => 'SNMP::Info::Layer2::Trapeze',

View File

@@ -108,6 +108,21 @@ sub i_ignore {
return \%i_ignore; return \%i_ignore;
} }
sub layers {
my $pfront = shift;
my $layers = $pfront->SUPER::layers();
# Some models or softwware versions don't report L2 properly
# so add L2 capability to the output if the device has bridge ports.
my $bports = $pfront->b_ports();
if ($bports) {
my $l = substr $layers, 6, 1, "1";
}
return $layers;
}
1; 1;
__END__ __END__
@@ -210,6 +225,11 @@ Returns reference to hash. Increments value of IID if port is to be ignored.
Ignores loopback Ignores loopback
=item $pfront->layers()
L2 capability isn't always reported correctly by the device itself; what the
device reports is augmented with L2 capability if the device has bridge ports.
=back =back
=head2 Table Methods imported from SNMP::Info::Layer3 =head2 Table Methods imported from SNMP::Info::Layer3