All Projects → netbound → p2pflow

netbound / p2pflow

Licence: MIT license
Ethereum p2p traffic analysis with eBPF

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to p2pflow

portablebpf
You came here so you could have a base code to serve you as an example on how to develop a BPF application, compatible to BCC and/or LIBBPF, specially LIBBPF, having the userland part made in C or PYTHON.
Stars: ✭ 32 (+33.33%)
Mutual labels:  ebpf, bpf, libbpf
Kubectl Trace
Schedule bpftrace programs on your kubernetes cluster using the kubectl
Stars: ✭ 1,194 (+4875%)
Mutual labels:  ebpf, bpf
Awesome Ebpf
A curated list of awesome projects related to eBPF.
Stars: ✭ 1,102 (+4491.67%)
Mutual labels:  ebpf, bpf
ebpfpub
ebpfpub is a generic function tracing library for Linux that supports tracepoints, kprobes and uprobes.
Stars: ✭ 86 (+258.33%)
Mutual labels:  ebpf, bpf
ebpf
eBPF package for Go
Stars: ✭ 25 (+4.17%)
Mutual labels:  ebpf, bpf
Ebpf exporter
Prometheus exporter for custom eBPF metrics
Stars: ✭ 829 (+3354.17%)
Mutual labels:  ebpf, bpf
Tcpdog
eBPF based TCP observability.
Stars: ✭ 119 (+395.83%)
Mutual labels:  ebpf, bpf
Bpftrace
High-level tracing language for Linux eBPF
Stars: ✭ 4,526 (+18758.33%)
Mutual labels:  ebpf, bpf
Polycube
eBPF/XDP-based software framework for fast network services running in the Linux kernel.
Stars: ✭ 217 (+804.17%)
Mutual labels:  ebpf, bpf
libbpf-sys
Rust bindings to libbpf from the Linux kernel
Stars: ✭ 103 (+329.17%)
Mutual labels:  ebpf, bpf
KubeArmor
Cloud-native Runtime Security Enforcement System
Stars: ✭ 434 (+1708.33%)
Mutual labels:  ebpf, bpf
Tracee
Linux Runtime Security and Forensics using eBPF
Stars: ✭ 788 (+3183.33%)
Mutual labels:  ebpf, bpf
Goebpf
Library to work with eBPF programs from Go
Stars: ✭ 666 (+2675%)
Mutual labels:  ebpf, bpf
Cilium
eBPF-based Networking, Security, and Observability
Stars: ✭ 10,256 (+42633.33%)
Mutual labels:  ebpf, bpf
Bpfd
Framework for running BPF programs with rules on Linux as a daemon. Container aware.
Stars: ✭ 396 (+1550%)
Mutual labels:  ebpf, bpf
Libbpf Rs
Minimal and opinionated eBPF tooling for the Rust ecosystem
Stars: ✭ 116 (+383.33%)
Mutual labels:  ebpf, bpf
el7-bpf-specs
RPM specs for building bpf related tools on CentOS 7
Stars: ✭ 38 (+58.33%)
Mutual labels:  ebpf, bpf
Rbpf
Rust virtual machine and JIT compiler for eBPF programs
Stars: ✭ 306 (+1175%)
Mutual labels:  ebpf, bpf
Xdp Project
XDP project collaboration through a git-repo
Stars: ✭ 127 (+429.17%)
Mutual labels:  ebpf, bpf
parca-agent
eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
Stars: ✭ 250 (+941.67%)
Mutual labels:  ebpf, libbpf

p2pflow

An eBPF application to monitor Ethereum p2p network traffic.

Demo GIF

Requirements

sudo apt-get install pkg-config clang llvm libelf-dev libpcap-dev gcc-multilib build-essential linux-tools-$(uname -r)
  • Rust

Install here. Uses the cargo-bpf package to build and load the BPF program into the kernel.

  • Up-to-date Linux kernel

The project is built on technology like CO-RE and BTF, which is only available in more recent kernels (5.0-ish). Ubuntu 21.04 has configured and packaged all the required dependencies.

  • vmlinux.h

vmlinux.h contains all the kernel definitions on your current machine, which we need in the BPF programs. You can generate it with bpftool (part of linux-tools):

bpftool btf dump file /sys/kernel/btf/vmlinux format c > src/bpf/vmlinux.h

Or run make vmlinux.

You can verify whether your kernel was built with BTF (BPF Type Format) enabled:

cat /boot/config-$(uname -r) | grep CONFIG_DEBUG_INFO_BTF

Install & Build

libbpf is included as a submodule so that we don't have to rely on the system libbpf, which can be out of date.

git clone --recurse-submodules -j8 https://github.com/netbound/p2pflow
cd p2pflow
cargo build --release

Run

Running requires root privileges for loading the BPF program into the kernel and attaching it to the proper hooks.

sudo ./target/release/p2pflow --process geth

Or

make install

This will install the binary in $HOME/.cargo/bin, and adds the cap_sys_admin capability to let it run without sudo.

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].