diff options
Diffstat (limited to 'net/ipv4/proc.c')
-rw-r--r-- | net/ipv4/proc.c | 21 |
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 */ | ||
113 | static 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 | |||
112 | static const struct snmp_mib snmp4_icmp_list[] = { | 123 | static 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 | } |