blob: fee6fc451597929a8294896446437de3627f1655 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _NET_IPCOMP_H
3#define _NET_IPCOMP_H
4
Herbert Xu9409f382006-08-06 19:49:12 +10005#include <linux/types.h>
6
Linus Torvalds1da177e2005-04-16 15:20:36 -07007#define IPCOMP_SCRATCH_SIZE 65400
8
Herbert Xu87bdc482007-10-10 15:45:25 -07009struct crypto_comp;
10
Linus Torvalds1da177e2005-04-16 15:20:36 -070011struct ipcomp_data {
12 u16 threshold;
Tejun Heo7d720c32010-02-16 15:20:26 +000013 struct crypto_comp * __percpu *tfms;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014};
15
Herbert Xu87bdc482007-10-10 15:45:25 -070016struct ip_comp_hdr;
17struct sk_buff;
Herbert Xu6fccab62008-07-25 02:54:40 -070018struct xfrm_state;
19
20int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb);
21int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb);
22void ipcomp_destroy(struct xfrm_state *x);
23int ipcomp_init_state(struct xfrm_state *x);
Herbert Xu87bdc482007-10-10 15:45:25 -070024
25static 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 Torvalds1da177e2005-04-16 15:20:36 -070030#endif