aboutsummaryrefslogtreecommitdiffstats
path: root/samples/bpf/sockex2_user.c
diff options
context:
space:
mode:
authorJoe Stringer <joe@ovn.org>2016-12-08 18:46:20 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-12-20 12:00:40 -0300
commit9899694a7f67714216665b87318eb367e2c5c901 (patch)
tree54f29b8abd381ca36208b9cc6fe8de308800f881 /samples/bpf/sockex2_user.c
parentsamples/bpf: Remove perf_event_open() declaration (diff)
downloadlinux-dev-9899694a7f67714216665b87318eb367e2c5c901.tar.xz
linux-dev-9899694a7f67714216665b87318eb367e2c5c901.zip
samples/bpf: Move open_raw_sock to separate header
This function was declared in libbpf.c and was the only remaining function in this library, but has nothing to do with BPF. Shift it out into a new header, sock_example.h, and include it from the relevant samples. Signed-off-by: Joe Stringer <joe@ovn.org> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/20161209024620.31660-8-joe@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'samples/bpf/sockex2_user.c')
-rw-r--r--samples/bpf/sockex2_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/bpf/sockex2_user.c b/samples/bpf/sockex2_user.c
index 6a40600d5a83..0e0207c90841 100644
--- a/samples/bpf/sockex2_user.c
+++ b/samples/bpf/sockex2_user.c
@@ -3,6 +3,7 @@
#include <linux/bpf.h>
#include "libbpf.h"
#include "bpf_load.h"
+#include "sock_example.h"
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/resource.h>