Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Net::SNMP and Mac Addresses

by jds (Acolyte)
on Apr 13, 2004 at 18:40 UTC ( [id://344822]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://344822]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found