aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-14 15:28:11 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-14 15:28:11 -0400
commit200cfbb36ce360f7943c62b6c09885c215bfc1f5 (patch)
tree8f7513bd35225f8681cd7d214d807b7e26211afa /net/ipv4/proc.c
parent29e0937bb693879221f575b01f26314b3f443322 (diff)
parentd831666e98b4f1e19ebdd2349735f47bf37cd293 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV4] SNMP: Display new statistics at /proc/net/netstat [IPV6]: Reverse sense of promisc tests in ip6_mc_input [NET_SCHED]: prio qdisc boundary condition [IPSEC]: Don't warn if high-order hash resize fails [IPSEC]: Check validity of direction in xfrm_policy_byid
Diffstat (limited to 'net/ipv4/proc.c')
-rw-r--r--net/ipv4/proc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 37ab5802ca08..cdbc6c135849 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -109,6 +109,17 @@ static const struct snmp_mib snmp4_ipstats_list[] = {
109 SNMP_MIB_SENTINEL 109 SNMP_MIB_SENTINEL
110}; 110};
111 111
112/* Following RFC4293 items are displayed in /proc/net/netstat */
113static const struct snmp_mib snmp4_ipextstats_list[] = {
114 SNMP_MIB_ITEM("InNoRoutes", IPSTATS_MIB_INNOROUTES),
115 SNMP_MIB_ITEM("InTruncatedPkts", IPSTATS_MIB_INTRUNCATEDPKTS),
116 SNMP_MIB_ITEM("InMcastPkts", IPSTATS_MIB_INMCASTPKTS),
117 SNMP_MIB_ITEM("OutMcastPkts", IPSTATS_MIB_OUTMCASTPKTS),
118 SNMP_MIB_ITEM("InBcastPkts", IPSTATS_MIB_INBCASTPKTS),
119 SNMP_MIB_ITEM("OutBcastPkts", IPSTATS_MIB_OUTBCASTPKTS),
120 SNMP_MIB_SENTINEL
121};
122
112static const struct snmp_mib snmp4_icmp_list[] = { 123static const struct snmp_mib snmp4_icmp_list[] = {
113 SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS), 124 SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS),
114 SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS), 125 SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS),
@@ -338,6 +349,16 @@ static int netstat_seq_show(struct seq_file *seq, void *v)
338 snmp_fold_field((void **)net_statistics, 349 snmp_fold_field((void **)net_statistics,
339 snmp4_net_list[i].entry)); 350 snmp4_net_list[i].entry));
340 351
352 seq_puts(seq, "\nIpExt:");
353 for (i = 0; snmp4_ipextstats_list[i].name != NULL; i++)
354 seq_printf(seq, " %s", snmp4_ipextstats_list[i].name);
355
356 seq_puts(seq, "\nIpExt:");
357 for (i = 0; snmp4_ipextstats_list[i].name != NULL; i++)
358 seq_printf(seq, " %lu",
359 snmp_fold_field((void **)ip_statistics,
360 snmp4_ipextstats_list[i].entry));
361
341 seq_putc(seq, '\n'); 362 seq_putc(seq, '\n');
342 return 0; 363 return 0;
343} 364}