nmsg 1.1.2
|
Base nmsg support header. More...
Go to the source code of this file.
Data Structures | |
struct | nmsg_idname |
Generic ID to name map. More... | |
Macros | |
#define | NMSG_LIBRARY_VERSION_NUMBER 1001002 |
Typedefs | |
typedef enum nmsg_res | nmsg_res |
typedef struct nmsg_container * | nmsg_container_t |
typedef struct nmsg_fltmod * | nmsg_fltmod_t |
typedef struct nmsg_io * | nmsg_io_t |
typedef struct nmsg_rate * | nmsg_rate_t |
typedef struct nmsg_random * | nmsg_random_t |
typedef struct nmsg_zbuf * | nmsg_zbuf_t |
typedef void(* | nmsg_cb_message) (nmsg_message_t msg, void *user) |
Callback function for processing nmsg messages. | |
typedef nmsg_res(* | nmsg_cb_message_read) (nmsg_message_t *msg, void *user) |
Callback function for generating nmsg messages. | |
Functions | |
nmsg_res | nmsg_init (void) |
Initialize the libnmsg library. | |
void | nmsg_set_autoclose (bool autoclose) |
Configure automatic close() behavior of nmsg inputs and outputs. | |
void | nmsg_set_debug (int debug) |
Set debug level. | |
int | nmsg_get_debug (void) |
Retrieve the current debug level. | |
const char * | nmsg_get_version (void) |
Retrieve the semantic library version as a string. | |
uint32_t | nmsg_get_version_number (void) |
Retrieve the semantic library version as a packed integer. | |
Base nmsg support header.
This header ensures that needed constants, functions, result codes, vendor definitions, and opaque pointer types are defined.
Definition in file nmsg.h.
typedef void(* nmsg_cb_message) (nmsg_message_t msg, void *user) |
Callback function for processing nmsg messages.
[in] | msg | Valid nmsg message. |
[in] | user | User-provided pointer. |
typedef nmsg_res(* nmsg_cb_message_read) (nmsg_message_t *msg, void *user) |
Callback function for generating nmsg messages.
[out] | msg | Pointer to where an nmsg_message_t object may be stored. |
[in] | user | User-provided pointer. |
nmsg_res nmsg_init | ( | void | ) |
Initialize the libnmsg library.
This function MUST be called before using any other libnmsg function. The caller MUST also check that this function returned nmsg_res_success before using any other libnmsg function. The library should only be initialized once.
void nmsg_set_autoclose | ( | bool | autoclose | ) |
Configure automatic close() behavior of nmsg inputs and outputs.
The default behavior is for nmsg_input_close(), nmsg_output_close(), and nmsg_io_destroy() to automatically close the underlying file descriptors for libnmsg inputs and outputs.
autoclose | False to disable automatic close() behavior, true to re-enable. |
void nmsg_set_debug | ( | int | debug | ) |
Set debug level.
If the debug level is greater than 0, some libnmsg functions will emit debugging information to stderr. Higher values increase verbosity.
uint32_t nmsg_get_version_number | ( | void | ) |
Retrieve the semantic library version as a packed integer.
The number is a combination of the major, minor, and patchelevel numbers as per: MAJOR * 1000000 + MINOR * 1000 + PATCHLEVEL.