[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: stats (and back-monitor) counters wrap when overflowing (ITS#3324)

Please disregard my previous posting.  According to
draft-ietf-ldapbis-syntaxes INTEGER (

   A value of the Integer syntax is a whole number of unlimited
   magnitude.  The LDAP-specific encoding of a value of this syntax is
   the optionally signed decimal digit character string representation
   of the number (so, for example, the number 1321 is represented by the
   character string "1321").  The encoding is defined by the following

      Integer = ( HYPHEN LDIGIT *DIGIT ) / number

   The <HYPHEN>, <LDIGIT>, <DIGIT> and <number> rules are defined in

   The LDAP definition for the Integer syntax is:

      ( DESC 'INTEGER' )

   This syntax corresponds to the INTEGER ASN.1 type from [ASN.1].

so unlimited magnitude is allowed; hence, we can use an arbitrary
precision library to store/handle these counters.  I'm considering the
opportunity to use "gmp" (http://swox.com/gmp/) due to its wide
availability and (advertized) performances and portability.  However,
since we need few operations (essentially, addition and transformation in
string representation), coding a custom one is an option.


Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497