An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/newtools/ebpf

Package ebpf is a toolkit for working with eBPF programs. eBPF programs are small snippets of code which are executed directly in a VM in the Linux kernel, which makes them very fast and flexible. Many Linux subsystems now accept eBPF programs. This makes it possible to implement highly application specific logic inside the kernel, without having to modify the actual kernel itself. Since eBPF is a relatively young concept, documentation and user space support is still lacking. Most of the available tools are written in C, and reside in the kernel's source tree. The more mature external projects like libbcc focus on using eBPF for instrumentation and debugging. This leads to certain trade-offs which are not acceptable when writing production services. This package is instead designed for long-running processes which want to use eBPF to implement part of their application logic. It has no run-time dependencies outside of the library and the Linux kernel itself. eBPF code should be compiled ahead of time using clang, and shipped with your application as any other resource. The two main parts are an ELF loader, which reads object files emitted by clang, and facilities to modify and load eBPF programs into the kernel. This package doesn't include code required to attach eBPF to Linux subsystems, since this varies per subsystem. See the examples for possible solutions. ExampleExtractDistance shows how to attach an eBPF socket filter to extract the network distance of an IP host. ExampleSocketELF demonstrates how to load an eBPF program from an ELF, pin it into the filesystem and attach it to a raw socket.

Ecosystem
proxy.golang.org
Latest Release
v0.1.0
over 6 years ago
Versions
1
Dependent Packages
24
Dependent Repos
7
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/newtools/ebpf
spec
License MIT
Namespace github.com/newtools
First Release over 6 years ago
Last Synced 23 days ago
Repository
Stars 251 on GitHub
Forks 21 on GitHub
Rankings on proxy.golang.org
Overall Top 2.7%
Dependent packages Top 1.0%
Dependent repos Top 2.0%
Forks Top 4.6%