Skip to content

donaldh/bpf-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bpf-playground

Prerequisites

dnf install -y libbpf bpftool

Programs

  • packetstat - an example XDP program
  • skb-drops - monitor SKB drop reasons
  • tccounter - an example tc program

Usage

skb-drops

$ ./skb-drops --help

Usage: skb-drops [OPTION...]
BPF program to count SKB drop reasons.

Trace SKB drops and display a summary count of drop reasons.

USAGE: ./skb-drops [-v]

  -i, --interval=seconds     Interval between reports
  -v, --verbose              Verbose debug output
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to <[email protected]>.

tccounter

$ ./tccounter --help

Usage: tccounter [OPTION...]
BPF tccounter demo application.

Trace packets at the tc hook and report packet statistics.

USAGE: ./tccounter [-v]

  -d, --device=ifname        Attach to device
  -i, --interval=seconds     Interval between reports
  -v, --verbose              Verbose debug output
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to <[email protected]>.

Running tccounter

$ make
$ sudo ./tcounter -d eth0

dns-trace

podman build -t dns -f container/Containerfile.dns .
podman run --privileged --mount type=bind,source=/sys/kernel/debug,target=/sys/kernel/debug -ti localhost/dns ./dns-trace

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages