{"id":17964888,"url":"https://github.com/oskardrums/simbpf","last_synced_at":"2025-03-25T06:31:06.497Z","repository":{"id":56255887,"uuid":"311021048","full_name":"oskardrums/simbpf","owner":"oskardrums","description":"A quick and compact Domain Specific Language for packet filtering under Linux with eBPF XDP programs ","archived":false,"fork":false,"pushed_at":"2020-11-18T07:50:04.000Z","size":174,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T09:40:51.642Z","etag":null,"topics":["bpf","compiler","programming-language","xdp"],"latest_commit_sha":null,"homepage":"","language":"C","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/oskardrums.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}},"created_at":"2020-11-08T08:52:45.000Z","updated_at":"2024-04-02T17:10:29.000Z","dependencies_parsed_at":"2022-08-15T15:31:24.512Z","dependency_job_id":null,"html_url":"https://github.com/oskardrums/simbpf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskardrums%2Fsimbpf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskardrums%2Fsimbpf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskardrums%2Fsimbpf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oskardrums%2Fsimbpf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oskardrums","download_url":"https://codeload.github.com/oskardrums/simbpf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245413665,"owners_count":20611351,"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":["bpf","compiler","programming-language","xdp"],"created_at":"2024-10-29T12:09:25.101Z","updated_at":"2025-03-25T06:31:06.190Z","avatar_url":"https://github.com/oskardrums.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simbpf\n## Showcase:\nSource code is quite compact and intuitive:\n```\nuser@host:~/simbpf/src$ cat ../examples/arp_or_udp.sb\nu16@12: =0x0806 -\u003e pass;\n        =0x0800 -\u003e u8@23: =17 -\u003e pass.\n ```\n Generated eBPF code is quite efficient:\n ```\nuser@host:~/simbpf/src$ ./simbpf -c ../examples/arp_or_udp.sb \n30/64\n0:\t0x61, 8, 1, 0, 0\n1:\t0x61, 9, 1, 4, 0\n2:\t0xb7, 0, 0, 0, 1\n3:\t0xbf, 2, 8, 0, 0\n4:\t0x07, 2, 0, 0, 14\n5:\t0x2d, 2, 9, 23, 0\n6:\t0x69, 0, 8, 12, 0\n7:\t0xbf, 7, 0, 0, 0\n8:\t0xb7, 0, 0, 0, 2054\n9:\t0x1d, 7, 0, 4, 0\n10:\t0xb7, 0, 0, 0, 2048\n11:\t0x1d, 7, 0, 4, 0\n12:\t0xb7, 0, 0, 0, 1\n13:\t0x05, 0, 0, 15, 0\n14:\t0xb7, 0, 0, 0, 2\n15:\t0x05, 0, 0, 13, 0\n16:\t0xbf, 2, 8, 0, 0\n17:\t0x07, 2, 0, 0, 24\n18:\t0x2d, 2, 9, 10, 0\n19:\t0x05, 0, 0, 9, 0\n20:\t0x71, 0, 8, 23, 0\n21:\t0xbf, 7, 0, 0, 0\n22:\t0xb7, 0, 0, 0, 17\n23:\t0x1d, 7, 0, 2, 0\n24:\t0xb7, 0, 0, 0, 1\n25:\t0x05, 0, 0, 3, 0\n26:\t0xb7, 0, 0, 0, 2\n27:\t0x05, 0, 0, 1, 0\n28:\t0x05, 0, 0, 0, 0\n29:\t0x95, 0, 0, 0, 0\n```\nCompilation times are quite fast:\n```\nuser@host:~/simbpf/src$ time ./simbpf -c ../examples/arp_or_udp.sb\n30/64\n0:      0x61, 8, 1, 0, 0\n.\n.\n.\n29:     0x95, 0, 0, 0, 0\n\nreal    0m0.004s\nuser    0m0.003s\nsys     0m0.001s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foskardrums%2Fsimbpf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foskardrums%2Fsimbpf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foskardrums%2Fsimbpf/lists"}