aboutsummaryrefslogtreecommitdiff
path: root/src/pinger.rs
diff options
context:
space:
mode:
authorache <ache@ache.one>2026-08-05 10:42:53 +0200
committerache <ache@ache.one>2026-08-05 10:42:53 +0200
commitafe403f273997dd309af82d5f6df4a765ea29e1b (patch)
tree778630158b364d4ceaa038fbb48d79bfc92410ff /src/pinger.rs
parentFix line ends (diff)
Remove TTL reply
Diffstat (limited to 'src/pinger.rs')
-rw-r--r--src/pinger.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pinger.rs b/src/pinger.rs
index 3570ad1..12cad5d 100644
--- a/src/pinger.rs
+++ b/src/pinger.rs
@@ -5,7 +5,7 @@ use tokio::task;
pub enum PingResult {
NoPingErr { id: u32 },
- Ping { rtt: u64, ttl: u32, id: u32 },
+ Ping { rtt: u64, id: u32 },
}
pub fn spawn_ping(target: IpAddr, tx: Sender<PingResult>, id: u32) {
@@ -26,7 +26,6 @@ fn do_ping(target: IpAddr, id: u32) -> PingResult {
match result {
Ok(reply) => PingResult::Ping {
rtt: reply.rtt.as_millis() as u64,
- ttl: reply.ttl.unwrap_or(0) as u32,
id,
},
Err(_) => PingResult::NoPingErr { id },