NAME
Cisco::SNMP::ARP - ARP Interface for Cisco Management
SYNOPSIS
use Cisco::SNMP::ARP;
DESCRIPTION
The following methods are for ARP cache. These methods implement the ipNetToMediaTable
object of RFC1213-MIB
.
METHODS
new() - create a new Cisco::SNMP::ARP object
my $cm = Cisco::SNMP::ARP->new([OPTIONS]);
Create a new Cisco::SNMP::ARP object with OPTIONS as optional parameters. See Cisco::SNMP for options.
arpOIDs() - return OID names
my @arpOIDs = $cm->arpOIDs();
Return list of ARP MIB object ID names.
arp_clear() - clear ARP entry
$cm->arp_clear(ifIndex,IP);
Clear the DYNAMIC
ARP entry at interface index ifIndex
for IP address IP
. Returns undefined on error.
arp_info() - return arp cache info
my $arpinfo = $cm->arp_info();
Populate a data structure with ARP information. If successful, returns a pointer to an array containing ARP information.
$arpinfo->[0]->{'IfIndex', 'PhysAddress', ...}
$arpinfo->[1]->{'IfIndex', 'PhysAddress', ...}
...
$arpinfo->[n]->{'IfIndex', 'PhysAddress', ...}
Allows the following accessors to be called.
arpIfIndex() - return ARP interface index
$arpinfo->arpIfIndex([#]);
Return the interface index of the ARP at index '#'. Defaults to 0.
arpPhysAddress() - return ARP physical address count
$arpinfo->arpPhysAddress([#]);
Return the physical address of the ARP at index '#'. Defaults to 0.
arpNetAddress() - return ARP network address count
$arpinfo->arpNetAddress([#]);
Return the network address of the ARP at index '#'. Defaults to 0.
arpType() - return ARP type
$arpinfo->arpType([#]);
Return the type of the ARP at index '#'. Defaults to 0.
DIRECT ACCESS METHODS
The following methods can be called on the Cisco::SNMP::ARP object directly to access the values directly.
- get_arpIfIndex (i,a)
- get_arpPhysAddress (i,a)
- get_arpNetAddress (i,a)
- get_arpType (i,a)
-
Get ARP OIDs where (i) is the interface index and (a) is the IP address. If (l,s) not provided, uses 0.
INHERITED METHODS
The following are inherited methods. See Cisco::SNMP for more information.
- close
- error
- session
EXPORT
None by default.
EXAMPLES
This distribution comes with several scripts (installed to the default bin
install directory) that not only demonstrate example uses but also provide functional execution.
LICENSE
This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.
AUTHOR
Copyright (C) Michael Vincent 2015
All rights reserved