Making our own ping
When I launched my Patreon, I vowed to explain how computers work. But in 2019, computers rarely work in isolation. So let's take the time to write a few articles about how computers talk to each other.
- A short (and mostly wrong) history of computer networking
- Windows dynamic libraries, calling conventions, and transmute
- FFI-safe types in Rust, newtypes and MaybeUninit
- Designing and implementing a safer API on top of LoadLibrary
- A simple ping library, parsing strings into IPv4 address
- The builder pattern, and a macro that keeps FFI code DRY
- Finding the default network interface through WMI
- Binding C APIs with variable-length structs and UTF-16
- Consuming Ethernet frames with the nom crate
- Improving error handling - panics vs. proper errors
- Parsing IPv4 packets, including numbers smaller than bytes
- Parsing and serializing ICMP packets with cookie-factory.
- Crafting ARP packets to find a remote host's MAC address
- Crafting ICMP-bearing IPv4 packets with the help of bitvec
This series is complete.