1 /*************************************************************************//**
3 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 ****************************************************************************/
18 /**************************************************************************//**
20 * Header for EVEL library
22 * This file implements the EVEL library which is intended to provide a
23 * simple wrapper around the complexity of AT&T's Vendor Event Listener API so
24 * that VNFs can use it without worrying about details of the API transport.
26 * Zero return value is success (::EVEL_SUCCESS), non-zero is failure and will
27 * be one of ::EVEL_ERR_CODES.
28 *****************************************************************************/
43 #include "double_list.h"
44 #include "hashtable.h"
46 /*****************************************************************************/
47 /* Supported API version. */
48 /*****************************************************************************/
49 #define EVEL_API_MAJOR_VERSION 5
50 #define EVEL_API_MINOR_VERSION 0
52 /**************************************************************************//**
55 * Error codes for EVEL low level interface
56 *****************************************************************************/
58 EVEL_SUCCESS, /** The operation was successful. */
59 EVEL_ERR_GEN_FAIL, /** Non-specific failure. */
60 EVEL_CURL_LIBRARY_FAIL, /** A cURL library operation failed. */
61 EVEL_PTHREAD_LIBRARY_FAIL, /** A Posix threads operation failed. */
62 EVEL_OUT_OF_MEMORY, /** A memory allocation failure occurred. */
63 EVEL_EVENT_BUFFER_FULL, /** Too many events in the ring-buffer. */
64 EVEL_EVENT_HANDLER_INACTIVE, /** Attempt to raise event when inactive. */
65 EVEL_NO_METADATA, /** Failed to retrieve OpenStack metadata. */
66 EVEL_BAD_METADATA, /** OpenStack metadata invalid format. */
67 EVEL_BAD_JSON_FORMAT, /** JSON failed to parse correctly. */
68 EVEL_JSON_KEY_NOT_FOUND, /** Failed to find the specified JSON key. */
69 EVEL_MAX_ERROR_CODES /** Maximum number of valid error codes. */
72 /**************************************************************************//**
75 * Variable levels of verbosity in the logging functions.
76 *****************************************************************************/
86 /*****************************************************************************/
87 /* Maximum string lengths. */
88 /*****************************************************************************/
89 #define EVEL_MAX_STRING_LEN 4096
90 #define EVEL_MAX_JSON_BODY 524288
91 #define EVEL_MAX_ERROR_STRING_LEN 255
92 #define EVEL_MAX_URL_LEN 511
94 /**************************************************************************//**
95 * This value represents there being no restriction on the reporting interval.
96 *****************************************************************************/
97 static const int EVEL_MEASUREMENT_INTERVAL_UKNOWN = 0;
99 /**************************************************************************//**
100 * How many events can be backed-up before we start dropping events on the
103 * @note This value should be tuned in accordance with expected burstiness of
104 * the event load and the expected response time of the ECOMP event
105 * listener so that the probability of the buffer filling is suitably
107 *****************************************************************************/
108 static const int EVEL_EVENT_BUFFER_DEPTH = 100;
110 /*****************************************************************************/
111 /* How many different IP Types-of-Service are supported. */
112 /*****************************************************************************/
113 #define EVEL_TOS_SUPPORTED 256
115 /**************************************************************************//**
116 * Event domains for the various events we support.
117 * JSON equivalent field: domain
118 *****************************************************************************/
120 EVEL_DOMAIN_INTERNAL, /** Internal event, not for external routing. */
121 EVEL_DOMAIN_BATCH, /** Batch event, composite event. */
122 EVEL_DOMAIN_HEARTBEAT, /** A Heartbeat event (event header only). */
123 EVEL_DOMAIN_FAULT, /** A Fault event. */
124 EVEL_DOMAIN_MEASUREMENT, /** A Measurement for VF Scaling event. */
125 EVEL_DOMAIN_MOBILE_FLOW, /** A Mobile Flow event. */
126 EVEL_DOMAIN_REPORT, /** A Measurement for VF Reporting event. */
127 EVEL_DOMAIN_HEARTBEAT_FIELD,/** A Heartbeat field event. */
128 EVEL_DOMAIN_SIPSIGNALING, /** A Signaling event. */
129 EVEL_DOMAIN_STATE_CHANGE, /** A State Change event. */
130 EVEL_DOMAIN_SYSLOG, /** A Syslog event. */
131 EVEL_DOMAIN_OTHER, /** Another event. */
132 EVEL_DOMAIN_THRESHOLD_CROSS, /** A Threshold Crossing Event */
133 EVEL_DOMAIN_VOICE_QUALITY, /** A Voice Quality Event */
134 EVEL_MAX_DOMAINS /** Maximum number of recognized Event types. */
135 } EVEL_EVENT_DOMAINS;
137 /**************************************************************************//**
139 * JSON equivalent field: priority
140 *****************************************************************************/
143 EVEL_PRIORITY_MEDIUM,
144 EVEL_PRIORITY_NORMAL,
147 } EVEL_EVENT_PRIORITIES;
149 /**************************************************************************//**
150 * Fault / Threshold severities.
151 * JSON equivalent field: eventSeverity
152 *****************************************************************************/
154 EVEL_SEVERITY_CRITICAL,
157 EVEL_SEVERITY_WARNING,
158 EVEL_SEVERITY_NORMAL,
162 /**************************************************************************//**
163 * Fault source types.
164 * JSON equivalent field: eventSourceType
165 *****************************************************************************/
173 EVEL_SOURCE_SLOT_THRESHOLD,
174 EVEL_SOURCE_PORT_THRESHOLD,
175 EVEL_SOURCE_VIRTUAL_MACHINE,
176 EVEL_SOURCE_VIRTUAL_NETWORK_FUNCTION,
177 /***************************************************************************/
178 /* START OF VENDOR-SPECIFIC VALUES */
180 /* Vendor-specific values should be added here, and handled appropriately */
181 /* in evel_event.c. */
182 /***************************************************************************/
184 /***************************************************************************/
185 /* END OF VENDOR-SPECIFIC VALUES */
186 /***************************************************************************/
187 EVEL_MAX_SOURCE_TYPES
190 /**************************************************************************//**
192 * JSON equivalent field: vfStatus
193 *****************************************************************************/
195 EVEL_VF_STATUS_ACTIVE,
197 EVEL_VF_STATUS_PREP_TERMINATE,
198 EVEL_VF_STATUS_READY_TERMINATE,
199 EVEL_VF_STATUS_REQ_TERMINATE,
203 /**************************************************************************//**
204 * Counter criticalities.
205 * JSON equivalent field: criticality
206 *****************************************************************************/
208 EVEL_COUNTER_CRITICALITY_CRIT,
209 EVEL_COUNTER_CRITICALITY_MAJ,
210 EVEL_MAX_COUNTER_CRITICALITIES
211 } EVEL_COUNTER_CRITICALITIES;
213 /**************************************************************************//**
215 * JSON equivalent field: alertAction
216 *****************************************************************************/
218 EVEL_ALERT_ACTION_CLEAR,
219 EVEL_ALERT_ACTION_CONT,
220 EVEL_ALERT_ACTION_SET,
221 EVEL_MAX_ALERT_ACTIONS
222 } EVEL_ALERT_ACTIONS;
224 /**************************************************************************//**
226 * JSON equivalent field: alertType
227 *****************************************************************************/
229 EVEL_ALERT_TYPE_CARD,
230 EVEL_ALERT_TYPE_ELEMENT,
231 EVEL_ALERT_TYPE_INTERFACE,
232 EVEL_ALERT_TYPE_SERVICE,
236 /**************************************************************************//**
238 * JSON equivalent fields: newState, oldState
239 *****************************************************************************/
241 EVEL_ENTITY_STATE_IN_SERVICE,
242 EVEL_ENTITY_STATE_MAINTENANCE,
243 EVEL_ENTITY_STATE_OUT_OF_SERVICE,
244 EVEL_MAX_ENTITY_STATES
247 /**************************************************************************//**
249 * JSON equivalent field: syslogFacility
250 *****************************************************************************/
252 EVEL_SYSLOG_FACILITY_KERNEL,
253 EVEL_SYSLOG_FACILITY_USER,
254 EVEL_SYSLOG_FACILITY_MAIL,
255 EVEL_SYSLOG_FACILITY_SYSTEM_DAEMON,
256 EVEL_SYSLOG_FACILITY_SECURITY_AUTH,
257 EVEL_SYSLOG_FACILITY_INTERNAL,
258 EVEL_SYSLOG_FACILITY_LINE_PRINTER,
259 EVEL_SYSLOG_FACILITY_NETWORK_NEWS,
260 EVEL_SYSLOG_FACILITY_UUCP,
261 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON,
262 EVEL_SYSLOG_FACILITY_SECURITY_AUTH2,
263 EVEL_SYSLOG_FACILITY_FTP_DAEMON,
264 EVEL_SYSLOG_FACILITY_NTP,
265 EVEL_SYSLOG_FACILITY_LOG_AUDIT,
266 EVEL_SYSLOG_FACILITY_LOG_ALERT,
267 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON2,
268 EVEL_SYSLOG_FACILITY_LOCAL0,
269 EVEL_SYSLOG_FACILITY_LOCAL1,
270 EVEL_SYSLOG_FACILITY_LOCAL2,
271 EVEL_SYSLOG_FACILITY_LOCAL3,
272 EVEL_SYSLOG_FACILITY_LOCAL4,
273 EVEL_SYSLOG_FACILITY_LOCAL5,
274 EVEL_SYSLOG_FACILITY_LOCAL6,
275 EVEL_SYSLOG_FACILITY_LOCAL7,
276 EVEL_MAX_SYSLOG_FACILITIES
277 } EVEL_SYSLOG_FACILITIES;
279 /**************************************************************************//**
281 * JSON equivalent fields: tcpFlagCountList, tcpFlagList
282 *****************************************************************************/
296 /**************************************************************************//**
297 * Mobile QCI Classes of Service.
298 * JSON equivalent fields: mobileQciCosCountList, mobileQciCosList
299 *****************************************************************************/
302 /***************************************************************************/
303 /* UMTS Classes of Service. */
304 /***************************************************************************/
305 EVEL_QCI_COS_UMTS_CONVERSATIONAL,
306 EVEL_QCI_COS_UMTS_STREAMING,
307 EVEL_QCI_COS_UMTS_INTERACTIVE,
308 EVEL_QCI_COS_UMTS_BACKGROUND,
310 /***************************************************************************/
311 /* LTE Classes of Service. */
312 /***************************************************************************/
326 EVEL_MAX_QCI_COS_TYPES
327 } EVEL_QCI_COS_TYPES;
329 /**************************************************************************//**
330 * Service Event endpoint description
331 * JSON equivalent field: endpointDesc
332 *****************************************************************************/
334 EVEL_SERVICE_ENDPOINT_CALLEE,
335 EVEL_SERVICE_ENDPOINT_CALLER,
336 EVEL_MAX_SERVICE_ENDPOINT_DESC
337 } EVEL_SERVICE_ENDPOINT_DESC;
339 /**************************************************************************//**
340 * Boolean type for EVEL library.
341 *****************************************************************************/
347 /**************************************************************************//**
348 * Optional parameter holder for double.
349 *****************************************************************************/
350 typedef struct evel_option_double
354 } EVEL_OPTION_DOUBLE;
356 /**************************************************************************//**
357 * Optional parameter holder for string.
358 *****************************************************************************/
359 typedef struct evel_option_string
363 } EVEL_OPTION_STRING;
365 /**************************************************************************//**
366 * Optional parameter holder for int.
367 *****************************************************************************/
368 typedef struct evel_option_int
374 /**************************************************************************//**
375 * Optional parameter holder for unsigned long long.
376 *****************************************************************************/
377 typedef struct evel_option_ull
379 unsigned long long value;
383 /**************************************************************************//**
384 * Optional parameter holder for time_t.
385 *****************************************************************************/
386 typedef struct evel_option_time
392 /**************************************************************************//**
393 * enrichment fields for internal VES Event Listener service use only,
394 * not supplied by event sources
395 *****************************************************************************/
396 typedef struct internal_header_fields
400 } EVEL_OPTION_INTHEADER_FIELDS;
402 /*****************************************************************************/
403 /* Supported Common Event Header version. */
404 /*****************************************************************************/
405 #define EVEL_HEADER_MAJOR_VERSION 3
406 #define EVEL_HEADER_MINOR_VERSION 0
408 #define EVEL_BATCH_MAJOR_VERSION 1
409 #define EVEL_BATCH_MINOR_VERSION 0
410 /**************************************************************************//**
412 * JSON equivalent field: commonEventHeader
413 *****************************************************************************/
414 typedef struct event_header {
415 /***************************************************************************/
417 /***************************************************************************/
421 /***************************************************************************/
422 /* Mandatory fields */
423 /***************************************************************************/
424 EVEL_EVENT_DOMAINS event_domain;
428 char * reporting_entity_name;
429 EVEL_EVENT_PRIORITIES priority;
430 unsigned long long start_epoch_microsec;
431 unsigned long long last_epoch_microsec;
434 /***************************************************************************/
435 /* Optional fields */
436 /***************************************************************************/
437 EVEL_OPTION_STRING event_type;
438 EVEL_OPTION_STRING source_id;
439 EVEL_OPTION_STRING reporting_entity_id;
440 EVEL_OPTION_INTHEADER_FIELDS internal_field;
441 EVEL_OPTION_STRING nfcnaming_code;
442 EVEL_OPTION_STRING nfnaming_code;
447 /**************************************************************************//**
448 * Initialize a newly created event header.
450 * @param header Pointer to the header being initialized.
451 * @param eventname Eventname string
452 * @param eventid Event id : unique id for classification and analysis
453 * @param header Pointer to the header being initialized.
454 *****************************************************************************/
455 void evel_init_header_nameid(EVENT_HEADER * const header,const char *const eventname, const char *eventid);
457 /**************************************************************************//**
458 * Create a new Batch event.
460 * @note The mandatory fields on the Batch must be supplied to this factory
461 * function and are immutable once set. Optional fields have explicit
462 * setter functions, but again values may only be set once so that the
463 * Batch has immutable properties. At this time evename and eventid
464 * for batch events are set but not used in json encoding
465 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
466 * not used (i.e. posted) it must be released using ::evel_free_batch.
467 * @retval NULL Failed to create the event.
468 *****************************************************************************/
469 EVENT_HEADER * evel_new_batch(const char* ev_name, const char *ev_id);
472 /**************************************************************************//**
473 * Add an Event into Batch Event
475 * The name and value are null delimited ASCII strings. The library takes
476 * a copy so the caller does not have to preserve values after the function
479 * @param other Pointer to the Batch Event.
480 * @param jsonobj Pointer to additional Event
481 *****************************************************************************/
482 void evel_batch_add_event(EVENT_HEADER * batchev, EVENT_HEADER *child);
484 /**************************************************************************//**
487 * Free off the Batch supplied. Will free all the contained allocated memory.
489 * @note It does not free the Batch itself, since that may be part of a
491 *****************************************************************************/
492 void evel_free_batch(EVENT_HEADER * event);
494 /*****************************************************************************/
495 /* Supported Fault version. */
496 /*****************************************************************************/
497 #define EVEL_FAULT_MAJOR_VERSION 2
498 #define EVEL_FAULT_MINOR_VERSION 0
500 /**************************************************************************//**
502 * JSON equivalent field: faultFields
503 *****************************************************************************/
504 typedef struct event_fault {
505 /***************************************************************************/
506 /* Header and version */
507 /***************************************************************************/
512 /***************************************************************************/
513 /* Mandatory fields */
514 /***************************************************************************/
515 EVEL_SEVERITIES event_severity;
516 EVEL_SOURCE_TYPES event_source_type;
517 char * alarm_condition;
518 char * specific_problem;
519 EVEL_VF_STATUSES vf_status;
521 /***************************************************************************/
522 /* Optional fields */
523 /***************************************************************************/
524 EVEL_OPTION_STRING category;
525 EVEL_OPTION_STRING alarm_interface_a;
526 DLIST additional_info;
530 /**************************************************************************//**
531 * Fault Additional Info.
532 * JSON equivalent field: alarmAdditionalInformation
533 *****************************************************************************/
534 typedef struct fault_additional_info {
540 /**************************************************************************//**
541 * optional field block for fields specific to heartbeat events
542 *****************************************************************************/
543 typedef struct event_heartbeat_fields
545 /***************************************************************************/
546 /* Header and version */
547 /***************************************************************************/
552 /***************************************************************************/
553 /* Mandatory fields */
554 /***************************************************************************/
555 double heartbeat_version;
556 int heartbeat_interval;
558 /***************************************************************************/
559 /* Optional fields */
560 /***************************************************************************/
561 DLIST additional_info;
563 } EVENT_HEARTBEAT_FIELD;
565 /**************************************************************************//**
566 * tuple which provides the name of a key along with its value and
568 *****************************************************************************/
569 typedef struct internal_key
572 EVEL_OPTION_INT keyorder;
573 EVEL_OPTION_STRING keyvalue;
576 /**************************************************************************//**
577 * meta-information about an instance of a jsonObject along with
578 * the actual object instance
579 *****************************************************************************/
580 typedef struct json_object_instance
584 EVEL_OPTION_ULL objinst_epoch_microsec;
585 DLIST object_keys; /*EVEL_INTERNAL_KEY list */
587 } EVEL_JSON_OBJECT_INSTANCE;
588 #define MAX_JSON_TOKENS 128
589 /**************************************************************************//**
590 * Create a new json object instance.
592 * @note The mandatory fields on the Other must be supplied to this factory
593 * function and are immutable once set. Optional fields have explicit
594 * setter functions, but again values may only be set once so that the
595 * Other has immutable properties.
596 * @param yourjson json string.
597 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT_INSTANCE.
598 * not used (i.e. posted) it must be released using ::evel_free_jsonobjectinstance.
599 * @retval NULL Failed to create the json object instance.
600 *****************************************************************************/
601 EVEL_JSON_OBJECT_INSTANCE * evel_new_jsonobjinstance(const char *const yourjson);
602 /**************************************************************************//**
603 * Free an json object instance.
605 * Free off the json object instance supplied.
606 * Will free all the contained allocated memory.
608 *****************************************************************************/
609 void evel_free_jsonobjinst(EVEL_JSON_OBJECT_INSTANCE * objinst);
611 /**************************************************************************//**
612 * enrichment fields for internal VES Event Listener service use only,
613 * not supplied by event sources
614 *****************************************************************************/
615 typedef struct json_object
619 EVEL_OPTION_STRING objectschema;
620 EVEL_OPTION_STRING objectschemaurl;
621 EVEL_OPTION_STRING nfsubscribedobjname;
622 EVEL_OPTION_STRING nfsubscriptionid;
623 DLIST jsonobjectinstances; /* EVEL_JSON_OBJECT_INSTANCE list */
627 /**************************************************************************//**
628 * Create a new json object.
630 * @note The mandatory fields on the Other must be supplied to this factory
631 * function and are immutable once set. Optional fields have explicit
632 * setter functions, but again values may only be set once so that the
633 * Other has immutable properties.
634 * @param name name of the object.
635 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT.
636 * not used (i.e. posted) it must be released using ::evel_free_jsonobject.
637 * @retval NULL Failed to create the json object.
638 *****************************************************************************/
639 EVEL_JSON_OBJECT * evel_new_jsonobject(const char *const name);
640 /**************************************************************************//**
641 * Free an json object.
643 * Free off the json object instance supplied.
644 * Will free all the contained allocated memory.
646 *****************************************************************************/
647 void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj);
648 /*****************************************************************************/
649 /* Supported Measurement version. */
650 /*****************************************************************************/
651 #define EVEL_MEASUREMENT_MAJOR_VERSION 2
652 #define EVEL_MEASUREMENT_MINOR_VERSION 0
654 /**************************************************************************//**
656 * JSON equivalent field: errors
657 *****************************************************************************/
658 typedef struct measurement_errors {
659 int receive_discards;
661 int transmit_discards;
663 } MEASUREMENT_ERRORS;
665 /**************************************************************************//**
667 * JSON equivalent field: measurementsForVfScalingFields
668 *****************************************************************************/
669 typedef struct event_measurement {
670 /***************************************************************************/
671 /* Header and version */
672 /***************************************************************************/
677 /***************************************************************************/
678 /* Mandatory fields */
679 /***************************************************************************/
680 double measurement_interval;
682 /***************************************************************************/
683 /* Optional fields */
684 /***************************************************************************/
685 DLIST additional_info;
686 DLIST additional_measurements;
687 DLIST additional_objects;
689 EVEL_OPTION_INT concurrent_sessions;
690 EVEL_OPTION_INT configured_entities;
693 MEASUREMENT_ERRORS * errors;
695 DLIST filesystem_usage;
696 DLIST latency_distribution;
697 EVEL_OPTION_DOUBLE mean_request_latency;
699 EVEL_OPTION_INT media_ports_in_use;
700 EVEL_OPTION_INT request_rate;
701 EVEL_OPTION_INT vnfc_scaling_metric;
708 /**************************************************************************//**
709 * Add an additional value name/value pair to the Measurement.
711 * The name and value are null delimited ASCII strings. The library takes
712 * a copy so the caller does not have to preserve values after the function
715 * @param measurement Pointer to the measurement.
716 * @param name ASCIIZ string with the attribute's name. The caller
717 * does not need to preserve the value once the function
719 * @param value ASCIIZ string with the attribute's value. The caller
720 * does not need to preserve the value once the function
722 *****************************************************************************/
723 void evel_measurement_addl_info_add(EVENT_MEASUREMENT * measurement, char * name, char * value);
725 /**************************************************************************//**
726 * Add a json object to jsonObject list.
728 * The name and value are null delimited ASCII strings. The library takes
729 * a copy so the caller does not have to preserve values after the function
732 * @param measurement Pointer to the ScalingMeasurement
733 * @param jsonobj Pointer to json object
734 *****************************************************************************/
735 void evel_measurement_addl_object_add(EVENT_MEASUREMENT * measurement, EVEL_JSON_OBJECT *jsonobj);
737 /**************************************************************************//**
739 * JSON equivalent field: cpuUsage
740 *****************************************************************************/
741 typedef struct measurement_cpu_use {
744 EVEL_OPTION_DOUBLE idle;
745 EVEL_OPTION_DOUBLE intrpt;
746 EVEL_OPTION_DOUBLE nice;
747 EVEL_OPTION_DOUBLE softirq;
748 EVEL_OPTION_DOUBLE steal;
749 EVEL_OPTION_DOUBLE sys;
750 EVEL_OPTION_DOUBLE user;
751 EVEL_OPTION_DOUBLE wait;
752 } MEASUREMENT_CPU_USE;
755 /**************************************************************************//**
757 * JSON equivalent field: diskUsage
758 *****************************************************************************/
759 typedef struct measurement_disk_use {
761 EVEL_OPTION_DOUBLE iotimeavg;
762 EVEL_OPTION_DOUBLE iotimelast;
763 EVEL_OPTION_DOUBLE iotimemax;
764 EVEL_OPTION_DOUBLE iotimemin;
765 EVEL_OPTION_DOUBLE mergereadavg;
766 EVEL_OPTION_DOUBLE mergereadlast;
767 EVEL_OPTION_DOUBLE mergereadmax;
768 EVEL_OPTION_DOUBLE mergereadmin;
769 EVEL_OPTION_DOUBLE mergewriteavg;
770 EVEL_OPTION_DOUBLE mergewritelast;
771 EVEL_OPTION_DOUBLE mergewritemax;
772 EVEL_OPTION_DOUBLE mergewritemin;
773 EVEL_OPTION_DOUBLE octetsreadavg;
774 EVEL_OPTION_DOUBLE octetsreadlast;
775 EVEL_OPTION_DOUBLE octetsreadmax;
776 EVEL_OPTION_DOUBLE octetsreadmin;
777 EVEL_OPTION_DOUBLE octetswriteavg;
778 EVEL_OPTION_DOUBLE octetswritelast;
779 EVEL_OPTION_DOUBLE octetswritemax;
780 EVEL_OPTION_DOUBLE octetswritemin;
781 EVEL_OPTION_DOUBLE opsreadavg;
782 EVEL_OPTION_DOUBLE opsreadlast;
783 EVEL_OPTION_DOUBLE opsreadmax;
784 EVEL_OPTION_DOUBLE opsreadmin;
785 EVEL_OPTION_DOUBLE opswriteavg;
786 EVEL_OPTION_DOUBLE opswritelast;
787 EVEL_OPTION_DOUBLE opswritemax;
788 EVEL_OPTION_DOUBLE opswritemin;
789 EVEL_OPTION_DOUBLE pendingopsavg;
790 EVEL_OPTION_DOUBLE pendingopslast;
791 EVEL_OPTION_DOUBLE pendingopsmax;
792 EVEL_OPTION_DOUBLE pendingopsmin;
793 EVEL_OPTION_DOUBLE timereadavg;
794 EVEL_OPTION_DOUBLE timereadlast;
795 EVEL_OPTION_DOUBLE timereadmax;
796 EVEL_OPTION_DOUBLE timereadmin;
797 EVEL_OPTION_DOUBLE timewriteavg;
798 EVEL_OPTION_DOUBLE timewritelast;
799 EVEL_OPTION_DOUBLE timewritemax;
800 EVEL_OPTION_DOUBLE timewritemin;
802 } MEASUREMENT_DISK_USE;
804 /**************************************************************************//**
805 * Add an additional Disk usage value name/value pair to the Measurement.
807 * The name and value are null delimited ASCII strings. The library takes
808 * a copy so the caller does not have to preserve values after the function
811 * @param measurement Pointer to the measurement.
812 * @param id ASCIIZ string with the CPU's identifier.
813 * @param usage Disk utilization.
814 *****************************************************************************/
815 MEASUREMENT_DISK_USE * evel_measurement_new_disk_use_add(EVENT_MEASUREMENT * measurement, char * id);
817 /**************************************************************************//**
819 * JSON equivalent field: filesystemUsage
820 *****************************************************************************/
821 typedef struct measurement_fsys_use {
822 char * filesystem_name;
823 double block_configured;
826 double ephemeral_configured;
827 double ephemeral_iops;
828 double ephemeral_used;
829 } MEASUREMENT_FSYS_USE;
831 /**************************************************************************//**
833 * JSON equivalent field: memoryUsage
834 *****************************************************************************/
835 typedef struct measurement_mem_use {
839 EVEL_OPTION_DOUBLE memcache;
840 EVEL_OPTION_DOUBLE memconfig;
841 EVEL_OPTION_DOUBLE memfree;
842 EVEL_OPTION_DOUBLE slabrecl;
843 EVEL_OPTION_DOUBLE slabunrecl;
844 EVEL_OPTION_DOUBLE memused;
845 } MEASUREMENT_MEM_USE;
847 /**************************************************************************//**
848 * Add an additional Memory usage value name/value pair to the Measurement.
850 * The name and value are null delimited ASCII strings. The library takes
851 * a copy so the caller does not have to preserve values after the function
854 * @param measurement Pointer to the measurement.
855 * @param id ASCIIZ string with the Memory identifier.
856 * @param vmidentifier ASCIIZ string with the VM's identifier.
857 * @param membuffsz Memory Size.
859 * @return Returns pointer to memory use structure in measurements
860 *****************************************************************************/
861 MEASUREMENT_MEM_USE * evel_measurement_new_mem_use_add(EVENT_MEASUREMENT * measurement,
862 char * id, char *vmidentifier, double membuffsz);
864 /**************************************************************************//**
865 * Set kilobytes of memory used for cache
867 * @note The property is treated as immutable: it is only valid to call
868 * the setter once. However, we don't assert if the caller tries to
869 * overwrite, just ignoring the update instead.
871 * @param mem_use Pointer to the Memory Use.
873 *****************************************************************************/
874 void evel_measurement_mem_use_memcache_set(MEASUREMENT_MEM_USE * const mem_use,
876 /**************************************************************************//**
877 * Set kilobytes of memory configured in the virtual machine on which the VNFC reporting
879 * @note The property is treated as immutable: it is only valid to call
880 * the setter once. However, we don't assert if the caller tries to
881 * overwrite, just ignoring the update instead.
883 * @param mem_use Pointer to the Memory Use.
885 *****************************************************************************/
886 void evel_measurement_mem_use_memconfig_set(MEASUREMENT_MEM_USE * const mem_use,
888 /**************************************************************************//**
889 * Set kilobytes of physical RAM left unused by the system
891 * @note The property is treated as immutable: it is only valid to call
892 * the setter once. However, we don't assert if the caller tries to
893 * overwrite, just ignoring the update instead.
895 * @param mem_use Pointer to the Memory Use.
897 *****************************************************************************/
898 void evel_measurement_mem_use_memfree_set(MEASUREMENT_MEM_USE * const mem_use,
900 /**************************************************************************//**
901 * Set the part of the slab that can be reclaimed such as caches measured in kilobytes
903 * @note The property is treated as immutable: it is only valid to call
904 * the setter once. However, we don't assert if the caller tries to
905 * overwrite, just ignoring the update instead.
907 * @param mem_use Pointer to the Memory Use.
909 *****************************************************************************/
910 void evel_measurement_mem_use_slab_reclaimed_set(MEASUREMENT_MEM_USE * const mem_use,
912 /**************************************************************************//**
913 * Set the part of the slab that cannot be reclaimed such as caches measured in kilobytes
915 * @note The property is treated as immutable: it is only valid to call
916 * the setter once. However, we don't assert if the caller tries to
917 * overwrite, just ignoring the update instead.
919 * @param mem_use Pointer to the Memory Use.
921 *****************************************************************************/
922 void evel_measurement_mem_use_slab_unreclaimable_set(MEASUREMENT_MEM_USE * const mem_use,
924 /**************************************************************************//**
925 * Set the total memory minus the sum of free, buffered, cached and slab memory in kilobytes
927 * @note The property is treated as immutable: it is only valid to call
928 * the setter once. However, we don't assert if the caller tries to
929 * overwrite, just ignoring the update instead.
931 * @param mem_use Pointer to the Memory Use.
933 *****************************************************************************/
934 void evel_measurement_mem_use_usedup_set(MEASUREMENT_MEM_USE * const mem_use,
936 /**************************************************************************//**
938 * JSON equivalent field: latencyBucketMeasure
939 *****************************************************************************/
940 typedef struct measurement_latency_bucket {
943 /***************************************************************************/
944 /* Optional fields */
945 /***************************************************************************/
946 EVEL_OPTION_DOUBLE high_end;
947 EVEL_OPTION_DOUBLE low_end;
949 } MEASUREMENT_LATENCY_BUCKET;
951 /**************************************************************************//**
953 * JSON equivalent field: vNicUsage
954 *****************************************************************************/
955 typedef struct measurement_vnic_performance {
956 /***************************************************************************/
957 /* Optional fields */
958 /***************************************************************************/
959 /*Cumulative count of broadcast packets received as read at the end of
960 the measurement interval*/
961 EVEL_OPTION_DOUBLE recvd_bcast_packets_acc;
962 /*Count of broadcast packets received within the measurement interval*/
963 EVEL_OPTION_DOUBLE recvd_bcast_packets_delta;
964 /*Cumulative count of discarded packets received as read at the end of
965 the measurement interval*/
966 EVEL_OPTION_DOUBLE recvd_discarded_packets_acc;
967 /*Count of discarded packets received within the measurement interval*/
968 EVEL_OPTION_DOUBLE recvd_discarded_packets_delta;
969 /*Cumulative count of error packets received as read at the end of
970 the measurement interval*/
971 EVEL_OPTION_DOUBLE recvd_error_packets_acc;
972 /*Count of error packets received within the measurement interval*/
973 EVEL_OPTION_DOUBLE recvd_error_packets_delta;
974 /*Cumulative count of multicast packets received as read at the end of
975 the measurement interval*/
976 EVEL_OPTION_DOUBLE recvd_mcast_packets_acc;
977 /*Count of mcast packets received within the measurement interval*/
978 EVEL_OPTION_DOUBLE recvd_mcast_packets_delta;
979 /*Cumulative count of octets received as read at the end of
980 the measurement interval*/
981 EVEL_OPTION_DOUBLE recvd_octets_acc;
982 /*Count of octets received within the measurement interval*/
983 EVEL_OPTION_DOUBLE recvd_octets_delta;
984 /*Cumulative count of all packets received as read at the end of
985 the measurement interval*/
986 EVEL_OPTION_DOUBLE recvd_total_packets_acc;
987 /*Count of all packets received within the measurement interval*/
988 EVEL_OPTION_DOUBLE recvd_total_packets_delta;
989 /*Cumulative count of unicast packets received as read at the end of
990 the measurement interval*/
991 EVEL_OPTION_DOUBLE recvd_ucast_packets_acc;
992 /*Count of unicast packets received within the measurement interval*/
993 EVEL_OPTION_DOUBLE recvd_ucast_packets_delta;
994 /*Cumulative count of transmitted broadcast packets at the end of
995 the measurement interval*/
996 EVEL_OPTION_DOUBLE tx_bcast_packets_acc;
997 /*Count of transmitted broadcast packets within the measurement interval*/
998 EVEL_OPTION_DOUBLE tx_bcast_packets_delta;
999 /*Cumulative count of transmit discarded packets at the end of
1000 the measurement interval*/
1001 EVEL_OPTION_DOUBLE tx_discarded_packets_acc;
1002 /*Count of transmit discarded packets within the measurement interval*/
1003 EVEL_OPTION_DOUBLE tx_discarded_packets_delta;
1004 /*Cumulative count of transmit error packets at the end of
1005 the measurement interval*/
1006 EVEL_OPTION_DOUBLE tx_error_packets_acc;
1007 /*Count of transmit error packets within the measurement interval*/
1008 EVEL_OPTION_DOUBLE tx_error_packets_delta;
1009 /*Cumulative count of transmit multicast packets at the end of
1010 the measurement interval*/
1011 EVEL_OPTION_DOUBLE tx_mcast_packets_acc;
1012 /*Count of transmit multicast packets within the measurement interval*/
1013 EVEL_OPTION_DOUBLE tx_mcast_packets_delta;
1014 /*Cumulative count of transmit octets at the end of
1015 the measurement interval*/
1016 EVEL_OPTION_DOUBLE tx_octets_acc;
1017 /*Count of transmit octets received within the measurement interval*/
1018 EVEL_OPTION_DOUBLE tx_octets_delta;
1019 /*Cumulative count of all transmit packets at the end of
1020 the measurement interval*/
1021 EVEL_OPTION_DOUBLE tx_total_packets_acc;
1022 /*Count of transmit packets within the measurement interval*/
1023 EVEL_OPTION_DOUBLE tx_total_packets_delta;
1024 /*Cumulative count of all transmit unicast packets at the end of
1025 the measurement interval*/
1026 EVEL_OPTION_DOUBLE tx_ucast_packets_acc;
1027 /*Count of transmit unicast packets within the measurement interval*/
1028 EVEL_OPTION_DOUBLE tx_ucast_packets_delta;
1029 /* Indicates whether vNicPerformance values are likely inaccurate
1030 due to counter overflow or other condtions*/
1031 char *valuesaresuspect;
1034 } MEASUREMENT_VNIC_PERFORMANCE;
1036 /**************************************************************************//**
1038 * JSON equivalent field: codecsInUse
1039 *****************************************************************************/
1040 typedef struct measurement_codec_use {
1043 } MEASUREMENT_CODEC_USE;
1045 /**************************************************************************//**
1047 * JSON equivalent field: featuresInUse
1048 *****************************************************************************/
1049 typedef struct measurement_feature_use {
1051 int feature_utilization;
1052 } MEASUREMENT_FEATURE_USE;
1054 /**************************************************************************//**
1055 * Measurement Group.
1056 * JSON equivalent field: additionalMeasurements
1057 *****************************************************************************/
1058 typedef struct measurement_group {
1061 } MEASUREMENT_GROUP;
1063 /**************************************************************************//**
1064 * Custom Defined Measurement.
1065 * JSON equivalent field: measurements
1066 *****************************************************************************/
1067 typedef struct custom_measurement {
1070 } CUSTOM_MEASUREMENT;
1072 /*****************************************************************************/
1073 /* Supported Report version. */
1074 /*****************************************************************************/
1075 #define EVEL_REPORT_MAJOR_VERSION 1
1076 #define EVEL_REPORT_MINOR_VERSION 0
1078 /**************************************************************************//**
1080 * JSON equivalent field: measurementsForVfReportingFields
1082 * @note This is an experimental event type and is not currently a formal part
1083 * of AT&T's specification.
1084 *****************************************************************************/
1085 typedef struct event_report {
1086 /***************************************************************************/
1087 /* Header and version */
1088 /***************************************************************************/
1089 EVENT_HEADER header;
1093 /***************************************************************************/
1094 /* Mandatory fields */
1095 /***************************************************************************/
1096 double measurement_interval;
1098 /***************************************************************************/
1099 /* Optional fields */
1100 /***************************************************************************/
1101 DLIST feature_usage;
1102 DLIST measurement_groups;
1106 /**************************************************************************//**
1107 * Mobile GTP Per Flow Metrics.
1108 * JSON equivalent field: gtpPerFlowMetrics
1109 *****************************************************************************/
1110 typedef struct mobile_gtp_per_flow_metrics {
1111 double avg_bit_error_rate;
1112 double avg_packet_delay_variation;
1113 int avg_packet_latency;
1114 int avg_receive_throughput;
1115 int avg_transmit_throughput;
1116 int flow_activation_epoch;
1117 int flow_activation_microsec;
1118 int flow_deactivation_epoch;
1119 int flow_deactivation_microsec;
1120 time_t flow_deactivation_time;
1122 int max_packet_delay_variation;
1123 int num_activation_failures;
1125 int num_bytes_received;
1126 int num_bytes_transmitted;
1127 int num_dropped_packets;
1128 int num_l7_bytes_received;
1129 int num_l7_bytes_transmitted;
1130 int num_lost_packets;
1131 int num_out_of_order_packets;
1132 int num_packet_errors;
1133 int num_packets_received_excl_retrans;
1134 int num_packets_received_incl_retrans;
1135 int num_packets_transmitted_incl_retrans;
1138 int num_tunneled_l7_bytes_received;
1139 int round_trip_time;
1140 int time_to_first_byte;
1142 /***************************************************************************/
1143 /* Optional fields */
1144 /***************************************************************************/
1145 EVEL_OPTION_INT ip_tos_counts[EVEL_TOS_SUPPORTED];
1146 EVEL_OPTION_INT tcp_flag_counts[EVEL_MAX_TCP_FLAGS];
1147 EVEL_OPTION_INT qci_cos_counts[EVEL_MAX_QCI_COS_TYPES];
1148 EVEL_OPTION_INT dur_connection_failed_status;
1149 EVEL_OPTION_INT dur_tunnel_failed_status;
1150 EVEL_OPTION_STRING flow_activated_by;
1151 EVEL_OPTION_TIME flow_activation_time;
1152 EVEL_OPTION_STRING flow_deactivated_by;
1153 EVEL_OPTION_STRING gtp_connection_status;
1154 EVEL_OPTION_STRING gtp_tunnel_status;
1155 EVEL_OPTION_INT large_packet_rtt;
1156 EVEL_OPTION_DOUBLE large_packet_threshold;
1157 EVEL_OPTION_INT max_receive_bit_rate;
1158 EVEL_OPTION_INT max_transmit_bit_rate;
1159 EVEL_OPTION_INT num_gtp_echo_failures;
1160 EVEL_OPTION_INT num_gtp_tunnel_errors;
1161 EVEL_OPTION_INT num_http_errors;
1163 } MOBILE_GTP_PER_FLOW_METRICS;
1165 /*****************************************************************************/
1166 /* Supported Mobile Flow version. */
1167 /*****************************************************************************/
1168 #define EVEL_MOBILE_FLOW_MAJOR_VERSION 2
1169 #define EVEL_MOBILE_FLOW_MINOR_VERSION 0
1171 /**************************************************************************//**
1173 * JSON equivalent field: mobileFlow
1174 *****************************************************************************/
1175 typedef struct event_mobile_flow {
1176 /***************************************************************************/
1177 /* Header and version */
1178 /***************************************************************************/
1179 EVENT_HEADER header;
1183 /***************************************************************************/
1184 /* Mandatory fields */
1185 /***************************************************************************/
1186 char * flow_direction;
1187 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics;
1188 char * ip_protocol_type;
1190 char * other_endpoint_ip_address;
1191 int other_endpoint_port;
1192 char * reporting_endpoint_ip_addr;
1193 int reporting_endpoint_port;
1194 DLIST additional_info; /* JSON: additionalFields */
1196 /***************************************************************************/
1197 /* Optional fields */
1198 /***************************************************************************/
1199 EVEL_OPTION_STRING application_type;
1200 EVEL_OPTION_STRING app_protocol_type;
1201 EVEL_OPTION_STRING app_protocol_version;
1202 EVEL_OPTION_STRING cid;
1203 EVEL_OPTION_STRING connection_type;
1204 EVEL_OPTION_STRING ecgi;
1205 EVEL_OPTION_STRING gtp_protocol_type;
1206 EVEL_OPTION_STRING gtp_version;
1207 EVEL_OPTION_STRING http_header;
1208 EVEL_OPTION_STRING imei;
1209 EVEL_OPTION_STRING imsi;
1210 EVEL_OPTION_STRING lac;
1211 EVEL_OPTION_STRING mcc;
1212 EVEL_OPTION_STRING mnc;
1213 EVEL_OPTION_STRING msisdn;
1214 EVEL_OPTION_STRING other_functional_role;
1215 EVEL_OPTION_STRING rac;
1216 EVEL_OPTION_STRING radio_access_technology;
1217 EVEL_OPTION_STRING sac;
1218 EVEL_OPTION_INT sampling_algorithm;
1219 EVEL_OPTION_STRING tac;
1220 EVEL_OPTION_STRING tunnel_id;
1221 EVEL_OPTION_STRING vlan_id;
1223 } EVENT_MOBILE_FLOW;
1225 /*****************************************************************************/
1226 /* Supported Other field version. */
1227 /*****************************************************************************/
1228 #define EVEL_OTHER_EVENT_MAJOR_VERSION 1
1229 #define EVEL_OTHER_EVENT_MINOR_VERSION 0
1231 /**************************************************************************//**
1233 * JSON equivalent field: otherFields
1234 *****************************************************************************/
1235 typedef struct event_other {
1236 EVENT_HEADER header;
1240 HASHTABLE_T *namedarrays; /* HASHTABLE_T */
1241 DLIST jsonobjects; /* DLIST of EVEL_JSON_OBJECT */
1245 /**************************************************************************//**
1247 * JSON equivalent field: otherFields
1248 *****************************************************************************/
1249 typedef struct other_field {
1255 /*****************************************************************************/
1256 /* Supported Service Events version. */
1257 /*****************************************************************************/
1258 #define EVEL_HEARTBEAT_FIELD_MAJOR_VERSION 1
1259 #define EVEL_HEARTBEAT_FIELD_MINOR_VERSION 0
1262 /*****************************************************************************/
1263 /* Supported Signaling version. */
1264 /*****************************************************************************/
1265 #define EVEL_SIGNALING_MAJOR_VERSION 1
1266 #define EVEL_SIGNALING_MINOR_VERSION 0
1268 /**************************************************************************//**
1269 * Vendor VNF Name fields.
1270 * JSON equivalent field: vendorVnfNameFields
1271 *****************************************************************************/
1272 typedef struct vendor_vnfname_field {
1274 EVEL_OPTION_STRING vfmodule;
1275 EVEL_OPTION_STRING vnfname;
1276 } VENDOR_VNFNAME_FIELD;
1278 /**************************************************************************//**
1280 * JSON equivalent field: signalingFields
1281 *****************************************************************************/
1282 typedef struct event_signaling {
1283 /***************************************************************************/
1284 /* Header and version */
1285 /***************************************************************************/
1286 EVENT_HEADER header;
1290 /***************************************************************************/
1291 /* Mandatory fields */
1292 /***************************************************************************/
1293 VENDOR_VNFNAME_FIELD vnfname_field;
1294 EVEL_OPTION_STRING correlator; /* JSON: correlator */
1295 EVEL_OPTION_STRING local_ip_address; /* JSON: localIpAddress */
1296 EVEL_OPTION_STRING local_port; /* JSON: localPort */
1297 EVEL_OPTION_STRING remote_ip_address; /* JSON: remoteIpAddress */
1298 EVEL_OPTION_STRING remote_port; /* JSON: remotePort */
1300 /***************************************************************************/
1301 /* Optional fields */
1302 /***************************************************************************/
1303 EVEL_OPTION_STRING compressed_sip; /* JSON: compressedSip */
1304 EVEL_OPTION_STRING summary_sip; /* JSON: summarySip */
1305 DLIST additional_info;
1309 /**************************************************************************//**
1310 * Sgnaling Additional Field.
1311 * JSON equivalent field: additionalFields
1312 *****************************************************************************/
1313 typedef struct signaling_additional_field {
1316 } SIGNALING_ADDL_FIELD;
1318 /*****************************************************************************/
1319 /* Supported State Change version. */
1320 /*****************************************************************************/
1321 #define EVEL_STATE_CHANGE_MAJOR_VERSION 2
1322 #define EVEL_STATE_CHANGE_MINOR_VERSION 0
1324 /**************************************************************************//**
1326 * JSON equivalent field: stateChangeFields
1327 *****************************************************************************/
1328 typedef struct event_state_change {
1329 /***************************************************************************/
1330 /* Header and version */
1331 /***************************************************************************/
1332 EVENT_HEADER header;
1336 /***************************************************************************/
1337 /* Mandatory fields */
1338 /***************************************************************************/
1339 EVEL_ENTITY_STATE new_state;
1340 EVEL_ENTITY_STATE old_state;
1341 char * state_interface;
1344 /***************************************************************************/
1345 /* Optional fields */
1346 /***************************************************************************/
1347 DLIST additional_fields;
1349 } EVENT_STATE_CHANGE;
1351 /**************************************************************************//**
1352 * State Change Additional Field.
1353 * JSON equivalent field: additionalFields
1354 *****************************************************************************/
1355 typedef struct state_change_additional_field {
1358 } STATE_CHANGE_ADDL_FIELD;
1360 /*****************************************************************************/
1361 /* Supported Syslog version. */
1362 /*****************************************************************************/
1363 #define EVEL_SYSLOG_MAJOR_VERSION 3
1364 #define EVEL_SYSLOG_MINOR_VERSION 0
1366 /**************************************************************************//**
1368 * JSON equivalent field: syslogFields
1369 *****************************************************************************/
1370 typedef struct event_syslog {
1371 /***************************************************************************/
1372 /* Header and version */
1373 /***************************************************************************/
1374 EVENT_HEADER header;
1378 /***************************************************************************/
1379 /* Mandatory fields */
1380 /***************************************************************************/
1381 EVEL_SOURCE_TYPES event_source_type;
1385 /***************************************************************************/
1386 /* Optional fields */
1387 /***************************************************************************/
1388 EVEL_OPTION_STRING additional_filters;
1389 EVEL_OPTION_STRING event_source_host;
1390 EVEL_OPTION_INT syslog_facility;
1391 EVEL_OPTION_INT syslog_priority;
1392 EVEL_OPTION_STRING syslog_proc;
1393 EVEL_OPTION_INT syslog_proc_id;
1394 EVEL_OPTION_STRING syslog_s_data;
1395 EVEL_OPTION_STRING syslog_sdid;
1396 EVEL_OPTION_STRING syslog_severity;
1398 EVEL_OPTION_INT syslog_ver;
1402 /**************************************************************************//**
1404 * JSON equivalent object: attCopyrightNotice
1405 *****************************************************************************/
1406 typedef struct copyright {
1407 char * useAndRedistribution;
1412 char * disclaimerLine1;
1413 char * disclaimerLine2;
1414 char * disclaimerLine3;
1415 char * disclaimerLine4;
1418 /**************************************************************************//**
1419 * Library initialization.
1421 * Initialize the EVEL library.
1423 * @note This function initializes the cURL library. Applications making use
1424 * of libcurl may need to pull the initialization out of here. Note
1425 * also that this function is not threadsafe as a result - refer to
1426 * libcurl's API documentation for relevant warnings.
1428 * @sa Matching Term function.
1430 * @param fqdn The API's FQDN or IP address.
1431 * @param port The API's port.
1432 * @param bakup_fqdn The API's FQDN or IP address.
1433 * @param bakup_port The API's port.
1434 * @param path The optional path (may be NULL).
1435 * @param topic The optional topic part of the URL (may be NULL).
1436 * @param ring_buf_size Ring buffer size (>=100) ~ Avg Messages in 1hr
1437 * @param secure Whether to use HTTPS (0=HTTP, 1=HTTPS).
1438 * @param cert_file_path Path to client certificate file
1439 * @param key_file_path Path to client key file
1440 * @param ca_info Path to CA info
1441 * @param ca_file_path Path to CA file
1442 * @param verify_peer SSL verification of peer 0 or 1
1443 * @param verify_host SSL verification of host 0 or 1
1444 * @param username Username for Basic Authentication of requests.
1445 * @param password Password for Basic Authentication of requests.
1446 * @param bakup_username Username for Basic Authentication of Bakup FQDN.
1447 * @param bakup_password Password for Basic Authentication of Bakup FQDN.
1448 * @param source_ip The ip of node we represent.(NULL for default ip)
1449 * @param bakup_source_ip The ip bakup fqdn interface.(NULL for default ip)
1450 * @param source_type The kind of node we represent.
1451 * @param role The role this node undertakes.
1452 * @param verbosity 0 for normal operation, positive values for chattier
1455 * @returns Status code
1456 * @retval EVEL_SUCCESS On success
1457 * @retval ::EVEL_ERR_CODES On failure.
1458 *****************************************************************************/
1459 EVEL_ERR_CODES evel_initialize(const char * const fqdn,
1461 const char * const bakup_fqdn,
1463 const char * const path,
1464 const char * const topic,
1467 const char * const cert_file_path,
1468 const char * const key_file_path,
1469 const char * const ca_info,
1470 const char * const ca_file_path,
1473 const char * const username,
1474 const char * const password,
1475 const char * const bakup_username,
1476 const char * const bakup_password,
1477 const char * const source_ip,
1478 const char * const bakup_source_ip,
1479 EVEL_SOURCE_TYPES source_type,
1480 const char * const role,
1484 /**************************************************************************//**
1485 * Initialize value for vm_name for all coming events
1486 * @param source_name Source name string.
1487 * Must confirm with EVEL source name standard
1488 * @returns Status code
1489 * @retval EVEL_SUCCESS On success
1490 * @retval ::EVEL_ERR_CODES On failure.
1491 *****************************************************************************/
1492 EVEL_ERR_CODES evel_set_source_name(char * src_name);
1495 /**************************************************************************//**
1496 * Clean up the EVEL library.
1498 * @note that at present don't expect Init/Term cycling not to leak memory!
1500 * @returns Status code
1501 * @retval EVEL_SUCCESS On success
1502 * @retval "One of ::EVEL_ERR_CODES" On failure.
1503 *****************************************************************************/
1504 EVEL_ERR_CODES evel_terminate(void);
1506 EVEL_ERR_CODES evel_post_event(EVENT_HEADER * event);
1507 const char * evel_error_string(void);
1510 /**************************************************************************//**
1513 * Free off the event supplied. Will free all the contained allocated memory.
1515 * @note It is safe to free a NULL pointer.
1516 *****************************************************************************/
1517 void evel_free_event(void * event);
1519 /**************************************************************************//**
1520 * Encode the event as a JSON event object according to AT&T's schema.
1522 * @param json Pointer to where to store the JSON encoded data.
1523 * @param mode Event mode or Batch mode
1524 * @param max_size Size of storage available in json_body.
1525 * @param event Pointer to the ::EVENT_HEADER to encode.
1526 * @returns Number of bytes actually written.
1527 *****************************************************************************/
1528 int evel_json_encode_event(char * json,
1530 EVENT_HEADER * event);
1531 int evel_json_encode_batch_event(char * json,
1533 EVENT_HEADER * event);
1534 /**************************************************************************//**
1535 * Initialize an event instance id.
1537 * @param vfield Pointer to the event vnfname field being initialized.
1538 * @param vendor_id The vendor id to encode in the event instance id.
1539 * @param event_id The event id to encode in the event instance id.
1540 *****************************************************************************/
1541 void evel_init_vendor_field(VENDOR_VNFNAME_FIELD * const vfield,
1542 const char * const vendor_name);
1544 /**************************************************************************//**
1545 * Set the Vendor module property of the Vendor.
1547 * @note The property is treated as immutable: it is only valid to call
1548 * the setter once. However, we don't assert if the caller tries to
1549 * overwrite, just ignoring the update instead.
1551 * @param vfield Pointer to the Vendor field.
1552 * @param module_name The module name to be set. ASCIIZ string. The caller
1553 * does not need to preserve the value once the function
1555 *****************************************************************************/
1556 void evel_vendor_field_module_set(VENDOR_VNFNAME_FIELD * const vfield,
1557 const char * const module_name);
1558 /**************************************************************************//**
1559 * Set the Vendor module property of the Vendor.
1561 * @note The property is treated as immutable: it is only valid to call
1562 * the setter once. However, we don't assert if the caller tries to
1563 * overwrite, just ignoring the update instead.
1565 * @param vfield Pointer to the Vendor field.
1566 * @param module_name The module name to be set. ASCIIZ string. The caller
1567 * does not need to preserve the value once the function
1569 *****************************************************************************/
1570 void evel_vendor_field_vnfname_set(VENDOR_VNFNAME_FIELD * const vfield,
1571 const char * const vnfname);
1572 /**************************************************************************//**
1573 * Free an event instance id.
1575 * @param vfield Pointer to the event vnfname_field being freed.
1576 *****************************************************************************/
1577 void evel_free_event_vendor_field(VENDOR_VNFNAME_FIELD * const vfield);
1579 /**************************************************************************//**
1580 * Callback function to provide returned data.
1582 * Copy data into the supplied buffer, write_callback::ptr, checking size
1585 * @returns Number of bytes placed into write_callback::ptr. 0 for EOF.
1586 *****************************************************************************/
1587 size_t evel_write_callback(void *contents,
1592 /*****************************************************************************/
1593 /*****************************************************************************/
1595 /* HEARTBEAT - (includes common header, too) */
1597 /*****************************************************************************/
1598 /*****************************************************************************/
1600 /**************************************************************************//**
1601 * Create a new heartbeat event.
1603 * @note that the heartbeat is just a "naked" commonEventHeader!
1605 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1606 * not used it must be released using ::evel_free_event
1607 * @retval NULL Failed to create the event.
1608 *****************************************************************************/
1609 EVENT_HEADER * evel_new_heartbeat(void);
1611 /**************************************************************************//**
1612 * Create a new heartbeat event of given name and type.
1614 * @note that the heartbeat is just a "naked" commonEventHeader!
1616 * @param event_name Unique Event Name: {DomainAbbreviation}_{AsdcModel or ApplicationPlatform}_{DescriptionOfInfoBeingConveyed}
1617 * @param event_id A universal identifier of the event for: troubleshooting, cross-referencing of alarms for alarm correlation, offline log analysis, etc
1619 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1620 * not used it must be released using ::evel_free_event
1621 * @retval NULL Failed to create the event.
1622 *****************************************************************************/
1623 EVENT_HEADER * evel_new_heartbeat_nameid(const char* ev_name, const char *ev_id);
1626 /**************************************************************************//**
1627 * Free an event header.
1629 * Free off the event header supplied. Will free all the contained allocated
1632 * @note It does not free the header itself, since that may be part of a
1634 *****************************************************************************/
1635 void evel_free_header(EVENT_HEADER * const event);
1637 /**************************************************************************//**
1638 * Initialize a newly created event header.
1640 * @param header Pointer to the header being initialized.
1641 *****************************************************************************/
1642 void evel_init_header(EVENT_HEADER * const header,const char *const eventname);
1644 /**************************************************************************//**
1645 * Set the Event Type property of the event header.
1647 * @param header Pointer to the ::EVENT_HEADER.
1648 * @param type The Event Type to be set. ASCIIZ string. The caller
1649 * does not need to preserve the value once the function
1651 *****************************************************************************/
1652 void evel_header_type_set(EVENT_HEADER * const header,
1653 const char * const type);
1655 /**************************************************************************//**
1656 * Set the next event_sequence to use.
1658 * @param sequence The next sequence number to use.
1659 *****************************************************************************/
1660 void evel_set_global_event_sequence(const int sequence);
1662 /**************************************************************************//**
1663 * Set the Event Sequence property of the event header.
1665 * @note This is mainly for tracking fault event sequence numbers
1667 * @param header Pointer to the ::EVENT_HEADER.
1668 * @param sequence_number
1670 *****************************************************************************/
1671 void evel_event_sequence_set(EVENT_HEADER * const header,const int sequence_number);
1673 /**************************************************************************//**
1674 * Set the Start Epoch property of the event header.
1676 * @note The Start Epoch defaults to the time of event creation.
1678 * @param header Pointer to the ::EVENT_HEADER.
1679 * @param start_epoch_microsec
1680 * The start epoch to set, in microseconds.
1681 *****************************************************************************/
1682 void evel_start_epoch_set(EVENT_HEADER * const header,
1683 const unsigned long long start_epoch_microsec);
1685 /**************************************************************************//**
1686 * Set the Last Epoch property of the event header.
1688 * @note The Last Epoch defaults to the time of event creation.
1690 * @param header Pointer to the ::EVENT_HEADER.
1691 * @param last_epoch_microsec
1692 * The last epoch to set, in microseconds.
1693 *****************************************************************************/
1694 void evel_last_epoch_set(EVENT_HEADER * const header,
1695 const unsigned long long last_epoch_microsec);
1697 /**************************************************************************//**
1698 * Set the Reporting Entity Name property of the event header.
1700 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1702 * @param header Pointer to the ::EVENT_HEADER.
1703 * @param entity_name The entity name to set.
1704 *****************************************************************************/
1705 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1706 const char * const entity_name);
1708 /**************************************************************************//**
1709 * Set the Reporting Entity Id property of the event header.
1711 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1713 * @param header Pointer to the ::EVENT_HEADER.
1714 * @param entity_id The entity id to set.
1715 *****************************************************************************/
1716 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1717 const char * const entity_id);
1719 /**************************************************************************//**
1720 * Set the NFC Naming code property of the event header.
1722 * @param header Pointer to the ::EVENT_HEADER.
1723 * @param nfcnamingcode String
1724 *****************************************************************************/
1725 void evel_nfcnamingcode_set(EVENT_HEADER * const header,
1726 const char * const nfcnam);
1727 /**************************************************************************//**
1728 * Set the NF Naming code property of the event header.
1730 * @param header Pointer to the ::EVENT_HEADER.
1731 * @param nfnamingcode String
1732 *****************************************************************************/
1733 void evel_nfnamingcode_set(EVENT_HEADER * const header,
1734 const char * const nfnam);
1736 /*****************************************************************************/
1737 /*****************************************************************************/
1741 /*****************************************************************************/
1742 /*****************************************************************************/
1744 /**************************************************************************//**
1745 * Create a new fault event.
1747 * @note The mandatory fields on the Fault must be supplied to this factory
1748 * function and are immutable once set. Optional fields have explicit
1749 * setter functions, but again values may only be set once so that the
1750 * Fault has immutable properties.
1751 * @param event_name Unique Event Name
1752 * @param event_id A universal identifier of the event for analysis etc
1753 * @param condition The condition indicated by the Fault.
1754 * @param specific_problem The specific problem triggering the fault.
1755 * @param priority The priority of the event.
1756 * @param severity The severity of the Fault.
1757 * @param ev_source_type Source of Alarm event
1758 * @param version fault version
1759 * @param status status of Virtual Function
1760 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1761 * not used (i.e. posted) it must be released using ::evel_free_fault.
1762 * @retval NULL Failed to create the event.
1763 *****************************************************************************/
1764 EVENT_FAULT * evel_new_fault(const char* ev_name, const char *ev_id,
1765 const char * const condition,
1766 const char * const specific_problem,
1767 EVEL_EVENT_PRIORITIES priority,
1768 EVEL_SEVERITIES severity,
1769 EVEL_SOURCE_TYPES ev_source_type,
1770 EVEL_VF_STATUSES status);
1772 /**************************************************************************//**
1775 * Free off the Fault supplied. Will free all the contained allocated memory.
1777 * @note It does not free the Fault itself, since that may be part of a
1779 *****************************************************************************/
1780 void evel_free_fault(EVENT_FAULT * event);
1782 /**************************************************************************//**
1783 * Set the Fault Category property of the Fault.
1785 * @note The property is treated as immutable: it is only valid to call
1786 * the setter once. However, we don't assert if the caller tries to
1787 * overwrite, just ignoring the update instead.
1789 * @param fault Pointer to the fault.
1790 * @param category Category : license, link, routing, security, signaling.
1791 * ASCIIZ string. The caller
1792 * does not need to preserve the value once the function
1794 *****************************************************************************/
1795 void evel_fault_category_set(EVENT_FAULT * fault,
1796 const char * const category);
1798 /**************************************************************************//**
1799 * Set the Alarm Interface A property of the Fault.
1801 * @note The property is treated as immutable: it is only valid to call
1802 * the setter once. However, we don't assert if the caller tries to
1803 * overwrite, just ignoring the update instead.
1805 * @param fault Pointer to the fault.
1806 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1807 * does not need to preserve the value once the function
1809 *****************************************************************************/
1810 void evel_fault_interface_set(EVENT_FAULT * fault,
1811 const char * const interface);
1813 /**************************************************************************//**
1814 * Add an additional value name/value pair to the Fault.
1816 * The name and value are null delimited ASCII strings. The library takes
1817 * a copy so the caller does not have to preserve values after the function
1820 * @param fault Pointer to the fault.
1821 * @param name ASCIIZ string with the attribute's name.
1822 * @param value ASCIIZ string with the attribute's value.
1823 *****************************************************************************/
1824 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1826 /**************************************************************************//**
1827 * Set the Event Type property of the Fault.
1829 * @note The property is treated as immutable: it is only valid to call
1830 * the setter once. However, we don't assert if the caller tries to
1831 * overwrite, just ignoring the update instead.
1833 * @param fault Pointer to the fault.
1834 * @param type The Event Type to be set. ASCIIZ string. The caller
1835 * does not need to preserve the value once the function
1837 *****************************************************************************/
1838 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1840 /*****************************************************************************/
1841 /*****************************************************************************/
1845 /*****************************************************************************/
1846 /*****************************************************************************/
1848 /**************************************************************************//**
1849 * Create a new Measurement event.
1851 * @note The mandatory fields on the Measurement must be supplied to this
1852 * factory function and are immutable once set. Optional fields have
1853 * explicit setter functions, but again values may only be set once so
1854 * that the Measurement has immutable properties.
1856 * @param measurement_interval
1857 * @param event_name Unique Event Name
1858 * @param event_id A universal identifier of the event for analysis etc
1860 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1861 * event is not used (i.e. posted) it must be released using
1862 * ::evel_free_event.
1863 * @retval NULL Failed to create the event.
1864 *****************************************************************************/
1865 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval,const char* ev_name, const char *ev_id);
1867 /**************************************************************************//**
1868 * Free a Measurement.
1870 * Free off the Measurement supplied. Will free all the contained allocated
1873 * @note It does not free the Measurement itself, since that may be part of a
1875 *****************************************************************************/
1876 void evel_free_measurement(EVENT_MEASUREMENT * event);
1878 /**************************************************************************//**
1879 * Set the Event Type property of the Measurement.
1881 * @note The property is treated as immutable: it is only valid to call
1882 * the setter once. However, we don't assert if the caller tries to
1883 * overwrite, just ignoring the update instead.
1885 * @param measurement Pointer to the Measurement.
1886 * @param type The Event Type to be set. ASCIIZ string. The caller
1887 * does not need to preserve the value once the function
1889 *****************************************************************************/
1890 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1891 const char * const type);
1893 /**************************************************************************//**
1894 * Set the Concurrent Sessions property of the Measurement.
1896 * @note The property is treated as immutable: it is only valid to call
1897 * the setter once. However, we don't assert if the caller tries to
1898 * overwrite, just ignoring the update instead.
1900 * @param measurement Pointer to the Measurement.
1901 * @param concurrent_sessions The Concurrent Sessions to be set.
1902 *****************************************************************************/
1903 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1904 int concurrent_sessions);
1906 /**************************************************************************//**
1907 * Set the Configured Entities property of the Measurement.
1909 * @note The property is treated as immutable: it is only valid to call
1910 * the setter once. However, we don't assert if the caller tries to
1911 * overwrite, just ignoring the update instead.
1913 * @param measurement Pointer to the Measurement.
1914 * @param configured_entities The Configured Entities to be set.
1915 *****************************************************************************/
1916 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1917 int configured_entities);
1919 /**************************************************************************//**
1920 * Add an additional set of Errors to the Measurement.
1922 * @note The property is treated as immutable: it is only valid to call
1923 * the setter once. However, we don't assert if the caller tries to
1924 * overwrite, just ignoring the update instead.
1926 * @param measurement Pointer to the measurement.
1927 * @param receive_discards The number of receive discards.
1928 * @param receive_errors The number of receive errors.
1929 * @param transmit_discards The number of transmit discards.
1930 * @param transmit_errors The number of transmit errors.
1931 *****************************************************************************/
1932 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1933 int receive_discards,
1935 int transmit_discards,
1936 int transmit_errors);
1938 /**************************************************************************//**
1939 * Set the Mean Request Latency property of the Measurement.
1941 * @note The property is treated as immutable: it is only valid to call
1942 * the setter once. However, we don't assert if the caller tries to
1943 * overwrite, just ignoring the update instead.
1945 * @param measurement Pointer to the Measurement.
1946 * @param mean_request_latency The Mean Request Latency to be set.
1947 *****************************************************************************/
1948 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1949 double mean_request_latency);
1951 /**************************************************************************//**
1952 * Set the Request Rate property of the Measurement.
1954 * @note The property is treated as immutable: it is only valid to call
1955 * the setter once. However, we don't assert if the caller tries to
1956 * overwrite, just ignoring the update instead.
1958 * @param measurement Pointer to the Measurement.
1959 * @param request_rate The Request Rate to be set.
1960 *****************************************************************************/
1961 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
1964 /**************************************************************************//**
1965 * Add an additional CPU usage value name/value pair to the Measurement.
1967 * The name and value are null delimited ASCII strings. The library takes
1968 * a copy so the caller does not have to preserve values after the function
1971 * @param measurement Pointer to the measurement.
1972 * @param id ASCIIZ string with the CPU's identifier.
1973 * @param usage CPU utilization.
1974 *****************************************************************************/
1975 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
1977 /**************************************************************************//**
1978 * Set the CPU Idle value in measurement interval
1979 * percentage of CPU time spent in the idle task
1981 * @note The property is treated as immutable: it is only valid to call
1982 * the setter once. However, we don't assert if the caller tries to
1983 * overwrite, just ignoring the update instead.
1985 * @param cpu_use Pointer to the CPU Use.
1987 *****************************************************************************/
1988 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
1991 /**************************************************************************//**
1992 * Set the percentage of time spent servicing interrupts
1994 * @note The property is treated as immutable: it is only valid to call
1995 * the setter once. However, we don't assert if the caller tries to
1996 * overwrite, just ignoring the update instead.
1998 * @param cpu_use Pointer to the CPU Use.
2000 *****************************************************************************/
2001 void evel_measurement_cpu_use_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
2004 /**************************************************************************//**
2005 * Set the percentage of time spent running user space processes that have been niced
2007 * @note The property is treated as immutable: it is only valid to call
2008 * the setter once. However, we don't assert if the caller tries to
2009 * overwrite, just ignoring the update instead.
2011 * @param cpu_use Pointer to the CPU Use.
2013 *****************************************************************************/
2014 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
2017 /**************************************************************************//**
2018 * Set the percentage of time spent handling soft irq interrupts
2020 * @note The property is treated as immutable: it is only valid to call
2021 * the setter once. However, we don't assert if the caller tries to
2022 * overwrite, just ignoring the update instead.
2024 * @param cpu_use Pointer to the CPU Use.
2026 *****************************************************************************/
2027 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
2029 /**************************************************************************//**
2030 * Set the percentage of time spent in involuntary wait
2032 * @note The property is treated as immutable: it is only valid to call
2033 * the setter once. However, we don't assert if the caller tries to
2034 * overwrite, just ignoring the update instead.
2036 * @param cpu_use Pointer to the CPU Use.
2038 *****************************************************************************/
2039 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
2041 /**************************************************************************//**
2042 * Set the percentage of time spent on system tasks running the kernel
2044 * @note The property is treated as immutable: it is only valid to call
2045 * the setter once. However, we don't assert if the caller tries to
2046 * overwrite, just ignoring the update instead.
2048 * @param cpu_use Pointer to the CPU Use.
2050 *****************************************************************************/
2051 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
2053 /**************************************************************************//**
2054 * Set the percentage of time spent running un-niced user space processes
2056 * @note The property is treated as immutable: it is only valid to call
2057 * the setter once. However, we don't assert if the caller tries to
2058 * overwrite, just ignoring the update instead.
2060 * @param cpu_use Pointer to the CPU Use.
2062 *****************************************************************************/
2063 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
2065 /**************************************************************************//**
2066 * Set the percentage of CPU time spent waiting for I/O operations to complete
2068 * @note The property is treated as immutable: it is only valid to call
2069 * the setter once. However, we don't assert if the caller tries to
2070 * overwrite, just ignoring the update instead.
2072 * @param cpu_use Pointer to the CPU Use.
2074 *****************************************************************************/
2075 void evel_measurement_cpu_use_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
2078 /**************************************************************************//**
2079 * Add an additional File System usage value name/value pair to the
2082 * The filesystem_name is null delimited ASCII string. The library takes a
2083 * copy so the caller does not have to preserve values after the function
2086 * @param measurement Pointer to the measurement.
2087 * @param filesystem_name ASCIIZ string with the file-system's UUID.
2088 * @param block_configured Block storage configured.
2089 * @param block_used Block storage in use.
2090 * @param block_iops Block storage IOPS.
2091 * @param ephemeral_configured Ephemeral storage configured.
2092 * @param ephemeral_used Ephemeral storage in use.
2093 * @param ephemeral_iops Ephemeral storage IOPS.
2094 *****************************************************************************/
2095 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
2096 char * filesystem_name,
2097 double block_configured,
2100 double ephemeral_configured,
2101 double ephemeral_used,
2102 double ephemeral_iops);
2104 /**************************************************************************//**
2105 * Add a Feature usage value name/value pair to the Measurement.
2107 * The name is null delimited ASCII string. The library takes
2108 * a copy so the caller does not have to preserve values after the function
2111 * @param measurement Pointer to the measurement.
2112 * @param feature ASCIIZ string with the feature's name.
2113 * @param utilization Utilization of the feature.
2114 *****************************************************************************/
2115 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
2119 /**************************************************************************//**
2120 * Add a Additional Measurement value name/value pair to the Measurement.
2122 * The name is null delimited ASCII string. The library takes
2123 * a copy so the caller does not have to preserve values after the function
2126 * @param measurement Pointer to the Measurement.
2127 * @param group ASCIIZ string with the measurement group's name.
2128 * @param name ASCIIZ string containing the measurement's name.
2129 * @param name ASCIIZ string containing the measurement's value.
2130 *****************************************************************************/
2131 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
2132 const char * const group,
2133 const char * const name,
2134 const char * const value);
2136 /**************************************************************************//**
2137 * Add a Codec usage value name/value pair to the Measurement.
2139 * The name is null delimited ASCII string. The library takes
2140 * a copy so the caller does not have to preserve values after the function
2143 * @param measurement Pointer to the measurement.
2144 * @param codec ASCIIZ string with the codec's name.
2145 * @param utilization Utilization of the feature.
2146 *****************************************************************************/
2147 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
2151 /**************************************************************************//**
2152 * Set the Media Ports in Use property of the Measurement.
2154 * @note The property is treated as immutable: it is only valid to call
2155 * the setter once. However, we don't assert if the caller tries to
2156 * overwrite, just ignoring the update instead.
2158 * @param measurement Pointer to the measurement.
2159 * @param media_ports_in_use The media port usage to set.
2160 *****************************************************************************/
2161 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
2162 int media_ports_in_use);
2164 /**************************************************************************//**
2165 * Set the VNFC Scaling Metric property of the Measurement.
2167 * @note The property is treated as immutable: it is only valid to call
2168 * the setter once. However, we don't assert if the caller tries to
2169 * overwrite, just ignoring the update instead.
2171 * @param measurement Pointer to the measurement.
2172 * @param scaling_metric The scaling metric to set.
2173 *****************************************************************************/
2174 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
2175 int scaling_metric);
2177 /**************************************************************************//**
2178 * Create a new Latency Bucket to be added to a Measurement event.
2180 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
2181 * supplied to this factory function and are immutable once set.
2182 * Optional fields have explicit setter functions, but again values
2183 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
2184 * immutable properties.
2186 * @param count Count of events in this bucket.
2188 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
2189 * @retval NULL Failed to create the Latency Bucket.
2190 *****************************************************************************/
2191 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
2193 /**************************************************************************//**
2194 * Set the High End property of the Measurement Latency Bucket.
2196 * @note The property is treated as immutable: it is only valid to call
2197 * the setter once. However, we don't assert if the caller tries to
2198 * overwrite, just ignoring the update instead.
2200 * @param bucket Pointer to the Measurement Latency Bucket.
2201 * @param high_end High end of the bucket's range.
2202 *****************************************************************************/
2203 void evel_meas_latency_bucket_high_end_set(
2204 MEASUREMENT_LATENCY_BUCKET * const bucket,
2205 const double high_end);
2207 /**************************************************************************//**
2208 * Set the Low End property of the Measurement Latency Bucket.
2210 * @note The property is treated as immutable: it is only valid to call
2211 * the setter once. However, we don't assert if the caller tries to
2212 * overwrite, just ignoring the update instead.
2214 * @param bucket Pointer to the Measurement Latency Bucket.
2215 * @param low_end Low end of the bucket's range.
2216 *****************************************************************************/
2217 void evel_meas_latency_bucket_low_end_set(
2218 MEASUREMENT_LATENCY_BUCKET * const bucket,
2219 const double low_end);
2221 /**************************************************************************//**
2222 * Add an additional Measurement Latency Bucket to the specified event.
2224 * @param measurement Pointer to the Measurement event.
2225 * @param bucket Pointer to the Measurement Latency Bucket to add.
2226 *****************************************************************************/
2227 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2228 MEASUREMENT_LATENCY_BUCKET * const bucket);
2230 /**************************************************************************//**
2231 * Add an additional Latency Distribution bucket to the Measurement.
2233 * This function implements the previous API, purely for convenience.
2235 * @param measurement Pointer to the measurement.
2236 * @param low_end Low end of the bucket's range.
2237 * @param high_end High end of the bucket's range.
2238 * @param count Count of events in this bucket.
2239 *****************************************************************************/
2240 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2241 const double low_end,
2242 const double high_end,
2245 /**************************************************************************//**
2246 * Create a new vNIC Use to be added to a Measurement event.
2248 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2249 * to this factory function and are immutable once set. Optional
2250 * fields have explicit setter functions, but again values may only be
2251 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2254 * @param vnic_id ASCIIZ string with the vNIC's ID.
2255 * @param val_suspect True or false confidence in data.
2257 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2258 * If the structure is not used it must be released using
2259 * ::evel_measurement_free_vnic_performance.
2260 * @retval NULL Failed to create the vNIC Use.
2261 *****************************************************************************/
2262 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2264 /**************************************************************************//**
2267 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2270 * @note It does not free the vNIC Use itself, since that may be part of a
2272 *****************************************************************************/
2273 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2275 /**************************************************************************//**
2276 * Set the Accumulated Broadcast Packets Received in measurement interval
2277 * property of the vNIC performance.
2279 * @note The property is treated as immutable: it is only valid to call
2280 * the setter once. However, we don't assert if the caller tries to
2281 * overwrite, just ignoring the update instead.
2283 * @param vnic_performance Pointer to the vNIC Use.
2284 * @param recvd_bcast_packets_acc
2285 *****************************************************************************/
2286 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2287 const double recvd_bcast_packets_acc);
2288 /**************************************************************************//**
2289 * Set the Delta Broadcast Packets Received in measurement interval
2290 * property of the vNIC performance.
2292 * @note The property is treated as immutable: it is only valid to call
2293 * the setter once. However, we don't assert if the caller tries to
2294 * overwrite, just ignoring the update instead.
2296 * @param vnic_performance Pointer to the vNIC Use.
2297 * @param recvd_bcast_packets_delta
2298 *****************************************************************************/
2299 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2300 const double recvd_bcast_packets_delta);
2301 /**************************************************************************//**
2302 * Set the Discarded Packets Received in measurement interval
2303 * property of the vNIC performance.
2305 * @note The property is treated as immutable: it is only valid to call
2306 * the setter once. However, we don't assert if the caller tries to
2307 * overwrite, just ignoring the update instead.
2309 * @param vnic_performance Pointer to the vNIC Use.
2310 * @param recvd_discard_packets_acc
2311 *****************************************************************************/
2312 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2313 const double recvd_discard_packets_acc);
2314 /**************************************************************************//**
2315 * Set the Delta Discarded Packets Received in measurement interval
2316 * property of the vNIC performance.
2318 * @note The property is treated as immutable: it is only valid to call
2319 * the setter once. However, we don't assert if the caller tries to
2320 * overwrite, just ignoring the update instead.
2322 * @param vnic_performance Pointer to the vNIC Use.
2323 * @param recvd_discard_packets_delta
2324 *****************************************************************************/
2325 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2326 const double recvd_discard_packets_delta);
2327 /**************************************************************************//**
2328 * Set the Error Packets Received in measurement interval
2329 * property of the vNIC performance.
2331 * @note The property is treated as immutable: it is only valid to call
2332 * the setter once. However, we don't assert if the caller tries to
2333 * overwrite, just ignoring the update instead.
2335 * @param vnic_performance Pointer to the vNIC Use.
2336 * @param recvd_error_packets_acc
2337 *****************************************************************************/
2338 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2339 const double recvd_error_packets_acc);
2340 /**************************************************************************//**
2341 * Set the Delta Error Packets Received in measurement interval
2342 * property of the vNIC performance.
2344 * @note The property is treated as immutable: it is only valid to call
2345 * the setter once. However, we don't assert if the caller tries to
2346 * overwrite, just ignoring the update instead.
2348 * @param vnic_performance Pointer to the vNIC Use.
2349 * @param recvd_error_packets_delta
2350 *****************************************************************************/
2351 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2352 const double recvd_error_packets_delta);
2353 /**************************************************************************//**
2354 * Set the Accumulated Multicast Packets Received in measurement interval
2355 * property of the vNIC performance.
2357 * @note The property is treated as immutable: it is only valid to call
2358 * the setter once. However, we don't assert if the caller tries to
2359 * overwrite, just ignoring the update instead.
2361 * @param vnic_performance Pointer to the vNIC Use.
2362 * @param recvd_mcast_packets_acc
2363 *****************************************************************************/
2364 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2365 const double recvd_mcast_packets_acc);
2366 /**************************************************************************//**
2367 * Set the Delta Multicast Packets Received in measurement interval
2368 * property of the vNIC performance.
2370 * @note The property is treated as immutable: it is only valid to call
2371 * the setter once. However, we don't assert if the caller tries to
2372 * overwrite, just ignoring the update instead.
2374 * @param vnic_performance Pointer to the vNIC Use.
2375 * @param recvd_mcast_packets_delta
2376 *****************************************************************************/
2377 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2378 const double recvd_mcast_packets_delta);
2379 /**************************************************************************//**
2380 * Set the Accumulated Octets Received in measurement interval
2381 * property of the vNIC performance.
2383 * @note The property is treated as immutable: it is only valid to call
2384 * the setter once. However, we don't assert if the caller tries to
2385 * overwrite, just ignoring the update instead.
2387 * @param vnic_performance Pointer to the vNIC Use.
2388 * @param recvd_octets_acc
2389 *****************************************************************************/
2390 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2391 const double recvd_octets_acc);
2392 /**************************************************************************//**
2393 * Set the Delta Octets Received in measurement interval
2394 * property of the vNIC performance.
2396 * @note The property is treated as immutable: it is only valid to call
2397 * the setter once. However, we don't assert if the caller tries to
2398 * overwrite, just ignoring the update instead.
2400 * @param vnic_performance Pointer to the vNIC Use.
2401 * @param recvd_octets_delta
2402 *****************************************************************************/
2403 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2404 const double recvd_octets_delta);
2405 /**************************************************************************//**
2406 * Set the Accumulated Total Packets Received in measurement interval
2407 * property of the vNIC performance.
2409 * @note The property is treated as immutable: it is only valid to call
2410 * the setter once. However, we don't assert if the caller tries to
2411 * overwrite, just ignoring the update instead.
2413 * @param vnic_performance Pointer to the vNIC Use.
2414 * @param recvd_total_packets_acc
2415 *****************************************************************************/
2416 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2417 const double recvd_total_packets_acc);
2418 /**************************************************************************//**
2419 * Set the Delta Total Packets Received in measurement interval
2420 * property of the vNIC performance.
2422 * @note The property is treated as immutable: it is only valid to call
2423 * the setter once. However, we don't assert if the caller tries to
2424 * overwrite, just ignoring the update instead.
2426 * @param vnic_performance Pointer to the vNIC Use.
2427 * @param recvd_total_packets_delta
2428 *****************************************************************************/
2429 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2430 const double recvd_total_packets_delta);
2431 /**************************************************************************//**
2432 * Set the Accumulated Unicast Packets Received in measurement interval
2433 * property of the vNIC performance.
2435 * @note The property is treated as immutable: it is only valid to call
2436 * the setter once. However, we don't assert if the caller tries to
2437 * overwrite, just ignoring the update instead.
2439 * @param vnic_performance Pointer to the vNIC Use.
2440 * @param recvd_ucast_packets_acc
2441 *****************************************************************************/
2442 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2443 const double recvd_ucast_packets_acc);
2444 /**************************************************************************//**
2445 * Set the Delta Unicast packets Received in measurement interval
2446 * property of the vNIC performance.
2448 * @note The property is treated as immutable: it is only valid to call
2449 * the setter once. However, we don't assert if the caller tries to
2450 * overwrite, just ignoring the update instead.
2452 * @param vnic_performance Pointer to the vNIC Use.
2453 * @param recvd_ucast_packets_delta
2454 *****************************************************************************/
2455 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2456 const double recvd_ucast_packets_delta);
2457 /**************************************************************************//**
2458 * Set the Transmitted Broadcast Packets in measurement interval
2459 * property of the vNIC performance.
2461 * @note The property is treated as immutable: it is only valid to call
2462 * the setter once. However, we don't assert if the caller tries to
2463 * overwrite, just ignoring the update instead.
2465 * @param vnic_performance Pointer to the vNIC Use.
2466 * @param tx_bcast_packets_acc
2467 *****************************************************************************/
2468 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2469 const double tx_bcast_packets_acc);
2470 /**************************************************************************//**
2471 * Set the Delta Broadcast packets Transmitted in measurement interval
2472 * property of the vNIC performance.
2474 * @note The property is treated as immutable: it is only valid to call
2475 * the setter once. However, we don't assert if the caller tries to
2476 * overwrite, just ignoring the update instead.
2478 * @param vnic_performance Pointer to the vNIC Use.
2479 * @param tx_bcast_packets_delta
2480 *****************************************************************************/
2481 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2482 const double tx_bcast_packets_delta);
2483 /**************************************************************************//**
2484 * Set the Transmitted Discarded Packets in measurement interval
2485 * property of the vNIC performance.
2487 * @note The property is treated as immutable: it is only valid to call
2488 * the setter once. However, we don't assert if the caller tries to
2489 * overwrite, just ignoring the update instead.
2491 * @param vnic_performance Pointer to the vNIC Use.
2492 * @param tx_discarded_packets_acc
2493 *****************************************************************************/
2494 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2495 const double tx_discarded_packets_acc);
2496 /**************************************************************************//**
2497 * Set the Delta Discarded packets Transmitted in measurement interval
2498 * property of the vNIC performance.
2500 * @note The property is treated as immutable: it is only valid to call
2501 * the setter once. However, we don't assert if the caller tries to
2502 * overwrite, just ignoring the update instead.
2504 * @param vnic_performance Pointer to the vNIC Use.
2505 * @param tx_discarded_packets_delta
2506 *****************************************************************************/
2507 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2508 const double tx_discarded_packets_delta);
2509 /**************************************************************************//**
2510 * Set the Transmitted Errored Packets in measurement interval
2511 * property of the vNIC performance.
2513 * @note The property is treated as immutable: it is only valid to call
2514 * the setter once. However, we don't assert if the caller tries to
2515 * overwrite, just ignoring the update instead.
2517 * @param vnic_performance Pointer to the vNIC Use.
2518 * @param tx_error_packets_acc
2519 *****************************************************************************/
2520 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2521 const double tx_error_packets_acc);
2522 /**************************************************************************//**
2523 * Set the Delta Errored packets Transmitted in measurement interval
2524 * property of the vNIC performance.
2526 * @note The property is treated as immutable: it is only valid to call
2527 * the setter once. However, we don't assert if the caller tries to
2528 * overwrite, just ignoring the update instead.
2530 * @param vnic_performance Pointer to the vNIC Use.
2531 * @param tx_error_packets_delta
2532 *****************************************************************************/
2533 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2534 const double tx_error_packets_delta);
2535 /**************************************************************************//**
2536 * Set the Transmitted Multicast Packets in measurement interval
2537 * property of the vNIC performance.
2539 * @note The property is treated as immutable: it is only valid to call
2540 * the setter once. However, we don't assert if the caller tries to
2541 * overwrite, just ignoring the update instead.
2543 * @param vnic_performance Pointer to the vNIC Use.
2544 * @param tx_mcast_packets_acc
2545 *****************************************************************************/
2546 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2547 const double tx_mcast_packets_acc);
2548 /**************************************************************************//**
2549 * Set the Delta Multicast packets Transmitted in measurement interval
2550 * property of the vNIC performance.
2552 * @note The property is treated as immutable: it is only valid to call
2553 * the setter once. However, we don't assert if the caller tries to
2554 * overwrite, just ignoring the update instead.
2556 * @param vnic_performance Pointer to the vNIC Use.
2557 * @param tx_mcast_packets_delta
2558 *****************************************************************************/
2559 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2560 const double tx_mcast_packets_delta);
2561 /**************************************************************************//**
2562 * Set the Transmitted Octets in measurement interval
2563 * property of the vNIC performance.
2565 * @note The property is treated as immutable: it is only valid to call
2566 * the setter once. However, we don't assert if the caller tries to
2567 * overwrite, just ignoring the update instead.
2569 * @param vnic_performance Pointer to the vNIC Use.
2570 * @param tx_octets_acc
2571 *****************************************************************************/
2572 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2573 const double tx_octets_acc);
2574 /**************************************************************************//**
2575 * Set the Delta Octets Transmitted in measurement interval
2576 * property of the vNIC performance.
2578 * @note The property is treated as immutable: it is only valid to call
2579 * the setter once. However, we don't assert if the caller tries to
2580 * overwrite, just ignoring the update instead.
2582 * @param vnic_performance Pointer to the vNIC Use.
2583 * @param tx_octets_delta
2584 *****************************************************************************/
2585 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2586 const double tx_octets_delta);
2587 /**************************************************************************//**
2588 * Set the Transmitted Total Packets in measurement interval
2589 * property of the vNIC performance.
2591 * @note The property is treated as immutable: it is only valid to call
2592 * the setter once. However, we don't assert if the caller tries to
2593 * overwrite, just ignoring the update instead.
2595 * @param vnic_performance Pointer to the vNIC Use.
2596 * @param tx_total_packets_acc
2597 *****************************************************************************/
2598 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2599 const double tx_total_packets_acc);
2600 /**************************************************************************//**
2601 * Set the Delta Total Packets Transmitted in measurement interval
2602 * property of the vNIC performance.
2604 * @note The property is treated as immutable: it is only valid to call
2605 * the setter once. However, we don't assert if the caller tries to
2606 * overwrite, just ignoring the update instead.
2608 * @param vnic_performance Pointer to the vNIC Use.
2609 * @param tx_total_packets_delta
2610 *****************************************************************************/
2611 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2612 const double tx_total_packets_delta);
2613 /**************************************************************************//**
2614 * Set the Transmitted Unicast Packets in measurement interval
2615 * property of the vNIC performance.
2617 * @note The property is treated as immutable: it is only valid to call
2618 * the setter once. However, we don't assert if the caller tries to
2619 * overwrite, just ignoring the update instead.
2621 * @param vnic_performance Pointer to the vNIC Use.
2622 * @param tx_ucast_packets_acc
2623 *****************************************************************************/
2624 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2625 const double tx_ucast_packets_acc);
2626 /**************************************************************************//**
2627 * Set the Delta Octets Transmitted in measurement interval
2628 * property of the vNIC performance.
2630 * @note The property is treated as immutable: it is only valid to call
2631 * the setter once. However, we don't assert if the caller tries to
2632 * overwrite, just ignoring the update instead.
2634 * @param vnic_performance Pointer to the vNIC Use.
2635 * @param tx_ucast_packets_delta
2636 *****************************************************************************/
2637 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2638 const double tx_ucast_packets_delta);
2640 /**************************************************************************//**
2641 * Add an additional vNIC Use to the specified Measurement event.
2643 * @param measurement Pointer to the measurement.
2644 * @param vnic_performance Pointer to the vNIC Use to add.
2645 *****************************************************************************/
2646 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2647 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2649 /**************************************************************************//**
2650 * Add an additional vNIC usage record Measurement.
2652 * This function implements the previous API, purely for convenience.
2654 * The ID is null delimited ASCII string. The library takes a copy so the
2655 * caller does not have to preserve values after the function returns.
2657 * @param measurement Pointer to the measurement.
2658 * @param vnic_id ASCIIZ string with the vNIC's ID.
2659 * @param valset true or false confidence level
2660 * @param recvd_bcast_packets_acc Recieved broadcast packets
2661 * @param recvd_bcast_packets_delta Received delta broadcast packets
2662 * @param recvd_discarded_packets_acc Recieved discarded packets
2663 * @param recvd_discarded_packets_delta Received discarded delta packets
2664 * @param recvd_error_packets_acc Received error packets
2665 * @param recvd_error_packets_delta, Received delta error packets
2666 * @param recvd_mcast_packets_acc Received multicast packets
2667 * @param recvd_mcast_packets_delta Received delta multicast packets
2668 * @param recvd_octets_acc Received octets
2669 * @param recvd_octets_delta Received delta octets
2670 * @param recvd_total_packets_acc Received total packets
2671 * @param recvd_total_packets_delta Received delta total packets
2672 * @param recvd_ucast_packets_acc Received Unicast packets
2673 * @param recvd_ucast_packets_delta Received delta unicast packets
2674 * @param tx_bcast_packets_acc Transmitted broadcast packets
2675 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2676 * @param tx_discarded_packets_acc Transmitted packets discarded
2677 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2678 * @param tx_error_packets_acc Transmitted error packets
2679 * @param tx_error_packets_delta Transmitted delta error packets
2680 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2681 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2682 * @param tx_octets_acc Transmitted octets
2683 * @param tx_octets_delta Transmitted delta octets
2684 * @param tx_total_packets_acc Transmitted total packets
2685 * @param tx_total_packets_delta Transmitted delta total packets
2686 * @param tx_ucast_packets_acc Transmitted Unicast packets
2687 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2688 *****************************************************************************/
2689 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2690 char * const vnic_id,
2692 double recvd_bcast_packets_acc,
2693 double recvd_bcast_packets_delta,
2694 double recvd_discarded_packets_acc,
2695 double recvd_discarded_packets_delta,
2696 double recvd_error_packets_acc,
2697 double recvd_error_packets_delta,
2698 double recvd_mcast_packets_acc,
2699 double recvd_mcast_packets_delta,
2700 double recvd_octets_acc,
2701 double recvd_octets_delta,
2702 double recvd_total_packets_acc,
2703 double recvd_total_packets_delta,
2704 double recvd_ucast_packets_acc,
2705 double recvd_ucast_packets_delta,
2706 double tx_bcast_packets_acc,
2707 double tx_bcast_packets_delta,
2708 double tx_discarded_packets_acc,
2709 double tx_discarded_packets_delta,
2710 double tx_error_packets_acc,
2711 double tx_error_packets_delta,
2712 double tx_mcast_packets_acc,
2713 double tx_mcast_packets_delta,
2714 double tx_octets_acc,
2715 double tx_octets_delta,
2716 double tx_total_packets_acc,
2717 double tx_total_packets_delta,
2718 double tx_ucast_packets_acc,
2719 double tx_ucast_packets_delta);
2721 /*****************************************************************************/
2722 /*****************************************************************************/
2726 /*****************************************************************************/
2727 /*****************************************************************************/
2729 /**************************************************************************//**
2730 * Create a new Report event.
2732 * @note The mandatory fields on the Report must be supplied to this
2733 * factory function and are immutable once set. Optional fields have
2734 * explicit setter functions, but again values may only be set once so
2735 * that the Report has immutable properties.
2737 * @param measurement_interval
2738 * @param event_name Unique Event Name
2739 * @param event_id A universal identifier of the event for analysis etc
2741 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2742 * not used (i.e. posted) it must be released using
2743 * ::evel_free_report.
2744 * @retval NULL Failed to create the event.
2745 *****************************************************************************/
2746 EVENT_REPORT * evel_new_report(double measurement_interval,const char* ev_name, const char *ev_id);
2748 /**************************************************************************//**
2751 * Free off the Report supplied. Will free all the contained allocated memory.
2753 * @note It does not free the Report itself, since that may be part of a
2755 *****************************************************************************/
2756 void evel_free_report(EVENT_REPORT * event);
2758 /**************************************************************************//**
2759 * Set the Event Type property of the Report.
2761 * @note The property is treated as immutable: it is only valid to call
2762 * the setter once. However, we don't assert if the caller tries to
2763 * overwrite, just ignoring the update instead.
2765 * @param report Pointer to the Report.
2766 * @param type The Event Type to be set. ASCIIZ string. The caller
2767 * does not need to preserve the value once the function
2769 *****************************************************************************/
2770 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2772 /**************************************************************************//**
2773 * Add a Feature usage value name/value pair to the Report.
2775 * The name is null delimited ASCII string. The library takes
2776 * a copy so the caller does not have to preserve values after the function
2779 * @param report Pointer to the report.
2780 * @param feature ASCIIZ string with the feature's name.
2781 * @param utilization Utilization of the feature.
2782 *****************************************************************************/
2783 void evel_report_feature_use_add(EVENT_REPORT * report,
2787 /**************************************************************************//**
2788 * Add a Additional Measurement value name/value pair to the Report.
2790 * The name is null delimited ASCII string. The library takes
2791 * a copy so the caller does not have to preserve values after the function
2794 * @param report Pointer to the report.
2795 * @param group ASCIIZ string with the measurement group's name.
2796 * @param name ASCIIZ string containing the measurement's name.
2797 * @param value ASCIIZ string containing the measurement's value.
2798 *****************************************************************************/
2799 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2800 const char * const group,
2801 const char * const name,
2802 const char * const value);
2804 /*****************************************************************************/
2805 /*****************************************************************************/
2809 /*****************************************************************************/
2810 /*****************************************************************************/
2812 /**************************************************************************//**
2813 * Create a new Mobile Flow event.
2815 * @note The mandatory fields on the Mobile Flow must be supplied to this
2816 * factory function and are immutable once set. Optional fields have
2817 * explicit setter functions, but again values may only be set once so
2818 * that the Mobile Flow has immutable properties.
2820 * @param event_name Unique Event Name
2821 * @param event_id A universal identifier of the event for analysis etc
2822 * @param flow_direction
2823 * @param gtp_per_flow_metrics
2824 * @param ip_protocol_type
2826 * @param other_endpoint_ip_address
2827 * @param other_endpoint_port
2828 * @param reporting_endpoint_ip_addr
2829 * @param reporting_endpoint_port
2831 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2832 * event is not used (i.e. posted) it must be released using
2833 * ::evel_free_mobile_flow.
2834 * @retval NULL Failed to create the event.
2835 *****************************************************************************/
2836 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2837 const char* ev_name, const char *ev_id,
2838 const char * const flow_direction,
2839 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2840 const char * const ip_protocol_type,
2841 const char * const ip_version,
2842 const char * const other_endpoint_ip_address,
2843 int other_endpoint_port,
2844 const char * const reporting_endpoint_ip_addr,
2845 int reporting_endpoint_port);
2847 /**************************************************************************//**
2848 * Free a Mobile Flow.
2850 * Free off the Mobile Flow supplied. Will free all the contained allocated
2853 * @note It does not free the Mobile Flow itself, since that may be part of a
2855 *****************************************************************************/
2856 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2858 /**************************************************************************//**
2859 * Set the Event Type property of the Mobile Flow.
2861 * @note The property is treated as immutable: it is only valid to call
2862 * the setter once. However, we don't assert if the caller tries to
2863 * overwrite, just ignoring the update instead.
2865 * @param mobile_flow Pointer to the Mobile Flow.
2866 * @param type The Event Type to be set. ASCIIZ string. The caller
2867 * does not need to preserve the value once the function
2869 *****************************************************************************/
2870 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2871 const char * const type);
2873 /**************************************************************************//**
2874 * Set the Application Type property of the Mobile Flow.
2876 * @note The property is treated as immutable: it is only valid to call
2877 * the setter once. However, we don't assert if the caller tries to
2878 * overwrite, just ignoring the update instead.
2880 * @param mobile_flow Pointer to the Mobile Flow.
2881 * @param type The Application Type to be set. ASCIIZ string. The caller
2882 * does not need to preserve the value once the function
2884 *****************************************************************************/
2885 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2886 const char * const type);
2888 /**************************************************************************//**
2889 * Set the Application Protocol Type property of the Mobile Flow.
2891 * @note The property is treated as immutable: it is only valid to call
2892 * the setter once. However, we don't assert if the caller tries to
2893 * overwrite, just ignoring the update instead.
2895 * @param mobile_flow Pointer to the Mobile Flow.
2896 * @param type The Application Protocol Type to be set. ASCIIZ string.
2897 * The caller does not need to preserve the value once the
2899 *****************************************************************************/
2900 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2901 const char * const type);
2903 /**************************************************************************//**
2904 * Set the Application Protocol Version property of the Mobile Flow.
2906 * @note The property is treated as immutable: it is only valid to call
2907 * the setter once. However, we don't assert if the caller tries to
2908 * overwrite, just ignoring the update instead.
2910 * @param mobile_flow Pointer to the Mobile Flow.
2911 * @param version The Application Protocol Version to be set. ASCIIZ
2912 * string. The caller does not need to preserve the value
2913 * once the function returns.
2914 *****************************************************************************/
2915 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2916 const char * const version);
2918 /**************************************************************************//**
2919 * Set the CID property of the Mobile Flow.
2921 * @note The property is treated as immutable: it is only valid to call
2922 * the setter once. However, we don't assert if the caller tries to
2923 * overwrite, just ignoring the update instead.
2925 * @param mobile_flow Pointer to the Mobile Flow.
2926 * @param cid The CID to be set. ASCIIZ string. The caller does not
2927 * need to preserve the value once the function returns.
2928 *****************************************************************************/
2929 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2930 const char * const cid);
2932 /**************************************************************************//**
2933 * Set the Connection Type property of the Mobile Flow.
2935 * @note The property is treated as immutable: it is only valid to call
2936 * the setter once. However, we don't assert if the caller tries to
2937 * overwrite, just ignoring the update instead.
2939 * @param mobile_flow Pointer to the Mobile Flow.
2940 * @param type The Connection Type to be set. ASCIIZ string. The caller
2941 * does not need to preserve the value once the function
2943 *****************************************************************************/
2944 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2945 const char * const type);
2947 /**************************************************************************//**
2948 * Set the ECGI property of the Mobile Flow.
2950 * @note The property is treated as immutable: it is only valid to call
2951 * the setter once. However, we don't assert if the caller tries to
2952 * overwrite, just ignoring the update instead.
2954 * @param mobile_flow Pointer to the Mobile Flow.
2955 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2956 * need to preserve the value once the function returns.
2957 *****************************************************************************/
2958 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2959 const char * const ecgi);
2961 /**************************************************************************//**
2962 * Set the GTP Protocol Type property of the Mobile Flow.
2964 * @note The property is treated as immutable: it is only valid to call
2965 * the setter once. However, we don't assert if the caller tries to
2966 * overwrite, just ignoring the update instead.
2968 * @param mobile_flow Pointer to the Mobile Flow.
2969 * @param type The GTP Protocol Type to be set. ASCIIZ string. The
2970 * caller does not need to preserve the value once the
2972 *****************************************************************************/
2973 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2974 const char * const type);
2976 /**************************************************************************//**
2977 * Set the GTP Protocol Version property of the Mobile Flow.
2979 * @note The property is treated as immutable: it is only valid to call
2980 * the setter once. However, we don't assert if the caller tries to
2981 * overwrite, just ignoring the update instead.
2983 * @param mobile_flow Pointer to the Mobile Flow.
2984 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
2985 * caller does not need to preserve the value once the
2987 *****************************************************************************/
2988 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2989 const char * const version);
2991 /**************************************************************************//**
2992 * Set the HTTP Header property of the Mobile Flow.
2994 * @note The property is treated as immutable: it is only valid to call
2995 * the setter once. However, we don't assert if the caller tries to
2996 * overwrite, just ignoring the update instead.
2998 * @param mobile_flow Pointer to the Mobile Flow.
2999 * @param header The HTTP header to be set. ASCIIZ string. The caller does
3000 * not need to preserve the value once the function returns.
3001 *****************************************************************************/
3002 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
3003 const char * const header);
3005 /**************************************************************************//**
3006 * Set the IMEI property of the Mobile Flow.
3008 * @note The property is treated as immutable: it is only valid to call
3009 * the setter once. However, we don't assert if the caller tries to
3010 * overwrite, just ignoring the update instead.
3012 * @param mobile_flow Pointer to the Mobile Flow.
3013 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
3014 * need to preserve the value once the function returns.
3015 *****************************************************************************/
3016 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
3017 const char * const imei);
3019 /**************************************************************************//**
3020 * Set the IMSI property of the Mobile Flow.
3022 * @note The property is treated as immutable: it is only valid to call
3023 * the setter once. However, we don't assert if the caller tries to
3024 * overwrite, just ignoring the update instead.
3026 * @param mobile_flow Pointer to the Mobile Flow.
3027 * @param imsi The IMSI to be set. ASCIIZ string. The caller does not
3028 * need to preserve the value once the function returns.
3029 *****************************************************************************/
3030 void evel_mobile_flow_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
3031 const char * const imsi);
3033 /**************************************************************************//**
3034 * Set the LAC property of the Mobile Flow.
3036 * @note The property is treated as immutable: it is only valid to call
3037 * the setter once. However, we don't assert if the caller tries to
3038 * overwrite, just ignoring the update instead.
3040 * @param mobile_flow Pointer to the Mobile Flow.
3041 * @param lac The LAC to be set. ASCIIZ string. The caller does not
3042 * need to preserve the value once the function returns.
3043 *****************************************************************************/
3044 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
3045 const char * const lac);
3047 /**************************************************************************//**
3048 * Set the MCC property of the Mobile Flow.
3050 * @note The property is treated as immutable: it is only valid to call
3051 * the setter once. However, we don't assert if the caller tries to
3052 * overwrite, just ignoring the update instead.
3054 * @param mobile_flow Pointer to the Mobile Flow.
3055 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
3056 * need to preserve the value once the function returns.
3057 *****************************************************************************/
3058 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
3059 const char * const mcc);
3061 /**************************************************************************//**
3062 * Set the MNC property of the Mobile Flow.
3064 * @note The property is treated as immutable: it is only valid to call
3065 * the setter once. However, we don't assert if the caller tries to
3066 * overwrite, just ignoring the update instead.
3068 * @param mobile_flow Pointer to the Mobile Flow.
3069 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
3070 * need to preserve the value once the function returns.
3071 *****************************************************************************/
3072 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
3073 const char * const mnc);
3075 /**************************************************************************//**
3076 * Set the MSISDN property of the Mobile Flow.
3078 * @note The property is treated as immutable: it is only valid to call
3079 * the setter once. However, we don't assert if the caller tries to
3080 * overwrite, just ignoring the update instead.
3082 * @param mobile_flow Pointer to the Mobile Flow.
3083 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
3084 * need to preserve the value once the function returns.
3085 *****************************************************************************/
3086 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
3087 const char * const msisdn);
3089 /**************************************************************************//**
3090 * Set the Other Functional Role property of the Mobile Flow.
3092 * @note The property is treated as immutable: it is only valid to call
3093 * the setter once. However, we don't assert if the caller tries to
3094 * overwrite, just ignoring the update instead.
3096 * @param mobile_flow Pointer to the Mobile Flow.
3097 * @param role The Other Functional Role to be set. ASCIIZ string. The
3098 * caller does not need to preserve the value once the
3100 *****************************************************************************/
3101 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
3102 const char * const role);
3104 /**************************************************************************//**
3105 * Set the RAC property of the Mobile Flow.
3107 * @note The property is treated as immutable: it is only valid to call
3108 * the setter once. However, we don't assert if the caller tries to
3109 * overwrite, just ignoring the update instead.
3111 * @param mobile_flow Pointer to the Mobile Flow.
3112 * @param rac The RAC to be set. ASCIIZ string. The caller does not
3113 * need to preserve the value once the function returns.
3114 *****************************************************************************/
3115 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
3116 const char * const rac);
3118 /**************************************************************************//**
3119 * Set the Radio Access Technology property of the Mobile Flow.
3121 * @note The property is treated as immutable: it is only valid to call
3122 * the setter once. However, we don't assert if the caller tries to
3123 * overwrite, just ignoring the update instead.
3125 * @param mobile_flow Pointer to the Mobile Flow.
3126 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
3127 * caller does not need to preserve the value once the
3129 *****************************************************************************/
3130 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
3131 const char * const tech);
3133 /**************************************************************************//**
3134 * Set the SAC property of the Mobile Flow.
3136 * @note The property is treated as immutable: it is only valid to call
3137 * the setter once. However, we don't assert if the caller tries to
3138 * overwrite, just ignoring the update instead.
3140 * @param mobile_flow Pointer to the Mobile Flow.
3141 * @param sac The SAC to be set. ASCIIZ string. The caller does not
3142 * need to preserve the value once the function returns.
3143 *****************************************************************************/
3144 void evel_mobile_flow_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
3145 const char * const sac);
3147 /**************************************************************************//**
3148 * Set the Sampling Algorithm property of the Mobile Flow.
3150 * @note The property is treated as immutable: it is only valid to call
3151 * the setter once. However, we don't assert if the caller tries to
3152 * overwrite, just ignoring the update instead.
3154 * @param mobile_flow Pointer to the Mobile Flow.
3155 * @param algorithm The Sampling Algorithm to be set.
3156 *****************************************************************************/
3157 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
3160 /**************************************************************************//**
3161 * Set the TAC property of the Mobile Flow.
3163 * @note The property is treated as immutable: it is only valid to call
3164 * the setter once. However, we don't assert if the caller tries to
3165 * overwrite, just ignoring the update instead.
3167 * @param mobile_flow Pointer to the Mobile Flow.
3168 * @param tac The TAC to be set. ASCIIZ string. The caller does not
3169 * need to preserve the value once the function returns.
3170 *****************************************************************************/
3171 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
3172 const char * const tac);
3174 /**************************************************************************//**
3175 * Set the Tunnel ID property of the Mobile Flow.
3177 * @note The property is treated as immutable: it is only valid to call
3178 * the setter once. However, we don't assert if the caller tries to
3179 * overwrite, just ignoring the update instead.
3181 * @param mobile_flow Pointer to the Mobile Flow.
3182 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
3183 * not need to preserve the value once the function returns.
3184 *****************************************************************************/
3185 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3186 const char * const tunnel_id);
3188 /**************************************************************************//**
3189 * Set the VLAN ID property of the Mobile Flow.
3191 * @note The property is treated as immutable: it is only valid to call
3192 * the setter once. However, we don't assert if the caller tries to
3193 * overwrite, just ignoring the update instead.
3195 * @param mobile_flow Pointer to the Mobile Flow.
3196 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
3197 * not need to preserve the value once the function returns.
3198 *****************************************************************************/
3199 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3200 const char * const vlan_id);
3202 /**************************************************************************//**
3203 * Create a new Mobile GTP Per Flow Metrics.
3205 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
3206 * supplied to this factory function and are immutable once set.
3207 * Optional fields have explicit setter functions, but again values
3208 * may only be set once so that the Mobile GTP Per Flow Metrics has
3209 * immutable properties.
3211 * @param avg_bit_error_rate
3212 * @param avg_packet_delay_variation
3213 * @param avg_packet_latency
3214 * @param avg_receive_throughput
3215 * @param avg_transmit_throughput
3216 * @param flow_activation_epoch
3217 * @param flow_activation_microsec
3218 * @param flow_deactivation_epoch
3219 * @param flow_deactivation_microsec
3220 * @param flow_deactivation_time
3221 * @param flow_status
3222 * @param max_packet_delay_variation
3223 * @param num_activation_failures
3224 * @param num_bit_errors
3225 * @param num_bytes_received
3226 * @param num_bytes_transmitted
3227 * @param num_dropped_packets
3228 * @param num_l7_bytes_received
3229 * @param num_l7_bytes_transmitted
3230 * @param num_lost_packets
3231 * @param num_out_of_order_packets
3232 * @param num_packet_errors
3233 * @param num_packets_received_excl_retrans
3234 * @param num_packets_received_incl_retrans
3235 * @param num_packets_transmitted_incl_retrans
3236 * @param num_retries
3237 * @param num_timeouts
3238 * @param num_tunneled_l7_bytes_received
3239 * @param round_trip_time
3240 * @param time_to_first_byte
3242 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3243 * If the structure is not used it must be released using
3244 * ::evel_free_mobile_gtp_flow_metrics.
3245 * @retval NULL Failed to create the event.
3246 *****************************************************************************/
3247 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3248 double avg_bit_error_rate,
3249 double avg_packet_delay_variation,
3250 int avg_packet_latency,
3251 int avg_receive_throughput,
3252 int avg_transmit_throughput,
3253 int flow_activation_epoch,
3254 int flow_activation_microsec,
3255 int flow_deactivation_epoch,
3256 int flow_deactivation_microsec,
3257 time_t flow_deactivation_time,
3258 const char * const flow_status,
3259 int max_packet_delay_variation,
3260 int num_activation_failures,
3262 int num_bytes_received,
3263 int num_bytes_transmitted,
3264 int num_dropped_packets,
3265 int num_l7_bytes_received,
3266 int num_l7_bytes_transmitted,
3267 int num_lost_packets,
3268 int num_out_of_order_packets,
3269 int num_packet_errors,
3270 int num_packets_received_excl_retrans,
3271 int num_packets_received_incl_retrans,
3272 int num_packets_transmitted_incl_retrans,
3275 int num_tunneled_l7_bytes_received,
3276 int round_trip_time,
3277 int time_to_first_byte);
3279 /**************************************************************************//**
3280 * Free a Mobile GTP Per Flow Metrics.
3282 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3283 * contained allocated memory.
3285 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3286 * may be part of a larger structure.
3287 *****************************************************************************/
3288 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3290 /**************************************************************************//**
3291 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3294 * @note The property is treated as immutable: it is only valid to call
3295 * the setter once. However, we don't assert if the caller tries to
3296 * overwrite, just ignoring the update instead.
3298 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3299 * @param duration The Duration of Connection Failed Status to be set.
3300 *****************************************************************************/
3301 void evel_mobile_gtp_metrics_dur_con_fail_set(
3302 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3305 /**************************************************************************//**
3306 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3309 * @note The property is treated as immutable: it is only valid to call
3310 * the setter once. However, we don't assert if the caller tries to
3311 * overwrite, just ignoring the update instead.
3313 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3314 * @param duration The Duration of Tunnel Failed Status to be set.
3315 *****************************************************************************/
3316 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3317 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3320 /**************************************************************************//**
3321 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3323 * @note The property is treated as immutable: it is only valid to call
3324 * the setter once. However, we don't assert if the caller tries to
3325 * overwrite, just ignoring the update instead.
3327 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3328 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3329 * does not need to preserve the value once the function
3331 *****************************************************************************/
3332 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3333 const char * const act_by);
3335 /**************************************************************************//**
3336 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3338 * @note The property is treated as immutable: it is only valid to call
3339 * the setter once. However, we don't assert if the caller tries to
3340 * overwrite, just ignoring the update instead.
3342 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3343 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3344 * does not need to preserve the value once the function
3346 *****************************************************************************/
3347 void evel_mobile_gtp_metrics_act_time_set(
3348 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3351 /**************************************************************************//**
3352 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3354 * @note The property is treated as immutable: it is only valid to call
3355 * the setter once. However, we don't assert if the caller tries to
3356 * overwrite, just ignoring the update instead.
3358 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3359 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3360 * does not need to preserve the value once the function
3362 *****************************************************************************/
3363 void evel_mobile_gtp_metrics_deact_by_set(
3364 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3365 const char * const deact_by);
3367 /**************************************************************************//**
3368 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3370 * @note The property is treated as immutable: it is only valid to call
3371 * the setter once. However, we don't assert if the caller tries to
3372 * overwrite, just ignoring the update instead.
3374 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3375 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3376 * caller does not need to preserve the value once the
3378 *****************************************************************************/
3379 void evel_mobile_gtp_metrics_con_status_set(
3380 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3381 const char * const status);
3383 /**************************************************************************//**
3384 * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.
3386 * @note The property is treated as immutable: it is only valid to call
3387 * the setter once. However, we don't assert if the caller tries to
3388 * overwrite, just ignoring the update instead.
3390 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3391 * @param status The GTP Tunnel Status to be set. ASCIIZ string. The
3392 * caller does not need to preserve the value once the
3394 *****************************************************************************/
3395 void evel_mobile_gtp_metrics_tun_status_set(
3396 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3397 const char * const status);
3399 /**************************************************************************//**
3400 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3402 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3403 * @param index The index of the IP Type-of-Service.
3404 * @param count The count.
3405 *****************************************************************************/
3406 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3410 /**************************************************************************//**
3411 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3414 * @note The property is treated as immutable: it is only valid to call
3415 * the setter once. However, we don't assert if the caller tries to
3416 * overwrite, just ignoring the update instead.
3418 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3419 * @param rtt The Large Packet Round-Trip Time to be set.
3420 *****************************************************************************/
3421 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3422 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3425 /**************************************************************************//**
3426 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3428 * @note The property is treated as immutable: it is only valid to call
3429 * the setter once. However, we don't assert if the caller tries to
3430 * overwrite, just ignoring the update instead.
3432 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3433 * @param threshold The Large Packet Threshold to be set.
3434 *****************************************************************************/
3435 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3436 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3439 /**************************************************************************//**
3440 * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.
3442 * @note The property is treated as immutable: it is only valid to call
3443 * the setter once. However, we don't assert if the caller tries to
3444 * overwrite, just ignoring the update instead.
3446 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3447 * @param rate The Max Receive Bit Rate to be set.
3448 *****************************************************************************/
3449 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3450 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3453 /**************************************************************************//**
3454 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
3456 * @note The property is treated as immutable: it is only valid to call
3457 * the setter once. However, we don't assert if the caller tries to
3458 * overwrite, just ignoring the update instead.
3460 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3461 * @param rate The Max Transmit Bit Rate to be set.
3462 *****************************************************************************/
3463 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3464 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3467 /**************************************************************************//**
3468 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3471 * @note The property is treated as immutable: it is only valid to call
3472 * the setter once. However, we don't assert if the caller tries to
3473 * overwrite, just ignoring the update instead.
3475 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3476 * @param num The Number of GTP Echo Failures to be set.
3477 *****************************************************************************/
3478 void evel_mobile_gtp_metrics_num_echo_fail_set(
3479 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3482 /**************************************************************************//**
3483 * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow
3486 * @note The property is treated as immutable: it is only valid to call
3487 * the setter once. However, we don't assert if the caller tries to
3488 * overwrite, just ignoring the update instead.
3490 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3491 * @param num The Number of GTP Tunnel Errors to be set.
3492 *****************************************************************************/
3493 void evel_mobile_gtp_metrics_num_tun_fail_set(
3494 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3497 /**************************************************************************//**
3498 * Set the Number of HTTP Errors property of the Mobile GTP Per Flow Metrics.
3500 * @note The property is treated as immutable: it is only valid to call
3501 * the setter once. However, we don't assert if the caller tries to
3502 * overwrite, just ignoring the update instead.
3504 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3505 * @param num The Number of HTTP Errors to be set.
3506 *****************************************************************************/
3507 void evel_mobile_gtp_metrics_num_http_errors_set(
3508 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3511 /**************************************************************************//**
3512 * Add a TCP flag count to the metrics.
3514 * @note The property is treated as immutable: it is only valid to call
3515 * the setter once. However, we don't assert if the caller tries to
3516 * overwrite, just ignoring the update instead.
3518 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3519 * @param tcp_flag The TCP flag count to be updated.
3520 * @param count The associated flag count.
3521 *****************************************************************************/
3522 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3523 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3524 const EVEL_TCP_FLAGS tcp_flag,
3527 /**************************************************************************//**
3528 * Add a QCI COS count to the metrics.
3530 * @note The property is treated as immutable: it is only valid to call
3531 * the setter once. However, we don't assert if the caller tries to
3532 * overwrite, just ignoring the update instead.
3534 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3535 * @param qci_cos The QCI COS count to be updated.
3536 * @param count The associated QCI COS count.
3537 *****************************************************************************/
3538 void evel_mobile_gtp_metrics_qci_cos_count_add(
3539 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3540 const EVEL_QCI_COS_TYPES qci_cos,
3543 /*****************************************************************************/
3544 /*****************************************************************************/
3548 /*****************************************************************************/
3549 /*****************************************************************************/
3551 /**************************************************************************//**
3552 * Create a new Signaling event.
3554 * @note The mandatory fields on the Signaling must be supplied to
3555 * this factory function and are immutable once set. Optional fields
3556 * have explicit setter functions, but again values may only be set
3557 * once so that the event has immutable properties.
3558 * @param event_name Unique Event Name
3559 * @param event_id A universal identifier of the event for analysis etc
3560 * @param vendor_name The vendor id to encode in the event vnf field.
3561 * @param module The module to encode in the event.
3562 * @param vnfname The Virtual network function to encode in the event.
3563 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3564 * is not used (i.e. posted) it must be released using
3565 * ::evel_free_signaling.
3566 * @retval NULL Failed to create the event.
3567 *****************************************************************************/
3568 EVENT_SIGNALING * evel_new_signaling(const char* ev_name, const char *ev_id,
3569 const char * const vendor_name,
3570 const char * const correlator,
3571 const char * const local_ip_address,
3572 const char * const local_port,
3573 const char * const remote_ip_address,
3574 const char * const remote_port);
3576 /**************************************************************************//**
3577 * Free a Signaling event.
3579 * Free off the event supplied. Will free all the contained allocated memory.
3581 * @note It does not free the event itself, since that may be part of a larger
3583 *****************************************************************************/
3584 void evel_free_signaling(EVENT_SIGNALING * const event);
3586 /**************************************************************************//**
3587 * Set the Event Type property of the Signaling event.
3589 * @note The property is treated as immutable: it is only valid to call
3590 * the setter once. However, we don't assert if the caller tries to
3591 * overwrite, just ignoring the update instead.
3593 * @param event Pointer to the Signaling event.
3594 * @param type The Event Type to be set. ASCIIZ string. The caller
3595 * does not need to preserve the value once the function
3597 *****************************************************************************/
3598 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3599 const char * const type);
3601 /**************************************************************************//**
3602 * Add an additional value name/value pair to the SIP signaling.
3604 * The name and value are null delimited ASCII strings. The library takes
3605 * a copy so the caller does not have to preserve values after the function
3608 * @param event Pointer to the fault.
3609 * @param name ASCIIZ string with the attribute's name. The caller
3610 * does not need to preserve the value once the function
3612 * @param value ASCIIZ string with the attribute's value. The caller
3613 * does not need to preserve the value once the function
3615 *****************************************************************************/
3616 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3618 /**************************************************************************//**
3619 * Set the Correlator property of the Signaling event.
3621 * @note The property is treated as immutable: it is only valid to call
3622 * the setter once. However, we don't assert if the caller tries to
3623 * overwrite, just ignoring the update instead.
3625 * @param event Pointer to the Signaling event.
3626 * @param correlator The correlator to be set. ASCIIZ string. The caller
3627 * does not need to preserve the value once the function
3629 *****************************************************************************/
3630 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3631 const char * const correlator);
3633 /**************************************************************************//**
3634 * Set the Local Ip Address property of the Signaling event.
3636 * @note The property is treated as immutable: it is only valid to call
3637 * the setter once. However, we don't assert if the caller tries to
3638 * overwrite, just ignoring the update instead.
3640 * @param event Pointer to the Signaling event.
3641 * @param local_ip_address
3642 * The Local Ip Address to be set. ASCIIZ string. The
3643 * caller does not need to preserve the value once the
3645 *****************************************************************************/
3646 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3647 const char * const local_ip_address);
3649 /**************************************************************************//**
3650 * Set the Local Port property of the Signaling event.
3652 * @note The property is treated as immutable: it is only valid to call
3653 * the setter once. However, we don't assert if the caller tries to
3654 * overwrite, just ignoring the update instead.
3656 * @param event Pointer to the Signaling event.
3657 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3658 * does not need to preserve the value once the function
3660 *****************************************************************************/
3661 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3662 const char * const local_port);
3664 /**************************************************************************//**
3665 * Set the Remote Ip Address property of the Signaling event.
3667 * @note The property is treated as immutable: it is only valid to call
3668 * the setter once. However, we don't assert if the caller tries to
3669 * overwrite, just ignoring the update instead.
3671 * @param event Pointer to the Signaling event.
3672 * @param remote_ip_address
3673 * The Remote Ip Address to be set. ASCIIZ string. The
3674 * caller does not need to preserve the value once the
3676 *****************************************************************************/
3677 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3678 const char * const remote_ip_address);
3680 /**************************************************************************//**
3681 * Set the Remote Port property of the Signaling event.
3683 * @note The property is treated as immutable: it is only valid to call
3684 * the setter once. However, we don't assert if the caller tries to
3685 * overwrite, just ignoring the update instead.
3687 * @param event Pointer to the Signaling event.
3688 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3689 * does not need to preserve the value once the function
3691 *****************************************************************************/
3692 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3693 const char * const remote_port);
3694 /**************************************************************************//**
3695 * Set the Vendor module property of the Signaling event.
3697 * @note The property is treated as immutable: it is only valid to call
3698 * the setter once. However, we don't assert if the caller tries to
3699 * overwrite, just ignoring the update instead.
3701 * @param event Pointer to the Signaling event.
3702 * @param modulename The module name to be set. ASCIIZ string. The caller
3703 * does not need to preserve the value once the function
3705 *****************************************************************************/
3706 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3707 const char * const module_name);
3708 /**************************************************************************//**
3709 * Set the Vendor module property of the Signaling event.
3711 * @note The property is treated as immutable: it is only valid to call
3712 * the setter once. However, we don't assert if the caller tries to
3713 * overwrite, just ignoring the update instead.
3715 * @param event Pointer to the Signaling event.
3716 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3717 * The caller does not need to preserve the value once
3718 * the function returns.
3719 *****************************************************************************/
3720 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3721 const char * const vnfname);
3723 /**************************************************************************//**
3724 * Set the Compressed SIP property of the Signaling event.
3726 * @note The property is treated as immutable: it is only valid to call
3727 * the setter once. However, we don't assert if the caller tries to
3728 * overwrite, just ignoring the update instead.
3730 * @param event Pointer to the Signaling event.
3731 * @param compressed_sip
3732 * The Compressed SIP to be set. ASCIIZ string. The caller
3733 * does not need to preserve the value once the function
3735 *****************************************************************************/
3736 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3737 const char * const compressed_sip);
3739 /**************************************************************************//**
3740 * Set the Summary SIP property of the Signaling event.
3742 * @note The property is treated as immutable: it is only valid to call
3743 * the setter once. However, we don't assert if the caller tries to
3744 * overwrite, just ignoring the update instead.
3746 * @param event Pointer to the Signaling event.
3747 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3748 * does not need to preserve the value once the function
3750 *****************************************************************************/
3751 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3752 const char * const summary_sip);
3755 /*****************************************************************************/
3756 /*****************************************************************************/
3760 /*****************************************************************************/
3761 /*****************************************************************************/
3763 /**************************************************************************//**
3764 * Create a new State Change event.
3766 * @note The mandatory fields on the Syslog must be supplied to this factory
3767 * function and are immutable once set. Optional fields have explicit
3768 * setter functions, but again values may only be set once so that the
3769 * Syslog has immutable properties.
3771 * @param event_name Unique Event Name
3772 * @param event_id A universal identifier of the event for analysis etc
3773 * @param new_state The new state of the reporting entity.
3774 * @param old_state The old state of the reporting entity.
3775 * @param interface The card or port name of the reporting entity.
3777 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3778 * event is not used it must be released using
3779 * ::evel_free_state_change
3780 * @retval NULL Failed to create the event.
3781 *****************************************************************************/
3782 EVENT_STATE_CHANGE * evel_new_state_change(const char* ev_name, const char *ev_id,
3783 const EVEL_ENTITY_STATE new_state,
3784 const EVEL_ENTITY_STATE old_state,
3785 const char * const interface);
3787 /**************************************************************************//**
3788 * Free a State Change.
3790 * Free off the State Change supplied. Will free all the contained allocated
3793 * @note It does not free the State Change itself, since that may be part of a
3795 *****************************************************************************/
3796 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3798 /**************************************************************************//**
3799 * Set the Event Type property of the State Change.
3801 * @note The property is treated as immutable: it is only valid to call
3802 * the setter once. However, we don't assert if the caller tries to
3803 * overwrite, just ignoring the update instead.
3805 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3806 * @param type The Event Type to be set. ASCIIZ string. The caller
3807 * does not need to preserve the value once the function
3809 *****************************************************************************/
3810 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3811 const char * const type);
3813 /**************************************************************************//**
3814 * Add an additional field name/value pair to the State Change.
3816 * The name and value are null delimited ASCII strings. The library takes
3817 * a copy so the caller does not have to preserve values after the function
3820 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3821 * @param name ASCIIZ string with the attribute's name. The caller
3822 * does not need to preserve the value once the function
3824 * @param value ASCIIZ string with the attribute's value. The caller
3825 * does not need to preserve the value once the function
3827 *****************************************************************************/
3828 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3829 const char * const name,
3830 const char * const value);
3832 /*****************************************************************************/
3833 /*****************************************************************************/
3837 /*****************************************************************************/
3838 /*****************************************************************************/
3840 /**************************************************************************//**
3841 * Create a new syslog event.
3843 * @note The mandatory fields on the Syslog must be supplied to this factory
3844 * function and are immutable once set. Optional fields have explicit
3845 * setter functions, but again values may only be set once so that the
3846 * Syslog has immutable properties.
3848 * @param event_name Unique Event Name
3849 * @param event_id A universal identifier of the event for analysis etc
3850 * @param event_source_type
3855 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3856 * not used it must be released using ::evel_free_syslog
3857 * @retval NULL Failed to create the event.
3858 *****************************************************************************/
3859 EVENT_SYSLOG * evel_new_syslog(const char* ev_name, const char *ev_id,
3860 EVEL_SOURCE_TYPES event_source_type,
3861 const char * const syslog_msg,
3862 const char * const syslog_tag);
3864 /**************************************************************************//**
3865 * Set the Event Type property of the Syslog.
3867 * @note The property is treated as immutable: it is only valid to call
3868 * the setter once. However, we don't assert if the caller tries to
3869 * overwrite, just ignoring the update instead.
3871 * @param syslog Pointer to the syslog.
3872 * @param type The Event Type to be set. ASCIIZ string. The caller
3873 * does not need to preserve the value once the function
3875 *****************************************************************************/
3876 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3877 const char * const type);
3879 /**************************************************************************//**
3882 * Free off the Syslog supplied. Will free all the contained allocated memory.
3884 * @note It does not free the Syslog itself, since that may be part of a
3886 *****************************************************************************/
3887 void evel_free_syslog(EVENT_SYSLOG * event);
3889 /**************************************************************************//**
3890 * Add an additional field name/value pair to the Syslog.
3892 * The name and value are null delimited ASCII strings. The library takes
3893 * a copy so the caller does not have to preserve values after the function
3896 * @param syslog Pointer to the syslog.
3897 * @param name ASCIIZ string with the attribute's name. The caller
3898 * does not need to preserve the value once the function
3900 * @param value ASCIIZ string with the attribute's value. The caller
3901 * does not need to preserve the value once the function
3903 *****************************************************************************/
3904 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3908 /**************************************************************************//**
3909 * Set the Event Source Host property of the Syslog.
3911 * @note The property is treated as immutable: it is only valid to call
3912 * the setter once. However, we don't assert if the caller tries to
3913 * overwrite, just ignoring the update instead.
3915 * @param syslog Pointer to the Syslog.
3916 * @param host The Event Source Host to be set. ASCIIZ string. The
3917 * caller does not need to preserve the value once the
3919 *****************************************************************************/
3920 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3921 const char * const host);
3923 /**************************************************************************//**
3924 * Set the Syslog Facility property of the Syslog.
3926 * @note The property is treated as immutable: it is only valid to call
3927 * the setter once. However, we don't assert if the caller tries to
3928 * overwrite, just ignoring the update instead.
3930 * @param syslog Pointer to the Syslog.
3931 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3932 * does not need to preserve the value once the function
3934 *****************************************************************************/
3935 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3936 EVEL_SYSLOG_FACILITIES facility);
3938 /**************************************************************************//**
3939 * Set the Process property of the Syslog.
3941 * @note The property is treated as immutable: it is only valid to call
3942 * the setter once. However, we don't assert if the caller tries to
3943 * overwrite, just ignoring the update instead.
3945 * @param syslog Pointer to the Syslog.
3946 * @param proc The Process to be set. ASCIIZ string. The caller does
3947 * not need to preserve the value once the function returns.
3948 *****************************************************************************/
3949 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3951 /**************************************************************************//**
3952 * Set the Process ID property of the Syslog.
3954 * @note The property is treated as immutable: it is only valid to call
3955 * the setter once. However, we don't assert if the caller tries to
3956 * overwrite, just ignoring the update instead.
3958 * @param syslog Pointer to the Syslog.
3959 * @param proc_id The Process ID to be set.
3960 *****************************************************************************/
3961 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
3963 /**************************************************************************//**
3964 * Set the Version property of the Syslog.
3966 * @note The property is treated as immutable: it is only valid to call
3967 * the setter once. However, we don't assert if the caller tries to
3968 * overwrite, just ignoring the update instead.
3970 * @param syslog Pointer to the Syslog.
3971 * @param version The Version to be set.
3972 *****************************************************************************/
3973 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
3975 /**************************************************************************//**
3976 * Set the Structured Data property of the Syslog.
3978 * @note The property is treated as immutable: it is only valid to call
3979 * the setter once. However, we don't assert if the caller tries to
3980 * overwrite, just ignoring the update instead.
3982 * @param syslog Pointer to the Syslog.
3983 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
3984 * does not need to preserve the value once the function
3986 *****************************************************************************/
3987 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
3989 /**************************************************************************//**
3990 * Set the Structured SDID property of the Syslog.
3992 * @note The property is treated as immutable: it is only valid to call
3993 * the setter once. However, we don't assert if the caller tries to
3994 * overwrite, just ignoring the update instead.
3996 * @param syslog Pointer to the Syslog.
3997 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
3998 * Caller does not need to preserve the value once the function
4000 *****************************************************************************/
4001 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
4003 /**************************************************************************//**
4004 * Set the Structured Severity property of the Syslog.
4006 * @note The property is treated as immutable: it is only valid to call
4007 * the setter once. However, we don't assert if the caller tries to
4008 * overwrite, just ignoring the update instead.
4010 * @param syslog Pointer to the Syslog.
4011 * @param sdid The Structured Data to be set. ASCIIZ string.
4012 * Caller does not need to preserve the value once the function
4014 *****************************************************************************/
4015 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
4018 /*****************************************************************************/
4019 /*****************************************************************************/
4023 /*****************************************************************************/
4024 /*****************************************************************************/
4026 /**************************************************************************//**
4027 * Create a new other event.
4029 * @param event_name Unique Event Name
4030 * @param event_id A universal identifier of the event for analysis etc
4032 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
4033 * not used it must be released using ::evel_free_other.
4034 * @retval NULL Failed to create the event.
4035 *****************************************************************************/
4036 EVENT_OTHER * evel_new_other(const char* ev_name, const char *ev_id);
4038 /**************************************************************************//**
4041 * Free off the Other supplied. Will free all the contained allocated memory.
4043 * @note It does not free the Other itself, since that may be part of a
4045 *****************************************************************************/
4046 void evel_free_other(EVENT_OTHER * event);
4048 /**************************************************************************//**
4049 * Set the Event Type property of the Other.
4051 * @note The property is treated as immutable: it is only valid to call
4052 * the setter once. However, we don't assert if the caller tries to
4053 * overwrite, just ignoring the update instead.
4055 * @param other Pointer to the Other.
4056 * @param type The Event Type to be set. ASCIIZ string. The caller
4057 * does not need to preserve the value once the function
4059 *****************************************************************************/
4060 void evel_other_type_set(EVENT_OTHER * other,
4061 const char * const type);
4063 /**************************************************************************//**
4064 * Add a value name/value pair to the Other.
4066 * The name and value are null delimited ASCII strings. The library takes
4067 * a copy so the caller does not have to preserve values after the function
4070 * @param other Pointer to the Other.
4071 * @param name ASCIIZ string with the attribute's name.
4072 * @param value ASCIIZ string with the attribute's value.
4073 *****************************************************************************/
4074 void evel_other_field_add(EVENT_OTHER * other,
4078 /*****************************************************************************/
4079 /*****************************************************************************/
4083 /*****************************************************************************/
4084 /*****************************************************************************/
4086 /**************************************************************************//**
4087 * Return the current measurement interval provided by the Event Listener.
4089 * @returns The current measurement interval
4090 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
4092 *****************************************************************************/
4093 int evel_get_measurement_interval();
4095 /*****************************************************************************/
4096 /* Supported Report version. */
4097 /*****************************************************************************/
4098 #define EVEL_VOICEQ_MAJOR_VERSION 1
4099 #define EVEL_VOICEQ_MINOR_VERSION 0
4101 /**************************************************************************//**
4102 * End of Call Voice Quality Metrices
4103 * JSON equivalent field: endOfCallVqmSummaries
4104 *****************************************************************************/
4105 typedef struct end_of_call_vqm_summaries {
4106 /***************************************************************************/
4107 /* Mandatory fields */
4108 /***************************************************************************/
4109 char* adjacencyName;
4110 char* endpointDescription;
4112 /***************************************************************************/
4113 /* Optional fields */
4114 /***************************************************************************/
4115 EVEL_OPTION_INT endpointJitter;
4116 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
4117 EVEL_OPTION_INT endpointRtpOctetsReceived;
4118 EVEL_OPTION_INT endpointRtpOctetsSent;
4119 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
4120 EVEL_OPTION_INT endpointRtpPacketsReceived;
4121 EVEL_OPTION_INT endpointRtpPacketsSent;
4122 EVEL_OPTION_INT localJitter;
4123 EVEL_OPTION_INT localRtpOctetsDiscarded;
4124 EVEL_OPTION_INT localRtpOctetsReceived;
4125 EVEL_OPTION_INT localRtpOctetsSent;
4126 EVEL_OPTION_INT localRtpPacketsDiscarded;
4127 EVEL_OPTION_INT localRtpPacketsReceived;
4128 EVEL_OPTION_INT localRtpPacketsSent;
4129 EVEL_OPTION_INT mosCqe;
4130 EVEL_OPTION_INT packetsLost;
4131 EVEL_OPTION_INT packetLossPercent;
4132 EVEL_OPTION_INT rFactor;
4133 EVEL_OPTION_INT roundTripDelay;
4135 } END_OF_CALL_VOICE_QUALITY_METRICS;
4137 /**************************************************************************//**
4139 * JSON equivalent field: voiceQualityFields
4140 *****************************************************************************/
4142 typedef struct event_voiceQuality {
4143 /***************************************************************************/
4144 /* Header and version */
4145 /***************************************************************************/
4146 EVENT_HEADER header;
4150 /***************************************************************************/
4151 /* Mandatory fields */
4152 /***************************************************************************/
4154 char *calleeSideCodec;
4155 char *callerSideCodec;
4158 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
4159 END_OF_CALL_VOICE_QUALITY_METRICS *endOfCallVqmSummaries;
4161 /***************************************************************************/
4162 /* Optional fields */
4163 /***************************************************************************/
4164 EVEL_OPTION_STRING phoneNumber;
4165 DLIST additionalInformation;
4167 } EVENT_VOICE_QUALITY;
4168 /**************************************************************************//**
4169 * Voice Quality Additional Info.
4170 * JSON equivalent field: additionalInformation
4171 *****************************************************************************/
4172 typedef struct voice_quality_additional_info {
4175 } VOICE_QUALITY_ADDL_INFO;
4177 /**************************************************************************//**
4178 * Create a new voice quality event.
4180 * @note The mandatory fields on the Voice Quality must be supplied to this
4181 * factory function and are immutable once set. Optional fields have
4182 * explicit setter functions, but again values may only be set once
4183 * so that the Voice Quality has immutable properties.
4184 * @param event_name Unique Event Name
4185 * @param event_id A universal identifier of the event for analysis etc
4186 * @param calleeSideCodec Callee codec for the call.
4187 * @param callerSideCodec Caller codec for the call.
4188 * @param correlator Constant across all events on this call.
4189 * @param midCallRtcp Base64 encoding of the binary RTCP data
4190 * (excluding Eth/IP/UDP headers).
4191 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
4192 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
4193 * event is not used (i.e. posted) it must be released using
4194 ::evel_free_voice_quality.
4195 * @retval NULL Failed to create the event.
4196 *****************************************************************************/
4197 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char* ev_name, const char *ev_id,
4198 const char * const calleeSideCodec,
4199 const char * const callerSideCodec, const char * const correlator,
4200 const char * const midCallRtcp, const char * const vendorVnfNameFields);
4202 /**************************************************************************//**
4203 * Set the Callee side codec for Call for domain Voice Quality
4205 * @note The property is treated as immutable: it is only valid to call
4206 * the setter once. However, we don't assert if the caller tries to
4207 * overwrite, just ignoring the update instead.
4209 * @param voiceQuality Pointer to the Voice Quality Event.
4210 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
4211 * string. The caller does not need to
4212 * preserve the value once the function
4214 *****************************************************************************/
4215 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4216 const char * const calleeCodecForCall);
4218 /**************************************************************************//**
4219 * Set the Caller side codec for Call for domain Voice Quality
4221 * @note The property is treated as immutable: it is only valid to call
4222 * the setter once. However, we don't assert if the caller tries to
4223 * overwrite, just ignoring the update instead.
4225 * @param voiceQuality Pointer to the Voice Quality Event.
4226 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
4227 * string. The caller does not need to
4228 * preserve the value once the function
4230 *****************************************************************************/
4231 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4232 const char * const callerCodecForCall);
4234 /**************************************************************************//**
4235 * Set the correlator for domain Voice Quality
4237 * @note The property is treated as immutable: it is only valid to call
4238 * the setter once. However, we don't assert if the caller tries to
4239 * overwrite, just ignoring the update instead.
4241 * @param voiceQuality Pointer to the Voice Quality Event.
4242 * @param correlator The correlator value to be set. ASCIIZ
4243 * string. The caller does not need to
4244 * preserve the value once the function
4246 *****************************************************************************/
4247 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4248 const char * const vCorrelator);
4250 /**************************************************************************//**
4251 * Set the RTCP Call Data for domain Voice Quality
4253 * @note The property is treated as immutable: it is only valid to call
4254 * the setter once. However, we don't assert if the caller tries to
4255 * overwrite, just ignoring the update instead.
4257 * @param voiceQuality Pointer to the Voice Quality Event.
4258 * @param rtcpCallData The RTCP Call Data to be set. ASCIIZ
4259 * string. The caller does not need to
4260 * preserve the value once the function
4262 *****************************************************************************/
4263 void evel_voice_quality_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4264 const char * const rtcpCallData);
4266 /**************************************************************************//**
4267 * Set the Vendor VNF Name fields for domain Voice Quality
4269 * @note The property is treated as immutable: it is only valid to call
4270 * the setter once. However, we don't assert if the caller tries to
4271 * overwrite, just ignoring the update instead.
4273 * @param voiceQuality Pointer to the Voice Quality Event.
4274 * @param nameFields The Vendor, VNF and VfModule names to be set.
4275 * ASCIIZ string. The caller does not need to
4276 * preserve the value once the function
4278 *****************************************************************************/
4279 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4280 const char * const nameFields);
4282 /**************************************************************************//**
4283 * Add an End of Call Voice Quality Metrices
4285 * The adjacencyName and endpointDescription is null delimited ASCII string.
4286 * The library takes a copy so the caller does not have to preserve values
4287 * after the function returns.
4289 * @param voiceQuality Pointer to the measurement.
4290 * @param adjacencyName Adjacency name
4291 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4292 * @param endpointJitter Endpoint jitter
4293 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4294 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4295 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4296 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4297 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4298 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4299 * @param localJitter Local jitter.
4300 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4301 * @param localRtpOctetsReceived Local RTP octets received.
4302 * @param localRtpOctetsSent Local RTP octets sent.
4303 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4304 * @param localRtpPacketsReceived Local RTP packets received.
4305 * @param localRtpPacketsSent Local RTP packets sent.
4306 * @param mosCqe Decimal range from 1 to 5
4308 * @param packetsLost No Packets lost
4309 * @param packetLossPercent Calculated percentage packet loss
4310 * @param rFactor rFactor from 0 to 100
4311 * @param roundTripDelay Round trip delay in milliseconds
4312 *****************************************************************************/
4313 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4314 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4316 int endpointRtpOctetsDiscarded,
4317 int endpointRtpOctetsReceived,
4318 int endpointRtpOctetsSent,
4319 int endpointRtpPacketsDiscarded,
4320 int endpointRtpPacketsReceived,
4321 int endpointRtpPacketsSent,
4323 int localRtpOctetsDiscarded,
4324 int localRtpOctetsReceived,
4325 int localRtpOctetsSent,
4326 int localRtpPacketsDiscarded,
4327 int localRtpPacketsReceived,
4328 int localRtpPacketsSent,
4331 int packetLossPercent,
4333 int roundTripDelay);
4335 /**************************************************************************//**
4336 * Free a Voice Quality.
4338 * Free off the Voce Quality supplied. Will free all the contained allocated
4341 * @note It does not free the Voice Quality itself, since that may be part of a
4343 *****************************************************************************/
4344 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4346 /**************************************************************************//**
4347 * Add an additional value name/value pair to the Voice Quality.
4349 * The name and value are null delimited ASCII strings. The library takes
4350 * a copy so the caller does not have to preserve values after the function
4353 * @param fault Pointer to the fault.
4354 * @param name ASCIIZ string with the attribute's name. The caller
4355 * does not need to preserve the value once the function
4357 * @param value ASCIIZ string with the attribute's value. The caller
4358 * does not need to preserve the value once the function
4360 *****************************************************************************/
4361 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4364 /*****************************************************************************/
4365 /*****************************************************************************/
4367 /* THRESHOLD CROSSING ALERT */
4369 /*****************************************************************************/
4370 /*****************************************************************************/
4372 typedef enum evel_event_action {
4373 EVEL_EVENT_ACTION_CLEAR,
4374 EVEL_EVENT_ACTION_CONTINUE,
4375 EVEL_EVENT_ACTION_SET,
4376 EVEL_MAX_EVENT_ACTION
4379 typedef enum evel_alert_type {
4381 EVEL_ELEMENT_ANOMALY,
4382 EVEL_INTERFACE_ANOMALY,
4383 EVEL_SERVICE_ANOMALY,
4388 typedef struct perf_counter {
4391 char * thresholdCrossed;
4396 /*****************************************************************************/
4397 /* Supported Threshold Crossing version. */
4398 /*****************************************************************************/
4399 #define EVEL_THRESHOLD_CROSS_MAJOR_VERSION 2
4400 #define EVEL_THRESHOLD_CROSS_MINOR_VERSION 0
4402 /**************************************************************************//**
4403 * Threshold Crossing.
4404 * JSON equivalent field: Threshold Cross Fields
4405 *****************************************************************************/
4406 typedef struct event_threshold_cross {
4407 /***************************************************************************/
4408 /* Header and version */
4409 /***************************************************************************/
4410 EVENT_HEADER header;
4414 /***************************************************************************/
4415 /* Mandatory fields */
4416 /***************************************************************************/
4417 PERF_COUNTER additionalParameters;
4418 EVEL_EVENT_ACTION alertAction;
4419 char * alertDescription;
4420 EVEL_ALERT_TYPE alertType;
4421 unsigned long long collectionTimestamp;
4422 EVEL_SEVERITIES eventSeverity;
4423 unsigned long long eventStartTimestamp;
4425 /***************************************************************************/
4426 /* Optional fields */
4427 /***************************************************************************/
4428 DLIST additional_info;
4429 EVEL_OPTION_STRING alertValue;
4431 EVEL_OPTION_STRING dataCollector;
4432 EVEL_OPTION_STRING elementType;
4433 EVEL_OPTION_STRING interfaceName;
4434 EVEL_OPTION_STRING networkService;
4435 EVEL_OPTION_STRING possibleRootCause;
4437 } EVENT_THRESHOLD_CROSS;
4440 /**************************************************************************//**
4441 * Create a new Threshold Crossing Alert event.
4443 * @note The mandatory fields on the TCA must be supplied to this factory
4444 * function and are immutable once set. Optional fields have explicit
4445 * setter functions, but again values may only be set once so that the
4446 * TCA has immutable properties.
4448 * @param event_name Unique Event Name
4449 * @param event_id A universal identifier of the event for analysis etc
4450 * @param char* tcriticality Performance Counter Criticality MAJ MIN,
4451 * @param char* tname Performance Counter Threshold name
4452 * @param char* tthresholdCrossed Counter Threshold crossed value
4453 * @param char* tvalue Counter actual value
4454 * @param EVEL_EVENT_ACTION talertAction Alert set continue or clear
4455 * @param char* talertDescription
4456 * @param EVEL_ALERT_TYPE talertType Kind of anamoly
4457 * @param unsigned long long tcollectionTimestamp time at which alert was collected
4458 * @param EVEL_SEVERITIES teventSeverity Severity of Alert
4459 * @param unsigned long long teventStartTimestamp Time when this alert started
4461 * @returns pointer to the newly manufactured ::EVENT_THRESHOLD_CROSS. If the
4462 * event is not used it must be released using
4463 * ::evel_free_threshold_cross
4464 * @retval NULL Failed to create the event.
4465 *****************************************************************************/
4466 EVENT_THRESHOLD_CROSS * evel_new_threshold_cross(
4467 const char* ev_name, const char *ev_id,
4468 char * tcriticality,
4470 char * tthresholdCrossed,
4472 EVEL_EVENT_ACTION talertAction,
4473 char * talertDescription,
4474 EVEL_ALERT_TYPE talertType,
4475 unsigned long long tcollectionTimestamp,
4476 EVEL_SEVERITIES teventSeverity,
4477 unsigned long long teventStartTimestamp);
4479 /**************************************************************************//**
4480 * Free a Threshold cross event.
4482 * Free off the Threshold crossing event supplied. Will free all the contained allocated
4485 * @note It does not free the Threshold Cross itself, since that may be part of a
4487 *****************************************************************************/
4488 void evel_free_threshold_cross(EVENT_THRESHOLD_CROSS * const tcp);
4490 /**************************************************************************//**
4491 * Set the Event Type property of the Threshold Cross.
4493 * @note The property is treated as immutable: it is only valid to call
4494 * the setter once. However, we don't assert if the caller tries to
4495 * overwrite, just ignoring the update instead.
4497 * @param tcp Pointer to the ::EVENT_THRESHOLD_CROSS.
4498 * @param type The Event Type to be set. ASCIIZ string. The caller
4499 * does not need to preserve the value once the function
4501 *****************************************************************************/
4502 void evel_threshold_cross_type_set(EVENT_THRESHOLD_CROSS * const tcp, char * type);
4504 /**************************************************************************//**
4505 * Add an optional additional alertid value to Alert.
4507 * @param alertid Adds Alert ID
4508 *****************************************************************************/
4509 void evel_threshold_cross_alertid_add(EVENT_THRESHOLD_CROSS * const event,char * alertid);
4511 /**************************************************************************//**
4512 * Set the TCA probable Root cause.
4514 * @param sheader Possible root cause to Threshold
4515 *****************************************************************************/
4516 void evel_threshold_cross_possible_rootcause_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4517 /**************************************************************************//**
4518 * Set the TCA networking cause.
4520 * @param sheader Possible networking service value to Threshold
4521 *****************************************************************************/
4522 void evel_threshold_cross_networkservice_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4523 /**************************************************************************//**
4524 * Set the TCA Interface name.
4526 * @param sheader Interface name to threshold
4527 *****************************************************************************/
4528 void evel_threshold_cross_interfacename_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4529 /**************************************************************************//**
4530 * Set the TCA Data element type.
4532 * @param sheader element type of Threshold
4533 *****************************************************************************/
4534 void evel_threshold_cross_data_elementtype_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4535 /**************************************************************************//**
4536 * Set the TCA Data collector value.
4538 * @param sheader Data collector value
4539 *****************************************************************************/
4540 void evel_threshold_cross_data_collector_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4541 /**************************************************************************//**
4542 * Set the TCA alert value.
4544 * @param sheader Possible alert value
4545 *****************************************************************************/
4546 void evel_threshold_cross_alertvalue_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4548 /**************************************************************************//**
4549 * Add an additional field name/value pair to the THRESHOLD CROSS event.
4551 * The name and value are null delimited ASCII strings. The library takes
4552 * a copy so the caller does not have to preserve values after the function
4555 * @param state_change Pointer to the ::EVENT_THRESHOLD_CROSS.
4556 * @param name ASCIIZ string with the attribute's name. The caller
4557 * does not need to preserve the value once the function
4559 * @param value ASCIIZ string with the attribute's value. The caller
4560 * does not need to preserve the value once the function
4562 *****************************************************************************/
4563 void evel_threshold_cross_addl_info_add(EVENT_THRESHOLD_CROSS * const tcp,
4564 const char * const name,
4565 const char * const value);
4567 /*****************************************************************************/
4568 /*****************************************************************************/
4572 /*****************************************************************************/
4573 /*****************************************************************************/
4575 /*****************************************************************************/
4577 /*****************************************************************************/
4578 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4579 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4580 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4581 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4583 #define EVEL_ENTER() \
4585 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4586 debug_indent += 2; \
4588 #define EVEL_EXIT() \
4590 debug_indent -= 2; \
4591 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4594 #define INDENT_SEPARATORS \
4595 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4597 extern EVEL_LOG_LEVELS debug_level;
4598 extern int debug_indent;
4601 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4603 /**************************************************************************//**
4604 * Initialize logging
4606 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4607 * @param[in] ident The identifier for our logs.
4608 *****************************************************************************/
4609 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4611 /**************************************************************************//**
4612 * Log debug information
4614 * Logs debugging information in a platform independent manner.
4616 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4617 * @param[in] format Log formatting string in printf format.
4618 * @param[in] ... Variable argument list.
4619 *****************************************************************************/
4620 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4622 /***************************************************************************//*
4623 * Store the formatted string into the static error string and log the error.
4625 * @param format Error string in standard printf format.
4626 * @param ... Variable parameters to be substituted into the format string.
4627 *****************************************************************************/
4628 void log_error_state(char * format, ...);