UM C API  6.12.1
lbmmon.h File Reference

Ultra Messaging (UM) Monitoring API. More...

#include <stdlib.h>
#include <lbm/lbm.h>
#include <lbm/lbmmonfmtcsv.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_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_transport_func_t_stct
 Transport module function pointer container. More...
 

Macros

#define LBMMON_ERROR_BASE   4096
 
#define LBMMON_EINVAL   (LBMMON_ERROR_BASE + 1)
 
#define LBMMON_ENOMEM   (LBMMON_ERROR_BASE + 2)
 
#define LBMMON_EMODFAIL   (LBMMON_ERROR_BASE + 3)
 
#define LBMMON_ELBMFAIL   (LBMMON_ERROR_BASE + 4)
 
#define LBMMON_EAGAIN   (LBMMON_ERROR_BASE + 5)
 
#define LBMMON_EALREADY   (LBMMON_ERROR_BASE + 6)
 
#define LBMMON_EOP   (LBMMON_ERROR_BASE + 7)
 
#define LBMMON_PACKET_SIGNATURE   0x1b33041b
 
#define LBMMON_PACKET_TYPE_SOURCE   0
 
#define LBMMON_PACKET_TYPE_RECEIVER   1
 
#define LBMMON_PACKET_TYPE_EVENT_QUEUE   2
 
#define LBMMON_PACKET_TYPE_CONTEXT   3
 
#define LBMMON_PACKET_TYPE_RECEIVER_TOPIC   4
 
#define LBMMON_PACKET_TYPE_WILDCARD_RECEIVER   5
 
#define LBMMON_ATTR_SENDER_IPV4   0
 
#define LBMMON_ATTR_TIMESTAMP   1
 
#define LBMMON_ATTR_APPSOURCEID   2
 
#define LBMMON_ATTR_FORMAT_MODULEID   3
 
#define LBMMON_ATTR_OBJECTID   4
 
#define LBMMON_ATTR_CONTEXTID   LBMMON_ATTR_OBJECTID
 
#define LBMMON_ATTR_PROCESSID   5
 
#define LBMMON_ATTR_SOURCE   6
 
#define LBMMON_ATTR_CTXINST   7
 
#define LBMMON_ATTR_DOMAINID   8
 
#define LBMMON_ATTR_SOURCE_NORMAL   0
 
#define LBMMON_ATTR_SOURCE_IM   1
 
#define LBMMON_RCTL_RECEIVER_CALLBACK   0
 
#define LBMMON_RCTL_SOURCE_CALLBACK   1
 
#define LBMMON_RCTL_EVENT_QUEUE_CALLBACK   2
 
#define LBMMON_RCTL_CONTEXT_CALLBACK   3
 
#define LBMMON_RCTL_RECEIVER_TOPIC_CALLBACK   4
 
#define LBMMON_RCTL_WILDCARD_RECEIVER_CALLBACK   5
 

Typedefs

typedef struct lbmmon_packet_hdr_t_stct lbmmon_packet_hdr_t
 Statistics packet header layout. More...
 
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_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, 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 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 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 lbm_context_stats_t *Statistics, void *FormatClientData)
 Function to serialize an lbm_context_stats_t structure. More...
 
typedef int(* lbmmon_rcv_format_deserialize_t) (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) (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) (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) (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 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) (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 lbm_wildcard_rcv_stats_t *Statistics, void *FormatClientData)
 Function to serialize wildcard receiver statistics. More...
 
typedef int(* lbmmon_wildcard_rcv_format_deserialize_t) (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_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 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 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_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...
 
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...
 

Detailed Description

Ultra Messaging (UM) Monitoring API.

Author
David K. Ameiss - Informatica Corporation
Version
Id
//UMprod/REL_6_12_1/29West/lbm/src/mon/lbm/lbmmon.h#1

The Ultra Messaging (UM) Monitoring API Description. Included are types, constants, and functions related to the API. Contents are subject to change.

All of the documentation and software included in this and any other Informatica Corporation Ultra Messaging Releases Copyright (C) Informatica Corporation. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with Informatica Corporation.

Copyright (C) 2006-2019, Informatica Corporation. All Rights Reserved.

THE SOFTWARE IS PROVIDED "AS IS" AND INFORMATICA DISCLAIMS ALL WARRANTIES EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. INFORMATICA DOES NOT WARRANT THAT USE OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE. INFORMATICA SHALL NOT, UNDER ANY CIRCUMSTANCES, BE LIABLE TO LICENSEE FOR LOST PROFITS, CONSEQUENTIAL, INCIDENTAL, SPECIAL OR INDIRECT DAMAGES ARISING OUT OF OR RELATED TO THIS AGREEMENT OR THE TRANSACTIONS CONTEMPLATED HEREUNDER, EVEN IF INFORMATICA HAS BEEN APPRISED OF THE LIKELIHOOD OF SUCH DAMAGES.

The LBM Monitoring API provides a framework to allow the convenient gathering of LBM statistics.

Macro Definition Documentation

#define LBMMON_ATTR_APPSOURCEID   2

Attribute block entry contains the application source ID string.

#define LBMMON_ATTR_CONTEXTID   LBMMON_ATTR_OBJECTID

Attribute block entry contains the context ID.

Deprecated:
Use LBMMON_ATTR_OBJECTID instead.
#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.

#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_PACKET_SIGNATURE   0x1b33041b

Packet signature value

#define LBMMON_PACKET_TYPE_CONTEXT   3

Packet contains context statistics

#define LBMMON_PACKET_TYPE_EVENT_QUEUE   2

Packet contains event queue 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_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_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_WILDCARD_RECEIVER_CALLBACK   5

Receive controller attribute option: Wildcard receiver statistics callback.

Typedef Documentation

typedef int(* lbmmon_ctx_format_deserialize_t) (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.

See also
lbmmon_ctx_format_serialize_t
Parameters
StatisticsA pointer to an lbm_context_stats_t structure into which the data is deserialized.
SourceA pointer to a buffer containing the serialized data.
LengthThe length of the serialized data.
ModuleIDThe 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).
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the deserialized data will not be delivered to the application.
typedef int(* lbmmon_ctx_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, 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.

See also
lbmmon_ctx_format_deserialize_t
Parameters
DestinationA pointer to a buffer to receive the serialized format of the lbm_context_stats_t statistics.
SizeA 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.
ModuleIDA 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).
StatisticsA pointer to the lbm_context_stats_t structure to be serialized.
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the serialized data will not be sent.
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.

Parameters
AttributeBlockPointer to the statistics packet attribute block.
StatisticsPointer to the context statistics.
ClientDataPointer to client-specific data as passed to lbmmon_rctl_create().

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

See also
lbmmon_evq_format_serialize_t
Parameters
StatisticsA pointer to an lbm_event_queue_stats_t structure into which the data is deserialized.
SourceA pointer to a buffer containing the serialized data.
LengthThe length of the serialized data.
ModuleIDThe 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).
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the deserialized data will not be delivered to the application.
typedef int(* lbmmon_evq_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, 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.

See also
lbmmon_evq_format_deserialize_t
Parameters
DestinationA pointer to a buffer to receive the serialized format of the lbm_event_queue_stats_t statistics.
SizeA 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.
ModuleIDA 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).
StatisticsA pointer to the lbm_event_queue_stats_t structure to be serialized.
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the serialized data will not be sent.
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.

Parameters
AttributeBlockPointer to the statistics packet attribute block.
StatisticsPointer to the event queue statistics.
ClientDataPointer to client-specific data as passed to lbmmon_rctl_create().

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 const char*(* lbmmon_format_errmsg_t) (void)

Function to return the last error message from a format module.

Returns
A string containing a description of the last error encountered by the 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().

Parameters
FormatClientDataA pointer to format-specific client data. This pointer should be freed if it was allocated previously.
Returns
Zero if successful, -1 otherwise.
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().

Parameters
FormatClientDataA 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.
FormatOptionsThe FormatOptions argument originally passed to lbmmon_sctl_create() or lbmmon_rctl_create().
Returns
Zero if successful, -1 otherwise. If -1 is returned, no further calls to the format module will be made, and the calling function (lbmmon_sctl_create() or lbmmon_rctl_create()) will return -1.

Statistics packet header layout.

A statistics packet consists of four fixed-length and fixed-position fields, as documented below. It is followed by two variable-length fields. The option block is located at packet + sizeof(lbmmon_packet_hdr_t), and is mOptionBlockLength (when properly interpreted) bytes in length (which may be zero). The statistics data block is located immediately following the option block.

typedef int(* lbmmon_rcv_format_deserialize_t) (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.

See also
lbmmon_rcv_format_serialize_t
lbmmon_src_format_serialize_t
lbmmon_src_format_deserialize_t
Parameters
StatisticsA pointer to an lbm_rcv_transport_stats_t structure into which the data is deserialized.
SourceA pointer to a buffer containing the serialized data.
LengthThe length of the serialized data.
ModuleIDThe 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).
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the deserialized data will not be delivered to the application.
typedef int(* lbmmon_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, 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.

See also
lbmmon_src_format_serialize_t
lbmmon_rcv_format_deserialize_t
lbmmon_src_format_deserialize_t
Parameters
DestinationA pointer to a buffer to receive the serialized format of the lbm_rcv_transport_stats_t statistics.
SizeA 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.
ModuleIDA 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).
StatisticsA pointer to the lbm_rcv_transport_stats_t structure to be serialized.
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the serialized data will not be sent.
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.

Parameters
AttributeBlockPointer to the statistics packet attribute block.
StatisticsPointer to the receiver statistics.
ClientDataPointer to client-specific data as passed to lbmmon_rctl_create().

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

See also
lbmmon_rcv_topic_format_deserialize_t
Parameters
CountA pointer to an integer containing the number of elements in the Statistics array. On exit, it will contain the actual number of elements parsed.
StatisticsAn array of lbm_rcv_topic_stats_t elements into which is written the actual deserialized data.
SourceA pointer to a buffer containing the serialized data.
LengthThe length of the serialized data.
ModuleIDThe 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).
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -2 if Count is not large enough for all elements, -1 otherwise. If -2 is returned, Count will contain the number of elements required. If -1 is returned, the deserialized data will not be delivered to the application.
typedef int(* lbmmon_rcv_topic_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, 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.

See also
lbmmon_rcv_topic_format_deserialize_t
Parameters
DestinationA pointer to a buffer to receive the serialized format of the lbm_context_stats_t statistics.
SizeA 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.
ModuleIDA 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).
TopicA NUL-terminated string containing the topic.
SourceCountThe number of sources in the Sources array.
SourcesAn array of lbm_rcv_topic_stats_t structures containing the sources to which the receiver is joined.
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the serialized data will not be sent.
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.

Parameters
AttributeBlockPointer to the statistics packet attribute block.
StatisticsPointer to the receiver topic statistics.
ClientDataPointer 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) (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.

See also
lbmmon_rcv_format_serialize_t
lbmmon_src_format_serialize_t
lbmmon_rcv_format_deserialize_t
Parameters
StatisticsA pointer to an lbm_src_transport_stats_t structure into which the data is deserialized.
SourceA pointer to a buffer containing the serialized data.
LengthThe length of the serialized data.
ModuleIDThe 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).
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the deserialized data will not be delivered to the application.
typedef int(* lbmmon_src_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, const lbm_src_transport_stats_t *Statistics, void *FormatClientData)

Function to serialize an lbm_src_transport_stats_t structure.

See also
lbmmon_rcv_format_serialize_t
lbmmon_rcv_format_deserialize_t
lbmmon_src_format_deserialize_t
Parameters
DestinationA pointer to a buffer to receive the serialized format of the lbm_src_transport_stats_t statistics.
SizeA 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.
ModuleIDA 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).
StatisticsA pointer to an lbm_src_transport_stats_t structure to be serialized.
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the serialized data will not be sent.
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.

Parameters
AttributeBlockPointer to the statistics packet attribute block.
StatisticsPointer to the source statistics.
ClientDataPointer to client-specific data as passed to lbmmon_rctl_create().

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 char*(* lbmmon_transport_errmsg_t) (void)

Function to return the last error message from a transport module.

Returns
A string containing a description of the last error encountered by the module.
typedef int(* lbmmon_transport_finishrcv_t) (void *TransportClientData)

Finish processing for a receiver transport.

Parameters
TransportClientDataA 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.
Returns
Zero if successful, -1 otherwise.
typedef int(* lbmmon_transport_finishsrc_t) (void *TransportClientData)

Finish processing for a source transport.

Parameters
TransportClientDataA 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.
Returns
Zero if successful, -1 otherwise.
typedef int(* lbmmon_transport_initrcv_t) (void **TransportClientData, const void *TransportOptions)

Function to initialize a transport module to serve as a receiver of statistics.

Parameters
TransportClientDataA pointer which may be filled in (by this function) with a pointer to transport-specific client data.
TransportOptionsThe TransportOptions argument originally passed to lbmmon_rctl_create().
Returns
Zero if successful, -1 otherwise.
typedef int(* lbmmon_transport_initsrc_t) (void **TransportClientData, const void *TransportOptions)

Function to initialize a transport module to serve as a source of statistics.

Parameters
TransportClientDataA pointer which may be filled in (by this function) with a pointer to transport-specific client data.
TransportOptionsThe TransportOptions argument originally passed to lbmmon_sctl_create().
Returns
Zero if successful, -1 otherwise.
typedef int(* lbmmon_transport_receive_t) (char *Data, size_t *Length, unsigned int TimeoutMS, void *TransportClientData)

Receive statistics data.

Parameters
DataPointer to a buffer into which the received (serialized) data is to be placed.
LengthPointer 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.
TimeoutMSMaximum time, in milliseconds, the function may wait for incoming data before returning a timeout indicator.
TransportClientDataA pointer to transport-specific client data as returned by the lbmmon_transport_initrcv_t function.
Returns
Zero if successful, >0 if timeout exceeded, -1 otherwise.
typedef int(* lbmmon_transport_send_t) (const char *Data, size_t Length, void *TransportClientData)

Send a statistics packet.

Parameters
DataPointer to the serialized statistics data.
LengthLength of the serialized statistics data.
TransportClientDataA pointer to transport-specific client data as returned by the lbmmon_transport_initsrc_t function.
Returns
Zero if successful, -1 otherwise.
typedef int(* lbmmon_wildcard_rcv_format_deserialize_t) (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.

See also
lbmmon_wildcard_rcv_format_deserialize_t
Parameters
StatisticsA pointer to an lbm_wildcard_rcv_stats_t structure into which the data is deserialized.
SourceA pointer to a buffer containing the serialized data.
LengthThe length of the serialized data.
ModuleIDThe 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).
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the deserialized data will not be delivered to the application.
typedef int(* lbmmon_wildcard_rcv_format_serialize_t) (char *Destination, size_t *Size, unsigned short *ModuleID, 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.

See also
lbmmon_wildcard_rcv_format_deserialize_t
Parameters
DestinationA pointer to a buffer to receive the serialized format of the lbm_wildcard_rcv_stats_t statistics.
SizeA 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.
ModuleIDA 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).
StatisticsA pointer to an lbm_wildcard_rcv_stats_t structure to be serialized.
FormatClientDataA pointer to format-specific client data as returned by the lbmmon_format_init_t function.
Returns
Zero if successful, -1 otherwise. If -1 is returned, the serialized data will not be sent.
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.

Parameters
AttributeBlockPointer to the statistics packet attribute block.
StatisticsPointer to the wildcard receiver statistics.
ClientDataPointer 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.

Function Documentation

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.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
ApplicationSourceIDPointer to a buffer to receive the application source ID as a null-terminated string.
LengthMaximum length of ApplicationSourceID
Returns
0 if successful, -1 if the attribute does not exist.
LBMExpDLL int lbmmon_attr_get_contextid ( const void *  AttributeBlock,
lbm_ulong_t ContextID 
)

Retrieve the context ID attribute from the statistics attribute block.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
ContextIDPointer to a variable to receive the context ID.
Returns
0 if successful, -1 if the attribute does not exist.
Deprecated:
Use lbmmon_attr_get_objectid instead.
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.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
ContextInstancePointer to a buffer to receive the context instance.
LengthMaximum length of ContextInstance.
Returns
0 if successful, -1 if the attribute does not exist.
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.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
DomainIDPointer to a variable to receive the domain ID.
Returns
0 if successful, -1 if the attribute does not exist.
LBMExpDLL int lbmmon_attr_get_ipv4sender ( const void *  AttributeBlock,
lbm_uint_t Address 
)

Retrieve the IPV4 sender address attribute from the statistics attribute block.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
AddressPointer to a 32-bit integer to receive the IPV4 address in network order.
Returns
0 if successful, -1 if the attribute does not exist.
LBMExpDLL int lbmmon_attr_get_objectid ( const void *  AttributeBlock,
lbm_ulong_t ObjectID 
)

Retrieve the object ID attribute from the statistics attribute block.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
ObjectIDPointer to a variable to receive the object ID.
Returns
0 if successful, -1 if the attribute does not exist.
LBMExpDLL int lbmmon_attr_get_processid ( const void *  AttributeBlock,
lbm_ulong_t ProcessID 
)

Retrieve the process ID attribute from the statistics attribute block.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
ProcessIDPointer to a variable to receive the process ID.
Returns
0 if successful, -1 if the attribute does not exist.
LBMExpDLL int lbmmon_attr_get_source ( const void *  AttributeBlock,
lbm_ulong_t Source 
)

Retrieve the source attribute from the statistics attribute block.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
SourcePointer to a variable to receive the source flag.
Returns
0 if successful, -1 if the attribute does not exist.
LBMExpDLL int lbmmon_attr_get_timestamp ( const void *  AttributeBlock,
time_t *  Timestamp 
)

Retrieve the timestamp attribute from the statistics attribute block.

Parameters
AttributeBlockPointer to the attribute block as passed to the callback function.
TimestampPointer to a time_t to receive the timestamp.
Returns
0 if successful, -1 if the attribute does not exist.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is to be used to monitor the context.
ContextPointer to an lbm_context_t which will be monitored.
ApplicationSourceIDNull-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used.
SecondsInterval (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().
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is used to monitor the context.
ContextPointer to an previously registered lbm_context_t.
Returns
Zero if successful, -1 otherwise.
LBMExpDLL const char* lbmmon_errmsg ( void  )

Retrieve the error message for the last error encountered.

Returns
A pointer to a static character array containing the last error message.
LBMExpDLL int lbmmon_errnum ( void  )

Retrieve the error number for the last error encountered.

Returns
The last error encountered. See LBMMON_ERR_*.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is to be used to monitor the context.
EventQueuePointer to an lbm_event_queue_t which will be monitored.
ApplicationSourceIDNull-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used.
SecondsInterval (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().
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is used to monitor the context.
EventQueuePointer to an previously registered lbm_event_queue_t.
Returns
Zero if successful, -1 otherwise.
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".

Parameters
StringA pointer to the unprocessed part of the semicolon-separated list.
KeyPointer to a character string into which is written the null-terminated key.
KeySizeMaximum length of Key.
ValuePointer to a character string into which is written the null-terminated value.
ValueSizeMaximum length of Value.
Returns
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.

Parameters
AttributesA 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.
Returns
0 if successful, -1 otherwise.
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.

Parameters
AttributesA pointer to an LBMMON receive controller attribute structure as created by lbmmon_rctl_attr_create.
Returns
0 if successful, -1 otherwise.
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.

Parameters
AttributesThe attributes object to get the option value for.
OptionThe option to get. See LBMMON_RCTL_ATTR_*.
ValuePointer to the option value structure to be filled.
LengthLength (in bytes) of the Value structure when passed in. Upon return, this is set to the actual size of the Value structure filled in.
Returns
0 if successful, -1 otherwise.
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.

Parameters
AttributesThe attributes object to set the option value for.
OptionThe option to set. See LBMMON_RCTL_ATTR_*.
ValueThe value to set for the option.
LengthThe size (in bytes) of Value.
Returns
0 if successful, -1 otherwise.
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.

Parameters
ControlA 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.
FormatA pointer to an lbmmon_format_func_t object which has been filled in with the appropriate function pointers.
FormatOptionsA 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.
TransportA pointer to an lbmmon_transport_func_t object which has been filled in with the appropriate function pointers.
TransportOptionsA 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.
AttributesA pointer to an lbmmon_rctl_attr_t object which has been filled in with the appropriate options.
ClientDataA pointer to a block of memory which can be used for client-specific data. It is passed to all callback functions.
Returns
0 if successful, -1 otherwise.
LBMExpDLL int lbmmon_rctl_destroy ( lbmmon_rctl_t Control)

Destroy a statistics receive controller.

Destroys a monitoring controller.

Parameters
ControlPointer to an lbmmon_rctl_t to be destroyed.
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is to be used to monitor the context.
ReceiverPointer to an lbm_rcv_t which will be monitored.
ApplicationSourceIDNull-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used.
SecondsInterval (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().
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is used to monitor the context.
ReceiverPointer to an previously registered lbm_rcv_t.
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlA 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.
FormatA pointer to an lbmmon_format_func_t object which has been filled in with the appropriate function pointers.
FormatOptionsA 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.
TransportA pointer to an lbmmon_transport_func_t object which has been filled in with the appropriate function pointers.
TransportOptionsA 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.
Returns
0 if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t to be destroyed.
Returns
Zero if successful, -1 otherwise.
LBMExpDLL int lbmmon_sctl_sample ( lbmmon_sctl_t Control)

Gather statistics for on-demand objects.

Parameters
ControlPointer to an existing lbmmon_sctl_t controller.
Returns
Zero if successful, -1 otherwise.
LBMExpDLL int lbmmon_sctl_sample_ex ( lbmmon_sctl_t Control,
const char *  ApplicationSourceID 
)

Extended gather statistics for on-demand objects.

Parameters
ControlPointer to an existing lbmmon_sctl_t controller.
ApplicationSourceIDNull-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.
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is to be used to monitor the context.
SourcePointer to an lbm_src_t which will be monitored.
ApplicationSourceIDNull-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used.
SecondsInterval (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().
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is used to monitor the context.
SourcePointer to an previously registered lbm_src_t.
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is to be used to monitor the context.
SmartSourcePointer to an lbm_ssrc_t which will be monitored.
ApplicationSourceIDNull-terminated string containing an application-specified source identifier. If a NULL pointer or an empty string is passed, the application name will be used.
SecondsInterval (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().
Returns
Zero if successful, -1 otherwise.
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.

Parameters
ControlPointer to an lbmmon_sctl_t which is used to monitor the context.
SmartSourcePointer to an previously registered lbm_ssrc_t.
Returns
Zero if successful, -1 otherwise.