aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2018-10-15 16:13:15 -0700
committerAlexei Starovoitov <ast@kernel.org>2018-10-15 16:13:15 -0700
commit2f1d774f7d356a7e95ac7c41373d518cf0d716c7 (patch)
treea9e5e822219576241fdd259c52182750a4a267c9 /tools/lib/bpf/libbpf.h
parentMerge branch 'ipv6_sk_lookup_fixes' (diff)
parentbpf: bpftool, add flag to allow non-compat map definitions (diff)
downloadlinux-dev-2f1d774f7d356a7e95ac7c41373d518cf0d716c7.tar.xz
linux-dev-2f1d774f7d356a7e95ac7c41373d518cf0d716c7.zip
Merge branch 'bpftool_sockmap'
John Fastabend says: ==================== The first patch adds support for attaching programs to maps. This is needed to support sock{map|hash} use from bpftool. Currently, I carry around custom code to do this so doing it using standard bpftool will be great. The second patch adds a compat mode to ignore non-zero entries in the map def. This allows using bpftool with maps that have a extra fields that the user knows can be ignored. This is needed to work correctly with maps being loaded by other tools or directly via syscalls. v3: add bash completion and doc updates for --mapcompat ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r--tools/lib/bpf/libbpf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 8af8d3663991..7e9c801a9fdd 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -61,6 +61,8 @@ struct bpf_object_open_attr {
struct bpf_object *bpf_object__open(const char *path);
struct bpf_object *bpf_object__open_xattr(struct bpf_object_open_attr *attr);
+struct bpf_object *__bpf_object__open_xattr(struct bpf_object_open_attr *attr,
+ int flags);
struct bpf_object *bpf_object__open_buffer(void *obj_buf,
size_t obj_buf_sz,
const char *name);