Skip to main content

Crate wireforge_io

Crate wireforge_io 

Source
Expand description

WireForge IO — cross-platform raw socket I/O for packet capture and injection.

§Platform Support

PlatformL2 CaptureL3 CaptureBackend
LinuxAF_PACKETraw socketsocket2 + libc
macOSBPFraw socket/dev/bpf + libc
WindowsNPcapraw socketnpcap crate

§Quick Start

let mut rx = DefaultL2Reader::new("eth0")?;
let eth = rx.recv()?;
println!("EtherType: {:?}", eth.ethertype());

§Permissions

L2 capture requires root (Linux/macOS) or Administrator (Windows). list_interfaces() does not require elevated privileges.

Re-exports§

pub use linux::L2Receiver;
pub use linux::L2Sender;
pub use linux::L3Receiver;
pub use linux::L3Sender;

Modules§

linux
Linux platform implementation — AF_PACKET L2 and raw socket L3.
traits
Platform-independent I/O traits for L2/L3 packet capture and injection.

Structs§

Interface
Information about a network interface.

Enums§

IoError
I/O error type for wireforge-io.

Functions§

list_interfaces
List all available network interfaces on the system.

Type Aliases§

DefaultL2Reader
The default L2 frame reader for the current platform.
DefaultL2Writer
The default L2 frame sender for the current platform.
DefaultL3Reader
The default L3 IPv4 packet reader for the current platform.
DefaultL3Writer
The default L3 IPv4 packet sender for the current platform.