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 =
15 time::Duration::from_micros(50);
16
17pub trait Reader: Send {
19 fn next_packet(&mut self) -> Result<&[u8]>;
21}
22
23pub trait Sender: Send {
25 fn send(&mut self, packet: &[u8]) -> Result<()>;
27}
28
29#[cfg(test)]
30#[path = "./packet_tests.rs"]
31#[doc(hidden)]
32pub mod mocks;