mozillazg / hello-libbpfgo

Examples for libbpf, aquasecurity/libbpfgo and cilium/ebpf
MIT License
123 stars 23 forks source link
ebpf libbpf libbpfgo

hello-libbpfgo

|Build examples|

Examples for libbpf, aquasecurity/libbpfgo <https://github.com/aquasecurity/libbpfgo> and cilium/ebpf <https://github.com/cilium/ebpf>.

setup develop env

.. code-block:: shell

$ vagrant up

Program Types

Examples by program type:

+-------------------------------------------+----------------------------------------+----------------------------------+-----------------------+ | Program Type | Attach Type | ELF Section Name | Examples | +===========================================+========================================+==================================+=======================+ | BPF_PROG_TYPE_CGROUP_DEVICE | BPF_CGROUP_DEVICE | cgroup/dev | | +-------------------------------------------+----------------------------------------+----------------------------------+-----------------------+ | BPF_PROG_TYPE_CGROUP_SKB | | cgroup/skb | |

.. |Build examples| image:: https://github.com/mozillazg/hello-libbpfgo/actions/workflows/build.yml/badge.svg?branch=master :target: https://github.com/mozillazg/hello-libbpfgo/actions/workflows/build.yml

.. _04: 04-tracepoint .. _07: 07-tracepoint-args .. _12: 12-raw-tracepoint-args .. _13: 13-raw-tracepoint-args-sched_switch .. _14: 14-tracepoint-args-sched_switch .. _16: 16-btf-raw-tracepoint-args .. _17: 17-btf-raw-tracepoint-args-sched_switch .. _18: 18-socket-filter-capture-icmp-traffic-kernel-parse .. _19: 19-socket-filter-capture-icmp-traffic-userspace-parse .. _20: 20-socket-filter-capture-icmp-traffic-kernel-parse-without-llvm-load .. _21: 21-tc-parse-packet-with-bpf_skb_load_bytes .. _25: 25-tc-parse-packet-with-direct-memory-access .. _26: 26-lsm-path_chmod .. _28: 28-kprobe-hello .. _29: 29-kprobe-hello-with-macro .. _30: 30-ksyscall-hello .. _31: 31-ksyscall-hello-with-macro .. _32: 32-fentry-hello .. _33: 33-xdp-hello .. _34: 34-iter-task-hello .. _35: 35-tracepoint-args-use-custom-struct .. _36: 36-tracepoint-args-sched_switch-use-custom-struct .. _37: 37-tracepoint-sched_process_exec .. _38: 38-raw-tracepoint-sched_wakeup

https://mozillazg.com/tag/libbpf.html