提交 7159039a 编写于 作者: Y YOSHIFUJI Hideaki 提交者: David S. Miller

[IPV6]: Decentralize EXPORT_SYMBOLs.

Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
上级 b558ff79
...@@ -8,7 +8,7 @@ ipv6-objs := af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o \ ...@@ -8,7 +8,7 @@ ipv6-objs := af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o \
route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o udplite.o \ route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o udplite.o \
raw.o protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \ raw.o protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \
exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \ exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \
ip6_flowlabel.o ipv6_syms.o inet6_connection_sock.o ip6_flowlabel.o inet6_connection_sock.o
ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \
xfrm6_output.o xfrm6_output.o
......
...@@ -271,6 +271,8 @@ void in6_dev_finish_destroy(struct inet6_dev *idev) ...@@ -271,6 +271,8 @@ void in6_dev_finish_destroy(struct inet6_dev *idev)
call_rcu(&idev->rcu, in6_dev_finish_destroy_rcu); call_rcu(&idev->rcu, in6_dev_finish_destroy_rcu);
} }
EXPORT_SYMBOL(in6_dev_finish_destroy);
static struct inet6_dev * ipv6_add_dev(struct net_device *dev) static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
{ {
struct inet6_dev *ndev; struct inet6_dev *ndev;
...@@ -1107,6 +1109,7 @@ int ipv6_get_saddr(struct dst_entry *dst, ...@@ -1107,6 +1109,7 @@ int ipv6_get_saddr(struct dst_entry *dst,
return ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, daddr, saddr); return ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, daddr, saddr);
} }
EXPORT_SYMBOL(ipv6_get_saddr);
int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr) int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr)
{ {
...@@ -1161,6 +1164,8 @@ int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict) ...@@ -1161,6 +1164,8 @@ int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict)
return ifp != NULL; return ifp != NULL;
} }
EXPORT_SYMBOL(ipv6_chk_addr);
static static
int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev) int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev)
{ {
...@@ -4021,11 +4026,15 @@ int register_inet6addr_notifier(struct notifier_block *nb) ...@@ -4021,11 +4026,15 @@ int register_inet6addr_notifier(struct notifier_block *nb)
return atomic_notifier_chain_register(&inet6addr_chain, nb); return atomic_notifier_chain_register(&inet6addr_chain, nb);
} }
EXPORT_SYMBOL(register_inet6addr_notifier);
int unregister_inet6addr_notifier(struct notifier_block *nb) int unregister_inet6addr_notifier(struct notifier_block *nb)
{ {
return atomic_notifier_chain_unregister(&inet6addr_chain,nb); return atomic_notifier_chain_unregister(&inet6addr_chain,nb);
} }
EXPORT_SYMBOL(unregister_inet6addr_notifier);
/* /*
* Init / cleanup code * Init / cleanup code
*/ */
......
...@@ -349,6 +349,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ...@@ -349,6 +349,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
return err; return err;
} }
EXPORT_SYMBOL(inet6_bind);
int inet6_release(struct socket *sock) int inet6_release(struct socket *sock)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
...@@ -365,6 +367,8 @@ int inet6_release(struct socket *sock) ...@@ -365,6 +367,8 @@ int inet6_release(struct socket *sock)
return inet_release(sock); return inet_release(sock);
} }
EXPORT_SYMBOL(inet6_release);
int inet6_destroy_sock(struct sock *sk) int inet6_destroy_sock(struct sock *sk)
{ {
struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk);
...@@ -428,6 +432,8 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr, ...@@ -428,6 +432,8 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
return(0); return(0);
} }
EXPORT_SYMBOL(inet6_getname);
int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
...@@ -457,6 +463,8 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -457,6 +463,8 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return(0); return(0);
} }
EXPORT_SYMBOL(inet6_ioctl);
const struct proto_ops inet6_stream_ops = { const struct proto_ops inet6_stream_ops = {
.family = PF_INET6, .family = PF_INET6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -603,6 +611,8 @@ inet6_register_protosw(struct inet_protosw *p) ...@@ -603,6 +611,8 @@ inet6_register_protosw(struct inet_protosw *p)
goto out; goto out;
} }
EXPORT_SYMBOL(inet6_register_protosw);
void void
inet6_unregister_protosw(struct inet_protosw *p) inet6_unregister_protosw(struct inet_protosw *p)
{ {
...@@ -619,6 +629,8 @@ inet6_unregister_protosw(struct inet_protosw *p) ...@@ -619,6 +629,8 @@ inet6_unregister_protosw(struct inet_protosw *p)
} }
} }
EXPORT_SYMBOL(inet6_unregister_protosw);
int inet6_sk_rebuild_header(struct sock *sk) int inet6_sk_rebuild_header(struct sock *sk)
{ {
int err; int err;
......
...@@ -810,6 +810,8 @@ void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, ...@@ -810,6 +810,8 @@ void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt); ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt);
} }
EXPORT_SYMBOL(ipv6_push_nfrag_opts);
void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto) void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
{ {
if (opt->dst1opt) if (opt->dst1opt)
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
#include <asm/system.h> #include <asm/system.h>
DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics) __read_mostly; DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics) __read_mostly;
EXPORT_SYMBOL(icmpv6_statistics);
/* /*
* The ICMP socket(s). This is the most convenient way to flow control * The ICMP socket(s). This is the most convenient way to flow control
...@@ -466,6 +467,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, ...@@ -466,6 +467,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
icmpv6_xmit_unlock(); icmpv6_xmit_unlock();
} }
EXPORT_SYMBOL(icmpv6_send);
static void icmpv6_echo_reply(struct sk_buff *skb) static void icmpv6_echo_reply(struct sk_buff *skb)
{ {
struct sock *sk; struct sock *sk;
...@@ -865,6 +868,8 @@ int icmpv6_err_convert(int type, int code, int *err) ...@@ -865,6 +868,8 @@ int icmpv6_err_convert(int type, int code, int *err)
return fatal; return fatal;
} }
EXPORT_SYMBOL(icmpv6_err_convert);
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
ctl_table ipv6_icmp_table[] = { ctl_table ipv6_icmp_table[] = {
{ {
......
...@@ -239,6 +239,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, ...@@ -239,6 +239,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
return -EMSGSIZE; return -EMSGSIZE;
} }
EXPORT_SYMBOL(ip6_xmit);
/* /*
* To avoid extra problems ND packets are send through this * To avoid extra problems ND packets are send through this
* routine. It's code duplication but I really want to avoid * routine. It's code duplication but I really want to avoid
......
...@@ -761,6 +761,7 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname, ...@@ -761,6 +761,7 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname,
return err; return err;
} }
EXPORT_SYMBOL(ipv6_setsockopt);
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
int compat_ipv6_setsockopt(struct sock *sk, int level, int optname, int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,
...@@ -1066,6 +1067,8 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname, ...@@ -1066,6 +1067,8 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
return err; return err;
} }
EXPORT_SYMBOL(ipv6_getsockopt);
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen) char __user *optval, int __user *optlen)
......
#include <linux/module.h>
#include <net/protocol.h>
#include <net/ipv6.h>
#include <net/addrconf.h>
#include <net/ip6_route.h>
#include <net/xfrm.h>
EXPORT_SYMBOL(icmpv6_send);
EXPORT_SYMBOL(icmpv6_statistics);
EXPORT_SYMBOL(icmpv6_err_convert);
EXPORT_SYMBOL(ndisc_mc_map);
EXPORT_SYMBOL(register_inet6addr_notifier);
EXPORT_SYMBOL(unregister_inet6addr_notifier);
EXPORT_SYMBOL(ip6_route_output);
EXPORT_SYMBOL(ipv6_setsockopt);
EXPORT_SYMBOL(ipv6_getsockopt);
EXPORT_SYMBOL(inet6_register_protosw);
EXPORT_SYMBOL(inet6_unregister_protosw);
EXPORT_SYMBOL(inet6_add_protocol);
EXPORT_SYMBOL(inet6_del_protocol);
EXPORT_SYMBOL(ip6_xmit);
EXPORT_SYMBOL(inet6_release);
EXPORT_SYMBOL(inet6_bind);
EXPORT_SYMBOL(inet6_getname);
EXPORT_SYMBOL(inet6_ioctl);
EXPORT_SYMBOL(ipv6_get_saddr);
EXPORT_SYMBOL(ipv6_chk_addr);
EXPORT_SYMBOL(in6_dev_finish_destroy);
#ifdef CONFIG_XFRM
EXPORT_SYMBOL(xfrm6_rcv);
EXPORT_SYMBOL(xfrm6_input_addr);
EXPORT_SYMBOL(xfrm6_find_1stfragopt);
#endif
EXPORT_SYMBOL(rt6_lookup);
EXPORT_SYMBOL(ipv6_push_nfrag_opts);
...@@ -319,6 +319,8 @@ int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int d ...@@ -319,6 +319,8 @@ int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int d
return -EINVAL; return -EINVAL;
} }
EXPORT_SYMBOL(ndisc_mc_map);
static u32 ndisc_hash(const void *pkey, const struct net_device *dev) static u32 ndisc_hash(const void *pkey, const struct net_device *dev)
{ {
const u32 *p32 = pkey; const u32 *p32 = pkey;
......
...@@ -60,6 +60,8 @@ int inet6_add_protocol(struct inet6_protocol *prot, unsigned char protocol) ...@@ -60,6 +60,8 @@ int inet6_add_protocol(struct inet6_protocol *prot, unsigned char protocol)
return ret; return ret;
} }
EXPORT_SYMBOL(inet6_add_protocol);
/* /*
* Remove a protocol from the hash tables. * Remove a protocol from the hash tables.
*/ */
...@@ -83,3 +85,5 @@ int inet6_del_protocol(struct inet6_protocol *prot, unsigned char protocol) ...@@ -83,3 +85,5 @@ int inet6_del_protocol(struct inet6_protocol *prot, unsigned char protocol)
return ret; return ret;
} }
EXPORT_SYMBOL(inet6_del_protocol);
...@@ -575,6 +575,8 @@ struct rt6_info *rt6_lookup(struct in6_addr *daddr, struct in6_addr *saddr, ...@@ -575,6 +575,8 @@ struct rt6_info *rt6_lookup(struct in6_addr *daddr, struct in6_addr *saddr,
return NULL; return NULL;
} }
EXPORT_SYMBOL(rt6_lookup);
/* ip6_ins_rt is called with FREE table->tb6_lock. /* ip6_ins_rt is called with FREE table->tb6_lock.
It takes new route entry, the addition fails by any reason the It takes new route entry, the addition fails by any reason the
route is freed. In any case, if caller does not hold it, it may route is freed. In any case, if caller does not hold it, it may
...@@ -829,6 +831,7 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl) ...@@ -829,6 +831,7 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
return fib6_rule_lookup(fl, flags, ip6_pol_route_output); return fib6_rule_lookup(fl, flags, ip6_pol_route_output);
} }
EXPORT_SYMBOL(ip6_route_output);
/* /*
* Destination cache support functions * Destination cache support functions
......
...@@ -140,6 +140,8 @@ int xfrm6_rcv(struct sk_buff **pskb) ...@@ -140,6 +140,8 @@ int xfrm6_rcv(struct sk_buff **pskb)
return xfrm6_rcv_spi(*pskb, 0); return xfrm6_rcv_spi(*pskb, 0);
} }
EXPORT_SYMBOL(xfrm6_rcv);
int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
xfrm_address_t *saddr, u8 proto) xfrm_address_t *saddr, u8 proto)
{ {
...@@ -247,3 +249,5 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, ...@@ -247,3 +249,5 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
xfrm_state_put(xfrm_vec_one); xfrm_state_put(xfrm_vec_one);
return -1; return -1;
} }
EXPORT_SYMBOL(xfrm6_input_addr);
...@@ -23,6 +23,8 @@ int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, ...@@ -23,6 +23,8 @@ int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
return ip6_find_1stfragopt(skb, prevhdr); return ip6_find_1stfragopt(skb, prevhdr);
} }
EXPORT_SYMBOL(xfrm6_find_1stfragopt);
static int xfrm6_tunnel_check_size(struct sk_buff *skb) static int xfrm6_tunnel_check_size(struct sk_buff *skb)
{ {
int mtu, ret = 0; int mtu, ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册