wireforge-io 1.0.0

Cross-platform raw socket I/O — AF_PACKET/BPF/NPcap L2 and raw socket L3
Documentation

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

Platform Support

Platform L2 Capture L3 Capture Backend
Linux AF_PACKET raw socket socket2 + libc
macOS BPF raw socket /dev/bpf + libc
Windows NPcap raw socket npcap crate

Quick Start

# use wireforge_io::{DefaultL2Reader, traits::L2Reader};
# fn main() -> Result<(), wireforge_io::IoError> {
let mut rx = DefaultL2Reader::new("eth0")?;
let eth = rx.recv()?;
println!("EtherType: {:?}", eth.ethertype());
# Ok(())
# }

Permissions

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