SELKIELogger
1.0.0
|
Classes | |
struct | net_params |
Network device specific parameters. More... | |
Functions | |
void * | net_setup (void *ptargs) |
Device thread setup. More... | |
void * | net_logging (void *ptargs) |
Network source main logging loop. More... | |
void * | net_shutdown (void *ptargs) |
Network source shutdown. More... | |
void * | net_channels (void *ptargs) |
Channel map. More... | |
bool | net_connect (void *ptargs) |
Network connection helper function. More... | |
device_callbacks | net_getCallbacks (void) |
Fill out device callback functions for logging. More... | |
net_params | net_getParams (void) |
Fill out default MP source parameters. More... | |
bool | net_parseConfig (log_thread_args_t *lta, config_section *s) |
Take a configuration section and parse parameters. More... | |
Adds support for reading arbitrary data from network devices that output messages not otherwise covered or interpreted by this software.
void* net_channels | ( | void * | ptargs | ) |
Channel map.
Populate list of channels and push to queue as a map message
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 263 of file LoggerNet.c.
bool net_connect | ( | void * | ptargs | ) |
Network connection helper function.
Closes any existing connection, then attempts to open a new connection using the details in net_params.
Socket is set as nonblocking, so zero-length reads are to be expected.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 176 of file LoggerNet.c.
device_callbacks net_getCallbacks | ( | void | ) |
Fill out device callback functions for logging.
Definition at line 236 of file LoggerNet.c.
net_params net_getParams | ( | void | ) |
Fill out default MP source parameters.
Definition at line 247 of file LoggerNet.c.
void* net_logging | ( | void * | ptargs | ) |
Network source main logging loop.
Reads messages from the connection established by net_setup(), and pushes them to the queue. Data is not interpreted, just pushed into the queue with suitable headers.
Message size is variable, based on min/max limits and the amount of data available to read from the source.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 66 of file LoggerNet.c.
bool net_parseConfig | ( | log_thread_args_t * | lta, |
config_section * | s | ||
) |
Take a configuration section and parse parameters.
[in] | lta | Pointer to log_thread_args_t |
[in] | s | Pointer to config_section to be parsed |
Definition at line 306 of file LoggerNet.c.
void* net_setup | ( | void * | ptargs | ) |
Device thread setup.
The actual work is delegated to net_connect() so we can reuse the logic elsewhere
It is assumed that no other setup is required for these devices.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 41 of file LoggerNet.c.
void* net_shutdown | ( | void * | ptargs | ) |
Network source shutdown.
Simple wrapper around net_closeConnection(), which will do any cleanup required.
[in] | ptargs | Pointer to log_thread_args_t |
Definition at line 147 of file LoggerNet.c.