Claude Code was prompted to act as a userspace IPv4/ICMP stack via a TUN device, computing checksums manually and responding to pings – RTT was ~42 seconds.
Key Takeaways
The prompt (ping-respond.md) instructs Claude to read raw hex packets from /dev/tun0, parse IPv4 and ICMP headers byte by byte, and compute IP and ICMP checksums without any libraries or scripts.
Claude (Haiku 3.5) correctly swapped src/dst IPs, set TTL=64, recomputed one’s complement checksums, and wrote a valid ICMP echo reply back through the TUN helper.
Round-trip time was 42,593 ms – functional but orders of magnitude slower than any real network stack.
A thin Python helper (tun_helper.py) handles TUN device I/O via FIFOs; all packet logic runs inside Claude’s reasoning trace.
The experiment is by Adam Dunkels, author of the lwIP and uIP embedded TCP/IP stacks, lending real networking credibility to the stunt.