aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
authorDavid L Stevens <dlstevens@us.ibm.com>2007-09-16 19:52:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:27 -0400
commit14878f75abd5bf1d38becb405801cd491ee215dc (patch)
tree872d70add65e1e58ccbbcc4534c7e826bd3fa9ed /net/ipv6/af_inet6.c
parent8b14a536701b50559a0d69d5d593323f550db4e9 (diff)
[IPV6]: Add ICMPMsgStats MIB (RFC 4293) [rev 2]
Background: RFC 4293 deprecates existing individual, named ICMP type counters to be replaced with the ICMPMsgStatsTable. This table includes entries for both IPv4 and IPv6, and requires counting of all ICMP types, whether or not the machine implements the type. These patches "remove" (but not really) the existing counters, and replace them with the ICMPMsgStats tables for v4 and v6. It includes the named counters in the /proc places they were, but gets the values for them from the new tables. It also counts packets generated from raw socket output (e.g., OutEchoes, MLD queries, RA's from radvd, etc). Changes: 1) create icmpmsg_statistics mib 2) create icmpv6msg_statistics mib 3) modify existing counters to use these 4) modify /proc/net/snmp to add "IcmpMsg" with all ICMP types listed by number for easy SNMP parsing 5) modify /proc/net/snmp printing for "Icmp" to get the named data from new counters. [new to 2nd revision] 6) support per-interface ICMP stats 7) use common macro for per-device stat macros Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index e5c5aad44bb1..bc929381fa46 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -719,6 +719,9 @@ static int __init init_ipv6_mibs(void)
719 if (snmp_mib_init((void **)icmpv6_statistics, sizeof (struct icmpv6_mib), 719 if (snmp_mib_init((void **)icmpv6_statistics, sizeof (struct icmpv6_mib),
720 __alignof__(struct icmpv6_mib)) < 0) 720 __alignof__(struct icmpv6_mib)) < 0)
721 goto err_icmp_mib; 721 goto err_icmp_mib;
722 if (snmp_mib_init((void **)icmpv6msg_statistics,
723 sizeof (struct icmpv6msg_mib), __alignof__(struct icmpv6_mib)) < 0)
724 goto err_icmpmsg_mib;
722 if (snmp_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib), 725 if (snmp_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib),
723 __alignof__(struct udp_mib)) < 0) 726 __alignof__(struct udp_mib)) < 0)
724 goto err_udp_mib; 727 goto err_udp_mib;
@@ -730,6 +733,8 @@ static int __init init_ipv6_mibs(void)
730err_udplite_mib: 733err_udplite_mib:
731 snmp_mib_free((void **)udp_stats_in6); 734 snmp_mib_free((void **)udp_stats_in6);
732err_udp_mib: 735err_udp_mib:
736 snmp_mib_free((void **)icmpv6msg_statistics);
737err_icmpmsg_mib:
733 snmp_mib_free((void **)icmpv6_statistics); 738 snmp_mib_free((void **)icmpv6_statistics);
734err_icmp_mib: 739err_icmp_mib:
735 snmp_mib_free((void **)ipv6_statistics); 740 snmp_mib_free((void **)ipv6_statistics);