refactor: backport pcap impl

This commit is contained in:
Cain 2024-01-13 03:22:50 +00:00 committed by Douile
parent 49096e46bb
commit 3d47180e85
No known key found for this signature in database
GPG key ID: E048586A5FF6585C
7 changed files with 272 additions and 235 deletions

View file

@ -14,7 +14,7 @@ lazy_static! {
pub(crate) static ref CAPTURE_WRITER: Mutex<Option<Box<dyn Writer + Send + Sync>>> = Mutex::new(None);
}
pub trait Writer {
pub(crate) trait Writer {
fn write(&mut self, packet: &CapturePacket, data: &[u8]) -> crate::GDResult<()>;
fn new_connect(&mut self, packet: &CapturePacket) -> crate::GDResult<()>;
}