diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/xfrm.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 4655ca25f808..d341603e4ba8 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -254,6 +254,8 @@ struct xfrm_state_afinfo { | |||
254 | struct xfrm_state *(*find_acq)(u8 mode, u32 reqid, u8 proto, | 254 | struct xfrm_state *(*find_acq)(u8 mode, u32 reqid, u8 proto, |
255 | xfrm_address_t *daddr, xfrm_address_t *saddr, | 255 | xfrm_address_t *daddr, xfrm_address_t *saddr, |
256 | int create); | 256 | int create); |
257 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); | ||
258 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); | ||
257 | }; | 259 | }; |
258 | 260 | ||
259 | extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); | 261 | extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); |
@@ -1002,6 +1004,24 @@ extern int xfrm_state_add(struct xfrm_state *x); | |||
1002 | extern int xfrm_state_update(struct xfrm_state *x); | 1004 | extern int xfrm_state_update(struct xfrm_state *x); |
1003 | extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family); | 1005 | extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family); |
1004 | extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family); | 1006 | extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family); |
1007 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
1008 | extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, | ||
1009 | int n, unsigned short family); | ||
1010 | extern int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **src, | ||
1011 | int n, unsigned short family); | ||
1012 | #else | ||
1013 | static inline int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, | ||
1014 | int n, unsigned short family) | ||
1015 | { | ||
1016 | return -ENOSYS; | ||
1017 | } | ||
1018 | |||
1019 | static inline int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **src, | ||
1020 | int n, unsigned short family) | ||
1021 | { | ||
1022 | return -ENOSYS; | ||
1023 | } | ||
1024 | #endif | ||
1005 | extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); | 1025 | extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); |
1006 | extern int xfrm_state_delete(struct xfrm_state *x); | 1026 | extern int xfrm_state_delete(struct xfrm_state *x); |
1007 | extern void xfrm_state_flush(u8 proto); | 1027 | extern void xfrm_state_flush(u8 proto); |