Re: NetSNMP::agent and ASN_COUNTER64

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 19/04/07, Maxime Henrion <[email protected]> wrote:
> It seems the NetSNMP::agent module can't deal properly with
> ASN_COUNTER64 types.  Whenever I try to use this type when calling the
> setValue() method on the request object from an embedded perl agent, no
> value is returned at all from the OID.

That doesn't surprise me greatly.



>                               the code that handles ASN_COUNTER64
> types is broken.  Indeed, it's trying to store the value in an "unsigned
> long" variable, which is going to be 32bits on the vast majority of
> 32bits platforms.

The way that counter64 values are handled in the rest of the library
is as a "struct counter64", containing two 32-bit values.   I would
expect the same approach to be used here.

I've had a quick look at the rest of the perl code, and there's a similar
problem in the file SNMP/SNMP.xs, in the routine _add_var_val_str.
My guess is that both of these places need to be re-written to work
with a "struct counter64" value, instead of a simple integer.

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.