Skip to main content

Crate rawlink

Crate rawlink 

Source
Expand description

Raw Ethernet I/O and classic pcap reading. Frames are opaque here; the Colorlight protocol lives in colorlight.

Link is one interface opened for whole-frame send/receive: /dev/bpf on macOS, an AF_PACKET socket on Linux. Same API on both; recv returns within the read timeout with whatever arrived, possibly nothing.

Structs§

Frames
The frames from one recv: zero or one on a packet socket.
Link
Packets
Pcap
A classic pcap file held in memory; packets walks it without copying.
PcapPacket

Functions§

parse_pcap
Walk the packets of a classic pcap file. A truncated last record is dropped.
read_pcap
Errors