summaryrefslogtreecommitdiff
path: root/include/net-snmp/agent/hardware/memory.h
blob: aba0a6c78c738cddc7ab10066339e965a6c6b268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
typedef struct netsnmp_memory_info_s netsnmp_memory_info;

#define NETSNMP_MEM_TYPE_PHYSMEM  1
#define NETSNMP_MEM_TYPE_USERMEM  2
#define NETSNMP_MEM_TYPE_VIRTMEM  3
#define NETSNMP_MEM_TYPE_STEXT    4
#define NETSNMP_MEM_TYPE_RTEXT    5
#define NETSNMP_MEM_TYPE_MBUF     6
#define NETSNMP_MEM_TYPE_CACHED   7
#define NETSNMP_MEM_TYPE_SHARED   8
#define NETSNMP_MEM_TYPE_SHARED2  9
#define NETSNMP_MEM_TYPE_SWAP    10
    /* Leave space for individual swap devices */
#define NETSNMP_MEM_TYPE_MAX     30

struct netsnmp_memory_info_s {
     int  idx;
     int  type;
     char *descr;

     long units;
     long size;
     long free;
     long other;

     netsnmp_memory_info *next;
};


    /*
     * Possibly not all needed ??
     */
netsnmp_memory_info *netsnmp_memory_get_first(  int );
netsnmp_memory_info *netsnmp_memory_get_next( netsnmp_memory_info*, int );
netsnmp_memory_info *netsnmp_memory_get_byIdx(  int,   int );
netsnmp_memory_info *netsnmp_memory_get_next_byIdx(int,int );

netsnmp_cache *netsnmp_memory_get_cache( void );
int netsnmp_memory_load( void );