pub struct PacketCaptureOptions {Show 16 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 read_timeout: Duration,
pub promiscuous: bool,
pub store: bool,
pub store_limit: u32,
pub receive_undefined: bool,
pub tunnel: bool,
pub loopback: bool,
}
Expand description
Packet capture options
Fields§
§interface_index: u32
Interface index
interface_name: String
Interface name
src_ips: HashSet<IpAddr>
Source IP addresses to filter. If empty, all source IP addresses will be captured
dst_ips: HashSet<IpAddr>
Destination IP addresses to filter. If empty, all destination IP addresses will be captured
src_ports: HashSet<u16>
Source ports to filter. If empty, all source ports will be captured
dst_ports: HashSet<u16>
Destination ports to filter. If empty, all destination ports will be captured
ether_types: HashSet<EtherType>
Ether types to filter. If empty, all ether types will be captured
ip_protocols: HashSet<IpNextLevelProtocol>
IP protocols to filter. If empty, all IP protocols will be captured
duration: Duration
Capture duration limit
read_timeout: Duration
Read Timeout for read next packet (Linux, BPF, Netmap only)
promiscuous: bool
Capture in promiscuous mode
store: bool
Store captured packets in memory
store_limit: u32
Store limit
receive_undefined: bool
Receive undefined packets
tunnel: bool
Use TUN interface
loopback: bool
Loopback interface
Trait Implementations§
Source§impl Clone for PacketCaptureOptions
impl Clone for PacketCaptureOptions
Source§fn clone(&self) -> PacketCaptureOptions
fn clone(&self) -> PacketCaptureOptions
Returns a duplicate 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 Freeze for PacketCaptureOptions
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