]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/snmp_agent.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / snmp_agent.cc
index db88c5976c3e4ed557563c212def0d2efb49bd5d..7d6ec81d56772b7b02fc5b403c965c8f4f30fafa 100644 (file)
 
 #include "squid.h"
 #include "cache_snmp.h"
-#include "Store.h"
+#include "globals.h"
 #include "mem_node.h"
+#include "protos.h"
+#include "StatCounters.h"
 #include "StatHist.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
+#include "Store.h"
 
 /************************************************************************
 
@@ -191,7 +194,6 @@ snmp_confFn(variable_list * Var, snint * ErrP)
     return Answer;
 }
 
-
 /*
  * cacheMesh group
  *   - cachePeerTable
@@ -209,7 +211,7 @@ snmp_meshPtblFn(variable_list * Var, snint * ErrP)
     *ErrP = SNMP_ERR_NOERROR;
 
     u_int index = Var->name[LEN_SQ_MESH + 3] ;
-    for (p = Config.peers; p != NULL; p = p->next, cnt++) {
+    for (p = Config.peers; p != NULL; p = p->next, ++cnt) {
         if (p->index == index) {
             laddr = p->in_addr ;
             break;
@@ -221,7 +223,6 @@ snmp_meshPtblFn(variable_list * Var, snint * ErrP)
         return NULL;
     }
 
-
     switch (Var->name[LEN_SQ_MESH + 2]) {
     case MESH_PTBL_INDEX: { // FIXME INET6: Should be visible?
         Answer = snmp_var_new_integer(Var->name, Var->name_length,
@@ -229,7 +230,6 @@ snmp_meshPtblFn(variable_list * Var, snint * ErrP)
     }
     break;
 
-
     case MESH_PTBL_NAME:
         cp = p->host;
         Answer = snmp_var_new(Var->name, Var->name_length);
@@ -573,35 +573,35 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP)
             break;
 
         case PERF_MEDIAN_HTTP_ALL:
-            x = statHistDeltaMedian(&l->client_http.all_svc_time,
-                                    &f->client_http.all_svc_time);
+            x = statHistDeltaMedian(l->client_http.allSvcTime,
+                                    f->client_http.allSvcTime);
             break;
 
         case PERF_MEDIAN_HTTP_MISS:
-            x = statHistDeltaMedian(&l->client_http.miss_svc_time,
-                                    &f->client_http.miss_svc_time);
+            x = statHistDeltaMedian(l->client_http.missSvcTime,
+                                    f->client_http.missSvcTime);
             break;
 
         case PERF_MEDIAN_HTTP_NM:
-            x = statHistDeltaMedian(&l->client_http.nm_svc_time,
-                                    &f->client_http.nm_svc_time);
+            x = statHistDeltaMedian(l->client_http.nearMissSvcTime,
+                                    f->client_http.nearMissSvcTime);
             break;
 
         case PERF_MEDIAN_HTTP_HIT:
-            x = statHistDeltaMedian(&l->client_http.hit_svc_time,
-                                    &f->client_http.hit_svc_time);
+            x = statHistDeltaMedian(l->client_http.hitSvcTime,
+                                    f->client_http.hitSvcTime);
             break;
 
         case PERF_MEDIAN_ICP_QUERY:
-            x = statHistDeltaMedian(&l->icp.query_svc_time, &f->icp.query_svc_time);
+            x = statHistDeltaMedian(l->icp.querySvcTime, f->icp.querySvcTime);
             break;
 
         case PERF_MEDIAN_ICP_REPLY:
-            x = statHistDeltaMedian(&l->icp.reply_svc_time, &f->icp.reply_svc_time);
+            x = statHistDeltaMedian(l->icp.replySvcTime, f->icp.replySvcTime);
             break;
 
         case PERF_MEDIAN_DNS:
-            x = statHistDeltaMedian(&l->dns.svc_time, &f->dns.svc_time);
+            x = statHistDeltaMedian(l->dns.svcTime, f->dns.svcTime);
             break;
 
         case PERF_MEDIAN_RHR:
@@ -613,8 +613,8 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP)
             break;
 
         case PERF_MEDIAN_HTTP_NH:
-            x = statHistDeltaMedian(&l->client_http.nh_svc_time,
-                                    &f->client_http.nh_svc_time);
+            x = statHistDeltaMedian(l->client_http.nearHitSvcTime,
+                                    f->client_http.nearHitSvcTime);
             break;
 
         default: