pub struct PcapInterfaceSourceBuilder { /* private fields */ }Expand description
Builder for a live pcap interface packet source.
Implementations§
Source§impl PcapInterfaceSourceBuilder
impl PcapInterfaceSourceBuilder
Sourcepub fn clear_filter(self) -> Self
pub fn clear_filter(self) -> Self
Remove any configured BPF filter.
Sourcepub fn pcap_filter(&self) -> Option<&str>
pub fn pcap_filter(&self) -> Option<&str>
Configured libpcap BPF filter, if any.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set the libpcap read timeout used while opening the interface.
Sourcepub fn no_timeout(self) -> Self
pub fn no_timeout(self) -> Self
Disable the libpcap read timeout.
Sourcepub const fn timeout_limit(&self) -> Option<Duration>
pub const fn timeout_limit(&self) -> Option<Duration>
Configured libpcap read timeout.
Sourcepub const fn snaplen_value(&self) -> u32
pub const fn snaplen_value(&self) -> u32
Configured live capture snapshot length.
Sourcepub const fn promisc_enabled(&self) -> bool
pub const fn promisc_enabled(&self) -> bool
Whether promiscuous mode is enabled.
Sourcepub const fn immediate_mode(self, immediate: bool) -> Self
pub const fn immediate_mode(self, immediate: bool) -> Self
Enable or disable immediate mode.
Sourcepub const fn immediate_mode_enabled(&self) -> bool
pub const fn immediate_mode_enabled(&self) -> bool
Whether immediate mode is enabled.
Sourcepub const fn nonblocking(self, nonblocking: bool) -> Self
pub const fn nonblocking(self, nonblocking: bool) -> Self
Enable or disable nonblocking reads.
Sourcepub const fn nonblocking_enabled(&self) -> bool
pub const fn nonblocking_enabled(&self) -> bool
Whether nonblocking reads are enabled.
Sourcepub fn open(self) -> WireResult<PcapInterfaceSource>
pub fn open(self) -> WireResult<PcapInterfaceSource>
Open this live pcap interface source.
Trait Implementations§
Source§impl Clone for PcapInterfaceSourceBuilder
impl Clone for PcapInterfaceSourceBuilder
Source§fn clone(&self) -> PcapInterfaceSourceBuilder
fn clone(&self) -> PcapInterfaceSourceBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PcapInterfaceSourceBuilder
impl Debug for PcapInterfaceSourceBuilder
impl Eq for PcapInterfaceSourceBuilder
Source§impl PartialEq for PcapInterfaceSourceBuilder
impl PartialEq for PcapInterfaceSourceBuilder
Source§fn eq(&self, other: &PcapInterfaceSourceBuilder) -> bool
fn eq(&self, other: &PcapInterfaceSourceBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PcapInterfaceSourceBuilder
Auto Trait Implementations§
impl Freeze for PcapInterfaceSourceBuilder
impl RefUnwindSafe for PcapInterfaceSourceBuilder
impl Send for PcapInterfaceSourceBuilder
impl Sync for PcapInterfaceSourceBuilder
impl Unpin for PcapInterfaceSourceBuilder
impl UnsafeUnpin for PcapInterfaceSourceBuilder
impl UnwindSafe for PcapInterfaceSourceBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more