blob: c41994d1bfef0bce761227828638d466a01d6ebc [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _NET_ESP_H
2#define _NET_ESP_H
3
Herbert Xu38320c72008-01-28 19:35:05 -08004#include <linux/skbuff.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Herbert Xu87bdc482007-10-10 15:45:25 -07006struct ip_esp_hdr;
7
8static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
9{
10 return (struct ip_esp_hdr *)skb_transport_header(skb);
11}
12
Steffen Klassertfca11eb2017-04-14 10:06:33 +020013struct esp_info {
14 struct ip_esp_hdr *esph;
15 __be64 seqno;
16 int tfclen;
17 int tailen;
18 int plen;
19 int clen;
20 int len;
21 int nfrags;
22 __u8 proto;
23 bool inplace;
24};
25
26int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
27int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
28int esp_input_done2(struct sk_buff *skb, int err);
Steffen Klassert383d0352017-04-14 10:06:42 +020029int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
30int esp6_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
31int esp6_input_done2(struct sk_buff *skb, int err);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#endif