aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-04-20 18:57:45 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:29:13 -0400
commit1370b5a59b941ac3873b5e8614d496e9f481d670 (patch)
tree16d2cd7e2496270ec43a7f6652d8bc3fd431ae0d /net
parent334901700f9f58993ebd7f6136d3f9062460d34d (diff)
[IPV6] SNMP: Export statistics via netlink without CONFIG_PROC_FS.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/proc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 5c3ce1c687c9..c847cef626a8 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -141,6 +141,7 @@ static struct snmp_mib snmp6_udplite6_list[] = {
141 SNMP_MIB_ITEM("UdpLite6OutDatagrams", UDP_MIB_OUTDATAGRAMS), 141 SNMP_MIB_ITEM("UdpLite6OutDatagrams", UDP_MIB_OUTDATAGRAMS),
142 SNMP_MIB_SENTINEL 142 SNMP_MIB_SENTINEL
143}; 143};
144#endif /* CONFIG_PROC_FS */
144 145
145static unsigned long 146static unsigned long
146fold_field(void *mib[], int offt) 147fold_field(void *mib[], int offt)
@@ -155,6 +156,7 @@ fold_field(void *mib[], int offt)
155 return res; 156 return res;
156} 157}
157 158
159#ifdef CONFIG_PROC_FS
158static inline void 160static inline void
159snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp_mib *itemlist) 161snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp_mib *itemlist)
160{ 162{
@@ -206,6 +208,7 @@ static const struct file_operations snmp6_seq_fops = {
206 .llseek = seq_lseek, 208 .llseek = seq_lseek,
207 .release = single_release, 209 .release = single_release,
208}; 210};
211#endif /* CONFIG_PROC_FS */
209 212
210static inline void 213static inline void
211__snmp6_fill_stats(u64 *stats, void **mib, int items, int bytes) 214__snmp6_fill_stats(u64 *stats, void **mib, int items, int bytes)
@@ -232,6 +235,7 @@ snmp6_fill_stats(u64 *stats, struct inet6_dev *idev, int attrtype, int bytes)
232 } 235 }
233} 236}
234 237
238#ifdef CONFIG_PROC_FS
235int snmp6_register_dev(struct inet6_dev *idev) 239int snmp6_register_dev(struct inet6_dev *idev)
236{ 240{
237 struct proc_dir_entry *p; 241 struct proc_dir_entry *p;
@@ -309,12 +313,6 @@ int snmp6_unregister_dev(struct inet6_dev *idev)
309 return 0; 313 return 0;
310} 314}
311 315
312void
313snmp6_fill_stats(u64 *stats, struct inet6_dev *idev, int attrtype, int bytes)
314{
315 memset(stats, 0, sizeof(bytes));
316}
317
318#endif /* CONFIG_PROC_FS */ 316#endif /* CONFIG_PROC_FS */
319 317
320int snmp6_alloc_dev(struct inet6_dev *idev) 318int snmp6_alloc_dev(struct inet6_dev *idev)