aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/icmp.h
diff options
context:
space:
mode:
authorDavid L Stevens <dlstevens@us.ibm.com>2007-09-17 12:57:33 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:28 -0400
commit96793b482540f3a26e2188eaf75cb56b7829d3e3 (patch)
tree3dfc2871b69cc358ed55dc2adc3bfeef47382cb3 /include/net/icmp.h
parent14878f75abd5bf1d38becb405801cd491ee215dc (diff)
[IPV4]: Add ICMPMsgStats MIB (RFC 4293)
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. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/icmp.h')
-rw-r--r--include/net/icmp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/icmp.h b/include/net/icmp.h
index dc09474efcf3..9f7ef3c8baef 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -30,9 +30,16 @@ struct icmp_err {
30 30
31extern struct icmp_err icmp_err_convert[]; 31extern struct icmp_err icmp_err_convert[];
32DECLARE_SNMP_STAT(struct icmp_mib, icmp_statistics); 32DECLARE_SNMP_STAT(struct icmp_mib, icmp_statistics);
33DECLARE_SNMP_STAT(struct icmpmsg_mib, icmpmsg_statistics);
33#define ICMP_INC_STATS(field) SNMP_INC_STATS(icmp_statistics, field) 34#define ICMP_INC_STATS(field) SNMP_INC_STATS(icmp_statistics, field)
34#define ICMP_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmp_statistics, field) 35#define ICMP_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmp_statistics, field)
35#define ICMP_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmp_statistics, field) 36#define ICMP_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmp_statistics, field)
37#define ICMPMSGOUT_INC_STATS(field) SNMP_INC_STATS(icmpmsg_statistics, field+256)
38#define ICMPMSGOUT_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmpmsg_statistics, field+256)
39#define ICMPMSGOUT_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmpmsg_statistics, field+256)
40#define ICMPMSGIN_INC_STATS(field) SNMP_INC_STATS(icmpmsg_statistics, field)
41#define ICMPMSGIN_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmpmsg_statistics, field)
42#define ICMPMSGIN_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmpmsg_statistics, field)
36 43
37struct dst_entry; 44struct dst_entry;
38struct net_proto_family; 45struct net_proto_family;
@@ -42,6 +49,7 @@ extern void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
42extern int icmp_rcv(struct sk_buff *skb); 49extern int icmp_rcv(struct sk_buff *skb);
43extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg); 50extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg);
44extern void icmp_init(struct net_proto_family *ops); 51extern void icmp_init(struct net_proto_family *ops);
52extern void icmp_out_count(unsigned char type);
45 53
46/* Move into dst.h ? */ 54/* Move into dst.h ? */
47extern int xrlim_allow(struct dst_entry *dst, int timeout); 55extern int xrlim_allow(struct dst_entry *dst, int timeout);