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