oid.h 790 B

12345678910111213141516171819202122232425262728
  1. #ifndef NETSNMP_LIBRARY_OID_H
  2. #define NETSNMP_LIBRARY_OID_H
  3. #if defined(__CYGWIN__) && defined(__LP64__)
  4. /*
  5. * The winExtDLL implementation assumes that the size of an OID component is
  6. * 32 bits. Since on the 64-bit Cygwin environment unsigned long is 64 bits
  7. * wide, use unsigned int instead for oids. See also the definition of
  8. * SnmpVarBindList on MSDN
  9. * (https://msdn.microsoft.com/en-us/library/windows/desktop/aa378929.aspx).
  10. */
  11. typedef unsigned int oid;
  12. #define MAX_SUBID 0xFFFFFFFFUL
  13. #define NETSNMP_PRIo ""
  14. #else
  15. #ifndef EIGHTBIT_SUBIDS
  16. typedef unsigned long oid;
  17. #define MAX_SUBID 0xFFFFFFFFUL
  18. #define NETSNMP_PRIo "l"
  19. #else
  20. typedef unsigned char oid;
  21. #define MAX_SUBID 0xFF
  22. #define NETSNMP_PRIo ""
  23. #endif
  24. #endif /* __CYGWIN64__ */
  25. #endif /* NETSNMP_LIBRARY_OID_H */