How could i get a list of all interfaces on a host with snmp, i am using.
use Net::SNMP::Interfaces;
my $interfaces = Net::SNMP::Interfaces->new(Hostname => 'localhost',
Community => 'public' );
my @ifnames = $interfaces->all_interfaces();
But i am getting the reply of:
root@localhost:~# perl i.pl
Can't call method "all_interfaces" on an undefined value at i.pl line 6.