26 #ifndef __CORSARO_INT_H
27 #define __CORSARO_INT_H
49 # define DEPRECATED __attribute__((deprecated))
50 # define SIMPLE_FUNCTION __attribute__((pure))
51 # define UNUSED __attribute__((unused))
52 # define PACKED __attribute__((packed))
53 # define PRINTF(formatpos,argpos) __attribute__((format(printf,formatpos,argpos)))
56 # define SIMPLE_FUNCTION
59 # define PRINTF(formatpos,argpos)
79 CORSARO_MAGIC_DATA = 0x44415441,
81 CORSARO_MAGIC_TRAILER = 0x464F4F54
185 #define CORSARO_INTERVAL_DEFAULT 60
227 #define LT_PKT(corsaro_packet) (corsaro_packet->ltpacket)
347 #define CORSARO_IN_RECORD_DEFAULT_BUFFER_LEN LIBTRACE_PACKET_BUFSIZE+1024
Structure representing the start or end of an interval.
An opaque structure defining an corsaro input file.
uint32_t last_packet_time
The trace time of the last packet (seconds)
corsaro_plugin_t * plugin
Pointer to the plugin to be used to read this file.
Plugins which write output should ignore this packet.
int interval
The number of seconds after which plugins will be asked to dump data.
Header file dealing with the corsaro plugin manager.
int compress_level
The compression level (ignored if not compressing)
uint64_t dropped_pkts
The total number of packets that have been dropped by libtrace (before the current interval) ...
Header file which exports the public libcorsaro API.
Structure representing the start or end of a plugin data block.
uint64_t packet_cnt
The total number of packets that have been processed.
An opaque structure defining an corsaro output file.
struct timeval init_time
The local wall time that corsaro was started at.
A reusable opaque structure for corsaro to read an input record into.
int interval_end_needed
Whether there are un-dumped packets in the current interval.
corsaro_interval_align_t interval_align
The first interval end will be rounded down to the nearest integer multiple of the interval length if...
corsaro_file_mode_t output_mode
The default output mode for new files.
corsaro_plugin_manager_t * plugin_manager
A pointer to the corsaro plugin manager state.
uint32_t corsaro_magic
The global corsaro magic number.
size_t buffer_len
The length of the buffer.
int started
Has this corsaro_in object been started yet?
uint32_t magic
The interval magic number.
uint32_t plugin_magic
The plugin magic.
uint64_t accepted_pkts
The total number of packets that have been accepted by libtrace (before the current interval) ...
corsaro_packet_t * packet
A pointer to the wrapper packet passed to the plugins.
Structure which represents a geolocation provider.
uint32_t corsaro_magic
The global corsaro magic number.
struct timeval last_ts
The time of the most recent packet seen by corsaro.
Highest numbered geolocation provider ID.
libtrace_packet_t * ltpacket
A pointer to the underlying libtrace packet.
uint16_t number
The interval number (starts at 0)
corsaro header magic number - "HEAD"
A lightweight wrapper around a libtrace packet.
corsaro_plugin_manager_t * plugin_manager
A pointer to the corsaro plugin manager state.
int logfile_disabled
Has the user asked us not to log to a file?
Holds the metadata for the plugin manager.
Overall corsaro magic number - "EDGR".
Structure representing a corsaro file trailer.
corsaro_in_record_type_t expected_type
The next expected record type when reading the corsaro_global file.
uint32_t first_packet_time
The trace time of the first packet (seconds)
enum corsaro_interval_align corsaro_interval_align_t
Settings for interval alignment.
uint64_t packet_cnt
The total number of packets that corsaro processed.
uint32_t magic
The trailer magic number.
Header file dealing with the low-level file IO.
uint64_t accepted_cnt
The number of packets libtrace reports as accepted.
int meta_output_rotate
The meta output files will be rotated after n intervals if >=0 a value of 0 indicates no rotation...
enum corsaro_file_compress corsaro_file_compress_t
Supported compression types (must be kept in sync with wandio)
corsaro_packet_state_t state
The corsaro state associated with this packet.
uint8_t flags
Features of the packet that have been identified by earlier plugins.
uint8_t * buffer
The buffer to read the record into.
int output_rotate
The output files will be rotated after n intervals if >0.
corsaro_interval_t interval_start
State for the current interval.
corsaro_magic
Enum of overall corsaro magic numbers.
corsaro_geo_provider_t * geo_provider_default
Default geolocation provider object associated with this packet.
corsaro interval magic number - "INTR"
The packet is classified as backscatter.
int global_file_disabled
Has the user asked us not to create a global output file?
uint32_t time
The time this interval started/ended.
char * monitorname
The name of the monitor that corsaro is running on.
uint32_t corsaro_magic
The global corsaro magic number.
corsaro_geo_provider_t * geo_providers[CORSARO_GEO_PROVIDER_MAX]
Array of geolocation provider objects associated with this packet.
enum corsaro_magic corsaro_magic_t
Enum of overall corsaro magic numbers.
char * uridata
The uri that was used to open the trace file.
char * uridata
The uri of the file to read data from.
uint32_t magic
The plugin data magic number.
corsaro_file_compress_t compress
The compression type (based on the file name)
Corsaro state for a packet.
uint32_t local_final_time
The time that corsaro completed processing the trace.
corsaro_in_t * corsaro
The corsaro input object the record is associated with.
struct timeval first_ts
The time of the the first packet seen by corsaro.
corsaro_file_t * logfile
The file to write log output to.
corsaro_file_t * global_file
The corsaro output file to write global output to.
libtrace_t * trace
The libtrace trace pointer for the trace that we are being fed.
corsaro_in_record_type_t type
The type of the record currently in the buffer.
uint32_t runtime
The number of (wall) seconds that corsaro took to process the trace.
int started
Has this corsaro object been started yet?
uint64_t dropped_cnt
The number of packets libtrace reports as dropped.
enum corsaro_file_mode corsaro_file_mode_t
Enum of supported file modes.
enum corsaro_in_record_type corsaro_in_record_type_t
Corsaro input record types.
uint32_t next_report
The time that this interval will be dumped at.
Header file dealing with the corsaro geolocation subsystem.
An corsaro packet processing plugin.
corsaro_file_in_t * file
The corsaro input file to read data from.