L2::Airespace now reports AP Ethernet MAC as port MAC for radio ports
This commit is contained in:
@@ -28,7 +28,8 @@ version 3.00
|
|||||||
* UNIVERSAL::can() now works with dynamic methods
|
* UNIVERSAL::can() now works with dynamic methods
|
||||||
* Dynamically generated methods are added to symbol table to avoid
|
* Dynamically generated methods are added to symbol table to avoid
|
||||||
AUTOLOAD on subsequent calls
|
AUTOLOAD on subsequent calls
|
||||||
* L2::Airspace now supports 802.11n client tx rates
|
* L2::Airespace now supports 802.11n client tx rates
|
||||||
|
* L2::Airespace now reports AP Ethernet MAC as port MAC for radio ports
|
||||||
* CiscoStats improvements to determine os versions, eg IOS XE ver on Sup7L-E
|
* CiscoStats improvements to determine os versions, eg IOS XE ver on Sup7L-E
|
||||||
* CiscoStats now reports 'ios-xe' if the device runs IOS XE (used to be 'ios')
|
* CiscoStats now reports 'ios-xe' if the device runs IOS XE (used to be 'ios')
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ $VERSION = '2.11';
|
|||||||
%SNMP::Info::CDP::MIBS, %SNMP::Info::Airespace::MIBS,
|
%SNMP::Info::CDP::MIBS, %SNMP::Info::Airespace::MIBS,
|
||||||
'CISCO-LWAPP-DOT11-CLIENT-MIB' => 'cldcClientCurrentTxRateSet',
|
'CISCO-LWAPP-DOT11-CLIENT-MIB' => 'cldcClientCurrentTxRateSet',
|
||||||
'CISCO-LWAPP-DOT11-MIB' => 'cldHtDot11nChannelBandwidth',
|
'CISCO-LWAPP-DOT11-MIB' => 'cldHtDot11nChannelBandwidth',
|
||||||
|
'CISCO-LWAPP-AP-MIB' => 'cLApIfMacAddress',
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
@@ -57,7 +58,8 @@ $VERSION = '2.11';
|
|||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::FUNCS, %SNMP::Info::Bridge::FUNCS,
|
%SNMP::Info::FUNCS, %SNMP::Info::Bridge::FUNCS,
|
||||||
%SNMP::Info::CDP::FUNCS, %SNMP::Info::Airespace::FUNCS,
|
%SNMP::Info::CDP::FUNCS, %SNMP::Info::Airespace::FUNCS,
|
||||||
|
# CISCO-LWAPP-AP-MIB::cLApTable
|
||||||
|
'ap_if_mac' => 'cLApIfMacAddress',
|
||||||
# This needs to be cleaned up, but for now we pretend to
|
# This needs to be cleaned up, but for now we pretend to
|
||||||
# have the CISCO-DOT11-MIB for signal strengths, etc.
|
# have the CISCO-DOT11-MIB for signal strengths, etc.
|
||||||
'cd11_sigstrength' => 'bsnMobileStationRSSI', # kinda
|
'cd11_sigstrength' => 'bsnMobileStationRSSI', # kinda
|
||||||
@@ -76,6 +78,7 @@ $VERSION = '2.11';
|
|||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
%SNMP::Info::MUNGE, %SNMP::Info::Bridge::MUNGE,
|
%SNMP::Info::MUNGE, %SNMP::Info::Bridge::MUNGE,
|
||||||
%SNMP::Info::CDP::MUNGE, %SNMP::Info::Airespace::MUNGE,
|
%SNMP::Info::CDP::MUNGE, %SNMP::Info::Airespace::MUNGE,
|
||||||
|
'ap_if_mac' => \&SNMP::Info::munge_mac,
|
||||||
'cd11_rxpkt' => \&munge_64bits,
|
'cd11_rxpkt' => \&munge_64bits,
|
||||||
'cd11_txpkt' => \&munge_64bits,
|
'cd11_txpkt' => \&munge_64bits,
|
||||||
'cd11n_ch_bw' => \&munge_cd11n_ch_bw,
|
'cd11n_ch_bw' => \&munge_cd11n_ch_bw,
|
||||||
@@ -207,6 +210,31 @@ sub munge_64bits {
|
|||||||
return $value & 0xffffffff;
|
return $value & 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Cisco provides the AP's Ethernet MAC via
|
||||||
|
# CISCO-LWAPP-AP-MIB::cLApIfMacAddress this was not available pre-Cisco
|
||||||
|
sub i_mac {
|
||||||
|
my $airespace = shift;
|
||||||
|
my $partial = shift;
|
||||||
|
|
||||||
|
my $i_index = $airespace->i_index($partial) || {};
|
||||||
|
my $ap_mac = $airespace->ap_if_mac() || {};
|
||||||
|
|
||||||
|
my $i_mac = $airespace->SUPER::i_mac() || {};
|
||||||
|
foreach my $iid ( keys %$i_index ) {
|
||||||
|
my $index = $i_index->{$iid};
|
||||||
|
next unless defined $index;
|
||||||
|
|
||||||
|
if ( $index =~ /(?:[0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}/ ) {
|
||||||
|
$index =~ s/\.\d+$//;
|
||||||
|
next unless defined $index;
|
||||||
|
my $sys_mac = join( '.', map { hex($_) } split( ':', $index ) );
|
||||||
|
my $mac = $ap_mac->{$sys_mac};
|
||||||
|
$i_mac->{$iid} = $mac;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $i_mac;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
@@ -266,6 +294,8 @@ my $airespace = new SNMP::Info::Layer2::Airespace(...);
|
|||||||
|
|
||||||
=item F<CISCO-LWAPP-DOT11-MIB>
|
=item F<CISCO-LWAPP-DOT11-MIB>
|
||||||
|
|
||||||
|
=item F<CISCO-LWAPP-AP-MIB>
|
||||||
|
|
||||||
=item Inherited Classes' MIBs
|
=item Inherited Classes' MIBs
|
||||||
|
|
||||||
See L<SNMP::Info::Airespace/"Required MIBs"> for its own MIB requirements.
|
See L<SNMP::Info::Airespace/"Required MIBs"> for its own MIB requirements.
|
||||||
@@ -327,6 +357,14 @@ Returns client transmission speed in Mbs.
|
|||||||
|
|
||||||
=head2 Overrides
|
=head2 Overrides
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item i_mac()
|
||||||
|
|
||||||
|
Adds AP Ethernet MAC as port mac on radio ports from C<CISCO-LWAPP-AP-MIB>.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Airespace
|
=head2 Table Methods imported from SNMP::Info::Airespace
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Airespace/"TABLE METHODS"> for details.
|
See documentation in L<SNMP::Info::Airespace/"TABLE METHODS"> for details.
|
||||||
|
|||||||
Reference in New Issue
Block a user