[Define to enable SNMP monitoring of Squid])
AM_CONDITIONAL(ENABLE_SNMP, [test "x$enable_snmp" = "xyes"])
if test "x$enable_snmp" = "xyes"; then
- SNMPLIB='../snmplib/libsnmp.a'
+ SNMPLIB='../snmplib/libsnmplib.a'
makesnmplib=snmplib
fi
AC_MSG_NOTICE([SNMP support enabled: $enable_snmp])
src/ipc/Makefile \
src/ssl/Makefile \
src/mgr/Makefile \
- src/snmpx/Makefile \
+ src/snmp/Makefile \
contrib/Makefile \
snmplib/Makefile \
icons/Makefile \
##
AM_CFLAGS = $(SQUID_CFLAGS)
AM_CXXFLAGS = $(SQUID_CXXFLAGS)
-noinst_LIBRARIES = libsnmp.a
-libsnmp_a_SOURCES = asn1.c parse.c snmp_vars.c \
+noinst_LIBRARIES = libsnmplib.a
+libsnmplib_a_SOURCES = asn1.c parse.c snmp_vars.c \
coexistance.c snmp_api.c snmp_error.c \
mib.c snmp_api_error.c \
snmp_msg.c \
MemBlob.h \
MemBlob.cc
-SNMP_ALL_SOURCE = \
- snmp_core.h \
- snmp_core.cc \
- snmp_agent.cc
-if ENABLE_SNMP
-SNMP_SOURCE = $(SNMP_ALL_SOURCE)
-else
-SNMP_SOURCE =
-endif
-
LOADABLE_MODULES_SOURCES = \
LoadableModule.h \
LoadableModule.cc \
SSL_LOCAL_LIBS =
endif
+SNMP_ALL_SOURCE = \
+ snmp_core.h \
+ snmp_core.cc \
+ snmp_agent.cc
if ENABLE_SNMP
-SUBDIRS += snmpx
-SNMPX_LIBS = snmpx/libsnmpx.la
+SNMP_SOURCE = $(SNMP_ALL_SOURCE)
+SUBDIRS += snmp
+SNMP_LIBS = snmp/libsnmp.la
+else
+SNMP_SOURCE =
endif
if USE_ADAPTATION
$(CRYPTLIB) \
$(REGEXLIB) \
$(SNMPLIB) \
- $(SNMPX_LIBS) \
+ $(SNMP_LIBS) \
${ADAPTATION_LIBS} \
$(ESI_LIBS) \
$(SSL_LIBS) \
#include "mgr/Request.h"
#include "mgr/Response.h"
#if SQUID_SNMP
-#include "snmpx/Inquirer.h"
-#include "snmpx/Request.h"
-#include "snmpx/Response.h"
+#include "snmp/Inquirer.h"
+#include "snmp/Request.h"
+#include "snmp/Response.h"
#endif
CBDATA_NAMESPACED_CLASS_INIT(Ipc, Coordinator);
#include "ipc/StrandCoords.h"
#include "mgr/forward.h"
#if SQUID_SNMP
-#include "snmpx/forward.h"
+#include "snmp/forward.h"
#endif
#include <map>
#include "mgr/Forwarder.h"
#include "CacheManager.h"
#if SQUID_SNMP
-#include "snmpx/Forwarder.h"
-#include "snmpx/Request.h"
-#include "snmpx/Response.h"
+#include "snmp/Forwarder.h"
+#include "snmp/Request.h"
+#include "snmp/Response.h"
#endif
CBDATA_NAMESPACED_CLASS_INIT(Ipc, Strand);
#include "ipc/Port.h"
#include "mgr/forward.h"
#if SQUID_SNMP
-#include "snmpx/forward.h"
+#include "snmp/forward.h"
#endif
namespace Ipc
#include "CommCalls.h"
#include "ipc/Port.h"
#include "snmp_core.h"
-#include "snmpx/Forwarder.h"
-#include "snmpx/Request.h"
-#include "snmpx/Response.h"
+#include "snmp/Forwarder.h"
+#include "snmp/Request.h"
+#include "snmp/Response.h"
CBDATA_NAMESPACED_CLASS_INIT(Snmp, Forwarder);
#define SQUID_SNMPX_FORWARDER_H
#include "ipc/Forwarder.h"
-#include "snmpx/Pdu.h"
-#include "snmpx/Session.h"
+#include "snmp/Pdu.h"
+#include "snmp/Session.h"
class CommCloseCbParams;
#include "CommCalls.h"
#include "ipc/UdsOp.h"
#include "snmp_core.h"
-#include "snmpx/Inquirer.h"
-#include "snmpx/Response.h"
-#include "snmpx/Request.h"
+#include "snmp/Inquirer.h"
+#include "snmp/Response.h"
+#include "snmp/Request.h"
CBDATA_NAMESPACED_CLASS_INIT(Snmp, Inquirer);
#define SQUID_SNMPX_INQUIRER_H
#include "ipc/Inquirer.h"
-#include "snmpx/forward.h"
-#include "snmpx/Pdu.h"
+#include "snmp/forward.h"
+#include "snmp/Pdu.h"
class CommCloseCbParams;
#include "ipc/TypedMsgHdr.h"
#include "protos.h"
#include "snmp_core.h"
-#include "snmpx/Pdu.h"
-#include "snmpx/Var.h"
+#include "snmp/Pdu.h"
+#include "snmp/Var.h"
Snmp::Pdu::Pdu()
#include "config.h"
#include "ipc/Messages.h"
#include "ipc/TypedMsgHdr.h"
-#include "snmpx/Request.h"
+#include "snmp/Request.h"
Snmp::Request::Request(int aRequestorId, unsigned int aRequestId,
#include "ip/Address.h"
#include "ipc/forward.h"
#include "ipc/Request.h"
-#include "snmpx/Pdu.h"
-#include "snmpx/Session.h"
+#include "snmp/Pdu.h"
+#include "snmp/Session.h"
namespace Snmp
#include "base/TextException.h"
#include "ipc/Messages.h"
#include "ipc/TypedMsgHdr.h"
-#include "snmpx/Response.h"
+#include "snmp/Response.h"
std::ostream& Snmp::operator << (std::ostream& os, const Response& response)
#include "ipc/forward.h"
#include "ipc/Response.h"
-#include "snmpx/Pdu.h"
+#include "snmp/Pdu.h"
#include <ostream>
namespace Snmp
#include "base/TextException.h"
#include "ipc/TypedMsgHdr.h"
#include "protos.h"
-#include "snmpx/Session.h"
+#include "snmp/Session.h"
Snmp::Session::Session()
#include "base/TextException.h"
#include "ipc/TypedMsgHdr.h"
#include "protos.h"
-#include "snmpx/Var.h"
+#include "snmp/Var.h"
Snmp::Var::Var()
#include "ip/Address.h"
#include "ip/tools.h"
#include "snmp_core.h"
-#include "snmpx/Forwarder.h"
+#include "snmp/Forwarder.h"
/// dials snmpConnectionOpened call
snmpAddNodeStr("1.3.6.1.4.1.3495.1.2.5", CONF_ST_MMAXSZ, snmp_confFn, static_Inst, atSum);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.2.5", CONF_ST_SWMAXSZ, snmp_confFn, static_Inst, atSum);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.2.5", CONF_ST_SWHIWM, snmp_confFn, static_Inst, atMin);
- snmpAddNodeStr("1.3.6.1.4.1.3495.1.2.5", CONF_ST_SWLOWM, snmp_confFn, static_Inst, atMax);
+ snmpAddNodeStr("1.3.6.1.4.1.3495.1.2.5", CONF_ST_SWLOWM, snmp_confFn, static_Inst, atMin);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.2", CONF_UNIQNAME, snmp_confFn, static_Inst);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_CPUUSAGE, snmp_prfSysFn, static_Inst, atSum);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_MAXRESSZ, snmp_prfSysFn, static_Inst, atSum);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_NUMOBJCNT, snmp_prfSysFn, static_Inst, atSum);
+ /*
+ Amos comments:
+ The meaning of LRU is "oldest timestamped object in cache, if LRU algorithm is
+ used"...
+ What this SMP support needs to do is aggregate via a special filter equivalent to
+ min() to retain the semantic oldest-object meaning. A special one is needed that
+ works as unsigned and ignores '0' values.
+ */
snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_CURLRUEXP, snmp_prfSysFn, static_Inst);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_CURUNLREQ, snmp_prfSysFn, static_Inst, atSum);
snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_CURUNUSED_FD, snmp_prfSysFn, static_Inst, atSum);