aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/proc.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-02-29 11:06:47 -0500
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-04 01:18:22 -0500
commite898d4db2749c6052072e9bc4448e396cbdeb06a (patch)
tree2b8673d85210a23e67d0817b18f401411e8936f3 /net/ipv6/proc.c
parentc6aefafb7ec620911d46174eed514f9df639e5a4 (diff)
[UDP]: Allow users to configure UDP-Lite.
Let's give users an option for disabling UDP-Lite (~4K). old: | text data bss dec hex filename | 286498 12432 6072 305002 4a76a net/ipv4/built-in.o | 193830 8192 3204 205226 321aa net/ipv6/ipv6.o new (without UDP-Lite): | text data bss dec hex filename | 284086 12136 5432 301654 49a56 net/ipv4/built-in.o | 191835 7832 3076 202743 317f7 net/ipv6/ipv6.o Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/proc.c')
-rw-r--r--net/ipv6/proc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 199ef379e501..5ba7ae849d04 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -39,8 +39,10 @@ static int sockstat6_seq_show(struct seq_file *seq, void *v)
39 sock_prot_inuse_get(&tcpv6_prot)); 39 sock_prot_inuse_get(&tcpv6_prot));
40 seq_printf(seq, "UDP6: inuse %d\n", 40 seq_printf(seq, "UDP6: inuse %d\n",
41 sock_prot_inuse_get(&udpv6_prot)); 41 sock_prot_inuse_get(&udpv6_prot));
42#ifdef CONFIG_IP_UDPLITE
42 seq_printf(seq, "UDPLITE6: inuse %d\n", 43 seq_printf(seq, "UDPLITE6: inuse %d\n",
43 sock_prot_inuse_get(&udplitev6_prot)); 44 sock_prot_inuse_get(&udplitev6_prot));
45#endif
44 seq_printf(seq, "RAW6: inuse %d\n", 46 seq_printf(seq, "RAW6: inuse %d\n",
45 sock_prot_inuse_get(&rawv6_prot)); 47 sock_prot_inuse_get(&rawv6_prot));
46 seq_printf(seq, "FRAG6: inuse %d memory %d\n", 48 seq_printf(seq, "FRAG6: inuse %d memory %d\n",
@@ -111,6 +113,7 @@ static struct snmp_mib snmp6_udp6_list[] = {
111 SNMP_MIB_SENTINEL 113 SNMP_MIB_SENTINEL
112}; 114};
113 115
116#ifdef CONFIG_IP_UDPLITE
114static struct snmp_mib snmp6_udplite6_list[] = { 117static struct snmp_mib snmp6_udplite6_list[] = {
115 SNMP_MIB_ITEM("UdpLite6InDatagrams", UDP_MIB_INDATAGRAMS), 118 SNMP_MIB_ITEM("UdpLite6InDatagrams", UDP_MIB_INDATAGRAMS),
116 SNMP_MIB_ITEM("UdpLite6NoPorts", UDP_MIB_NOPORTS), 119 SNMP_MIB_ITEM("UdpLite6NoPorts", UDP_MIB_NOPORTS),
@@ -118,6 +121,7 @@ static struct snmp_mib snmp6_udplite6_list[] = {
118 SNMP_MIB_ITEM("UdpLite6OutDatagrams", UDP_MIB_OUTDATAGRAMS), 121 SNMP_MIB_ITEM("UdpLite6OutDatagrams", UDP_MIB_OUTDATAGRAMS),
119 SNMP_MIB_SENTINEL 122 SNMP_MIB_SENTINEL
120}; 123};
124#endif
121 125
122static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib) 126static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
123{ 127{
@@ -176,7 +180,9 @@ static int snmp6_seq_show(struct seq_file *seq, void *v)
176 snmp6_seq_show_item(seq, (void **)icmpv6_statistics, snmp6_icmp6_list); 180 snmp6_seq_show_item(seq, (void **)icmpv6_statistics, snmp6_icmp6_list);
177 snmp6_seq_show_icmpv6msg(seq, (void **)icmpv6msg_statistics); 181 snmp6_seq_show_icmpv6msg(seq, (void **)icmpv6msg_statistics);
178 snmp6_seq_show_item(seq, (void **)udp_stats_in6, snmp6_udp6_list); 182 snmp6_seq_show_item(seq, (void **)udp_stats_in6, snmp6_udp6_list);
183#ifdef CONFIG_IP_UDPLITE
179 snmp6_seq_show_item(seq, (void **)udplite_stats_in6, snmp6_udplite6_list); 184 snmp6_seq_show_item(seq, (void **)udplite_stats_in6, snmp6_udplite6_list);
185#endif
180 } 186 }
181 return 0; 187 return 0;
182} 188}