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_IPCOMP_H |
| 3 | #define _NET_IPCOMP_H |
| 4 | |
Herbert Xu | 9409f38 | 2006-08-06 19:49:12 +1000 | [diff] [blame] | 5 | #include <linux/types.h> |
| 6 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | #define IPCOMP_SCRATCH_SIZE 65400 |
| 8 | |
Herbert Xu | 87bdc48 | 2007-10-10 15:45:25 -0700 | [diff] [blame] | 9 | struct crypto_comp; |
| 10 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | struct ipcomp_data { |
| 12 | u16 threshold; |
Tejun Heo | 7d720c3 | 2010-02-16 15:20:26 +0000 | [diff] [blame] | 13 | struct crypto_comp * __percpu *tfms; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | }; |
| 15 | |
Herbert Xu | 87bdc48 | 2007-10-10 15:45:25 -0700 | [diff] [blame] | 16 | struct ip_comp_hdr; |
| 17 | struct sk_buff; |
Herbert Xu | 6fccab6 | 2008-07-25 02:54:40 -0700 | [diff] [blame] | 18 | struct xfrm_state; |
| 19 | |
| 20 | int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb); |
| 21 | int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb); |
| 22 | void ipcomp_destroy(struct xfrm_state *x); |
| 23 | int ipcomp_init_state(struct xfrm_state *x); |
Herbert Xu | 87bdc48 | 2007-10-10 15:45:25 -0700 | [diff] [blame] | 24 | |
| 25 | static inline struct ip_comp_hdr *ip_comp_hdr(const struct sk_buff *skb) |
| 26 | { |
| 27 | return (struct ip_comp_hdr *)skb_transport_header(skb); |
| 28 | } |
| 29 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | #endif |