1 // SPDX-License-Identifier: GPL-2.0
4 #include <bpf/bpf_helpers.h>
5 #include <linux/if_ether.h>
8 /* Dummy prog to test TC-BPF API */
11 int cls(struct __sk_buff *skb)
16 /* Prog to verify tc-bpf without cap_sys_admin and cap_perfmon */
18 int pkt_ptr(struct __sk_buff *skb)
20 struct iphdr *iph = (void *)(long)skb->data + sizeof(struct ethhdr);
22 if ((long)(iph + 1) > (long)skb->data_end)