-
Windows dynamic libraries, calling conventions, and transmute
Making our own ping: Part 2
So, how does
ping.exe
actually send a ping? It seems unrealistic thatping.exe
itself implements all the protocols involved in sending a ping. So it must be calling some sort of... -
FFI-safe types in Rust, newtypes and MaybeUninit
Making our own ping: Part 3
It’s time to make
sup
, our own take onping
, use the Win32 APIs to send an ICMP echo. Earlier we discovered that Windows’sping.exe
usedIcmpSendEcho2Ex
. But for our... -
A simple ping library, parsing strings into IPv4 address
Making our own ping: Part 5
We’ve just spent a lot of time abstracting over LoadLibrary, but we still have all the gory details of the Win32 ICMP API straight in our main.rs file! That won’t do....
-
The builder pattern, and a macro that keeps FFI code DRY
Making our own ping: Part 6
Our ping API is simple, but it’s also very limited:
pub fn ping(dest: ipv4::Addr) -> Result<(), String> // called as: ping(ipv4::Addr([8, 8, 8, 8])).unwrap();...
-
Finding the default network interface through WMI
Making our own ping: Part 7
Let’s set aside our
sup
project for a while.Don’t get me wrong - it’s a perfectly fine project, and, were we simply rewriting “ping” for Windows...
-
Parsing IPv4 packets, including numbers smaller than bytes
Making our own ping: Part 11
Hello and welcome to Part 11 of this series, wherein we finally use some of the code I prototyped way back when I was planning this series.
Where are we standing?
Let’s...