Net::SNMP::HostInfo::IpNetToMediaEntry - An entry in the ipNetToMediaTable of a MIB-II host
use Net::SNMP::HostInfo; $host = shift || 'localhost'; $hostinfo = Net::SNMP::HostInfo->new(Hostname => $host); print "\nNet To Media Table:\n"; printf "%-3s %-15s %-17s %s\n", qw/If NetAddress PhysAddress Type/; for $entry ($hostinfo->ipNetToMediaTable) { printf "%-3s %-15s %-17s %s\n", $entry->ipNetToMediaIfIndex, $entry->ipNetToMediaNetAddress, $entry->ipNetToMediaPhysAddress, $entry->ipNetToMediaType; }
"Each entry contains one IpAddress to `physical' address equivalence."
"The interface on which this entry's equivalence is effective. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex."
"The media-dependent `physical' address."
"The IpAddress corresponding to the media- dependent `physical' address."
"The type of mapping.
Setting this object to the value invalid(2) has the effect of invalidating the corresponding entry in the ipNetToMediaTable. That is, it effectively dissasociates the interface identified with said entry from the mapping identified with said entry. It is an implementation-specific matter as to whether the agent removes an invalidated entry from the table. Accordingly, management stations must be prepared to receive tabular information from agents that corresponds to entries not currently in use. Proper interpretation of such entries requires examination of the relevant ipNetToMediaType object."
Possible values are:
other(1), invalid(2), dynamic(3), static(4)
James Macfarlane, <jmacfarla@cpan.org>
Net::SNMP::HostInfo
To install Net::SNMP::HostInfo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SNMP::HostInfo
CPAN shell
perl -MCPAN -e shell install Net::SNMP::HostInfo
For more information on module installation, please visit the detailed CPAN module installation guide.