]> arthur.barton.de Git - netdata.git/commitdiff
Separate net.inet6.icmp6.stats module
authorVladimir Kobal <vlad@prokk.net>
Tue, 14 Mar 2017 16:51:11 +0000 (18:51 +0200)
committerVladimir Kobal <vlad@prokk.net>
Tue, 14 Mar 2017 16:51:11 +0000 (18:51 +0200)
src/freebsd_sysctl.c
src/plugin_freebsd.c
src/plugin_freebsd.h

index 76417131f3b311a628a7c22ba0dbb6349196bc09..4328070d3f62af32aa49f24b5eba205db500b317 100644 (file)
@@ -2342,25 +2342,376 @@ int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
     return 0;
 }
 
+// --------------------------------------------------------------------------------------------------------------------
+// net.inet6.icmp6.stats
+
+int do_net_inet6_icmp6_stats(int update_every, usec_t dt) {
+    static int do_icmp6 = -1, do_icmp6_redir = -1, do_icmp6_errors = -1, do_icmp6_echos = -1, do_icmp6_router = -1,
+            do_icmp6_neighbor = -1, do_icmp6_types = -1;
+
+    if (unlikely(do_icmp6 == -1)) {
+        do_icmp6          = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp",           CONFIG_BOOLEAN_AUTO);
+        do_icmp6_redir    = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp redirects", CONFIG_BOOLEAN_AUTO);
+        do_icmp6_errors   = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp errors",    CONFIG_BOOLEAN_AUTO);
+        do_icmp6_echos    = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp echos",     CONFIG_BOOLEAN_AUTO);
+        do_icmp6_router   = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp router",    CONFIG_BOOLEAN_AUTO);
+        do_icmp6_neighbor = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp neighbor",  CONFIG_BOOLEAN_AUTO);
+        do_icmp6_types    = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp types",     CONFIG_BOOLEAN_AUTO);
+    }
+
+    if (likely(do_icmp6 || do_icmp6_redir || do_icmp6_errors || do_icmp6_echos || do_icmp6_router || do_icmp6_neighbor || do_icmp6_types)) {
+        static int mib[4] = {0, 0, 0, 0};
+        struct icmp6stat icmp6stat;
+
+        if (unlikely(GETSYSCTL_SIMPLE("net.inet6.icmp6.stats", mib, icmp6stat))) {
+            do_icmp6 = 0;
+            error("DISABLED: ipv6.icmp chart");
+            do_icmp6_redir = 0;
+            error("DISABLED: ipv6.icmpredir chart");
+            do_icmp6_errors = 0;
+            error("DISABLED: ipv6.icmperrors chart");
+            do_icmp6_echos = 0;
+            error("DISABLED: ipv6.icmpechos chart");
+            do_icmp6_router = 0;
+            error("DISABLED: ipv6.icmprouter chart");
+            do_icmp6_neighbor = 0;
+            error("DISABLED: ipv6.icmpneighbor chart");
+            do_icmp6_types = 0;
+            error("DISABLED: ipv6.icmptypes chart");
+            error("DISABLED: net.inet6.icmp6.stats module");
+            return 1;
+        } else {
+            int i;
+            struct icmp6_total {
+                u_long  msgs_in;
+                u_long  msgs_out;
+            } icmp6_total = {0, 0};
+
+            for (i = 0; i <= ICMP6_MAXTYPE; i++) {
+                icmp6_total.msgs_in += icmp6stat.icp6s_inhist[i];
+                icmp6_total.msgs_out += icmp6stat.icp6s_outhist[i];
+            }
+            icmp6_total.msgs_in += icmp6stat.icp6s_badcode + icmp6stat.icp6s_badlen + icmp6stat.icp6s_checksum + icmp6stat.icp6s_tooshort;
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6 == CONFIG_BOOLEAN_YES || (do_icmp6 == CONFIG_BOOLEAN_AUTO && (icmp6_total.msgs_in || icmp6_total.msgs_out))) {
+                do_icmp6 = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_received = NULL, *rd_sent = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmp",
+                                                 NULL,
+                                                 "icmp",
+                                                 NULL,
+                                                 "IPv6 ICMP Messages",
+                                                 "messages/s",
+                                                 10000,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_received = rrddim_add(st, "received", NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_sent     = rrddim_add(st, "sent",     NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_received, icmp6_total.msgs_out);
+                rrddim_set_by_pointer(st, rd_sent,     icmp6_total.msgs_in);
+
+                rrdset_done(st);
+            }
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6_redir == CONFIG_BOOLEAN_YES || (do_icmp6_redir == CONFIG_BOOLEAN_AUTO && (icmp6stat.icp6s_inhist[ND_REDIRECT] || icmp6stat.icp6s_outhist[ND_REDIRECT]))) {
+                do_icmp6_redir = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_received = NULL, *rd_sent = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmpredir",
+                                                 NULL,
+                                                 "icmp",
+                                                 NULL,
+                                                 "IPv6 ICMP Redirects",
+                                                 "redirects/s",
+                                                 10050,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_received = rrddim_add(st, "received", NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_sent     = rrddim_add(st, "sent",     NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_received, icmp6stat.icp6s_outhist[ND_REDIRECT]);
+                rrddim_set_by_pointer(st, rd_sent, icmp6stat.icp6s_inhist[ND_REDIRECT]);
+                rrdset_done(st);
+            }
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6_errors == CONFIG_BOOLEAN_YES || (do_icmp6_errors == CONFIG_BOOLEAN_AUTO && (
+                    icmp6stat.icp6s_badcode ||
+                    icmp6stat.icp6s_badlen ||
+                    icmp6stat.icp6s_checksum ||
+                    icmp6stat.icp6s_tooshort ||
+                    icmp6stat.icp6s_error ||
+                    icmp6stat.icp6s_inhist[ICMP6_DST_UNREACH] ||
+                    icmp6stat.icp6s_inhist[ICMP6_TIME_EXCEEDED] ||
+                    icmp6stat.icp6s_inhist[ICMP6_PARAM_PROB] ||
+                    icmp6stat.icp6s_outhist[ICMP6_DST_UNREACH] ||
+                    icmp6stat.icp6s_outhist[ICMP6_TIME_EXCEEDED] ||
+                    icmp6stat.icp6s_outhist[ICMP6_PARAM_PROB]))) {
+                do_icmp6_errors = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_in_errors = NULL, *rd_out_errors = NULL, *rd_in_csum_errors = NULL,
+                              *rd_in_dest_unreachs = NULL, *rd_in_pkt_too_bigs = NULL, *rd_in_time_excds = NULL,
+                              *rd_in_parm_problems = NULL, *rd_out_dest_unreachs = NULL, *rd_out_time_excds = NULL,
+                              *rd_out_parm_problems = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmperrors",
+                                                 NULL, "icmp",
+                                                 NULL,
+                                                 "IPv6 ICMP Errors",
+                                                 "errors/s",
+                                                 10100,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_in_errors         = rrddim_add(st, "InErrors",        NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_errors        = rrddim_add(st, "OutErrors",       NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_csum_errors    = rrddim_add(st, "InCsumErrors",    NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_dest_unreachs  = rrddim_add(st, "InDestUnreachs",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_pkt_too_bigs   = rrddim_add(st, "InPktTooBigs",    NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_time_excds     = rrddim_add(st, "InTimeExcds",     NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_parm_problems  = rrddim_add(st, "InParmProblems",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_dest_unreachs = rrddim_add(st, "OutDestUnreachs", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_time_excds    = rrddim_add(st, "OutTimeExcds",    NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_parm_problems = rrddim_add(st, "OutParmProblems", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_in_errors,         icmp6stat.icp6s_badcode + icmp6stat.icp6s_badlen +
+                                                                icmp6stat.icp6s_checksum + icmp6stat.icp6s_tooshort);
+                rrddim_set_by_pointer(st, rd_out_errors,        icmp6stat.icp6s_error);
+                rrddim_set_by_pointer(st, rd_in_csum_errors,    icmp6stat.icp6s_checksum);
+                rrddim_set_by_pointer(st, rd_in_dest_unreachs,  icmp6stat.icp6s_inhist[ICMP6_DST_UNREACH]);
+                rrddim_set_by_pointer(st, rd_in_pkt_too_bigs,   icmp6stat.icp6s_badlen);
+                rrddim_set_by_pointer(st, rd_in_time_excds,     icmp6stat.icp6s_inhist[ICMP6_TIME_EXCEEDED]);
+                rrddim_set_by_pointer(st, rd_in_parm_problems,  icmp6stat.icp6s_inhist[ICMP6_PARAM_PROB]);
+                rrddim_set_by_pointer(st, rd_out_dest_unreachs, icmp6stat.icp6s_outhist[ICMP6_DST_UNREACH]);
+                rrddim_set_by_pointer(st, rd_out_time_excds,    icmp6stat.icp6s_outhist[ICMP6_TIME_EXCEEDED]);
+                rrddim_set_by_pointer(st, rd_out_parm_problems, icmp6stat.icp6s_outhist[ICMP6_PARAM_PROB]);
+                rrdset_done(st);
+            }
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6_echos == CONFIG_BOOLEAN_YES || (do_icmp6_echos == CONFIG_BOOLEAN_AUTO && (
+                    icmp6stat.icp6s_inhist[ICMP6_ECHO_REQUEST] ||
+                    icmp6stat.icp6s_outhist[ICMP6_ECHO_REQUEST] ||
+                    icmp6stat.icp6s_inhist[ICMP6_ECHO_REPLY] ||
+                    icmp6stat.icp6s_outhist[ICMP6_ECHO_REPLY]))) {
+                do_icmp6_echos = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_in = NULL, *rd_out = NULL, *rd_in_replies = NULL, *rd_out_replies = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmpechos",
+                                                 NULL,
+                                                 "icmp",
+                                                 NULL,
+                                                 "IPv6 ICMP Echo",
+                                                 "messages/s",
+                                                 10200,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_in          = rrddim_add(st, "InEchos",        NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out         = rrddim_add(st, "OutEchos",       NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_replies  = rrddim_add(st, "InEchoReplies",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_replies = rrddim_add(st, "OutEchoReplies", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_in,          icmp6stat.icp6s_inhist[ICMP6_ECHO_REQUEST]);
+                rrddim_set_by_pointer(st, rd_out,         icmp6stat.icp6s_outhist[ICMP6_ECHO_REQUEST]);
+                rrddim_set_by_pointer(st, rd_in_replies,  icmp6stat.icp6s_inhist[ICMP6_ECHO_REPLY]);
+                rrddim_set_by_pointer(st, rd_out_replies, icmp6stat.icp6s_outhist[ICMP6_ECHO_REPLY]);
+                rrdset_done(st);
+            }
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6_router == CONFIG_BOOLEAN_YES || (do_icmp6_router == CONFIG_BOOLEAN_AUTO && (
+                    icmp6stat.icp6s_inhist[ND_ROUTER_SOLICIT] ||
+                    icmp6stat.icp6s_outhist[ND_ROUTER_SOLICIT] ||
+                    icmp6stat.icp6s_inhist[ND_ROUTER_ADVERT] ||
+                    icmp6stat.icp6s_outhist[ND_ROUTER_ADVERT]))) {
+                do_icmp6_router = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_in_solicits = NULL, *rd_out_solicits = NULL,
+                              *rd_in_advertisements = NULL, *rd_out_advertisements = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmprouter",
+                                                 NULL,
+                                                 "icmp",
+                                                 NULL,
+                                                 "IPv6 Router Messages",
+                                                 "messages/s",
+                                                 10400,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_in_solicits        = rrddim_add(st, "InSolicits",        NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_solicits       = rrddim_add(st, "OutSolicits",       NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_advertisements  = rrddim_add(st, "InAdvertisements",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_advertisements = rrddim_add(st, "OutAdvertisements", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_in_solicits,        icmp6stat.icp6s_inhist[ND_ROUTER_SOLICIT]);
+                rrddim_set_by_pointer(st, rd_out_solicits,       icmp6stat.icp6s_outhist[ND_ROUTER_SOLICIT]);
+                rrddim_set_by_pointer(st, rd_in_advertisements,  icmp6stat.icp6s_inhist[ND_ROUTER_ADVERT]);
+                rrddim_set_by_pointer(st, rd_out_advertisements, icmp6stat.icp6s_outhist[ND_ROUTER_ADVERT]);
+                rrdset_done(st);
+            }
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6_neighbor == CONFIG_BOOLEAN_YES || (do_icmp6_neighbor == CONFIG_BOOLEAN_AUTO && (
+                    icmp6stat.icp6s_inhist[ND_NEIGHBOR_SOLICIT] ||
+                    icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT] ||
+                    icmp6stat.icp6s_inhist[ND_NEIGHBOR_ADVERT] ||
+                    icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]))) {
+                do_icmp6_neighbor = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_in_solicits = NULL, *rd_out_solicits = NULL,
+                              *rd_in_advertisements = NULL, *rd_out_advertisements = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmpneighbor",
+                                                 NULL,
+                                                 "icmp",
+                                                 NULL,
+                                                 "IPv6 Neighbor Messages",
+                                                 "messages/s",
+                                                 10500,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_in_solicits        = rrddim_add(st, "InSolicits",        NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_solicits       = rrddim_add(st, "OutSolicits",       NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_advertisements  = rrddim_add(st, "InAdvertisements",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_advertisements = rrddim_add(st, "OutAdvertisements", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_in_solicits,        icmp6stat.icp6s_inhist[ND_NEIGHBOR_SOLICIT]);
+                rrddim_set_by_pointer(st, rd_out_solicits,       icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT]);
+                rrddim_set_by_pointer(st, rd_in_advertisements,  icmp6stat.icp6s_inhist[ND_NEIGHBOR_ADVERT]);
+                rrddim_set_by_pointer(st, rd_out_advertisements, icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]);
+                rrdset_done(st);
+            }
+
+            // --------------------------------------------------------------------
+
+            if (do_icmp6_types == CONFIG_BOOLEAN_YES || (do_icmp6_types == CONFIG_BOOLEAN_AUTO && (
+                    icmp6stat.icp6s_inhist[1] ||
+                    icmp6stat.icp6s_inhist[128] ||
+                    icmp6stat.icp6s_inhist[129] ||
+                    icmp6stat.icp6s_inhist[136] ||
+                    icmp6stat.icp6s_outhist[1] ||
+                    icmp6stat.icp6s_outhist[128] ||
+                    icmp6stat.icp6s_outhist[129] ||
+                    icmp6stat.icp6s_outhist[133] ||
+                    icmp6stat.icp6s_outhist[135] ||
+                    icmp6stat.icp6s_outhist[136]))) {
+                do_icmp6_types = CONFIG_BOOLEAN_YES;
+
+                static RRDSET *st = NULL;
+                static RRDDIM *rd_in_1 = NULL, *rd_in_128 = NULL, *rd_in_129 = NULL, *rd_in_136 = NULL,
+                              *rd_out_1 = NULL, *rd_out_128 = NULL, *rd_out_129 = NULL, *rd_out_133 = NULL,
+                              *rd_out_135 = NULL, *rd_out_143 = NULL;
+
+                if (unlikely(!st)) {
+                    st = rrdset_create_localhost("ipv6",
+                                                 "icmptypes",
+                                                 NULL,
+                                                 "icmp",
+                                                 NULL,
+                                                 "IPv6 ICMP Types",
+                                                 "messages/s",
+                                                 10700,
+                                                 update_every,
+                                                 RRDSET_TYPE_LINE
+                    );
+
+                    rd_in_1    = rrddim_add(st, "InType1",    NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_128  = rrddim_add(st, "InType128",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_129  = rrddim_add(st, "InType129",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_in_136  = rrddim_add(st, "InType136",  NULL,  1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_1   = rrddim_add(st, "OutType1",   NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_128 = rrddim_add(st, "OutType128", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_129 = rrddim_add(st, "OutType129", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_133 = rrddim_add(st, "OutType133", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_135 = rrddim_add(st, "OutType135", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                    rd_out_143 = rrddim_add(st, "OutType143", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
+                } else
+                    rrdset_next(st);
+
+                rrddim_set_by_pointer(st, rd_in_1, icmp6stat.icp6s_inhist[1]);
+                rrddim_set_by_pointer(st, rd_in_128, icmp6stat.icp6s_inhist[128]);
+                rrddim_set_by_pointer(st, rd_in_129, icmp6stat.icp6s_inhist[129]);
+                rrddim_set_by_pointer(st, rd_in_136, icmp6stat.icp6s_inhist[136]);
+                rrddim_set_by_pointer(st, rd_out_1, icmp6stat.icp6s_outhist[1]);
+                rrddim_set_by_pointer(st, rd_out_128, icmp6stat.icp6s_outhist[128]);
+                rrddim_set_by_pointer(st, rd_out_129, icmp6stat.icp6s_outhist[129]);
+                rrddim_set_by_pointer(st, rd_out_133, icmp6stat.icp6s_outhist[133]);
+                rrddim_set_by_pointer(st, rd_out_135, icmp6stat.icp6s_outhist[135]);
+                rrddim_set_by_pointer(st, rd_out_143, icmp6stat.icp6s_outhist[143]);
+                rrdset_done(st);
+            }
+        }
+    } else {
+        error("DISABLED: net.inet6.icmp6.stats module");
+        return 1;
+    }
+
+    return 0;
+}
+
 // --------------------------------------------------------------------------------------------------------------------
 // old sources
 
 int do_freebsd_sysctl_old(int update_every, usec_t dt) {
-    static int do_disk_io = -1,
-        do_bandwidth = -1,
-        do_icmp6 = -1, do_icmp6_redir = -1, do_icmp6_errors = -1, do_icmp6_echos = -1, do_icmp6_router = -1,
-        do_icmp6_neighbor = -1, do_icmp6_types = -1, do_space = -1, do_inodes = -1;
+    static int do_disk_io = -1, do_bandwidth = -1, do_space = -1, do_inodes = -1;
 
     if (unlikely(do_disk_io == -1)) {
         do_disk_io              = config_get_boolean("plugin:freebsd:sysctl", "stats for all disks", 1);
         do_bandwidth            = config_get_boolean("plugin:freebsd:sysctl", "bandwidth", 1);
-        do_icmp6                = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp", CONFIG_BOOLEAN_AUTO);
-        do_icmp6_redir          = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp redirects", CONFIG_BOOLEAN_AUTO);
-        do_icmp6_errors         = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp errors", CONFIG_BOOLEAN_AUTO);
-        do_icmp6_echos          = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp echos", CONFIG_BOOLEAN_AUTO);
-        do_icmp6_router         = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp router", CONFIG_BOOLEAN_AUTO);
-        do_icmp6_neighbor       = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp neighbor", CONFIG_BOOLEAN_AUTO);
-        do_icmp6_types          = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp types", CONFIG_BOOLEAN_AUTO);
         do_space                = config_get_boolean("plugin:freebsd:sysctl", "space usage for all disks", 1);
         do_inodes               = config_get_boolean("plugin:freebsd:sysctl", "inodes usage for all disks", 1);
     }
@@ -2400,13 +2751,6 @@ int do_freebsd_sysctl_old(int update_every, usec_t dt) {
         u_long  ift_obytes;
     } iftot = {0, 0};
 
-    // NEEDED BY: do_icmp6...
-    struct icmp6stat icmp6stat;
-    struct icmp6_total {
-        u_long  msgs_in;
-        u_long  msgs_out;
-    } icmp6_total = {0, 0};
-
     // NEEDED BY: do_space, do_inodes
     struct statfs *mntbuf;
     int mntsize;
@@ -2738,225 +3082,6 @@ int do_freebsd_sysctl_old(int update_every, usec_t dt) {
         }
     }
 
-    // --------------------------------------------------------------------
-
-    if (likely(do_icmp6 || do_icmp6_redir || do_icmp6_errors || do_icmp6_echos || do_icmp6_router || do_icmp6_neighbor || do_icmp6_types)) {
-        if (unlikely(GETSYSCTL_BY_NAME("net.inet6.icmp6.stats", icmp6stat))) {
-            do_icmp6 = 0;
-            error("DISABLED: ipv6.icmp");
-        } else {
-            for (i = 0; i <= ICMP6_MAXTYPE; i++) {
-                icmp6_total.msgs_in += icmp6stat.icp6s_inhist[i];
-                icmp6_total.msgs_out += icmp6stat.icp6s_outhist[i];
-            }
-            icmp6_total.msgs_in += icmp6stat.icp6s_badcode + icmp6stat.icp6s_badlen + icmp6stat.icp6s_checksum + icmp6stat.icp6s_tooshort;
-            if (do_icmp6 == CONFIG_BOOLEAN_YES || (do_icmp6 == CONFIG_BOOLEAN_AUTO && (icmp6_total.msgs_in || icmp6_total.msgs_out))) {
-                do_icmp6 = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmp");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmp", NULL, "icmp", NULL, "IPv6 ICMP Messages",
-                                       "messages/s", 10000, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "received", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "sent", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "sent", icmp6_total.msgs_in);
-                rrddim_set(st, "received", icmp6_total.msgs_out);
-                rrdset_done(st);
-            }
-
-            // --------------------------------------------------------------------
-
-            if (do_icmp6_redir == CONFIG_BOOLEAN_YES || (do_icmp6_redir == CONFIG_BOOLEAN_AUTO && (icmp6stat.icp6s_inhist[ND_REDIRECT] || icmp6stat.icp6s_outhist[ND_REDIRECT]))) {
-                do_icmp6_redir = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmpredir");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmpredir", NULL, "icmp", NULL, "IPv6 ICMP Redirects",
-                                       "redirects/s", 10050, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "received", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "sent", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "sent", icmp6stat.icp6s_inhist[ND_REDIRECT]);
-                rrddim_set(st, "received", icmp6stat.icp6s_outhist[ND_REDIRECT]);
-                rrdset_done(st);
-            }
-
-            // --------------------------------------------------------------------
-
-            if (do_icmp6_errors == CONFIG_BOOLEAN_YES || (do_icmp6_errors == CONFIG_BOOLEAN_AUTO && (
-                                                                            icmp6stat.icp6s_badcode ||
-                                                                            icmp6stat.icp6s_badlen ||
-                                                                            icmp6stat.icp6s_checksum ||
-                                                                            icmp6stat.icp6s_tooshort ||
-                                                                            icmp6stat.icp6s_error ||
-                                                                            icmp6stat.icp6s_inhist[ICMP6_DST_UNREACH] ||
-                                                                            icmp6stat.icp6s_inhist[ICMP6_TIME_EXCEEDED] ||
-                                                                            icmp6stat.icp6s_inhist[ICMP6_PARAM_PROB] ||
-                                                                            icmp6stat.icp6s_outhist[ICMP6_DST_UNREACH] ||
-                                                                            icmp6stat.icp6s_outhist[ICMP6_TIME_EXCEEDED] ||
-                                                                            icmp6stat.icp6s_outhist[ICMP6_PARAM_PROB]))) {
-                do_icmp6_errors = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmperrors");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmperrors", NULL, "icmp", NULL, "IPv6 ICMP Errors", "errors/s", 10100, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "InErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutErrors", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-
-                    rrddim_add(st, "InCsumErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InDestUnreachs", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InPktTooBigs", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InTimeExcds", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InParmProblems", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutDestUnreachs", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutTimeExcds", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutParmProblems", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "InErrors", icmp6stat.icp6s_badcode + icmp6stat.icp6s_badlen + icmp6stat.icp6s_checksum + icmp6stat.icp6s_tooshort);
-                rrddim_set(st, "OutErrors", icmp6stat.icp6s_error);
-                rrddim_set(st, "InCsumErrors", icmp6stat.icp6s_checksum);
-                rrddim_set(st, "InDestUnreachs", icmp6stat.icp6s_inhist[ICMP6_DST_UNREACH]);
-                rrddim_set(st, "InPktTooBigs", icmp6stat.icp6s_badlen);
-                rrddim_set(st, "InTimeExcds", icmp6stat.icp6s_inhist[ICMP6_TIME_EXCEEDED]);
-                rrddim_set(st, "InParmProblems", icmp6stat.icp6s_inhist[ICMP6_PARAM_PROB]);
-                rrddim_set(st, "OutDestUnreachs", icmp6stat.icp6s_outhist[ICMP6_DST_UNREACH]);
-                rrddim_set(st, "OutTimeExcds", icmp6stat.icp6s_outhist[ICMP6_TIME_EXCEEDED]);
-                rrddim_set(st, "OutParmProblems", icmp6stat.icp6s_outhist[ICMP6_PARAM_PROB]);
-                rrdset_done(st);
-            }
-
-            // --------------------------------------------------------------------
-
-            if (do_icmp6_echos == CONFIG_BOOLEAN_YES || (do_icmp6_echos == CONFIG_BOOLEAN_AUTO && (
-                                                                 icmp6stat.icp6s_inhist[ICMP6_ECHO_REQUEST] ||
-                                                                 icmp6stat.icp6s_outhist[ICMP6_ECHO_REQUEST] ||
-                                                                 icmp6stat.icp6s_inhist[ICMP6_ECHO_REPLY] ||
-                                                                 icmp6stat.icp6s_outhist[ICMP6_ECHO_REPLY]))) {
-                do_icmp6_echos = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmpechos");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmpechos", NULL, "icmp", NULL, "IPv6 ICMP Echo", "messages/s", 10200, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "InEchos", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutEchos", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InEchoReplies", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutEchoReplies", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "InEchos", icmp6stat.icp6s_inhist[ICMP6_ECHO_REQUEST]);
-                rrddim_set(st, "OutEchos", icmp6stat.icp6s_outhist[ICMP6_ECHO_REQUEST]);
-                rrddim_set(st, "InEchoReplies", icmp6stat.icp6s_inhist[ICMP6_ECHO_REPLY]);
-                rrddim_set(st, "OutEchoReplies", icmp6stat.icp6s_outhist[ICMP6_ECHO_REPLY]);
-                rrdset_done(st);
-            }
-
-            // --------------------------------------------------------------------
-
-            if (do_icmp6_router == CONFIG_BOOLEAN_YES || (do_icmp6_router == CONFIG_BOOLEAN_AUTO && (
-                                                                    icmp6stat.icp6s_inhist[ND_ROUTER_SOLICIT] ||
-                                                                    icmp6stat.icp6s_outhist[ND_ROUTER_SOLICIT] ||
-                                                                    icmp6stat.icp6s_inhist[ND_ROUTER_ADVERT] ||
-                                                                    icmp6stat.icp6s_outhist[ND_ROUTER_ADVERT]))) {
-                do_icmp6_router = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmprouter");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmprouter", NULL, "icmp", NULL, "IPv6 Router Messages", "messages/s", 10400, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "InSolicits", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutSolicits", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InAdvertisements", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutAdvertisements", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "InSolicits", icmp6stat.icp6s_inhist[ND_ROUTER_SOLICIT]);
-                rrddim_set(st, "OutSolicits", icmp6stat.icp6s_outhist[ND_ROUTER_SOLICIT]);
-                rrddim_set(st, "InAdvertisements", icmp6stat.icp6s_inhist[ND_ROUTER_ADVERT]);
-                rrddim_set(st, "OutAdvertisements", icmp6stat.icp6s_outhist[ND_ROUTER_ADVERT]);
-                rrdset_done(st);
-            }
-
-            // --------------------------------------------------------------------
-
-            if (do_icmp6_neighbor == CONFIG_BOOLEAN_YES || (do_icmp6_neighbor == CONFIG_BOOLEAN_AUTO && (
-                                                                    icmp6stat.icp6s_inhist[ND_NEIGHBOR_SOLICIT] ||
-                                                                    icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT] ||
-                                                                    icmp6stat.icp6s_inhist[ND_NEIGHBOR_ADVERT] ||
-                                                                    icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]))) {
-                do_icmp6_neighbor = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmpneighbor");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmpneighbor", NULL, "icmp", NULL, "IPv6 Neighbor Messages", "messages/s", 10500, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "InSolicits", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutSolicits", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InAdvertisements", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutAdvertisements", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "InSolicits", icmp6stat.icp6s_inhist[ND_NEIGHBOR_SOLICIT]);
-                rrddim_set(st, "OutSolicits", icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT]);
-                rrddim_set(st, "InAdvertisements", icmp6stat.icp6s_inhist[ND_NEIGHBOR_ADVERT]);
-                rrddim_set(st, "OutAdvertisements", icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]);
-                rrdset_done(st);
-            }
-
-            // --------------------------------------------------------------------
-
-            if (do_icmp6_types == CONFIG_BOOLEAN_YES || (do_icmp6_types == CONFIG_BOOLEAN_AUTO && (
-                                                                    icmp6stat.icp6s_inhist[1] ||
-                                                                    icmp6stat.icp6s_inhist[128] ||
-                                                                    icmp6stat.icp6s_inhist[129] ||
-                                                                    icmp6stat.icp6s_inhist[136] ||
-                                                                    icmp6stat.icp6s_outhist[1] ||
-                                                                    icmp6stat.icp6s_outhist[128] ||
-                                                                    icmp6stat.icp6s_outhist[129] ||
-                                                                    icmp6stat.icp6s_outhist[133] ||
-                                                                    icmp6stat.icp6s_outhist[135] ||
-                                                                    icmp6stat.icp6s_outhist[136]))) {
-                do_icmp6_types = CONFIG_BOOLEAN_YES;
-                st = rrdset_find_localhost("ipv6.icmptypes");
-                if (unlikely(!st)) {
-                    st = rrdset_create_localhost("ipv6", "icmptypes", NULL, "icmp", NULL, "IPv6 ICMP Types",
-                                       "messages/s", 10700, update_every, RRDSET_TYPE_LINE);
-
-                    rrddim_add(st, "InType1", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InType128", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InType129", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "InType136", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutType1", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutType128", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutType129", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutType133", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutType135", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                    rrddim_add(st, "OutType143", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
-                } else
-                    rrdset_next(st);
-
-                rrddim_set(st, "InType1", icmp6stat.icp6s_inhist[1]);
-                rrddim_set(st, "InType128", icmp6stat.icp6s_inhist[128]);
-                rrddim_set(st, "InType129", icmp6stat.icp6s_inhist[129]);
-                rrddim_set(st, "InType136", icmp6stat.icp6s_inhist[136]);
-                rrddim_set(st, "OutType1", icmp6stat.icp6s_outhist[1]);
-                rrddim_set(st, "OutType128", icmp6stat.icp6s_outhist[128]);
-                rrddim_set(st, "OutType129", icmp6stat.icp6s_outhist[129]);
-                rrddim_set(st, "OutType133", icmp6stat.icp6s_outhist[133]);
-                rrddim_set(st, "OutType135", icmp6stat.icp6s_outhist[135]);
-                rrddim_set(st, "OutType143", icmp6stat.icp6s_outhist[143]);
-                rrdset_done(st);
-            }
-        }
-    }
-
     // --------------------------------------------------------------------------
 
     if (likely(do_space || do_inodes)) {
index 1e9466c4d7527456d88f8863274624244ebecf61..fc7a9d382a6fe87331232f012ae6c33505b05eb9 100644 (file)
@@ -20,26 +20,27 @@ static struct freebsd_module {
         { .name = "vm.vmtotal",   .dim = "vmtotal", .enabled = 1, .func = do_vm_vmtotal },
         { .name = "kern.cp_time", .dim = "cp_time", .enabled = 1, .func = do_kern_cp_time },
         { .name = "hw.intrcnt",   .dim = "hw_intr", .enabled = 1, .func = do_hw_intcnt },
-        { .name = "vm.stats.sys.v_intr",  .dim = "dev_intr",      .enabled = 1, .func = do_vm_stats_sys_v_intr },
-        { .name = "vm.stats.sys.v_soft",  .dim = "soft_intr",     .enabled = 1, .func = do_vm_stats_sys_v_soft },
-        { .name = "vm.stats.sys.v_swtch", .dim = "context_swtch", .enabled = 1, .func = do_vm_stats_sys_v_swtch },
-        { .name = "vm.stats.vm.v_forks",  .dim = "forks",         .enabled = 1, .func = do_vm_stats_sys_v_forks },
+        { .name = "vm.stats.sys.v_intr",   .dim = "dev_intr",      .enabled = 1, .func = do_vm_stats_sys_v_intr },
+        { .name = "vm.stats.sys.v_soft",   .dim = "soft_intr",     .enabled = 1, .func = do_vm_stats_sys_v_soft },
+        { .name = "vm.stats.sys.v_swtch",  .dim = "context_swtch", .enabled = 1, .func = do_vm_stats_sys_v_swtch },
+        { .name = "vm.stats.vm.v_forks",   .dim = "forks",         .enabled = 1, .func = do_vm_stats_sys_v_forks },
         { .name = "vm.swap_info", .dim = "swap",       .enabled = 1, .func = do_vm_swap_info },
         { .name = "system.ram",   .dim = "system_ram", .enabled = 1, .func = do_system_ram },
-        { .name = "vm.stats.vm.v_swappgs", .dim = "swap_io", .enabled = 1, .func = do_vm_stats_sys_v_swappgs },
+        { .name = "vm.stats.vm.v_swappgs", .dim = "swap_io",       .enabled = 1, .func = do_vm_stats_sys_v_swappgs },
         { .name = "kern.ipc.sem", .dim = "semaphores",     .enabled = 1, .func = do_kern_ipc_sem },
         { .name = "kern.ipc.shm", .dim = "shared_memory",  .enabled = 1, .func = do_kern_ipc_shm },
         { .name = "kern.ipc.msq", .dim = "message_queues", .enabled = 1, .func = do_kern_ipc_msq },
-        { .name = "uptime",  .dim = "uptime",  .enabled = 1, .func = do_uptime },
-        { .name = "net.isr", .dim = "net_isr", .enabled = 1, .func = do_net_isr },
+        { .name = "uptime",       .dim = "uptime",         .enabled = 1, .func = do_uptime },
+        { .name = "net.isr",      .dim = "net_isr",        .enabled = 1, .func = do_net_isr },
 
         // network metrics
-        { .name = "net.inet.tcp.states",  .dim = "tcp_states", .enabled = 1, .func = do_net_inet_tcp_states },
-        { .name = "net.inet.tcp.stats",   .dim = "tcp_stats",  .enabled = 1, .func = do_net_inet_tcp_stats },
-        { .name = "net.inet.udp.stats",   .dim = "udp_stats",  .enabled = 1, .func = do_net_inet_udp_stats },
-        { .name = "net.inet.icmp.stats",  .dim = "icmp_stats", .enabled = 1, .func = do_net_inet_icmp_stats },
-        { .name = "net.inet.ip.stats",    .dim = "ip_stats",   .enabled = 1, .func = do_net_inet_ip_stats },
-        { .name = "net.inet6.ip6.stats",  .dim = "ip6_stats",  .enabled = 1, .func = do_net_inet6_ip6_stats },
+        { .name = "net.inet.tcp.states",   .dim = "tcp_states",  .enabled = 1, .func = do_net_inet_tcp_states },
+        { .name = "net.inet.tcp.stats",    .dim = "tcp_stats",   .enabled = 1, .func = do_net_inet_tcp_stats },
+        { .name = "net.inet.udp.stats",    .dim = "udp_stats",   .enabled = 1, .func = do_net_inet_udp_stats },
+        { .name = "net.inet.icmp.stats",   .dim = "icmp_stats",  .enabled = 1, .func = do_net_inet_icmp_stats },
+        { .name = "net.inet.ip.stats",     .dim = "ip_stats",    .enabled = 1, .func = do_net_inet_ip_stats },
+        { .name = "net.inet6.ip6.stats",   .dim = "ip6_stats",   .enabled = 1, .func = do_net_inet6_ip6_stats },
+        { .name = "net.inet6.icmp6.stats", .dim = "icmp6_stats", .enabled = 1, .func = do_net_inet6_icmp6_stats },
 
         // CPU metrics
         { .name = "kern.cp_times", .dim = "cp_times", .enabled = 1, .func = do_kern_cp_times },
index 1398151a8b475fde14d1d7a68cd93dc6bc92e18c..988151e99eebe30e581f615b917a18bdf3b1c885 100644 (file)
@@ -31,6 +31,7 @@ extern int do_net_inet_udp_stats(int update_every, usec_t dt);
 extern int do_net_inet_icmp_stats(int update_every, usec_t dt);
 extern int do_net_inet_ip_stats(int update_every, usec_t dt);
 extern int do_net_inet6_ip6_stats(int update_every, usec_t dt);
+extern int do_net_inet6_icmp6_stats(int update_every, usec_t dt);
 
 extern int do_freebsd_sysctl_old(int update_every, usec_t dt);