pub struct PacketMeta {
pub timestamp_ns: u64,
pub captured_len: u32,
pub flow_key: Option<FlowKey>,
pub tcp_flags: u8,
}Expand description
Packet metadata extracted for filter evaluation.
flow_key is None for non-IP frames (e.g. ARP). tcp_flags is 0
for non-TCP traffic.
Fields§
§timestamp_ns: u64Packet timestamp in nanoseconds since the Unix epoch.
captured_len: u32Number of captured bytes (without the record header).
flow_key: Option<FlowKey>Parsed 5-tuple; None for non-IP or unrecognised frames.
tcp_flags: u8TCP control flags; 0 when the transport is not TCP.
Implementations§
Source§impl PacketMeta
impl PacketMeta
Sourcepub fn from_packet(timestamp_ns: u64, captured_len: u32, data: &[u8]) -> Self
pub fn from_packet(timestamp_ns: u64, captured_len: u32, data: &[u8]) -> Self
Extract filter-relevant metadata from a raw Ethernet frame.
Trait Implementations§
Source§impl Clone for PacketMeta
impl Clone for PacketMeta
Source§fn clone(&self) -> PacketMeta
fn clone(&self) -> PacketMeta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PacketMeta
impl RefUnwindSafe for PacketMeta
impl Send for PacketMeta
impl Sync for PacketMeta
impl Unpin for PacketMeta
impl UnsafeUnpin for PacketMeta
impl UnwindSafe for PacketMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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