{"id":13643652,"url":"https://github.com/badboy/ebpf-icmp-ping","last_synced_at":"2025-08-30T18:30:52.883Z","repository":{"id":66451678,"uuid":"83904128","full_name":"badboy/ebpf-icmp-ping","owner":"badboy","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-16T11:40:23.000Z","size":5,"stargazers_count":55,"open_issues_count":1,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-24T02:01:15.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fnordig.de/2017/03/04/send-icmp-echo-replies-using-ebpf/","language":"C","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/badboy.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}},"created_at":"2017-03-04T15:40:42.000Z","updated_at":"2024-09-24T08:11:13.000Z","dependencies_parsed_at":"2023-02-22T08:15:08.206Z","dependency_job_id":null,"html_url":"https://github.com/badboy/ebpf-icmp-ping","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Febpf-icmp-ping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Febpf-icmp-ping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Febpf-icmp-ping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Febpf-icmp-ping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badboy","download_url":"https://codeload.github.com/badboy/ebpf-icmp-ping/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231515009,"owners_count":18388404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-02T01:01:50.793Z","updated_at":"2024-12-27T16:42:47.423Z","avatar_url":"https://github.com/badboy.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Send ICMP Echo Replies using eBPF\n\nThe code parses the passed network packet into its Ethernet, IP and ICMP header,\nswaps addresses (MAC and IP addresses), changes the ICMP type to `ICMP Echo Reply`,\nre-calculates the ICMP checksum and sends the modified packet back out over the same interface.\n\n## Requirements\n\n* A recent kernel. Tested with 4.8 and 4.9\n* `iproute2 v4.9`. v4.10 has a bug makig it unusable.\n  If your system does not provide it,\n  compile it from [git](https://wiki.linuxfoundation.org/networking/iproute2).\n  Installation is not needed, the `tc` binary is enough.\n* Clang `\u003e= 3.8`. eBPF backend required.\n\nCode was tested on Ubuntu 16.10 with self-compiled iproute2 v4.9 and clang 4.0.\n\n\n## Run\n\nFirst create a qdisc, then attach the classification and action, and at last show logging information:\n\n```\nmake bpf.o\nmake qdisc\nmake run\nmake show exec\n```\n\nDelete filters and qdiscs afterwards:\n\n```\nmake delete\nmake qdisc-delete\n```\n\n## The code\n\nThe code in [`bpf.c`](bpf.c) is commented to explain each step.\n\n## Resources\n\n* [ebpf-trekking](https://github.com/muhammadzaheer/ebpf-trekking/blob/master/treks/ping_reply/ping_reply.py), an implementation using [bcc](https://github.com/iovisor/bcc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Febpf-icmp-ping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadboy%2Febpf-icmp-ping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Febpf-icmp-ping/lists"}