pub struct FlowAttribution {
pub src_addr: Option<String>,
pub src_port: Option<u16>,
pub dst_addr: Option<String>,
pub dst_port: Option<u16>,
pub protocol: Option<String>,
pub protocol_byte: Option<u8>,
}Expand description
L3/L4 attribution distilled from an nflog payload.
All fields are optional because nflog can be configured with copy-mode
META (no payload at all) or because the captured packet may be a
non-IP frame (very rare in practice — netfilter only hooks IP).
L5-15: src_addr / src_port / protocol_byte are populated alongside
the dst fields so the listener can derive a FlowKey suitable for
FlowAccumulator::record(). The wire-emitted NetworkFlowDecision
schema only carries dst attribution today, so the src fields are
listener-internal — they exist on this struct to keep one parsing pass
rather than re-walking the payload.
Fields§
§src_addr: Option<String>§src_port: Option<u16>§dst_addr: Option<String>§dst_port: Option<u16>§protocol: Option<String>§protocol_byte: Option<u8>IANA protocol byte (6 = TCP, 17 = UDP, 1 = ICMP, 58 = ICMPv6). Kept
alongside the human-readable protocol string so the FlowKey hash
stays cheap and matches the FlowKey::protocol: u8 field directly.
Trait Implementations§
Source§impl Clone for FlowAttribution
impl Clone for FlowAttribution
Source§fn clone(&self) -> FlowAttribution
fn clone(&self) -> FlowAttribution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FlowAttribution
impl Debug for FlowAttribution
Source§impl Default for FlowAttribution
impl Default for FlowAttribution
Source§fn default() -> FlowAttribution
fn default() -> FlowAttribution
Source§impl PartialEq for FlowAttribution
impl PartialEq for FlowAttribution
Source§fn eq(&self, other: &FlowAttribution) -> bool
fn eq(&self, other: &FlowAttribution) -> bool
self and other values to be equal, and is used by ==.impl Eq for FlowAttribution
impl StructuralPartialEq for FlowAttribution
Auto Trait Implementations§
impl Freeze for FlowAttribution
impl RefUnwindSafe for FlowAttribution
impl Send for FlowAttribution
impl Sync for FlowAttribution
impl Unpin for FlowAttribution
impl UnsafeUnpin for FlowAttribution
impl UnwindSafe for FlowAttribution
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
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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