0001
0002
0003 #include "vmlinux.h"
0004 #include <bpf/bpf_helpers.h>
0005 #include <bpf/bpf_tracing.h>
0006
0007 __u64 fentry_called = 0;
0008
0009 SEC("fentry/test_pkt_md_access_new")
0010 int BPF_PROG(fentry, struct sk_buff *skb)
0011 {
0012 fentry_called = skb->len;
0013 return 0;
0014 }
0015
0016 __u64 fexit_called = 0;
0017
0018 SEC("fexit/test_pkt_md_access_new")
0019 int BPF_PROG(fexit, struct sk_buff *skb)
0020 {
0021 fexit_called = skb->len;
0022 return 0;
0023 }
0024
0025 char _license[] SEC("license") = "GPL";