Build rootless ping Rust app with UDP

Medium
Unlisted
Hey! I want you to build a Rust application in here, `piiing`, that's a homemade `ping`, but super simple. But here's the challenge: someone said that you can do it with a UDP socket: > Sending a ping by creating an ICMP socket normally requires root: you can’t create a raw socket to send ICMP packets without it. The ping command line tool works without root however, how is that possible? It turns out you can create a UDP socket with a protocol flag, which allows you to send the ping rootless. Please build this.

It works! The trick is using socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) instead of SOCK_RAW. This creates an unprivileged ICMP socket that the kernel handles specially - no root required.