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 /net/ipv6/af_inet6.c | |
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 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 825d03e87ae0..18cb928c8d92 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -714,26 +714,26 @@ EXPORT_SYMBOL_GPL(ipv6_opt_accepted); | |||
714 | 714 | ||
715 | static int __init init_ipv6_mibs(void) | 715 | static int __init init_ipv6_mibs(void) |
716 | { | 716 | { |
717 | if (snmp6_mib_init((void **)ipv6_statistics, sizeof (struct ipstats_mib), | 717 | if (snmp_mib_init((void **)ipv6_statistics, sizeof (struct ipstats_mib), |
718 | __alignof__(struct ipstats_mib)) < 0) | 718 | __alignof__(struct ipstats_mib)) < 0) |
719 | goto err_ip_mib; | 719 | goto err_ip_mib; |
720 | if (snmp6_mib_init((void **)icmpv6_statistics, sizeof (struct icmpv6_mib), | 720 | if (snmp_mib_init((void **)icmpv6_statistics, sizeof (struct icmpv6_mib), |
721 | __alignof__(struct icmpv6_mib)) < 0) | 721 | __alignof__(struct icmpv6_mib)) < 0) |
722 | goto err_icmp_mib; | 722 | goto err_icmp_mib; |
723 | if (snmp6_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib), | 723 | if (snmp_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib), |
724 | __alignof__(struct udp_mib)) < 0) | 724 | __alignof__(struct udp_mib)) < 0) |
725 | goto err_udp_mib; | 725 | goto err_udp_mib; |
726 | if (snmp6_mib_init((void **)udplite_stats_in6, sizeof (struct udp_mib), | 726 | if (snmp_mib_init((void **)udplite_stats_in6, sizeof (struct udp_mib), |
727 | __alignof__(struct udp_mib)) < 0) | 727 | __alignof__(struct udp_mib)) < 0) |
728 | goto err_udplite_mib; | 728 | goto err_udplite_mib; |
729 | return 0; | 729 | return 0; |
730 | 730 | ||
731 | err_udplite_mib: | 731 | err_udplite_mib: |
732 | snmp6_mib_free((void **)udp_stats_in6); | 732 | snmp_mib_free((void **)udp_stats_in6); |
733 | err_udp_mib: | 733 | err_udp_mib: |
734 | snmp6_mib_free((void **)icmpv6_statistics); | 734 | snmp_mib_free((void **)icmpv6_statistics); |
735 | err_icmp_mib: | 735 | err_icmp_mib: |
736 | snmp6_mib_free((void **)ipv6_statistics); | 736 | snmp_mib_free((void **)ipv6_statistics); |
737 | err_ip_mib: | 737 | err_ip_mib: |
738 | return -ENOMEM; | 738 | return -ENOMEM; |
739 | 739 | ||
@@ -741,10 +741,10 @@ err_ip_mib: | |||
741 | 741 | ||
742 | static void cleanup_ipv6_mibs(void) | 742 | static void cleanup_ipv6_mibs(void) |
743 | { | 743 | { |
744 | snmp6_mib_free((void **)ipv6_statistics); | 744 | snmp_mib_free((void **)ipv6_statistics); |
745 | snmp6_mib_free((void **)icmpv6_statistics); | 745 | snmp_mib_free((void **)icmpv6_statistics); |
746 | snmp6_mib_free((void **)udp_stats_in6); | 746 | snmp_mib_free((void **)udp_stats_in6); |
747 | snmp6_mib_free((void **)udplite_stats_in6); | 747 | snmp_mib_free((void **)udplite_stats_in6); |
748 | } | 748 | } |
749 | 749 | ||
750 | static int __init inet6_init(void) | 750 | static int __init inet6_init(void) |