Commit fc86dddb authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller

[XFRM]: Kill xfrm_export.c

This patch removes xfrm_export.c and moves the EXPORT_SYMBOL{,_GPL}'s to 
the files where the actual functions are.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c25c265
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Makefile for the XFRM subsystem. # Makefile for the XFRM subsystem.
# #
obj-$(CONFIG_XFRM) := xfrm_policy.o xfrm_state.o xfrm_input.o xfrm_algo.o \ obj-$(CONFIG_XFRM) := xfrm_policy.o xfrm_state.o xfrm_input.o xfrm_algo.o
xfrm_export.o
obj-$(CONFIG_XFRM_USER) += xfrm_user.o obj-$(CONFIG_XFRM_USER) += xfrm_user.o
...@@ -316,6 +316,7 @@ struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id) ...@@ -316,6 +316,7 @@ struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id)
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byid);
struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id) struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id)
{ {
...@@ -331,6 +332,7 @@ struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id) ...@@ -331,6 +332,7 @@ struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id)
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byid);
struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id) struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id)
{ {
...@@ -346,6 +348,7 @@ struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id) ...@@ -346,6 +348,7 @@ struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id)
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(xfrm_calg_get_byid);
static struct xfrm_algo_desc *xfrm_get_byname(struct xfrm_algo_desc *list, static struct xfrm_algo_desc *xfrm_get_byname(struct xfrm_algo_desc *list,
int entries, char *name, int entries, char *name,
...@@ -380,16 +383,19 @@ struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name, int probe) ...@@ -380,16 +383,19 @@ struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name, int probe)
{ {
return xfrm_get_byname(aalg_list, aalg_entries(), name, probe); return xfrm_get_byname(aalg_list, aalg_entries(), name, probe);
} }
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byname);
struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe) struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe)
{ {
return xfrm_get_byname(ealg_list, ealg_entries(), name, probe); return xfrm_get_byname(ealg_list, ealg_entries(), name, probe);
} }
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byname);
struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe) struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe)
{ {
return xfrm_get_byname(calg_list, calg_entries(), name, probe); return xfrm_get_byname(calg_list, calg_entries(), name, probe);
} }
EXPORT_SYMBOL_GPL(xfrm_calg_get_byname);
struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx) struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx)
{ {
...@@ -398,6 +404,7 @@ struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx) ...@@ -398,6 +404,7 @@ struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx)
return &aalg_list[idx]; return &aalg_list[idx];
} }
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byidx);
struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx) struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx)
{ {
...@@ -406,6 +413,7 @@ struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx) ...@@ -406,6 +413,7 @@ struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx)
return &ealg_list[idx]; return &ealg_list[idx];
} }
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byidx);
/* /*
* Probe for the availability of crypto algorithms, and set the available * Probe for the availability of crypto algorithms, and set the available
...@@ -438,6 +446,7 @@ void xfrm_probe_algs(void) ...@@ -438,6 +446,7 @@ void xfrm_probe_algs(void)
} }
#endif #endif
} }
EXPORT_SYMBOL_GPL(xfrm_probe_algs);
int xfrm_count_auth_supported(void) int xfrm_count_auth_supported(void)
{ {
...@@ -448,6 +457,7 @@ int xfrm_count_auth_supported(void) ...@@ -448,6 +457,7 @@ int xfrm_count_auth_supported(void)
n++; n++;
return n; return n;
} }
EXPORT_SYMBOL_GPL(xfrm_count_auth_supported);
int xfrm_count_enc_supported(void) int xfrm_count_enc_supported(void)
{ {
...@@ -458,6 +468,7 @@ int xfrm_count_enc_supported(void) ...@@ -458,6 +468,7 @@ int xfrm_count_enc_supported(void)
n++; n++;
return n; return n;
} }
EXPORT_SYMBOL_GPL(xfrm_count_enc_supported);
/* Move to common area: it is shared with AH. */ /* Move to common area: it is shared with AH. */
...@@ -532,6 +543,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm, ...@@ -532,6 +543,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
if (len) if (len)
BUG(); BUG();
} }
EXPORT_SYMBOL_GPL(skb_icv_walk);
#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE) #if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
......
#include <linux/module.h>
#include <net/xfrm.h>
EXPORT_SYMBOL(xfrm_user_policy);
EXPORT_SYMBOL(km_waitq);
EXPORT_SYMBOL(km_new_mapping);
EXPORT_SYMBOL(xfrm_cfg_sem);
EXPORT_SYMBOL(xfrm_policy_alloc);
EXPORT_SYMBOL(__xfrm_policy_destroy);
EXPORT_SYMBOL(xfrm_lookup);
EXPORT_SYMBOL(__xfrm_policy_check);
EXPORT_SYMBOL(__xfrm_route_forward);
EXPORT_SYMBOL(xfrm_state_alloc);
EXPORT_SYMBOL(__xfrm_state_destroy);
EXPORT_SYMBOL(xfrm_state_insert);
EXPORT_SYMBOL(xfrm_state_add);
EXPORT_SYMBOL(xfrm_state_update);
EXPORT_SYMBOL(xfrm_state_check_expire);
EXPORT_SYMBOL(xfrm_state_check);
EXPORT_SYMBOL(xfrm_state_lookup);
EXPORT_SYMBOL(xfrm_state_register_afinfo);
EXPORT_SYMBOL(xfrm_state_unregister_afinfo);
EXPORT_SYMBOL(xfrm_state_delete_tunnel);
EXPORT_SYMBOL(xfrm_replay_check);
EXPORT_SYMBOL(xfrm_replay_advance);
EXPORT_SYMBOL(__secpath_destroy);
EXPORT_SYMBOL(secpath_dup);
EXPORT_SYMBOL(xfrm_get_acqseq);
EXPORT_SYMBOL(xfrm_parse_spi);
EXPORT_SYMBOL(xfrm_register_type);
EXPORT_SYMBOL(xfrm_unregister_type);
EXPORT_SYMBOL(xfrm_get_type);
EXPORT_SYMBOL(xfrm_register_km);
EXPORT_SYMBOL(xfrm_unregister_km);
EXPORT_SYMBOL(xfrm_state_delete);
EXPORT_SYMBOL(xfrm_state_walk);
EXPORT_SYMBOL(xfrm_find_acq_byseq);
EXPORT_SYMBOL(xfrm_find_acq);
EXPORT_SYMBOL(xfrm_alloc_spi);
EXPORT_SYMBOL(xfrm_state_flush);
EXPORT_SYMBOL(xfrm_policy_bysel);
EXPORT_SYMBOL(xfrm_policy_insert);
EXPORT_SYMBOL(xfrm_policy_walk);
EXPORT_SYMBOL(xfrm_policy_flush);
EXPORT_SYMBOL(xfrm_policy_byid);
EXPORT_SYMBOL(xfrm_policy_list);
EXPORT_SYMBOL(xfrm_dst_lookup);
EXPORT_SYMBOL(xfrm_policy_register_afinfo);
EXPORT_SYMBOL(xfrm_policy_unregister_afinfo);
EXPORT_SYMBOL_GPL(xfrm_probe_algs);
EXPORT_SYMBOL_GPL(xfrm_count_auth_supported);
EXPORT_SYMBOL_GPL(xfrm_count_enc_supported);
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byidx);
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byidx);
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byid);
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byid);
EXPORT_SYMBOL_GPL(xfrm_calg_get_byid);
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byname);
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byname);
EXPORT_SYMBOL_GPL(xfrm_calg_get_byname);
EXPORT_SYMBOL_GPL(skb_icv_walk);
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h>
#include <net/ip.h> #include <net/ip.h>
#include <net/xfrm.h> #include <net/xfrm.h>
...@@ -20,6 +21,7 @@ void __secpath_destroy(struct sec_path *sp) ...@@ -20,6 +21,7 @@ void __secpath_destroy(struct sec_path *sp)
xfrm_state_put(sp->x[i].xvec); xfrm_state_put(sp->x[i].xvec);
kmem_cache_free(secpath_cachep, sp); kmem_cache_free(secpath_cachep, sp);
} }
EXPORT_SYMBOL(__secpath_destroy);
struct sec_path *secpath_dup(struct sec_path *src) struct sec_path *secpath_dup(struct sec_path *src)
{ {
...@@ -40,6 +42,7 @@ struct sec_path *secpath_dup(struct sec_path *src) ...@@ -40,6 +42,7 @@ struct sec_path *secpath_dup(struct sec_path *src)
atomic_set(&sp->refcnt, 1); atomic_set(&sp->refcnt, 1);
return sp; return sp;
} }
EXPORT_SYMBOL(secpath_dup);
/* Fetch spi and seq from ipsec header */ /* Fetch spi and seq from ipsec header */
...@@ -73,6 +76,7 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) ...@@ -73,6 +76,7 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq)
*seq = *(u32*)(skb->h.raw + offset_seq); *seq = *(u32*)(skb->h.raw + offset_seq);
return 0; return 0;
} }
EXPORT_SYMBOL(xfrm_parse_spi);
void __init xfrm_input_init(void) void __init xfrm_input_init(void)
{ {
......
...@@ -21,14 +21,17 @@ ...@@ -21,14 +21,17 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/module.h>
#include <net/xfrm.h> #include <net/xfrm.h>
#include <net/ip.h> #include <net/ip.h>
DECLARE_MUTEX(xfrm_cfg_sem); DECLARE_MUTEX(xfrm_cfg_sem);
EXPORT_SYMBOL(xfrm_cfg_sem);
static DEFINE_RWLOCK(xfrm_policy_lock); static DEFINE_RWLOCK(xfrm_policy_lock);
struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2]; struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2];
EXPORT_SYMBOL(xfrm_policy_list);
static DEFINE_RWLOCK(xfrm_policy_afinfo_lock); static DEFINE_RWLOCK(xfrm_policy_afinfo_lock);
static struct xfrm_policy_afinfo *xfrm_policy_afinfo[NPROTO]; static struct xfrm_policy_afinfo *xfrm_policy_afinfo[NPROTO];
...@@ -62,6 +65,7 @@ int xfrm_register_type(struct xfrm_type *type, unsigned short family) ...@@ -62,6 +65,7 @@ int xfrm_register_type(struct xfrm_type *type, unsigned short family)
xfrm_policy_put_afinfo(afinfo); xfrm_policy_put_afinfo(afinfo);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_register_type);
int xfrm_unregister_type(struct xfrm_type *type, unsigned short family) int xfrm_unregister_type(struct xfrm_type *type, unsigned short family)
{ {
...@@ -82,6 +86,7 @@ int xfrm_unregister_type(struct xfrm_type *type, unsigned short family) ...@@ -82,6 +86,7 @@ int xfrm_unregister_type(struct xfrm_type *type, unsigned short family)
xfrm_policy_put_afinfo(afinfo); xfrm_policy_put_afinfo(afinfo);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_unregister_type);
struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family)
{ {
...@@ -112,6 +117,7 @@ struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) ...@@ -112,6 +117,7 @@ struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family)
xfrm_policy_put_afinfo(afinfo); xfrm_policy_put_afinfo(afinfo);
return type; return type;
} }
EXPORT_SYMBOL(xfrm_get_type);
int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl,
unsigned short family) unsigned short family)
...@@ -129,6 +135,7 @@ int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, ...@@ -129,6 +135,7 @@ int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl,
xfrm_policy_put_afinfo(afinfo); xfrm_policy_put_afinfo(afinfo);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_dst_lookup);
void xfrm_put_type(struct xfrm_type *type) void xfrm_put_type(struct xfrm_type *type)
{ {
...@@ -234,6 +241,7 @@ struct xfrm_policy *xfrm_policy_alloc(int gfp) ...@@ -234,6 +241,7 @@ struct xfrm_policy *xfrm_policy_alloc(int gfp)
} }
return policy; return policy;
} }
EXPORT_SYMBOL(xfrm_policy_alloc);
/* Destroy xfrm_policy: descendant resources must be released to this moment. */ /* Destroy xfrm_policy: descendant resources must be released to this moment. */
...@@ -250,6 +258,7 @@ void __xfrm_policy_destroy(struct xfrm_policy *policy) ...@@ -250,6 +258,7 @@ void __xfrm_policy_destroy(struct xfrm_policy *policy)
kfree(policy); kfree(policy);
} }
EXPORT_SYMBOL(__xfrm_policy_destroy);
static void xfrm_policy_gc_kill(struct xfrm_policy *policy) static void xfrm_policy_gc_kill(struct xfrm_policy *policy)
{ {
...@@ -373,6 +382,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) ...@@ -373,6 +382,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
} }
return 0; return 0;
} }
EXPORT_SYMBOL(xfrm_policy_insert);
struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel,
int delete) int delete)
...@@ -396,6 +406,7 @@ struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, ...@@ -396,6 +406,7 @@ struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel,
} }
return pol; return pol;
} }
EXPORT_SYMBOL(xfrm_policy_bysel);
struct xfrm_policy *xfrm_policy_byid(int dir, u32 id, int delete) struct xfrm_policy *xfrm_policy_byid(int dir, u32 id, int delete)
{ {
...@@ -418,6 +429,7 @@ struct xfrm_policy *xfrm_policy_byid(int dir, u32 id, int delete) ...@@ -418,6 +429,7 @@ struct xfrm_policy *xfrm_policy_byid(int dir, u32 id, int delete)
} }
return pol; return pol;
} }
EXPORT_SYMBOL(xfrm_policy_byid);
void xfrm_policy_flush(void) void xfrm_policy_flush(void)
{ {
...@@ -438,6 +450,7 @@ void xfrm_policy_flush(void) ...@@ -438,6 +450,7 @@ void xfrm_policy_flush(void)
atomic_inc(&flow_cache_genid); atomic_inc(&flow_cache_genid);
write_unlock_bh(&xfrm_policy_lock); write_unlock_bh(&xfrm_policy_lock);
} }
EXPORT_SYMBOL(xfrm_policy_flush);
int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*),
void *data) void *data)
...@@ -470,7 +483,7 @@ int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), ...@@ -470,7 +483,7 @@ int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*),
read_unlock_bh(&xfrm_policy_lock); read_unlock_bh(&xfrm_policy_lock);
return error; return error;
} }
EXPORT_SYMBOL(xfrm_policy_walk);
/* Find policy to apply to this flow. */ /* Find policy to apply to this flow. */
...@@ -845,6 +858,7 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, ...@@ -845,6 +858,7 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
*dst_p = NULL; *dst_p = NULL;
return err; return err;
} }
EXPORT_SYMBOL(xfrm_lookup);
/* When skb is transformed back to its "native" form, we have to /* When skb is transformed back to its "native" form, we have to
* check policy restrictions. At the moment we make this in maximally * check policy restrictions. At the moment we make this in maximally
...@@ -981,6 +995,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, ...@@ -981,6 +995,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
xfrm_pol_put(pol); xfrm_pol_put(pol);
return 0; return 0;
} }
EXPORT_SYMBOL(__xfrm_policy_check);
int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
{ {
...@@ -991,6 +1006,7 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) ...@@ -991,6 +1006,7 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
return xfrm_lookup(&skb->dst, &fl, NULL, 0) == 0; return xfrm_lookup(&skb->dst, &fl, NULL, 0) == 0;
} }
EXPORT_SYMBOL(__xfrm_route_forward);
/* Optimize later using cookies and generation ids. */ /* Optimize later using cookies and generation ids. */
...@@ -1163,6 +1179,7 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) ...@@ -1163,6 +1179,7 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo)
write_unlock(&xfrm_policy_afinfo_lock); write_unlock(&xfrm_policy_afinfo_lock);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_policy_register_afinfo);
int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo) int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo)
{ {
...@@ -1190,6 +1207,7 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo) ...@@ -1190,6 +1207,7 @@ int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo)
write_unlock(&xfrm_policy_afinfo_lock); write_unlock(&xfrm_policy_afinfo_lock);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_policy_unregister_afinfo);
static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family)
{ {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <net/xfrm.h> #include <net/xfrm.h>
#include <linux/pfkeyv2.h> #include <linux/pfkeyv2.h>
#include <linux/ipsec.h> #include <linux/ipsec.h>
#include <linux/module.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
/* Each xfrm_state may be linked to two tables: /* Each xfrm_state may be linked to two tables:
...@@ -38,6 +39,7 @@ static struct list_head xfrm_state_bydst[XFRM_DST_HSIZE]; ...@@ -38,6 +39,7 @@ static struct list_head xfrm_state_bydst[XFRM_DST_HSIZE];
static struct list_head xfrm_state_byspi[XFRM_DST_HSIZE]; static struct list_head xfrm_state_byspi[XFRM_DST_HSIZE];
DECLARE_WAIT_QUEUE_HEAD(km_waitq); DECLARE_WAIT_QUEUE_HEAD(km_waitq);
EXPORT_SYMBOL(km_waitq);
static DEFINE_RWLOCK(xfrm_state_afinfo_lock); static DEFINE_RWLOCK(xfrm_state_afinfo_lock);
static struct xfrm_state_afinfo *xfrm_state_afinfo[NPROTO]; static struct xfrm_state_afinfo *xfrm_state_afinfo[NPROTO];
...@@ -193,6 +195,7 @@ struct xfrm_state *xfrm_state_alloc(void) ...@@ -193,6 +195,7 @@ struct xfrm_state *xfrm_state_alloc(void)
} }
return x; return x;
} }
EXPORT_SYMBOL(xfrm_state_alloc);
void __xfrm_state_destroy(struct xfrm_state *x) void __xfrm_state_destroy(struct xfrm_state *x)
{ {
...@@ -203,6 +206,7 @@ void __xfrm_state_destroy(struct xfrm_state *x) ...@@ -203,6 +206,7 @@ void __xfrm_state_destroy(struct xfrm_state *x)
spin_unlock_bh(&xfrm_state_gc_lock); spin_unlock_bh(&xfrm_state_gc_lock);
schedule_work(&xfrm_state_gc_work); schedule_work(&xfrm_state_gc_work);
} }
EXPORT_SYMBOL(__xfrm_state_destroy);
static void __xfrm_state_delete(struct xfrm_state *x) static void __xfrm_state_delete(struct xfrm_state *x)
{ {
...@@ -241,6 +245,7 @@ void xfrm_state_delete(struct xfrm_state *x) ...@@ -241,6 +245,7 @@ void xfrm_state_delete(struct xfrm_state *x)
__xfrm_state_delete(x); __xfrm_state_delete(x);
spin_unlock_bh(&x->lock); spin_unlock_bh(&x->lock);
} }
EXPORT_SYMBOL(xfrm_state_delete);
void xfrm_state_flush(u8 proto) void xfrm_state_flush(u8 proto)
{ {
...@@ -267,6 +272,7 @@ void xfrm_state_flush(u8 proto) ...@@ -267,6 +272,7 @@ void xfrm_state_flush(u8 proto)
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
wake_up(&km_waitq); wake_up(&km_waitq);
} }
EXPORT_SYMBOL(xfrm_state_flush);
static int static int
xfrm_init_tempsel(struct xfrm_state *x, struct flowi *fl, xfrm_init_tempsel(struct xfrm_state *x, struct flowi *fl,
...@@ -392,6 +398,7 @@ void xfrm_state_insert(struct xfrm_state *x) ...@@ -392,6 +398,7 @@ void xfrm_state_insert(struct xfrm_state *x)
__xfrm_state_insert(x); __xfrm_state_insert(x);
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
} }
EXPORT_SYMBOL(xfrm_state_insert);
static struct xfrm_state *__xfrm_find_acq_byseq(u32 seq); static struct xfrm_state *__xfrm_find_acq_byseq(u32 seq);
...@@ -444,6 +451,7 @@ int xfrm_state_add(struct xfrm_state *x) ...@@ -444,6 +451,7 @@ int xfrm_state_add(struct xfrm_state *x)
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_add);
int xfrm_state_update(struct xfrm_state *x) int xfrm_state_update(struct xfrm_state *x)
{ {
...@@ -508,6 +516,7 @@ int xfrm_state_update(struct xfrm_state *x) ...@@ -508,6 +516,7 @@ int xfrm_state_update(struct xfrm_state *x)
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_update);
int xfrm_state_check_expire(struct xfrm_state *x) int xfrm_state_check_expire(struct xfrm_state *x)
{ {
...@@ -531,6 +540,7 @@ int xfrm_state_check_expire(struct xfrm_state *x) ...@@ -531,6 +540,7 @@ int xfrm_state_check_expire(struct xfrm_state *x)
km_state_expired(x, 0); km_state_expired(x, 0);
return 0; return 0;
} }
EXPORT_SYMBOL(xfrm_state_check_expire);
static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb) static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb)
{ {
...@@ -553,6 +563,7 @@ int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb) ...@@ -553,6 +563,7 @@ int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb)
err: err:
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_check);
struct xfrm_state * struct xfrm_state *
xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto,
...@@ -569,6 +580,7 @@ xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, ...@@ -569,6 +580,7 @@ xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto,
xfrm_state_put_afinfo(afinfo); xfrm_state_put_afinfo(afinfo);
return x; return x;
} }
EXPORT_SYMBOL(xfrm_state_lookup);
struct xfrm_state * struct xfrm_state *
xfrm_find_acq(u8 mode, u32 reqid, u8 proto, xfrm_find_acq(u8 mode, u32 reqid, u8 proto,
...@@ -586,6 +598,7 @@ xfrm_find_acq(u8 mode, u32 reqid, u8 proto, ...@@ -586,6 +598,7 @@ xfrm_find_acq(u8 mode, u32 reqid, u8 proto,
xfrm_state_put_afinfo(afinfo); xfrm_state_put_afinfo(afinfo);
return x; return x;
} }
EXPORT_SYMBOL(xfrm_find_acq);
/* Silly enough, but I'm lazy to build resolution list */ /* Silly enough, but I'm lazy to build resolution list */
...@@ -614,6 +627,7 @@ struct xfrm_state *xfrm_find_acq_byseq(u32 seq) ...@@ -614,6 +627,7 @@ struct xfrm_state *xfrm_find_acq_byseq(u32 seq)
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
return x; return x;
} }
EXPORT_SYMBOL(xfrm_find_acq_byseq);
u32 xfrm_get_acqseq(void) u32 xfrm_get_acqseq(void)
{ {
...@@ -626,6 +640,7 @@ u32 xfrm_get_acqseq(void) ...@@ -626,6 +640,7 @@ u32 xfrm_get_acqseq(void)
spin_unlock_bh(&acqseq_lock); spin_unlock_bh(&acqseq_lock);
return res; return res;
} }
EXPORT_SYMBOL(xfrm_get_acqseq);
void void
xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi) xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi)
...@@ -666,6 +681,7 @@ xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi) ...@@ -666,6 +681,7 @@ xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi)
wake_up(&km_waitq); wake_up(&km_waitq);
} }
} }
EXPORT_SYMBOL(xfrm_alloc_spi);
int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*),
void *data) void *data)
...@@ -700,7 +716,7 @@ int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), ...@@ -700,7 +716,7 @@ int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*),
spin_unlock_bh(&xfrm_state_lock); spin_unlock_bh(&xfrm_state_lock);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_walk);
int xfrm_replay_check(struct xfrm_state *x, u32 seq) int xfrm_replay_check(struct xfrm_state *x, u32 seq)
{ {
...@@ -726,6 +742,7 @@ int xfrm_replay_check(struct xfrm_state *x, u32 seq) ...@@ -726,6 +742,7 @@ int xfrm_replay_check(struct xfrm_state *x, u32 seq)
} }
return 0; return 0;
} }
EXPORT_SYMBOL(xfrm_replay_check);
void xfrm_replay_advance(struct xfrm_state *x, u32 seq) void xfrm_replay_advance(struct xfrm_state *x, u32 seq)
{ {
...@@ -745,6 +762,7 @@ void xfrm_replay_advance(struct xfrm_state *x, u32 seq) ...@@ -745,6 +762,7 @@ void xfrm_replay_advance(struct xfrm_state *x, u32 seq)
x->replay.bitmap |= (1U << diff); x->replay.bitmap |= (1U << diff);
} }
} }
EXPORT_SYMBOL(xfrm_replay_advance);
static struct list_head xfrm_km_list = LIST_HEAD_INIT(xfrm_km_list); static struct list_head xfrm_km_list = LIST_HEAD_INIT(xfrm_km_list);
static DEFINE_RWLOCK(xfrm_km_lock); static DEFINE_RWLOCK(xfrm_km_lock);
...@@ -797,6 +815,7 @@ int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport) ...@@ -797,6 +815,7 @@ int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport)
read_unlock(&xfrm_km_lock); read_unlock(&xfrm_km_lock);
return err; return err;
} }
EXPORT_SYMBOL(km_new_mapping);
void km_policy_expired(struct xfrm_policy *pol, int dir, int hard) void km_policy_expired(struct xfrm_policy *pol, int dir, int hard)
{ {
...@@ -850,6 +869,7 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen ...@@ -850,6 +869,7 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen
kfree(data); kfree(data);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_user_policy);
int xfrm_register_km(struct xfrm_mgr *km) int xfrm_register_km(struct xfrm_mgr *km)
{ {
...@@ -858,6 +878,7 @@ int xfrm_register_km(struct xfrm_mgr *km) ...@@ -858,6 +878,7 @@ int xfrm_register_km(struct xfrm_mgr *km)
write_unlock_bh(&xfrm_km_lock); write_unlock_bh(&xfrm_km_lock);
return 0; return 0;
} }
EXPORT_SYMBOL(xfrm_register_km);
int xfrm_unregister_km(struct xfrm_mgr *km) int xfrm_unregister_km(struct xfrm_mgr *km)
{ {
...@@ -866,6 +887,7 @@ int xfrm_unregister_km(struct xfrm_mgr *km) ...@@ -866,6 +887,7 @@ int xfrm_unregister_km(struct xfrm_mgr *km)
write_unlock_bh(&xfrm_km_lock); write_unlock_bh(&xfrm_km_lock);
return 0; return 0;
} }
EXPORT_SYMBOL(xfrm_unregister_km);
int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo) int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo)
{ {
...@@ -885,6 +907,7 @@ int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo) ...@@ -885,6 +907,7 @@ int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo)
write_unlock(&xfrm_state_afinfo_lock); write_unlock(&xfrm_state_afinfo_lock);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_register_afinfo);
int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo) int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo)
{ {
...@@ -906,6 +929,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo) ...@@ -906,6 +929,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo)
write_unlock(&xfrm_state_afinfo_lock); write_unlock(&xfrm_state_afinfo_lock);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_unregister_afinfo);
static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family) static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family)
{ {
...@@ -940,6 +964,7 @@ void xfrm_state_delete_tunnel(struct xfrm_state *x) ...@@ -940,6 +964,7 @@ void xfrm_state_delete_tunnel(struct xfrm_state *x)
x->tunnel = NULL; x->tunnel = NULL;
} }
} }
EXPORT_SYMBOL(xfrm_state_delete_tunnel);
void __init xfrm_state_init(void) void __init xfrm_state_init(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment