xref: /linux-tools/ebpf/kernel-samples-bpf/sock_sillycreate_kern.c (revision 7d22aecf53af5e94ddbf0a819d9b87971c524146)
1 #include <uapi/linux/bpf.h>
2 #include <linux/bpf.h>
3 #include <uapi/linux/ip.h>
4 #include <linux/socket.h>
5 #include <bpf/bpf_helpers.h>
6 
7 
8 SEC("cgroup/sock_create")
bpf_sock_create(struct bpf_sock * ctx)9 int bpf_sock_create(struct bpf_sock *ctx)
10 {
11     ctx->priority = (1<<16)|0xffff;
12 	return 1;
13 }
14 char _license[] SEC("license") = "GPL";
15