Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

License

NotificationsYou must be signed in to change notification settings

cilium/ebpf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PkgGoDev

HoneyGopher

ebpf-go is a pure Go library that provides utilities for loading, compiling, anddebugging eBPF programs. It has minimal external dependencies and is intended tobe used in long running processes.

Seeebpf.io for complementary projects from the wider eBPFecosystem.

Getting Started

Please take a look at ourGetting Started guide.

Contributions are highly encouraged, as they highlight certain use cases ofeBPF and the library, and help shape the future of the project.

Getting Help

The community actively monitors ourGitHub Discussions page.Please search for existing threads before starting a new one. Refrain fromopening issues on the bug tracker if you're just starting out or if you're notsure if something is a bug in the library code.

Alternatively,join the#ebpf-go channel on Slack if youhave other questions regarding the project. Note that this channel is ephemeraland has its history erased past a certain point, which is less helpful forothers running into the same problem later.

Packages

This library includes the following packages:

  • asm contains a basicassembler, allowing you to write eBPF assembly instructions directlywithin your Go code. (You don't need to use this if you prefer to write your eBPF program in C.)
  • cmd/bpf2go allowscompiling and embedding eBPF programs written in C within Go code. As well ascompiling the C code, it auto-generates Go code for loading and manipulatingthe eBPF program and map objects.
  • link allows attaching eBPFto various hooks
  • perf allows reading from aPERF_EVENT_ARRAY
  • ringbuf allows reading from aBPF_MAP_TYPE_RINGBUF map
  • features implements the equivalentofbpftool feature probe for discovering BPF-related kernel features using native Go.
  • rlimit provides a convenient API to lifttheRLIMIT_MEMLOCK constraint on kernels before 5.11.
  • btf allows reading the BPF Type Format.
  • pin provides APIs for working with pinned objects on bpffs.

Requirements

  • A version of Go that issupported byupstream
  • CI is run against kernel.org LTS releases. >= 4.4 should work but EOL'ed versionsare not supported.

License

MIT

eBPF Gopher

The eBPF honeygopher is based on the Go gopher designed by Renee French.

About

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp