mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
transport: rename ethernet byte-layer module from socket to io
Normalizes the ethernet transport onto the canonical byte-layer name (io.rs), including the per-OS files io_linux.rs/io_macos.rs and their #[path] wiring. Pure file rename plus module-path and doc-comment updates; no logic, wire, config, metric, or log change.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//! Raw Ethernet socket abstraction.
|
//! Raw Ethernet socket abstraction.
|
||||||
//!
|
//!
|
||||||
//! Platform-specific implementations live in `socket_linux.rs` (AF_PACKET)
|
//! Platform-specific implementations live in `io_linux.rs` (AF_PACKET)
|
||||||
//! and `socket_macos.rs` (BPF). This module re-exports `PacketSocket` and
|
//! and `io_macos.rs` (BPF). This module re-exports `PacketSocket` and
|
||||||
//! provides `AsyncPacketSocket`.
|
//! provides `AsyncPacketSocket`.
|
||||||
|
|
||||||
use crate::transport::TransportError;
|
use crate::transport::TransportError;
|
||||||
@@ -11,11 +11,11 @@ pub const ETHERNET_BROADCAST: [u8; 6] = [0xff; 6];
|
|||||||
|
|
||||||
// Platform-specific PacketSocket implementation.
|
// Platform-specific PacketSocket implementation.
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
#[path = "socket_linux.rs"]
|
#[path = "io_linux.rs"]
|
||||||
mod platform;
|
mod platform;
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
#[path = "socket_macos.rs"]
|
#[path = "io_macos.rs"]
|
||||||
mod platform;
|
mod platform;
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
@@ -555,8 +555,8 @@ fn get_mac_addr(interface: &str) -> Result<[u8; 6], TransportError> {
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Unit tests
|
// Unit tests
|
||||||
//
|
//
|
||||||
// The whole `socket_macos.rs` file is `#[cfg(target_os = "macos")]`-included
|
// The whole `io_macos.rs` file is `#[cfg(target_os = "macos")]`-included
|
||||||
// by `socket.rs`, so this `#[cfg(test)]` mod naturally only compiles on macOS.
|
// by `io.rs`, so this `#[cfg(test)]` mod naturally only compiles on macOS.
|
||||||
// The redundant `#[cfg(target_os = "macos")]` below is belt-and-suspenders:
|
// The redundant `#[cfg(target_os = "macos")]` below is belt-and-suspenders:
|
||||||
// it makes the macOS-only intent explicit so that any future refactor that
|
// it makes the macOS-only intent explicit so that any future refactor that
|
||||||
// includes this file on additional targets won't silently activate macOS-
|
// includes this file on additional targets won't silently activate macOS-
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
//! 802.11 transparently on Linux).
|
//! 802.11 transparently on Linux).
|
||||||
|
|
||||||
pub mod discovery;
|
pub mod discovery;
|
||||||
pub mod socket;
|
pub mod io;
|
||||||
pub mod stats;
|
pub mod stats;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
@@ -15,7 +15,7 @@ use super::{
|
|||||||
};
|
};
|
||||||
use crate::config::EthernetConfig;
|
use crate::config::EthernetConfig;
|
||||||
use discovery::{DiscoveryBuffer, FRAME_TYPE_BEACON, FRAME_TYPE_DATA, build_beacon, parse_beacon};
|
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 stats::EthernetStats;
|
||||||
|
|
||||||
use secp256k1::XOnlyPublicKey;
|
use secp256k1::XOnlyPublicKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user