WAND Trace processing  4.0.5
libtrace_t Struct Reference

A libtrace input trace. More...

Collaboration diagram for libtrace_t:

Data Fields

struct libtrace_format_tformat
 The capture format for the input trace. More...
 
struct libtrace_event_status_t event
 Details of the most recent PACKET event reported by the trace. More...
 
void * format_data
 Pointer to the "global" data for the capture format module. More...
 
struct libtrace_filter_tfilter
 A BPF filter to be applied to all packets read by the trace - used only if the capture format does not support filters natively. More...
 
size_t snaplen
 The snap length to be applied to all packets read by the trace - used only if the capture format does not support snapping natively. More...
 
int replayspeedup
 Speed up the packet rate when using trace_event() to process trace files by this factor. More...
 
uint64_t accepted_packets
 Count of the number of packets returned to the libtrace user. More...
 
uint64_t filtered_packets
 Count of the number of packets filtered by libtrace. More...
 
uint64_t sequence_number
 The sequence is like accepted_packets but we don't reset this after a pause. More...
 
libtrace_packet_tlast_packet
 The packet read out by the trace, backwards compatibility to allow us to finalise a packet when the trace is destroyed. More...
 
char * uridata
 The filename from the uri for the trace. More...
 
io_t * io
 The libtrace IO reader for this trace (if applicable) More...
 
libtrace_err_t err
 Error information for the trace. More...
 
bool started
 Boolean flag indicating whether the trace has been started. More...
 
int startcount
 Number of times this trace has been started. More...
 
pthread_mutex_t libtrace_lock
 Synchronise writes/reads across this format object and attached threads etc. More...
 
pthread_mutex_t read_packet_lock
 Packet read lock, seperate from libtrace_lock as to not block while reading a burst. More...
 
enum trace_state state
 State. More...
 
pthread_cond_t perpkt_cond
 Use to control pausing threads and finishing threads etc always used with libtrace_lock. More...
 
int perpkt_thread_states [THREAD_STATE_MAX]
 Keeps track of counts of threads in any given state. More...
 
bool perpkt_queue_full
 Set to indicate a perpkt's queue is full as such the writing perpkt cannot proceed. More...
 
void * global_blob
 Global storage for this trace, shared among all the threads. More...
 
libtrace_ocache_t packet_freelist
 The actual freelist. More...
 
enum hasher_types hasher_type
 The hasher function. More...
 
fn_hasher hasher
 The hasher function - NULL implies they don't care or balance. More...
 
void * hasher_data
 
enum hash_owner hasher_owner
 
int(* pread )(libtrace_t *, libtrace_thread_t *, libtrace_packet_t **, size_t)
 The pread_packet choosen path for the configuration. More...
 
libtrace_thread_t hasher_thread
 
libtrace_thread_t reporter_thread
 
libtrace_thread_t keepalive_thread
 
int perpkt_thread_count
 
libtrace_thread_tperpkt_threads
 
struct first_packets first_packets
 
int tracetime
 
libtrace_stat_tstats
 
struct user_configuration config
 
libtrace_combine_t combiner
 
struct callback_setperpkt_cbs
 
struct callback_setreporter_cbs
 

Detailed Description

A libtrace input trace.

Field Documentation

uint64_t libtrace_t::accepted_packets

Count of the number of packets returned to the libtrace user.

Referenced by trace_create(), trace_create_dead(), trace_get_accepted_packets(), trace_get_statistics(), and trace_read_packet().

libtrace_err_t libtrace_t::err

Error information for the trace.

Referenced by trace_create(), trace_create_dead(), trace_get_err(), and trace_is_err().

struct libtrace_event_status_t libtrace_t::event

Details of the most recent PACKET event reported by the trace.

Referenced by trace_create(), trace_create_dead(), and trace_destroy().

struct libtrace_filter_t* libtrace_t::filter

A BPF filter to be applied to all packets read by the trace - used only if the capture format does not support filters natively.

Referenced by trace_config(), trace_create(), trace_create_dead(), and trace_read_packet().

uint64_t libtrace_t::filtered_packets

Count of the number of packets filtered by libtrace.

Referenced by trace_create(), trace_create_dead(), trace_get_filtered_packets(), trace_get_statistics(), and trace_read_packet().

void* libtrace_t::format_data

Pointer to the "global" data for the capture format module.

Referenced by trace_create_dead(), and trace_destroy_dead().

void* libtrace_t::global_blob

Global storage for this trace, shared among all the threads.

Referenced by trace_create(), trace_create_dead(), and trace_pstart().

fn_hasher libtrace_t::hasher

The hasher function - NULL implies they don't care or balance.

Referenced by trace_create(), trace_create_dead(), and trace_set_hasher().

enum hasher_types libtrace_t::hasher_type

The hasher function.

Referenced by trace_set_hasher().

io_t* libtrace_t::io

The libtrace IO reader for this trace (if applicable)

Referenced by trace_create(), and trace_create_dead().

libtrace_packet_t* libtrace_t::last_packet

The packet read out by the trace, backwards compatibility to allow us to finalise a packet when the trace is destroyed.

Referenced by trace_create(), trace_create_dead(), trace_destroy(), trace_destroy_packet(), trace_fin_packet(), trace_pause(), trace_prepare_packet(), and trace_read_packet().

pthread_mutex_t libtrace_t::libtrace_lock

Synchronise writes/reads across this format object and attached threads etc.

Referenced by trace_create(), trace_create_dead(), trace_destroy(), trace_destroy_dead(), trace_ppause(), and trace_pstart().

libtrace_ocache_t libtrace_t::packet_freelist
pthread_cond_t libtrace_t::perpkt_cond

Use to control pausing threads and finishing threads etc always used with libtrace_lock.

Referenced by trace_create(), trace_create_dead(), trace_destroy(), trace_destroy_dead(), and trace_ppause().

bool libtrace_t::perpkt_queue_full

Set to indicate a perpkt's queue is full as such the writing perpkt cannot proceed.

Referenced by trace_create(), and trace_create_dead().

int libtrace_t::perpkt_thread_states[THREAD_STATE_MAX]

Keeps track of counts of threads in any given state.

Referenced by trace_ppause(), and trace_pstart().

int(* libtrace_t::pread)(libtrace_t *, libtrace_thread_t *, libtrace_packet_t **, size_t)

The pread_packet choosen path for the configuration.

Referenced by trace_create(), trace_create_dead(), trace_is_parallel(), and trace_pstart().

pthread_mutex_t libtrace_t::read_packet_lock

Packet read lock, seperate from libtrace_lock as to not block while reading a burst.

Referenced by trace_create(), trace_create_dead(), trace_destroy(), and trace_destroy_dead().

int libtrace_t::replayspeedup

Speed up the packet rate when using trace_event() to process trace files by this factor.

Referenced by trace_config(), and trace_create().

uint64_t libtrace_t::sequence_number

The sequence is like accepted_packets but we don't reset this after a pause.

Referenced by trace_create(), trace_create_dead(), and trace_read_packet().

size_t libtrace_t::snaplen

The snap length to be applied to all packets read by the trace - used only if the capture format does not support snapping natively.

Referenced by trace_config(), trace_create(), trace_create_dead(), and trace_read_packet().

bool libtrace_t::started

Boolean flag indicating whether the trace has been started.

Referenced by trace_create(), trace_create_dead(), trace_destroy(), trace_pause(), trace_ppause(), trace_pstart(), trace_read_packet(), and trace_start().

char* libtrace_t::uridata

The filename from the uri for the trace.

Referenced by trace_create(), trace_create_dead(), trace_destroy(), and trace_open_file().


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