esp.h 838 B

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