All Projects → libbpf → libbpf-sys

libbpf / libbpf-sys

Licence: BSD-2-Clause license
Rust bindings to libbpf from the Linux kernel

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to libbpf-sys

oxdpus
A toy tool that leverages the super powers of XDP to bring in-kernel IP filtering
Stars: ✭ 59 (-42.72%)
Mutual labels:  ebpf, xdp, bpf
packiffer
lightweight cross-platform networking toolkit
Stars: ✭ 52 (-49.51%)
Mutual labels:  ebpf, xdp, bpf
Cilium
eBPF-based Networking, Security, and Observability
Stars: ✭ 10,256 (+9857.28%)
Mutual labels:  ebpf, xdp, bpf
XDP-Firewall
An XDP firewall that is capable of filtering specific packets based off of filtering rules specified in a config file. IPv6 is supported!
Stars: ✭ 129 (+25.24%)
Mutual labels:  ebpf, xdp, bpf
Libbpf Rs
Minimal and opinionated eBPF tooling for the Rust ecosystem
Stars: ✭ 116 (+12.62%)
Mutual labels:  ebpf, bpf
Tcpdog
eBPF based TCP observability.
Stars: ✭ 119 (+15.53%)
Mutual labels:  ebpf, bpf
Polycube
eBPF/XDP-based software framework for fast network services running in the Linux kernel.
Stars: ✭ 217 (+110.68%)
Mutual labels:  ebpf, bpf
Kubectl Trace
Schedule bpftrace programs on your kubernetes cluster using the kubectl
Stars: ✭ 1,194 (+1059.22%)
Mutual labels:  ebpf, bpf
libebpf
Experiemental userspace eBPF library
Stars: ✭ 14 (-86.41%)
Mutual labels:  ebpf, bpf
Rbpf
Rust virtual machine and JIT compiler for eBPF programs
Stars: ✭ 306 (+197.09%)
Mutual labels:  ebpf, bpf
Goebpf
Library to work with eBPF programs from Go
Stars: ✭ 666 (+546.6%)
Mutual labels:  ebpf, bpf
Xdp Project
XDP project collaboration through a git-repo
Stars: ✭ 127 (+23.3%)
Mutual labels:  ebpf, bpf
pwru
Packet, where are you? -- Linux kernel networking debugger
Stars: ✭ 694 (+573.79%)
Mutual labels:  ebpf, bpf
bpflock
bpflock - eBPF driven security for locking and auditing Linux machines
Stars: ✭ 54 (-47.57%)
Mutual labels:  ebpf, bpf
Bpfd
Framework for running BPF programs with rules on Linux as a daemon. Container aware.
Stars: ✭ 396 (+284.47%)
Mutual labels:  ebpf, bpf
Tracee
Linux Runtime Security and Forensics using eBPF
Stars: ✭ 788 (+665.05%)
Mutual labels:  ebpf, bpf
el7-bpf-specs
RPM specs for building bpf related tools on CentOS 7
Stars: ✭ 38 (-63.11%)
Mutual labels:  ebpf, bpf
aya
Aya is an eBPF library for the Rust programming language, built with a focus on developer experience and operability.
Stars: ✭ 950 (+822.33%)
Mutual labels:  ebpf, bpf
Bpftrace
High-level tracing language for Linux eBPF
Stars: ✭ 4,526 (+4294.17%)
Mutual labels:  ebpf, bpf
Ebpf exporter
Prometheus exporter for custom eBPF metrics
Stars: ✭ 829 (+704.85%)
Mutual labels:  ebpf, bpf

libbpf-sys Build status crates.io version number badge

Rust bindings to libbpf from the Linux kernel

Maintainer: Alex Forster <[email protected]>
License: BSD-2-Clause

libbpf-sys is the packaged result of using bindgen to automatically generate Rust FFI bindings to libbpf from the Linux kernel.

Warning: this crate does not provide a high-level or "safe" API wrapper around libbpf. If you are looking for an easier way to use libbpf, check out these other crates that implement higher-level APIs using libbpf-sys...

The community is encouraged to build higher-level crates using libbpf-sys. Please let me know if you do!

Building

As part of the cargo build process, an included copy of libbpf is compiled and statically linked into the resulting binary. This means that, in order to build a project that depends on this crate, your system must provide a working C compiler toolchain (GCC and Clang should both work). Additionally, your system must provide development headers for zlib and libelf, and they must be discoverable via pkgconfig.

Building on a fresh Debian/Ubuntu installation:

$ apt-get install git rustc cargo build-essential pkgconf zlib1g-dev libelf-dev
$ git clone --recurse-submodules https://github.com/libbpf/libbpf-sys.git && cd libbpf-sys
$ cargo build

Building on a fresh RHEL/Fedora installation:

$ yum install git rust cargo gcc make pkgconf zlib-devel elfutils-libelf-devel
$ git clone --recurse-submodules https://github.com/libbpf/libbpf-sys.git && cd libbpf-sys
$ cargo build

Distribution

When you add this crate as a dependency to your project, your resulting binaries will dynamically link with libz and libelf. This means that the systems where you run your binaries must have these libraries installed.

Versioning

Because the API of this crate is automatically generated from libbpf sources, it uses a versioning scheme based on the version of libbpf that it provides.

The "Major.Minor" semver numbers correspond exactly to the libbpf version that each release provides. For example, the 0.6.x releases of this crate provides the API for the libbpf v0.6.x releases.

In order to allow for human error, the "Patch" semver number is used by this crate and does not necessarily match the provided libbpf version. For example, both the 0.6.1 and 0.6.2 releases of this crate contain bindings to libbpf v0.6.1, but the later release contains bugfixes and/or enhancements to the crate itself.

The exact version of libbpf that is provided by any given release can be found in the "Build Metadata" semver section, which comes after the + in the version string. For example, 0.6.2+v0.6.1 indicates that the crate version is 0.6.2 and the upstream libbpf version is v0.6.1.

Licensing and Dependencies

This crate is released under the BSD 2-Clause license, and is careful to avoid infecting users with viral licenses.

It currently depends on the following third-party libraries:

Website License Linkage
libbpf github.com/libbpf/libbpf LGPL-2.1-only OR BSD-2-Clause Static
libelf sourceware.org/elfutils LGPL-2.1-or-later OR LGPL-3.0-or-later Dynamic
zlib zlib.net Zlib Dynamic
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].