]> git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp_core.h
Remove no longer needed includes of typedefs.h
[thirdparty/squid.git] / src / snmp_core.h
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /* DEBUG: section 49 SNMP Interface */
10
11 #ifndef SQUID_SNMP_CORE_H
12 #define SQUID_SNMP_CORE_H
13
14 #include "cache_snmp.h"
15 #include "comm/forward.h"
16 #include "ip/forward.h"
17
18 class MemBuf;
19
20 #define SNMP_REQUEST_SIZE 4096
21 #define MAX_PROTOSTAT 5
22
23 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
24 typedef struct _mib_tree_entry mib_tree_entry;
25 typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
26 typedef enum {atNone = 0, atSum, atAverage, atMax, atMin} AggrType;
27
28 struct _mib_tree_entry {
29 oid *name;
30 int len;
31 oid_ParseFn *parsefunction;
32 instance_Fn *instancefunction;
33 int children;
34
35 struct _mib_tree_entry **leaves;
36
37 struct _mib_tree_entry *parent;
38 AggrType aggrType;
39 };
40
41 struct snmp_pdu* snmpAgentResponse(struct snmp_pdu* PDU);
42 AggrType snmpAggrType(oid* Current, snint CurrentLen);
43
44 extern Comm::ConnectionPointer snmpOutgoingConn;
45
46 extern PF snmpHandleUdp;
47 void snmpInit(void);
48 void snmpOpenPorts(void);
49 void snmpClosePorts(void);
50 const char * snmpDebugOid(oid * Name, snint Len, MemBuf &outbuf);
51 void addr2oid(Ip::Address &addr, oid *Dest);
52 void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
53
54 #endif /* SQUID_SNMP_CORE_H */
55