pub struct FlowSample {
    pub sequence_number: u32,
    pub source_id: DataSource,
    pub sampling_rate: u32,
    pub sample_pool: u32,
    pub drops: u32,
    pub input: Interface,
    pub output: Interface,
    pub flow_records: Vec<FlowRecord>,
}Expand description
Compact flow sample - Format (0,1)
Contains sampled packet information with compact encoding for interfaces.
§XDR Definition (sFlow v5)
/* Format of a single flow sample */
/* opaque = sample_data; enterprise = 0; format = 1 */
struct flow_sample {
   unsigned int sequence_number;  /* Incremented with each flow sample
                                     generated by this sFlow Instance. */
   sflow_data_source source_id;   /* sFlowDataSource */
   unsigned int sampling_rate;    /* sFlowPacketSamplingRate */
   unsigned int sample_pool;      /* Total number of packets that could have been
                                     sampled (i.e. packets skipped by sampling process
                                     + total number of samples) */
   unsigned int drops;            /* Number of times that the sFlow agent detected
                                     that a packet marked to be sampled was dropped
                                     due to lack of resources. */
   interface input;               /* Input interface */
   interface output;              /* Output interface */
   flow_record flow_records<>;    /* Information about sampled packet */
}ERRATUM: Sequence number clarified as incremented per “sFlow Instance” instead of “source_id”.
Fields§
§sequence_number: u32Sequence number incremented with each flow sample generated by this sFlow Instance ERRATUM: Clarified as “sFlow Instance” instead of “source_id”
source_id: DataSourcesFlow data source identifier
sampling_rate: u32Sampling rate (1 in N packets)
sample_pool: u32Total packets that could have been sampled
drops: u32Number of dropped samples due to lack of resources
input: InterfaceInput interface
output: InterfaceOutput interface
flow_records: Vec<FlowRecord>Flow records describing the sampled packet
Trait Implementations§
Source§impl Clone for FlowSample
 
impl Clone for FlowSample
Source§fn clone(&self) -> FlowSample
 
fn clone(&self) -> FlowSample
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 moreSource§impl Debug for FlowSample
 
impl Debug for FlowSample
Source§impl PartialEq for FlowSample
 
impl PartialEq for FlowSample
impl Eq for FlowSample
impl StructuralPartialEq for FlowSample
Auto Trait Implementations§
impl Freeze for FlowSample
impl RefUnwindSafe for FlowSample
impl Send for FlowSample
impl Sync for FlowSample
impl Unpin for FlowSample
impl UnwindSafe for FlowSample
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