GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - netbound/p2pflow: Ethereum p2p traffic analysis with eBPF

BranchesTags
Open more actions menu

Latest commit

 

History

54 Commits
54 Commits

Folders and files

NameName
Last commit message
Last commit date
libbpf @ 5b4dbd8
libbpf @ 5b4dbd8
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
build.rs
build.rs
 
 
demo.gif
demo.gif
 
 

Repository files navigation

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.

About

Ethereum p2p traffic analysis with eBPF

Topics

blockchainbpfcdevp2pebpfethereumlibbpflinuxnetworkingp2prust

Resources

Readme
MIT license
Activity
Custom properties

Stars

56 stars

Watchers

3 watching

Forks

10 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.