Hello all,
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. There are no errors at all in the log, it looks as if it was silently discarded. Is this a known problem? I've had a quick look at the code, and even though this is not sufficient to explain this problem, 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. If we get a string and parsing is required, the code uses strtoul() which is similarly inadequate. A possible fix would be to use "unsigned long long" variables and strtoull(), but that has the drawback that this variable type and associated function is only standard starting with C99, and some platforms may not support it. I've had a try at this, but I can't report on wether it works or not, since there is some other problem that causes the value to be discarded somehow. This happens with net-snmp 5.3.1 from the FreeBSD port, which contains a few patches from the SVN repository that I had to add to fix other issues (memory leaks and 64bits fixes). From what I can see, there haven't been any changes in the trunk that are likely to fix these issues; the agent.xs file is basically the same. Any help on this would be greatly appreciated. If more information is needed, please just tell me and I will send it as soon as possible. Thanks, Maxime PS: Please keep me in the Cc: list since I am not subscribed to this mailing list. ------------------------------------------------------------------------- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users