#[repr(C)]
pub struct WINDIVERT_ADDRESS { pub timestamp: i64, pub union_field: WINDIVERT_ADDRESS_UNION_FIELD, /* private fields */ }
Expand description

Base data type returned by recv and required by send

Most address fields are ignored by WinDivertSend(). The exceptions are Outbound (for WinDivertLayer::Network layer only), Impostor, IPChecksum, TCPChecksum, UDPChecksum, Network.interface_id and Network.subinterface_id.

Fields§

§timestamp: i64

Timestamp indicating when the event occurred.

§union_field: WINDIVERT_ADDRESS_UNION_FIELD

Union of the different data types associated with the possible layer values.

Implementations§

source§

impl WINDIVERT_ADDRESS

source

pub fn layer(&self) -> WinDivertLayer

Getter for the handle layer

source

pub fn set_layer(&mut self, val: WinDivertLayer)

Setter for the handle layer

source

pub fn event(&self) -> WinDivertEvent

Getter for the handle event

source

pub fn set_event(&mut self, val: WinDivertEvent)

Setter for the handle event

source

pub fn sniffed(&self) -> bool

Set to true if the packet was sniffed (not blocked).

source

pub fn set_sniffed(&mut self, val: bool)

Sniffed flag setter.

source

pub fn outbound(&self) -> bool

Set to true for outbound packet events.

source

pub fn set_outbound(&mut self, val: bool)

Outbound flag setter.

source

pub fn loopback(&self) -> bool

Set to true for loopback packets.

source

pub fn set_loopback(&mut self, val: bool)

Loopback flag setter.

source

pub fn impostor(&self) -> bool

Set to true for “impostor” packets.

source

pub fn set_impostor(&mut self, val: bool)

Impostor flag setter.

source

pub fn ipv6(&self) -> bool

Set to true for IPv6 packets.

source

pub fn set_ipv6(&mut self, val: bool)

IPv6 flag setter.

source

pub fn ipchecksum(&self) -> bool

Set to true if the IPv4 checksum is valid.

source

pub fn set_ipchecksum(&mut self, val: bool)

IPv4 checksum flag setter.

source

pub fn tcpchecksum(&self) -> bool

Set to true if the TCP checksum is valid.

source

pub fn set_tcpchecksum(&mut self, val: bool)

TCP checksum flag setter.

source

pub fn udpchecksum(&self) -> bool

Set to true if the UDP checksum is valid.

source

pub fn set_udpchecksum(&mut self, val: bool)

UDP checksum flag setter.

Trait Implementations§

source§

impl Clone for WINDIVERT_ADDRESS

source§

fn clone(&self) -> WINDIVERT_ADDRESS

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 Debug for WINDIVERT_ADDRESS

source§

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

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

impl Default for WINDIVERT_ADDRESS

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for WINDIVERT_ADDRESS

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.