hi folks,

why do the following produce different data structures?

#!/opt/local/bin/perl
use SNMP;
[...]
$val = $sess->bulkwalk('0', '10000', $oid)

produces:
Dumping val
$VAR1 = [
          bless( [
                   bless( [
                            'ipNetToMediaPhysAddress',
                            '1.10.10.196.1',
                            '0:4:dd:b8:ec:60',
                            'OCTETSTR'
                          ], 'SNMP::Varbind' ),
...

whereas

#!/opt/vdops/bin/perl
use SNMP;
[...]
$vb = new SNMP::Varbind([$oid]);
$val = $sess->bulkwalk('0', '10000', $vb)

produces:

Dumping val
$VAR1 = bless( [
                 bless( [
                          'ipNetToMediaPhysAddress',
                          '1.10.10.196.1',
                          '0:4:dd:b8:ec:60',
                          'OCTETSTR'
                        ], 'SNMP::Varbind' ),
...


i.e. a bulkwalk on a simple oid produces an array containing a blessed array of blessed Varbinds (4 element arrays) ... whereas bulkwalk on a varbind produces a blessed array of blessed Varbinds (4 element arrays).


seems to me that both approaches should return the same data structure ... namely, a blessed array of blessed Varbinds ... but perhaps i'm missing something.

--sk

stuart kendrick
fhcrc



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
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

Reply via email to