diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-04-25 00:54:09 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:29:52 -0400 |
commit | 7f7d9a6b96c5708c5184cbed61bbc15b163a0f08 (patch) | |
tree | f6841ff1239e80c3083b1e41eb343b811dc92afc /include | |
parent | 5e0f04351d11e07a23b5ab4914282cbb78027e50 (diff) |
[IPV6]: Consolidate common SNMP code
This patch moves the non-proc SNMP code into addrconf.c and reuses
IPv4 SNMP code where applicable.
As a result we can skip proc.o if /proc is disabled.
Note that I've made a number of functions static since they're only
used by addrconf.c for now. If they ever get used elsewhere we can
always remove the static.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ipv6.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 4408def379bf..f70afef9c3cc 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -166,14 +166,6 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | |||
166 | if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ | 166 | if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ |
167 | else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) | 167 | else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) |
168 | 168 | ||
169 | int snmp6_register_dev(struct inet6_dev *idev); | ||
170 | int snmp6_unregister_dev(struct inet6_dev *idev); | ||
171 | int snmp6_alloc_dev(struct inet6_dev *idev); | ||
172 | int snmp6_free_dev(struct inet6_dev *idev); | ||
173 | int snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign); | ||
174 | void snmp6_mib_free(void *ptr[2]); | ||
175 | void snmp6_fill_stats(u64 *stats, struct inet6_dev *idev, int attrtype, int bytes); | ||
176 | |||
177 | struct ip6_ra_chain | 169 | struct ip6_ra_chain |
178 | { | 170 | { |
179 | struct ip6_ra_chain *next; | 171 | struct ip6_ra_chain *next; |
@@ -606,8 +598,20 @@ extern int udplite6_proc_init(void); | |||
606 | extern void udplite6_proc_exit(void); | 598 | extern void udplite6_proc_exit(void); |
607 | extern int ipv6_misc_proc_init(void); | 599 | extern int ipv6_misc_proc_init(void); |
608 | extern void ipv6_misc_proc_exit(void); | 600 | extern void ipv6_misc_proc_exit(void); |
601 | extern int snmp6_register_dev(struct inet6_dev *idev); | ||
602 | extern int snmp6_unregister_dev(struct inet6_dev *idev); | ||
609 | 603 | ||
610 | extern struct rt6_statistics rt6_stats; | 604 | extern struct rt6_statistics rt6_stats; |
605 | #else | ||
606 | static inline int snmp6_register_dev(struct inet6_dev *idev) | ||
607 | { | ||
608 | return 0; | ||
609 | } | ||
610 | |||
611 | static inline int snmp6_unregister_dev(struct inet6_dev *idev) | ||
612 | { | ||
613 | return 0; | ||
614 | } | ||
611 | #endif | 615 | #endif |
612 | 616 | ||
613 | #ifdef CONFIG_SYSCTL | 617 | #ifdef CONFIG_SYSCTL |