Skip to content

Libbpf userspace function bpf_program__attach_tracepoint

0.0.4

Attach a BPF_PROG_TYPE_TRACEPOINT program.

Definition

struct bpf_link * bpf_program__attach_tracepoint(const struct bpf_program *prog, const char *tp_category, const char *tp_name);

Parameters

  • prog: BPF program to attach
  • tp_category: Tracepoint category
  • tp_name: Tracepoint name

Return

Reference to the newly created BPF link; or NULL is returned on error, error code is stored in errno

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome