Struct rtlola_input_plugins::pcap_plugin::PcapEventSource
source · pub struct PcapEventSource<InputTime: TimeRepresentation> { /* private fields */ }
Expand description
Parses events from network packets.
Implementations§
source§impl<InputTime: TimeRepresentation> PcapEventSource<InputTime>
impl<InputTime: TimeRepresentation> PcapEventSource<InputTime>
pub fn setup(
src: &PcapInputSource
) -> Result<PcapEventSource<InputTime>, PcapError>
Trait Implementations§
source§impl<InputTime: TimeRepresentation> EventSource<InputTime> for PcapEventSource<InputTime>
impl<InputTime: TimeRepresentation> EventSource<InputTime> for PcapEventSource<InputTime>
type Error = PcapError
type Rec = PcapRecord
source§fn init_data(&self) -> Result<IpNetwork, PcapError>
fn init_data(&self) -> Result<IpNetwork, PcapError>
Return the data needed by the monitor to initialize the input source.
source§fn next_event(
&mut self
) -> Result<Option<(PcapRecord, InputTime::InnerTime)>, PcapError>
fn next_event(
&mut self
) -> Result<Option<(PcapRecord, InputTime::InnerTime)>, PcapError>
Queries the event source for a new Record(Event) in a blocking fashion.
If there are no more records, None is returned.