ipcomp.h 659 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _NET_IPCOMP_H
  3. #define _NET_IPCOMP_H
  4. #include <linux/types.h>
  5. #define IPCOMP_SCRATCH_SIZE 65400
  6. struct crypto_comp;
  7. struct ipcomp_data {
  8. u16 threshold;
  9. struct crypto_comp * __percpu *tfms;
  10. };
  11. struct ip_comp_hdr;
  12. struct sk_buff;
  13. struct xfrm_state;
  14. int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb);
  15. int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb);
  16. void ipcomp_destroy(struct xfrm_state *x);
  17. int ipcomp_init_state(struct xfrm_state *x);
  18. static inline struct ip_comp_hdr *ip_comp_hdr(const struct sk_buff *skb)
  19. {
  20. return (struct ip_comp_hdr *)skb_transport_header(skb);
  21. }
  22. #endif