diff --git a/src/transport/ethernet/socket.rs b/src/transport/ethernet/io.rs similarity index 98% rename from src/transport/ethernet/socket.rs rename to src/transport/ethernet/io.rs index 622d7f6..392a3b8 100644 --- a/src/transport/ethernet/socket.rs +++ b/src/transport/ethernet/io.rs @@ -1,7 +1,7 @@ //! Raw Ethernet socket abstraction. //! -//! Platform-specific implementations live in `socket_linux.rs` (AF_PACKET) -//! and `socket_macos.rs` (BPF). This module re-exports `PacketSocket` and +//! Platform-specific implementations live in `io_linux.rs` (AF_PACKET) +//! and `io_macos.rs` (BPF). This module re-exports `PacketSocket` and //! provides `AsyncPacketSocket`. use crate::transport::TransportError; @@ -11,11 +11,11 @@ pub const ETHERNET_BROADCAST: [u8; 6] = [0xff; 6]; // Platform-specific PacketSocket implementation. #[cfg(target_os = "linux")] -#[path = "socket_linux.rs"] +#[path = "io_linux.rs"] mod platform; #[cfg(target_os = "macos")] -#[path = "socket_macos.rs"] +#[path = "io_macos.rs"] mod platform; #[cfg(unix)] diff --git a/src/transport/ethernet/socket_linux.rs b/src/transport/ethernet/io_linux.rs similarity index 100% rename from src/transport/ethernet/socket_linux.rs rename to src/transport/ethernet/io_linux.rs diff --git a/src/transport/ethernet/socket_macos.rs b/src/transport/ethernet/io_macos.rs similarity index 99% rename from src/transport/ethernet/socket_macos.rs rename to src/transport/ethernet/io_macos.rs index 2ddb187..3c8cab1 100644 --- a/src/transport/ethernet/socket_macos.rs +++ b/src/transport/ethernet/io_macos.rs @@ -555,8 +555,8 @@ fn get_mac_addr(interface: &str) -> Result<[u8; 6], TransportError> { // ============================================================================ // Unit tests // -// The whole `socket_macos.rs` file is `#[cfg(target_os = "macos")]`-included -// by `socket.rs`, so this `#[cfg(test)]` mod naturally only compiles on macOS. +// The whole `io_macos.rs` file is `#[cfg(target_os = "macos")]`-included +// by `io.rs`, so this `#[cfg(test)]` mod naturally only compiles on macOS. // The redundant `#[cfg(target_os = "macos")]` below is belt-and-suspenders: // it makes the macOS-only intent explicit so that any future refactor that // includes this file on additional targets won't silently activate macOS- diff --git a/src/transport/ethernet/mod.rs b/src/transport/ethernet/mod.rs index 60b0dbf..1856669 100644 --- a/src/transport/ethernet/mod.rs +++ b/src/transport/ethernet/mod.rs @@ -6,7 +6,7 @@ //! 802.11 transparently on Linux). pub mod discovery; -pub mod socket; +pub mod io; pub mod stats; use super::{ @@ -15,7 +15,7 @@ use super::{ }; use crate::config::EthernetConfig; use discovery::{DiscoveryBuffer, FRAME_TYPE_BEACON, FRAME_TYPE_DATA, build_beacon, parse_beacon}; -use socket::{AsyncPacketSocket, ETHERNET_BROADCAST, PacketSocket}; +use io::{AsyncPacketSocket, ETHERNET_BROADCAST, PacketSocket}; use stats::EthernetStats; use secp256k1::XOnlyPublicKey;