UM C API
6.16.1
|
Ultra Messaging (UM) Monitoring API. The "lbmmon.h" header file defines APIs for UM application monitoring, both the send side (application being monitored) and the receive side (application doing the monitoring). The binary code is contained in the "lbm" library (dynamic on Unix: "liblbm.so", static on Unix: "liblbm.a", dynamic only on Windows: "lbm.dll"). See Monitoring UM with the lbmmon API for general information on UM monitoring. See UM C API for general information on the C API. See Fundamental Concepts for an introduction to Ultra Messaging. More...
#include <stdlib.h>
#include <lbm/lbm.h>
#include <gen/um_mon_attributes.pb-c.h>
#include <gen/ump_mon.pb-c.h>
#include <gen/um_mon_control.pb-c.h>
#include <gen/ums_mon.pb-c.h>
#include <gen/dro_mon.pb-c.h>
#include <gen/srs_mon.pb-c.h>
#include <lbm/lbmmonfmtcsv.h>
#include <lbm/lbmmonfmtpb.h>
#include <lbm/lbmmontrlbm.h>
#include <lbm/lbmmontrudp.h>
#include <lbm/lbmmontrlbmsnmp.h>
Go to the source code of this file.
Data Structures | |
struct | lbmmon_packet_hdr_t_stct |
Statistics packet header layout. More... | |
struct | lbmmon_packet_attributes_t_stct |
struct | lbmmon_attr_block_t_stct |
Statistics attribute block layout. Associated with each statistics message is a set of optional attributes. Any attributes present will immediately follow the packet header. More... | |
struct | lbmmon_attr_entry_t_stct |
Statistics attribute entry layout. Each attribute entry within the attributes block consists of an entry header, followed immediately by the attribute data. More... | |
struct | lbmmon_format_func_t_stct |
Format module function pointer container. More... | |
struct | lbmmon_rcv_statistics_func_t_stct |
A structure that holds the callback information for receiver statistics. More... | |
struct | lbmmon_src_statistics_func_t_stct |
A structure that holds the callback information for source statistics. More... | |
struct | lbmmon_evq_statistics_func_t_stct |
A structure that holds the callback information for event queue statistics. More... | |
struct | lbmmon_ctx_statistics_func_t_stct |
A structure that holds the callback information for context statistics. More... | |
struct | lbmmon_rcv_topic_statistics_func_t_stct |
For internal use only. A structure that holds the callback information for receiver topic statistics. More... | |
struct | lbmmon_wildcard_rcv_statistics_func_t_stct |
A structure that holds the callback information for wildcard receiver statistics. More... | |
struct | lbmmon_umestore_statistics_func_t_stct |
A structure that holds the callback information for store statistics. More... | |
struct | lbmmon_gateway_statistics_func_t_stct |
A structure that holds the callback information for gateway statistics. More... | |
struct | lbmmon_passthrough_statistics_func_t_stct |
A structure that holds the callback information for the passthrough format option. More... | |
struct | lbmmon_transport_func_t_stct |
Transport module function pointer container. More... | |
Typedefs | |
typedef struct lbmmon_packet_hdr_t_stct | lbmmon_packet_hdr_t |
Statistics packet header layout. More... | |
typedef struct lbmmon_packet_attributes_t_stct | lbmmon_packet_attributes_t |
typedef struct lbmmon_attr_block_t_stct | lbmmon_attr_block_t |
Statistics attribute block layout. Associated with each statistics message is a set of optional attributes. Any attributes present will immediately follow the packet header. | |
typedef struct lbmmon_attr_entry_t_stct | lbmmon_attr_entry_t |
Statistics attribute entry layout. Each attribute entry within the attributes block consists of an entry header, followed immediately by the attribute data. | |
typedef int(* | lbmmon_format_init_t) (void **FormatClientData, const void *FormatOptions) |
Function to initialize a format module. More... | |
typedef int(* | lbmmon_format_apply_options_t) (void *FormatClientData, const void *FormatOptions) |
Function to apply options to a format module at startup or dynamically to a running system. More... | |
typedef int(* | lbmmon_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_rcv_transport_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_rcv_transport_stats_t structure. More... | |
typedef int(* | lbmmon_src_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_src_transport_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_src_transport_stats_t structure. More... | |
typedef int(* | lbmmon_evq_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_event_queue_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_event_queue_stats_t structure. More... | |
typedef int(* | lbmmon_ctx_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_context_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_context_stats_t structure. More... | |
typedef int(* | lbmmon_rcv_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_rcv_transport_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_rcv_transport_stats_t structure. More... | |
typedef int(* | lbmmon_src_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_src_transport_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_src_transport_stats_t structure. More... | |
typedef int(* | lbmmon_evq_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_event_queue_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_event_queue_stats_t structure. More... | |
typedef int(* | lbmmon_ctx_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_context_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_context_stats_t structure. More... | |
typedef int(* | lbmmon_rcv_topic_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const char *Topic, lbm_ulong_t SourceCount, const lbm_rcv_topic_stats_t *Sources, void *FormatClientData) |
Function to serialize receiver topic statistics. More... | |
typedef int(* | lbmmon_rcv_topic_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, size_t *Count, lbm_rcv_topic_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_rcv_topic_stats_t structure. More... | |
typedef int(* | lbmmon_wildcard_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_wildcard_rcv_stats_t *Statistics, void *FormatClientData) |
Function to serialize wildcard receiver statistics. More... | |
typedef int(* | lbmmon_wildcard_rcv_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_wildcard_rcv_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_wildcard_rcv_stats_t structure. More... | |
typedef int(* | lbmmon_umestore_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, Lbmmon__UMPMonMsg *StoreMsg, int Action, void *FormatClientData) |
Function to serialize store statistics. More... | |
typedef int(* | lbmmon_umestore_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, Lbmmon__UMPMonMsg **StoreMsg, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
typedef char *(* | lbmmon_umestore_filter_options_t) (const char *FormatOptions) |
Function to return the store filter options from a format module. More... | |
typedef int(* | lbmmon_umestore_free_unpacked_t) (Lbmmon__UMPMonMsg *StoreMsg) |
Function to free an unpacked Lbmmon__UMPMonMsg structure. More... | |
typedef int(* | lbmmon_gateway_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, Lbmmon__DROMonMsg *GatewayMsg, void *FormatClientData) |
Function to serialize gateway statistics. More... | |
typedef int(* | lbmmon_gateway_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, Lbmmon__DROMonMsg **GatewayMsg, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
typedef int(* | lbmmon_gateway_free_unpacked_t) (Lbmmon__DROMonMsg *GatewayMsg) |
Function to free an unpacked Lbmmon__DROMonMsg structure. More... | |
typedef int(* | lbmmon_format_finish_t) (void *FormatClientData) |
Function to finish format module processing. More... | |
typedef const char *(* | lbmmon_format_errmsg_t) (void) |
Function to return the last error message from a format module. More... | |
typedef struct lbmmon_format_func_t_stct | lbmmon_format_func_t |
Format module function pointer container. | |
typedef void(* | lbmmon_rcv_statistics_cb) (const void *AttributeBlock, const lbm_rcv_transport_stats_t *Statistics, void *ClientData) |
Client callback function to process a received receiver statistics packet. More... | |
typedef struct lbmmon_rcv_statistics_func_t_stct | lbmmon_rcv_statistics_func_t |
A structure that holds the callback information for receiver statistics. More... | |
typedef void(* | lbmmon_src_statistics_cb) (const void *AttributeBlock, const lbm_src_transport_stats_t *Statistics, void *ClientData) |
Client callback function to process a received source statistics packet. More... | |
typedef struct lbmmon_src_statistics_func_t_stct | lbmmon_src_statistics_func_t |
A structure that holds the callback information for source statistics. More... | |
typedef void(* | lbmmon_evq_statistics_cb) (const void *AttributeBlock, const lbm_event_queue_stats_t *Statistics, void *ClientData) |
Client callback function to process a received event queue statistics packet. More... | |
typedef struct lbmmon_evq_statistics_func_t_stct | lbmmon_evq_statistics_func_t |
A structure that holds the callback information for event queue statistics. More... | |
typedef void(* | lbmmon_ctx_statistics_cb) (const void *AttributeBlock, const lbm_context_stats_t *Statistics, void *ClientData) |
Client callback function to process a received context statistics packet. More... | |
typedef struct lbmmon_ctx_statistics_func_t_stct | lbmmon_ctx_statistics_func_t |
A structure that holds the callback information for context statistics. More... | |
typedef void(* | lbmmon_rcv_topic_statistics_cb) (const void *AttributeBlock, const lbm_rcv_topic_stats_t *Statistics, void *ClientData) |
For internal use only. Client callback function to process a received receiver topic statistics packet. More... | |
typedef struct lbmmon_rcv_topic_statistics_func_t_stct | lbmmon_rcv_topic_statistics_func_t |
For internal use only. A structure that holds the callback information for receiver topic statistics. More... | |
typedef void(* | lbmmon_wildcard_rcv_statistics_cb) (const void *AttributeBlock, const lbm_wildcard_rcv_stats_t *Statistics, void *ClientData) |
For internal use only. Client callback function to process a received wildcard receiver statistics packet. More... | |
typedef struct lbmmon_wildcard_rcv_statistics_func_t_stct | lbmmon_wildcard_rcv_statistics_func_t |
A structure that holds the callback information for wildcard receiver statistics. More... | |
typedef void(* | lbmmon_umestore_statistics_cb) (const void *AttributeBlock, const Lbmmon__UMPMonMsg *StoreMsg, void *ClientData) |
Client callback function to process a received store statistics packet. More... | |
typedef struct lbmmon_umestore_statistics_func_t_stct | lbmmon_umestore_statistics_func_t |
A structure that holds the callback information for store statistics. More... | |
typedef void(* | lbmmon_gateway_statistics_cb) (const void *AttributeBlock, const Lbmmon__DROMonMsg *GatewayMsg, void *ClientData) |
Client callback function to process a received gateway statistics packet. More... | |
typedef struct lbmmon_gateway_statistics_func_t_stct | lbmmon_gateway_statistics_func_t |
A structure that holds the callback information for gateway statistics. More... | |
typedef void(* | lbmmon_passthrough_statistics_cb) (const lbmmon_packet_hdr_t *PacketHeader, lbmmon_packet_attributes_t *Attributes, void *AttributeBlock, void *Statistics, size_t Length, void *ClientData) |
Client callback function to process a statistics packet when using the passthrough format option. More... | |
typedef struct lbmmon_passthrough_statistics_func_t_stct | lbmmon_passthrough_statistics_func_t |
A structure that holds the callback information for the passthrough format option. More... | |
typedef int(* | lbmmon_transport_initsrc_t) (void **TransportClientData, const void *TransportOptions) |
Function to initialize a transport module to serve as a source of statistics. More... | |
typedef int(* | lbmmon_transport_initrcv_t) (void **TransportClientData, const void *TransportOptions) |
Function to initialize a transport module to serve as a receiver of statistics. More... | |
typedef int(* | lbmmon_transport_send_t) (const char *Data, size_t Length, void *TransportClientData) |
Send a statistics packet. More... | |
typedef int(* | lbmmon_transport_receive_t) (char *Data, size_t *Length, unsigned int TimeoutMS, void *TransportClientData) |
Receive statistics data. More... | |
typedef int(* | lbmmon_transport_finishsrc_t) (void *TransportClientData) |
Finish processing for a source transport. More... | |
typedef int(* | lbmmon_transport_finishrcv_t) (void *TransportClientData) |
Finish processing for a receiver transport. More... | |
typedef const char *(* | lbmmon_transport_errmsg_t) (void) |
Function to return the last error message from a transport module. More... | |
typedef const char *(* | lbmmon_transport_ctrlmsgtarget_t) (void) |
Function to return the target address for control message requests. More... | |
typedef int(* | lbmmon_transport_ctrlmsg_receive_t) (char *Data, size_t *Length, void *TransportClientData) |
Receive control message requests. More... | |
typedef int(* | lbmmon_transport_ctrlmsg_response_t) (const char *Data, size_t Length, void *TransportClientData) |
Function to send response to control message requests. More... | |
typedef const int(* | lbmmon_transport_allow_debug_t) (void *TransportClientData) |
Function to return the allow debug indicator from a transport module. More... | |
typedef struct lbmmon_transport_func_t_stct | lbmmon_transport_func_t |
Transport module function pointer container. | |
typedef struct lbmmon_sctl_t_stct | lbmmon_sctl_t |
LBM Monitoring Source Controller object (opaque). | |
typedef struct lbmmon_rctl_attr_t_stct | lbmmon_rctl_attr_t |
LBM Monitoring Receiver Controller Attribute object (opaque). | |
typedef struct lbmmon_rctl_t_stct | lbmmon_rctl_t |
LBM Monitoring Receiver Controller object (opaque). | |
Functions | |
LBMExpDLL int | lbmmon_attributes_deserialize (lbmmon_packet_attributes_t *Attributes, char *Source, size_t Length) |
Deserialize the Attributes Block into the lbmmon_packet_attributes_t structure. More... | |
LBMExpDLL int | lbmmon_sctl_create (lbmmon_sctl_t **Control, const lbmmon_format_func_t *Format, const void *FormatOptions, const lbmmon_transport_func_t *Transport, const void *TransportOptions) |
Create an LBM Monitoring Source Controller. More... | |
LBMExpDLL int | lbmmon_rctl_attr_create (lbmmon_rctl_attr_t **Attributes) |
Create an LBM Monitoring Receive Controller attribute object. More... | |
LBMExpDLL int | lbmmon_rctl_attr_delete (lbmmon_rctl_attr_t *Attributes) |
Delete an LBM Monitoring Receive Controller attribute object. More... | |
LBMExpDLL int | lbmmon_rctl_attr_setopt (lbmmon_rctl_attr_t *Attributes, int Option, void *Value, size_t Length) |
Set an LBMMON receive controller attribute option value. More... | |
LBMExpDLL int | lbmmon_rctl_attr_getopt (lbmmon_rctl_attr_t *Attributes, int Option, void *Value, size_t *Length) |
Get an LBMMON receive controller attribute option value. More... | |
LBMExpDLL int | lbmmon_rctl_create (lbmmon_rctl_t **Control, const lbmmon_format_func_t *Format, const void *FormatOptions, const lbmmon_transport_func_t *Transport, const void *TransportOptions, lbmmon_rctl_attr_t *Attributes, void *ClientData) |
Create an LBM Monitoring Receive Controller. More... | |
LBMExpDLL int | lbmmon_context_monitor (lbmmon_sctl_t *Control, lbm_context_t *Context, const char *ApplicationSourceID, unsigned int Seconds) |
Register a context for monitoring. More... | |
LBMExpDLL int | lbmmon_context_unmonitor (lbmmon_sctl_t *Control, lbm_context_t *Context) |
Terminate monitoring for a context. More... | |
LBMExpDLL int | lbmmon_src_monitor (lbmmon_sctl_t *Control, lbm_src_t *Source, const char *ApplicationSourceID, unsigned int Seconds) |
Register a source for monitoring. More... | |
LBMExpDLL int | lbmmon_ssrc_monitor (lbmmon_sctl_t *Control, lbm_ssrc_t *SmartSource, const char *ApplicationSourceID, unsigned int Seconds) |
Register a smart source for monitoring. More... | |
LBMExpDLL int | lbmmon_src_unmonitor (lbmmon_sctl_t *Control, lbm_src_t *Source) |
Terminate monitoring for a source. More... | |
LBMExpDLL int | lbmmon_ssrc_unmonitor (lbmmon_sctl_t *Control, lbm_ssrc_t *SmartSource) |
Terminate monitoring for a smart source. More... | |
LBMExpDLL int | lbmmon_rcv_monitor (lbmmon_sctl_t *Control, lbm_rcv_t *Receiver, const char *ApplicationSourceID, unsigned int Seconds) |
Register a receiver for monitoring. More... | |
LBMExpDLL int | lbmmon_rcv_unmonitor (lbmmon_sctl_t *Control, lbm_rcv_t *Receiver) |
Terminate monitoring for a receiver. More... | |
LBMExpDLL int | lbmmon_evq_monitor (lbmmon_sctl_t *Control, lbm_event_queue_t *EventQueue, const char *ApplicationSourceID, unsigned int Seconds) |
Register an event queue for monitoring. More... | |
LBMExpDLL int | lbmmon_evq_unmonitor (lbmmon_sctl_t *Control, lbm_event_queue_t *EventQueue) |
Terminate monitoring for an event queue. More... | |
LBMExpDLL int | lbmmon_sctl_destroy (lbmmon_sctl_t *Control) |
Destroy a source monitoring controller. More... | |
LBMExpDLL int | lbmmon_rctl_destroy (lbmmon_rctl_t *Control) |
Destroy a statistics receive controller. More... | |
LBMExpDLL int | lbmmon_sctl_sample (lbmmon_sctl_t *Control) |
Gather statistics for on-demand objects. More... | |
LBMExpDLL int | lbmmon_sctl_sample_ex (lbmmon_sctl_t *Control, const char *ApplicationSourceID) |
Extended gather statistics for on-demand objects. More... | |
LBMExpDLL int | lbmmon_attr_get_ipv4sender (const void *AttributeBlock, lbm_uint_t *Address) |
Retrieve the IPV4 sender address attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_timestamp (const void *AttributeBlock, time_t *Timestamp) |
Retrieve the timestamp attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_appsourceid (const void *AttributeBlock, char *ApplicationSourceID, size_t Length) |
Retrieve the application source ID attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_objectid (const void *AttributeBlock, lbm_ulong_t *ObjectID) |
Retrieve the object ID attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_contextid (const void *AttributeBlock, lbm_ulong_t *ContextID) |
Retrieve the context ID attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_processid (const void *AttributeBlock, lbm_ulong_t *ProcessID) |
Retrieve the process ID attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_source (const void *AttributeBlock, lbm_ulong_t *Source) |
Retrieve the source attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_ctxinst (const void *AttributeBlock, lbm_uint8_t *ContextInstance, size_t Length) |
For internal use only. Retrieve the context instance attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_attr_get_domainid (const void *AttributeBlock, lbm_uint32_t *DomainID) |
For internal use only. Retrieve the domain ID attribute from the statistics attribute block. More... | |
LBMExpDLL int | lbmmon_errnum (void) |
Retrieve the error number for the last error encountered. More... | |
LBMExpDLL const char * | lbmmon_errmsg (void) |
Retrieve the error message for the last error encountered. More... | |
LBMExpDLL const char * | lbmmon_next_key_value_pair (const char *String, char *Key, size_t KeySize, char *Value, size_t ValueSize) |
Retrieve the next key/value pair from a semicolon-separated list. More... | |
LBMExpDLL int | lbmmon_control_serialize (char *Destination, size_t *Size, int Command, char *Data, int NodeType, char *ApplicationSourceID) |
Function to serialize a control message. More... | |
LBMExpDLL const char * | lbmmon_control_valid_commands (void) |
Retrieve the list of valid LBMMON control commands. More... | |
LBMExpDLL const char * | lbmmon_control_valid_node_types (void) |
Retrieve the list of valid LBMMON control node types. More... | |
LBMExpDLL int | lbmmon_control_index_for_command (char *Command) |
Retrieve the index associated with the given LBMMON control command. More... | |
LBMExpDLL int | lbmmon_control_index_for_node_type (char *NodeType) |
Retrieve the index associated with the given LBMMON control node type. More... | |
LBMExpDLL int | lbmmon_control_load_data_from_filename (char *Filename, char **Data) |
Load data from filename into a buffer. More... | |
LBMExpDLL int | lbmmon_control_dump_default_filter_options (void) |
Dump the default filter options to stdout. More... | |
LBMExpDLL const char * | lbmmon_control_errmsg (void) |
Function to return the last error message from lbmmon_control. More... | |
LBMExpDLL void | lbmmon_add_header (char *Packet, const char *Data, size_t Length, int PacketType) |
Add an LBMMON header to a serialized PB Buffer. More... | |
Ultra Messaging (UM) Monitoring API. The "lbmmon.h" header file defines APIs for UM application monitoring, both the send side (application being monitored) and the receive side (application doing the monitoring). The binary code is contained in the "lbm" library (dynamic on Unix: "liblbm.so", static on Unix: "liblbm.a", dynamic only on Windows: "lbm.dll"). See Monitoring UM with the lbmmon API for general information on UM monitoring. See UM C API for general information on the C API. See Fundamental Concepts for an introduction to Ultra Messaging.
#define LBMMON_ATTR_APPSOURCEID 2 |
Attribute block entry contains the application source ID string.
#define LBMMON_ATTR_BLOCK_FORMAT_PB 1 |
Attribute block in Protocol Buffer format
#define LBMMON_ATTR_BLOCK_FORMAT_TABLE 0 |
Attribute block in table format
#define LBMMON_ATTR_BLOCK_MAGIC 0xABCD |
Used to differentiate between attribute block in lbmmon_packet_attributes_t format (lbmmon_packet_attributes_t_stct.mPacketAttributesMagic == LBMMON_ATTR_BLOCK_MAGIC vs. an array of lbmmon_attr_block_t structures.
#define LBMMON_ATTR_CONTEXTID LBMMON_ATTR_OBJECTID |
Attribute block entry contains the context ID.
#define LBMMON_ATTR_CTXINST 7 |
Attribute block entry contains the context instance.
#define LBMMON_ATTR_DOMAINID 8 |
Attribute block entry contains the domain ID.
#define LBMMON_ATTR_FORMAT_MODULEID 3 |
Attribute block entry contains the format module ID. See LBMMON_FORMAT_* for possible values. Used to determine the format of the statistics packet. Values 1 and 2 are currently defined. Values 3 through 9 are reserved for UM use. Values 10 and over can be used for custom formats.
#define LBMMON_ATTR_OBJECTID 4 |
Attribute block contains the object ID.
#define LBMMON_ATTR_PROCESSID 5 |
Attribute block entry contains the process ID.
#define LBMMON_ATTR_SENDER_IPV4 0 |
Attribute block entry contains the sender IPV4 address.
#define LBMMON_ATTR_SOURCE 6 |
Attribute block entry contains the source flag. See LBMMON_ATTR_SOURCE_* for possible values. Used to distinguish between MIM source/receiver statistics and normal transport source/receiver statistics.
#define LBMMON_ATTR_SOURCE_IM 1 |
Source/receiver statistics are from a MIM transport session.
#define LBMMON_ATTR_SOURCE_NORMAL 0 |
Source/receiver statistics are from a normal transport session.
#define LBMMON_ATTR_TIMESTAMP 1 |
Attribute block entry contains the timestamp.
#define LBMMON_EAGAIN (LBMMON_ERROR_BASE + 5) |
lbmmon_errnum() value. Insufficient resources.
#define LBMMON_EALREADY (LBMMON_ERROR_BASE + 6) |
lbmmon_errnum() value. Resource already registered.
#define LBMMON_EINVAL (LBMMON_ERROR_BASE + 1) |
lbmmon_errnum() value. An invalid argument was passed.
#define LBMMON_ELBMFAIL (LBMMON_ERROR_BASE + 4) |
lbmmon_errnum() value. A call to an LBM function failed.
#define LBMMON_EMODFAIL (LBMMON_ERROR_BASE + 3) |
lbmmon_errnum() value. A call to a module function failed.
#define LBMMON_ENOMEM (LBMMON_ERROR_BASE + 2) |
lbmmon_errnum() value. Out of memory.
#define LBMMON_EOP (LBMMON_ERROR_BASE + 7) |
lbmmon_errnum() value. Internal operation error.
#define LBMMON_ERROR_BASE 4096 |
Base value for LBMMON error codes.
#define LBMMON_FORMAT_ATTRIBUTES_PB 1 |
Format of the attributes block for a PB packet is PB (Default)
#define LBMMON_FORMAT_ATTRIBUTES_TABLE 2 |
Format of the attributes block for a PB packet is table
#define LBMMON_FORMAT_CSV_MODULE_ID 1 |
Module ID used for lbmmon_format_csv_module()
#define LBMMON_FORMAT_DESERIALIZE_CONVERT_PASSTHROUGH 2 |
Format deserialize function return indicates convert to PB then passthrough to callback
#define LBMMON_FORMAT_DESERIALIZE_FAILURE -1 |
Format deserialize function return FAILURE.
#define LBMMON_FORMAT_DESERIALIZE_OK 0 |
Format deserialize function return OK. Use normal callbacks
#define LBMMON_FORMAT_DESERIALIZE_PASSTHROUGH 1 |
Format deserialize function return indicates passthrough raw packet to callback
#define LBMMON_FORMAT_DESERIALIZE_TOO_SMALL -2 |
Format deserialize function return indicates not enough memory was allocated for this packet
#define LBMMON_FORMAT_FILTER_EQ 2 |
Format option to filter out when field == value
#define LBMMON_FORMAT_FILTER_GT 5 |
Format option to filter out when field > value
#define LBMMON_FORMAT_FILTER_LT 4 |
Format option to filter out when field < value
#define LBMMON_FORMAT_FILTER_NE 3 |
Format option to filter out when field != value
#define LBMMON_FORMAT_FILTER_OFF 0 |
Format option filter is off (default); this field will be sent
#define LBMMON_FORMAT_FILTER_ON 1 |
Format option filter is on; field will not be sent
#define LBMMON_FORMAT_PASSTHROUGH_CONVERT 2 |
Format option to convert the received packet to PB format then passthrough
#define LBMMON_FORMAT_PASSTHROUGH_OFF 0 |
Format option to passthrough the received packet without deserializing is off (Default)
#define LBMMON_FORMAT_PASSTHROUGH_ON 1 |
Format option to passthrough the received packet without deserializing is on
#define LBMMON_FORMAT_PB_MODULE_ID 2 |
Module ID used for lbmmon_format_pb_module()
#define LBMMON_FORMAT_SELECT_EQ 6 |
Format option to send when field == value
#define LBMMON_FORMAT_SELECT_GT 9 |
Format option to send when field > value
#define LBMMON_FORMAT_SELECT_LT 8 |
Format option to send when field < value
#define LBMMON_FORMAT_SELECT_MATCH 10 |
Format option to send when string matches value
#define LBMMON_FORMAT_SELECT_MATCH_REGX 11 |
Format option to send when regualr expression string matches value
#define LBMMON_FORMAT_SELECT_NE 7 |
Format option to send when field != value
#define LBMMON_PACKET_SIGNATURE 0x1b33041b |
Packet signature value
#define LBMMON_PACKET_TYPE_CONTEXT 3 |
Packet contains context statistics
#define LBMMON_PACKET_TYPE_CONTROL_MESSAGE 9 |
Packet contains LBMMON Control Message.
#define LBMMON_PACKET_TYPE_EVENT_QUEUE 2 |
Packet contains event queue statistics
#define LBMMON_PACKET_TYPE_GATEWAY 7 |
Packet contains gateway statistics.
#define LBMMON_PACKET_TYPE_RECEIVER 1 |
Packet contains receiver statistics
#define LBMMON_PACKET_TYPE_RECEIVER_TOPIC 4 |
Packet contains receiver topic statistics.
#define LBMMON_PACKET_TYPE_SOURCE 0 |
Packet contains source statistics
#define LBMMON_PACKET_TYPE_SRS 10 |
Packet contains SRS statistics.
#define LBMMON_PACKET_TYPE_UMDS 8 |
Packet contains UMDS statistics.
#define LBMMON_PACKET_TYPE_UMESTORE 6 |
Packet contains store statistics.
#define LBMMON_PACKET_TYPE_WILDCARD_RECEIVER 5 |
Packet contains wildcard receiver statistics.
#define LBMMON_RCTL_CONTEXT_CALLBACK 3 |
Receive controller attribute option: Context statistics callback.
#define LBMMON_RCTL_EVENT_QUEUE_CALLBACK 2 |
Receive controller attribute option: Event queue statistics callback.
#define LBMMON_RCTL_GATEWAY_CALLBACK 7 |
Receive controller attribute option: Gateway statistics callback.
#define LBMMON_RCTL_PASSTHROUGH_CALLBACK 8 |
Receive controller attribute option: Passthrough callback.
#define LBMMON_RCTL_RECEIVER_CALLBACK 0 |
Receive controller attribute option: Receiver statistics callback.
#define LBMMON_RCTL_RECEIVER_TOPIC_CALLBACK 4 |
Receive controller attribute option: Receiver topic statistics callback.
#define LBMMON_RCTL_SOURCE_CALLBACK 1 |
Receive controller attribute option: Source statistics callback.
#define LBMMON_RCTL_UMESTORE_CALLBACK 6 |
Receive controller attribute option: Store statistics callback.
#define LBMMON_RCTL_WILDCARD_RECEIVER_CALLBACK 5 |
Receive controller attribute option: Wildcard receiver statistics callback.
#define LBMMON_SERIALIZE_CALC_SIZE_ONLY 1 |
Serialize function should only return the size of the packed message
#define LBMMON_SERIALIZE_PACK_MESSAGE 0 |
Serialize funtion should pack the message
#define MODULE_ID | ( | id | ) | ((unsigned char) ((id & 0xff00) >> 8)) |
Extracts the Module ID from the ModuleID value
#define MODULE_VERSION | ( | id | ) | ((unsigned char) (id & 0xff)) |
Extracts the Module Version from the ModuleID value
typedef int(* lbmmon_ctx_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_context_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_context_stats_t structure.
Transform a block of data serialized by the lbmmon_ctx_format_serialize_t function into a lbm_context_stats_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Statistics | A pointer to an lbm_context_stats_t structure into which the data is deserialized. |
Source | A pointer to a buffer containing the serialized data. |
Length | The length of the serialized data. |
ModuleID | The module ID received in the packet. It may be used to verify and differentiate between different version of the module (and thus the format of the data it expects). |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_ctx_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_context_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_context_stats_t structure.
This function should transform the lbm_context_stats_t structure into a form which can be deserialized by the corresponding lbmmon_ctx_format_deserialize_t function.
Destination | A pointer to a buffer to receive the serialized format of the lbm_context_stats_t statistics. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
Statistics | A pointer to the lbm_context_stats_t structure to be serialized. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef void(* lbmmon_ctx_statistics_cb) (const void *AttributeBlock, const lbm_context_stats_t *Statistics, void *ClientData) |
Client callback function to process a received context statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
Statistics | Pointer to the context statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
typedef struct lbmmon_ctx_statistics_func_t_stct lbmmon_ctx_statistics_func_t |
A structure that holds the callback information for context statistics.
A structure used with receive controller options to get/set specific callback information.
typedef int(* lbmmon_evq_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_event_queue_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_event_queue_stats_t structure.
Transform a block of data serialized by the lbmmon_evq_format_serialize_t function into a lbm_event_queue_stats_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Statistics | A pointer to an lbm_event_queue_stats_t structure into which the data is deserialized. |
Source | A pointer to a buffer containing the serialized data. |
Length | The length of the serialized data. |
ModuleID | The module ID received in the packet. It may be used to verify and differentiate between different version of the module (and thus the format of the data it expects). |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_evq_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_event_queue_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_event_queue_stats_t structure.
This function should transform the lbm_event_queue_stats_t structure into a form which can be deserialized by the corresponding lbmmon_evq_format_deserialize_t function.
Destination | A pointer to a buffer to receive the serialized format of the lbm_event_queue_stats_t statistics. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
Statistics | A pointer to the lbm_event_queue_stats_t structure to be serialized. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef void(* lbmmon_evq_statistics_cb) (const void *AttributeBlock, const lbm_event_queue_stats_t *Statistics, void *ClientData) |
Client callback function to process a received event queue statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
Statistics | Pointer to the event queue statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
typedef struct lbmmon_evq_statistics_func_t_stct lbmmon_evq_statistics_func_t |
A structure that holds the callback information for event queue statistics.
A structure used with receive controller options to get/set specific callback information.
typedef int(* lbmmon_format_apply_options_t) (void *FormatClientData, const void *FormatOptions) |
Function to apply options to a format module at startup or dynamically to a running system.
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
FormatOptions | A pointer to data containing options in the same format as specified by config options. |
typedef const char*(* lbmmon_format_errmsg_t) (void) |
Function to return the last error message from a format module.
typedef int(* lbmmon_format_finish_t) (void *FormatClientData) |
Function to finish format module processing.
Perform any required format module cleanup processing. If format-specific client data was allocated in the lbmmon_format_init_t function, it should be freed in this function.
This function is called by lbmmon_sctl_destroy() and lbmmon_rctl_destroy().
FormatClientData | A pointer to format-specific client data. This pointer should be freed if it was allocated previously. |
typedef int(* lbmmon_format_init_t) (void **FormatClientData, const void *FormatOptions) |
Function to initialize a format module.
This function should perform any initialization required by the format module. While, depending on the module, initialization may not be required, representative tasks include allocating a block of format-specific data, parsing options from the supplied options string, and initializing any operating parameters for the module.
This function is called by lbmmon_sctl_create() and lbmmon_rctl_create().
FormatClientData | A pointer which may be filled in (by this function) with a pointer to format-specific client data. A pointer to the format-specific data is passed to each function in the module, to be used as the module sees fit. |
FormatOptions | The FormatOptions argument originally passed to lbmmon_sctl_create() or lbmmon_rctl_create(). |
typedef int(* lbmmon_gateway_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, Lbmmon__DROMonMsg *GatewayMsg, void *FormatClientData) |
Function to serialize gateway statistics.
This function should transform the Lbmmon__DROMonMsg structure into a form which can be deserialized by the corresponding lbmmon_gateway_format_deserialize function.
Destination | A pointer to a buffer to receive the serialized format of the Lbmmon__DROMonMsg structure. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
GatewayMsg | A pointer to an Lbmmon__DROMonMsg structure to be serialized. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_gateway_free_unpacked_t) (Lbmmon__DROMonMsg *GatewayMsg) |
Function to free an unpacked Lbmmon__DROMonMsg structure.
GatewayMsg | A pointer to a pointer to an Lbmmon__DROMonMsg structure into which the data was deserialized. |
typedef void(* lbmmon_gateway_statistics_cb) (const void *AttributeBlock, const Lbmmon__DROMonMsg *GatewayMsg, void *ClientData) |
Client callback function to process a received gateway statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
GatewayMsg | Pointer to the gateway statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
A structure that holds the callback information for gateway statistics.
A structure used with receive controller options to get/set specific callback information.
typedef struct lbmmon_packet_hdr_t_stct lbmmon_packet_hdr_t |
Statistics packet header layout.
A statistics packet consists of five fixed-length and fixed-position fields, as documented below. It is followed by two variable-length blocks. The attribute block is located at packet + sizeof(lbmmon_packet_hdr_t), and is mAttributeBlockLength (when properly interpreted) bytes in length (which may be zero). The statistics data block is located immediately following the attribute block.
typedef void(* lbmmon_passthrough_statistics_cb) (const lbmmon_packet_hdr_t *PacketHeader, lbmmon_packet_attributes_t *Attributes, void *AttributeBlock, void *Statistics, size_t Length, void *ClientData) |
Client callback function to process a statistics packet when using the passthrough format option.
PacketHeader | Pointer to the packet header. |
Attributes | Pointer to structure containing values from attributes block. |
AttributeBlock | Pointer to the raw packet attributes block. |
Statistics | Pointer to the raw statistics packet. |
Length | The length of the raw statistics packet. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
A structure that holds the callback information for the passthrough format option.
A structure used with receive controller options to get/set specific callback information.
typedef int(* lbmmon_rcv_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_rcv_transport_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_rcv_transport_stats_t structure.
Transform a block of data serialized by the lbmmon_rcv_format_serialize_t function into a lbm_rcv_transport_stats_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Statistics | A pointer to an lbm_rcv_transport_stats_t structure into which the data is deserialized. |
Source | A pointer to a buffer containing the serialized data. |
Length | The length of the serialized data. |
ModuleID | The module ID received in the packet. It may be used to verify and differentiate between different version of the module (and thus the format of the data it expects). |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_rcv_transport_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_rcv_transport_stats_t structure.
This function should transform the lbm_rcv_transport_stat_t structure into a form which can be deserialized by the corresponding lbmmon_rcv_format_deserialize_t function.
Destination | A pointer to a buffer to receive the serialized format of the lbm_rcv_transport_stats_t statistics. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
Statistics | A pointer to the lbm_rcv_transport_stats_t structure to be serialized. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef void(* lbmmon_rcv_statistics_cb) (const void *AttributeBlock, const lbm_rcv_transport_stats_t *Statistics, void *ClientData) |
Client callback function to process a received receiver statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
Statistics | Pointer to the receiver statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
typedef struct lbmmon_rcv_statistics_func_t_stct lbmmon_rcv_statistics_func_t |
A structure that holds the callback information for receiver statistics.
A structure used with receive controller options to get/set specific callback information.
typedef int(* lbmmon_rcv_topic_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, size_t *Count, lbm_rcv_topic_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_rcv_topic_stats_t structure.
Transform a block of data serialized by the lbmmon_rcv_topic_format_serialize_t function into a lbm_rcv_topic_stats_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Count | A pointer to an integer containing the number of elements in the Statistics array. On exit, it will contain the actual number of elements parsed. |
Statistics | An array of lbm_rcv_topic_stats_t elements into which is written the actual deserialized data. |
Source | A pointer to a buffer containing the serialized data. |
Length | The length of the serialized data. |
ModuleID | The module ID received in the packet. It may be used to verify and differentiate between different version of the module (and thus the format of the data it expects). |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_rcv_topic_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const char *Topic, lbm_ulong_t SourceCount, const lbm_rcv_topic_stats_t *Sources, void *FormatClientData) |
Function to serialize receiver topic statistics.
This function should transform the topic, source count, and array of sources into a form which can be deserialized by the corresponding lbmmon_rcv_topic_format_deserialize_t function.
Destination | A pointer to a buffer to receive the serialized format of the lbm_context_stats_t statistics. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
Topic | A NUL-terminated string containing the topic. |
SourceCount | The number of sources in the Sources array. |
Sources | An array of lbm_rcv_topic_stats_t structures containing the sources to which the receiver is joined. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef void(* lbmmon_rcv_topic_statistics_cb) (const void *AttributeBlock, const lbm_rcv_topic_stats_t *Statistics, void *ClientData) |
For internal use only. Client callback function to process a received receiver topic statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
Statistics | Pointer to the receiver topic statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
For internal use only. A structure that holds the callback information for receiver topic statistics.
A structure used with receive controller options to get/set specific callback information.
typedef int(* lbmmon_src_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_src_transport_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_src_transport_stats_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Statistics | A pointer to an lbm_src_transport_stats_t structure into which the data is deserialized. |
Source | A pointer to a buffer containing the serialized data. |
Length | The length of the serialized data. |
ModuleID | The module ID received in the packet. It may be used to verify and differentiate between different version of the module (and thus the format of the data it expects). |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_src_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_src_transport_stats_t *Statistics, void *FormatClientData) |
Function to serialize an lbm_src_transport_stats_t structure.
Destination | A pointer to a buffer to receive the serialized format of the lbm_src_transport_stats_t statistics. |
Size | A pointer to a size_t. On entry, it contains the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
Statistics | A pointer to an lbm_src_transport_stats_t structure to be serialized. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef void(* lbmmon_src_statistics_cb) (const void *AttributeBlock, const lbm_src_transport_stats_t *Statistics, void *ClientData) |
Client callback function to process a received source statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
Statistics | Pointer to the source statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
typedef struct lbmmon_src_statistics_func_t_stct lbmmon_src_statistics_func_t |
A structure that holds the callback information for source statistics.
A structure used with receive controller options to get/set specific callback information.
typedef const int(* lbmmon_transport_allow_debug_t) (void *TransportClientData) |
Function to return the allow debug indicator from a transport module.
typedef int(* lbmmon_transport_ctrlmsg_receive_t) (char *Data, size_t *Length, void *TransportClientData) |
Receive control message requests.
Data | Pointer to a buffer into which the received (serialized) data is to be placed. |
Length | Pointer to a size_t variable. On entry, it contains the maximum number of bytes to read. On exit, it must contain the actual number of bytes read. |
TransportClientData | A pointer to transport-specific client data as returned by the lbmmon_transport_initrcv_t function. |
typedef int(* lbmmon_transport_ctrlmsg_response_t) (const char *Data, size_t Length, void *TransportClientData) |
Function to send response to control message requests.
Data | Pointer to the serialized statistics data. |
Length | Length of the serialized statistics data. |
TransportClientData | A pointer to transport-specific client data. |
typedef const char*(* lbmmon_transport_ctrlmsgtarget_t) (void) |
Function to return the target address for control message requests.
typedef const char*(* lbmmon_transport_errmsg_t) (void) |
Function to return the last error message from a transport module.
typedef int(* lbmmon_transport_finishrcv_t) (void *TransportClientData) |
Finish processing for a receiver transport.
TransportClientData | A pointer to transport-specific client data as returned by the lbmmon_transport_initrcv_t function. If previously allocated by the lbmmon_transport_initrcv_t function, it must be freed in this function. |
typedef int(* lbmmon_transport_finishsrc_t) (void *TransportClientData) |
Finish processing for a source transport.
TransportClientData | A pointer to transport-specific client data as returned by the lbmmon_transport_initsrc_t function. If previously allocated by the lbmmon_transport_initsrc_t function, it must be freed in this function. |
typedef int(* lbmmon_transport_initrcv_t) (void **TransportClientData, const void *TransportOptions) |
Function to initialize a transport module to serve as a receiver of statistics.
TransportClientData | A pointer which may be filled in (by this function) with a pointer to transport-specific client data. |
TransportOptions | The TransportOptions argument originally passed to lbmmon_rctl_create(). |
typedef int(* lbmmon_transport_initsrc_t) (void **TransportClientData, const void *TransportOptions) |
Function to initialize a transport module to serve as a source of statistics.
TransportClientData | A pointer which may be filled in (by this function) with a pointer to transport-specific client data. |
TransportOptions | The TransportOptions argument originally passed to lbmmon_sctl_create(). |
typedef int(* lbmmon_transport_receive_t) (char *Data, size_t *Length, unsigned int TimeoutMS, void *TransportClientData) |
Receive statistics data.
Data | Pointer to a buffer into which the received (serialized) data is to be placed. |
Length | Pointer to a size_t variable. On entry, it contains the maximum number of bytes to read. On exit, it must contain the actual number of bytes read. |
TimeoutMS | Maximum time, in milliseconds, the function may wait for incoming data before returning a timeout indicator. |
TransportClientData | A pointer to transport-specific client data as returned by the lbmmon_transport_initrcv_t function. |
typedef int(* lbmmon_transport_send_t) (const char *Data, size_t Length, void *TransportClientData) |
Send a statistics packet.
Data | Pointer to the serialized statistics data. |
Length | Length of the serialized statistics data. |
TransportClientData | A pointer to transport-specific client data as returned by the lbmmon_transport_initsrc_t function. |
typedef char*(* lbmmon_umestore_filter_options_t) (const char *FormatOptions) |
Function to return the store filter options from a format module.
FormatOptions | The FormatOptions associated with the store's context. |
typedef int(* lbmmon_umestore_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, Lbmmon__UMPMonMsg *StoreMsg, int Action, void *FormatClientData) |
Function to serialize store statistics.
This function should transform the Lbmmon__UMPMonMsg structure into a form which can be deserialized by the corresponding lbmmon_umestore_format_deserialize function.
Destination | A pointer to a buffer to receive the serialized format of the Lbmmon__UMPMonMsg structure. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
StoreMsg | A pointer to an Lbmmon__UMPMonMsg structure to be serialized. |
Action | If 1, return size of packed message only. If 0, pack the message and copy into the buffer. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_umestore_free_unpacked_t) (Lbmmon__UMPMonMsg *StoreMsg) |
Function to free an unpacked Lbmmon__UMPMonMsg structure.
StoreMsg | A pointer to a pointer to an Lbmmon__UMPMonMsg structure into which the data was deserialized. |
typedef void(* lbmmon_umestore_statistics_cb) (const void *AttributeBlock, const Lbmmon__UMPMonMsg *StoreMsg, void *ClientData) |
Client callback function to process a received store statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
StoreMsg | Pointer to the store statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
A structure that holds the callback information for store statistics.
A structure used with receive controller options to get/set specific callback information.
typedef int(* lbmmon_wildcard_rcv_format_deserialize_t) (lbmmon_packet_attributes_t *Attributes, lbm_wildcard_rcv_stats_t *Statistics, const char *Source, size_t Length, unsigned short ModuleID, void *FormatClientData) |
Function to deserialize a buffer into an lbm_wildcard_rcv_stats_t structure.
Transform a block of data serialized by the lbmmon_wildcard_rcv_format_serialize_t function into a lbm_wildcard_rcv_stats_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Statistics | A pointer to an lbm_wildcard_rcv_stats_t structure into which the data is deserialized. |
Source | A pointer to a buffer containing the serialized data. |
Length | The length of the serialized data. |
ModuleID | The module ID received in the packet. It may be used to verify and differentiate between different version of the module (and thus the format of the data it expects). |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef int(* lbmmon_wildcard_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbmmon_packet_attributes_t *Attributes, const lbm_wildcard_rcv_stats_t *Statistics, void *FormatClientData) |
Function to serialize wildcard receiver statistics.
This function should transform the lbm_wildcard_receiver_stats_t structure into a form which can be deserialized by the corresponding lbmmon_wildcard_rcv_format_deserialize function.
Destination | A pointer to a buffer to receive the serialized format of the lbm_wildcard_rcv_stats_t statistics. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized statistics. On exit, it must contain the actual size of the serialized statistics. |
ModuleID | A pointer to an unsigned short , into which the module may write a module identification value. This value is included in the transmitted packet, and may be used by the receiver to verify and differentiate between different version of the module (and thus the format of the data it expects). |
Attributes | A pointer to a lbmmon_packet_attributes_t structure from which to take packet attributes. |
Statistics | A pointer to an lbm_wildcard_rcv_stats_t structure to be serialized. |
FormatClientData | A pointer to format-specific client data as returned by the lbmmon_format_init_t function. |
typedef void(* lbmmon_wildcard_rcv_statistics_cb) (const void *AttributeBlock, const lbm_wildcard_rcv_stats_t *Statistics, void *ClientData) |
For internal use only. Client callback function to process a received wildcard receiver statistics packet.
AttributeBlock | Pointer to the statistics packet attribute block. |
Statistics | Pointer to the wildcard receiver statistics. |
ClientData | Pointer to client-specific data as passed to lbmmon_rctl_create(). |
A structure that holds the callback information for wildcard receiver statistics.
A structure used with receive controller options to get/set specific callback information.
LBMExpDLL void lbmmon_add_header | ( | char * | Packet, |
const char * | Data, | ||
size_t | Length, | ||
int | PacketType | ||
) |
Add an LBMMON header to a serialized PB Buffer.
Packet | A pointer to a buffer to receive the full packet. |
Data | A pointer to the serialized statistics data. |
Length | The length of the serialized statistics data. |
PacketType | Type of statistics. See LBMMON_PACKET_TYPE_*. |
LBMExpDLL int lbmmon_attr_get_appsourceid | ( | const void * | AttributeBlock, |
char * | ApplicationSourceID, | ||
size_t | Length | ||
) |
Retrieve the application source ID attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
ApplicationSourceID | Pointer to a buffer to receive the application source ID as a null-terminated string. |
Length | Maximum length of ApplicationSourceID |
LBMExpDLL int lbmmon_attr_get_contextid | ( | const void * | AttributeBlock, |
lbm_ulong_t * | ContextID | ||
) |
Retrieve the context ID attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
ContextID | Pointer to a variable to receive the context ID. |
LBMExpDLL int lbmmon_attr_get_ctxinst | ( | const void * | AttributeBlock, |
lbm_uint8_t * | ContextInstance, | ||
size_t | Length | ||
) |
For internal use only. Retrieve the context instance attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
ContextInstance | Pointer to a buffer to receive the context instance. |
Length | Maximum length of ContextInstance. |
LBMExpDLL int lbmmon_attr_get_domainid | ( | const void * | AttributeBlock, |
lbm_uint32_t * | DomainID | ||
) |
For internal use only. Retrieve the domain ID attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
DomainID | Pointer to a variable to receive the domain ID. |
LBMExpDLL int lbmmon_attr_get_ipv4sender | ( | const void * | AttributeBlock, |
lbm_uint_t * | Address | ||
) |
Retrieve the IPV4 sender address attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
Address | Pointer to a 32-bit integer to receive the IPV4 address in network order. |
LBMExpDLL int lbmmon_attr_get_objectid | ( | const void * | AttributeBlock, |
lbm_ulong_t * | ObjectID | ||
) |
Retrieve the object ID attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
ObjectID | Pointer to a variable to receive the object ID. |
LBMExpDLL int lbmmon_attr_get_processid | ( | const void * | AttributeBlock, |
lbm_ulong_t * | ProcessID | ||
) |
Retrieve the process ID attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
ProcessID | Pointer to a variable to receive the process ID. |
LBMExpDLL int lbmmon_attr_get_source | ( | const void * | AttributeBlock, |
lbm_ulong_t * | Source | ||
) |
Retrieve the source attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
Source | Pointer to a variable to receive the source flag. |
LBMExpDLL int lbmmon_attr_get_timestamp | ( | const void * | AttributeBlock, |
time_t * | Timestamp | ||
) |
Retrieve the timestamp attribute from the statistics attribute block.
AttributeBlock | Pointer to the attribute block as passed to the callback function. |
Timestamp | Pointer to a time_t to receive the timestamp. |
LBMExpDLL int lbmmon_attributes_deserialize | ( | lbmmon_packet_attributes_t * | Attributes, |
char * | Source, | ||
size_t | Length | ||
) |
Deserialize the Attributes Block into the lbmmon_packet_attributes_t structure.
Attributes | A pointer to a lbmmon_packet_attributes_t structure for storing the deserialized packet attributes. |
Source | A pointer to a buffer containing the Attributes Block from the incoming message from an LBM receiver (not from LBMMON RCTL). |
Length | The length of the Attributes Block. |
LBMExpDLL int lbmmon_context_monitor | ( | lbmmon_sctl_t * | Control, |
lbm_context_t * | Context, | ||
const char * | ApplicationSourceID, | ||
unsigned int | Seconds | ||
) |
Register a context for monitoring.
When a context is monitored, statistics are gathered for all transports on that context, broken out by transport. Monitoring may be done at regular intervals, specified by the Seconds parameter. As an alternative, passing zero for Seconds will not automatically monitor the context, but instead require an explicit call to lbmmon_sctl_sample().
If monitoring is to be used as a form of heartbeat, the preferred method is to call lbmmon_sctl_sample() from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.
Control | Pointer to an lbmmon_sctl_t which is to be used to monitor the context. |
Context | Pointer to an lbm_context_t which will be monitored. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used. |
Seconds | Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the context will not be automatically monitored, but instead will be monitored upon a call to lbmmon_ctl_sample(). |
LBMExpDLL int lbmmon_context_unmonitor | ( | lbmmon_sctl_t * | Control, |
lbm_context_t * | Context | ||
) |
Terminate monitoring for a context.
Unregister a context to prevent further monitoring of that context.
Control | Pointer to an lbmmon_sctl_t which is used to monitor the context. |
Context | Pointer to an previously registered lbm_context_t. |
LBMExpDLL int lbmmon_control_dump_default_filter_options | ( | void | ) |
Dump the default filter options to stdout.
LBMExpDLL const char* lbmmon_control_errmsg | ( | void | ) |
Function to return the last error message from lbmmon_control.
LBMExpDLL int lbmmon_control_index_for_command | ( | char * | Command | ) |
Retrieve the index associated with the given LBMMON control command.
Command | The command to convert to an index. |
LBMExpDLL int lbmmon_control_index_for_node_type | ( | char * | NodeType | ) |
Retrieve the index associated with the given LBMMON control node type.
NodeType | The node type to convert to an index. |
LBMExpDLL int lbmmon_control_load_data_from_filename | ( | char * | Filename, |
char ** | Data | ||
) |
Load data from filename into a buffer.
Filename | String with filename to be read. |
Data | A pointer to a buffer (if successful) with the contents of the file. Will be malloc'd by this function and must be free'd by caller. |
LBMExpDLL int lbmmon_control_serialize | ( | char * | Destination, |
size_t * | Size, | ||
int | Command, | ||
char * | Data, | ||
int | NodeType, | ||
char * | ApplicationSourceID | ||
) |
Function to serialize a control message.
Destination | A pointer to a buffer to receive the serialized format of the control message. |
Size | A pointer to a size_t . On entry, it will contain the maximum allowed size of the serialized packet. On exit, it must contain the actual size of the serialized packet. |
Command | The result from lbmmon_index_for_command. |
Data | A pointer to any data required for a command. |
NodeType | The result from lbmmon_control_index_for_command. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. |
LBMExpDLL const char* lbmmon_control_valid_commands | ( | void | ) |
Retrieve the list of valid LBMMON control commands.
LBMExpDLL const char* lbmmon_control_valid_node_types | ( | void | ) |
Retrieve the list of valid LBMMON control node types.
LBMExpDLL const char* lbmmon_errmsg | ( | void | ) |
Retrieve the error message for the last error encountered.
LBMExpDLL int lbmmon_errnum | ( | void | ) |
Retrieve the error number for the last error encountered.
LBMExpDLL int lbmmon_evq_monitor | ( | lbmmon_sctl_t * | Control, |
lbm_event_queue_t * | EventQueue, | ||
const char * | ApplicationSourceID, | ||
unsigned int | Seconds | ||
) |
Register an event queue for monitoring.
Monitoring may be done at regular intervals, specified by the Seconds parameter. As an alternative, passing zero for Seconds will not automatically monitor the receiver, but instead require an explicit call to lbmmon_ctl_sample().
If monitoring is to be used as a form of heartbeat, the preferred method is to call lbmmon_ctl_sample() from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.
Control | Pointer to an lbmmon_sctl_t which is to be used to monitor the context. |
EventQueue | Pointer to an lbm_event_queue_t which will be monitored. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used. |
Seconds | Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the receiver will not be automatically monitored, but instead will be monitored upon a call to lbmmon_sctl_sample(). |
LBMExpDLL int lbmmon_evq_unmonitor | ( | lbmmon_sctl_t * | Control, |
lbm_event_queue_t * | EventQueue | ||
) |
Terminate monitoring for an event queue.
Unregister an event queue to prevent further monitoring of that receiver.
Control | Pointer to an lbmmon_sctl_t which is used to monitor the context. |
EventQueue | Pointer to an previously registered lbm_event_queue_t. |
LBMExpDLL const char* lbmmon_next_key_value_pair | ( | const char * | String, |
char * | Key, | ||
size_t | KeySize, | ||
char * | Value, | ||
size_t | ValueSize | ||
) |
Retrieve the next key/value pair from a semicolon-separated list.
This is a convenience utility function to facilitate processing of a semicolon-separated list of key/value pairs. Each pair is of the form "key=value".
String | A pointer to the unprocessed part of the semicolon-separated list. |
Key | Pointer to a character string into which is written the null-terminated key. |
KeySize | Maximum length of Key. |
Value | Pointer to a character string into which is written the null-terminated value. |
ValueSize | Maximum length of Value. |
NULL
if no key/value pair is found. Otherwise a pointer to the remainder of the string, to be passed to subsequent calls to lbmmon_next_key_value_pair(). LBMExpDLL int lbmmon_rctl_attr_create | ( | lbmmon_rctl_attr_t ** | Attributes | ) |
Create an LBM Monitoring Receive Controller attribute object.
The attribute object is created and initialized.
Attributes | A pointer to a pointer to an LBMMON receive controller attribute structure. Will be filled in by the function to point to the newly created lbmmon_rctl_attr_t object. |
LBMExpDLL int lbmmon_rctl_attr_delete | ( | lbmmon_rctl_attr_t * | Attributes | ) |
Delete an LBM Monitoring Receive Controller attribute object.
The attribute object is cleaned up and deleted.
Attributes | A pointer to an LBMMON receive controller attribute structure as created by lbmmon_rctl_attr_create. |
LBMExpDLL int lbmmon_rctl_attr_getopt | ( | lbmmon_rctl_attr_t * | Attributes, |
int | Option, | ||
void * | Value, | ||
size_t * | Length | ||
) |
Get an LBMMON receive controller attribute option value.
Attributes | The attributes object to get the option value for. |
Option | The option to get. See LBMMON_RCTL_ATTR_*. |
Value | Pointer to the option value structure to be filled. |
Length | Length (in bytes) of the Value structure when passed in. Upon return, this is set to the actual size of the Value structure filled in. |
LBMExpDLL int lbmmon_rctl_attr_setopt | ( | lbmmon_rctl_attr_t * | Attributes, |
int | Option, | ||
void * | Value, | ||
size_t | Length | ||
) |
Set an LBMMON receive controller attribute option value.
Attributes | The attributes object to set the option value for. |
Option | The option to set. See LBMMON_RCTL_ATTR_*. |
Value | The value to set for the option. |
Length | The size (in bytes) of Value. |
LBMExpDLL int lbmmon_rctl_create | ( | lbmmon_rctl_t ** | Control, |
const lbmmon_format_func_t * | Format, | ||
const void * | FormatOptions, | ||
const lbmmon_transport_func_t * | Transport, | ||
const void * | TransportOptions, | ||
lbmmon_rctl_attr_t * | Attributes, | ||
void * | ClientData | ||
) |
Create an LBM Monitoring Receive Controller.
This creates an instance of an LBM Monitoring Receive Controller.
Control | A pointer to a pointer to an LBM Monitoring Receive Control object. Will be filled in by this function to point to the newly created lbmmon_rctl_t object. |
Format | A pointer to an lbmmon_format_func_t object which has been filled in with the appropriate function pointers. |
FormatOptions | A block of data which is passed to the format module's initialization function. This may be used to pass configuration options to the format module. |
Transport | A pointer to an lbmmon_transport_func_t object which has been filled in with the appropriate function pointers. |
TransportOptions | A block of data which is passed to the transport module's initialization function. This may be used to pass configuration options to the transport module. |
Attributes | A pointer to an lbmmon_rctl_attr_t object which has been filled in with the appropriate options. |
ClientData | A pointer to a block of memory which can be used for client-specific data. It is passed to all callback functions. |
LBMExpDLL int lbmmon_rctl_destroy | ( | lbmmon_rctl_t * | Control | ) |
Destroy a statistics receive controller.
Destroys a monitoring controller.
Control | Pointer to an lbmmon_rctl_t to be destroyed. |
LBMExpDLL int lbmmon_rcv_monitor | ( | lbmmon_sctl_t * | Control, |
lbm_rcv_t * | Receiver, | ||
const char * | ApplicationSourceID, | ||
unsigned int | Seconds | ||
) |
Register a receiver for monitoring.
Monitoring may be done at regular intervals, specified by the Seconds parameter. As an alternative, passing zero for Seconds will not automatically monitor the receiver, but instead require an explicit call to lbmmon_ctl_sample().
If monitoring is to be used as a form of heartbeat, the preferred method is to call lbmmon_ctl_sample() from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.
Control | Pointer to an lbmmon_sctl_t which is to be used to monitor the context. |
Receiver | Pointer to an lbm_rcv_t which will be monitored. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used. |
Seconds | Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the receiver will not be automatically monitored, but instead will be monitored upon a call to lbmmon_sctl_sample(). |
LBMExpDLL int lbmmon_rcv_unmonitor | ( | lbmmon_sctl_t * | Control, |
lbm_rcv_t * | Receiver | ||
) |
Terminate monitoring for a receiver.
Unregister a receiver to prevent further monitoring of that receiver.
Control | Pointer to an lbmmon_sctl_t which is used to monitor the context. |
Receiver | Pointer to an previously registered lbm_rcv_t. |
LBMExpDLL int lbmmon_sctl_create | ( | lbmmon_sctl_t ** | Control, |
const lbmmon_format_func_t * | Format, | ||
const void * | FormatOptions, | ||
const lbmmon_transport_func_t * | Transport, | ||
const void * | TransportOptions | ||
) |
Create an LBM Monitoring Source Controller.
This creates an instance of an LBM Monitoring Source Controller.
Control | A pointer to a pointer to an LBM Monitoring Source Control object. It will be filled in by this function to point to the newly created lbmmon_sctl_t object. |
Format | A pointer to an lbmmon_format_func_t object which has been filled in with the appropriate function pointers. |
FormatOptions | A block of data which is passed to the format module's initialization function. This may be used to pass configuration options to the format module. |
Transport | A pointer to an lbmmon_transport_func_t object which has been filled in with the appropriate function pointers. |
TransportOptions | A block of data which is passed to the transport module's initialization function. This may be used to pass configuration options to the transport module. |
LBMExpDLL int lbmmon_sctl_destroy | ( | lbmmon_sctl_t * | Control | ) |
Destroy a source monitoring controller.
Destroys a monitoring controller. Any contexts, sources, or receivers currently registered to the controller will be automatically unregistered.
Control | Pointer to an lbmmon_sctl_t to be destroyed. |
LBMExpDLL int lbmmon_sctl_sample | ( | lbmmon_sctl_t * | Control | ) |
Gather statistics for on-demand objects.
Control | Pointer to an existing lbmmon_sctl_t controller. |
LBMExpDLL int lbmmon_sctl_sample_ex | ( | lbmmon_sctl_t * | Control, |
const char * | ApplicationSourceID | ||
) |
Extended gather statistics for on-demand objects.
Control | Pointer to an existing lbmmon_sctl_t controller. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. This overrides any application source ID passed to any of the lbmmon_*_monitor() functions for this call only. If a NULL pointer or an empty string is passed, the original application source ID will be used. |
LBMExpDLL int lbmmon_src_monitor | ( | lbmmon_sctl_t * | Control, |
lbm_src_t * | Source, | ||
const char * | ApplicationSourceID, | ||
unsigned int | Seconds | ||
) |
Register a source for monitoring.
Monitoring may be done at regular intervals, specified by the Seconds parameter. As an alternative, passing zero for Seconds will not automatically monitor the source, but instead require an explicit call to lbmmon_sctl_sample().
If monitoring is to be used as a form of heartbeat, the preferred method is to call lbmmon_ctl_sample() from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.
Control | Pointer to an lbmmon_sctl_t which is to be used to monitor the context. |
Source | Pointer to an lbm_src_t which will be monitored. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used. |
Seconds | Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the source will not be automatically monitored, but instead will be monitored upon a call to lbmmon_sctl_sample(). |
LBMExpDLL int lbmmon_src_unmonitor | ( | lbmmon_sctl_t * | Control, |
lbm_src_t * | Source | ||
) |
Terminate monitoring for a source.
Unregister a source to prevent further monitoring of that source.
Control | Pointer to an lbmmon_sctl_t which is used to monitor the context. |
Source | Pointer to an previously registered lbm_src_t. |
LBMExpDLL int lbmmon_ssrc_monitor | ( | lbmmon_sctl_t * | Control, |
lbm_ssrc_t * | SmartSource, | ||
const char * | ApplicationSourceID, | ||
unsigned int | Seconds | ||
) |
Register a smart source for monitoring.
Monitoring may be done at regular intervals, specified by the Seconds parameter. As an alternative, passing zero for Seconds will not automatically monitor the smart source, but instead require an explicit call to lbmmon_sctl_sample().
If monitoring is to be used as a form of heartbeat, the preferred method is to call lbmmon_ctl_sample() from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.
Control | Pointer to an lbmmon_sctl_t which is to be used to monitor the context. |
SmartSource | Pointer to an lbm_ssrc_t which will be monitored. |
ApplicationSourceID | Null-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used. |
Seconds | Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the smart source will not be automatically monitored, but instead will be monitored upon a call to lbmmon_sctl_sample(). |
LBMExpDLL int lbmmon_ssrc_unmonitor | ( | lbmmon_sctl_t * | Control, |
lbm_ssrc_t * | SmartSource | ||
) |
Terminate monitoring for a smart source.
Unregister a smart source to prevent further monitoring of that source.
Control | Pointer to an lbmmon_sctl_t which is used to monitor the context. |
SmartSource | Pointer to an previously registered lbm_ssrc_t. |