bpf-program: optionally take fd of program to detach

This is useful for BPF_F_ALLOW_MULTI programs, where the kernel requires
us to specify the fd.
This commit is contained in:
Lennart Poettering
2018-02-21 16:43:36 +01:00
parent 2ae7ee58fa
commit 9b3c189786
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ int bpf_program_add_instructions(BPFProgram *p, const struct bpf_insn *insn, siz
int bpf_program_load_kernel(BPFProgram *p, char *log_buf, size_t log_size);
int bpf_program_cgroup_attach(BPFProgram *p, int type, const char *path, uint32_t flags);
int bpf_program_cgroup_detach(int type, const char *path);
int bpf_program_cgroup_detach(BPFProgram *p, int type, const char *path);
int bpf_map_new(enum bpf_map_type type, size_t key_size, size_t value_size, size_t max_entries, uint32_t flags);
int bpf_map_update_element(int fd, const void *key, void *value);