^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * BPF programs attached to network namespace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef __NETNS_BPF_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define __NETNS_BPF_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/bpf-netns.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct bpf_prog;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) struct bpf_prog_array;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct netns_bpf {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) /* Array of programs to run compiled from progs or links */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct bpf_prog_array __rcu *run_array[MAX_NETNS_BPF_ATTACH_TYPE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct bpf_prog *progs[MAX_NETNS_BPF_ATTACH_TYPE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) struct list_head links[MAX_NETNS_BPF_ATTACH_TYPE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #endif /* __NETNS_BPF_H__ */