Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 972 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 972 Bytes

GoDoc

This repository provides go bindings for the bcc framework as well as low-level routines to load and use eBPF programs from .elf files.

gobpf is in early stage, but usable. Input and contributions are very much welcome.

To get started, first install (either by package or source) libbcc. Then, simply:

go install github.com/iovisor/gobpf
sudo -E go test github.com/iovisor/gobpf

Example code can be found in the examples/ directory.

We recommend to vendor gobpf and pin its version as the API probably undergoes change during development.

Building ELF object files

To build ELF object files for usage with github.com/iovisor/gobpf/elf, you must use distinct sections (SEC("...")). Currently, only kprobe/..., maps/..., cgroup/skb and cgroup/sock are supported. For an example, see tests/dummy.c.