]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
-Rename snmplib/libsnmp.a to snmplib/libsnmplib.a
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 31 Jan 2011 14:04:00 +0000 (16:04 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 31 Jan 2011 14:04:00 +0000 (16:04 +0200)
-Move src/snmpx to src/snmp/
-Merge the ENABLE_SNMP blocks in Makafile.am

23 files changed:
configure.ac
snmplib/Makefile.am
src/Makefile.am
src/ipc/Coordinator.cc
src/ipc/Coordinator.h
src/ipc/Strand.cc
src/ipc/Strand.h
src/snmp/Forwarder.cc [moved from src/snmpx/Forwarder.cc with 96% similarity]
src/snmp/Forwarder.h [moved from src/snmpx/Forwarder.h with 95% similarity]
src/snmp/Inquirer.cc [moved from src/snmpx/Inquirer.cc with 96% similarity]
src/snmp/Inquirer.h [moved from src/snmpx/Inquirer.h with 95% similarity]
src/snmp/Pdu.cc [moved from src/snmpx/Pdu.cc with 99% similarity]
src/snmp/Pdu.h [moved from src/snmpx/Pdu.h with 100% similarity]
src/snmp/Request.cc [moved from src/snmpx/Request.cc with 97% similarity]
src/snmp/Request.h [moved from src/snmpx/Request.h with 94% similarity]
src/snmp/Response.cc [moved from src/snmpx/Response.cc with 97% similarity]
src/snmp/Response.h [moved from src/snmpx/Response.h with 97% similarity]
src/snmp/Session.cc [moved from src/snmpx/Session.cc with 98% similarity]
src/snmp/Session.h [moved from src/snmpx/Session.h with 100% similarity]
src/snmp/Var.cc [moved from src/snmpx/Var.cc with 99% similarity]
src/snmp/Var.h [moved from src/snmpx/Var.h with 100% similarity]
src/snmp/forward.h [moved from src/snmpx/forward.h with 100% similarity]
src/snmp_core.cc

index 1a1bcf19847b892fe856a923a0875739d61aaa52..74b23a7486a011856b02385a014b562b39aa02de 100644 (file)
@@ -995,7 +995,7 @@ SQUID_DEFINE_BOOL(SQUID_SNMP,${enable_snmp:=yes},
    [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])
@@ -3370,7 +3370,7 @@ AC_CONFIG_FILES([\
        src/ipc/Makefile \
        src/ssl/Makefile \
        src/mgr/Makefile \
-       src/snmpx/Makefile \
+       src/snmp/Makefile \
        contrib/Makefile \
        snmplib/Makefile \
        icons/Makefile \
index 027d617b197606b78a7ddaf50631052a5df4b160..391e10464a425b3879f0c11e4b5bd2d215c93b82 100644 (file)
@@ -4,8 +4,8 @@
 ## 
 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 \
index da42677421d34eb31e97380509eac4f662847584..53b972bf4b61ae48ac5b993b1b4e9c3ed70280ac 100644 (file)
@@ -24,16 +24,6 @@ SBUF_SOURCE= \
        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 \
@@ -51,9 +41,16 @@ else
 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
@@ -553,7 +550,7 @@ squid_LDADD = \
        $(CRYPTLIB) \
        $(REGEXLIB) \
        $(SNMPLIB) \
-       $(SNMPX_LIBS) \
+       $(SNMP_LIBS) \
        ${ADAPTATION_LIBS} \
        $(ESI_LIBS) \
        $(SSL_LIBS) \
index a79d4b8cc94eaf0ca7e52fcf3bdee06ef3b23fb5..e571233ee070dc65d6e3d2bcc028bdba1c52999c 100644 (file)
@@ -16,9 +16,9 @@
 #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);
index bafa3f7a09fc1897852bc143bf32b197c61a28a7..bc0d8fd765de6c647101ee28d374aab725f38f24 100644 (file)
@@ -16,7 +16,7 @@
 #include "ipc/StrandCoords.h"
 #include "mgr/forward.h"
 #if SQUID_SNMP
-#include "snmpx/forward.h"
+#include "snmp/forward.h"
 #endif
 #include <map>
 
index 392fa1371244025a31152d48cdbc5a88bd26a120..c968f8892a77fb134d80a64e608f4e8bb0956cd8 100644 (file)
@@ -17,9 +17,9 @@
 #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);
index 5d2a0b28de9df94ba3166249fb4f23127cd23acd..e574b7bd0d3017de56f6eeee279df4ffe384df9a 100644 (file)
@@ -11,7 +11,7 @@
 #include "ipc/Port.h"
 #include "mgr/forward.h"
 #if SQUID_SNMP
-#include "snmpx/forward.h"
+#include "snmp/forward.h"
 #endif
 
 namespace Ipc
similarity index 96%
rename from src/snmpx/Forwarder.cc
rename to src/snmp/Forwarder.cc
index 6c30c17ae94b59a4dc63482a0988af2c96e9db6c..66f6f711bdbbc06965237491b80d61a1acc95e71 100644 (file)
@@ -10,9 +10,9 @@
 #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);
similarity index 95%
rename from src/snmpx/Forwarder.h
rename to src/snmp/Forwarder.h
index bdef2d6c80620169bd9c3fa93f8991d347d22646..aba0b17207c8b80a8bd6a35d1ff656cd38300697 100644 (file)
@@ -9,8 +9,8 @@
 #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;
similarity index 96%
rename from src/snmpx/Inquirer.cc
rename to src/snmp/Inquirer.cc
index 73ae1d442a7a00dbf534f3fe4ebd083156f733f8..6d748b0355f2b3ea84c37bd620b996befb848f8a 100644 (file)
@@ -10,9 +10,9 @@
 #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);
similarity index 95%
rename from src/snmpx/Inquirer.h
rename to src/snmp/Inquirer.h
index 5f53ff17b89c042a846568cc4695782bb976b258..5efcdcfee769b6654982bdd454f2c79c353b88f1 100644 (file)
@@ -9,8 +9,8 @@
 #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;
similarity index 99%
rename from src/snmpx/Pdu.cc
rename to src/snmp/Pdu.cc
index 6efcaf60381ae3b1dc34d5de86322368f2f1f6ce..122856b019af24e48743614752a49e64271d5859 100644 (file)
@@ -10,8 +10,8 @@
 #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()
similarity index 100%
rename from src/snmpx/Pdu.h
rename to src/snmp/Pdu.h
similarity index 97%
rename from src/snmpx/Request.cc
rename to src/snmp/Request.cc
index a0d5f0927e6408c7845a2ca277e525c3713dee52..fabdb13ec038b46819fb191c1788461ca4ae6c32 100644 (file)
@@ -8,7 +8,7 @@
 #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,
similarity index 94%
rename from src/snmpx/Request.h
rename to src/snmp/Request.h
index aab4f1a3971148f3d98be8a09c71bcc471979ed9..f11cfa7723efc487c1c1c422414175cd5742d355 100644 (file)
@@ -11,8 +11,8 @@
 #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
similarity index 97%
rename from src/snmpx/Response.cc
rename to src/snmp/Response.cc
index f32c355650642090f6e3cbe51fb1750f4e8fd36d..aca96469933736bb45ad5aa541cc6dc2ac9eabb1 100644 (file)
@@ -9,7 +9,7 @@
 #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)
similarity index 97%
rename from src/snmpx/Response.h
rename to src/snmp/Response.h
index 99d9846f20edfaf7165732c33abf4b231892247f..2f7e4b086d82ec32c79a19dd8e56059edd6edc7c 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "ipc/forward.h"
 #include "ipc/Response.h"
-#include "snmpx/Pdu.h"
+#include "snmp/Pdu.h"
 #include <ostream>
 
 namespace Snmp
similarity index 98%
rename from src/snmpx/Session.cc
rename to src/snmp/Session.cc
index fb94ca4e55720ade12aa4addfd914b2c5f408a4b..566ec96d62687bda8470b5ba4013dd74be8ab995 100644 (file)
@@ -9,7 +9,7 @@
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
 #include "protos.h"
-#include "snmpx/Session.h"
+#include "snmp/Session.h"
 
 
 Snmp::Session::Session()
similarity index 100%
rename from src/snmpx/Session.h
rename to src/snmp/Session.h
similarity index 99%
rename from src/snmpx/Var.cc
rename to src/snmp/Var.cc
index ce1bf0ee047c9155424f9ae7f1d9851e8ebd6a89..70155e04788b50149f6201748eec6e08de52bb74 100644 (file)
@@ -9,7 +9,7 @@
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
 #include "protos.h"
-#include "snmpx/Var.h"
+#include "snmp/Var.h"
 
 
 Snmp::Var::Var()
similarity index 100%
rename from src/snmpx/Var.h
rename to src/snmp/Var.h
similarity index 100%
rename from src/snmpx/forward.h
rename to src/snmp/forward.h
index ecb7f91d599fc7ae5886c0c5797b9cc1de0d7533..0890ab4769337adc320e6f77d60f9219e2deecc2 100644 (file)
@@ -38,7 +38,7 @@
 #include "ip/Address.h"
 #include "ip/tools.h"
 #include "snmp_core.h"
-#include "snmpx/Forwarder.h"
+#include "snmp/Forwarder.h"
 
 
 /// dials snmpConnectionOpened call
@@ -144,7 +144,7 @@ snmpInit(void)
     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);
 
@@ -160,6 +160,14 @@ snmpInit(void)
     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);