Added sub productname
This commit is contained in:
@@ -48,21 +48,19 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
|
|||||||
|
|
||||||
$VERSION = '3.33';
|
$VERSION = '3.33';
|
||||||
|
|
||||||
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::Entity::MIBS, );
|
%MIBS = ( %SNMP::Info::Layer7::MIBS, %SNMP::Info::Entity::MIBS, );
|
||||||
|
|
||||||
%GLOBALS
|
%GLOBALS
|
||||||
= ( %SNMP::Info::Layer3::GLOBALS, %SNMP::Info::Entity::GLOBALS, );
|
= ( %SNMP::Info::Layer7::GLOBALS, %SNMP::Info::Entity::GLOBALS, );
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::Layer7::FUNCS,
|
%SNMP::Info::Layer7::FUNCS,
|
||||||
%SNMP::Info::Entity::FUNCS,
|
%SNMP::Info::Entity::FUNCS,
|
||||||
'mac_table' => 'ifPhysAddress',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
%SNMP::Info::Layer7::MUNGE,
|
%SNMP::Info::Layer7::MUNGE,
|
||||||
%SNMP::Info::Entity::MUNGE,
|
%SNMP::Info::Entity::MUNGE,
|
||||||
'mac_table' => \&SNMP::Info::munge_mac,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
my ($serial, $descr, $model);
|
my ($serial, $descr, $model);
|
||||||
@@ -107,10 +105,15 @@ sub model {
|
|||||||
return $descr;
|
return $descr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub productname {
|
||||||
|
my $self = shift;
|
||||||
|
return $self->model;
|
||||||
|
}
|
||||||
|
|
||||||
sub b_mac {
|
sub b_mac {
|
||||||
my ( $self ) = shift;
|
my ( $self ) = shift;
|
||||||
|
|
||||||
foreach my $mac ( values %{$self->mac_table()} ){
|
foreach my $mac ( values %{$self->i_mac()} ){
|
||||||
|
|
||||||
next unless defined $mac;
|
next unless defined $mac;
|
||||||
next unless $mac =~ m/^e4:d3:f1/;
|
next unless $mac =~ m/^e4:d3:f1/;
|
||||||
@@ -151,15 +154,15 @@ Moe Kraus
|
|||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
Subclass for Cisco ASA Devices
|
Subclass for Cisco IPS Module
|
||||||
|
|
||||||
=head2 Inherited Classes
|
=head2 Inherited Classes
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item SNMP::Info::CiscoStats
|
=item SNMP::Info::Entity
|
||||||
|
|
||||||
=item SNMP::Info::Layer3
|
=item SNMP::Info::Layer7
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -169,50 +172,40 @@ Subclass for Cisco ASA Devices
|
|||||||
|
|
||||||
=item Inherited Classes' MIBs
|
=item Inherited Classes' MIBs
|
||||||
|
|
||||||
See L<SNMP::Info::CiscoStats/"Required MIBs"> for its own MIB requirements.
|
See classes listed above for their required MIBs.
|
||||||
|
|
||||||
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
||||||
=head1 GLOBALS
|
=head1 GLOBALS
|
||||||
|
|
||||||
These are methods that return scalar value from SNMP
|
These are methods that return scalar value from SNMP
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item $asa->b_mac()
|
=item $self->b_mac()
|
||||||
|
|
||||||
Returns base mac.
|
Returns base mac. Matches only on e4:d3:f1
|
||||||
Overrides base mac function in L<SNMP::Info::Layer3>.
|
|
||||||
|
|
||||||
=item $asa->i_description()
|
=item $self->serial()
|
||||||
|
|
||||||
Overrides base interface description function in L<SNMP::Info> to return the
|
Fetches serial from Module
|
||||||
configured interface name instead of "Adaptive Security Appliance
|
|
||||||
'$configured interface name' interface".
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoStats/"GLOBALS"> for details.
|
=head2 Global Methods imported from SNMP::Info::Layer7
|
||||||
|
|
||||||
=head2 Global Methods imported from SNMP::Info::Layer3
|
See documentation in L<SNMP::Info::Layer7/"GLOBALS"> for details.
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3/"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::CiscoStats
|
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::CiscoStats/"TABLE METHODS"> for details.
|
=head2 Table Methods imported from SNMP::Info::Layer7
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Layer3
|
See documentation in L<SNMP::Info::Layer7/"TABLE METHODS"> for details.
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
Reference in New Issue
Block a user