{"id":16576190,"url":"https://github.com/pouriyajamshidi/flat","last_synced_at":"2025-03-21T12:31:47.538Z","repository":{"id":170280861,"uuid":"631659475","full_name":"pouriyajamshidi/flat","owner":"pouriyajamshidi","description":"Measure UDP  and TCP connection latency for IPv4 and IPv6 using eBPF and Go","archived":false,"fork":false,"pushed_at":"2024-10-12T13:32:04.000Z","size":3766,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T01:48:35.184Z","etag":null,"topics":["c","ebpf","go","ipv4","ipv6","latency-monitor","tcp","udp"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pouriyajamshidi.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":"2023-04-23T18:05:21.000Z","updated_at":"2024-10-12T13:32:02.000Z","dependencies_parsed_at":"2023-10-13T05:09:53.084Z","dependency_job_id":"c2e3ef6e-2bc9-4aab-8801-ed37791f0e60","html_url":"https://github.com/pouriyajamshidi/flat","commit_stats":null,"previous_names":["pouriyajamshidi/flat"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Fflat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Fflat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Fflat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Fflat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouriyajamshidi","download_url":"https://codeload.github.com/pouriyajamshidi/flat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815188,"owners_count":16885136,"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":["c","ebpf","go","ipv4","ipv6","latency-monitor","tcp","udp"],"created_at":"2024-10-11T22:07:28.188Z","updated_at":"2025-03-21T12:31:47.530Z","avatar_url":"https://github.com/pouriyajamshidi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flat\n\nMeasure **UDP** and **TCP** flow latency for both **IPv4** and **IPv6** using `eBPF`.\n\nThis repo is the companion to my blog posts about eBPF at \u003chttps://thegraynode.io/tags/flat/\u003e.\n\n![flat in action](.images/flat.gif)\n\n## Running The Program\n\nYou can install **flat** in two ways.\n\n1. Download the [pre-compiled binary](#download-the-pre-compiled-binary)\n2. Compile from [source](#compile-from-source)\n\n### Download The Pre-compiled Binary\n\n```bash\nwget https://github.com/pouriyajamshidi/flat/releases/latest/download/flat\n```\n\nThen check out the [examples](#examples).\n\n### Compile From Source\n\nClone the repository:\n\n```bash\ngit clone https://github.com/pouriyajamshidi/flat .\n```\n\nChange directory to `flat`:\n\n```bash\ncd flat\n```\n\nWhile at the root of project directory, to compile the **C** code and generate the helper functions, run:\n\n```bash\ngo generate ./...\n```\n\nCompile the **Go** program:\n\n```bash\ngo build -ldflags \"-s -w\" -o flat cmd/flat.go\n```\n\n### Examples\n\nRun it with elevated privileges:\n\n```bash\n# Replace eth0 with your desired interface name\nsudo ./flat -i eth0\n# Or\nsudo ./flat -i eth0 -ip 1.1.1.1\n# Or\nsudo ./flat -i eth0 -port 53\n# Or\nsudo ./flat -i eth0 -ip 1.1.1.1 -port 53\n```\n\n## Flags\n\n**flat** supports four flags at the moment:\n\n| flag  | Description                         |\n| ----- | ----------------------------------- |\n| -i    | interface to attach the probe to    |\n| -ip   | IP address to filter on (optional)  |\n| -port | Port number to filter on (optional) |\n| -h    | Show help message                   |\n\n---\n\n## Acknolegments\n\nHeavily inspired by [flowlat](https://github.com/markpash/flowlat).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouriyajamshidi%2Fflat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouriyajamshidi%2Fflat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouriyajamshidi%2Fflat/lists"}