]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/net/esp.h
1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/skbuff.h>
7 #define ESP_SKB_FRAG_MAXSIZE (PAGE_SIZE << SKB_FRAG_PAGE_ORDER)
11 static inline struct ip_esp_hdr
*ip_esp_hdr(const struct sk_buff
*skb
)
13 return (struct ip_esp_hdr
*)skb_transport_header(skb
);
16 static inline void esp_output_fill_trailer(u8
*tail
, int tfclen
, int plen
, __u8 proto
)
20 memset(tail
, 0, tfclen
);
25 for (i
= 0; i
< plen
- 2; i
++)
28 tail
[plen
- 2] = plen
- 2;
29 tail
[plen
- 1] = proto
;
33 struct ip_esp_hdr
*esph
;
45 int esp_output_head(struct xfrm_state
*x
, struct sk_buff
*skb
, struct esp_info
*esp
);
46 int esp_output_tail(struct xfrm_state
*x
, struct sk_buff
*skb
, struct esp_info
*esp
);
47 int esp_input_done2(struct sk_buff
*skb
, int err
);
48 int esp6_output_head(struct xfrm_state
*x
, struct sk_buff
*skb
, struct esp_info
*esp
);
49 int esp6_output_tail(struct xfrm_state
*x
, struct sk_buff
*skb
, struct esp_info
*esp
);
50 int esp6_input_done2(struct sk_buff
*skb
, int err
);