memory.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. typedef struct netsnmp_memory_info_s netsnmp_memory_info;
  2. #define NETSNMP_MEM_TYPE_PHYSMEM 1
  3. #define NETSNMP_MEM_TYPE_USERMEM 2
  4. #define NETSNMP_MEM_TYPE_VIRTMEM 3
  5. #define NETSNMP_MEM_TYPE_STEXT 4
  6. #define NETSNMP_MEM_TYPE_RTEXT 5
  7. #define NETSNMP_MEM_TYPE_MBUF 6
  8. #define NETSNMP_MEM_TYPE_CACHED 7
  9. #define NETSNMP_MEM_TYPE_SHARED 8
  10. #define NETSNMP_MEM_TYPE_SHARED2 9
  11. #define NETSNMP_MEM_TYPE_SWAP 10
  12. /* Leave space for individual swap devices */
  13. #define NETSNMP_MEM_TYPE_MAX 30
  14. struct netsnmp_memory_info_s {
  15. int idx;
  16. int type;
  17. char *descr;
  18. long units;
  19. long size;
  20. long free;
  21. long other;
  22. netsnmp_memory_info *next;
  23. };
  24. /*
  25. * Possibly not all needed ??
  26. */
  27. netsnmp_memory_info *netsnmp_memory_get_first( int );
  28. netsnmp_memory_info *netsnmp_memory_get_next( netsnmp_memory_info*, int );
  29. netsnmp_memory_info *netsnmp_memory_get_byIdx( int, int );
  30. netsnmp_memory_info *netsnmp_memory_get_next_byIdx(int,int );
  31. netsnmp_cache *netsnmp_memory_get_cache( void );
  32. int netsnmp_memory_load( void );
  33. int netsnmp_mem_arch_load(netsnmp_cache *cache, void *magic);