Skip to content

Libbpf

Libbpf is the reference library for eBPF development. It is developed and maintained as part of the kernel tree often in lockstep with the kernel itself. Since including the whole kernel tree in a project is not practical, a mirror of just the libbpf library is maintained at https://github.com/libbpf/libbpf.

Libbpf has both userspace components and eBPF components. The eBPF components are mostly pre-processor statements, forward declarations and type definitions that make it easier to write eBPF programs. The userspace components is a library that for loading eBPF programs and interacting with the loaded resources.

  • Userspace


    The userspace loader library for eBPF programs

    Userspace

  • eBPF side


    The eBPF side library for ease of writing eBPF programs

    eBPF side

  • Concepts


    Libbpf concepts that involve both userspace and eBPF side

    Concepts