X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=net%2Fipv4%2Fproc.c;h=ae68a691e8cdc47b387721dcb9c1b88d716aa994;hb=902b236c087bf021c94cc21a2b09d928c4156c2b;hp=9c6cbe3d9fb80d9f2dda0d5d8716818a3ef40501;hpb=a319a2773a13bab56a0d0b3744ba8703324313b5;p=powerpc.git diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 9c6cbe3d9f..ae68a691e8 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -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,