Struct retina_core::conntrack::conn_id::FiveTuple
source · pub struct FiveTuple {
pub orig: SocketAddr,
pub resp: SocketAddr,
pub proto: usize,
}
Expand description
Connection 5-tuple.
The sender of the first observed packet in the connection becomes the originator orig
, and the
recipient becomes the responder resp
.
Fields§
§orig: SocketAddr
The originator connection endpoint.
resp: SocketAddr
The responder connection endpoint.
proto: usize
The layer-4 protocol.
Implementations§
source§impl FiveTuple
impl FiveTuple
sourcepub fn dst_subnet_str(&self) -> String
pub fn dst_subnet_str(&self) -> String
Utility for returning a string representation of the dst. subnet /24 for IPv4, /64 for IPv6; no mask for broadcast
sourcepub fn dst_ip_str(&self) -> String
pub fn dst_ip_str(&self) -> String
Utility for returning a string representation of the dst. IP
sourcepub fn transp_proto_str(&self) -> String
pub fn transp_proto_str(&self) -> String
Utility for returning a string representation of the transport protocol and source/destination ports
Trait Implementations§
source§impl PartialEq for FiveTuple
impl PartialEq for FiveTuple
impl Copy for FiveTuple
impl Eq for FiveTuple
impl StructuralPartialEq for FiveTuple
Auto Trait Implementations§
impl Freeze for FiveTuple
impl RefUnwindSafe for FiveTuple
impl Send for FiveTuple
impl Sync for FiveTuple
impl Unpin for FiveTuple
impl UnwindSafe for FiveTuple
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more