53 #include <semaphore.h> 63 #ifndef TRAP_IFC_DEFAULT_MAX_CLIENTS 64 #define TRAP_IFC_DEFAULT_MAX_CLIENTS 64 164 typedef char * (*ifc_get_id_func_t)(
void *priv);
292 void trap_set_timeouts(
int timeout,
struct timeval *tm,
struct timespec *tmnblk);
int(* ifc_send_func_t)(void *p, const void *d, uint16_t s, int t)
int(* ifc_recv_func_t)(void *p, void *d, uint32_t *s, int t)
char *(* ifc_get_id_func_t)(void *priv)
ifc_get_client_stats_json_func_t get_client_stats_json
Pointer to get_client_stats_json function.
struct trap_input_ifc_s trap_input_ifc_t
pthread_mutex_t ifc_mtx
Locking mutex for interface.
void(* ifc_create_dump_func_t)(void *p, uint32_t i, const char *d)
void trap_set_abs_timespec(struct timeval *tm, struct timespec *tmnblk)
Internal function for setting of timeout structs according to libtrap timeout.
void trap_set_timeouts(int timeout, struct timeval *tm, struct timespec *tmnblk)
Internal function for setting of timeout structs according to libtrap timeout.
ifc_get_id_func_t get_id
Pointer to get_id function.
int8_t(* ifc_get_client_stats_json_func_t)(void *p, json_t *client_stats_arr)
void(* ifc_destroy_func_t)(void *p)
void(* ifc_flush_func_t)(void *p)
int32_t(* ifc_get_client_count_func_t)(void *p)
struct trap_output_ifc_s trap_output_ifc_t
ifc_create_dump_func_t create_dump
Pointer to function for generating of dump.
char ifc_type
Type of interface.
ifc_get_client_count_func_t get_client_count
Pointer to get_client_count function.
ifc_disconn_clients_func_t disconn_clients
Pointer to disconnect_clients function.
char bufferswitch
Enable (1) or Disable (0) buffering, default is Enabled (1).
int32_t datatimeout
Timeout for *_send() calls.
ifc_send_func_t send
Pointer to send function.
int64_t timeout
Internal structure to send partial data after timeout (autoflush).
ifc_destroy_func_t destroy
Pointer to destructor function.
ifc_terminate_func_t terminate
Pointer to terminate function.
ifc_flush_func_t flush
Pointer to flush function.
void * priv
Pointer to instance's private data.
void(* ifc_terminate_func_t)(void *p)
uint8_t(* ifc_is_conn_func_t)(void *priv)
void(* ifc_disconn_clients_func_t)(void *p)