Struct windivert_sys::address::WINDIVERT_ADDRESS
source · #[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
impl WINDIVERT_ADDRESS
sourcepub fn layer(&self) -> WinDivertLayer
pub fn layer(&self) -> WinDivertLayer
Getter for the handle layer
sourcepub fn set_layer(&mut self, val: WinDivertLayer)
pub fn set_layer(&mut self, val: WinDivertLayer)
Setter for the handle layer
sourcepub fn event(&self) -> WinDivertEvent
pub fn event(&self) -> WinDivertEvent
Getter for the handle event
sourcepub fn set_event(&mut self, val: WinDivertEvent)
pub fn set_event(&mut self, val: WinDivertEvent)
Setter for the handle event
sourcepub fn set_sniffed(&mut self, val: bool)
pub fn set_sniffed(&mut self, val: bool)
Sniffed flag setter.
sourcepub fn set_outbound(&mut self, val: bool)
pub fn set_outbound(&mut self, val: bool)
Outbound flag setter.
sourcepub fn set_loopback(&mut self, val: bool)
pub fn set_loopback(&mut self, val: bool)
Loopback flag setter.
sourcepub fn set_impostor(&mut self, val: bool)
pub fn set_impostor(&mut self, val: bool)
Impostor flag setter.
sourcepub fn ipchecksum(&self) -> bool
pub fn ipchecksum(&self) -> bool
Set to true if the IPv4 checksum is valid.
sourcepub fn set_ipchecksum(&mut self, val: bool)
pub fn set_ipchecksum(&mut self, val: bool)
IPv4 checksum flag setter.
sourcepub fn tcpchecksum(&self) -> bool
pub fn tcpchecksum(&self) -> bool
Set to true if the TCP checksum is valid.
sourcepub fn set_tcpchecksum(&mut self, val: bool)
pub fn set_tcpchecksum(&mut self, val: bool)
TCP checksum flag setter.
sourcepub fn udpchecksum(&self) -> bool
pub fn udpchecksum(&self) -> bool
Set to true if the UDP checksum is valid.
sourcepub fn set_udpchecksum(&mut self, val: bool)
pub fn set_udpchecksum(&mut self, val: bool)
UDP checksum flag setter.
Trait Implementations§
source§impl Clone for WINDIVERT_ADDRESS
impl Clone for WINDIVERT_ADDRESS
source§fn clone(&self) -> WINDIVERT_ADDRESS
fn clone(&self) -> WINDIVERT_ADDRESS
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more