Menu

#737 use counter64 and integer64 on pass or pass_persist

backport-needed
closed
None
5
2015-10-05
2007-02-12
No

Follow patch is enable to use counter64 or integer64 on pass or pass_persist.

Discussion

  • Dave Shield

    Dave Shield - 2007-03-12

    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.

     
  • Nobody/Anonymous

    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 ?

     
  • JoungKyun.Kim

    JoungKyun.Kim - 2008-04-11

    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

     
  • Thomas Anders

    Thomas Anders - 2008-04-11

    Logged In: YES
    user_id=848638
    Originator: NO

    Could you please submit the new integer64 patch as a new (separate) tracker item?

     
  • Anthony Novatsis

    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).

     
  • Thomas Anders

    Thomas Anders - 2008-06-04

    Logged In: YES
    user_id=848638
    Originator: NO

    Which patch did you test? net-snmp-5.4.1-pass-64bit.patch?

     
  • Anthony Novatsis

    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).

     
  • Thomas Anders

    Thomas Anders - 2008-06-04

    Logged In: YES
    user_id=848638
    Originator: NO

    Would you be willing to propose a revised patch?

     
  • JoungKyun.Kim

    JoungKyun.Kim - 2008-06-04

    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)

     
  • JoungKyun.Kim

    JoungKyun.Kim - 2008-06-04

    Logged In: YES
    user_id=1351324
    Originator: YES

    File Added: net-snmp-5.4.1-pass-64bit.patch

     
  • JoungKyun.Kim

    JoungKyun.Kim - 2008-06-04

    support counter64 and integer64 on pass or pass_persist that fixed overflow on 32bit system

     
  • JoungKyun.Kim

    JoungKyun.Kim - 2008-06-04

    Logged In: YES
    user_id=1351324
    Originator: YES

    File Added: net-snmp-5.4.1-support-integer64-snmp-get-walk.patch

     
  • Alex Burger

    Alex Burger - 2009-04-27

    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?

     
  • Wade Fitzpatrick

    Would really be nice to have this functionality so we can report the actual size of our large filesystems without resorting to octet-strings.

     
    • Bill Fenner

      Bill Fenner - 2015-07-10

      It was added in 2007, in net-snmp 5.5 and newer. What version are you using?

       
      • Wade Fitzpatrick

        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.

        SNMPv2-SMI::enterprises.8072.2.255.7.0 = No Such Instance currently exists at this OID
        

        Changing its type to opaque gets it to return a value but it also overflows.

        +  $PLACE.7.0)     echo "opaque"; echo -n "0210";
        +         echo "obase=16; 256*256*256*256+42" | bc; exit 0 ;;  # expect 4294967338
        +  $PLACE.8.0)     echo "counter64"; echo "256*256*256*256+42" | bc;            exit 0 ;;
        
        SNMPv2-SMI::enterprises.8072.2.255.7.0 = OPAQUE: 2A
        SNMPv2-SMI::enterprises.8072.2.255.8.0 = Counter64: 4294967338
        

        They should be the same, the value is generated with:

        echo "256*256*256*256+42"|bc
        
         

        Last edit: Wade Fitzpatrick 2015-07-13
  • Bill Fenner

    Bill Fenner - 2015-10-05

    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.

     
  • Bill Fenner

    Bill Fenner - 2015-10-05
    • status: open --> closed
    • assigned_to: Bill Fenner
    • Group: --> backport-needed
     

Log in to post a comment.