diff options
author | Masahide NAKAMURA <nakam@linux-ipv6.org> | 2006-08-23 20:57:28 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:06:36 -0400 |
commit | aee5adb4307c4c63a4dc5f3b49984d76f8a71b5b (patch) | |
tree | b2daac197259c535d66749617ede6f8479b355a4 /include | |
parent | eb2971b68a7d17a7d0fa2c7fc6fbc4bfe41cd694 (diff) |
[XFRM] STATE: Add a hook to find offset to be inserted header in outbound.
On current kernel, ip6_find_1stfragopt() is used by IPv6 IPsec to find
offset to be inserted header in outbound for transport mode. (BTW, no
usage may be needed for IPv4 case.) Mobile IPv6 requires another
logic for routing header and destination options header
respectively. This patch is common platform for the offset and adopts
it to IPsec.
Based on MIPL2 kernel patch.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/xfrm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d9c40e713184..eed48f832ce1 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -265,6 +265,7 @@ struct xfrm_type | |||
265 | void (*destructor)(struct xfrm_state *); | 265 | void (*destructor)(struct xfrm_state *); |
266 | int (*input)(struct xfrm_state *, struct sk_buff *skb); | 266 | int (*input)(struct xfrm_state *, struct sk_buff *skb); |
267 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); | 267 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); |
268 | int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **); | ||
268 | /* Estimate maximal size of result of transformation of a dgram */ | 269 | /* Estimate maximal size of result of transformation of a dgram */ |
269 | u32 (*get_max_size)(struct xfrm_state *, int size); | 270 | u32 (*get_max_size)(struct xfrm_state *, int size); |
270 | }; | 271 | }; |
@@ -960,6 +961,8 @@ extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); | |||
960 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); | 961 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); |
961 | extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); | 962 | extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); |
962 | extern int xfrm6_output(struct sk_buff *skb); | 963 | extern int xfrm6_output(struct sk_buff *skb); |
964 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, | ||
965 | u8 **prevhdr); | ||
963 | 966 | ||
964 | #ifdef CONFIG_XFRM | 967 | #ifdef CONFIG_XFRM |
965 | extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); | 968 | extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); |