8 #include <linux/kernel.h>
9 #include <linux/module.h>
23 struct iphdr *iph = ip_hdr(skb);
24 int ihl = iph->ihl * 4;
26 skb_set_network_header(skb, -x->
props.header_len);
31 memmove(skb_network_header(skb), iph, ihl);
45 int ihl = skb->
data - skb_transport_header(skb);
48 memmove(skb_transport_header(skb),
49 skb_network_header(skb), ihl);
52 ip_hdr(skb)->tot_len =
htons(skb->
len + ihl);
53 skb_reset_transport_header(skb);
57 static struct xfrm_mode xfrm4_transport_mode = {
58 .input = xfrm4_transport_input,
59 .output = xfrm4_transport_output,
64 static int __init xfrm4_transport_init(
void)
69 static void __exit xfrm4_transport_exit(
void)