Thanks for the patch, it help a lot (solaris kstat 64 bits value).
interger64 should use strtoll instead of strtoull like counter64 ?
then how do you cut an interger64 in two 32 bits word ?
No gauge64 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have tested the patch on a 32-bit machine and it does not work. For a 32-bit system, you also need to assign high/low values to struct counter64 (as is done in the supplied patch for a 64-bit machine).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have confirmed integer64/counter64 error on 32bit system. I don't test on 32bit system when uploaded this patch. So, upload new patch that fixed this problem on 32bit system. (net-snmp-5.4.1-pass-64bit.patch net-snmp-5.4.1-support-integer64-snmp-get-walk.patch)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This patch uses strtoull. There are checks and defines for HAVE_STRTOL and HAVE_STRTOUL. Can a check for a strtoull be added to configure for HAVE_STRTOULL?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=88893
Originator: NO
Thanks for the patch! It has been applied to the current
development code, and will appear in the next major release
of the Net-SNMP package.
Logged In: NO
Thanks for the patch, it help a lot (solaris kstat 64 bits value).
interger64 should use strtoll instead of strtoull like counter64 ?
then how do you cut an interger64 in two 32 bits word ?
No gauge64 ?
Logged In: YES
user_id=1351324
Originator: YES
In net-snmp-5.4-pass-counter64.patch, integer64 is wrong operating. So, this problems is fixed follow patch (net-snmp-5.4.1-pass-64bit.patch).
If you want to use integer64, snmp client (snmpget/snmpwalk) must adjust this patch!
File Added: net-snmp-5.4.1-pass-64bit.patch
Logged In: YES
user_id=848638
Originator: NO
Could you please submit the new integer64 patch as a new (separate) tracker item?
Logged In: YES
user_id=1630718
Originator: NO
I have tested the patch on a 32-bit machine and it does not work. For a 32-bit system, you also need to assign high/low values to struct counter64 (as is done in the supplied patch for a 64-bit machine).
Logged In: YES
user_id=848638
Originator: NO
Which patch did you test? net-snmp-5.4.1-pass-64bit.patch?
Logged In: YES
user_id=1630718
Originator: NO
I tested net-snmp-5.4.1-pass-64bit.patch (applied to the net-snmp-5.4.1.tar.gz download).
Logged In: YES
user_id=848638
Originator: NO
Would you be willing to propose a revised patch?
Logged In: YES
user_id=1351324
Originator: YES
I have confirmed integer64/counter64 error on 32bit system. I don't test on 32bit system when uploaded this patch. So, upload new patch that fixed this problem on 32bit system. (net-snmp-5.4.1-pass-64bit.patch net-snmp-5.4.1-support-integer64-snmp-get-walk.patch)
Logged In: YES
user_id=1351324
Originator: YES
File Added: net-snmp-5.4.1-pass-64bit.patch
support counter64 and integer64 on pass or pass_persist that fixed overflow on 32bit system
support integer64 on snmpwalk or sampget
Logged In: YES
user_id=1351324
Originator: YES
File Added: net-snmp-5.4.1-support-integer64-snmp-get-walk.patch
This patch uses strtoull. There are checks and defines for HAVE_STRTOL and HAVE_STRTOUL. Can a check for a strtoull be added to configure for HAVE_STRTOULL?
Would really be nice to have this functionality so we can report the actual size of our large filesystems without resorting to octet-strings.
It was added in 2007, in net-snmp 5.5 and newer. What version are you using?
NET-SNMP version: 5.7.2
Is it possible that only the pass patch was added and not the snmp-get-walk patch?
I modified https://sourceforge.net/p/net-snmp/code/ci/master/tree/local/passtest to return integer64 and counter64 but only the counter64 oid works with snmpwalk. The integer64 oid returns "No Such Instance currently exists at this OID" and the walk stops at that point.
Changing its type to opaque gets it to return a value but it also overflows.
They should be the same, the value is generated with:
Last edit: Wade Fitzpatrick 2015-07-13
It appears that the patch only actually works for Counter64.
Curiously, someone else is having the same trouble - can you try the patch that I gave to him in the thread at https://sourceforge.net/p/net-snmp/mailman/net-snmp-users/thread/2ECE5CD7-7D6F-4679-BA64-35298989B394%40bayour.com/ ?
I've committed my fix, along with some tests, to the V5-7-patches and master branches. It will be in the future 5.8 and 5.7.4 releases.