pub struct TupleV6 {
pub src_ip: Ipv6Addr,
pub dst_ip: Ipv6Addr,
pub src_port: u16,
pub dst_port: u16,
pub protocol: IpProto,
pub vni: VniId,
}Expand description
IPv6 5-tuple flow tuple with VNI support
This tuple uniquely identifies a network flow using:
- Source and destination IPv6 addresses
- Source and destination ports
- IP protocol number (next header)
- Virtual Network Identifier (VNI) for tunnel-aware flow tracking
Fields§
§src_ip: Ipv6Addr§dst_ip: Ipv6Addr§src_port: u16§dst_port: u16§protocol: IpProto§vni: VniIdImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TupleV6
impl<'de> Deserialize<'de> for TupleV6
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Tuple for TupleV6
impl Tuple for TupleV6
type Addr = Ipv6Addr
Source§fn source_port(&self) -> u16
fn source_port(&self) -> u16
Returns the source port of the flow tuple.
Source§fn from_packet(pkt: &Packet<'_>, vni_mapper: &mut VniMapper) -> Option<Self>
fn from_packet(pkt: &Packet<'_>, vni_mapper: &mut VniMapper) -> Option<Self>
Create a new flow tuple from a packet
Source§fn hash_canonical<H: Hasher>(&self, state: &mut H)
fn hash_canonical<H: Hasher>(&self, state: &mut H)
Hashes the tuple in a canonical (symmetric) way without creating a new instance.
Used by
Symmetric wrapper to ensure Hash(A->B) == Hash(B->A).Source§fn eq_canonical(&self, other: &Self) -> bool
fn eq_canonical(&self, other: &Self) -> bool
Checks equality in a canonical (symmetric) way without creating a new instance.
Used by
Symmetric wrapper to ensure Eq(A->B, B->A).Source§fn is_symmetric(&self) -> bool
fn is_symmetric(&self) -> bool
Checks if the tuple is symmetric (source equals destination). Read more
impl Copy for TupleV6
impl Eq for TupleV6
impl StructuralPartialEq for TupleV6
Auto Trait Implementations§
impl Freeze for TupleV6
impl RefUnwindSafe for TupleV6
impl Send for TupleV6
impl Sync for TupleV6
impl Unpin for TupleV6
impl UnwindSafe for TupleV6
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