1 // SPDX-License-Identifier: GPL-2.0 2 3 #include "vmlinux.h" 4 #include <bpf/bpf_helpers.h> 5 #include <bpf/bpf_tracing.h> 6 7 __u64 fentry_called = 0; 8 9 SEC("fentry/test_pkt_md_access_new") 10 int BPF_PROG(fentry, struct sk_buff *skb) 11 { 12 fentry_called = skb->len; 13 return 0; 14 } 15 16 __u64 fexit_called = 0; 17 18 SEC("fexit/test_pkt_md_access_new") 19 int BPF_PROG(fexit, struct sk_buff *skb) 20 { 21 fexit_called = skb->len; 22 return 0; 23 } 24 25 char _license[] SEC("license") = "GPL"; 26
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.