Module afpacket::sync[][src]

Expand description

The bindings

Example usage:

use afpacket::sync::RawPacketStream;
use nom::HexDisplay;

fn main() {
    let mut ps = RawPacketStream::new().unwrap();
    loop {
        let mut buf = [0u8; 1500];
        ps.read(&mut buf).unwrap();
        println!("{}", buf.to_hex(24));
    }
}

Structs

Packet sockets are used to receive or send raw packets at OSI 2 level.

Type Definitions