bpf_net_helpers - add definition for bpf_skb_change_head
Based on kernel's //include/uapi/linux/bpf.h:
* int bpf_skb_change_head(struct sk_buff *skb, u32 len, u64 flags)
Test: builds
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1d378d35a9bce654ebd3d03d96c364f3b0c3e22d
diff --git a/bpf_progs/bpf_net_helpers.h b/bpf_progs/bpf_net_helpers.h
index 3714eac..d4dc5f8 100644
--- a/bpf_progs/bpf_net_helpers.h
+++ b/bpf_progs/bpf_net_helpers.h
@@ -42,6 +42,8 @@
__u64 flags) = (void*)BPF_FUNC_l4_csum_replace;
static int (*bpf_redirect)(__u32 ifindex, __u64 flags) = (void*)BPF_FUNC_redirect;
+static int (*bpf_skb_change_head)(struct __sk_buff* skb, __u32 head_room,
+ __u64 flags) = (void*)BPF_FUNC_skb_change_head;
static int (*bpf_skb_adjust_room)(struct __sk_buff* skb, __s32 len_diff, __u32 mode,
__u64 flags) = (void*)BPF_FUNC_skb_adjust_room;