|
const char trap_version [] | __attribute__ ((used)) |
|
static char * | get_param_by_delimiter (const char *source, char **dest, const char delimiter) |
|
void * | service_thread_routine (void *arg) |
|
void | trap_check_global_vars (void) |
|
void | trap_free_global_vars (void) |
|
trap_module_info_t * | trap_create_module_info (const char *mname, const char *mdesc, int8_t i_ifcs, int8_t o_ifcs, uint16_t param_count) |
|
int | trap_update_module_param (trap_module_info_t *m, uint16_t param_id, char shortopt, const char *longopt, const char *desc, int req_arg, const char *arg_type) |
|
int | trap_check_buffer_content (void *buffer, uint32_t buffer_size) |
| Check content of buffer, iterate over message headers. More...
|
|
static int | trap_read_from_buffer (trap_ctx_priv_t *ctx, uint32_t ifc_idx, const void **data, uint16_t *size, int timeout) |
|
void | trap_set_help_section (int level) |
|
int | trap_parse_params (int *argc, char **argv, trap_ifc_spec_t *ifc_spec) |
|
int | trap_free_ifc_spec (trap_ifc_spec_t ifc_spec) |
|
void | trap_free_ctx_t (trap_ctx_priv_t **ctx) |
|
int | trap_init (trap_module_info_t *module_info, trap_ifc_spec_t ifc_spec) |
|
int | trap_terminate () |
|
int | trap_finalize () |
|
void | trap_get_internal_buffer (trap_ctx_priv_t *ctx, uint16_t ifc_idx, const void **data, uint32_t *size) |
| Get pointer to data stored in buffer (with headers) and mark buffer as clean. More...
|
|
int | trap_send_data (unsigned int ifcidx, const void *data, uint16_t size, int timeout) |
|
int | trap_send (uint32_t ifcidx, const void *data, uint16_t size) |
| Send data via output interface. More...
|
|
int | trap_recv (uint32_t ifcidx, const void **data, uint16_t *size) |
| Receive data from input interface. More...
|
|
void | trap_set_verbose_level (int level) |
|
int | trap_get_verbose_level () |
|
void | trap_json_print_string (char *str) |
|
void | trap_convert_module_info_to_json (const trap_module_info_t *info) |
|
static void | print_aligned (const char *s, uint16_t align, uint16_t cut) |
|
static void | print_aligned_multiline (const char *s, uint16_t align, uint16_t cut) |
|
static uint16_t | get_terminal_width () |
|
char * | get_module_name (void) |
|
void | trap_print_help (const trap_module_info_t *module_info) |
|
void | trap_print_ifc_spec_help () |
|
char * | trap_get_param_by_delimiter (const char *source, char **dest, const char delimiter) |
| Splitter of params string. Cut the first param, copy it into dest and returns pointer to the start of following parameter. More...
|
|
void | trap_set_abs_timespec (struct timeval *tm, struct timespec *tmnblk) |
| Internal function for setting of timeout structs according to libtrap timeout. More...
|
|
void | trap_set_timeouts (int timeout, struct timeval *tm, struct timespec *tmnblk) |
| Internal function for setting of timeout structs according to libtrap timeout. More...
|
|
int | trap_ifcctl (int8_t type, uint32_t ifcidx, int32_t request,...) |
| Control TRAP interface. More...
|
|
void | trap_send_flush (uint32_t ifc) |
| Force flush of buffer. More...
|
|
trap_ctx_priv_t * | trap_create_ctx_t () |
|
int | trap_ctx_terminate (trap_ctx_t *ctx) |
| Terminate libtrap context. More...
|
|
static uint64_t | get_cur_timestamp () |
|
int | trap_ctx_recv (trap_ctx_t *ctx, uint32_t ifc, const void **data, uint16_t *size) |
| Read data from input interface. More...
|
|
int | trap_ctx_finalize (trap_ctx_t **ctx) |
| Terminate libtrap context and free resources. More...
|
|
int | trap_ctx_send (trap_ctx_t *ctx, unsigned int ifc, const void *data, uint16_t size) |
| Send data via output interface. More...
|
|
static void | remove_setter_from_param (char *params, char *setter) |
|
static void | handle_inifc_setters (trap_input_ifc_t *ifc, char *params) |
|
static int | trapifc_in_construct (trap_ctx_priv_t *ctx, trap_ifc_spec_t *ifc_spec, int idx) |
|
static void | handle_outifc_setters (trap_output_ifc_t *ifc, char *params) |
|
static int | trapifc_out_construct (trap_ctx_priv_t *ctx, trap_ifc_spec_t *ifc_spec, int idx) |
|
trap_ctx_t * | trap_ctx_init3 (const char *name, const char *description, int8_t i_ifcs, int8_t o_ifcs, const char *ifc_spec, const char *service_ifcname) |
| Initialize and return the context of libtrap. More...
|
|
trap_ctx_t * | trap_ctx_init (trap_module_info_t *module_info, trap_ifc_spec_t ifc_spec) |
| Initialize and return the context of libtrap. More...
|
|
trap_ctx_t * | trap_ctx_init2 (trap_module_info_t *module_info, trap_ifc_spec_t ifc_spec, const char *service_ifcname) |
| Initialize and return the context of libtrap. More...
|
|
int | trap_ctx_ifcctl (trap_ctx_t *ctx, int8_t type, uint32_t ifcidx, int32_t request,...) |
| Control TRAP interface. More...
|
|
int | trap_ctx_vifcctl (trap_ctx_t *ctx, int8_t type, uint32_t ifcidx, int32_t request, va_list ap) |
| Control TRAP interface. More...
|
|
int | trap_ctx_get_last_error (trap_ctx_t *ctx) |
| Get last result code from libtrap context. More...
|
|
const char * | trap_ctx_get_last_error_msg (trap_ctx_t *ctx) |
| Get last (error) message from libtrap context. More...
|
|
void | trap_ctx_send_flush (trap_ctx_t *ctx, uint32_t ifc) |
| Force flush of buffer. More...
|
|
int | service_get_data (int sock_d, uint32_t size, void **data) |
|
int | service_send_data (int sock_d, uint32_t size, void **data) |
|
int | encode_cnts_to_json (char **data, trap_ctx_priv_t *ctx) |
|
void | trap_ctx_create_ifc_dump (trap_ctx_t *ctx, const char *path) |
| Create dump files. More...
|
|
int | trap_ctx_get_client_count (trap_ctx_t *ctx, uint32_t ifcidx) |
| Get number of connected clients. More...
|
|
void | trap_ctx_vset_data_fmt (trap_ctx_t *ctx, uint32_t out_ifc_idx, uint8_t data_type, va_list ap) |
|
void | trap_ctx_set_data_fmt (trap_ctx_t *ctx, uint32_t out_ifc_idx, uint8_t data_type,...) |
|
int | trap_ctx_vset_required_fmt (trap_ctx_t *ctx, uint32_t in_ifc_idx, uint8_t data_type, va_list ap) |
|
int | trap_ctx_set_required_fmt (trap_ctx_t *ctx, uint32_t in_ifc_idx, uint8_t data_type,...) |
|
int | trap_ctx_get_data_fmt (trap_ctx_t *ctx, uint8_t ifc_dir, uint32_t ifc_idx, uint8_t *data_type, const char **spec) |
|
void | trap_set_data_fmt (uint32_t out_ifc_idx, uint8_t data_type,...) |
|
int | trap_set_required_fmt (uint32_t in_ifc_idx, uint8_t data_type,...) |
|
int | trap_get_data_fmt (uint8_t ifc_dir, uint32_t in_ifc_idx, uint8_t *data_type, const char **spec) |
|
int | trap_ctx_get_in_ifc_state (trap_ctx_t *ctx, uint32_t ifc_idx) |
|
int | trap_get_in_ifc_state (uint32_t ifc_idx) |
|
const char * | trap_get_type_and_name_from_string (const char *source, const char **name, const char **type, int *length_name, int *length_type) |
|
int | trap_ctx_cmp_data_fmt (const char *sender_ifc_data_fmt, const char *receiver_ifc_data_fmt) |
|
void * | trap_get_global_ctx () |
|
int | output_ifc_negotiation (void *ifc_priv_data, char ifc_type, uint32_t client_idx) |
|
int | input_ifc_negotiation (void *ifc_priv_data, char ifc_type) |
|