[IPSEC]: exporting xfrm_state_afinfo
This patch exports xfrm_state_afinfo. Signed-off-by: Miika Komu <miika@iki.fi> Signed-off-by: Diego Beltrami <Diego.Beltrami@hiit.fi> Signed-off-by: Kazunori Miyazawa <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
243cb4e560
commit
cdca72652a
4 changed files with 10 additions and 5 deletions
|
@ -252,10 +252,13 @@ struct xfrm_state_afinfo {
|
|||
xfrm_address_t *daddr, xfrm_address_t *saddr);
|
||||
int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n);
|
||||
int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n);
|
||||
int (*output)(struct sk_buff *skb);
|
||||
};
|
||||
|
||||
extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo);
|
||||
extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo);
|
||||
extern struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family);
|
||||
extern void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo);
|
||||
|
||||
extern void xfrm_state_delete_tunnel(struct xfrm_state *x);
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ static struct xfrm_state_afinfo xfrm4_state_afinfo = {
|
|||
.family = AF_INET,
|
||||
.init_flags = xfrm4_init_flags,
|
||||
.init_tempsel = __xfrm4_init_tempsel,
|
||||
.output = xfrm4_output,
|
||||
};
|
||||
|
||||
void __init xfrm4_state_init(void)
|
||||
|
|
|
@ -171,6 +171,7 @@ static struct xfrm_state_afinfo xfrm6_state_afinfo = {
|
|||
.init_tempsel = __xfrm6_init_tempsel,
|
||||
.tmpl_sort = __xfrm6_tmpl_sort,
|
||||
.state_sort = __xfrm6_state_sort,
|
||||
.output = xfrm6_output,
|
||||
};
|
||||
|
||||
void __init xfrm6_state_init(void)
|
||||
|
|
|
@ -183,9 +183,6 @@ static DEFINE_SPINLOCK(xfrm_state_gc_lock);
|
|||
|
||||
int __xfrm_state_delete(struct xfrm_state *x);
|
||||
|
||||
static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family);
|
||||
static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo);
|
||||
|
||||
int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol);
|
||||
void km_state_expired(struct xfrm_state *x, int hard, u32 pid);
|
||||
|
||||
|
@ -1458,7 +1455,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo)
|
|||
}
|
||||
EXPORT_SYMBOL(xfrm_state_unregister_afinfo);
|
||||
|
||||
static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family)
|
||||
struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family)
|
||||
{
|
||||
struct xfrm_state_afinfo *afinfo;
|
||||
if (unlikely(family >= NPROTO))
|
||||
|
@ -1470,11 +1467,14 @@ static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family)
|
|||
return afinfo;
|
||||
}
|
||||
|
||||
static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo)
|
||||
void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo)
|
||||
{
|
||||
read_unlock(&xfrm_state_afinfo_lock);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(xfrm_state_get_afinfo);
|
||||
EXPORT_SYMBOL(xfrm_state_put_afinfo);
|
||||
|
||||
/* Temporarily located here until net/xfrm/xfrm_tunnel.c is created */
|
||||
void xfrm_state_delete_tunnel(struct xfrm_state *x)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue