Add DOCSIS head end support (#317)
* Add DOCSIS CMTS support for cable modem discovery * Remove whitespace and update pod
This commit is contained in:
119
lib/SNMP/Info/DocsisHE.pm
Normal file
119
lib/SNMP/Info/DocsisHE.pm
Normal file
@@ -0,0 +1,119 @@
|
||||
package SNMP::Info::DocsisHE;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
|
||||
use SNMP::Info;
|
||||
|
||||
@SNMP::Info::DocsisHE::ISA = qw/SNMP::Info Exporter/;
|
||||
@SNMP::Info::DocsisHE::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
|
||||
|
||||
$VERSION = '3.65';
|
||||
|
||||
%MIBS = (
|
||||
'DOCS-IF3-MIB' => 'docsIf3Mib',
|
||||
'DOCS-IF-MIB' => 'docsIfMib'
|
||||
);
|
||||
|
||||
%GLOBALS = ();
|
||||
|
||||
%FUNCS = (
|
||||
# DOCSIS 3.0 (DOCS-IF3-MIB) from CableLabs
|
||||
'docs_if3_cmts_cm_status_md_if_index'=> 'docsIf3CmtsCmRegStatusMdIfIndex',
|
||||
# DOCSIS (1.1, etc) from IETF
|
||||
'docs_if_cmts_cm_status_inet_address_type' => 'docsIfCmtsCmStatusInetAddressType',
|
||||
'docs_if_cmts_cm_status_inet_address' => 'docsIfCmtsCmStatusInetAddress',
|
||||
'docs_cmts_cm_down_channel_if_index' => 'docsIfCmtsCmStatusDownChannelIfIndex',
|
||||
'docs_cmts_cm_up_channel_if_index' => 'docsIfCmtsCmStatusUpChannelIfIndex'
|
||||
);
|
||||
|
||||
%MUNGE = ();
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
SNMP::Info::DocsisHE - SNMP Interface for F<DOCS-IF-MIB> and F<DOCS-IF3-MIB>
|
||||
|
||||
=head1 AUTHOR
|
||||
Ryan Gasik
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $cmts = new SNMP::Info(
|
||||
AutoSpecify => 1,
|
||||
Debug => 1,
|
||||
DestHost => 'cmts',
|
||||
Community => 'public',
|
||||
Version => 2
|
||||
);
|
||||
# Get a list of modems off the DOCSIS CMTS
|
||||
my $modems = $cmts->docs_if_cmts_cm_status_inet_address()
|
||||
|
||||
=head1 DESCRIPTION
|
||||
SNMP::Info::DocsisHE is a subclass of SNMP::Info that provides information
|
||||
about the cable modems of a DOCSIS CMTS.
|
||||
|
||||
=head2 Inherited Classes
|
||||
|
||||
None.
|
||||
|
||||
=head2 Required MIBs
|
||||
|
||||
=over
|
||||
|
||||
=item F<DOCS-IF-MIB>
|
||||
Standard IETF MIBs for DOCSIS 1.1
|
||||
|
||||
=item F<DOCS-IF3-MIB>
|
||||
CableLabs MIBs for DOCSIS 3
|
||||
|
||||
=back
|
||||
|
||||
=head1 GLOBAL METHODS
|
||||
|
||||
None.
|
||||
|
||||
=head1 TABLE METHODS
|
||||
|
||||
=over
|
||||
|
||||
=item $info->docs_if3_cmts_cm_status_md_if_index()
|
||||
|
||||
Returns reference to hash of the IfIndex associated with each cable modem.
|
||||
|
||||
(C<docsIf3CmtsCmRegStatusMdIfIndex>)
|
||||
|
||||
=item $info->docs_if_cmts_cm_status_inet_address_type()
|
||||
|
||||
Returns reference to hash of the type of IP address (ie, IPv4, IPv6)
|
||||
associated with each cable modem
|
||||
|
||||
(C<docsIfCmtsCmStatusInetAddressType>)
|
||||
|
||||
=item $info->docs_if_cmts_cm_status_inet_address()
|
||||
|
||||
Returns reference to hash of the IP address associated with each
|
||||
cable modem.
|
||||
|
||||
(C<docsIfCmtsCmStatusInetAddress>)
|
||||
|
||||
=item $info->docs_cmts_cm_down_channel_if_index()
|
||||
|
||||
Returns reference to hash of the IfIndex of the down channel
|
||||
(for DOCSIS 1.1) or a down channel (DOCSIS 3+) associated with each
|
||||
cable modem.
|
||||
|
||||
(C<docsIfCmtsCmStatusDownChannelIfIndex>)
|
||||
|
||||
=item $info->docs_cmts_cm_up_channel_if_index()
|
||||
|
||||
Returns reference to hash of the IfIndex of the up channel
|
||||
(for DOCSIS 1.1) or a up channel (DOCSIS 3+) associated with each
|
||||
cable modem.
|
||||
|
||||
(C<docsIfCmtsCmStatusUpChannelIfIndex>)
|
||||
|
||||
=back
|
||||
@@ -39,9 +39,10 @@ use SNMP::Info::Bridge;
|
||||
use SNMP::Info::Entity;
|
||||
use SNMP::Info::PowerEthernet;
|
||||
use SNMP::Info::LLDP;
|
||||
use SNMP::Info::DocsisHE;
|
||||
|
||||
@SNMP::Info::Layer2::ISA
|
||||
= qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::Entity SNMP::Info::PowerEthernet SNMP::Info::LLDP Exporter/;
|
||||
= qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::Entity SNMP::Info::PowerEthernet SNMP::Info::LLDP SNMP::Info::DocsisHE Exporter/;
|
||||
@SNMP::Info::Layer2::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
|
||||
@@ -51,12 +52,13 @@ $VERSION = '3.66';
|
||||
%MIBS = (
|
||||
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,
|
||||
%SNMP::Info::Entity::MIBS, %SNMP::Info::PowerEthernet::MIBS,
|
||||
%SNMP::Info::LLDP::MIBS,
|
||||
%SNMP::Info::LLDP::MIBS, %SNMP::Info::DocsisHE::MIBS,
|
||||
);
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::GLOBALS,
|
||||
%SNMP::Info::Bridge::GLOBALS,
|
||||
%SNMP::Info::DocsisHE::GLOBALS,
|
||||
%SNMP::Info::Entity::GLOBALS,
|
||||
%SNMP::Info::PowerEthernet::GLOBALS,
|
||||
%SNMP::Info::LLDP::GLOBALS,
|
||||
@@ -67,7 +69,7 @@ $VERSION = '3.66';
|
||||
%FUNCS = (
|
||||
%SNMP::Info::FUNCS, %SNMP::Info::Bridge::FUNCS,
|
||||
%SNMP::Info::Entity::FUNCS, %SNMP::Info::PowerEthernet::FUNCS,
|
||||
%SNMP::Info::LLDP::FUNCS,
|
||||
%SNMP::Info::LLDP::FUNCS, %SNMP::Info::DocsisHE::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
@@ -75,6 +77,7 @@ $VERSION = '3.66';
|
||||
# Inherit all the built in munging
|
||||
%SNMP::Info::MUNGE,
|
||||
%SNMP::Info::Bridge::MUNGE,
|
||||
%SNMP::Info::DocsisHE::MUNGE,
|
||||
%SNMP::Info::Entity::MUNGE,
|
||||
%SNMP::Info::PowerEthernet::MUNGE,
|
||||
%SNMP::Info::LLDP::MUNGE,
|
||||
|
||||
@@ -42,12 +42,13 @@ use SNMP::Info::PowerEthernet;
|
||||
use SNMP::Info::IPv6;
|
||||
use SNMP::Info::AdslLine;
|
||||
use SNMP::Info::LLDP;
|
||||
use SNMP::Info::DocsisHE;
|
||||
|
||||
@SNMP::Info::Layer3::ISA = qw/
|
||||
SNMP::Info::PowerEthernet SNMP::Info::IPv6
|
||||
SNMP::Info::Entity SNMP::Info::EtherLike
|
||||
SNMP::Info::Bridge SNMP::Info::AdslLine
|
||||
SNMP::Info::LLDP
|
||||
SNMP::Info::LLDP SNMP::Info::DocsisHE
|
||||
SNMP::Info Exporter/;
|
||||
@SNMP::Info::Layer3::EXPORT_OK = qw//;
|
||||
|
||||
@@ -59,6 +60,7 @@ $VERSION = '3.66';
|
||||
%SNMP::Info::MIBS,
|
||||
%SNMP::Info::AdslLine::MIBS,
|
||||
%SNMP::Info::Bridge::MIBS,
|
||||
%SNMP::Info::DocsisHE::MIBS,
|
||||
%SNMP::Info::EtherLike::MIBS,
|
||||
%SNMP::Info::Entity::MIBS,
|
||||
%SNMP::Info::PowerEthernet::MIBS,
|
||||
@@ -76,6 +78,7 @@ $VERSION = '3.66';
|
||||
%SNMP::Info::GLOBALS,
|
||||
%SNMP::Info::AdslLine::GLOBALS,
|
||||
%SNMP::Info::Bridge::GLOBALS,
|
||||
%SNMP::Info::DocsisHE::GLOBALS,
|
||||
%SNMP::Info::EtherLike::GLOBALS,
|
||||
%SNMP::Info::Entity::GLOBALS,
|
||||
%SNMP::Info::PowerEthernet::GLOBALS,
|
||||
@@ -93,6 +96,7 @@ $VERSION = '3.66';
|
||||
%SNMP::Info::FUNCS,
|
||||
%SNMP::Info::AdslLine::FUNCS,
|
||||
%SNMP::Info::Bridge::FUNCS,
|
||||
%SNMP::Info::DocsisHE::FUNCS,
|
||||
%SNMP::Info::EtherLike::FUNCS,
|
||||
%SNMP::Info::Entity::FUNCS,
|
||||
%SNMP::Info::PowerEthernet::FUNCS,
|
||||
@@ -167,6 +171,7 @@ $VERSION = '3.66';
|
||||
%SNMP::Info::AdslLine::MUNGE,
|
||||
%SNMP::Info::Bridge::MUNGE,
|
||||
%SNMP::Info::EtherLike::MUNGE,
|
||||
%SNMP::Info::DocsisHE::MUNGE,
|
||||
%SNMP::Info::Entity::MUNGE,
|
||||
%SNMP::Info::PowerEthernet::MUNGE,
|
||||
%SNMP::Info::IPv6::MUNGE,
|
||||
|
||||
Reference in New Issue
Block a user