Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[deliverable/linux.git] / tools / lib / bpf / libbpf.h
index f392c5e04cc18cd38ad3153a4e2909e7089d1d96..dd7a513efb10e6337d962fa50f554ad73831ba67 100644 (file)
@@ -39,6 +39,7 @@ enum libbpf_errno {
        LIBBPF_ERRNO__VERIFY,   /* Kernel verifier blocks program loading */
        LIBBPF_ERRNO__PROG2BIG, /* Program too big */
        LIBBPF_ERRNO__KVER,     /* Incorrect kernel version */
+       LIBBPF_ERRNO__PROGTYPE, /* Kernel doesn't support this program type */
        __LIBBPF_ERRNO__END,
 };
 
@@ -164,6 +165,15 @@ int bpf_program__set_prep(struct bpf_program *prog, int nr_instance,
 
 int bpf_program__nth_fd(struct bpf_program *prog, int n);
 
+/*
+ * Adjust type of bpf program. Default is kprobe.
+ */
+int bpf_program__set_tracepoint(struct bpf_program *prog);
+int bpf_program__set_kprobe(struct bpf_program *prog);
+
+bool bpf_program__is_tracepoint(struct bpf_program *prog);
+bool bpf_program__is_kprobe(struct bpf_program *prog);
+
 /*
  * We don't need __attribute__((packed)) now since it is
  * unnecessary for 'bpf_map_def' because they are all aligned.
This page took 0.025832 seconds and 5 git commands to generate.