0001
0002 #ifndef _NET_IPCOMP_H
0003 #define _NET_IPCOMP_H
0004
0005 #include <linux/skbuff.h>
0006 #include <linux/types.h>
0007
0008 #define IPCOMP_SCRATCH_SIZE 65400
0009
0010 struct crypto_comp;
0011 struct ip_comp_hdr;
0012
0013 struct ipcomp_data {
0014 u16 threshold;
0015 struct crypto_comp * __percpu *tfms;
0016 };
0017
0018 struct ip_comp_hdr;
0019 struct sk_buff;
0020 struct xfrm_state;
0021
0022 int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb);
0023 int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb);
0024 void ipcomp_destroy(struct xfrm_state *x);
0025 int ipcomp_init_state(struct xfrm_state *x);
0026
0027 static inline struct ip_comp_hdr *ip_comp_hdr(const struct sk_buff *skb)
0028 {
0029 return (struct ip_comp_hdr *)skb_transport_header(skb);
0030 }
0031
0032 #endif