WAND Trace processing  4.0.5
libtrace_stat_t Struct Reference

Statistic counters are cumulative from the time the trace is started. More...

Data Fields

LIBTRACE_STAT_FIELDS LT_BITFIELD64 reserved1: 25
 Bits reserved for future fields. More...
 
LT_BITFIELD64 reserved2: 24
 Bits reserved for future fields. More...
 
LT_BITFIELD64 magic: 8
 A number stored against the format to ensure the struct was allocated correctly. More...
 
uint64_t accepted
 The number of packets that have been read from the input trace using trace_read_packet(). More...
 
uint64_t filtered
 The number of packets that were captured, but discarded for not matching a provided filter. More...
 
uint64_t received
 The total number of good packets which have been received. More...
 
uint64_t dropped
 The number of packets that have been dropped on an input trace due to lack of buffer space on the capturing device. More...
 
uint64_t captured
 The number of received packets that have not been dropped. More...
 
uint64_t missing
 The number of packets (or aggregated records) that have been lost between the original capture device and the current input trace. More...
 
uint64_t errors
 The number of packets that have been discarded by the network card because they are invalid. More...
 

Detailed Description

Statistic counters are cumulative from the time the trace is started.

Trace pause will reset the counters, to zero. Always check {field}_valid is set before attempting to read the stored value.

Note
Always allocate this structure using trace_create_statistics(). This allows us to extend the structure in the future.

Field Documentation

uint64_t libtrace_stat_t::accepted

The number of packets that have been read from the input trace using trace_read_packet().

In the parallel framework this may include some packets waiting in a batch yet to be seen by the user's application.

This does not include filtered packets because these do not make it to trace_read_packet().

Note
This field replaces trace_get_accepted_packets()

Referenced by trace_get_statistics(), and trace_get_thread_statistics().

uint64_t libtrace_stat_t::captured

The number of received packets that have not been dropped.

This includes filtered packets.

This is equivalent to received-dropped.

Note
This may include a small number of buffered packets not yet included in accepted.
uint64_t libtrace_stat_t::dropped

The number of packets that have been dropped on an input trace due to lack of buffer space on the capturing device.

This does not included errored packets which are dropped directly by the card.

Note
This field replaces trace_get_dropped_packets()

Referenced by trace_get_dropped_packets().

uint64_t libtrace_stat_t::errors

The number of packets that have been discarded by the network card because they are invalid.

That includes FCS mismatches, incorrect packet lengths etc.

uint64_t libtrace_stat_t::filtered

The number of packets that were captured, but discarded for not matching a provided filter.

Note
This field replaces trace_get_filtered_packets()

Referenced by trace_get_filtered_packets(), trace_get_statistics(), and trace_get_thread_statistics().

uint64_t libtrace_stat_t::missing

The number of packets (or aggregated records) that have been lost between the original capture device and the current input trace.

Note
Only relevant for input formats that use a network to transfer live captured packets from one host to another (e.g. nDAG).
uint64_t libtrace_stat_t::received

The total number of good packets which have been received.

Including those which are dropped and filtered. This does not include errors.

Note
This may include a small number of buffered packets not yet included in accepted.
This field replaces trace_get_received_packets()

Referenced by trace_get_received_packets().

LIBTRACE_STAT_FIELDS LT_BITFIELD64 libtrace_stat_t::reserved1

Bits reserved for future fields.

Referenced by trace_get_statistics(), and trace_get_thread_statistics().

LT_BITFIELD64 libtrace_stat_t::reserved2

Bits reserved for future fields.

Referenced by trace_get_statistics(), and trace_get_thread_statistics().


The documentation for this struct was generated from the following file: