Libtrap: Internal development docs
1.16.1
|
TRAP TCP/IP interfaces. More...
#include "trap_ifc.h"
Go to the source code of this file.
Macros | |
#define | TCPIP_IFC_PARAMS_DELIMITER (',') |
#define | DEFAULT_SOCKET_FORMAT "/trap-%s.sock" |
#define | UNIX_PATH_FILENAME_FORMAT DEFAULTSOCKETDIR DEFAULT_SOCKET_FORMAT |
#define | TCPIP_SOCKETTYPE_STR(st) (st == TRAP_IFC_TCPIP?"TCP":(st == TRAP_IFC_TCPIP_UNIX ? "UNIX": "SERVICE")) |
Enumerations | |
enum | tcpip_ifc_sockettype { TRAP_IFC_TCPIP, TRAP_IFC_TCPIP_UNIX, TRAP_IFC_TCPIP_SERVICE } |
Functions | |
int | create_tcpip_sender_ifc (trap_ctx_priv_t *ctx, const char *params, trap_output_ifc_t *ifc, uint32_t idx, enum tcpip_ifc_sockettype type) |
Constructor of output TCP/IP IFC module. This function is called by TRAP library to initialize one output interface. More... | |
int | create_tcpip_receiver_ifc (trap_ctx_priv_t *ctx, char *params, trap_input_ifc_t *ifc, uint32_t itx, enum tcpip_ifc_sockettype type) |
Constructor of input TCP/IP IFC module. This function is called by TRAP library to initialize one input interface. More... | |
#define DEFAULT_SOCKET_FORMAT "/trap-%s.sock" |
Definition at line 55 of file ifc_tcpip.h.
#define TCPIP_IFC_PARAMS_DELIMITER (',') |
Delimiter used between params in the create_tcpip_sender_ifc and create_tcpip_receiver_ifc functions.
Definition at line 52 of file ifc_tcpip.h.
#define TCPIP_SOCKETTYPE_STR | ( | st | ) | (st == TRAP_IFC_TCPIP?"TCP":(st == TRAP_IFC_TCPIP_UNIX ? "UNIX": "SERVICE")) |
Definition at line 75 of file ifc_tcpip.h.
#define UNIX_PATH_FILENAME_FORMAT DEFAULTSOCKETDIR DEFAULT_SOCKET_FORMAT |
Communication via UNIX socket needs to specify path to socket file. It is currently placed according to this format, where s is replaced by port given as an argument of TCPIP IFC.
Definition at line 64 of file ifc_tcpip.h.
enum tcpip_ifc_sockettype |
Type of socket that is used for the TRAP interface.
Enumerator | |
---|---|
TRAP_IFC_TCPIP | use TCP/IP connection |
TRAP_IFC_TCPIP_UNIX | use UNIX socket for local communication |
TRAP_IFC_TCPIP_SERVICE | use UNIX socket as a service interface |
Definition at line 70 of file ifc_tcpip.h.