ipcomp.h 737 B

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