libbpf: Add bpf_program__get_{type, expected_attach_type) APIs
authorAndrii Nakryiko <andriin@fb.com>
Mon, 21 Oct 2019 03:38:57 +0000 (20:38 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 21 Oct 2019 12:49:12 +0000 (14:49 +0200)
commitf1eead9e3ceef67b98be4b55ed1bfcfa4497b7db
treea07798031fd8a292c208edb054e46d24d44c6bad
parentbc3f2956f2b2241aac339d0a1ab7e3a0b8fcc886
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
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/lib/bpf/libbpf.map