snmp_core.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 "acl/Strategy.h"
15 #include "cache_snmp.h"
16 #include "comm/forward.h"
17 #include "ip/forward.h"
18 
19 class MemBuf;
20 
21 #define SNMP_REQUEST_SIZE 4096
22 #define MAX_PROTOSTAT 5
23 
26 typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
27 typedef enum {atNone = 0, atSum, atAverage, atMax, atMin} AggrType;
28 
31  int len;
34  int children;
35 
37 
40 };
41 
42 struct snmp_pdu* snmpAgentResponse(struct snmp_pdu* PDU);
43 AggrType snmpAggrType(oid* Current, snint CurrentLen);
44 
46 
47 extern PF snmpHandleUdp;
48 void snmpInit(void);
49 void snmpOpenPorts(void);
50 void snmpClosePorts(void);
51 const char * snmpDebugOid(oid * Name, snint Len, MemBuf &outbuf);
52 void addr2oid(Ip::Address &addr, oid *Dest);
53 void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
54 
55 class ACLSNMPCommunityStrategy: public ACLStrategy<char const *>
56 {
57 public:
58  virtual int match (ACLData<MatchType> *&data, ACLFilledChecklist *checklist) override;
59 };
60 
61 #endif /* SQUID_SNMP_CORE_H */
62 
struct _mib_tree_entry ** leaves
Definition: snmp_core.h:36
PF snmpHandleUdp
AggrType aggrType
Definition: snmp_core.h:39
oid * name
Definition: snmp_core.h:30
void snmpOpenPorts(void)
Definition: snmp_core.cc:256
void addr2oid(Ip::Address &addr, oid *Dest)
Definition: snmp_core.cc:1078
void oid2addr(oid *Dest, Ip::Address &addr, u_int code)
Definition: snmp_core.cc:1110
virtual int match(ACLData< MatchType > *&data, ACLFilledChecklist *checklist) override
Definition: snmp_core.cc:1132
void const char HLPCB void * data
Definition: stub_helper.cc:16
oid *( instance_Fn)(oid *name, snint *len, mib_tree_entry *current, oid_ParseFn **Fn)
Definition: snmp_core.h:26
int64_t snint
Definition: cache_snmp.h:14
oid_ParseFn * parsefunction
Definition: snmp_core.h:32
Comm::ConnectionPointer snmpOutgoingConn
Definition: snmp_core.cc:36
instance_Fn * instancefunction
Definition: snmp_core.h:33
void * addr
Definition: membanger.c:46
void PF(int, void *)
Definition: forward.h:18
Definition: snmp_core.h:29
void snmpInit(void)
Definition: snmp_core.cc:68
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
AggrType snmpAggrType(oid *Current, snint CurrentLen)
Definition: snmp_core.cc:568
unsigned char code
Definition: html_quote.c:20
u_int oid
Definition: asn1.h:42
A matching algorithm.
Definition: Strategy.h:21
Definition: MemBuf.h:23
const char * snmpDebugOid(oid *Name, snint Len, MemBuf &outbuf)
Definition: snmp_core.cc:1051
void snmpClosePorts(void)
Definition: snmp_core.cc:319
int len
Definition: snmp_core.h:31
struct snmp_pdu * snmpAgentResponse(struct snmp_pdu *PDU)
Definition: snmp_core.cc:455
variable_list *( oid_ParseFn)(variable_list *, snint *)
Definition: snmp_core.h:24
struct _mib_tree_entry * parent
Definition: snmp_core.h:38
AggrType
Definition: snmp_core.h:27
int children
Definition: snmp_core.h:34

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors