Hi,

On Sun, July 20, 2008 18:18, Brice Figureau wrote:
> I'm developing a perl agentx subagent for net-snmp 5.4.1.
> The mib that this agent is handling contains a few Counter64 (which are
> not correctly handled by the perl agent, but that's not my main issue).
> The first counter64 is enterprises.20267.200.1.6.0. The rest is either
> gauge or counter32.
>
> The problem is the following:
>
> the enterprises.20267.200.1.6.0 oid is a counter64 (whose vallue size is <
> 32bits).
> When requesting this value from snmpwalk, snmpget, snmpbulkwalk or
> snmpbulkget in v2c mode, the right value is returned:
>
> snmpbulkget -r1 -Cn1 -Cr0 -v 2c -c public 192.168.168.14
> .1.3.6.1.4.1.20267.200.1.6
> SNMPv2-SMI::enterprises.20267.200.1.6.0 = Counter64: 3095605758
>
> (in this example, I patched agent.xs to be able to feed a struct counter64
> to snmp_set_var_typed_value to get the real result, otherwise the high and
> low part of the counter where swapped on amd64/i386).

Here is a patch against current SVN head that fixes the counter64 handling
in perl subagent for 32bits and 64bits arch (tested on i386 and x86_64
only).

Thanks,
-- 
Brice Figureau

Attachment: fix-perl-subagent-counter64.patch
Description: Binary data

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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