[EMAIL PROTECTED] wrote:
> On poniedziaĆek, 24 marca 2008 you wrote:
>> [EMAIL PROTECTED] wrote:
>>> Hi
>>>
>>> I`m having problems with the SNMP.pm Perl module for Net-SNMP. I`m
>>> trying to use the gettable() function to retrieve a table using the
>>> following perl code:
>> This should work but here is one thing to try. Leave out the:
>>
>> UseSprintValue => 1
>>
>> This flag causes the perl module to use the library's value sprinting
>> code...
>>
>> I would be surprised if it did not resolve enumerations to symbolic
>> labels but I haven't looked at that code in a while.
>>
>> Can you post if the behaviour changes with that flag removed?
>>
>
>
> Removing this flag doesn`t change the output. However, I`ve discovered,
> that adding the noindexes option to the gettable call does:
>
> '1.167806987.1' => {
> 'gponGponPmObjectHistEntryAvail24Hrs'
> => '1',
> 'gponGponPmObjectEndpoint' => 'ont',
> 'gponGponPmObjectHistEntryAvail15Min'
> => '96',
> 'gponGponPmObjectThreshPointer' => '1',
> 'gponGponPmObjectType' => 'gemPort',
> 'gponGponPmObjectTypeIndex'
> => '167806987',
> 'gponGponPmObjectHistEntrySize24Hrs'
> => '1',
> 'gponGponPmObjectIndex' => '15',
> 'gponGponPmObjectHistEntrySize15Min'
> => '96',
> 'gponGponPmObjectAdminState15Min'
> => 'unlock',
> 'gponGponPmObjectAdminState24Hrs'
> => 'unlock'
> }
>
> I`ve tried to dig through the SNMP.pm code to find the cause and
> noticed, that without 'noindexes => 1' the fields alredy resolved
> to 'gemPort', 'ont' are overwritten with plain integers from the index
> hash key. Unfortunately I couldn`t figure out why the index hash key
> values are not properly mapped to enums.
>
>
it is in the function _gettable_end_routine() and this code in particular
for ($i = 0; $i <= $#indexes; $i++) {
$state->{'result_hash'}{$trow}{$indexes[$i]} = $nindexes->[$i];
}
hopefully the person who implemented gettable() is listening and can comment.
if the workaround of setting 'noindexes' is adequate I'd go with that...is it?
-G
ps. please copy mail-list
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders