1 #include <linux/stddef.h>
2 #include <linux/ipv6.h>
5 #include <sys/socket.h>
6 #include <bpf/bpf_helpers.h>
7 #include <bpf/bpf_endian.h>
9 SEC("freplace/do_bind")
10 int new_do_bind(struct bpf_sock_addr *ctx)
12 struct sockaddr_in sa = {};
14 bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa));
18 char _license[] SEC("license") = "GPL";