Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef _NET_ESP_H |
| 3 | #define _NET_ESP_H |
| 4 | |
Herbert Xu | 38320c7 | 2008-01-28 19:35:05 -0800 | [diff] [blame] | 5 | #include <linux/skbuff.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Herbert Xu | 87bdc48 | 2007-10-10 15:45:25 -0700 | [diff] [blame] | 7 | struct ip_esp_hdr; |
| 8 | |
| 9 | static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb) |
| 10 | { |
| 11 | return (struct ip_esp_hdr *)skb_transport_header(skb); |
| 12 | } |
| 13 | |
Steffen Klassert | fca11eb | 2017-04-14 10:06:33 +0200 | [diff] [blame] | 14 | struct esp_info { |
| 15 | struct ip_esp_hdr *esph; |
| 16 | __be64 seqno; |
| 17 | int tfclen; |
| 18 | int tailen; |
| 19 | int plen; |
| 20 | int clen; |
| 21 | int len; |
| 22 | int nfrags; |
| 23 | __u8 proto; |
| 24 | bool inplace; |
| 25 | }; |
| 26 | |
| 27 | int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp); |
| 28 | int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp); |
| 29 | int esp_input_done2(struct sk_buff *skb, int err); |
Steffen Klassert | 383d035 | 2017-04-14 10:06:42 +0200 | [diff] [blame] | 30 | int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp); |
| 31 | int esp6_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp); |
| 32 | int esp6_input_done2(struct sk_buff *skb, int err); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | #endif |