diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-06-08 18:20:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-06-08 22:02:35 +0200 |
commit | b57d75232615f98aefcf41cb145ec2ea3262857d (patch) | |
tree | 0aee580b48cc3ade4e039cdf8c825337f02383b8 /src/shared/bpf-program.h | |
parent | 7a7cf83dc3378d4063c728ff6a486c5edfe2f86c (diff) | |
download | systemd-b57d75232615f98aefcf41cb145ec2ea3262857d.tar.gz |
bpf-program: serialize attached BPF programs across daemon reexec/reload
Alternative to #17495
Diffstat (limited to 'src/shared/bpf-program.h')
-rw-r--r-- | src/shared/bpf-program.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/bpf-program.h b/src/shared/bpf-program.h index b8b9f79261..245e2b395d 100644 --- a/src/shared/bpf-program.h +++ b/src/shared/bpf-program.h @@ -3,8 +3,10 @@ #include <linux/bpf.h> #include <stdint.h> +#include <stdio.h> #include <sys/syscall.h> +#include "fdset.h" #include "list.h" #include "macro.h" @@ -38,6 +40,11 @@ int bpf_program_cgroup_detach(BPFProgram *p); int bpf_program_pin(int prog_fd, const char *bpffs_path); int bpf_program_get_id_by_fd(int prog_fd, uint32_t *ret_id); +int bpf_program_serialize_attachment(FILE *f, FDSet *fds, const char *key, BPFProgram *p); +int bpf_program_serialize_attachment_set(FILE *f, FDSet *fds, const char *key, Set *set); +int bpf_program_deserialize_attachment(const char *v, FDSet *fds, BPFProgram **bpfp); +int bpf_program_deserialize_attachment_set(const char *v, FDSet *fds, Set **bpfsetp); + extern const struct hash_ops bpf_program_hash_ops; int bpf_map_new(enum bpf_map_type type, size_t key_size, size_t value_size, size_t max_entries, uint32_t flags); |