tools: libbpf: expose the prog type guessing from section name logic
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 10 Jul 2018 21:42:59 +0000 (14:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 Jul 2018 20:13:33 +0000 (22:13 +0200)
commitb60df2a0e11fcd24186c312b0307ab8494031e27
tree46028b7d5950e0aaa76e1de07aef751ef64a359a
parentba6dd679a3e81af023ec091c2fb7c82003a27316
tools: libbpf: expose the prog type guessing from section name logic

libbpf can guess program type based on ELF section names.  As libbpf
becomes more popular its association between section name strings and
types becomes more of a standard.  Allow libbpf users to use the same
logic for matching strings to types, e.g. when the string originates
from command line.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h