Libtrap: Internal development docs  1.16.1
Macros | Enumerations | Functions
ifc_tcpip.h File Reference

TRAP TCP/IP interfaces. More...

#include "trap_ifc.h"
Include dependency graph for ifc_tcpip.h:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

TRAP TCP/IP interfaces.

Author
Tomas Cejka cejka.nosp@m.t@ce.nosp@m.snet..nosp@m.cz
Date
2013
2014

Definition in file ifc_tcpip.h.

Macro Definition Documentation

◆ DEFAULT_SOCKET_FORMAT

#define DEFAULT_SOCKET_FORMAT   "/trap-%s.sock"

Definition at line 55 of file ifc_tcpip.h.

◆ TCPIP_IFC_PARAMS_DELIMITER

#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.

◆ TCPIP_SOCKETTYPE_STR

#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.

◆ UNIX_PATH_FILENAME_FORMAT

#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.

Enumeration Type Documentation

◆ 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.