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; on Linux, also 802.11 Action frames with the radio's times.
5//! It moves frames and reads clocks, and parses no payload: gPTP, MRP
6//! and AVTP are other crates' business.
7//!
8//! Without the `std` feature only the address types remain, so protocol
9//! crates built on them also run on microcontrollers.
10
11#![cfg_attr(not(any(feature = "std", test)), no_std)]
12
13mod mac;
14
15pub use mac::{MacAddress, ParseError};
16
17#[cfg(feature = "std")]
18pub mod interfaces;
19
20#[cfg(feature = "std")]
21pub mod socket;
22
23#[cfg(all(feature = "std", target_os = "linux"))]
24pub mod broker;
25
26#[cfg(feature = "std")]
27pub mod clock;
28
29#[cfg(feature = "std")]
30pub mod capture;
31
32#[cfg(feature = "std")]
33pub mod stamped;
34
35#[cfg(all(feature = "std", target_os = "linux"))]
36pub mod wifi;
37
38#[cfg(feature = "std")]
39pub use interfaces::{Interface, LinkPower, interfaces};
40#[cfg(feature = "std")]
41pub use socket::{Blocked, Received, Socket, check_access};