Libtrap: Internal development docs
1.16.1
|
TRAP dummy interfaces (generator and blackhole) More...
#include "trap_ifc.h"
Go to the source code of this file.
Functions | |
int | create_generator_ifc (trap_ctx_priv_t *ctx, char *params, trap_input_ifc_t *ifc) |
int | create_blackhole_ifc (trap_ctx_priv_t *ctx, char *params, trap_output_ifc_t *ifc) |
int create_blackhole_ifc | ( | trap_ctx_priv_t * | ctx, |
char * | params, | ||
trap_output_ifc_t * | ifc | ||
) |
Create Blackhole interface (output ifc). Send function of this interface does nothing, so everything sent to a blackhole is dropped.
[in] | ctx | Pointer to the private libtrap context data (trap_ctx_init()). |
[in] | params | Ignored. |
[out] | ifc | Created interface. |
Definition at line 227 of file ifc_dummy.c.
int create_generator_ifc | ( | trap_ctx_priv_t * | ctx, |
char * | params, | ||
trap_input_ifc_t * | ifc | ||
) |
Create Generator interface (input ifc). Receive function of this interface returns always the same data. These data are given in params on creation.
[in] | ctx | Pointer to the private libtrap context data (trap_ctx_init()). |
[in] | params | Array of n+1 bytes. First byte is equal to n, other bytes are data the generator should generate. |
[out] | ifc | Created interface. |
Definition at line 113 of file ifc_dummy.c.