Skip to content

Commit

Permalink
[IPV6]: Decentralize EXPORT_SYMBOLs.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Apr 26, 2007
1 parent b558ff7 commit 7159039
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 37 deletions.
2 changes: 1 addition & 1 deletion net/ipv6/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
raw.o protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.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 \
xfrm6_output.o
Expand Down
9 changes: 9 additions & 0 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ void in6_dev_finish_destroy(struct inet6_dev *idev)
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)
{
struct inet6_dev *ndev;
Expand Down Expand Up @@ -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);
}

EXPORT_SYMBOL(ipv6_get_saddr);

int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr)
{
Expand Down Expand Up @@ -1161,6 +1164,8 @@ int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict)
return ifp != NULL;
}

EXPORT_SYMBOL(ipv6_chk_addr);

static
int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev)
{
Expand Down Expand Up @@ -4021,11 +4026,15 @@ int register_inet6addr_notifier(struct notifier_block *nb)
return atomic_notifier_chain_register(&inet6addr_chain, nb);
}

EXPORT_SYMBOL(register_inet6addr_notifier);

int unregister_inet6addr_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&inet6addr_chain,nb);
}

EXPORT_SYMBOL(unregister_inet6addr_notifier);

/*
* Init / cleanup code
*/
Expand Down
12 changes: 12 additions & 0 deletions net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
return err;
}

EXPORT_SYMBOL(inet6_bind);

int inet6_release(struct socket *sock)
{
struct sock *sk = sock->sk;
Expand All @@ -365,6 +367,8 @@ int inet6_release(struct socket *sock)
return inet_release(sock);
}

EXPORT_SYMBOL(inet6_release);

int inet6_destroy_sock(struct sock *sk)
{
struct ipv6_pinfo *np = inet6_sk(sk);
Expand Down Expand Up @@ -428,6 +432,8 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
return(0);
}

EXPORT_SYMBOL(inet6_getname);

int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;
Expand Down Expand Up @@ -457,6 +463,8 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
return(0);
}

EXPORT_SYMBOL(inet6_ioctl);

const struct proto_ops inet6_stream_ops = {
.family = PF_INET6,
.owner = THIS_MODULE,
Expand Down Expand Up @@ -603,6 +611,8 @@ inet6_register_protosw(struct inet_protosw *p)
goto out;
}

EXPORT_SYMBOL(inet6_register_protosw);

void
inet6_unregister_protosw(struct inet_protosw *p)
{
Expand All @@ -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 err;
Expand Down
2 changes: 2 additions & 0 deletions net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

EXPORT_SYMBOL(ipv6_push_nfrag_opts);

void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
{
if (opt->dst1opt)
Expand Down
5 changes: 5 additions & 0 deletions net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#include <asm/system.h>

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
Expand Down Expand Up @@ -466,6 +467,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
icmpv6_xmit_unlock();
}

EXPORT_SYMBOL(icmpv6_send);

static void icmpv6_echo_reply(struct sk_buff *skb)
{
struct sock *sk;
Expand Down Expand Up @@ -865,6 +868,8 @@ int icmpv6_err_convert(int type, int code, int *err)
return fatal;
}

EXPORT_SYMBOL(icmpv6_err_convert);

#ifdef CONFIG_SYSCTL
ctl_table ipv6_icmp_table[] = {
{
Expand Down
2 changes: 2 additions & 0 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
return -EMSGSIZE;
}

EXPORT_SYMBOL(ip6_xmit);

/*
* To avoid extra problems ND packets are send through this
* routine. It's code duplication but I really want to avoid
Expand Down
3 changes: 3 additions & 0 deletions net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname,
return err;
}

EXPORT_SYMBOL(ipv6_setsockopt);

#ifdef CONFIG_COMPAT
int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,
Expand Down Expand Up @@ -1066,6 +1067,8 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
return err;
}

EXPORT_SYMBOL(ipv6_getsockopt);

#ifdef CONFIG_COMPAT
int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
Expand Down
36 changes: 0 additions & 36 deletions net/ipv6/ipv6_syms.c

This file was deleted.

2 changes: 2 additions & 0 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int d
return -EINVAL;
}

EXPORT_SYMBOL(ndisc_mc_map);

static u32 ndisc_hash(const void *pkey, const struct net_device *dev)
{
const u32 *p32 = pkey;
Expand Down
4 changes: 4 additions & 0 deletions net/ipv6/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ int inet6_add_protocol(struct inet6_protocol *prot, unsigned char protocol)
return ret;
}

EXPORT_SYMBOL(inet6_add_protocol);

/*
* Remove a protocol from the hash tables.
*/
Expand All @@ -83,3 +85,5 @@ int inet6_del_protocol(struct inet6_protocol *prot, unsigned char protocol)

return ret;
}

EXPORT_SYMBOL(inet6_del_protocol);
3 changes: 3 additions & 0 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ struct rt6_info *rt6_lookup(struct in6_addr *daddr, struct in6_addr *saddr,
return NULL;
}

EXPORT_SYMBOL(rt6_lookup);

/* ip6_ins_rt is called with FREE table->tb6_lock.
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
Expand Down Expand Up @@ -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);
}

EXPORT_SYMBOL(ip6_route_output);

/*
* Destination cache support functions
Expand Down
4 changes: 4 additions & 0 deletions net/ipv6/xfrm6_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ int xfrm6_rcv(struct sk_buff **pskb)
return xfrm6_rcv_spi(*pskb, 0);
}

EXPORT_SYMBOL(xfrm6_rcv);

int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
xfrm_address_t *saddr, u8 proto)
{
Expand Down Expand Up @@ -247,3 +249,5 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
xfrm_state_put(xfrm_vec_one);
return -1;
}

EXPORT_SYMBOL(xfrm6_input_addr);
2 changes: 2 additions & 0 deletions net/ipv6/xfrm6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
return ip6_find_1stfragopt(skb, prevhdr);
}

EXPORT_SYMBOL(xfrm6_find_1stfragopt);

static int xfrm6_tunnel_check_size(struct sk_buff *skb)
{
int mtu, ret = 0;
Expand Down

0 comments on commit 7159039

Please sign in to comment.