pcap_file::pcapng::blocks::interface_description

Enum InterfaceDescriptionOption

Source
pub enum InterfaceDescriptionOption<'a> {
Show 18 variants Comment(Cow<'a, str>), IfName(Cow<'a, str>), IfDescription(Cow<'a, str>), IfIpv4Addr(Cow<'a, [u8]>), IfIpv6Addr(Cow<'a, [u8]>), IfMacAddr(Cow<'a, [u8]>), IfEuIAddr(u64), IfSpeed(u64), IfTsResol(u8), IfTzone(u32), IfFilter(Cow<'a, [u8]>), IfOs(Cow<'a, str>), IfFcsLen(u8), IfTsOffset(u64), IfHardware(Cow<'a, str>), CustomBinary(CustomBinaryOption<'a>), CustomUtf8(CustomUtf8Option<'a>), Unknown(UnknownOption<'a>),
}
Expand description

The Interface Description Block (IDB) options

Variants§

§

Comment(Cow<'a, str>)

The opt_comment option is a UTF-8 string containing human-readable comment text that is associated to the current block.

§

IfName(Cow<'a, str>)

The if_name option is a UTF-8 string containing the name of the device used to capture data.

§

IfDescription(Cow<'a, str>)

The if_description option is a UTF-8 string containing the description of the device used to capture data.

§

IfIpv4Addr(Cow<'a, [u8]>)

The if_IPv4addr option is an IPv4 network address and corresponding netmask for the interface.

§

IfIpv6Addr(Cow<'a, [u8]>)

The if_IPv6addr option is an IPv6 network address and corresponding prefix length for the interface.

§

IfMacAddr(Cow<'a, [u8]>)

The if_MACaddr option is the Interface Hardware MAC address (48 bits), if available.

§

IfEuIAddr(u64)

The if_EUIaddr option is the Interface Hardware EUI address (64 bits), if available.

§

IfSpeed(u64)

The if_speed option is a 64-bit number for the Interface speed (in bits per second).

§

IfTsResol(u8)

The if_tsresol option identifies the resolution of timestamps.

§

IfTzone(u32)

The if_tzone option identifies the time zone for GMT support.

§

IfFilter(Cow<'a, [u8]>)

The if_filter option identifies the filter (e.g. “capture only TCP traffic”) used to capture traffic.

§

IfOs(Cow<'a, str>)

The if_os option is a UTF-8 string containing the name of the operating system of the machine in which this interface is installed.

§

IfFcsLen(u8)

The if_fcslen option is an 8-bit unsigned integer value that specifies the length of the Frame Check Sequence (in bits) for this interface.

§

IfTsOffset(u64)

The if_tsoffset option is a 64-bit integer value that specifies an offset (in seconds) that must be added to the timestamp of each packet to obtain the absolute timestamp of a packet.

§

IfHardware(Cow<'a, str>)

The if_hardware option is a UTF-8 string containing the description of the interface hardware.

§

CustomBinary(CustomBinaryOption<'a>)

Custom option containing binary octets in the Custom Data portion

§

CustomUtf8(CustomUtf8Option<'a>)

Custom option containing a UTF-8 string in the Custom Data portion

§

Unknown(UnknownOption<'a>)

Unknown option

Implementations§

Source§

impl<'a> InterfaceDescriptionOption<'a>

Source

pub fn into_owned(self) -> InterfaceDescriptionOption<'static>

Returns a version of self with all fields converted to owning versions.

Trait Implementations§

Source§

impl<'a> Clone for InterfaceDescriptionOption<'a>

Source§

fn clone(&self) -> InterfaceDescriptionOption<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for InterfaceDescriptionOption<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> PartialEq for InterfaceDescriptionOption<'a>

Source§

fn eq(&self, other: &InterfaceDescriptionOption<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Eq for InterfaceDescriptionOption<'a>

Source§

impl<'a> StructuralPartialEq for InterfaceDescriptionOption<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.