]>
Commit | Line | Data |
---|---|---|
d82d8654 | 1 | #ifdef SQUID_SNMP |
2 | #ifndef CACHE_SNMP_H | |
3 | #define CACHE_SNMP_H | |
4 | ||
5 | /* mib stuff here */ | |
6 | ||
7 | struct subtree { | |
8 | oid name[16]; /* objid prefix of subtree */ | |
9 | u_char namelen; /* number of subid's in name above */ | |
10 | struct variable *variables; /* pointer to variables array */ | |
11 | int variables_len; /* number of entries in above array */ | |
12 | int variables_width; /* sizeof each variable entry */ | |
13 | struct subtree *next; | |
14 | }; | |
15 | ||
16 | #if 1 | |
17 | #define variable2 variable | |
18 | #define variable4 variable | |
19 | #define variable5 variable | |
20 | #define variable7 variable | |
21 | #define variable13 variable | |
22 | #else | |
23 | /** | |
24 | * This is a new variable structure that doesn't have as much memory | |
25 | * tied up in the object identifier. It's elements have also been re-arranged | |
26 | * so that the name field can be variable length. Any number of these | |
27 | * structures can be created with lengths tailor made to a particular | |
28 | * application. The first 5 elements of the structure must remain constant. | |
29 | */ | |
30 | struct variable2 { | |
31 | u_char magic; /* passed to function as a hint */ | |
32 | char type; /* type of variable */ | |
33 | u_short acl; /* access control list for variable */ | |
34 | u_char *(*findVar) (); /* function that finds variable */ | |
35 | u_char namelen; /* length of name below */ | |
36 | oid name[2]; /* object identifier of variable */ | |
37 | }; | |
38 | ||
39 | struct variable4 { | |
40 | u_char magic; /* passed to function as a hint */ | |
41 | char type; /* type of variable */ | |
42 | u_short acl; /* access control list for variable */ | |
43 | u_char *(*findVar) (); /* function that finds variable */ | |
44 | u_char namelen; /* length of name below */ | |
45 | oid name[4]; /* object identifier of variable */ | |
46 | }; | |
47 | ||
48 | struct variable7 { | |
49 | u_char magic; /* passed to function as a hint */ | |
50 | char type; /* type of variable */ | |
51 | u_short acl; /* access control list for variable */ | |
52 | u_char *(*findVar) (); /* function that finds variable */ | |
53 | u_char namelen; /* length of name below */ | |
54 | oid name[7]; /* object identifier of variable */ | |
55 | }; | |
56 | struct variable13 { | |
57 | u_char magic; /* passed to function as a hint */ | |
58 | char type; /* type of variable */ | |
59 | u_short acl; /* access control list for variable */ | |
60 | u_char *(*findVar) (); /* function that finds variable */ | |
61 | u_char namelen; /* length of name below */ | |
62 | oid name[13]; /* object identifier of variable */ | |
63 | }; | |
64 | ||
65 | #endif | |
66 | ||
67 | ||
68 | /* MIB definitions | |
69 | * We start from the SQUIDMIB as the root of the subtree | |
70 | * | |
71 | * we are under : iso.org.dod.internet.experimental.nsfnet.squid | |
72 | * | |
73 | */ | |
74 | ||
75 | ||
76 | #define SQUIDMIB 1, 3, 6, 1, 3, 25, 17 | |
77 | ||
78 | ||
79 | /* basic groups under .squid */ | |
80 | ||
81 | #define SQ_SYS SQUIDMIB, 1 | |
82 | #define SQ_CONF SQUIDMIB, 2 | |
83 | #define SQ_PRF SQUIDMIB, 3 | |
84 | #define SQ_ACC SQUIDMIB, 6 | |
85 | #define SQ_SEC SQUIDMIB, 5 | |
86 | #define SQ_NET SQUIDMIB, 4 | |
87 | ||
88 | /* cacheSystem group */ | |
89 | ||
90 | enum { | |
91 | SYSVMSIZ, | |
92 | SYSSTOR | |
93 | }; | |
94 | /* cacheConfig group */ | |
95 | ||
96 | enum { | |
97 | CONF_ADMIN, | |
98 | CONF_UPTIME, | |
99 | CONF_ST_MMAXSZ, | |
100 | CONF_ST_MHIWM, | |
101 | CONF_ST_MLOWM, | |
102 | CONF_ST_SWMAXSZ, | |
103 | CONF_ST_SWHIWM, | |
104 | CONF_ST_SWLOWM, | |
105 | CONF_WAIS_RHOST, | |
106 | CONF_WAIS_RPORT, | |
107 | CONF_TIO_RD, | |
108 | CONF_TIO_CON, | |
109 | CONF_TIO_REQ, | |
110 | CONF_LOG_LVL, | |
111 | CONF_PTBL_ID, | |
112 | CONF_PTBL_NAME, | |
113 | CONF_PTBL_IP, | |
114 | CONF_PTBL_HTTP, | |
115 | CONF_PTBL_ICP, | |
116 | CONF_PTBL_TYPE, | |
117 | CONF_PTBL_STATE | |
118 | }; | |
119 | ||
120 | /* cacheNetwork group */ | |
121 | ||
122 | enum { | |
123 | NETDB_ID, | |
124 | NETDB_NET, | |
125 | NETDB_PING_S, | |
126 | NETDB_PING_R, | |
127 | NETDB_HOPS, | |
128 | NETDB_RTT, | |
129 | NETDB_PINGTIME, | |
130 | NETDB_LASTUSE, | |
131 | NETDB_LINKCOUNT, | |
132 | NET_IPC_ID, | |
133 | NET_IPC_NAME, | |
134 | NET_IPC_IP, | |
135 | NET_IPC_STATE, | |
136 | NET_FQDN_ID, | |
137 | NET_FQDN_NAME, | |
138 | NET_FQDN_IP, | |
139 | NET_FQDN_LASTREF, | |
140 | NET_FQDN_EXPIRES, | |
141 | NET_FQDN_STATE, | |
142 | NET_TCPCONNS, | |
143 | NET_UDPCONNS, | |
144 | NET_INTHRPUT, | |
145 | NET_OUTHRPUT | |
146 | }; | |
147 | ||
148 | enum { | |
149 | PERF_SYS_PF, | |
150 | PERF_SYS_NUMR, | |
151 | PERF_SYS_DEFR, | |
152 | PERF_SYS_MEMUSAGE, | |
153 | PERF_SYS_CPUUSAGE, | |
154 | PERF_SYS_MAXRESSZ, | |
155 | PERF_SYS_CURMEMSZ, | |
156 | PERF_SYS_CURLRUEXP, | |
157 | PERF_SYS_CURUNLREQ, | |
158 | PERF_SYS_CURUNUSED_FD, | |
159 | PERF_SYS_CURRESERVED_FD, | |
160 | PERF_SYS_NUMOBJCNT, | |
161 | PERF_PROTOSTAT_ID, | |
162 | PERF_PROTOSTAT_KBMAX, | |
163 | PERF_PROTOSTAT_KBMIN, | |
164 | PERF_PROTOSTAT_KBAVG, | |
165 | PERF_PROTOSTAT_KBNOW, | |
166 | PERF_PROTOSTAT_HIT, | |
167 | PERF_PROTOSTAT_MISS, | |
168 | PERF_PROTOSTAT_REFCOUNT, | |
169 | PERF_PROTOSTAT_TRNFRB, | |
170 | PERF_PROTOSTAT_AGGR_CLHTTP, | |
171 | PERF_PROTOSTAT_AGGR_ICP_S, | |
172 | PERF_PROTOSTAT_AGGR_ICP_R, | |
173 | PERF_PROTOSTAT_AGGR_CURSWAP, | |
174 | PERF_SYS_FD_NUMBER, | |
175 | PERF_SYS_FD_TYPE, | |
176 | PERF_SYS_FD_TOUT, | |
177 | PERF_SYS_FD_NREAD, | |
178 | PERF_SYS_FD_NWRITE, | |
179 | PERF_SYS_FD_ADDR, | |
180 | PERF_SYS_FD_NAME, | |
181 | PERF_PEERSTAT_ID, | |
182 | PERF_PEERSTAT_SENT, | |
183 | PERF_PEERSTAT_PACKED, | |
184 | PERF_PEERSTAT_FETCHES, | |
185 | PERF_PEERSTAT_RTT, | |
186 | PERF_PEERSTAT_IGN, | |
187 | PERF_PEERSTAT_KEEPAL_S, | |
188 | PERF_PEERSTAT_KEEPAL_R | |
189 | }; | |
190 | #endif | |
191 | #endif |