From e1153fd1da40bdc43b82445b2c68a28c6f24e062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 2 Apr 2019 04:00:28 -0700 Subject: bpf_helpers.h - define more kernel provided functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test: builds Bug: 65674744 Signed-off-by: Maciej Żenczykowski Change-Id: I88dcaf5edf61b780666f346e963a7417c04c97ec --- progs/include/bpf_helpers.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/progs/include/bpf_helpers.h b/progs/include/bpf_helpers.h index 9fca3cd..3ae4291 100644 --- a/progs/include/bpf_helpers.h +++ b/progs/include/bpf_helpers.h @@ -28,6 +28,14 @@ static uint32_t (*bpf_get_socket_uid)(struct __sk_buff* skb) = (void*)BPF_FUNC_g static int (*bpf_skb_load_bytes)(struct __sk_buff* skb, int off, void* to, int len) = (void*)BPF_FUNC_skb_load_bytes; +static int (*bpf_skb_change_proto)(struct __sk_buff* skb, __be16 proto, + __u64 flags) = (void*)BPF_FUNC_skb_change_proto; +static int (*bpf_l3_csum_replace)(struct __sk_buff* skb, __u32 offset, __u64 from, __u64 to, + __u64 flags) = (void*)BPF_FUNC_l3_csum_replace; +static int (*bpf_l4_csum_replace)(struct __sk_buff* skb, __u32 offset, __u64 from, __u64 to, + __u64 flags) = (void*)BPF_FUNC_l4_csum_replace; +static int (*bpf_redirect)(__u32 ifindex, __u64 flags) = (void*)BPF_FUNC_redirect; + /* * Map structure to be used by Android eBPF C programs. The Android eBPF loader * uses this structure from eBPF object to create maps at boot time. -- cgit v1.2.3