Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Alexei Starovoitov | b896c4f | 2015-03-25 12:49:23 -0700 | [diff] [blame] | 2 | #include <stdio.h> |
| 3 | #include <linux/bpf.h> |
| 4 | #include <unistd.h> |
| 5 | #include "libbpf.h" |
| 6 | #include "bpf_load.h" |
| 7 | |
| 8 | int main(int ac, char **argv) |
| 9 | { |
| 10 | FILE *f; |
| 11 | char filename[256]; |
| 12 | |
| 13 | snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); |
| 14 | |
| 15 | if (load_bpf_file(filename)) { |
| 16 | printf("%s", bpf_log_buf); |
| 17 | return 1; |
| 18 | } |
| 19 | |
| 20 | f = popen("taskset 1 ping -c5 localhost", "r"); |
| 21 | (void) f; |
| 22 | |
| 23 | read_trace_pipe(); |
| 24 | |
| 25 | return 0; |
| 26 | } |