9 #include <linux/kernel.h>
10 #include <linux/module.h>
30 hdr_len = x->
type->hdr_offset(x, skb, &prevhdr);
31 skb_set_mac_header(skb, (prevhdr - x->
props.header_len) - skb->
data);
32 skb_set_network_header(skb, -x->
props.header_len);
34 __skb_pull(skb, hdr_len);
35 memmove(ipv6_hdr(skb), iph, hdr_len);
49 int ihl = skb->
data - skb_transport_header(skb);
52 memmove(skb_transport_header(skb),
53 skb_network_header(skb), ihl);
56 ipv6_hdr(skb)->payload_len =
htons(skb->
len + ihl -
58 skb_reset_transport_header(skb);
62 static struct xfrm_mode xfrm6_transport_mode = {
63 .input = xfrm6_transport_input,
64 .output = xfrm6_transport_output,
69 static int __init xfrm6_transport_init(
void)
74 static void __exit xfrm6_transport_exit(
void)