Cross-Platform ICMP Architecture Overhaul
This release brings a major structural overhaul to how we handle ICMP probes across different operating systems.
Previously, CoreEngine was tightly coupled with socket2 and managed the specifics of both Unix and Windows socket behaviors internally. This led to unnecessary complexity, especially regarding checksum handling.
We’ve now decoupled the OS-specific implementations using the Strategy Pattern and conditional compilation (#[cfg]). CoreEngine is now completely isolated from the underlying socket logic and interacts solely with a new IcmpProvider trait.
What's Changed
- Unix/macOS (DGRAM Sockets): We now rely on the OS to handle checksum calculations natively, removing manual byte manipulation and ensuring better compatibility with unprivileged execution.
- Windows (RAW Sockets): Windows maintains its requirement for manual checksum calculation prior to sending, but this logic is now cleanly isolated in its own module.
- Zero-Cost Abstraction: The
DefaultIcmpProviderresolves at compile-time, meaning these architectural improvements introduce zero runtime overhead. - Cleaner Core:
CoreEnginehas been stripped of directsocket2dependencies, making the main measurement loop significantly easier to read and maintain.
Note: There are no changes to the NetworkMetrics struct or the UI channel logic. Existing error states and behaviors remain consistent.