Building the network stack, layer by layer
I built each layer in Rust, from reading Ethernet frames and answering ARP requests to validating IPv4 and ICMP packets. UDP checks each datagram before routing it by port. TCP keeps state for every connection, completes the handshake, tracks which bytes were sent and acknowledged, respects the receiver's available window, retries lost data with backoff, handles duplicates and resets, and closes connections cleanly.