]> git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp_core.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / snmp_core.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 49 SNMP Interface
5 *
6 */
7
8 #ifndef SQUID_SNMP_CORE_H
9 #define SQUID_SNMP_CORE_H
10
11 #include "cache_snmp.h"
12 #include "comm/forward.h"
13
14 #define SNMP_REQUEST_SIZE 4096
15 #define MAX_PROTOSTAT 5
16
17 typedef struct _mib_tree_entry mib_tree_entry;
18 typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
19 typedef enum {atNone = 0, atSum, atAverage, atMax, atMin} AggrType;
20
21 struct _mib_tree_entry {
22 oid *name;
23 int len;
24 oid_ParseFn *parsefunction;
25 instance_Fn *instancefunction;
26 int children;
27
28 struct _mib_tree_entry **leaves;
29
30 struct _mib_tree_entry *parent;
31 AggrType aggrType;
32 };
33
34 extern struct snmp_pdu* snmpAgentResponse(struct snmp_pdu* PDU);
35 extern AggrType snmpAggrType(oid* Current, snint CurrentLen);
36
37 extern Comm::ConnectionPointer snmpOutgoingConn;
38
39 #endif /* SQUID_SNMP_CORE_H */