Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #include "vmlinux.h"
0003 #include <bpf/bpf_helpers.h>
0004 
0005 struct {
0006     __uint(type, BPF_MAP_TYPE_SOCKMAP);
0007     __uint(max_entries, 2);
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_DROP;
0016 }
0017 
0018 char _license[] SEC("license") = "GPL";