From e0e76805a318588d8dce67985853e01d588799a9 Mon Sep 17 00:00:00 2001 From: Ruben Nijveld Date: Fri, 24 Nov 2023 16:17:13 +0100 Subject: [PATCH] Use the published crates for clock-steering and timestamped-socket --- Cargo.lock | 6 ++++-- Cargo.toml | 4 ++-- statime-linux/src/main.rs | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5215ee6e6..8acea7dbf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,7 +170,8 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "clock-steering" version = "0.1.0" -source = "git+https://github.com/pendulum-project/clock-steering.git?rev=716a540#716a540af0678a5aeaee21509d490bbfb19263fb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80ac48dbcd3a6fa19104a04f468da9680dac59f7456159511490d438a501e9e1" dependencies = [ "libc", ] @@ -529,7 +530,8 @@ dependencies = [ [[package]] name = "timestamped-socket" version = "0.1.0" -source = "git+https://github.com/pendulum-project/timestamped-socket.git?rev=d0e4ed7#d0e4ed7fa43dbcf665e39437de3ebf91923e7d30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaff75f66683c9953194a55b9ed214d93cb4c99ab333623dff91e2bae7860c6" dependencies = [ "libc", "serde", diff --git a/Cargo.toml b/Cargo.toml index e9ebb4270..3ced1ecfb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,8 +43,8 @@ fixed = "1.24" libm = "0.2.8" atomic_refcell = "0.1.13" -clock-steering = { git = "https://github.com/pendulum-project/clock-steering.git", rev = "716a540" } -timestamped-socket = { git = "https://github.com/pendulum-project/timestamped-socket.git", rev = "d0e4ed7", features = ["serde"] } +clock-steering = "0.1.0" +timestamped-socket = "0.1.0" # our own crates used as dependencies, same version as the workspace version diff --git a/statime-linux/src/main.rs b/statime-linux/src/main.rs index 6792c0d10..f5f9ebb35 100644 --- a/statime-linux/src/main.rs +++ b/statime-linux/src/main.rs @@ -26,7 +26,7 @@ use statime_linux::{ }, }; use timestamped_socket::{ - interface::InterfaceIterator, + interface::interfaces, networkaddress::{EthernetAddress, NetworkAddress}, socket::{InterfaceTimestampMode, Open, Socket}, }; @@ -812,9 +812,10 @@ async fn handle_actions_ethernet( } fn get_clock_id() -> Option<[u8; 8]> { - let candidates = InterfaceIterator::new() + let candidates = interfaces() .unwrap() - .filter_map(|data| data.mac); + .into_iter() + .filter_map(|(_, data)| data.mac()); for mac in candidates { // Ignore multicast and locally administered mac addresses