summaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/main.h
diff options
context:
space:
mode:
authorRoman Gushchin2017-12-13 16:18:53 +0100
committerDaniel Borkmann2017-12-14 13:37:13 +0100
commit49a086c201a9356287471aa5846a427bdcecc4f7 (patch)
tree0fc32d8eb8543ded1ccef6f36cbebd070dafc0b3 /tools/bpf/bpftool/main.h
parentlibbpf: prefer global symbols as bpf program name source (diff)
downloadkernel-qcow2-linux-49a086c201a9356287471aa5846a427bdcecc4f7.tar.gz
kernel-qcow2-linux-49a086c201a9356287471aa5846a427bdcecc4f7.tar.xz
kernel-qcow2-linux-49a086c201a9356287471aa5846a427bdcecc4f7.zip
bpftool: implement prog load command
Add the prog load command to load a bpf program from a specified binary file and pin it to bpffs. Usage description and examples are given in the corresponding man page. Syntax: $ bpftool prog load OBJ FILE FILE is a non-existing file on bpffs. Signed-off-by: Roman Gushchin <guro@fb.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Martin KaFai Lau <kafai@fb.com> Cc: Quentin Monnet <quentin.monnet@netronome.com> Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/main.h')
-rw-r--r--tools/bpf/bpftool/main.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h
index bff330b49791..bec1ccbb49c7 100644
--- a/tools/bpf/bpftool/main.h
+++ b/tools/bpf/bpftool/main.h
@@ -111,6 +111,7 @@ char *get_fdinfo(int fd, const char *key);
int open_obj_pinned(char *path);
int open_obj_pinned_any(char *path, enum bpf_obj_type exp_type);
int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(__u32));
+int do_pin_fd(int fd, const char *name);
int do_prog(int argc, char **arg);
int do_map(int argc, char **arg);