{"id":31802758,"url":"https://github.com/raniamidaoui/ebpf-pingkiller","last_synced_at":"2026-05-18T03:08:40.867Z","repository":{"id":190978946,"uuid":"683694127","full_name":"RaniaMidaoui/ebpf-pingkiller","owner":"RaniaMidaoui","description":"A simple eBPF program that drops ICMP packets.","archived":false,"fork":false,"pushed_at":"2023-08-27T13:00:32.000Z","size":2232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T00:56:19.414Z","etag":null,"topics":["cilium","ebpf","kernel","network","xdp"],"latest_commit_sha":null,"homepage":"https://admida0ui.tech/2023/08/11/ebpf/?fbclid=IwAR01AaWknOqWn-L8z-ji1PT05zQLs7g76hxEWUxM1-MTrIWcTnXnkPNup90","language":"LLVM","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RaniaMidaoui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-27T12:08:07.000Z","updated_at":"2023-08-27T12:48:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"bab75c7c-d0fd-4943-b497-6133e9c3c785","html_url":"https://github.com/RaniaMidaoui/ebpf-pingkiller","commit_stats":null,"previous_names":["raniamidaoui/ebpf-pingkiller"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RaniaMidaoui/ebpf-pingkiller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaniaMidaoui%2Febpf-pingkiller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaniaMidaoui%2Febpf-pingkiller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaniaMidaoui%2Febpf-pingkiller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaniaMidaoui%2Febpf-pingkiller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaniaMidaoui","download_url":"https://codeload.github.com/RaniaMidaoui/ebpf-pingkiller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaniaMidaoui%2Febpf-pingkiller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cilium","ebpf","kernel","network","xdp"],"created_at":"2025-10-11T00:55:25.275Z","updated_at":"2026-05-18T03:08:40.861Z","avatar_url":"https://github.com/RaniaMidaoui.png","language":"LLVM","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\nsimple eBPF program that drops ICMP packets. It is written in C and uses the eBPF library and XDP to load the program into the kernel then outputs stats in the userspace program based on cilium-ebpf.\n\n### Some details:\n\nXDP allows for early packet interception at the network interface driver level.\n\nThe XDP eBPF program, implemented in C, hooks into the Linux kernel’s networking stack at an early stage to intercept packets and decide their fate.\n\nThe accompanying Golang application interacts with the XDP eBPF program, providing a user-friendly interface to monitor the packet drop behavior and visualize performance statistics.\n\n######Read more details at the [admida0ui blog](https://admida0ui.tech/2023/08/11/ebpf/?fbclid=IwAR01AaWknOqWn-L8z-ji1PT05zQLs7g76hxEWUxM1-MTrIWcTnXnkPNup90).\n\n### Prerequisites:\nClang and LLVM:\n```\nsudo apt update\nsudo apt install clang llvm\n```\n\nbpftool:\n```\ngit clone --recurse-submodules https://github.com/libbpf/bpftool.git\ncd src\nmake\nsudo make install\n```\nGolang:\n```\nsudo apt install golang\n```\n\n### How to run:\n\nCompile the XDP program using the following command:\n\n```bash\nclang -S \\\n    -g \\\n    -target bpf \\\n    -I../../libbpf/src\\\n    -Wall \\\n    -Werror \\\n    -O2 -emit-llvm -c -o dicmp_kern.ll dicmp_kern.c\n```\n\nWhich will generate the LLVM IR file dicmp_kern.ll, then use the llc tool to compile the LLVM IR file to BPF bytecode, as follows:\n```\nllc -march=bpf -filetype=obj -O2 -o dicmp_kern.o dicmp_kern.ll\n```\n\nRun the userspace program:\n```\ngo mod init dicmp\ngo mod tidy\nCGO_ENABLED=0 go build . \nsudo ./dicmp\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franiamidaoui%2Febpf-pingkiller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franiamidaoui%2Febpf-pingkiller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franiamidaoui%2Febpf-pingkiller/lists"}