aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mcast.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/mcast.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/mcast.c')
-rw-r--r--net/ipv6/mcast.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index e2ab43c989d4..86d908b1caea 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1479,10 +1479,11 @@ static void mld_sendpack(struct sk_buff *skb)
1479 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev, 1479 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev,
1480 mld_dev_queue_xmit); 1480 mld_dev_queue_xmit);
1481 if (!err) { 1481 if (!err) {
1482 ICMP6_INC_STATS(idev,ICMP6_MIB_OUTMSGS); 1482 ICMP6MSGOUT_INC_STATS_BH(idev, ICMPV6_MLD2_REPORT);
1483 IP6_INC_STATS(idev, IPSTATS_MIB_OUTMCASTPKTS); 1483 ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS);
1484 IP6_INC_STATS_BH(idev, IPSTATS_MIB_OUTMCASTPKTS);
1484 } else 1485 } else
1485 IP6_INC_STATS(idev, IPSTATS_MIB_OUTDISCARDS); 1486 IP6_INC_STATS_BH(idev, IPSTATS_MIB_OUTDISCARDS);
1486 1487
1487 if (likely(idev != NULL)) 1488 if (likely(idev != NULL))
1488 in6_dev_put(idev); 1489 in6_dev_put(idev);
@@ -1822,10 +1823,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
1822 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev, 1823 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev,
1823 mld_dev_queue_xmit); 1824 mld_dev_queue_xmit);
1824 if (!err) { 1825 if (!err) {
1825 if (type == ICMPV6_MGM_REDUCTION) 1826 ICMP6MSGOUT_INC_STATS(idev, type);
1826 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTGROUPMEMBREDUCTIONS);
1827 else
1828 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTGROUPMEMBRESPONSES);
1829 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); 1827 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS);
1830 IP6_INC_STATS(idev, IPSTATS_MIB_OUTMCASTPKTS); 1828 IP6_INC_STATS(idev, IPSTATS_MIB_OUTMCASTPKTS);
1831 } else 1829 } else