Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *  SR-IPv6 implementation
0004  *
0005  *  Authors:
0006  *  David Lebrun <david.lebrun@uclouvain.be>
0007  *  eBPF support: Mathieu Xhonneux <m.xhonneux@gmail.com>
0008  */
0009 
0010 #ifndef _NET_SEG6_LOCAL_H
0011 #define _NET_SEG6_LOCAL_H
0012 
0013 #include <linux/percpu.h>
0014 #include <linux/net.h>
0015 #include <linux/ipv6.h>
0016 
0017 extern int seg6_lookup_nexthop(struct sk_buff *skb, struct in6_addr *nhaddr,
0018                    u32 tbl_id);
0019 extern bool seg6_bpf_has_valid_srh(struct sk_buff *skb);
0020 
0021 struct seg6_bpf_srh_state {
0022     struct ipv6_sr_hdr *srh;
0023     u16 hdrlen;
0024     bool valid;
0025 };
0026 
0027 DECLARE_PER_CPU(struct seg6_bpf_srh_state, seg6_bpf_srh_states);
0028 
0029 #endif