From 9c5185314782d64bd9ae10f49655f21b606545a2 Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Wed, 1 Apr 2026 12:52:07 +0700 Subject: [PATCH] refactor: update imports to use icmp-socket2 --- src/pinger.rs | 6 +++--- src/pinger_icmp.rs | 6 +++--- src/pinger_icmp_ts.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pinger.rs b/src/pinger.rs index ae6b81a..041e4b6 100644 --- a/src/pinger.rs +++ b/src/pinger.rs @@ -1,6 +1,6 @@ use crate::MeasurementType; -use icmp_socket::socket::IcmpSocket; -use icmp_socket::{IcmpSocket4, Icmpv4Packet}; +use icmp_socket2::socket::IcmpSocket; +use icmp_socket2::{IcmpSocket4, Icmpv4Packet}; use crate::util::RwLockExt; use log::{debug, warn}; use std::net::{IpAddr, Ipv4Addr}; @@ -135,5 +135,5 @@ pub trait PingSender { } } - fn craft_packet(&self, id: u16, seq: u16) -> icmp_socket::packet::Icmpv4Packet; + fn craft_packet(&self, id: u16, seq: u16) -> icmp_socket2::packet::Icmpv4Packet; } diff --git a/src/pinger_icmp.rs b/src/pinger_icmp.rs index 9e9c201..7b9dfad 100644 --- a/src/pinger_icmp.rs +++ b/src/pinger_icmp.rs @@ -3,9 +3,9 @@ use std::time::Instant; use crate::pinger::{PingError, PingListener, PingReply, PingSender}; use crate::time::Time; -use icmp_socket::Icmpv4Message; -use icmp_socket::Icmpv4Packet; -use icmp_socket::packet::WithEchoRequest; +use icmp_socket2::Icmpv4Message; +use icmp_socket2::Icmpv4Packet; +use icmp_socket2::packet::WithEchoRequest; use rustix::thread::ClockId; pub struct PingerICMPEchoListener {} diff --git a/src/pinger_icmp_ts.rs b/src/pinger_icmp_ts.rs index 2675678..3f91ab4 100644 --- a/src/pinger_icmp_ts.rs +++ b/src/pinger_icmp_ts.rs @@ -1,8 +1,8 @@ use crate::pinger::{PingError, PingListener, PingReply, PingSender}; use crate::time::Time; -use icmp_socket::packet::WithTimestampRequest; -use icmp_socket::Icmpv4Message; -use icmp_socket::Icmpv4Packet; +use icmp_socket2::packet::WithTimestampRequest; +use icmp_socket2::Icmpv4Message; +use icmp_socket2::Icmpv4Packet; use rustix::thread::ClockId; use std::net::IpAddr; use std::time::Instant;