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: SocketAddrThe originator connection endpoint.
resp: SocketAddrThe responder connection endpoint.
proto: usizeThe 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§
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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