Net::SNMP::HostInfo::IpRouteEntry is an entry in the ipRouteTable of a MIB-II host.
SYNOPSIS
use Net::SNMP::HostInfo;
$host = shift || 'localhost';
$hostinfo = Net::SNMP::HostInfo->new(Hostname => $host);
print "
Route Table:
";
printf "%-15s %-15s %-15s %-11s %-10s %-3s %-3s
",
qw/Dest Mask NextHop Type Proto If Cost/;
for $route ($hostinfo->ipRouteTable) {
printf "%-15s %-15s %-15s %-11s %-10s %-3s %-3s
",
$route->ipRouteDest,
$route->ipRouteMask,
$route->ipRouteNextHop,
$route->ipRouteType,
$route->ipRouteProto,
$route->ipRouteIfIndex,
$route->ipRouteMetric1;
}
Product's homepage
Requirements:
· Perl