{"id":17913247,"url":"https://github.com/florianl/tc-skeleton","last_synced_at":"2025-03-23T22:35:35.307Z","repository":{"id":57565915,"uuid":"319432956","full_name":"florianl/tc-skeleton","owner":"florianl","description":"Simple project to demonstrate the loading of eBPF programs via florianl/go-tc.","archived":false,"fork":false,"pushed_at":"2024-04-06T07:29:19.000Z","size":20,"stargazers_count":33,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-06-20T08:09:13.880Z","etag":null,"topics":["ebpf","kernel","linux","network-programming"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/florianl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-12-07T20:12:52.000Z","updated_at":"2024-01-16T20:30:44.000Z","dependencies_parsed_at":"2024-06-20T07:04:53.770Z","dependency_job_id":"7fe86371-d7db-4c40-bdec-d3f0414f97e6","html_url":"https://github.com/florianl/tc-skeleton","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/florianl%2Ftc-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianl%2Ftc-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianl%2Ftc-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianl%2Ftc-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florianl","download_url":"https://codeload.github.com/florianl/tc-skeleton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221923727,"owners_count":16902573,"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":["ebpf","kernel","linux","network-programming"],"created_at":"2024-10-28T19:50:36.895Z","updated_at":"2025-03-23T22:35:35.264Z","avatar_url":"https://github.com/florianl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"tc-skeleton\n===========\n\nSimple project to demonstrate the loading of eBPF programs via [florianl/go-tc](https://github.com/florianl/go-tc).\n\n```\n  $ cd ebpf\n  $ make clean\n  $ make drop\n  $ cd ..\n  $ go run -exec=sudo main.go\n```\n\nOverview\n--------\nAfter the eBPF code is loaded from `ebpf/drop` the eBPF program `ingress_drop` is loaded into the kernel. In a next step this PoC creates a dummy interface. So it does not alter existing configurations or network interfaces. Then a [qdisc and filter](https://man7.org/linux/man-pages/man8/tc.8.html) are attached via the [netlink interface](https://man7.org/linux/man-pages/man7/netlink.7.html) of the kernel to this dummy interface. The file descriptor of the eBPF program `ingress_drop` is passed as argument of the filter to the kernel. With attaching the filter to the interface the eBPF program `ingress_drop` will run on every packet on the interface.\n\nPrivileges\n----------\nThis PoC uses the [`netlink`](https://man7.org/linux/man-pages/man7/netlink.7.html) and [`eBPF`](https://man7.org/linux/man-pages/man2/bpf.2.html) interface of the kernel and therefore it requires special privileges. You can provide this privileges by adjusting the `CAP_NET_ADMIN` capabilities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianl%2Ftc-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorianl%2Ftc-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianl%2Ftc-skeleton/lists"}