Skip to main content

raw_ether/
lib.rs

1//! Raw Ethernet on Linux, macOS and Windows: MAC addresses, the
2//! computer's interfaces, frames of one ethertype, frames with the times
3//! the hardware stamped on them, PTP hardware clocks, and capturing whole
4//! frames. It moves frames and reads clocks, and parses no payload: gPTP,
5//! MRP and AVTP are other crates' business.
6//!
7//! Without the `std` feature only the address types remain, so protocol
8//! crates built on them also run on microcontrollers.
9
10#![cfg_attr(not(any(feature = "std", test)), no_std)]
11
12mod mac;
13
14pub use mac::{MacAddress, ParseError};
15
16#[cfg(feature = "std")]
17pub mod interfaces;
18
19#[cfg(feature = "std")]
20pub mod socket;
21
22#[cfg(all(feature = "std", target_os = "linux"))]
23pub mod broker;
24
25#[cfg(feature = "std")]
26pub mod clock;
27
28#[cfg(feature = "std")]
29pub mod capture;
30
31#[cfg(feature = "std")]
32pub mod stamped;
33
34#[cfg(feature = "std")]
35pub use interfaces::{Interface, LinkPower, interfaces};
36#[cfg(feature = "std")]
37pub use socket::{Blocked, Received, Socket, check_access};