1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 2 /* 3 * BPF programs attached to network namespace 3 * BPF programs attached to network namespace 4 */ 4 */ 5 5 6 #ifndef __NETNS_BPF_H__ 6 #ifndef __NETNS_BPF_H__ 7 #define __NETNS_BPF_H__ 7 #define __NETNS_BPF_H__ 8 8 9 #include <linux/list.h> !! 9 #include <linux/bpf-netns.h> 10 10 11 struct bpf_prog; 11 struct bpf_prog; 12 struct bpf_prog_array; 12 struct bpf_prog_array; 13 << 14 enum netns_bpf_attach_type { << 15 NETNS_BPF_INVALID = -1, << 16 NETNS_BPF_FLOW_DISSECTOR = 0, << 17 NETNS_BPF_SK_LOOKUP, << 18 MAX_NETNS_BPF_ATTACH_TYPE << 19 }; << 20 13 21 struct netns_bpf { 14 struct netns_bpf { 22 /* Array of programs to run compiled f 15 /* Array of programs to run compiled from progs or links */ 23 struct bpf_prog_array __rcu *run_array 16 struct bpf_prog_array __rcu *run_array[MAX_NETNS_BPF_ATTACH_TYPE]; 24 struct bpf_prog *progs[MAX_NETNS_BPF_A 17 struct bpf_prog *progs[MAX_NETNS_BPF_ATTACH_TYPE]; 25 struct list_head links[MAX_NETNS_BPF_A 18 struct list_head links[MAX_NETNS_BPF_ATTACH_TYPE]; 26 }; 19 }; 27 20 28 #endif /* __NETNS_BPF_H__ */ 21 #endif /* __NETNS_BPF_H__ */ 29 22
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.