0001
0002 #include "vmlinux.h"
0003 #include <bpf/bpf_helpers.h>
0004
0005 struct {
0006 __uint(type, BPF_MAP_TYPE_SOCKMAP);
0007 __uint(max_entries, 1);
0008 __type(key, __u32);
0009 __type(value, __u64);
0010 } sock_map SEC(".maps");
0011
0012 SEC("sk_skb")
0013 int prog_skb_verdict(struct __sk_buff *skb)
0014 {
0015 return SK_PASS;
0016 }
0017
0018 SEC("sk_msg")
0019 int prog_skmsg_verdict(struct sk_msg_md *msg)
0020 {
0021 return SK_PASS;
0022 }
0023
0024 char _license[] SEC("license") = "GPL";