1use core::time;
4
5pub mod arp_packet;
6pub mod heartbeat_packet;
7pub mod rst_packet;
8pub mod syn_packet;
9pub mod wire;
10
11use crate::error::Result;
12
13pub const DEFAULT_PACKET_SEND_TIMING: time::Duration = time::Duration::from_micros(50);
15
16pub trait Reader: Send + Sync {
18 fn next_packet(&mut self) -> Result<&[u8]>;
20}
21
22pub trait Sender: Send + Sync {
24 fn send(&mut self, packet: &[u8]) -> Result<()>;
26}
27
28#[cfg(test)]
29#[path = "./packet_tests.rs"]
30#[doc(hidden)]
31pub mod mocks;