seg6_local.h 644 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * SR-IPv6 implementation
  4. *
  5. * Authors:
  6. * David Lebrun <[email protected]>
  7. * eBPF support: Mathieu Xhonneux <[email protected]>
  8. */
  9. #ifndef _NET_SEG6_LOCAL_H
  10. #define _NET_SEG6_LOCAL_H
  11. #include <linux/percpu.h>
  12. #include <linux/net.h>
  13. #include <linux/ipv6.h>
  14. extern int seg6_lookup_nexthop(struct sk_buff *skb, struct in6_addr *nhaddr,
  15. u32 tbl_id);
  16. extern bool seg6_bpf_has_valid_srh(struct sk_buff *skb);
  17. struct seg6_bpf_srh_state {
  18. struct ipv6_sr_hdr *srh;
  19. u16 hdrlen;
  20. bool valid;
  21. };
  22. DECLARE_PER_CPU(struct seg6_bpf_srh_state, seg6_bpf_srh_states);
  23. #endif