Module afpacket::async[][src]

Async wrapper for use with futures or async-std

Example usage:

use afpacket::r#async::RawPacketStream;
use futures_lite::{future, AsyncReadExt};
use nom::HexDisplay;

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

Re-exports

pub use super::sync::Filter;
pub use super::sync::FilterProgram;

Structs

RawPacketStream