libbpf: Add bpf_program__get_{type, expected_attach_type) APIs

There are bpf_program__set_type() and
bpf_program__set_expected_attach_type(), but no corresponding getters,
which seems rather incomplete. Fix this.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191021033902.3856966-3-andriin@fb.com
This commit is contained in:
Andrii Nakryiko 2019-10-20 20:38:57 -07:00 committed by Daniel Borkmann
parent bc3f2956f2
commit f1eead9e3c
3 changed files with 18 additions and 0 deletions

View file

@ -195,4 +195,6 @@ LIBBPF_0.0.6 {
global:
bpf_object__open_file;
bpf_object__open_mem;
bpf_program__get_expected_attach_type;
bpf_program__get_type;
} LIBBPF_0.0.5;