pub trait BlockAnalyzer {
// Required method
fn handle_block(
&mut self,
_block: &PcapBlockOwned<'_>,
_block_ctx: &ParseBlockContext,
) -> Result<(), Error>;
// Provided methods
fn init(&mut self) -> Result<(), Error> { ... }
fn teardown(&mut self) { ... }
fn before_refill(&mut self) { ... }
}Required Methods§
Sourcefn handle_block(
&mut self,
_block: &PcapBlockOwned<'_>,
_block_ctx: &ParseBlockContext,
) -> Result<(), Error>
fn handle_block( &mut self, _block: &PcapBlockOwned<'_>, _block_ctx: &ParseBlockContext, ) -> Result<(), Error>
Callback function for every block of the pcap/pcapng file
Provided Methods§
Sourcefn init(&mut self) -> Result<(), Error>
fn init(&mut self) -> Result<(), Error>
Initialization function, called before reading pcap data (optional)