]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_net_snmp6.c
inline string to number conversion
[netdata.git] / src / proc_net_snmp6.c
index 512943bd73e761bda7d652c4175e7f74bc04b1dc..3812c5af3784bb993799b1a20ae7cba1685cb5a2 100644 (file)
@@ -347,6 +347,8 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
     unsigned long long UdpLite6SndbufErrors = 0ULL;
     unsigned long long UdpLite6InCsumErrors = 0ULL;
 
+    unsigned long long *ptr = NULL;
+
     for(l = 0; l < lines ;l++) {
         uint32_t words = procfile_linewords(ff, l);
         if(unlikely(words < 2)) {
@@ -361,98 +363,103 @@ int do_proc_net_snmp6(int update_every, usec_t dt) {
 
         uint32_t hash = simple_hash(name);
 
-             if(unlikely(hash == hash_Ip6InReceives && strcmp(name, "Ip6InReceives") == 0)) Ip6InReceives = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InHdrErrors && strcmp(name, "Ip6InHdrErrors") == 0)) Ip6InHdrErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InTooBigErrors && strcmp(name, "Ip6InTooBigErrors") == 0)) Ip6InTooBigErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InNoRoutes && strcmp(name, "Ip6InNoRoutes") == 0)) Ip6InNoRoutes = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InAddrErrors && strcmp(name, "Ip6InAddrErrors") == 0)) Ip6InAddrErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InUnknownProtos && strcmp(name, "Ip6InUnknownProtos") == 0)) Ip6InUnknownProtos = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InTruncatedPkts && strcmp(name, "Ip6InTruncatedPkts") == 0)) Ip6InTruncatedPkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InDiscards && strcmp(name, "Ip6InDiscards") == 0)) Ip6InDiscards = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InDelivers && strcmp(name, "Ip6InDelivers") == 0)) Ip6InDelivers = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutForwDatagrams && strcmp(name, "Ip6OutForwDatagrams") == 0)) Ip6OutForwDatagrams = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutRequests && strcmp(name, "Ip6OutRequests") == 0)) Ip6OutRequests = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutDiscards && strcmp(name, "Ip6OutDiscards") == 0)) Ip6OutDiscards = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutNoRoutes && strcmp(name, "Ip6OutNoRoutes") == 0)) Ip6OutNoRoutes = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6ReasmTimeout && strcmp(name, "Ip6ReasmTimeout") == 0)) Ip6ReasmTimeout = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6ReasmReqds && strcmp(name, "Ip6ReasmReqds") == 0)) Ip6ReasmReqds = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6ReasmOKs && strcmp(name, "Ip6ReasmOKs") == 0)) Ip6ReasmOKs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6ReasmFails && strcmp(name, "Ip6ReasmFails") == 0)) Ip6ReasmFails = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6FragOKs && strcmp(name, "Ip6FragOKs") == 0)) Ip6FragOKs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6FragFails && strcmp(name, "Ip6FragFails") == 0)) Ip6FragFails = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6FragCreates && strcmp(name, "Ip6FragCreates") == 0)) Ip6FragCreates = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InMcastPkts && strcmp(name, "Ip6InMcastPkts") == 0)) Ip6InMcastPkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutMcastPkts && strcmp(name, "Ip6OutMcastPkts") == 0)) Ip6OutMcastPkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InOctets && strcmp(name, "Ip6InOctets") == 0)) Ip6InOctets = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutOctets && strcmp(name, "Ip6OutOctets") == 0)) Ip6OutOctets = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InMcastOctets && strcmp(name, "Ip6InMcastOctets") == 0)) Ip6InMcastOctets = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutMcastOctets && strcmp(name, "Ip6OutMcastOctets") == 0)) Ip6OutMcastOctets = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InBcastOctets && strcmp(name, "Ip6InBcastOctets") == 0)) Ip6InBcastOctets = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6OutBcastOctets && strcmp(name, "Ip6OutBcastOctets") == 0)) Ip6OutBcastOctets = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InNoECTPkts && strcmp(name, "Ip6InNoECTPkts") == 0)) Ip6InNoECTPkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InECT1Pkts && strcmp(name, "Ip6InECT1Pkts") == 0)) Ip6InECT1Pkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InECT0Pkts && strcmp(name, "Ip6InECT0Pkts") == 0)) Ip6InECT0Pkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Ip6InCEPkts && strcmp(name, "Ip6InCEPkts") == 0)) Ip6InCEPkts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InMsgs && strcmp(name, "Icmp6InMsgs") == 0)) Icmp6InMsgs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InErrors && strcmp(name, "Icmp6InErrors") == 0)) Icmp6InErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutMsgs && strcmp(name, "Icmp6OutMsgs") == 0)) Icmp6OutMsgs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutErrors && strcmp(name, "Icmp6OutErrors") == 0)) Icmp6OutErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InCsumErrors && strcmp(name, "Icmp6InCsumErrors") == 0)) Icmp6InCsumErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InDestUnreachs && strcmp(name, "Icmp6InDestUnreachs") == 0)) Icmp6InDestUnreachs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InPktTooBigs && strcmp(name, "Icmp6InPktTooBigs") == 0)) Icmp6InPktTooBigs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InTimeExcds && strcmp(name, "Icmp6InTimeExcds") == 0)) Icmp6InTimeExcds = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InParmProblems && strcmp(name, "Icmp6InParmProblems") == 0)) Icmp6InParmProblems = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InEchos && strcmp(name, "Icmp6InEchos") == 0)) Icmp6InEchos = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InEchoReplies && strcmp(name, "Icmp6InEchoReplies") == 0)) Icmp6InEchoReplies = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InGroupMembQueries && strcmp(name, "Icmp6InGroupMembQueries") == 0)) Icmp6InGroupMembQueries = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InGroupMembResponses && strcmp(name, "Icmp6InGroupMembResponses") == 0)) Icmp6InGroupMembResponses = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InGroupMembReductions && strcmp(name, "Icmp6InGroupMembReductions") == 0)) Icmp6InGroupMembReductions = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InRouterSolicits && strcmp(name, "Icmp6InRouterSolicits") == 0)) Icmp6InRouterSolicits = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InRouterAdvertisements && strcmp(name, "Icmp6InRouterAdvertisements") == 0)) Icmp6InRouterAdvertisements = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InNeighborSolicits && strcmp(name, "Icmp6InNeighborSolicits") == 0)) Icmp6InNeighborSolicits = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InNeighborAdvertisements && strcmp(name, "Icmp6InNeighborAdvertisements") == 0)) Icmp6InNeighborAdvertisements = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InRedirects && strcmp(name, "Icmp6InRedirects") == 0)) Icmp6InRedirects = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InMLDv2Reports && strcmp(name, "Icmp6InMLDv2Reports") == 0)) Icmp6InMLDv2Reports = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutDestUnreachs && strcmp(name, "Icmp6OutDestUnreachs") == 0)) Icmp6OutDestUnreachs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutPktTooBigs && strcmp(name, "Icmp6OutPktTooBigs") == 0)) Icmp6OutPktTooBigs = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutTimeExcds && strcmp(name, "Icmp6OutTimeExcds") == 0)) Icmp6OutTimeExcds = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutParmProblems && strcmp(name, "Icmp6OutParmProblems") == 0)) Icmp6OutParmProblems = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutEchos && strcmp(name, "Icmp6OutEchos") == 0)) Icmp6OutEchos = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutEchoReplies && strcmp(name, "Icmp6OutEchoReplies") == 0)) Icmp6OutEchoReplies = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutGroupMembQueries && strcmp(name, "Icmp6OutGroupMembQueries") == 0)) Icmp6OutGroupMembQueries = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutGroupMembResponses && strcmp(name, "Icmp6OutGroupMembResponses") == 0)) Icmp6OutGroupMembResponses = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutGroupMembReductions && strcmp(name, "Icmp6OutGroupMembReductions") == 0)) Icmp6OutGroupMembReductions = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutRouterSolicits && strcmp(name, "Icmp6OutRouterSolicits") == 0)) Icmp6OutRouterSolicits = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutRouterAdvertisements && strcmp(name, "Icmp6OutRouterAdvertisements") == 0)) Icmp6OutRouterAdvertisements = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutNeighborSolicits && strcmp(name, "Icmp6OutNeighborSolicits") == 0)) Icmp6OutNeighborSolicits = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutNeighborAdvertisements && strcmp(name, "Icmp6OutNeighborAdvertisements") == 0)) Icmp6OutNeighborAdvertisements = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutRedirects && strcmp(name, "Icmp6OutRedirects") == 0)) Icmp6OutRedirects = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutMLDv2Reports && strcmp(name, "Icmp6OutMLDv2Reports") == 0)) Icmp6OutMLDv2Reports = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InType1 && strcmp(name, "Icmp6InType1") == 0)) Icmp6InType1 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InType128 && strcmp(name, "Icmp6InType128") == 0)) Icmp6InType128 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InType129 && strcmp(name, "Icmp6InType129") == 0)) Icmp6InType129 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6InType136 && strcmp(name, "Icmp6InType136") == 0)) Icmp6InType136 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutType1 && strcmp(name, "Icmp6OutType1") == 0)) Icmp6OutType1 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutType128 && strcmp(name, "Icmp6OutType128") == 0)) Icmp6OutType128 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutType129 && strcmp(name, "Icmp6OutType129") == 0)) Icmp6OutType129 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutType133 && strcmp(name, "Icmp6OutType133") == 0)) Icmp6OutType133 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutType135 && strcmp(name, "Icmp6OutType135") == 0)) Icmp6OutType135 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Icmp6OutType143 && strcmp(name, "Icmp6OutType143") == 0)) Icmp6OutType143 = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6InDatagrams && strcmp(name, "Udp6InDatagrams") == 0)) Udp6InDatagrams = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6NoPorts && strcmp(name, "Udp6NoPorts") == 0)) Udp6NoPorts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6InErrors && strcmp(name, "Udp6InErrors") == 0)) Udp6InErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6OutDatagrams && strcmp(name, "Udp6OutDatagrams") == 0)) Udp6OutDatagrams = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6RcvbufErrors && strcmp(name, "Udp6RcvbufErrors") == 0)) Udp6RcvbufErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6SndbufErrors && strcmp(name, "Udp6SndbufErrors") == 0)) Udp6SndbufErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6InCsumErrors && strcmp(name, "Udp6InCsumErrors") == 0)) Udp6InCsumErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_Udp6IgnoredMulti && strcmp(name, "Udp6IgnoredMulti") == 0)) Udp6IgnoredMulti = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6InDatagrams && strcmp(name, "UdpLite6InDatagrams") == 0)) UdpLite6InDatagrams = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6NoPorts && strcmp(name, "UdpLite6NoPorts") == 0)) UdpLite6NoPorts = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6InErrors && strcmp(name, "UdpLite6InErrors") == 0)) UdpLite6InErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6OutDatagrams && strcmp(name, "UdpLite6OutDatagrams") == 0)) UdpLite6OutDatagrams = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6RcvbufErrors && strcmp(name, "UdpLite6RcvbufErrors") == 0)) UdpLite6RcvbufErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6SndbufErrors && strcmp(name, "UdpLite6SndbufErrors") == 0)) UdpLite6SndbufErrors = strtoull(value, NULL, 10);
-        else if(unlikely(hash == hash_UdpLite6InCsumErrors && strcmp(name, "UdpLite6InCsumErrors") == 0)) UdpLite6InCsumErrors = strtoull(value, NULL, 10);
+             if(unlikely(hash == hash_Ip6InReceives && strcmp(name, "Ip6InReceives") == 0)) ptr = &Ip6InReceives;
+        else if(unlikely(hash == hash_Ip6InHdrErrors && strcmp(name, "Ip6InHdrErrors") == 0)) ptr = &Ip6InHdrErrors;
+        else if(unlikely(hash == hash_Ip6InTooBigErrors && strcmp(name, "Ip6InTooBigErrors") == 0)) ptr = &Ip6InTooBigErrors;
+        else if(unlikely(hash == hash_Ip6InNoRoutes && strcmp(name, "Ip6InNoRoutes") == 0)) ptr = &Ip6InNoRoutes;
+        else if(unlikely(hash == hash_Ip6InAddrErrors && strcmp(name, "Ip6InAddrErrors") == 0)) ptr = &Ip6InAddrErrors;
+        else if(unlikely(hash == hash_Ip6InUnknownProtos && strcmp(name, "Ip6InUnknownProtos") == 0)) ptr = &Ip6InUnknownProtos;
+        else if(unlikely(hash == hash_Ip6InTruncatedPkts && strcmp(name, "Ip6InTruncatedPkts") == 0)) ptr = &Ip6InTruncatedPkts;
+        else if(unlikely(hash == hash_Ip6InDiscards && strcmp(name, "Ip6InDiscards") == 0)) ptr = &Ip6InDiscards;
+        else if(unlikely(hash == hash_Ip6InDelivers && strcmp(name, "Ip6InDelivers") == 0)) ptr = &Ip6InDelivers;
+        else if(unlikely(hash == hash_Ip6OutForwDatagrams && strcmp(name, "Ip6OutForwDatagrams") == 0)) ptr = &Ip6OutForwDatagrams;
+        else if(unlikely(hash == hash_Ip6OutRequests && strcmp(name, "Ip6OutRequests") == 0)) ptr = &Ip6OutRequests;
+        else if(unlikely(hash == hash_Ip6OutDiscards && strcmp(name, "Ip6OutDiscards") == 0)) ptr = &Ip6OutDiscards;
+        else if(unlikely(hash == hash_Ip6OutNoRoutes && strcmp(name, "Ip6OutNoRoutes") == 0)) ptr = &Ip6OutNoRoutes;
+        else if(unlikely(hash == hash_Ip6ReasmTimeout && strcmp(name, "Ip6ReasmTimeout") == 0)) ptr = &Ip6ReasmTimeout;
+        else if(unlikely(hash == hash_Ip6ReasmReqds && strcmp(name, "Ip6ReasmReqds") == 0)) ptr = &Ip6ReasmReqds;
+        else if(unlikely(hash == hash_Ip6ReasmOKs && strcmp(name, "Ip6ReasmOKs") == 0)) ptr = &Ip6ReasmOKs;
+        else if(unlikely(hash == hash_Ip6ReasmFails && strcmp(name, "Ip6ReasmFails") == 0)) ptr = &Ip6ReasmFails;
+        else if(unlikely(hash == hash_Ip6FragOKs && strcmp(name, "Ip6FragOKs") == 0)) ptr = &Ip6FragOKs;
+        else if(unlikely(hash == hash_Ip6FragFails && strcmp(name, "Ip6FragFails") == 0)) ptr = &Ip6FragFails;
+        else if(unlikely(hash == hash_Ip6FragCreates && strcmp(name, "Ip6FragCreates") == 0)) ptr = &Ip6FragCreates;
+        else if(unlikely(hash == hash_Ip6InMcastPkts && strcmp(name, "Ip6InMcastPkts") == 0)) ptr = &Ip6InMcastPkts;
+        else if(unlikely(hash == hash_Ip6OutMcastPkts && strcmp(name, "Ip6OutMcastPkts") == 0)) ptr = &Ip6OutMcastPkts;
+        else if(unlikely(hash == hash_Ip6InOctets && strcmp(name, "Ip6InOctets") == 0)) ptr = &Ip6InOctets;
+        else if(unlikely(hash == hash_Ip6OutOctets && strcmp(name, "Ip6OutOctets") == 0)) ptr = &Ip6OutOctets;
+        else if(unlikely(hash == hash_Ip6InMcastOctets && strcmp(name, "Ip6InMcastOctets") == 0)) ptr = &Ip6InMcastOctets;
+        else if(unlikely(hash == hash_Ip6OutMcastOctets && strcmp(name, "Ip6OutMcastOctets") == 0)) ptr = &Ip6OutMcastOctets;
+        else if(unlikely(hash == hash_Ip6InBcastOctets && strcmp(name, "Ip6InBcastOctets") == 0)) ptr = &Ip6InBcastOctets;
+        else if(unlikely(hash == hash_Ip6OutBcastOctets && strcmp(name, "Ip6OutBcastOctets") == 0)) ptr = &Ip6OutBcastOctets;
+        else if(unlikely(hash == hash_Ip6InNoECTPkts && strcmp(name, "Ip6InNoECTPkts") == 0)) ptr = &Ip6InNoECTPkts;
+        else if(unlikely(hash == hash_Ip6InECT1Pkts && strcmp(name, "Ip6InECT1Pkts") == 0)) ptr = &Ip6InECT1Pkts;
+        else if(unlikely(hash == hash_Ip6InECT0Pkts && strcmp(name, "Ip6InECT0Pkts") == 0)) ptr = &Ip6InECT0Pkts;
+        else if(unlikely(hash == hash_Ip6InCEPkts && strcmp(name, "Ip6InCEPkts") == 0)) ptr = &Ip6InCEPkts;
+        else if(unlikely(hash == hash_Icmp6InMsgs && strcmp(name, "Icmp6InMsgs") == 0)) ptr = &Icmp6InMsgs;
+        else if(unlikely(hash == hash_Icmp6InErrors && strcmp(name, "Icmp6InErrors") == 0)) ptr = &Icmp6InErrors;
+        else if(unlikely(hash == hash_Icmp6OutMsgs && strcmp(name, "Icmp6OutMsgs") == 0)) ptr = &Icmp6OutMsgs;
+        else if(unlikely(hash == hash_Icmp6OutErrors && strcmp(name, "Icmp6OutErrors") == 0)) ptr = &Icmp6OutErrors;
+        else if(unlikely(hash == hash_Icmp6InCsumErrors && strcmp(name, "Icmp6InCsumErrors") == 0)) ptr = &Icmp6InCsumErrors;
+        else if(unlikely(hash == hash_Icmp6InDestUnreachs && strcmp(name, "Icmp6InDestUnreachs") == 0)) ptr = &Icmp6InDestUnreachs;
+        else if(unlikely(hash == hash_Icmp6InPktTooBigs && strcmp(name, "Icmp6InPktTooBigs") == 0)) ptr = &Icmp6InPktTooBigs;
+        else if(unlikely(hash == hash_Icmp6InTimeExcds && strcmp(name, "Icmp6InTimeExcds") == 0)) ptr = &Icmp6InTimeExcds;
+        else if(unlikely(hash == hash_Icmp6InParmProblems && strcmp(name, "Icmp6InParmProblems") == 0)) ptr = &Icmp6InParmProblems;
+        else if(unlikely(hash == hash_Icmp6InEchos && strcmp(name, "Icmp6InEchos") == 0)) ptr = &Icmp6InEchos;
+        else if(unlikely(hash == hash_Icmp6InEchoReplies && strcmp(name, "Icmp6InEchoReplies") == 0)) ptr = &Icmp6InEchoReplies;
+        else if(unlikely(hash == hash_Icmp6InGroupMembQueries && strcmp(name, "Icmp6InGroupMembQueries") == 0)) ptr = &Icmp6InGroupMembQueries;
+        else if(unlikely(hash == hash_Icmp6InGroupMembResponses && strcmp(name, "Icmp6InGroupMembResponses") == 0)) ptr = &Icmp6InGroupMembResponses;
+        else if(unlikely(hash == hash_Icmp6InGroupMembReductions && strcmp(name, "Icmp6InGroupMembReductions") == 0)) ptr = &Icmp6InGroupMembReductions;
+        else if(unlikely(hash == hash_Icmp6InRouterSolicits && strcmp(name, "Icmp6InRouterSolicits") == 0)) ptr = &Icmp6InRouterSolicits;
+        else if(unlikely(hash == hash_Icmp6InRouterAdvertisements && strcmp(name, "Icmp6InRouterAdvertisements") == 0)) ptr = &Icmp6InRouterAdvertisements;
+        else if(unlikely(hash == hash_Icmp6InNeighborSolicits && strcmp(name, "Icmp6InNeighborSolicits") == 0)) ptr = &Icmp6InNeighborSolicits;
+        else if(unlikely(hash == hash_Icmp6InNeighborAdvertisements && strcmp(name, "Icmp6InNeighborAdvertisements") == 0)) ptr = &Icmp6InNeighborAdvertisements;
+        else if(unlikely(hash == hash_Icmp6InRedirects && strcmp(name, "Icmp6InRedirects") == 0)) ptr = &Icmp6InRedirects;
+        else if(unlikely(hash == hash_Icmp6InMLDv2Reports && strcmp(name, "Icmp6InMLDv2Reports") == 0)) ptr = &Icmp6InMLDv2Reports;
+        else if(unlikely(hash == hash_Icmp6OutDestUnreachs && strcmp(name, "Icmp6OutDestUnreachs") == 0)) ptr = &Icmp6OutDestUnreachs;
+        else if(unlikely(hash == hash_Icmp6OutPktTooBigs && strcmp(name, "Icmp6OutPktTooBigs") == 0)) ptr = &Icmp6OutPktTooBigs;
+        else if(unlikely(hash == hash_Icmp6OutTimeExcds && strcmp(name, "Icmp6OutTimeExcds") == 0)) ptr = &Icmp6OutTimeExcds;
+        else if(unlikely(hash == hash_Icmp6OutParmProblems && strcmp(name, "Icmp6OutParmProblems") == 0)) ptr = &Icmp6OutParmProblems;
+        else if(unlikely(hash == hash_Icmp6OutEchos && strcmp(name, "Icmp6OutEchos") == 0)) ptr = &Icmp6OutEchos;
+        else if(unlikely(hash == hash_Icmp6OutEchoReplies && strcmp(name, "Icmp6OutEchoReplies") == 0)) ptr = &Icmp6OutEchoReplies;
+        else if(unlikely(hash == hash_Icmp6OutGroupMembQueries && strcmp(name, "Icmp6OutGroupMembQueries") == 0)) ptr = &Icmp6OutGroupMembQueries;
+        else if(unlikely(hash == hash_Icmp6OutGroupMembResponses && strcmp(name, "Icmp6OutGroupMembResponses") == 0)) ptr = &Icmp6OutGroupMembResponses;
+        else if(unlikely(hash == hash_Icmp6OutGroupMembReductions && strcmp(name, "Icmp6OutGroupMembReductions") == 0)) ptr = &Icmp6OutGroupMembReductions;
+        else if(unlikely(hash == hash_Icmp6OutRouterSolicits && strcmp(name, "Icmp6OutRouterSolicits") == 0)) ptr = &Icmp6OutRouterSolicits;
+        else if(unlikely(hash == hash_Icmp6OutRouterAdvertisements && strcmp(name, "Icmp6OutRouterAdvertisements") == 0)) ptr = &Icmp6OutRouterAdvertisements;
+        else if(unlikely(hash == hash_Icmp6OutNeighborSolicits && strcmp(name, "Icmp6OutNeighborSolicits") == 0)) ptr = &Icmp6OutNeighborSolicits;
+        else if(unlikely(hash == hash_Icmp6OutNeighborAdvertisements && strcmp(name, "Icmp6OutNeighborAdvertisements") == 0)) ptr = &Icmp6OutNeighborAdvertisements;
+        else if(unlikely(hash == hash_Icmp6OutRedirects && strcmp(name, "Icmp6OutRedirects") == 0)) ptr = &Icmp6OutRedirects;
+        else if(unlikely(hash == hash_Icmp6OutMLDv2Reports && strcmp(name, "Icmp6OutMLDv2Reports") == 0)) ptr = &Icmp6OutMLDv2Reports;
+        else if(unlikely(hash == hash_Icmp6InType1 && strcmp(name, "Icmp6InType1") == 0)) ptr = &Icmp6InType1;
+        else if(unlikely(hash == hash_Icmp6InType128 && strcmp(name, "Icmp6InType128") == 0)) ptr = &Icmp6InType128;
+        else if(unlikely(hash == hash_Icmp6InType129 && strcmp(name, "Icmp6InType129") == 0)) ptr = &Icmp6InType129;
+        else if(unlikely(hash == hash_Icmp6InType136 && strcmp(name, "Icmp6InType136") == 0)) ptr = &Icmp6InType136;
+        else if(unlikely(hash == hash_Icmp6OutType1 && strcmp(name, "Icmp6OutType1") == 0)) ptr = &Icmp6OutType1;
+        else if(unlikely(hash == hash_Icmp6OutType128 && strcmp(name, "Icmp6OutType128") == 0)) ptr = &Icmp6OutType128;
+        else if(unlikely(hash == hash_Icmp6OutType129 && strcmp(name, "Icmp6OutType129") == 0)) ptr = &Icmp6OutType129;
+        else if(unlikely(hash == hash_Icmp6OutType133 && strcmp(name, "Icmp6OutType133") == 0)) ptr = &Icmp6OutType133;
+        else if(unlikely(hash == hash_Icmp6OutType135 && strcmp(name, "Icmp6OutType135") == 0)) ptr = &Icmp6OutType135;
+        else if(unlikely(hash == hash_Icmp6OutType143 && strcmp(name, "Icmp6OutType143") == 0)) ptr = &Icmp6OutType143;
+        else if(unlikely(hash == hash_Udp6InDatagrams && strcmp(name, "Udp6InDatagrams") == 0)) ptr = &Udp6InDatagrams;
+        else if(unlikely(hash == hash_Udp6NoPorts && strcmp(name, "Udp6NoPorts") == 0)) ptr = &Udp6NoPorts;
+        else if(unlikely(hash == hash_Udp6InErrors && strcmp(name, "Udp6InErrors") == 0)) ptr = &Udp6InErrors;
+        else if(unlikely(hash == hash_Udp6OutDatagrams && strcmp(name, "Udp6OutDatagrams") == 0)) ptr = &Udp6OutDatagrams;
+        else if(unlikely(hash == hash_Udp6RcvbufErrors && strcmp(name, "Udp6RcvbufErrors") == 0)) ptr = &Udp6RcvbufErrors;
+        else if(unlikely(hash == hash_Udp6SndbufErrors && strcmp(name, "Udp6SndbufErrors") == 0)) ptr = &Udp6SndbufErrors;
+        else if(unlikely(hash == hash_Udp6InCsumErrors && strcmp(name, "Udp6InCsumErrors") == 0)) ptr = &Udp6InCsumErrors;
+        else if(unlikely(hash == hash_Udp6IgnoredMulti && strcmp(name, "Udp6IgnoredMulti") == 0)) ptr = &Udp6IgnoredMulti;
+        else if(unlikely(hash == hash_UdpLite6InDatagrams && strcmp(name, "UdpLite6InDatagrams") == 0)) ptr = &UdpLite6InDatagrams;
+        else if(unlikely(hash == hash_UdpLite6NoPorts && strcmp(name, "UdpLite6NoPorts") == 0)) ptr = &UdpLite6NoPorts;
+        else if(unlikely(hash == hash_UdpLite6InErrors && strcmp(name, "UdpLite6InErrors") == 0)) ptr = &UdpLite6InErrors;
+        else if(unlikely(hash == hash_UdpLite6OutDatagrams && strcmp(name, "UdpLite6OutDatagrams") == 0)) ptr = &UdpLite6OutDatagrams;
+        else if(unlikely(hash == hash_UdpLite6RcvbufErrors && strcmp(name, "UdpLite6RcvbufErrors") == 0)) ptr = &UdpLite6RcvbufErrors;
+        else if(unlikely(hash == hash_UdpLite6SndbufErrors && strcmp(name, "UdpLite6SndbufErrors") == 0)) ptr = &UdpLite6SndbufErrors;
+        else if(unlikely(hash == hash_UdpLite6InCsumErrors && strcmp(name, "UdpLite6InCsumErrors") == 0)) ptr = &UdpLite6InCsumErrors;
+
+        if(unlikely(ptr)) {
+            *ptr = str2ull(value);
+            ptr = NULL;
+        }
     }
 
     RRDSET *st;