in reply to Net::SNMP and Mac Addresses

Thanks to those that responded! After following through with the bug report (which was down for a while!), I came up with a workable solution to the original code:
#!/usr/bin/perl use strict; use Net::SNMP; my ( $key ); my $session = Net::SNMP->session(-hostname => '1.2.3.4', -community => 'public', -translate => [-octetstring => 0x0], ); print $session->error(); my $macoid = '1.3.6.1.2.1.17.4.3.1.1'; my $macref = $session->get_table($macoid); foreach $key (keys %{$macref}) { print unpack('H12', $macref->{$key}) ."\n"; }

Replies are listed 'Best First'.
Re: Re: Net::SNMP and Mac Addresses
by Anonymous Monk on Apr 17, 2004 at 22:29 UTC
    I've been struggling with this for the last few days, but I wasn't seeing anybody else mentioning this anywhere. This was a big help! Thanks.
Re^2: Net::SNMP and Mac Addresses
by Anonymous Monk on Dec 09, 2004 at 15:49 UTC
    It worked. What a wonderful help! Thanks!