]> git.ipfire.org Git - thirdparty/squid.git/blame - src/snmp_core.h
Added some class documentation.
[thirdparty/squid.git] / src / snmp_core.h
CommitLineData
51ea0904 1/*
51ea0904
CT
2 * DEBUG: section 49 SNMP Interface
3 *
4 */
e0d28505 5
51ea0904
CT
6#ifndef SQUID_SNMP_CORE_H
7#define SQUID_SNMP_CORE_H
e0d28505 8
51ea0904 9#include "cache_snmp.h"
e0d28505 10#include "comm/forward.h"
af69c635
FC
11#include "typedefs.h"
12
13namespace Ip {
14 class Address;
15}
16class MemBuf;
e0d28505 17
51ea0904
CT
18#define SNMP_REQUEST_SIZE 4096
19#define MAX_PROTOSTAT 5
20
51ea0904
CT
21typedef struct _mib_tree_entry mib_tree_entry;
22typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
23typedef enum {atNone = 0, atSum, atAverage, atMax, atMin} AggrType;
e0d28505 24
51ea0904
CT
25struct _mib_tree_entry {
26 oid *name;
27 int len;
28 oid_ParseFn *parsefunction;
29 instance_Fn *instancefunction;
30 int children;
31
32 struct _mib_tree_entry **leaves;
33
34 struct _mib_tree_entry *parent;
35 AggrType aggrType;
36};
37
38extern struct snmp_pdu* snmpAgentResponse(struct snmp_pdu* PDU);
39extern AggrType snmpAggrType(oid* Current, snint CurrentLen);
40
1b76e6c1 41extern Comm::ConnectionPointer snmpOutgoingConn;
af69c635 42
9c0a2256
FC
43extern PF snmpHandleUdp;
44extern void snmpInit(void);
45extern void snmpOpenPorts(void);
46extern void snmpClosePorts(void);
47extern const char * snmpDebugOid(oid * Name, snint Len, MemBuf &outbuf);
48extern void addr2oid(Ip::Address &addr, oid *Dest);
49extern void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
50
51ea0904 51#endif /* SQUID_SNMP_CORE_H */