Re: Retriving IfPhysAddress using Perl doesn't work

2007-05-01 Thread Marco Bettiol
Here is how I solved the problem: Add this to the script $SNMP::use_sprint_value=1; Now It seems to Work well! - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take

Re: Retriving IfPhysAddress using Perl doesn't work

2007-05-01 Thread Marco Bettiol
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 m

Re: Retriving IfPhysAddress using Perl doesn't work

2007-04-30 Thread Dave Shield
On 30/04/07, Marco Bettiol <[EMAIL PROTECTED]> wrote: > Querying by snmpget/walk is ok: > Example: > # > $> snmpwalk -c public -v 2c 192.168.5.100 ifPhysAddress.8 > IF-MIB::ifPhysAddress.8 = STRING: 0:14:bf:d2:67:e5 > > > but trying with perl gives this... > my $s = new SNMP::Session (DestHo

Retriving IfPhysAddress using Perl doesn't work

2007-04-30 Thread Marco Bettiol
I'm developing an application and I need to retrive each ifPhysAddress field using the perl module. I'm running on ubuntu-festy and using Net-SNMP-5.2.3 (but I also tried with Gentoo using 5.4). Querying by snmpget/walk is ok: Example: # $> snmpwalk -c public -v 2c 192.168.5.100 ifPhysAddres