esp.h 877 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _NET_ESP_H
  3. #define _NET_ESP_H
  4. #include <linux/skbuff.h>
  5. struct ip_esp_hdr;
  6. static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
  7. {
  8. return (struct ip_esp_hdr *)skb_transport_header(skb);
  9. }
  10. struct esp_info {
  11. struct ip_esp_hdr *esph;
  12. __be64 seqno;
  13. int tfclen;
  14. int tailen;
  15. int plen;
  16. int clen;
  17. int len;
  18. int nfrags;
  19. __u8 proto;
  20. bool inplace;
  21. };
  22. int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
  23. int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
  24. int esp_input_done2(struct sk_buff *skb, int err);
  25. int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
  26. int esp6_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
  27. int esp6_input_done2(struct sk_buff *skb, int err);
  28. #endif