diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-04-20 18:57:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:29:13 -0400 |
commit | 1370b5a59b941ac3873b5e8614d496e9f481d670 (patch) | |
tree | 16d2cd7e2496270ec43a7f6652d8bc3fd431ae0d /net/ipv6 | |
parent | 334901700f9f58993ebd7f6136d3f9062460d34d (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/ipv6')
-rw-r--r-- | net/ipv6/proc.c | 10 |
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 | ||
145 | static unsigned long | 146 | static unsigned long |
146 | fold_field(void *mib[], int offt) | 147 | fold_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 | ||
158 | static inline void | 160 | static inline void |
159 | snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp_mib *itemlist) | 161 | snmp6_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 | ||
210 | static inline void | 213 | static 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 | ||
235 | int snmp6_register_dev(struct inet6_dev *idev) | 239 | int 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 | ||
312 | void | ||
313 | snmp6_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 | ||
320 | int snmp6_alloc_dev(struct inet6_dev *idev) | 318 | int snmp6_alloc_dev(struct inet6_dev *idev) |