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);
1625 /**************************************************************************//**
1626 * Create a new Heartbeat fields event.
1628 * @note The mandatory fields on the Heartbeat fields must be supplied to
1629 * this factory function and are immutable once set. Optional fields
1630 * have explicit setter functions, but again values may only be set
1631 * once so that the event has immutable properties.
1632 * @param ev_name Unique Event Name confirming Domain AsdcModel Description
1633 * @param ev_id A universal identifier of the event for: troubleshooting correlation, analysis, etc
1634 * @param interval heartbeat interval
1635 * @returns pointer to the newly manufactured ::EVENT_HEARTBEAT_FIELD. If the event
1636 * is not used (i.e. posted) it must be released using
1637 * ::evel_free_hrtbt_field.
1638 * @retval NULL Failed to create the event.
1639 *****************************************************************************/
1640 EVENT_HEARTBEAT_FIELD * evel_new_heartbeat_field(int interval,const char* ev_name, const char *ev_id);
1642 /**************************************************************************//**
1643 * Free an event header.
1645 * Free off the event header supplied. Will free all the contained allocated
1648 * @note It does not free the header itself, since that may be part of a
1650 *****************************************************************************/
1651 void evel_free_header(EVENT_HEADER * const event);
1653 /**************************************************************************//**
1654 * Initialize a newly created event header.
1656 * @param header Pointer to the header being initialized.
1657 *****************************************************************************/
1658 void evel_init_header(EVENT_HEADER * const header,const char *const eventname);
1660 /**************************************************************************//**
1661 * Set the Event Type property of the event header.
1663 * @param header Pointer to the ::EVENT_HEADER.
1664 * @param type The Event Type to be set. ASCIIZ string. The caller
1665 * does not need to preserve the value once the function
1667 *****************************************************************************/
1668 void evel_header_type_set(EVENT_HEADER * const header,
1669 const char * const type);
1671 /**************************************************************************//**
1672 * Set the next event_sequence to use.
1674 * @param sequence The next sequence number to use.
1675 *****************************************************************************/
1676 void evel_set_global_event_sequence(const int sequence);
1678 /**************************************************************************//**
1679 * Set the Event Sequence property of the event header.
1681 * @note This is mainly for tracking fault event sequence numbers
1683 * @param header Pointer to the ::EVENT_HEADER.
1684 * @param sequence_number
1686 *****************************************************************************/
1687 void evel_event_sequence_set(EVENT_HEADER * const header,const int sequence_number);
1689 /**************************************************************************//**
1690 * Set the Start Epoch property of the event header.
1692 * @note The Start Epoch defaults to the time of event creation.
1694 * @param header Pointer to the ::EVENT_HEADER.
1695 * @param start_epoch_microsec
1696 * The start epoch to set, in microseconds.
1697 *****************************************************************************/
1698 void evel_start_epoch_set(EVENT_HEADER * const header,
1699 const unsigned long long start_epoch_microsec);
1701 /**************************************************************************//**
1702 * Set the Last Epoch property of the event header.
1704 * @note The Last Epoch defaults to the time of event creation.
1706 * @param header Pointer to the ::EVENT_HEADER.
1707 * @param last_epoch_microsec
1708 * The last epoch to set, in microseconds.
1709 *****************************************************************************/
1710 void evel_last_epoch_set(EVENT_HEADER * const header,
1711 const unsigned long long last_epoch_microsec);
1713 /**************************************************************************//**
1714 * Set the Reporting Entity Name property of the event header.
1716 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1718 * @param header Pointer to the ::EVENT_HEADER.
1719 * @param entity_name The entity name to set.
1720 *****************************************************************************/
1721 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1722 const char * const entity_name);
1724 /**************************************************************************//**
1725 * Set the Source Name property of the event header.
1727 * @note The Source Name defaults to the OpenStack VM Name.
1729 * @param header Pointer to the ::EVENT_HEADER.
1730 * @param entity_name The source name to set.
1731 *****************************************************************************/
1732 void evel_source_name_set(EVENT_HEADER * const header,
1733 const char * const source_name);
1735 /**************************************************************************//**
1736 * Set the Reporting Entity Id property of the event header.
1738 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1740 * @param header Pointer to the ::EVENT_HEADER.
1741 * @param entity_id The entity id to set.
1742 *****************************************************************************/
1743 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1744 const char * const entity_id);
1746 /**************************************************************************//**
1747 * Set the Source Id property of the event header.
1749 * @note The Source Id defaults to the OpenStack VM UUID.
1751 * @param header Pointer to the ::EVENT_HEADER.
1752 * @param entity_id The Source id to set.
1753 *****************************************************************************/
1754 void evel_source_id_set(EVENT_HEADER * const header,
1755 const char * const source_id);
1757 /**************************************************************************//**
1758 * Set the NFC Naming code property of the event header.
1760 * @param header Pointer to the ::EVENT_HEADER.
1761 * @param nfcnamingcode String
1762 *****************************************************************************/
1763 void evel_nfcnamingcode_set(EVENT_HEADER * const header,
1764 const char * const nfcnam);
1765 /**************************************************************************//**
1766 * Set the NF Naming code property of the event header.
1768 * @param header Pointer to the ::EVENT_HEADER.
1769 * @param nfnamingcode String
1770 *****************************************************************************/
1771 void evel_nfnamingcode_set(EVENT_HEADER * const header,
1772 const char * const nfnam);
1774 /*****************************************************************************/
1775 /*****************************************************************************/
1779 /*****************************************************************************/
1780 /*****************************************************************************/
1782 /**************************************************************************//**
1783 * Create a new fault event.
1785 * @note The mandatory fields on the Fault must be supplied to this factory
1786 * function and are immutable once set. Optional fields have explicit
1787 * setter functions, but again values may only be set once so that the
1788 * Fault has immutable properties.
1789 * @param event_name Unique Event Name
1790 * @param event_id A universal identifier of the event for analysis etc
1791 * @param condition The condition indicated by the Fault.
1792 * @param specific_problem The specific problem triggering the fault.
1793 * @param priority The priority of the event.
1794 * @param severity The severity of the Fault.
1795 * @param ev_source_type Source of Alarm event
1796 * @param version fault version
1797 * @param status status of Virtual Function
1798 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1799 * not used (i.e. posted) it must be released using ::evel_free_fault.
1800 * @retval NULL Failed to create the event.
1801 *****************************************************************************/
1802 EVENT_FAULT * evel_new_fault(const char* ev_name, const char *ev_id,
1803 const char * const condition,
1804 const char * const specific_problem,
1805 EVEL_EVENT_PRIORITIES priority,
1806 EVEL_SEVERITIES severity,
1807 EVEL_SOURCE_TYPES ev_source_type,
1808 EVEL_VF_STATUSES status);
1810 /**************************************************************************//**
1813 * Free off the Fault supplied. Will free all the contained allocated memory.
1815 * @note It does not free the Fault itself, since that may be part of a
1817 *****************************************************************************/
1818 void evel_free_fault(EVENT_FAULT * event);
1820 /**************************************************************************//**
1821 * Set the Fault Category property of the Fault.
1823 * @note The property is treated as immutable: it is only valid to call
1824 * the setter once. However, we don't assert if the caller tries to
1825 * overwrite, just ignoring the update instead.
1827 * @param fault Pointer to the fault.
1828 * @param category Category : license, link, routing, security, signaling.
1829 * ASCIIZ string. The caller
1830 * does not need to preserve the value once the function
1832 *****************************************************************************/
1833 void evel_fault_category_set(EVENT_FAULT * fault,
1834 const char * const category);
1836 /**************************************************************************//**
1837 * Set the Alarm Interface A property of the Fault.
1839 * @note The property is treated as immutable: it is only valid to call
1840 * the setter once. However, we don't assert if the caller tries to
1841 * overwrite, just ignoring the update instead.
1843 * @param fault Pointer to the fault.
1844 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1845 * does not need to preserve the value once the function
1847 *****************************************************************************/
1848 void evel_fault_interface_set(EVENT_FAULT * fault,
1849 const char * const interface);
1851 /**************************************************************************//**
1852 * Add an additional value name/value pair to the Fault.
1854 * The name and value are null delimited ASCII strings. The library takes
1855 * a copy so the caller does not have to preserve values after the function
1858 * @param fault Pointer to the fault.
1859 * @param name ASCIIZ string with the attribute's name.
1860 * @param value ASCIIZ string with the attribute's value.
1861 *****************************************************************************/
1862 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1864 /**************************************************************************//**
1865 * Set the Event Type property of the Fault.
1867 * @note The property is treated as immutable: it is only valid to call
1868 * the setter once. However, we don't assert if the caller tries to
1869 * overwrite, just ignoring the update instead.
1871 * @param fault Pointer to the fault.
1872 * @param type The Event Type to be set. ASCIIZ string. The caller
1873 * does not need to preserve the value once the function
1875 *****************************************************************************/
1876 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1878 /*****************************************************************************/
1879 /*****************************************************************************/
1883 /*****************************************************************************/
1884 /*****************************************************************************/
1886 /**************************************************************************//**
1887 * Create a new Measurement event.
1889 * @note The mandatory fields on the Measurement must be supplied to this
1890 * factory function and are immutable once set. Optional fields have
1891 * explicit setter functions, but again values may only be set once so
1892 * that the Measurement has immutable properties.
1894 * @param measurement_interval
1895 * @param event_name Unique Event Name
1896 * @param event_id A universal identifier of the event for analysis etc
1898 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1899 * event is not used (i.e. posted) it must be released using
1900 * ::evel_free_event.
1901 * @retval NULL Failed to create the event.
1902 *****************************************************************************/
1903 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval,const char* ev_name, const char *ev_id);
1905 /**************************************************************************//**
1906 * Free a Measurement.
1908 * Free off the Measurement supplied. Will free all the contained allocated
1911 * @note It does not free the Measurement itself, since that may be part of a
1913 *****************************************************************************/
1914 void evel_free_measurement(EVENT_MEASUREMENT * event);
1916 /**************************************************************************//**
1917 * Set the Event Type property of the Measurement.
1919 * @note The property is treated as immutable: it is only valid to call
1920 * the setter once. However, we don't assert if the caller tries to
1921 * overwrite, just ignoring the update instead.
1923 * @param measurement Pointer to the Measurement.
1924 * @param type The Event Type to be set. ASCIIZ string. The caller
1925 * does not need to preserve the value once the function
1927 *****************************************************************************/
1928 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1929 const char * const type);
1931 /**************************************************************************//**
1932 * Set the Concurrent Sessions property of the Measurement.
1934 * @note The property is treated as immutable: it is only valid to call
1935 * the setter once. However, we don't assert if the caller tries to
1936 * overwrite, just ignoring the update instead.
1938 * @param measurement Pointer to the Measurement.
1939 * @param concurrent_sessions The Concurrent Sessions to be set.
1940 *****************************************************************************/
1941 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1942 int concurrent_sessions);
1944 /**************************************************************************//**
1945 * Set the Configured Entities property of the Measurement.
1947 * @note The property is treated as immutable: it is only valid to call
1948 * the setter once. However, we don't assert if the caller tries to
1949 * overwrite, just ignoring the update instead.
1951 * @param measurement Pointer to the Measurement.
1952 * @param configured_entities The Configured Entities to be set.
1953 *****************************************************************************/
1954 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1955 int configured_entities);
1957 /**************************************************************************//**
1958 * Add an additional set of Errors to the Measurement.
1960 * @note The property is treated as immutable: it is only valid to call
1961 * the setter once. However, we don't assert if the caller tries to
1962 * overwrite, just ignoring the update instead.
1964 * @param measurement Pointer to the measurement.
1965 * @param receive_discards The number of receive discards.
1966 * @param receive_errors The number of receive errors.
1967 * @param transmit_discards The number of transmit discards.
1968 * @param transmit_errors The number of transmit errors.
1969 *****************************************************************************/
1970 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1971 int receive_discards,
1973 int transmit_discards,
1974 int transmit_errors);
1976 /**************************************************************************//**
1977 * Set the Mean Request Latency property of the Measurement.
1979 * @note The property is treated as immutable: it is only valid to call
1980 * the setter once. However, we don't assert if the caller tries to
1981 * overwrite, just ignoring the update instead.
1983 * @param measurement Pointer to the Measurement.
1984 * @param mean_request_latency The Mean Request Latency to be set.
1985 *****************************************************************************/
1986 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1987 double mean_request_latency);
1989 /**************************************************************************//**
1990 * Set the Request Rate property of the Measurement.
1992 * @note The property is treated as immutable: it is only valid to call
1993 * the setter once. However, we don't assert if the caller tries to
1994 * overwrite, just ignoring the update instead.
1996 * @param measurement Pointer to the Measurement.
1997 * @param request_rate The Request Rate to be set.
1998 *****************************************************************************/
1999 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
2002 /**************************************************************************//**
2003 * Add an additional CPU usage value name/value pair to the Measurement.
2005 * The name and value are null delimited ASCII strings. The library takes
2006 * a copy so the caller does not have to preserve values after the function
2009 * @param measurement Pointer to the measurement.
2010 * @param id ASCIIZ string with the CPU's identifier.
2011 * @param usage CPU utilization.
2012 *****************************************************************************/
2013 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
2015 /**************************************************************************//**
2016 * Set the CPU Idle value in measurement interval
2017 * percentage of CPU time spent in the idle task
2019 * @note The property is treated as immutable: it is only valid to call
2020 * the setter once. However, we don't assert if the caller tries to
2021 * overwrite, just ignoring the update instead.
2023 * @param cpu_use Pointer to the CPU Use.
2025 *****************************************************************************/
2026 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
2029 /**************************************************************************//**
2030 * Set the percentage of time spent servicing interrupts
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_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
2042 /**************************************************************************//**
2043 * Set the percentage of time spent running user space processes that have been niced
2045 * @note The property is treated as immutable: it is only valid to call
2046 * the setter once. However, we don't assert if the caller tries to
2047 * overwrite, just ignoring the update instead.
2049 * @param cpu_use Pointer to the CPU Use.
2051 *****************************************************************************/
2052 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
2055 /**************************************************************************//**
2056 * Set the percentage of time spent handling soft irq interrupts
2058 * @note The property is treated as immutable: it is only valid to call
2059 * the setter once. However, we don't assert if the caller tries to
2060 * overwrite, just ignoring the update instead.
2062 * @param cpu_use Pointer to the CPU Use.
2064 *****************************************************************************/
2065 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
2067 /**************************************************************************//**
2068 * Set the percentage of time spent in involuntary wait
2070 * @note The property is treated as immutable: it is only valid to call
2071 * the setter once. However, we don't assert if the caller tries to
2072 * overwrite, just ignoring the update instead.
2074 * @param cpu_use Pointer to the CPU Use.
2076 *****************************************************************************/
2077 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
2079 /**************************************************************************//**
2080 * Set the percentage of time spent on system tasks running the kernel
2082 * @note The property is treated as immutable: it is only valid to call
2083 * the setter once. However, we don't assert if the caller tries to
2084 * overwrite, just ignoring the update instead.
2086 * @param cpu_use Pointer to the CPU Use.
2088 *****************************************************************************/
2089 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
2091 /**************************************************************************//**
2092 * Set the percentage of time spent running un-niced user space processes
2094 * @note The property is treated as immutable: it is only valid to call
2095 * the setter once. However, we don't assert if the caller tries to
2096 * overwrite, just ignoring the update instead.
2098 * @param cpu_use Pointer to the CPU Use.
2100 *****************************************************************************/
2101 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
2103 /**************************************************************************//**
2104 * Set the percentage of CPU time spent waiting for I/O operations to complete
2106 * @note The property is treated as immutable: it is only valid to call
2107 * the setter once. However, we don't assert if the caller tries to
2108 * overwrite, just ignoring the update instead.
2110 * @param cpu_use Pointer to the CPU Use.
2112 *****************************************************************************/
2113 void evel_measurement_cpu_use_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
2116 /**************************************************************************//**
2117 * Add an additional File System usage value name/value pair to the
2120 * The filesystem_name is null delimited ASCII string. The library takes a
2121 * copy so the caller does not have to preserve values after the function
2124 * @param measurement Pointer to the measurement.
2125 * @param filesystem_name ASCIIZ string with the file-system's UUID.
2126 * @param block_configured Block storage configured.
2127 * @param block_used Block storage in use.
2128 * @param block_iops Block storage IOPS.
2129 * @param ephemeral_configured Ephemeral storage configured.
2130 * @param ephemeral_used Ephemeral storage in use.
2131 * @param ephemeral_iops Ephemeral storage IOPS.
2132 *****************************************************************************/
2133 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
2134 char * filesystem_name,
2135 double block_configured,
2138 double ephemeral_configured,
2139 double ephemeral_used,
2140 double ephemeral_iops);
2142 /**************************************************************************//**
2143 * Add a Feature usage value name/value pair to the Measurement.
2145 * The name is null delimited ASCII string. The library takes
2146 * a copy so the caller does not have to preserve values after the function
2149 * @param measurement Pointer to the measurement.
2150 * @param feature ASCIIZ string with the feature's name.
2151 * @param utilization Utilization of the feature.
2152 *****************************************************************************/
2153 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
2157 /**************************************************************************//**
2158 * Add a Additional Measurement value name/value pair to the Measurement.
2160 * The name is null delimited ASCII string. The library takes
2161 * a copy so the caller does not have to preserve values after the function
2164 * @param measurement Pointer to the Measurement.
2165 * @param group ASCIIZ string with the measurement group's name.
2166 * @param name ASCIIZ string containing the measurement's name.
2167 * @param name ASCIIZ string containing the measurement's value.
2168 *****************************************************************************/
2169 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
2170 const char * const group,
2171 const char * const name,
2172 const char * const value);
2174 /**************************************************************************//**
2175 * Add a Codec usage value name/value pair to the Measurement.
2177 * The name is null delimited ASCII string. The library takes
2178 * a copy so the caller does not have to preserve values after the function
2181 * @param measurement Pointer to the measurement.
2182 * @param codec ASCIIZ string with the codec's name.
2183 * @param utilization Utilization of the feature.
2184 *****************************************************************************/
2185 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
2189 /**************************************************************************//**
2190 * Set the Media Ports in Use property of the Measurement.
2192 * @note The property is treated as immutable: it is only valid to call
2193 * the setter once. However, we don't assert if the caller tries to
2194 * overwrite, just ignoring the update instead.
2196 * @param measurement Pointer to the measurement.
2197 * @param media_ports_in_use The media port usage to set.
2198 *****************************************************************************/
2199 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
2200 int media_ports_in_use);
2202 /**************************************************************************//**
2203 * Set the VNFC Scaling Metric property of the Measurement.
2205 * @note The property is treated as immutable: it is only valid to call
2206 * the setter once. However, we don't assert if the caller tries to
2207 * overwrite, just ignoring the update instead.
2209 * @param measurement Pointer to the measurement.
2210 * @param scaling_metric The scaling metric to set.
2211 *****************************************************************************/
2212 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
2213 int scaling_metric);
2215 /**************************************************************************//**
2216 * Create a new Latency Bucket to be added to a Measurement event.
2218 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
2219 * supplied to this factory function and are immutable once set.
2220 * Optional fields have explicit setter functions, but again values
2221 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
2222 * immutable properties.
2224 * @param count Count of events in this bucket.
2226 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
2227 * @retval NULL Failed to create the Latency Bucket.
2228 *****************************************************************************/
2229 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
2231 /**************************************************************************//**
2232 * Set the High End property of the Measurement Latency Bucket.
2234 * @note The property is treated as immutable: it is only valid to call
2235 * the setter once. However, we don't assert if the caller tries to
2236 * overwrite, just ignoring the update instead.
2238 * @param bucket Pointer to the Measurement Latency Bucket.
2239 * @param high_end High end of the bucket's range.
2240 *****************************************************************************/
2241 void evel_meas_latency_bucket_high_end_set(
2242 MEASUREMENT_LATENCY_BUCKET * const bucket,
2243 const double high_end);
2245 /**************************************************************************//**
2246 * Set the Low End property of the Measurement Latency Bucket.
2248 * @note The property is treated as immutable: it is only valid to call
2249 * the setter once. However, we don't assert if the caller tries to
2250 * overwrite, just ignoring the update instead.
2252 * @param bucket Pointer to the Measurement Latency Bucket.
2253 * @param low_end Low end of the bucket's range.
2254 *****************************************************************************/
2255 void evel_meas_latency_bucket_low_end_set(
2256 MEASUREMENT_LATENCY_BUCKET * const bucket,
2257 const double low_end);
2259 /**************************************************************************//**
2260 * Add an additional Measurement Latency Bucket to the specified event.
2262 * @param measurement Pointer to the Measurement event.
2263 * @param bucket Pointer to the Measurement Latency Bucket to add.
2264 *****************************************************************************/
2265 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2266 MEASUREMENT_LATENCY_BUCKET * const bucket);
2268 /**************************************************************************//**
2269 * Add an additional Latency Distribution bucket to the Measurement.
2271 * This function implements the previous API, purely for convenience.
2273 * @param measurement Pointer to the measurement.
2274 * @param low_end Low end of the bucket's range.
2275 * @param high_end High end of the bucket's range.
2276 * @param count Count of events in this bucket.
2277 *****************************************************************************/
2278 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2279 const double low_end,
2280 const double high_end,
2283 /**************************************************************************//**
2284 * Create a new vNIC Use to be added to a Measurement event.
2286 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2287 * to this factory function and are immutable once set. Optional
2288 * fields have explicit setter functions, but again values may only be
2289 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2292 * @param vnic_id ASCIIZ string with the vNIC's ID.
2293 * @param val_suspect True or false confidence in data.
2295 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2296 * If the structure is not used it must be released using
2297 * ::evel_measurement_free_vnic_performance.
2298 * @retval NULL Failed to create the vNIC Use.
2299 *****************************************************************************/
2300 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2302 /**************************************************************************//**
2305 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2308 * @note It does not free the vNIC Use itself, since that may be part of a
2310 *****************************************************************************/
2311 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2313 /**************************************************************************//**
2314 * Set the Accumulated Broadcast Packets Received in measurement interval
2315 * property of the vNIC performance.
2317 * @note The property is treated as immutable: it is only valid to call
2318 * the setter once. However, we don't assert if the caller tries to
2319 * overwrite, just ignoring the update instead.
2321 * @param vnic_performance Pointer to the vNIC Use.
2322 * @param recvd_bcast_packets_acc
2323 *****************************************************************************/
2324 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2325 const double recvd_bcast_packets_acc);
2326 /**************************************************************************//**
2327 * Set the Delta Broadcast Packets Received in measurement interval
2328 * property of the vNIC performance.
2330 * @note The property is treated as immutable: it is only valid to call
2331 * the setter once. However, we don't assert if the caller tries to
2332 * overwrite, just ignoring the update instead.
2334 * @param vnic_performance Pointer to the vNIC Use.
2335 * @param recvd_bcast_packets_delta
2336 *****************************************************************************/
2337 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2338 const double recvd_bcast_packets_delta);
2339 /**************************************************************************//**
2340 * Set the Discarded Packets Received in measurement interval
2341 * property of the vNIC performance.
2343 * @note The property is treated as immutable: it is only valid to call
2344 * the setter once. However, we don't assert if the caller tries to
2345 * overwrite, just ignoring the update instead.
2347 * @param vnic_performance Pointer to the vNIC Use.
2348 * @param recvd_discard_packets_acc
2349 *****************************************************************************/
2350 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2351 const double recvd_discard_packets_acc);
2352 /**************************************************************************//**
2353 * Set the Delta Discarded Packets Received in measurement interval
2354 * property of the vNIC performance.
2356 * @note The property is treated as immutable: it is only valid to call
2357 * the setter once. However, we don't assert if the caller tries to
2358 * overwrite, just ignoring the update instead.
2360 * @param vnic_performance Pointer to the vNIC Use.
2361 * @param recvd_discard_packets_delta
2362 *****************************************************************************/
2363 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2364 const double recvd_discard_packets_delta);
2365 /**************************************************************************//**
2366 * Set the Error Packets Received in measurement interval
2367 * property of the vNIC performance.
2369 * @note The property is treated as immutable: it is only valid to call
2370 * the setter once. However, we don't assert if the caller tries to
2371 * overwrite, just ignoring the update instead.
2373 * @param vnic_performance Pointer to the vNIC Use.
2374 * @param recvd_error_packets_acc
2375 *****************************************************************************/
2376 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2377 const double recvd_error_packets_acc);
2378 /**************************************************************************//**
2379 * Set the Delta Error Packets Received in measurement interval
2380 * property of the vNIC performance.
2382 * @note The property is treated as immutable: it is only valid to call
2383 * the setter once. However, we don't assert if the caller tries to
2384 * overwrite, just ignoring the update instead.
2386 * @param vnic_performance Pointer to the vNIC Use.
2387 * @param recvd_error_packets_delta
2388 *****************************************************************************/
2389 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2390 const double recvd_error_packets_delta);
2391 /**************************************************************************//**
2392 * Set the Accumulated Multicast Packets Received in measurement interval
2393 * property of the vNIC performance.
2395 * @note The property is treated as immutable: it is only valid to call
2396 * the setter once. However, we don't assert if the caller tries to
2397 * overwrite, just ignoring the update instead.
2399 * @param vnic_performance Pointer to the vNIC Use.
2400 * @param recvd_mcast_packets_acc
2401 *****************************************************************************/
2402 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2403 const double recvd_mcast_packets_acc);
2404 /**************************************************************************//**
2405 * Set the Delta Multicast Packets Received in measurement interval
2406 * property of the vNIC performance.
2408 * @note The property is treated as immutable: it is only valid to call
2409 * the setter once. However, we don't assert if the caller tries to
2410 * overwrite, just ignoring the update instead.
2412 * @param vnic_performance Pointer to the vNIC Use.
2413 * @param recvd_mcast_packets_delta
2414 *****************************************************************************/
2415 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2416 const double recvd_mcast_packets_delta);
2417 /**************************************************************************//**
2418 * Set the Accumulated Octets Received in measurement interval
2419 * property of the vNIC performance.
2421 * @note The property is treated as immutable: it is only valid to call
2422 * the setter once. However, we don't assert if the caller tries to
2423 * overwrite, just ignoring the update instead.
2425 * @param vnic_performance Pointer to the vNIC Use.
2426 * @param recvd_octets_acc
2427 *****************************************************************************/
2428 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2429 const double recvd_octets_acc);
2430 /**************************************************************************//**
2431 * Set the Delta Octets Received in measurement interval
2432 * property of the vNIC performance.
2434 * @note The property is treated as immutable: it is only valid to call
2435 * the setter once. However, we don't assert if the caller tries to
2436 * overwrite, just ignoring the update instead.
2438 * @param vnic_performance Pointer to the vNIC Use.
2439 * @param recvd_octets_delta
2440 *****************************************************************************/
2441 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2442 const double recvd_octets_delta);
2443 /**************************************************************************//**
2444 * Set the Accumulated Total Packets Received in measurement interval
2445 * property of the vNIC performance.
2447 * @note The property is treated as immutable: it is only valid to call
2448 * the setter once. However, we don't assert if the caller tries to
2449 * overwrite, just ignoring the update instead.
2451 * @param vnic_performance Pointer to the vNIC Use.
2452 * @param recvd_total_packets_acc
2453 *****************************************************************************/
2454 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2455 const double recvd_total_packets_acc);
2456 /**************************************************************************//**
2457 * Set the Delta Total Packets Received in measurement interval
2458 * property of the vNIC performance.
2460 * @note The property is treated as immutable: it is only valid to call
2461 * the setter once. However, we don't assert if the caller tries to
2462 * overwrite, just ignoring the update instead.
2464 * @param vnic_performance Pointer to the vNIC Use.
2465 * @param recvd_total_packets_delta
2466 *****************************************************************************/
2467 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2468 const double recvd_total_packets_delta);
2469 /**************************************************************************//**
2470 * Set the Accumulated Unicast Packets Received in measurement interval
2471 * property of the vNIC performance.
2473 * @note The property is treated as immutable: it is only valid to call
2474 * the setter once. However, we don't assert if the caller tries to
2475 * overwrite, just ignoring the update instead.
2477 * @param vnic_performance Pointer to the vNIC Use.
2478 * @param recvd_ucast_packets_acc
2479 *****************************************************************************/
2480 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2481 const double recvd_ucast_packets_acc);
2482 /**************************************************************************//**
2483 * Set the Delta Unicast packets Received in measurement interval
2484 * property of the vNIC performance.
2486 * @note The property is treated as immutable: it is only valid to call
2487 * the setter once. However, we don't assert if the caller tries to
2488 * overwrite, just ignoring the update instead.
2490 * @param vnic_performance Pointer to the vNIC Use.
2491 * @param recvd_ucast_packets_delta
2492 *****************************************************************************/
2493 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2494 const double recvd_ucast_packets_delta);
2495 /**************************************************************************//**
2496 * Set the Transmitted Broadcast Packets in measurement interval
2497 * property of the vNIC performance.
2499 * @note The property is treated as immutable: it is only valid to call
2500 * the setter once. However, we don't assert if the caller tries to
2501 * overwrite, just ignoring the update instead.
2503 * @param vnic_performance Pointer to the vNIC Use.
2504 * @param tx_bcast_packets_acc
2505 *****************************************************************************/
2506 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2507 const double tx_bcast_packets_acc);
2508 /**************************************************************************//**
2509 * Set the Delta Broadcast packets Transmitted in measurement interval
2510 * property of the vNIC performance.
2512 * @note The property is treated as immutable: it is only valid to call
2513 * the setter once. However, we don't assert if the caller tries to
2514 * overwrite, just ignoring the update instead.
2516 * @param vnic_performance Pointer to the vNIC Use.
2517 * @param tx_bcast_packets_delta
2518 *****************************************************************************/
2519 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2520 const double tx_bcast_packets_delta);
2521 /**************************************************************************//**
2522 * Set the Transmitted Discarded Packets in measurement interval
2523 * property of the vNIC performance.
2525 * @note The property is treated as immutable: it is only valid to call
2526 * the setter once. However, we don't assert if the caller tries to
2527 * overwrite, just ignoring the update instead.
2529 * @param vnic_performance Pointer to the vNIC Use.
2530 * @param tx_discarded_packets_acc
2531 *****************************************************************************/
2532 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2533 const double tx_discarded_packets_acc);
2534 /**************************************************************************//**
2535 * Set the Delta Discarded packets Transmitted in measurement interval
2536 * property of the vNIC performance.
2538 * @note The property is treated as immutable: it is only valid to call
2539 * the setter once. However, we don't assert if the caller tries to
2540 * overwrite, just ignoring the update instead.
2542 * @param vnic_performance Pointer to the vNIC Use.
2543 * @param tx_discarded_packets_delta
2544 *****************************************************************************/
2545 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2546 const double tx_discarded_packets_delta);
2547 /**************************************************************************//**
2548 * Set the Transmitted Errored Packets in measurement interval
2549 * property of the vNIC performance.
2551 * @note The property is treated as immutable: it is only valid to call
2552 * the setter once. However, we don't assert if the caller tries to
2553 * overwrite, just ignoring the update instead.
2555 * @param vnic_performance Pointer to the vNIC Use.
2556 * @param tx_error_packets_acc
2557 *****************************************************************************/
2558 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2559 const double tx_error_packets_acc);
2560 /**************************************************************************//**
2561 * Set the Delta Errored packets Transmitted in measurement interval
2562 * property of the vNIC performance.
2564 * @note The property is treated as immutable: it is only valid to call
2565 * the setter once. However, we don't assert if the caller tries to
2566 * overwrite, just ignoring the update instead.
2568 * @param vnic_performance Pointer to the vNIC Use.
2569 * @param tx_error_packets_delta
2570 *****************************************************************************/
2571 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2572 const double tx_error_packets_delta);
2573 /**************************************************************************//**
2574 * Set the Transmitted Multicast Packets in measurement interval
2575 * property of the vNIC performance.
2577 * @note The property is treated as immutable: it is only valid to call
2578 * the setter once. However, we don't assert if the caller tries to
2579 * overwrite, just ignoring the update instead.
2581 * @param vnic_performance Pointer to the vNIC Use.
2582 * @param tx_mcast_packets_acc
2583 *****************************************************************************/
2584 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2585 const double tx_mcast_packets_acc);
2586 /**************************************************************************//**
2587 * Set the Delta Multicast packets Transmitted in measurement interval
2588 * property of the vNIC performance.
2590 * @note The property is treated as immutable: it is only valid to call
2591 * the setter once. However, we don't assert if the caller tries to
2592 * overwrite, just ignoring the update instead.
2594 * @param vnic_performance Pointer to the vNIC Use.
2595 * @param tx_mcast_packets_delta
2596 *****************************************************************************/
2597 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2598 const double tx_mcast_packets_delta);
2599 /**************************************************************************//**
2600 * Set the Transmitted Octets in measurement interval
2601 * property of the vNIC performance.
2603 * @note The property is treated as immutable: it is only valid to call
2604 * the setter once. However, we don't assert if the caller tries to
2605 * overwrite, just ignoring the update instead.
2607 * @param vnic_performance Pointer to the vNIC Use.
2608 * @param tx_octets_acc
2609 *****************************************************************************/
2610 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2611 const double tx_octets_acc);
2612 /**************************************************************************//**
2613 * Set the Delta Octets Transmitted in measurement interval
2614 * property of the vNIC performance.
2616 * @note The property is treated as immutable: it is only valid to call
2617 * the setter once. However, we don't assert if the caller tries to
2618 * overwrite, just ignoring the update instead.
2620 * @param vnic_performance Pointer to the vNIC Use.
2621 * @param tx_octets_delta
2622 *****************************************************************************/
2623 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2624 const double tx_octets_delta);
2625 /**************************************************************************//**
2626 * Set the Transmitted Total Packets in measurement interval
2627 * property of the vNIC performance.
2629 * @note The property is treated as immutable: it is only valid to call
2630 * the setter once. However, we don't assert if the caller tries to
2631 * overwrite, just ignoring the update instead.
2633 * @param vnic_performance Pointer to the vNIC Use.
2634 * @param tx_total_packets_acc
2635 *****************************************************************************/
2636 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2637 const double tx_total_packets_acc);
2638 /**************************************************************************//**
2639 * Set the Delta Total Packets Transmitted in measurement interval
2640 * property of the vNIC performance.
2642 * @note The property is treated as immutable: it is only valid to call
2643 * the setter once. However, we don't assert if the caller tries to
2644 * overwrite, just ignoring the update instead.
2646 * @param vnic_performance Pointer to the vNIC Use.
2647 * @param tx_total_packets_delta
2648 *****************************************************************************/
2649 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2650 const double tx_total_packets_delta);
2651 /**************************************************************************//**
2652 * Set the Transmitted Unicast Packets in measurement interval
2653 * property of the vNIC performance.
2655 * @note The property is treated as immutable: it is only valid to call
2656 * the setter once. However, we don't assert if the caller tries to
2657 * overwrite, just ignoring the update instead.
2659 * @param vnic_performance Pointer to the vNIC Use.
2660 * @param tx_ucast_packets_acc
2661 *****************************************************************************/
2662 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2663 const double tx_ucast_packets_acc);
2664 /**************************************************************************//**
2665 * Set the Delta Octets Transmitted in measurement interval
2666 * property of the vNIC performance.
2668 * @note The property is treated as immutable: it is only valid to call
2669 * the setter once. However, we don't assert if the caller tries to
2670 * overwrite, just ignoring the update instead.
2672 * @param vnic_performance Pointer to the vNIC Use.
2673 * @param tx_ucast_packets_delta
2674 *****************************************************************************/
2675 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2676 const double tx_ucast_packets_delta);
2678 /**************************************************************************//**
2679 * Add an additional vNIC Use to the specified Measurement event.
2681 * @param measurement Pointer to the measurement.
2682 * @param vnic_performance Pointer to the vNIC Use to add.
2683 *****************************************************************************/
2684 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2685 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2687 /**************************************************************************//**
2688 * Add an additional vNIC usage record Measurement.
2690 * This function implements the previous API, purely for convenience.
2692 * The ID is null delimited ASCII string. The library takes a copy so the
2693 * caller does not have to preserve values after the function returns.
2695 * @param measurement Pointer to the measurement.
2696 * @param vnic_id ASCIIZ string with the vNIC's ID.
2697 * @param valset true or false confidence level
2698 * @param recvd_bcast_packets_acc Recieved broadcast packets
2699 * @param recvd_bcast_packets_delta Received delta broadcast packets
2700 * @param recvd_discarded_packets_acc Recieved discarded packets
2701 * @param recvd_discarded_packets_delta Received discarded delta packets
2702 * @param recvd_error_packets_acc Received error packets
2703 * @param recvd_error_packets_delta, Received delta error packets
2704 * @param recvd_mcast_packets_acc Received multicast packets
2705 * @param recvd_mcast_packets_delta Received delta multicast packets
2706 * @param recvd_octets_acc Received octets
2707 * @param recvd_octets_delta Received delta octets
2708 * @param recvd_total_packets_acc Received total packets
2709 * @param recvd_total_packets_delta Received delta total packets
2710 * @param recvd_ucast_packets_acc Received Unicast packets
2711 * @param recvd_ucast_packets_delta Received delta unicast packets
2712 * @param tx_bcast_packets_acc Transmitted broadcast packets
2713 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2714 * @param tx_discarded_packets_acc Transmitted packets discarded
2715 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2716 * @param tx_error_packets_acc Transmitted error packets
2717 * @param tx_error_packets_delta Transmitted delta error packets
2718 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2719 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2720 * @param tx_octets_acc Transmitted octets
2721 * @param tx_octets_delta Transmitted delta octets
2722 * @param tx_total_packets_acc Transmitted total packets
2723 * @param tx_total_packets_delta Transmitted delta total packets
2724 * @param tx_ucast_packets_acc Transmitted Unicast packets
2725 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2726 *****************************************************************************/
2727 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2728 char * const vnic_id,
2730 double recvd_bcast_packets_acc,
2731 double recvd_bcast_packets_delta,
2732 double recvd_discarded_packets_acc,
2733 double recvd_discarded_packets_delta,
2734 double recvd_error_packets_acc,
2735 double recvd_error_packets_delta,
2736 double recvd_mcast_packets_acc,
2737 double recvd_mcast_packets_delta,
2738 double recvd_octets_acc,
2739 double recvd_octets_delta,
2740 double recvd_total_packets_acc,
2741 double recvd_total_packets_delta,
2742 double recvd_ucast_packets_acc,
2743 double recvd_ucast_packets_delta,
2744 double tx_bcast_packets_acc,
2745 double tx_bcast_packets_delta,
2746 double tx_discarded_packets_acc,
2747 double tx_discarded_packets_delta,
2748 double tx_error_packets_acc,
2749 double tx_error_packets_delta,
2750 double tx_mcast_packets_acc,
2751 double tx_mcast_packets_delta,
2752 double tx_octets_acc,
2753 double tx_octets_delta,
2754 double tx_total_packets_acc,
2755 double tx_total_packets_delta,
2756 double tx_ucast_packets_acc,
2757 double tx_ucast_packets_delta);
2759 /*****************************************************************************/
2760 /*****************************************************************************/
2764 /*****************************************************************************/
2765 /*****************************************************************************/
2767 /**************************************************************************//**
2768 * Create a new Report event.
2770 * @note The mandatory fields on the Report must be supplied to this
2771 * factory function and are immutable once set. Optional fields have
2772 * explicit setter functions, but again values may only be set once so
2773 * that the Report has immutable properties.
2775 * @param measurement_interval
2776 * @param event_name Unique Event Name
2777 * @param event_id A universal identifier of the event for analysis etc
2779 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2780 * not used (i.e. posted) it must be released using
2781 * ::evel_free_report.
2782 * @retval NULL Failed to create the event.
2783 *****************************************************************************/
2784 EVENT_REPORT * evel_new_report(double measurement_interval,const char* ev_name, const char *ev_id);
2786 /**************************************************************************//**
2789 * Free off the Report supplied. Will free all the contained allocated memory.
2791 * @note It does not free the Report itself, since that may be part of a
2793 *****************************************************************************/
2794 void evel_free_report(EVENT_REPORT * event);
2796 /**************************************************************************//**
2797 * Set the Event Type property of the Report.
2799 * @note The property is treated as immutable: it is only valid to call
2800 * the setter once. However, we don't assert if the caller tries to
2801 * overwrite, just ignoring the update instead.
2803 * @param report Pointer to the Report.
2804 * @param type The Event Type to be set. ASCIIZ string. The caller
2805 * does not need to preserve the value once the function
2807 *****************************************************************************/
2808 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2810 /**************************************************************************//**
2811 * Add a Feature usage value name/value pair to the Report.
2813 * The name is null delimited ASCII string. The library takes
2814 * a copy so the caller does not have to preserve values after the function
2817 * @param report Pointer to the report.
2818 * @param feature ASCIIZ string with the feature's name.
2819 * @param utilization Utilization of the feature.
2820 *****************************************************************************/
2821 void evel_report_feature_use_add(EVENT_REPORT * report,
2825 /**************************************************************************//**
2826 * Add a Additional Measurement value name/value pair to the Report.
2828 * The name is null delimited ASCII string. The library takes
2829 * a copy so the caller does not have to preserve values after the function
2832 * @param report Pointer to the report.
2833 * @param group ASCIIZ string with the measurement group's name.
2834 * @param name ASCIIZ string containing the measurement's name.
2835 * @param value ASCIIZ string containing the measurement's value.
2836 *****************************************************************************/
2837 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2838 const char * const group,
2839 const char * const name,
2840 const char * const value);
2842 /*****************************************************************************/
2843 /*****************************************************************************/
2847 /*****************************************************************************/
2848 /*****************************************************************************/
2850 /**************************************************************************//**
2851 * Create a new Mobile Flow event.
2853 * @note The mandatory fields on the Mobile Flow must be supplied to this
2854 * factory function and are immutable once set. Optional fields have
2855 * explicit setter functions, but again values may only be set once so
2856 * that the Mobile Flow has immutable properties.
2858 * @param event_name Unique Event Name
2859 * @param event_id A universal identifier of the event for analysis etc
2860 * @param flow_direction
2861 * @param gtp_per_flow_metrics
2862 * @param ip_protocol_type
2864 * @param other_endpoint_ip_address
2865 * @param other_endpoint_port
2866 * @param reporting_endpoint_ip_addr
2867 * @param reporting_endpoint_port
2869 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2870 * event is not used (i.e. posted) it must be released using
2871 * ::evel_free_mobile_flow.
2872 * @retval NULL Failed to create the event.
2873 *****************************************************************************/
2874 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2875 const char* ev_name, const char *ev_id,
2876 const char * const flow_direction,
2877 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2878 const char * const ip_protocol_type,
2879 const char * const ip_version,
2880 const char * const other_endpoint_ip_address,
2881 int other_endpoint_port,
2882 const char * const reporting_endpoint_ip_addr,
2883 int reporting_endpoint_port);
2885 /**************************************************************************//**
2886 * Free a Mobile Flow.
2888 * Free off the Mobile Flow supplied. Will free all the contained allocated
2891 * @note It does not free the Mobile Flow itself, since that may be part of a
2893 *****************************************************************************/
2894 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2896 /**************************************************************************//**
2897 * Set the Event Type property of the Mobile Flow.
2899 * @note The property is treated as immutable: it is only valid to call
2900 * the setter once. However, we don't assert if the caller tries to
2901 * overwrite, just ignoring the update instead.
2903 * @param mobile_flow Pointer to the Mobile Flow.
2904 * @param type The Event Type to be set. ASCIIZ string. The caller
2905 * does not need to preserve the value once the function
2907 *****************************************************************************/
2908 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2909 const char * const type);
2911 /**************************************************************************//**
2912 * Set the Application Type property of the Mobile Flow.
2914 * @note The property is treated as immutable: it is only valid to call
2915 * the setter once. However, we don't assert if the caller tries to
2916 * overwrite, just ignoring the update instead.
2918 * @param mobile_flow Pointer to the Mobile Flow.
2919 * @param type The Application Type to be set. ASCIIZ string. The caller
2920 * does not need to preserve the value once the function
2922 *****************************************************************************/
2923 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2924 const char * const type);
2926 /**************************************************************************//**
2927 * Set the Application Protocol Type property of the Mobile Flow.
2929 * @note The property is treated as immutable: it is only valid to call
2930 * the setter once. However, we don't assert if the caller tries to
2931 * overwrite, just ignoring the update instead.
2933 * @param mobile_flow Pointer to the Mobile Flow.
2934 * @param type The Application Protocol Type to be set. ASCIIZ string.
2935 * The caller does not need to preserve the value once the
2937 *****************************************************************************/
2938 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2939 const char * const type);
2941 /**************************************************************************//**
2942 * Set the Application Protocol Version property of the Mobile Flow.
2944 * @note The property is treated as immutable: it is only valid to call
2945 * the setter once. However, we don't assert if the caller tries to
2946 * overwrite, just ignoring the update instead.
2948 * @param mobile_flow Pointer to the Mobile Flow.
2949 * @param version The Application Protocol Version to be set. ASCIIZ
2950 * string. The caller does not need to preserve the value
2951 * once the function returns.
2952 *****************************************************************************/
2953 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2954 const char * const version);
2956 /**************************************************************************//**
2957 * Set the CID property of the Mobile Flow.
2959 * @note The property is treated as immutable: it is only valid to call
2960 * the setter once. However, we don't assert if the caller tries to
2961 * overwrite, just ignoring the update instead.
2963 * @param mobile_flow Pointer to the Mobile Flow.
2964 * @param cid The CID to be set. ASCIIZ string. The caller does not
2965 * need to preserve the value once the function returns.
2966 *****************************************************************************/
2967 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2968 const char * const cid);
2970 /**************************************************************************//**
2971 * Set the Connection Type property of the Mobile Flow.
2973 * @note The property is treated as immutable: it is only valid to call
2974 * the setter once. However, we don't assert if the caller tries to
2975 * overwrite, just ignoring the update instead.
2977 * @param mobile_flow Pointer to the Mobile Flow.
2978 * @param type The Connection Type to be set. ASCIIZ string. The caller
2979 * does not need to preserve the value once the function
2981 *****************************************************************************/
2982 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2983 const char * const type);
2985 /**************************************************************************//**
2986 * Set the ECGI property of the Mobile Flow.
2988 * @note The property is treated as immutable: it is only valid to call
2989 * the setter once. However, we don't assert if the caller tries to
2990 * overwrite, just ignoring the update instead.
2992 * @param mobile_flow Pointer to the Mobile Flow.
2993 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2994 * need to preserve the value once the function returns.
2995 *****************************************************************************/
2996 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2997 const char * const ecgi);
2999 /**************************************************************************//**
3000 * Set the GTP Protocol Type property of the Mobile Flow.
3002 * @note The property is treated as immutable: it is only valid to call
3003 * the setter once. However, we don't assert if the caller tries to
3004 * overwrite, just ignoring the update instead.
3006 * @param mobile_flow Pointer to the Mobile Flow.
3007 * @param type The GTP Protocol Type to be set. ASCIIZ string. The
3008 * caller does not need to preserve the value once the
3010 *****************************************************************************/
3011 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
3012 const char * const type);
3014 /**************************************************************************//**
3015 * Set the GTP Protocol Version property of the Mobile Flow.
3017 * @note The property is treated as immutable: it is only valid to call
3018 * the setter once. However, we don't assert if the caller tries to
3019 * overwrite, just ignoring the update instead.
3021 * @param mobile_flow Pointer to the Mobile Flow.
3022 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
3023 * caller does not need to preserve the value once the
3025 *****************************************************************************/
3026 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
3027 const char * const version);
3029 /**************************************************************************//**
3030 * Set the HTTP Header property of the Mobile Flow.
3032 * @note The property is treated as immutable: it is only valid to call
3033 * the setter once. However, we don't assert if the caller tries to
3034 * overwrite, just ignoring the update instead.
3036 * @param mobile_flow Pointer to the Mobile Flow.
3037 * @param header The HTTP header to be set. ASCIIZ string. The caller does
3038 * not need to preserve the value once the function returns.
3039 *****************************************************************************/
3040 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
3041 const char * const header);
3043 /**************************************************************************//**
3044 * Set the IMEI property of the Mobile Flow.
3046 * @note The property is treated as immutable: it is only valid to call
3047 * the setter once. However, we don't assert if the caller tries to
3048 * overwrite, just ignoring the update instead.
3050 * @param mobile_flow Pointer to the Mobile Flow.
3051 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
3052 * need to preserve the value once the function returns.
3053 *****************************************************************************/
3054 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
3055 const char * const imei);
3057 /**************************************************************************//**
3058 * Set the IMSI property of the Mobile Flow.
3060 * @note The property is treated as immutable: it is only valid to call
3061 * the setter once. However, we don't assert if the caller tries to
3062 * overwrite, just ignoring the update instead.
3064 * @param mobile_flow Pointer to the Mobile Flow.
3065 * @param imsi The IMSI to be set. ASCIIZ string. The caller does not
3066 * need to preserve the value once the function returns.
3067 *****************************************************************************/
3068 void evel_mobile_flow_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
3069 const char * const imsi);
3071 /**************************************************************************//**
3072 * Set the LAC property of the Mobile Flow.
3074 * @note The property is treated as immutable: it is only valid to call
3075 * the setter once. However, we don't assert if the caller tries to
3076 * overwrite, just ignoring the update instead.
3078 * @param mobile_flow Pointer to the Mobile Flow.
3079 * @param lac The LAC to be set. ASCIIZ string. The caller does not
3080 * need to preserve the value once the function returns.
3081 *****************************************************************************/
3082 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
3083 const char * const lac);
3085 /**************************************************************************//**
3086 * Set the MCC property of the Mobile Flow.
3088 * @note The property is treated as immutable: it is only valid to call
3089 * the setter once. However, we don't assert if the caller tries to
3090 * overwrite, just ignoring the update instead.
3092 * @param mobile_flow Pointer to the Mobile Flow.
3093 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
3094 * need to preserve the value once the function returns.
3095 *****************************************************************************/
3096 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
3097 const char * const mcc);
3099 /**************************************************************************//**
3100 * Set the MNC property of the Mobile Flow.
3102 * @note The property is treated as immutable: it is only valid to call
3103 * the setter once. However, we don't assert if the caller tries to
3104 * overwrite, just ignoring the update instead.
3106 * @param mobile_flow Pointer to the Mobile Flow.
3107 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
3108 * need to preserve the value once the function returns.
3109 *****************************************************************************/
3110 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
3111 const char * const mnc);
3113 /**************************************************************************//**
3114 * Set the MSISDN property of the Mobile Flow.
3116 * @note The property is treated as immutable: it is only valid to call
3117 * the setter once. However, we don't assert if the caller tries to
3118 * overwrite, just ignoring the update instead.
3120 * @param mobile_flow Pointer to the Mobile Flow.
3121 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
3122 * need to preserve the value once the function returns.
3123 *****************************************************************************/
3124 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
3125 const char * const msisdn);
3127 /**************************************************************************//**
3128 * Set the Other Functional Role property of the Mobile Flow.
3130 * @note The property is treated as immutable: it is only valid to call
3131 * the setter once. However, we don't assert if the caller tries to
3132 * overwrite, just ignoring the update instead.
3134 * @param mobile_flow Pointer to the Mobile Flow.
3135 * @param role The Other Functional Role to be set. ASCIIZ string. The
3136 * caller does not need to preserve the value once the
3138 *****************************************************************************/
3139 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
3140 const char * const role);
3142 /**************************************************************************//**
3143 * Set the RAC property of the Mobile Flow.
3145 * @note The property is treated as immutable: it is only valid to call
3146 * the setter once. However, we don't assert if the caller tries to
3147 * overwrite, just ignoring the update instead.
3149 * @param mobile_flow Pointer to the Mobile Flow.
3150 * @param rac The RAC to be set. ASCIIZ string. The caller does not
3151 * need to preserve the value once the function returns.
3152 *****************************************************************************/
3153 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
3154 const char * const rac);
3156 /**************************************************************************//**
3157 * Set the Radio Access Technology property of the Mobile Flow.
3159 * @note The property is treated as immutable: it is only valid to call
3160 * the setter once. However, we don't assert if the caller tries to
3161 * overwrite, just ignoring the update instead.
3163 * @param mobile_flow Pointer to the Mobile Flow.
3164 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
3165 * caller does not need to preserve the value once the
3167 *****************************************************************************/
3168 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
3169 const char * const tech);
3171 /**************************************************************************//**
3172 * Set the SAC property of the Mobile Flow.
3174 * @note The property is treated as immutable: it is only valid to call
3175 * the setter once. However, we don't assert if the caller tries to
3176 * overwrite, just ignoring the update instead.
3178 * @param mobile_flow Pointer to the Mobile Flow.
3179 * @param sac The SAC to be set. ASCIIZ string. The caller does not
3180 * need to preserve the value once the function returns.
3181 *****************************************************************************/
3182 void evel_mobile_flow_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
3183 const char * const sac);
3185 /**************************************************************************//**
3186 * Set the Sampling Algorithm property of the Mobile Flow.
3188 * @note The property is treated as immutable: it is only valid to call
3189 * the setter once. However, we don't assert if the caller tries to
3190 * overwrite, just ignoring the update instead.
3192 * @param mobile_flow Pointer to the Mobile Flow.
3193 * @param algorithm The Sampling Algorithm to be set.
3194 *****************************************************************************/
3195 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
3198 /**************************************************************************//**
3199 * Set the TAC property of the Mobile Flow.
3201 * @note The property is treated as immutable: it is only valid to call
3202 * the setter once. However, we don't assert if the caller tries to
3203 * overwrite, just ignoring the update instead.
3205 * @param mobile_flow Pointer to the Mobile Flow.
3206 * @param tac The TAC to be set. ASCIIZ string. The caller does not
3207 * need to preserve the value once the function returns.
3208 *****************************************************************************/
3209 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
3210 const char * const tac);
3212 /**************************************************************************//**
3213 * Set the Tunnel ID property of the Mobile Flow.
3215 * @note The property is treated as immutable: it is only valid to call
3216 * the setter once. However, we don't assert if the caller tries to
3217 * overwrite, just ignoring the update instead.
3219 * @param mobile_flow Pointer to the Mobile Flow.
3220 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
3221 * not need to preserve the value once the function returns.
3222 *****************************************************************************/
3223 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3224 const char * const tunnel_id);
3226 /**************************************************************************//**
3227 * Set the VLAN ID property of the Mobile Flow.
3229 * @note The property is treated as immutable: it is only valid to call
3230 * the setter once. However, we don't assert if the caller tries to
3231 * overwrite, just ignoring the update instead.
3233 * @param mobile_flow Pointer to the Mobile Flow.
3234 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
3235 * not need to preserve the value once the function returns.
3236 *****************************************************************************/
3237 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3238 const char * const vlan_id);
3240 /**************************************************************************//**
3241 * Create a new Mobile GTP Per Flow Metrics.
3243 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
3244 * supplied to this factory function and are immutable once set.
3245 * Optional fields have explicit setter functions, but again values
3246 * may only be set once so that the Mobile GTP Per Flow Metrics has
3247 * immutable properties.
3249 * @param avg_bit_error_rate
3250 * @param avg_packet_delay_variation
3251 * @param avg_packet_latency
3252 * @param avg_receive_throughput
3253 * @param avg_transmit_throughput
3254 * @param flow_activation_epoch
3255 * @param flow_activation_microsec
3256 * @param flow_deactivation_epoch
3257 * @param flow_deactivation_microsec
3258 * @param flow_deactivation_time
3259 * @param flow_status
3260 * @param max_packet_delay_variation
3261 * @param num_activation_failures
3262 * @param num_bit_errors
3263 * @param num_bytes_received
3264 * @param num_bytes_transmitted
3265 * @param num_dropped_packets
3266 * @param num_l7_bytes_received
3267 * @param num_l7_bytes_transmitted
3268 * @param num_lost_packets
3269 * @param num_out_of_order_packets
3270 * @param num_packet_errors
3271 * @param num_packets_received_excl_retrans
3272 * @param num_packets_received_incl_retrans
3273 * @param num_packets_transmitted_incl_retrans
3274 * @param num_retries
3275 * @param num_timeouts
3276 * @param num_tunneled_l7_bytes_received
3277 * @param round_trip_time
3278 * @param time_to_first_byte
3280 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3281 * If the structure is not used it must be released using
3282 * ::evel_free_mobile_gtp_flow_metrics.
3283 * @retval NULL Failed to create the event.
3284 *****************************************************************************/
3285 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3286 double avg_bit_error_rate,
3287 double avg_packet_delay_variation,
3288 int avg_packet_latency,
3289 int avg_receive_throughput,
3290 int avg_transmit_throughput,
3291 int flow_activation_epoch,
3292 int flow_activation_microsec,
3293 int flow_deactivation_epoch,
3294 int flow_deactivation_microsec,
3295 time_t flow_deactivation_time,
3296 const char * const flow_status,
3297 int max_packet_delay_variation,
3298 int num_activation_failures,
3300 int num_bytes_received,
3301 int num_bytes_transmitted,
3302 int num_dropped_packets,
3303 int num_l7_bytes_received,
3304 int num_l7_bytes_transmitted,
3305 int num_lost_packets,
3306 int num_out_of_order_packets,
3307 int num_packet_errors,
3308 int num_packets_received_excl_retrans,
3309 int num_packets_received_incl_retrans,
3310 int num_packets_transmitted_incl_retrans,
3313 int num_tunneled_l7_bytes_received,
3314 int round_trip_time,
3315 int time_to_first_byte);
3317 /**************************************************************************//**
3318 * Free a Mobile GTP Per Flow Metrics.
3320 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3321 * contained allocated memory.
3323 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3324 * may be part of a larger structure.
3325 *****************************************************************************/
3326 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3328 /**************************************************************************//**
3329 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3332 * @note The property is treated as immutable: it is only valid to call
3333 * the setter once. However, we don't assert if the caller tries to
3334 * overwrite, just ignoring the update instead.
3336 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3337 * @param duration The Duration of Connection Failed Status to be set.
3338 *****************************************************************************/
3339 void evel_mobile_gtp_metrics_dur_con_fail_set(
3340 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3343 /**************************************************************************//**
3344 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3347 * @note The property is treated as immutable: it is only valid to call
3348 * the setter once. However, we don't assert if the caller tries to
3349 * overwrite, just ignoring the update instead.
3351 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3352 * @param duration The Duration of Tunnel Failed Status to be set.
3353 *****************************************************************************/
3354 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3355 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3358 /**************************************************************************//**
3359 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3361 * @note The property is treated as immutable: it is only valid to call
3362 * the setter once. However, we don't assert if the caller tries to
3363 * overwrite, just ignoring the update instead.
3365 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3366 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3367 * does not need to preserve the value once the function
3369 *****************************************************************************/
3370 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3371 const char * const act_by);
3373 /**************************************************************************//**
3374 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3376 * @note The property is treated as immutable: it is only valid to call
3377 * the setter once. However, we don't assert if the caller tries to
3378 * overwrite, just ignoring the update instead.
3380 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3381 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3382 * does not need to preserve the value once the function
3384 *****************************************************************************/
3385 void evel_mobile_gtp_metrics_act_time_set(
3386 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3389 /**************************************************************************//**
3390 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3392 * @note The property is treated as immutable: it is only valid to call
3393 * the setter once. However, we don't assert if the caller tries to
3394 * overwrite, just ignoring the update instead.
3396 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3397 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3398 * does not need to preserve the value once the function
3400 *****************************************************************************/
3401 void evel_mobile_gtp_metrics_deact_by_set(
3402 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3403 const char * const deact_by);
3405 /**************************************************************************//**
3406 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3408 * @note The property is treated as immutable: it is only valid to call
3409 * the setter once. However, we don't assert if the caller tries to
3410 * overwrite, just ignoring the update instead.
3412 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3413 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3414 * caller does not need to preserve the value once the
3416 *****************************************************************************/
3417 void evel_mobile_gtp_metrics_con_status_set(
3418 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3419 const char * const status);
3421 /**************************************************************************//**
3422 * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.
3424 * @note The property is treated as immutable: it is only valid to call
3425 * the setter once. However, we don't assert if the caller tries to
3426 * overwrite, just ignoring the update instead.
3428 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3429 * @param status The GTP Tunnel Status to be set. ASCIIZ string. The
3430 * caller does not need to preserve the value once the
3432 *****************************************************************************/
3433 void evel_mobile_gtp_metrics_tun_status_set(
3434 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3435 const char * const status);
3437 /**************************************************************************//**
3438 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3440 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3441 * @param index The index of the IP Type-of-Service.
3442 * @param count The count.
3443 *****************************************************************************/
3444 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3448 /**************************************************************************//**
3449 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3452 * @note The property is treated as immutable: it is only valid to call
3453 * the setter once. However, we don't assert if the caller tries to
3454 * overwrite, just ignoring the update instead.
3456 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3457 * @param rtt The Large Packet Round-Trip Time to be set.
3458 *****************************************************************************/
3459 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3460 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3463 /**************************************************************************//**
3464 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3466 * @note The property is treated as immutable: it is only valid to call
3467 * the setter once. However, we don't assert if the caller tries to
3468 * overwrite, just ignoring the update instead.
3470 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3471 * @param threshold The Large Packet Threshold to be set.
3472 *****************************************************************************/
3473 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3474 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3477 /**************************************************************************//**
3478 * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.
3480 * @note The property is treated as immutable: it is only valid to call
3481 * the setter once. However, we don't assert if the caller tries to
3482 * overwrite, just ignoring the update instead.
3484 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3485 * @param rate The Max Receive Bit Rate to be set.
3486 *****************************************************************************/
3487 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3488 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3491 /**************************************************************************//**
3492 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
3494 * @note The property is treated as immutable: it is only valid to call
3495 * the setter once. However, we don't assert if the caller tries to
3496 * overwrite, just ignoring the update instead.
3498 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3499 * @param rate The Max Transmit Bit Rate to be set.
3500 *****************************************************************************/
3501 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3502 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3505 /**************************************************************************//**
3506 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3509 * @note The property is treated as immutable: it is only valid to call
3510 * the setter once. However, we don't assert if the caller tries to
3511 * overwrite, just ignoring the update instead.
3513 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3514 * @param num The Number of GTP Echo Failures to be set.
3515 *****************************************************************************/
3516 void evel_mobile_gtp_metrics_num_echo_fail_set(
3517 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3520 /**************************************************************************//**
3521 * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow
3524 * @note The property is treated as immutable: it is only valid to call
3525 * the setter once. However, we don't assert if the caller tries to
3526 * overwrite, just ignoring the update instead.
3528 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3529 * @param num The Number of GTP Tunnel Errors to be set.
3530 *****************************************************************************/
3531 void evel_mobile_gtp_metrics_num_tun_fail_set(
3532 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3535 /**************************************************************************//**
3536 * Set the Number of HTTP Errors property of the Mobile GTP Per Flow Metrics.
3538 * @note The property is treated as immutable: it is only valid to call
3539 * the setter once. However, we don't assert if the caller tries to
3540 * overwrite, just ignoring the update instead.
3542 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3543 * @param num The Number of HTTP Errors to be set.
3544 *****************************************************************************/
3545 void evel_mobile_gtp_metrics_num_http_errors_set(
3546 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3549 /**************************************************************************//**
3550 * Add a TCP flag count to the metrics.
3552 * @note The property is treated as immutable: it is only valid to call
3553 * the setter once. However, we don't assert if the caller tries to
3554 * overwrite, just ignoring the update instead.
3556 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3557 * @param tcp_flag The TCP flag count to be updated.
3558 * @param count The associated flag count.
3559 *****************************************************************************/
3560 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3561 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3562 const EVEL_TCP_FLAGS tcp_flag,
3565 /**************************************************************************//**
3566 * Add a QCI COS count to the metrics.
3568 * @note The property is treated as immutable: it is only valid to call
3569 * the setter once. However, we don't assert if the caller tries to
3570 * overwrite, just ignoring the update instead.
3572 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3573 * @param qci_cos The QCI COS count to be updated.
3574 * @param count The associated QCI COS count.
3575 *****************************************************************************/
3576 void evel_mobile_gtp_metrics_qci_cos_count_add(
3577 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3578 const EVEL_QCI_COS_TYPES qci_cos,
3581 /*****************************************************************************/
3582 /*****************************************************************************/
3586 /*****************************************************************************/
3587 /*****************************************************************************/
3589 /**************************************************************************//**
3590 * Create a new Signaling event.
3592 * @note The mandatory fields on the Signaling must be supplied to
3593 * this factory function and are immutable once set. Optional fields
3594 * have explicit setter functions, but again values may only be set
3595 * once so that the event has immutable properties.
3596 * @param event_name Unique Event Name
3597 * @param event_id A universal identifier of the event for analysis etc
3598 * @param vendor_name The vendor id to encode in the event vnf field.
3599 * @param module The module to encode in the event.
3600 * @param vnfname The Virtual network function to encode in the event.
3601 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3602 * is not used (i.e. posted) it must be released using
3603 * ::evel_free_signaling.
3604 * @retval NULL Failed to create the event.
3605 *****************************************************************************/
3606 EVENT_SIGNALING * evel_new_signaling(const char* ev_name, const char *ev_id,
3607 const char * const vendor_name,
3608 const char * const correlator,
3609 const char * const local_ip_address,
3610 const char * const local_port,
3611 const char * const remote_ip_address,
3612 const char * const remote_port);
3614 /**************************************************************************//**
3615 * Free a Signaling event.
3617 * Free off the event supplied. Will free all the contained allocated memory.
3619 * @note It does not free the event itself, since that may be part of a larger
3621 *****************************************************************************/
3622 void evel_free_signaling(EVENT_SIGNALING * const event);
3624 /**************************************************************************//**
3625 * Set the Event Type property of the Signaling event.
3627 * @note The property is treated as immutable: it is only valid to call
3628 * the setter once. However, we don't assert if the caller tries to
3629 * overwrite, just ignoring the update instead.
3631 * @param event Pointer to the Signaling event.
3632 * @param type The Event Type to be set. ASCIIZ string. The caller
3633 * does not need to preserve the value once the function
3635 *****************************************************************************/
3636 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3637 const char * const type);
3639 /**************************************************************************//**
3640 * Add an additional value name/value pair to the SIP signaling.
3642 * The name and value are null delimited ASCII strings. The library takes
3643 * a copy so the caller does not have to preserve values after the function
3646 * @param event Pointer to the fault.
3647 * @param name ASCIIZ string with the attribute's name. The caller
3648 * does not need to preserve the value once the function
3650 * @param value ASCIIZ string with the attribute's value. The caller
3651 * does not need to preserve the value once the function
3653 *****************************************************************************/
3654 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3656 /**************************************************************************//**
3657 * Set the Correlator property of the Signaling event.
3659 * @note The property is treated as immutable: it is only valid to call
3660 * the setter once. However, we don't assert if the caller tries to
3661 * overwrite, just ignoring the update instead.
3663 * @param event Pointer to the Signaling event.
3664 * @param correlator The correlator to be set. ASCIIZ string. The caller
3665 * does not need to preserve the value once the function
3667 *****************************************************************************/
3668 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3669 const char * const correlator);
3671 /**************************************************************************//**
3672 * Set the Local Ip Address property of the Signaling event.
3674 * @note The property is treated as immutable: it is only valid to call
3675 * the setter once. However, we don't assert if the caller tries to
3676 * overwrite, just ignoring the update instead.
3678 * @param event Pointer to the Signaling event.
3679 * @param local_ip_address
3680 * The Local Ip Address to be set. ASCIIZ string. The
3681 * caller does not need to preserve the value once the
3683 *****************************************************************************/
3684 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3685 const char * const local_ip_address);
3687 /**************************************************************************//**
3688 * Set the Local Port property of the Signaling event.
3690 * @note The property is treated as immutable: it is only valid to call
3691 * the setter once. However, we don't assert if the caller tries to
3692 * overwrite, just ignoring the update instead.
3694 * @param event Pointer to the Signaling event.
3695 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3696 * does not need to preserve the value once the function
3698 *****************************************************************************/
3699 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3700 const char * const local_port);
3702 /**************************************************************************//**
3703 * Set the Remote Ip Address property of the Signaling event.
3705 * @note The property is treated as immutable: it is only valid to call
3706 * the setter once. However, we don't assert if the caller tries to
3707 * overwrite, just ignoring the update instead.
3709 * @param event Pointer to the Signaling event.
3710 * @param remote_ip_address
3711 * The Remote Ip Address to be set. ASCIIZ string. The
3712 * caller does not need to preserve the value once the
3714 *****************************************************************************/
3715 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3716 const char * const remote_ip_address);
3718 /**************************************************************************//**
3719 * Set the Remote Port property of the Signaling event.
3721 * @note The property is treated as immutable: it is only valid to call
3722 * the setter once. However, we don't assert if the caller tries to
3723 * overwrite, just ignoring the update instead.
3725 * @param event Pointer to the Signaling event.
3726 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3727 * does not need to preserve the value once the function
3729 *****************************************************************************/
3730 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3731 const char * const remote_port);
3732 /**************************************************************************//**
3733 * Set the Vendor module property of the Signaling event.
3735 * @note The property is treated as immutable: it is only valid to call
3736 * the setter once. However, we don't assert if the caller tries to
3737 * overwrite, just ignoring the update instead.
3739 * @param event Pointer to the Signaling event.
3740 * @param modulename The module name to be set. ASCIIZ string. The caller
3741 * does not need to preserve the value once the function
3743 *****************************************************************************/
3744 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3745 const char * const module_name);
3746 /**************************************************************************//**
3747 * Set the Vendor module property of the Signaling event.
3749 * @note The property is treated as immutable: it is only valid to call
3750 * the setter once. However, we don't assert if the caller tries to
3751 * overwrite, just ignoring the update instead.
3753 * @param event Pointer to the Signaling event.
3754 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3755 * The caller does not need to preserve the value once
3756 * the function returns.
3757 *****************************************************************************/
3758 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3759 const char * const vnfname);
3761 /**************************************************************************//**
3762 * Set the Compressed SIP property of the Signaling event.
3764 * @note The property is treated as immutable: it is only valid to call
3765 * the setter once. However, we don't assert if the caller tries to
3766 * overwrite, just ignoring the update instead.
3768 * @param event Pointer to the Signaling event.
3769 * @param compressed_sip
3770 * The Compressed SIP to be set. ASCIIZ string. The caller
3771 * does not need to preserve the value once the function
3773 *****************************************************************************/
3774 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3775 const char * const compressed_sip);
3777 /**************************************************************************//**
3778 * Set the Summary SIP property of the Signaling event.
3780 * @note The property is treated as immutable: it is only valid to call
3781 * the setter once. However, we don't assert if the caller tries to
3782 * overwrite, just ignoring the update instead.
3784 * @param event Pointer to the Signaling event.
3785 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3786 * does not need to preserve the value once the function
3788 *****************************************************************************/
3789 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3790 const char * const summary_sip);
3793 /*****************************************************************************/
3794 /*****************************************************************************/
3798 /*****************************************************************************/
3799 /*****************************************************************************/
3801 /**************************************************************************//**
3802 * Create a new State Change event.
3804 * @note The mandatory fields on the Syslog must be supplied to this factory
3805 * function and are immutable once set. Optional fields have explicit
3806 * setter functions, but again values may only be set once so that the
3807 * Syslog has immutable properties.
3809 * @param event_name Unique Event Name
3810 * @param event_id A universal identifier of the event for analysis etc
3811 * @param new_state The new state of the reporting entity.
3812 * @param old_state The old state of the reporting entity.
3813 * @param interface The card or port name of the reporting entity.
3815 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3816 * event is not used it must be released using
3817 * ::evel_free_state_change
3818 * @retval NULL Failed to create the event.
3819 *****************************************************************************/
3820 EVENT_STATE_CHANGE * evel_new_state_change(const char* ev_name, const char *ev_id,
3821 const EVEL_ENTITY_STATE new_state,
3822 const EVEL_ENTITY_STATE old_state,
3823 const char * const interface);
3825 /**************************************************************************//**
3826 * Free a State Change.
3828 * Free off the State Change supplied. Will free all the contained allocated
3831 * @note It does not free the State Change itself, since that may be part of a
3833 *****************************************************************************/
3834 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3836 /**************************************************************************//**
3837 * Set the Event Type property of the State Change.
3839 * @note The property is treated as immutable: it is only valid to call
3840 * the setter once. However, we don't assert if the caller tries to
3841 * overwrite, just ignoring the update instead.
3843 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3844 * @param type The Event Type to be set. ASCIIZ string. The caller
3845 * does not need to preserve the value once the function
3847 *****************************************************************************/
3848 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3849 const char * const type);
3851 /**************************************************************************//**
3852 * Add an additional field name/value pair to the State Change.
3854 * The name and value are null delimited ASCII strings. The library takes
3855 * a copy so the caller does not have to preserve values after the function
3858 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3859 * @param name ASCIIZ string with the attribute's name. The caller
3860 * does not need to preserve the value once the function
3862 * @param value ASCIIZ string with the attribute's value. The caller
3863 * does not need to preserve the value once the function
3865 *****************************************************************************/
3866 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3867 const char * const name,
3868 const char * const value);
3870 /*****************************************************************************/
3871 /*****************************************************************************/
3875 /*****************************************************************************/
3876 /*****************************************************************************/
3878 /**************************************************************************//**
3879 * Create a new syslog event.
3881 * @note The mandatory fields on the Syslog must be supplied to this factory
3882 * function and are immutable once set. Optional fields have explicit
3883 * setter functions, but again values may only be set once so that the
3884 * Syslog has immutable properties.
3886 * @param event_name Unique Event Name
3887 * @param event_id A universal identifier of the event for analysis etc
3888 * @param event_source_type
3893 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3894 * not used it must be released using ::evel_free_syslog
3895 * @retval NULL Failed to create the event.
3896 *****************************************************************************/
3897 EVENT_SYSLOG * evel_new_syslog(const char* ev_name, const char *ev_id,
3898 EVEL_SOURCE_TYPES event_source_type,
3899 const char * const syslog_msg,
3900 const char * const syslog_tag);
3902 /**************************************************************************//**
3903 * Set the Event Type property of the Syslog.
3905 * @note The property is treated as immutable: it is only valid to call
3906 * the setter once. However, we don't assert if the caller tries to
3907 * overwrite, just ignoring the update instead.
3909 * @param syslog Pointer to the syslog.
3910 * @param type The Event Type to be set. ASCIIZ string. The caller
3911 * does not need to preserve the value once the function
3913 *****************************************************************************/
3914 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3915 const char * const type);
3917 /**************************************************************************//**
3920 * Free off the Syslog supplied. Will free all the contained allocated memory.
3922 * @note It does not free the Syslog itself, since that may be part of a
3924 *****************************************************************************/
3925 void evel_free_syslog(EVENT_SYSLOG * event);
3927 /**************************************************************************//**
3928 * Add an additional field name/value pair to the Syslog.
3930 * The name and value are null delimited ASCII strings. The library takes
3931 * a copy so the caller does not have to preserve values after the function
3934 * @param syslog Pointer to the syslog.
3935 * @param name ASCIIZ string with the attribute's name. The caller
3936 * does not need to preserve the value once the function
3938 * @param value ASCIIZ string with the attribute's value. The caller
3939 * does not need to preserve the value once the function
3941 *****************************************************************************/
3942 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3946 /**************************************************************************//**
3947 * Set the Event Source Host property of the Syslog.
3949 * @note The property is treated as immutable: it is only valid to call
3950 * the setter once. However, we don't assert if the caller tries to
3951 * overwrite, just ignoring the update instead.
3953 * @param syslog Pointer to the Syslog.
3954 * @param host The Event Source Host to be set. ASCIIZ string. The
3955 * caller does not need to preserve the value once the
3957 *****************************************************************************/
3958 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3959 const char * const host);
3961 /**************************************************************************//**
3962 * Set the Syslog Facility property of the Syslog.
3964 * @note The property is treated as immutable: it is only valid to call
3965 * the setter once. However, we don't assert if the caller tries to
3966 * overwrite, just ignoring the update instead.
3968 * @param syslog Pointer to the Syslog.
3969 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3970 * does not need to preserve the value once the function
3972 *****************************************************************************/
3973 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3974 EVEL_SYSLOG_FACILITIES facility);
3976 /**************************************************************************//**
3977 * Set the Process property of the Syslog.
3979 * @note The property is treated as immutable: it is only valid to call
3980 * the setter once. However, we don't assert if the caller tries to
3981 * overwrite, just ignoring the update instead.
3983 * @param syslog Pointer to the Syslog.
3984 * @param proc The Process to be set. ASCIIZ string. The caller does
3985 * not need to preserve the value once the function returns.
3986 *****************************************************************************/
3987 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3989 /**************************************************************************//**
3990 * Set the Process ID 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 proc_id The Process ID to be set.
3998 *****************************************************************************/
3999 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
4001 /**************************************************************************//**
4002 * Set the Version property of the Syslog.
4004 * @note The property is treated as immutable: it is only valid to call
4005 * the setter once. However, we don't assert if the caller tries to
4006 * overwrite, just ignoring the update instead.
4008 * @param syslog Pointer to the Syslog.
4009 * @param version The Version to be set.
4010 *****************************************************************************/
4011 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
4013 /**************************************************************************//**
4014 * Set the Structured Data property of the Syslog.
4016 * @note The property is treated as immutable: it is only valid to call
4017 * the setter once. However, we don't assert if the caller tries to
4018 * overwrite, just ignoring the update instead.
4020 * @param syslog Pointer to the Syslog.
4021 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
4022 * does not need to preserve the value once the function
4024 *****************************************************************************/
4025 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
4027 /**************************************************************************//**
4028 * Set the Structured SDID property of the Syslog.
4030 * @note The property is treated as immutable: it is only valid to call
4031 * the setter once. However, we don't assert if the caller tries to
4032 * overwrite, just ignoring the update instead.
4034 * @param syslog Pointer to the Syslog.
4035 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
4036 * Caller does not need to preserve the value once the function
4038 *****************************************************************************/
4039 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
4041 /**************************************************************************//**
4042 * Set the Structured Severity property of the Syslog.
4044 * @note The property is treated as immutable: it is only valid to call
4045 * the setter once. However, we don't assert if the caller tries to
4046 * overwrite, just ignoring the update instead.
4048 * @param syslog Pointer to the Syslog.
4049 * @param sdid The Structured Data to be set. ASCIIZ string.
4050 * Caller does not need to preserve the value once the function
4052 *****************************************************************************/
4053 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
4056 /*****************************************************************************/
4057 /*****************************************************************************/
4061 /*****************************************************************************/
4062 /*****************************************************************************/
4064 /**************************************************************************//**
4065 * Create a new other event.
4067 * @param event_name Unique Event Name
4068 * @param event_id A universal identifier of the event for analysis etc
4070 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
4071 * not used it must be released using ::evel_free_other.
4072 * @retval NULL Failed to create the event.
4073 *****************************************************************************/
4074 EVENT_OTHER * evel_new_other(const char* ev_name, const char *ev_id);
4076 /**************************************************************************//**
4079 * Free off the Other supplied. Will free all the contained allocated memory.
4081 * @note It does not free the Other itself, since that may be part of a
4083 *****************************************************************************/
4084 void evel_free_other(EVENT_OTHER * event);
4086 /**************************************************************************//**
4087 * Set the Event Type property of the Other.
4089 * @note The property is treated as immutable: it is only valid to call
4090 * the setter once. However, we don't assert if the caller tries to
4091 * overwrite, just ignoring the update instead.
4093 * @param other Pointer to the Other.
4094 * @param type The Event Type to be set. ASCIIZ string. The caller
4095 * does not need to preserve the value once the function
4097 *****************************************************************************/
4098 void evel_other_type_set(EVENT_OTHER * other,
4099 const char * const type);
4101 /**************************************************************************//**
4102 * Add a value name/value pair to the Other.
4104 * The name and value are null delimited ASCII strings. The library takes
4105 * a copy so the caller does not have to preserve values after the function
4108 * @param other Pointer to the Other.
4109 * @param name ASCIIZ string with the attribute's name.
4110 * @param value ASCIIZ string with the attribute's value.
4111 *****************************************************************************/
4112 void evel_other_field_add(EVENT_OTHER * other,
4116 /*****************************************************************************/
4117 /*****************************************************************************/
4121 /*****************************************************************************/
4122 /*****************************************************************************/
4124 /**************************************************************************//**
4125 * Return the current measurement interval provided by the Event Listener.
4127 * @returns The current measurement interval
4128 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
4130 *****************************************************************************/
4131 int evel_get_measurement_interval();
4133 /*****************************************************************************/
4134 /* Supported Report version. */
4135 /*****************************************************************************/
4136 #define EVEL_VOICEQ_MAJOR_VERSION 1
4137 #define EVEL_VOICEQ_MINOR_VERSION 0
4139 /**************************************************************************//**
4140 * End of Call Voice Quality Metrices
4141 * JSON equivalent field: endOfCallVqmSummaries
4142 *****************************************************************************/
4143 typedef struct end_of_call_vqm_summaries {
4144 /***************************************************************************/
4145 /* Mandatory fields */
4146 /***************************************************************************/
4147 char* adjacencyName;
4148 char* endpointDescription;
4150 /***************************************************************************/
4151 /* Optional fields */
4152 /***************************************************************************/
4153 EVEL_OPTION_INT endpointJitter;
4154 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
4155 EVEL_OPTION_INT endpointRtpOctetsReceived;
4156 EVEL_OPTION_INT endpointRtpOctetsSent;
4157 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
4158 EVEL_OPTION_INT endpointRtpPacketsReceived;
4159 EVEL_OPTION_INT endpointRtpPacketsSent;
4160 EVEL_OPTION_INT localJitter;
4161 EVEL_OPTION_INT localRtpOctetsDiscarded;
4162 EVEL_OPTION_INT localRtpOctetsReceived;
4163 EVEL_OPTION_INT localRtpOctetsSent;
4164 EVEL_OPTION_INT localRtpPacketsDiscarded;
4165 EVEL_OPTION_INT localRtpPacketsReceived;
4166 EVEL_OPTION_INT localRtpPacketsSent;
4167 EVEL_OPTION_INT mosCqe;
4168 EVEL_OPTION_INT packetsLost;
4169 EVEL_OPTION_INT packetLossPercent;
4170 EVEL_OPTION_INT rFactor;
4171 EVEL_OPTION_INT roundTripDelay;
4173 } END_OF_CALL_VOICE_QUALITY_METRICS;
4175 /**************************************************************************//**
4177 * JSON equivalent field: voiceQualityFields
4178 *****************************************************************************/
4180 typedef struct event_voiceQuality {
4181 /***************************************************************************/
4182 /* Header and version */
4183 /***************************************************************************/
4184 EVENT_HEADER header;
4188 /***************************************************************************/
4189 /* Mandatory fields */
4190 /***************************************************************************/
4192 char *calleeSideCodec;
4193 char *callerSideCodec;
4196 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
4197 END_OF_CALL_VOICE_QUALITY_METRICS *endOfCallVqmSummaries;
4199 /***************************************************************************/
4200 /* Optional fields */
4201 /***************************************************************************/
4202 EVEL_OPTION_STRING phoneNumber;
4203 DLIST additionalInformation;
4205 } EVENT_VOICE_QUALITY;
4206 /**************************************************************************//**
4207 * Voice Quality Additional Info.
4208 * JSON equivalent field: additionalInformation
4209 *****************************************************************************/
4210 typedef struct voice_quality_additional_info {
4213 } VOICE_QUALITY_ADDL_INFO;
4215 /**************************************************************************//**
4216 * Create a new voice quality event.
4218 * @note The mandatory fields on the Voice Quality must be supplied to this
4219 * factory function and are immutable once set. Optional fields have
4220 * explicit setter functions, but again values may only be set once
4221 * so that the Voice Quality has immutable properties.
4222 * @param event_name Unique Event Name
4223 * @param event_id A universal identifier of the event for analysis etc
4224 * @param calleeSideCodec Callee codec for the call.
4225 * @param callerSideCodec Caller codec for the call.
4226 * @param correlator Constant across all events on this call.
4227 * @param midCallRtcp Base64 encoding of the binary RTCP data
4228 * (excluding Eth/IP/UDP headers).
4229 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
4230 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
4231 * event is not used (i.e. posted) it must be released using
4232 ::evel_free_voice_quality.
4233 * @retval NULL Failed to create the event.
4234 *****************************************************************************/
4235 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char* ev_name, const char *ev_id,
4236 const char * const calleeSideCodec,
4237 const char * const callerSideCodec, const char * const correlator,
4238 const char * const midCallRtcp, const char * const vendorVnfNameFields);
4240 /**************************************************************************//**
4241 * Set the Callee side codec for Call for domain Voice Quality
4243 * @note The property is treated as immutable: it is only valid to call
4244 * the setter once. However, we don't assert if the caller tries to
4245 * overwrite, just ignoring the update instead.
4247 * @param voiceQuality Pointer to the Voice Quality Event.
4248 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
4249 * string. The caller does not need to
4250 * preserve the value once the function
4252 *****************************************************************************/
4253 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4254 const char * const calleeCodecForCall);
4256 /**************************************************************************//**
4257 * Set the Caller side codec for Call for domain Voice Quality
4259 * @note The property is treated as immutable: it is only valid to call
4260 * the setter once. However, we don't assert if the caller tries to
4261 * overwrite, just ignoring the update instead.
4263 * @param voiceQuality Pointer to the Voice Quality Event.
4264 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
4265 * string. The caller does not need to
4266 * preserve the value once the function
4268 *****************************************************************************/
4269 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4270 const char * const callerCodecForCall);
4272 /**************************************************************************//**
4273 * Set the correlator for domain Voice Quality
4275 * @note The property is treated as immutable: it is only valid to call
4276 * the setter once. However, we don't assert if the caller tries to
4277 * overwrite, just ignoring the update instead.
4279 * @param voiceQuality Pointer to the Voice Quality Event.
4280 * @param correlator The correlator value to be set. ASCIIZ
4281 * string. The caller does not need to
4282 * preserve the value once the function
4284 *****************************************************************************/
4285 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4286 const char * const vCorrelator);
4288 /**************************************************************************//**
4289 * Set the RTCP Call Data for domain Voice Quality
4291 * @note The property is treated as immutable: it is only valid to call
4292 * the setter once. However, we don't assert if the caller tries to
4293 * overwrite, just ignoring the update instead.
4295 * @param voiceQuality Pointer to the Voice Quality Event.
4296 * @param rtcpCallData The RTCP Call Data to be set. ASCIIZ
4297 * string. The caller does not need to
4298 * preserve the value once the function
4300 *****************************************************************************/
4301 void evel_voice_quality_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4302 const char * const rtcpCallData);
4304 /**************************************************************************//**
4305 * Set the Vendor VNF Name fields for domain Voice Quality
4307 * @note The property is treated as immutable: it is only valid to call
4308 * the setter once. However, we don't assert if the caller tries to
4309 * overwrite, just ignoring the update instead.
4311 * @param voiceQuality Pointer to the Voice Quality Event.
4312 * @param nameFields The Vendor, VNF and VfModule names to be set.
4313 * ASCIIZ string. The caller does not need to
4314 * preserve the value once the function
4316 *****************************************************************************/
4317 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4318 const char * const nameFields);
4320 /**************************************************************************//**
4321 * Add an End of Call Voice Quality Metrices
4323 * The adjacencyName and endpointDescription is null delimited ASCII string.
4324 * The library takes a copy so the caller does not have to preserve values
4325 * after the function returns.
4327 * @param voiceQuality Pointer to the measurement.
4328 * @param adjacencyName Adjacency name
4329 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4330 * @param endpointJitter Endpoint jitter
4331 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4332 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4333 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4334 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4335 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4336 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4337 * @param localJitter Local jitter.
4338 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4339 * @param localRtpOctetsReceived Local RTP octets received.
4340 * @param localRtpOctetsSent Local RTP octets sent.
4341 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4342 * @param localRtpPacketsReceived Local RTP packets received.
4343 * @param localRtpPacketsSent Local RTP packets sent.
4344 * @param mosCqe Decimal range from 1 to 5
4346 * @param packetsLost No Packets lost
4347 * @param packetLossPercent Calculated percentage packet loss
4348 * @param rFactor rFactor from 0 to 100
4349 * @param roundTripDelay Round trip delay in milliseconds
4350 *****************************************************************************/
4351 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4352 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4354 int endpointRtpOctetsDiscarded,
4355 int endpointRtpOctetsReceived,
4356 int endpointRtpOctetsSent,
4357 int endpointRtpPacketsDiscarded,
4358 int endpointRtpPacketsReceived,
4359 int endpointRtpPacketsSent,
4361 int localRtpOctetsDiscarded,
4362 int localRtpOctetsReceived,
4363 int localRtpOctetsSent,
4364 int localRtpPacketsDiscarded,
4365 int localRtpPacketsReceived,
4366 int localRtpPacketsSent,
4369 int packetLossPercent,
4371 int roundTripDelay);
4373 /**************************************************************************//**
4374 * Free a Voice Quality.
4376 * Free off the Voce Quality supplied. Will free all the contained allocated
4379 * @note It does not free the Voice Quality itself, since that may be part of a
4381 *****************************************************************************/
4382 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4384 /**************************************************************************//**
4385 * Add an additional value name/value pair to the Voice Quality.
4387 * The name and value are null delimited ASCII strings. The library takes
4388 * a copy so the caller does not have to preserve values after the function
4391 * @param fault Pointer to the fault.
4392 * @param name ASCIIZ string with the attribute's name. The caller
4393 * does not need to preserve the value once the function
4395 * @param value ASCIIZ string with the attribute's value. The caller
4396 * does not need to preserve the value once the function
4398 *****************************************************************************/
4399 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4402 /*****************************************************************************/
4403 /*****************************************************************************/
4405 /* THRESHOLD CROSSING ALERT */
4407 /*****************************************************************************/
4408 /*****************************************************************************/
4410 typedef enum evel_event_action {
4411 EVEL_EVENT_ACTION_CLEAR,
4412 EVEL_EVENT_ACTION_CONTINUE,
4413 EVEL_EVENT_ACTION_SET,
4414 EVEL_MAX_EVENT_ACTION
4417 typedef enum evel_alert_type {
4419 EVEL_ELEMENT_ANOMALY,
4420 EVEL_INTERFACE_ANOMALY,
4421 EVEL_SERVICE_ANOMALY,
4426 typedef struct perf_counter {
4429 char * thresholdCrossed;
4434 /*****************************************************************************/
4435 /* Supported Threshold Crossing version. */
4436 /*****************************************************************************/
4437 #define EVEL_THRESHOLD_CROSS_MAJOR_VERSION 2
4438 #define EVEL_THRESHOLD_CROSS_MINOR_VERSION 0
4440 /**************************************************************************//**
4441 * Threshold Crossing.
4442 * JSON equivalent field: Threshold Cross Fields
4443 *****************************************************************************/
4444 typedef struct event_threshold_cross {
4445 /***************************************************************************/
4446 /* Header and version */
4447 /***************************************************************************/
4448 EVENT_HEADER header;
4452 /***************************************************************************/
4453 /* Mandatory fields */
4454 /***************************************************************************/
4455 PERF_COUNTER additionalParameters;
4456 EVEL_EVENT_ACTION alertAction;
4457 char * alertDescription;
4458 EVEL_ALERT_TYPE alertType;
4459 unsigned long long collectionTimestamp;
4460 EVEL_SEVERITIES eventSeverity;
4461 unsigned long long eventStartTimestamp;
4463 /***************************************************************************/
4464 /* Optional fields */
4465 /***************************************************************************/
4466 DLIST additional_info;
4467 EVEL_OPTION_STRING alertValue;
4469 EVEL_OPTION_STRING dataCollector;
4470 EVEL_OPTION_STRING elementType;
4471 EVEL_OPTION_STRING interfaceName;
4472 EVEL_OPTION_STRING networkService;
4473 EVEL_OPTION_STRING possibleRootCause;
4475 } EVENT_THRESHOLD_CROSS;
4478 /**************************************************************************//**
4479 * Create a new Threshold Crossing Alert event.
4481 * @note The mandatory fields on the TCA must be supplied to this factory
4482 * function and are immutable once set. Optional fields have explicit
4483 * setter functions, but again values may only be set once so that the
4484 * TCA has immutable properties.
4486 * @param event_name Unique Event Name
4487 * @param event_id A universal identifier of the event for analysis etc
4488 * @param char* tcriticality Performance Counter Criticality MAJ MIN,
4489 * @param char* tname Performance Counter Threshold name
4490 * @param char* tthresholdCrossed Counter Threshold crossed value
4491 * @param char* tvalue Counter actual value
4492 * @param EVEL_EVENT_ACTION talertAction Alert set continue or clear
4493 * @param char* talertDescription
4494 * @param EVEL_ALERT_TYPE talertType Kind of anamoly
4495 * @param unsigned long long tcollectionTimestamp time at which alert was collected
4496 * @param EVEL_SEVERITIES teventSeverity Severity of Alert
4497 * @param unsigned long long teventStartTimestamp Time when this alert started
4499 * @returns pointer to the newly manufactured ::EVENT_THRESHOLD_CROSS. If the
4500 * event is not used it must be released using
4501 * ::evel_free_threshold_cross
4502 * @retval NULL Failed to create the event.
4503 *****************************************************************************/
4504 EVENT_THRESHOLD_CROSS * evel_new_threshold_cross(
4505 const char* ev_name, const char *ev_id,
4506 char * tcriticality,
4508 char * tthresholdCrossed,
4510 EVEL_EVENT_ACTION talertAction,
4511 char * talertDescription,
4512 EVEL_ALERT_TYPE talertType,
4513 unsigned long long tcollectionTimestamp,
4514 EVEL_SEVERITIES teventSeverity,
4515 unsigned long long teventStartTimestamp);
4517 /**************************************************************************//**
4518 * Free a Threshold cross event.
4520 * Free off the Threshold crossing event supplied. Will free all the contained allocated
4523 * @note It does not free the Threshold Cross itself, since that may be part of a
4525 *****************************************************************************/
4526 void evel_free_threshold_cross(EVENT_THRESHOLD_CROSS * const tcp);
4528 /**************************************************************************//**
4529 * Set the Event Type property of the Threshold Cross.
4531 * @note The property is treated as immutable: it is only valid to call
4532 * the setter once. However, we don't assert if the caller tries to
4533 * overwrite, just ignoring the update instead.
4535 * @param tcp Pointer to the ::EVENT_THRESHOLD_CROSS.
4536 * @param type The Event Type to be set. ASCIIZ string. The caller
4537 * does not need to preserve the value once the function
4539 *****************************************************************************/
4540 void evel_threshold_cross_type_set(EVENT_THRESHOLD_CROSS * const tcp, char * type);
4542 /**************************************************************************//**
4543 * Add an optional additional alertid value to Alert.
4545 * @param alertid Adds Alert ID
4546 *****************************************************************************/
4547 void evel_threshold_cross_alertid_add(EVENT_THRESHOLD_CROSS * const event,char * alertid);
4549 /**************************************************************************//**
4550 * Set the TCA probable Root cause.
4552 * @param sheader Possible root cause to Threshold
4553 *****************************************************************************/
4554 void evel_threshold_cross_possible_rootcause_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4555 /**************************************************************************//**
4556 * Set the TCA networking cause.
4558 * @param sheader Possible networking service value to Threshold
4559 *****************************************************************************/
4560 void evel_threshold_cross_networkservice_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4561 /**************************************************************************//**
4562 * Set the TCA Interface name.
4564 * @param sheader Interface name to threshold
4565 *****************************************************************************/
4566 void evel_threshold_cross_interfacename_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4567 /**************************************************************************//**
4568 * Set the TCA Data element type.
4570 * @param sheader element type of Threshold
4571 *****************************************************************************/
4572 void evel_threshold_cross_data_elementtype_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4573 /**************************************************************************//**
4574 * Set the TCA Data collector value.
4576 * @param sheader Data collector value
4577 *****************************************************************************/
4578 void evel_threshold_cross_data_collector_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4579 /**************************************************************************//**
4580 * Set the TCA alert value.
4582 * @param sheader Possible alert value
4583 *****************************************************************************/
4584 void evel_threshold_cross_alertvalue_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4586 /**************************************************************************//**
4587 * Add an additional field name/value pair to the THRESHOLD CROSS event.
4589 * The name and value are null delimited ASCII strings. The library takes
4590 * a copy so the caller does not have to preserve values after the function
4593 * @param state_change Pointer to the ::EVENT_THRESHOLD_CROSS.
4594 * @param name ASCIIZ string with the attribute's name. The caller
4595 * does not need to preserve the value once the function
4597 * @param value ASCIIZ string with the attribute's value. The caller
4598 * does not need to preserve the value once the function
4600 *****************************************************************************/
4601 void evel_threshold_cross_addl_info_add(EVENT_THRESHOLD_CROSS * const tcp,
4602 const char * const name,
4603 const char * const value);
4605 /*****************************************************************************/
4606 /*****************************************************************************/
4610 /*****************************************************************************/
4611 /*****************************************************************************/
4613 /*****************************************************************************/
4615 /*****************************************************************************/
4616 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4617 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4618 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4619 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4621 #define EVEL_ENTER() \
4623 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4624 debug_indent += 2; \
4626 #define EVEL_EXIT() \
4628 debug_indent -= 2; \
4629 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4632 #define INDENT_SEPARATORS \
4633 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4635 extern EVEL_LOG_LEVELS debug_level;
4636 extern int debug_indent;
4639 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4641 /**************************************************************************//**
4642 * Initialize logging
4644 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4645 * @param[in] ident The identifier for our logs.
4646 *****************************************************************************/
4647 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4649 /**************************************************************************//**
4650 * Log debug information
4652 * Logs debugging information in a platform independent manner.
4654 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4655 * @param[in] format Log formatting string in printf format.
4656 * @param[in] ... Variable argument list.
4657 *****************************************************************************/
4658 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4660 /***************************************************************************//*
4661 * Store the formatted string into the static error string and log the error.
4663 * @param format Error string in standard printf format.
4664 * @param ... Variable parameters to be substituted into the format string.
4665 *****************************************************************************/
4666 void log_error_state(char * format, ...);