Pull bugzilla-7887 into release branch
[powerpc.git] / net / ipv4 / proc.c
index 9c6cbe3..ae68a69 100644 (file)
@@ -38,6 +38,7 @@
 #include <net/protocol.h>
 #include <net/tcp.h>
 #include <net/udp.h>
+#include <net/udplite.h>
 #include <linux/inetdevice.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
@@ -66,6 +67,7 @@ static int sockstat_seq_show(struct seq_file *seq, void *v)
                   tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated),
                   atomic_read(&tcp_memory_allocated));
        seq_printf(seq, "UDP: inuse %d\n", fold_prot_inuse(&udp_prot));
+       seq_printf(seq, "UDPLITE: inuse %d\n", fold_prot_inuse(&udplite_prot));
        seq_printf(seq, "RAW: inuse %d\n", fold_prot_inuse(&raw_prot));
        seq_printf(seq,  "FRAG: inuse %d memory %d\n", ip_frag_nqueues,
                   atomic_read(&ip_frag_mem));
@@ -77,7 +79,7 @@ static int sockstat_seq_open(struct inode *inode, struct file *file)
        return single_open(file, sockstat_seq_show, NULL);
 }
 
-static struct file_operations sockstat_seq_fops = {
+static const struct file_operations sockstat_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = sockstat_seq_open,
        .read    = seq_read,
@@ -264,7 +266,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
 
        for (i = 0; snmp4_ipstats_list[i].name != NULL; i++)
                seq_printf(seq, " %lu",
-                          fold_field((void **) ip_statistics, 
+                          fold_field((void **) ip_statistics,
                                      snmp4_ipstats_list[i].entry));
 
        seq_puts(seq, "\nIcmp:");
@@ -274,7 +276,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
        seq_puts(seq, "\nIcmp:");
        for (i = 0; snmp4_icmp_list[i].name != NULL; i++)
                seq_printf(seq, " %lu",
-                          fold_field((void **) icmp_statistics, 
+                          fold_field((void **) icmp_statistics,
                                      snmp4_icmp_list[i].entry));
 
        seq_puts(seq, "\nTcp:");
@@ -286,7 +288,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
                /* MaxConn field is signed, RFC 2012 */
                if (snmp4_tcp_list[i].entry == TCP_MIB_MAXCONN)
                        seq_printf(seq, " %ld",
-                                  fold_field((void **) tcp_statistics, 
+                                  fold_field((void **) tcp_statistics,
                                              snmp4_tcp_list[i].entry));
                else
                        seq_printf(seq, " %lu",
@@ -301,9 +303,20 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
        seq_puts(seq, "\nUdp:");
        for (i = 0; snmp4_udp_list[i].name != NULL; i++)
                seq_printf(seq, " %lu",
-                          fold_field((void **) udp_statistics, 
+                          fold_field((void **) udp_statistics,
                                      snmp4_udp_list[i].entry));
 
+       /* the UDP and UDP-Lite MIBs are the same */
+       seq_puts(seq, "\nUdpLite:");
+       for (i = 0; snmp4_udp_list[i].name != NULL; i++)
+               seq_printf(seq, " %s", snmp4_udp_list[i].name);
+
+       seq_puts(seq, "\nUdpLite:");
+       for (i = 0; snmp4_udp_list[i].name != NULL; i++)
+               seq_printf(seq, " %lu",
+                          fold_field((void **) udplite_statistics,
+                                     snmp4_udp_list[i].entry)     );
+
        seq_putc(seq, '\n');
        return 0;
 }
@@ -313,7 +326,7 @@ static int snmp_seq_open(struct inode *inode, struct file *file)
        return single_open(file, snmp_seq_show, NULL);
 }
 
-static struct file_operations snmp_seq_fops = {
+static const struct file_operations snmp_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = snmp_seq_open,
        .read    = seq_read,
@@ -335,7 +348,7 @@ static int netstat_seq_show(struct seq_file *seq, void *v)
        seq_puts(seq, "\nTcpExt:");
        for (i = 0; snmp4_net_list[i].name != NULL; i++)
                seq_printf(seq, " %lu",
-                          fold_field((void **) net_statistics, 
+                          fold_field((void **) net_statistics,
                                      snmp4_net_list[i].entry));
 
        seq_putc(seq, '\n');
@@ -347,7 +360,7 @@ static int netstat_seq_open(struct inode *inode, struct file *file)
        return single_open(file, netstat_seq_show, NULL);
 }
 
-static struct file_operations netstat_seq_fops = {
+static const struct file_operations netstat_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = netstat_seq_open,
        .read    = seq_read,