pub struct FlowStatsEntry {
pub table_id: u8,
pub duration_sec: u32,
pub duration_nsec: u32,
pub priority: u16,
pub idle_timeout: u16,
pub hard_timeout: u16,
pub flags: u16,
pub cookie: u64,
pub packet_count: u64,
pub byte_count: u64,
pub match_fields: Match,
pub instructions: Vec<u8>,
}Expand description
Individual flow statistics from a FlowStats reply.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| length | table_id | pad |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| duration_sec |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| duration_nsec |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| priority | idle_timeout |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| hard_timeout | flags |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| pad (4) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| cookie |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| packet_count |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| byte_count |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| match (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| instructions (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Fields§
§table_id: u8Table ID
duration_sec: u32Time flow has been alive (seconds)
duration_nsec: u32Time flow has been alive (nanoseconds beyond duration_sec)
priority: u16Priority
idle_timeout: u16Idle timeout
hard_timeout: u16Hard timeout
flags: u16Flags
Cookie
packet_count: u64Packet count
byte_count: u64Byte count
match_fields: MatchMatch fields
instructions: Vec<u8>Instructions (raw bytes for now)
Implementations§
Source§impl FlowStatsEntry
impl FlowStatsEntry
Sourcepub const FIXED_SIZE: usize = 48
pub const FIXED_SIZE: usize = 48
Fixed header size before match (48 bytes).
Sourcepub fn decode(data: &[u8]) -> Result<(Self, usize)>
pub fn decode(data: &[u8]) -> Result<(Self, usize)>
Parse a single flow stats entry from bytes.
Sourcepub fn decoded_instructions(&self) -> Result<InstructionList>
pub fn decoded_instructions(&self) -> Result<InstructionList>
Decode the instructions from the raw bytes.
Returns the decoded instruction list. This is a separate method because decoding instructions may fail and is not always needed.
Trait Implementations§
Source§impl Clone for FlowStatsEntry
impl Clone for FlowStatsEntry
Source§fn clone(&self) -> FlowStatsEntry
fn clone(&self) -> FlowStatsEntry
Returns a duplicate of the value. Read more
1.0.0 · 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 FlowStatsEntry
impl RefUnwindSafe for FlowStatsEntry
impl Send for FlowStatsEntry
impl Sync for FlowStatsEntry
impl Unpin for FlowStatsEntry
impl UnsafeUnpin for FlowStatsEntry
impl UnwindSafe for FlowStatsEntry
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