{"id":31274063,"url":"https://github.com/0xa1m/ping-rs","last_synced_at":"2026-05-18T09:08:05.955Z","repository":{"id":315642443,"uuid":"1060334761","full_name":"0xA1M/ping-rs","owner":"0xA1M","description":"A Rust recreation of the Linux ping utility.","archived":false,"fork":false,"pushed_at":"2025-09-19T18:43:52.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T21:26:53.238Z","etag":null,"topics":["icmp","icmpv6","linux","network-programming","ping","rust","unix"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/0xA1M.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T18:30:58.000Z","updated_at":"2025-09-19T18:46:33.000Z","dependencies_parsed_at":"2025-09-19T21:26:55.231Z","dependency_job_id":"467ec8d4-fa8a-418e-9dd6-f5b4b7850ccf","html_url":"https://github.com/0xA1M/ping-rs","commit_stats":null,"previous_names":["0xa1m/ping-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/0xA1M/ping-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xA1M%2Fping-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xA1M%2Fping-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xA1M%2Fping-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xA1M%2Fping-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xA1M","download_url":"https://codeload.github.com/0xA1M/ping-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xA1M%2Fping-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276661363,"owners_count":25682020,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"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":["icmp","icmpv6","linux","network-programming","ping","rust","unix"],"created_at":"2025-09-23T22:31:13.549Z","updated_at":"2025-09-23T22:32:25.658Z","avatar_url":"https://github.com/0xA1M.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ping-rs\n\n`ping-rs` is a Rust implementation of the classic **`ping` utility** found on Linux.\nThe goal is to **faithfully recreate everything the GNU/Linux `ping` tool can do** — from sending ICMP Echo requests to providing detailed network statistics.\n\nThis project focuses on **performance, correctness, and learning**, exploring raw sockets, networking internals, and safe abstractions in Rust.\n\n---\n\n## Features (current \u0026 planned)\n\n* [x] Send ICMP Echo requests (IPv4)\n* [x] Receive and parse ICMP Echo replies\n* [ ] Measure round-trip time (RTT)\n* [ ] IPv6 support\n* [ ] TTL and packet size configuration (`-t`, `-s`)\n* [ ] Interval and timeout options (`-i`, `-W`)\n* [ ] Packet loss, jitter, and summary statistics\n* [ ] Verbose/debug output (`-v`)\n* [ ] Flood ping (`-f`)\n* [ ] Deadline and count limits (`-w`, `-c`)\n* [ ] Source address binding (`-I`)\n* [ ] Record route / timestamp options (if supported by OS)\n* [ ] Full compatibility with GNU/Linux `ping` flags and output\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n* **Rust** (latest stable recommended)\n* **Linux system** (for raw socket support)\n* **Root privileges** or correct binary capabilities\n\n### Installation\n\nClone the repository and build with Cargo:\n\n```bash\ngit clone https://github.com/0xA1M/ping-rs\ncd ping-rs\ncargo build --release\n```\n\nOptionally, install locally:\n\n```bash\ncargo install --path .\n```\n\n### Running\n\nBy default, `ping-rs` needs root privileges to open raw sockets:\n\n```bash\nsudo ./target/release/ping-rs 8.8.8.8\n```\n\nAlternatively, grant the binary raw socket capability so it can run without `sudo`:\n\n```bash\nsudo setcap cap_net_raw+ep ./target/release/ping-rs\n./target/release/ping-rs 8.8.8.8\n```\n\n---\n\n## Development\n\nRun in debug mode:\n\n```bash\ncargo run -- 127.0.0.1\n```\n\nWith verbose logging:\n\n```bash\nRUST_LOG=debug cargo run -- 1.1.1.1\n```\n\n---\n\n## Dependencies\n\n* [`socket2`](https://crates.io/crates/socket2) → Safe and flexible interface for raw sockets\n* [`clap`](https://crates.io/crates/clap) → Command-line argument parsing (for full GNU/Linux `ping` flag support)\n\n---\n\n## Learning Goals\n\nThis project serves as a hands-on way to:\n\n* Work with **raw sockets** safely in Rust\n* Understand **ICMP and networking internals**\n* Recreate a **well-known Linux utility** from scratch\n* Explore **low-level system programming** with modern abstractions using Rust\n\n---\n\n## References\n\n* [Wikipedia page on `ping`](https://en.wikipedia.org/wiki/Ping_(networking_utility))\n* [Linux `ping` man page](https://man7.org/linux/man-pages/man8/ping.8.html)\n* [RFC 792 - Internet Control Message Protocol](https://datatracker.ietf.org/doc/html/rfc792)\n* [RFC 4443 - ICMPv6](https://datatracker.ietf.org/doc/html/rfc4443)\n* [socket2 crate](https://docs.rs/socket2/latest/socket2/)\n* [clap crate](https://docs.rs/clap/latest/clap/)\n\n---\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xa1m%2Fping-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xa1m%2Fping-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xa1m%2Fping-rs/lists"}