Re: Retriving IfPhysAddress using Perl doesn't work

"Marco Bettiol" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
yes It's a format convesion problem. The string is 6 character long and as
defined in RFC1213 is an OCTECT STRING (6).
Now The problem is how to convert it. I think I should use the unpack
function but I don't know how...
One more question... Is It possible to solve the problem at a deeper level
modifing something in SNMP.pm? There al many applications I would like to
use (SNMP::Info, Net::SNMP::Interfaces)
which suffer the same bug...

2007/5/1, Dave Shield <[email protected]>:


> my $s = new SNMP::Session (DestHost => "192.168.5.100", Version=>"2c");
> > print ($s->get('ifPhysAddress.8'));
> > ########
> > THE OUTPUT:  "��g"
>
>
> Rather than simply printing the output as a text string,
> try saving the result into another variable.  Then investigate
> what format that value might be.
>
> I'm not in a position to test this right now, but I suspect it
> may well be a six-character binary string.  What happens
> if you split this string into six separate integer values,
> and print each one in hex?
>
> Dave
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.