#[repr(C, packed(1))]pub struct IcmpFilter {
pub valid_fields: IcmpFilterFlags,
pub type_range: ByteRange,
pub code_range: ByteRange,
}
Expand description
A Rust struct that represents an ICMP filter.
Rust equivalent for _ICMP_FILTER. This structure can be used to define filtering rules for ICMP packets based on ICMP type and code ranges.
The valid_fields
field specifies which fields in the filter are valid for filtering.
The type_range
field represents a range of ICMP types for filtering.
The code_range
field represents a range of ICMP codes for filtering.
Fields§
§valid_fields: IcmpFilterFlags
§type_range: ByteRange
§code_range: ByteRange
Implementations§
Source§impl IcmpFilter
Creates a new IcmpFilter
instance.
impl IcmpFilter
Creates a new IcmpFilter
instance.
§Arguments
valid_fields
- Specifies which fields in the filter are valid for filtering.type_range
- Represents a range of ICMP types for filtering.code_range
- Represents a range of ICMP codes for filtering.
§Returns
- A new
IcmpFilter
instance.
pub fn new( valid_fields: IcmpFilterFlags, type_range: ByteRange, code_range: ByteRange, ) -> Self
Trait Implementations§
Source§impl Clone for IcmpFilter
impl Clone for IcmpFilter
Source§fn clone(&self) -> IcmpFilter
fn clone(&self) -> IcmpFilter
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 moreSource§impl Debug for IcmpFilter
impl Debug for IcmpFilter
Source§impl Default for IcmpFilter
impl Default for IcmpFilter
Source§fn default() -> IcmpFilter
fn default() -> IcmpFilter
Returns the “default value” for a type. Read more
impl Copy for IcmpFilter
Auto Trait Implementations§
impl Freeze for IcmpFilter
impl RefUnwindSafe for IcmpFilter
impl Send for IcmpFilter
impl Sync for IcmpFilter
impl Unpin for IcmpFilter
impl UnwindSafe for IcmpFilter
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