-
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... -
Designing and implementing a safer API on top of LoadLibrary
Making our own ping: Part 4
It’s refactor time!
Our complete program is now about a hundred lines, counting blank lines (see the end of part 3 for a complete listing).
While this is pretty good for...
-
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....
-
Binding C APIs with variable-length structs and UTF-16
Making our own ping: Part 8
Okay, I lied.
I’m deciding - right this instant - that using wmic is cheating too. Oh, it was fair game when we were learning about Windows, but we’re past that now....