int64.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef INT64_INCLUDED
  2. #define INT64_INCLUDED
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifndef NETSNMP_REMOVE_U64
  7. /*
  8. * Note: using the U64 typedef is deprecated because this typedef conflicts
  9. * with a typedef with the same name defined in the Perl header files.
  10. */
  11. typedef struct counter64 U64;
  12. #endif
  13. #define I64CHARSZ 21
  14. void divBy10(struct counter64, struct counter64 *,
  15. unsigned int *);
  16. void multBy10(struct counter64, struct counter64 *);
  17. void incrByU16(struct counter64 *, unsigned int);
  18. void incrByU32(struct counter64 *, unsigned int);
  19. NETSNMP_IMPORT
  20. void zeroU64(struct counter64 *);
  21. int isZeroU64(const struct counter64 *);
  22. NETSNMP_IMPORT
  23. void printU64(char *, const struct counter64 *);
  24. NETSNMP_IMPORT
  25. void printI64(char *, const struct counter64 *);
  26. int read64(struct counter64 *, const char *);
  27. NETSNMP_IMPORT
  28. void u64Subtract(const struct counter64 *pu64one,
  29. const struct counter64 *pu64two,
  30. struct counter64 *pu64out);
  31. void u64Incr(struct counter64 *pu64out,
  32. const struct counter64 *pu64one);
  33. void u64UpdateCounter(struct counter64 *pu64out,
  34. const struct counter64 *pu64one,
  35. const struct counter64 *pu64two);
  36. void u64Copy(struct counter64 *pu64one,
  37. const struct counter64 *pu64two);
  38. int netsnmp_c64_check_for_32bit_wrap(const struct counter64 *old_val,
  39. struct counter64 *new_val,
  40. int adjust);
  41. NETSNMP_IMPORT
  42. int netsnmp_c64_check32_and_update(struct counter64 *prev_val,
  43. struct counter64 *new_val,
  44. const struct counter64 *old_prev_val,
  45. int *need_wrap_check);
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif