Struct cross_socket::option::PacketCaptureOptions  
source · pub struct PacketCaptureOptions {Show 13 fields
    pub interface_index: u32,
    pub interface_name: String,
    pub src_ips: HashSet<IpAddr>,
    pub dst_ips: HashSet<IpAddr>,
    pub src_ports: HashSet<u16>,
    pub dst_ports: HashSet<u16>,
    pub ether_types: HashSet<EtherType>,
    pub ip_protocols: HashSet<IpNextLevelProtocol>,
    pub duration: Duration,
    pub promiscuous: bool,
    pub store: bool,
    pub store_limit: u32,
    pub receive_undefined: bool,
}Fields§
§interface_index: u32§interface_name: String§src_ips: HashSet<IpAddr>§dst_ips: HashSet<IpAddr>§src_ports: HashSet<u16>§dst_ports: HashSet<u16>§ether_types: HashSet<EtherType>§ip_protocols: HashSet<IpNextLevelProtocol>§duration: Duration§promiscuous: bool§store: bool§store_limit: u32§receive_undefined: boolImplementations§
source§impl PacketCaptureOptions
 
impl PacketCaptureOptions
pub fn new() -> PacketCaptureOptions
pub fn with_interface_index(self, interface_index: u32) -> PacketCaptureOptions
pub fn set_src_ips(&mut self, ips: Vec<IpAddr>)
pub fn set_dst_ips(&mut self, ips: Vec<IpAddr>)
pub fn set_src_ports(&mut self, ports: Vec<u16>)
pub fn set_dst_ports(&mut self, ports: Vec<u16>)
pub fn set_ether_types(&mut self, ether_types: Vec<EtherType>)
pub fn set_ip_protocols(&mut self, ip_protocols: Vec<IpNextLevelProtocol>)
Trait Implementations§
source§impl Clone for PacketCaptureOptions
 
impl Clone for PacketCaptureOptions
source§fn clone(&self) -> PacketCaptureOptions
 
fn clone(&self) -> PacketCaptureOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for PacketCaptureOptions
impl Send for PacketCaptureOptions
impl Sync for PacketCaptureOptions
impl Unpin for PacketCaptureOptions
impl UnwindSafe for PacketCaptureOptions
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