FWSM and ASA only support methods in CiscoStats, don't inherit other Cisco classes which the devices don't support
This commit is contained in:
@@ -32,22 +32,13 @@
|
|||||||
package SNMP::Info::Layer3::CiscoASA;
|
package SNMP::Info::Layer3::CiscoASA;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
use warnings;
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::CiscoVTP;
|
use SNMP::Info::CiscoStack;
|
||||||
use SNMP::Info::CDP;
|
|
||||||
use SNMP::Info::CiscoStats;
|
|
||||||
use SNMP::Info::CiscoRTT;
|
|
||||||
use SNMP::Info::CiscoQOS;
|
|
||||||
use SNMP::Info::CiscoConfig;
|
|
||||||
use SNMP::Info::CiscoPower;
|
|
||||||
use SNMP::Info::Layer3;
|
use SNMP::Info::Layer3;
|
||||||
use SNMP::Info::Layer3::Cisco;
|
|
||||||
|
|
||||||
@SNMP::Info::Layer3::CiscoASA::ISA = qw/SNMP::Info::CiscoVTP SNMP::Info::CDP
|
@SNMP::Info::Layer3::CiscoASA::ISA = qw/
|
||||||
SNMP::Info::CiscoStats
|
SNMP::Info::CiscoStats
|
||||||
SNMP::Info::CiscoRTT SNMP::Info::CiscoQOS
|
|
||||||
SNMP::Info::CiscoConfig SNMP::Info::CiscoPower
|
|
||||||
SNMP::Info::Layer3::Cisco
|
|
||||||
SNMP::Info::Layer3
|
SNMP::Info::Layer3
|
||||||
Exporter/;
|
Exporter/;
|
||||||
@SNMP::Info::Layer3::CiscoASA::EXPORT_OK = qw//;
|
@SNMP::Info::Layer3::CiscoASA::EXPORT_OK = qw//;
|
||||||
@@ -56,15 +47,20 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
|
|||||||
|
|
||||||
$VERSION = '3.15';
|
$VERSION = '3.15';
|
||||||
|
|
||||||
%MIBS = ( %SNMP::Info::Layer3::Cisco::MIBS, );
|
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoStack::MIBS, );
|
||||||
|
|
||||||
%GLOBALS = ( %SNMP::Info::Layer3::Cisco::GLOBALS, );
|
%GLOBALS
|
||||||
|
= ( %SNMP::Info::Layer3::GLOBALS, %SNMP::Info::CiscoStack::GLOBALS, );
|
||||||
|
|
||||||
%FUNCS
|
%FUNCS = (
|
||||||
= ( %SNMP::Info::Layer3::Cisco::FUNCS, 'mac_table' => 'ifPhysAddress', );
|
%SNMP::Info::Layer3::FUNCS,
|
||||||
|
%SNMP::Info::CiscoStack::FUNCS,
|
||||||
|
'mac_table' => 'ifPhysAddress',
|
||||||
|
);
|
||||||
|
|
||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
%SNMP::Info::Layer3::Cisco::MUNGE,
|
%SNMP::Info::Layer3::MUNGE,
|
||||||
|
%SNMP::Info::CiscoStack::MUNGE,
|
||||||
'mac_table' => \&SNMP::Info::munge_mac,
|
'mac_table' => \&SNMP::Info::munge_mac,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -138,7 +134,9 @@ Subclass for Cisco ASA Devices
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item SNMP::Info::Layer3::Cisco
|
=item SNMP::Info::CiscoStack
|
||||||
|
|
||||||
|
=item SNMP::Info::Layer3
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -146,11 +144,11 @@ Subclass for Cisco ASA Devices
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item F<CISCO-EIGRP-MIB>
|
|
||||||
|
|
||||||
=item Inherited Classes' MIBs
|
=item Inherited Classes' MIBs
|
||||||
|
|
||||||
See L<SNMP::Info::Layer3::Cisco/"Required MIBs"> for its own MIB requirements.
|
See L<SNMP::Info::CiscoStack/"Required MIBs"> for its own MIB requirements.
|
||||||
|
|
||||||
|
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -173,69 +171,25 @@ configured interface name instead of "Adaptive Security Appliance
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Global Methods imported from SNMP::Info::CiscoVTP
|
=head2 Globals imported from SNMP::Info::CiscoStack
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoVTP/"GLOBALS"> for details.
|
See documentation in L<SNMP::Info::CiscoStack/"GLOBALS"> for details.
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CDP
|
=head2 Global Methods imported from SNMP::Info::Layer3
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CDP/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoStats/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoRTT
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoRTT/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoQOS
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoQOS/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoConfig
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoConfig/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoPower
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoPower/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::Layer3
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
|
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::Layer3::Cisco
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3::Cisco/"GLOBALS"> for details.
|
|
||||||
|
|
||||||
=head1 TABLE METHODS
|
=head1 TABLE METHODS
|
||||||
|
|
||||||
These are methods that return tables of information in the form of a
|
These are methods that return tables of information in the form of a
|
||||||
reference to a hash.
|
reference to a hash.
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CiscoVTP
|
=head2 Table Methods imported from SNMP::Info::CiscoStack
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoVTP/"TABLE METHODS"> for details.
|
See documentation in L<SNMP::Info::CiscoStack/"TABLE METHODS"> for details.
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CDP
|
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CDP/"TABLE METHODS"> for details.
|
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoStats/"TABLE METHODS"> for details.
|
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CiscoRTT
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoRTT/"TABLE METHODS"> for details.
|
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CiscoQOS
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoQOS/"TABLE METHODS"> for details.
|
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Layer3::Cisco
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3::Cisco/"TABLE METHODS"> for details.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -31,10 +31,13 @@
|
|||||||
package SNMP::Info::Layer3::CiscoFWSM;
|
package SNMP::Info::Layer3::CiscoFWSM;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
use warnings;
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::Layer3::Cisco;
|
use SNMP::Info::CiscoStack;
|
||||||
|
use SNMP::Info::Layer3;
|
||||||
|
|
||||||
@SNMP::Info::Layer3::CiscoFWSM::ISA = qw/SNMP::Info::Layer3::Cisco
|
@SNMP::Info::Layer3::CiscoFWSM::ISA = qw/SNMP::Info::CiscoStack
|
||||||
|
SNMP::Info::Layer3
|
||||||
Exporter/;
|
Exporter/;
|
||||||
@SNMP::Info::Layer3::CiscoFWSM::EXPORT_OK = qw//;
|
@SNMP::Info::Layer3::CiscoFWSM::EXPORT_OK = qw//;
|
||||||
|
|
||||||
@@ -42,23 +45,17 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
|
|||||||
|
|
||||||
$VERSION = '3.15';
|
$VERSION = '3.15';
|
||||||
|
|
||||||
%MIBS = (
|
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoStack::MIBS, );
|
||||||
%SNMP::Info::Layer3::Cisco::MIBS,
|
|
||||||
);
|
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS
|
||||||
%SNMP::Info::Layer3::Cisco::GLOBALS,
|
= ( %SNMP::Info::Layer3::GLOBALS, %SNMP::Info::CiscoStack::GLOBALS, );
|
||||||
);
|
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::Layer3::Cisco::FUNCS,
|
%SNMP::Info::Layer3::FUNCS,
|
||||||
|
%SNMP::Info::CiscoStack::FUNCS,
|
||||||
);
|
|
||||||
|
|
||||||
%MUNGE = (
|
|
||||||
%SNMP::Info::Layer3::Cisco::MUNGE,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, %SNMP::Info::CiscoStack::MUNGE, );
|
||||||
|
|
||||||
# For FWSMs, the ipNetToPhysicalPhysAddress table appears to be of the form:
|
# For FWSMs, the ipNetToPhysicalPhysAddress table appears to be of the form:
|
||||||
# $ifindex.$inetaddresstype.$proto.$ip_address -> $mac_address
|
# $ifindex.$inetaddresstype.$proto.$ip_address -> $mac_address
|
||||||
@@ -75,13 +72,13 @@ sub at_paddr {
|
|||||||
my $paddrs = $fwsm->n2p_paddr($partial);
|
my $paddrs = $fwsm->n2p_paddr($partial);
|
||||||
my $n_paddrs = {};
|
my $n_paddrs = {};
|
||||||
|
|
||||||
foreach my $key (keys %$paddrs) {
|
foreach my $key ( keys %$paddrs ) {
|
||||||
my $paddr = $paddrs->{$key};
|
my $paddr = $paddrs->{$key};
|
||||||
my @parts = split /\./, $key;
|
my @parts = split /\./, $key;
|
||||||
my ($ifindex, $addrtype, $proto) = splice @parts, 0, 3;
|
my ( $ifindex, $addrtype, $proto ) = splice @parts, 0, 3;
|
||||||
my $ip = join ".", @parts;
|
my $ip = join ".", @parts;
|
||||||
|
|
||||||
next if($proto != 4); # at_paddr doesn't support non-IPv4
|
next if ( $proto != 4 ); # at_paddr doesn't support non-IPv4
|
||||||
|
|
||||||
$n_paddrs->{"$ifindex.$ip"} = $paddr;
|
$n_paddrs->{"$ifindex.$ip"} = $paddr;
|
||||||
}
|
}
|
||||||
@@ -96,13 +93,13 @@ sub at_netaddr {
|
|||||||
|
|
||||||
my $netaddrs = {};
|
my $netaddrs = {};
|
||||||
|
|
||||||
foreach my $key (keys %$paddrs) {
|
foreach my $key ( keys %$paddrs ) {
|
||||||
my $paddr = $paddrs->{$key};
|
my $paddr = $paddrs->{$key};
|
||||||
my @parts = split /\./, $key;
|
my @parts = split /\./, $key;
|
||||||
my ($ifindex, $addrtype, $proto) = splice @parts, 0, 3;
|
my ( $ifindex, $addrtype, $proto ) = splice @parts, 0, 3;
|
||||||
my $ip = join ".", @parts;
|
my $ip = join ".", @parts;
|
||||||
|
|
||||||
next if($proto != 4); # at_netaddr doesn't support non-IPv4
|
next if ( $proto != 4 ); # at_netaddr doesn't support non-IPv4
|
||||||
|
|
||||||
$netaddrs->{"$ifindex.$ip"} = $ip;
|
$netaddrs->{"$ifindex.$ip"} = $ip;
|
||||||
}
|
}
|
||||||
@@ -117,13 +114,13 @@ sub at_ifaddr {
|
|||||||
|
|
||||||
my $ifaddrs = {};
|
my $ifaddrs = {};
|
||||||
|
|
||||||
foreach my $key (keys %$paddrs) {
|
foreach my $key ( keys %$paddrs ) {
|
||||||
my $paddr = $paddrs->{$key};
|
my $paddr = $paddrs->{$key};
|
||||||
my @parts = split /\./, $key;
|
my @parts = split /\./, $key;
|
||||||
my ($ifindex, $addrtype, $proto) = splice @parts, 0, 3;
|
my ( $ifindex, $addrtype, $proto ) = splice @parts, 0, 3;
|
||||||
my $ip = join ".", @parts;
|
my $ip = join ".", @parts;
|
||||||
|
|
||||||
next if($proto != 4); # at_ifaddr doesn't support non-IPv4
|
next if ( $proto != 4 ); # at_ifaddr doesn't support non-IPv4
|
||||||
|
|
||||||
$ifaddrs->{"$ifindex.$ip"} = $ip;
|
$ifaddrs->{"$ifindex.$ip"} = $ip;
|
||||||
}
|
}
|
||||||
@@ -135,8 +132,8 @@ __END__
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
SNMP::Info::Layer3::CiscoFWSM - SNMP Interface to Firewall Services Modules for
|
SNMP::Info::Layer3::CiscoFWSM - SNMP Interface to Firewall Services Modules
|
||||||
features not covered elsewhere.
|
for features not covered elsewhere.
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
@@ -166,7 +163,9 @@ Subclass for Cisco Firewall Services Modules
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item SNMP::Info::Layer3::Cisco
|
=item SNMP::Info::CiscoStack
|
||||||
|
|
||||||
|
=item SNMP::Info::Layer3
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -176,15 +175,21 @@ Subclass for Cisco Firewall Services Modules
|
|||||||
|
|
||||||
=item Inherited Classes' MIBs
|
=item Inherited Classes' MIBs
|
||||||
|
|
||||||
See L<SNMP::Info::Layer3::Cisco/"Required MIBs"> for its own MIB requirements.
|
See L<SNMP::Info::CiscoStack/"Required MIBs"> for its own MIB requirements.
|
||||||
|
|
||||||
|
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head1 GLOBALS
|
=head1 GLOBALS
|
||||||
|
|
||||||
=head2 Global Methods imported from SNMP::Info::Layer3::Cisco
|
=head2 Globals imported from SNMP::Info::CiscoStack
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3::Cisco/"GLOBALS"> for details.
|
See documentation in L<SNMP::Info::CiscoStack/"GLOBALS"> for details.
|
||||||
|
|
||||||
|
=head2 Global Methods imported from SNMP::Info::Layer3
|
||||||
|
|
||||||
|
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
|
||||||
|
|
||||||
=head1 TABLE METHODS
|
=head1 TABLE METHODS
|
||||||
|
|
||||||
@@ -216,8 +221,12 @@ the MIB to provide that information isn't supported on FWSM.
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Layer3::Cisco
|
=head2 Table Methods imported from SNMP::Info::CiscoStack
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3::Cisco/"TABLE METHODS"> for details.
|
See documentation in L<SNMP::Info::CiscoStack/"TABLE METHODS"> for details.
|
||||||
|
|
||||||
|
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||||
|
|
||||||
|
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
Reference in New Issue
Block a user