Libtrap: Internal development docs  1.16.1
Modules | Data Structures | Macros | Typedefs | Functions
TRAP communication module interface
Collaboration diagram for TRAP communication module interface:

Modules

 IFC API
 
 file interface module
 
 TCP/IP and UNIX socket communication interface module
 
 TLS communication interface module
 

Data Structures

struct  trap_input_ifc_s
 
struct  trap_output_ifc_s
 

Macros

#define TRAP_IFC_DEFAULT_MAX_CLIENTS   64
 

Typedefs

typedef struct trap_input_ifc_s trap_input_ifc_t
 
typedef struct trap_output_ifc_s trap_output_ifc_t
 

Functions

void trap_set_timeouts (int timeout, struct timeval *tm, struct timespec *tmnblk)
 Internal function for setting of timeout structs according to libtrap timeout. More...
 
void trap_set_abs_timespec (struct timeval *tm, struct timespec *tmnblk)
 Internal function for setting of timeout structs according to libtrap timeout. More...
 

Detailed Description

Macro Definition Documentation

◆ TRAP_IFC_DEFAULT_MAX_CLIENTS

#define TRAP_IFC_DEFAULT_MAX_CLIENTS   64

Default max number of clients that can connect to output interface. It takes effect when no value is given during interface initialization.

Definition at line 64 of file trap_ifc.h.

Typedef Documentation

◆ trap_input_ifc_t

Struct to hold an instance of some input interface.

◆ trap_output_ifc_t

Struct to hold an instance of some output interface.

Function Documentation

◆ trap_set_abs_timespec()

void trap_set_abs_timespec ( struct timeval *  tm,
struct timespec *  tmnblk 
)

Internal function for setting of timeout structs according to libtrap timeout.

Parameters
[in]tmPrecomputed timeval, set using e.g. trap_set_timeouts().
[out]tmnblkUsed for sem_timedwait() call to block on semaphore.

Definition at line 1190 of file trap.c.

◆ trap_set_timeouts()

void trap_set_timeouts ( int  timeout,
struct timeval *  tm,
struct timespec *  tmnblk 
)

Internal function for setting of timeout structs according to libtrap timeout.

Parameters
[in]timeouttimeout in microseconds, or TRAP Timeout
[out]tmused for select() call when non-blocking
[out]tmnblkused for sem_timedwait() call to block on semaphore.

Definition at line 1211 of file trap.c.