We'll build a fully functional ICMP ping utility from the ground up in Rust. Starting with a bare project scaffold, we progressively add command-line parsing, DNS resolution, raw socket management, and ICMP packet construction using the pnet crate.
Along the way we'll learn how ping actually works at the protocol level — crafting Echo Request packets byte by byte, computing Internet checksums, filtering replies by process ID and sequence number, and measuring round-trip latency with monotonic clocks. By the end, our tool behaves like the real ping command: resolving hostnames, sending repeated requests at configurable intervals, and reporting per-packet timing.