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 path The optional path (may be NULL).
1433 * @param topic The optional topic part of the URL (may be NULL).
1434 * @param ring_buf_size Ring buffer size (>=100) ~ Avg Messages in 1hr
1435 * @param secure Whether to use HTTPS (0=HTTP, 1=HTTPS).
1436 * @param cert_file_path Path to client certificate file
1437 * @param key_file_path Path to client key file
1438 * @param ca_info Path to CA info
1439 * @param ca_file_path Path to CA file
1440 * @param verify_peer SSL verification of peer 0 or 1
1441 * @param verify_host SSL verification of host 0 or 1
1442 * @param username Username for Basic Authentication of requests.
1443 * @param password Password for Basic Authentication of requests.
1444 * @param source_ip The ip of node we represent.(NULL for default ip)
1445 * @param source_type The kind of node we represent.
1446 * @param role The role this node undertakes.
1447 * @param verbosity 0 for normal operation, positive values for chattier
1450 * @returns Status code
1451 * @retval EVEL_SUCCESS On success
1452 * @retval ::EVEL_ERR_CODES On failure.
1453 *****************************************************************************/
1454 EVEL_ERR_CODES evel_initialize(const char * const fqdn,
1456 const char * const path,
1457 const char * const topic,
1460 const char * const cert_file_path,
1461 const char * const key_file_path,
1462 const char * const ca_info,
1463 const char * const ca_file_path,
1466 const char * const username,
1467 const char * const password,
1468 const char * const source_ip,
1469 EVEL_SOURCE_TYPES source_type,
1470 const char * const role,
1474 /**************************************************************************//**
1475 * Initialize value for vm_name for all coming events
1476 * @param source_name Source name string.
1477 * Must confirm with EVEL source name standard
1478 * @returns Status code
1479 * @retval EVEL_SUCCESS On success
1480 * @retval ::EVEL_ERR_CODES On failure.
1481 *****************************************************************************/
1482 EVEL_ERR_CODES evel_set_source_name(char * src_name);
1485 /**************************************************************************//**
1486 * Clean up the EVEL library.
1488 * @note that at present don't expect Init/Term cycling not to leak memory!
1490 * @returns Status code
1491 * @retval EVEL_SUCCESS On success
1492 * @retval "One of ::EVEL_ERR_CODES" On failure.
1493 *****************************************************************************/
1494 EVEL_ERR_CODES evel_terminate(void);
1496 EVEL_ERR_CODES evel_post_event(EVENT_HEADER * event);
1497 const char * evel_error_string(void);
1500 /**************************************************************************//**
1503 * Free off the event supplied. Will free all the contained allocated memory.
1505 * @note It is safe to free a NULL pointer.
1506 *****************************************************************************/
1507 void evel_free_event(void * event);
1509 /**************************************************************************//**
1510 * Encode the event as a JSON event object according to AT&T's schema.
1512 * @param json Pointer to where to store the JSON encoded data.
1513 * @param mode Event mode or Batch mode
1514 * @param max_size Size of storage available in json_body.
1515 * @param event Pointer to the ::EVENT_HEADER to encode.
1516 * @returns Number of bytes actually written.
1517 *****************************************************************************/
1518 int evel_json_encode_event(char * json,
1520 EVENT_HEADER * event);
1521 int evel_json_encode_batch_event(char * json,
1523 EVENT_HEADER * event);
1524 /**************************************************************************//**
1525 * Initialize an event instance id.
1527 * @param vfield Pointer to the event vnfname field being initialized.
1528 * @param vendor_id The vendor id to encode in the event instance id.
1529 * @param event_id The event id to encode in the event instance id.
1530 *****************************************************************************/
1531 void evel_init_vendor_field(VENDOR_VNFNAME_FIELD * const vfield,
1532 const char * const vendor_name);
1534 /**************************************************************************//**
1535 * Set the Vendor module property of the Vendor.
1537 * @note The property is treated as immutable: it is only valid to call
1538 * the setter once. However, we don't assert if the caller tries to
1539 * overwrite, just ignoring the update instead.
1541 * @param vfield Pointer to the Vendor field.
1542 * @param module_name The module name to be set. ASCIIZ string. The caller
1543 * does not need to preserve the value once the function
1545 *****************************************************************************/
1546 void evel_vendor_field_module_set(VENDOR_VNFNAME_FIELD * const vfield,
1547 const char * const module_name);
1548 /**************************************************************************//**
1549 * Set the Vendor module property of the Vendor.
1551 * @note The property is treated as immutable: it is only valid to call
1552 * the setter once. However, we don't assert if the caller tries to
1553 * overwrite, just ignoring the update instead.
1555 * @param vfield Pointer to the Vendor field.
1556 * @param module_name The module name to be set. ASCIIZ string. The caller
1557 * does not need to preserve the value once the function
1559 *****************************************************************************/
1560 void evel_vendor_field_vnfname_set(VENDOR_VNFNAME_FIELD * const vfield,
1561 const char * const vnfname);
1562 /**************************************************************************//**
1563 * Free an event instance id.
1565 * @param vfield Pointer to the event vnfname_field being freed.
1566 *****************************************************************************/
1567 void evel_free_event_vendor_field(VENDOR_VNFNAME_FIELD * const vfield);
1569 /**************************************************************************//**
1570 * Callback function to provide returned data.
1572 * Copy data into the supplied buffer, write_callback::ptr, checking size
1575 * @returns Number of bytes placed into write_callback::ptr. 0 for EOF.
1576 *****************************************************************************/
1577 size_t evel_write_callback(void *contents,
1582 /*****************************************************************************/
1583 /*****************************************************************************/
1585 /* HEARTBEAT - (includes common header, too) */
1587 /*****************************************************************************/
1588 /*****************************************************************************/
1590 /**************************************************************************//**
1591 * Create a new heartbeat event.
1593 * @note that the heartbeat is just a "naked" commonEventHeader!
1595 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1596 * not used it must be released using ::evel_free_event
1597 * @retval NULL Failed to create the event.
1598 *****************************************************************************/
1599 EVENT_HEADER * evel_new_heartbeat(void);
1601 /**************************************************************************//**
1602 * Create a new heartbeat event of given name and type.
1604 * @note that the heartbeat is just a "naked" commonEventHeader!
1606 * @param event_name Unique Event Name: {DomainAbbreviation}_{AsdcModel or ApplicationPlatform}_{DescriptionOfInfoBeingConveyed}
1607 * @param event_id A universal identifier of the event for: troubleshooting, cross-referencing of alarms for alarm correlation, offline log analysis, etc
1609 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1610 * not used it must be released using ::evel_free_event
1611 * @retval NULL Failed to create the event.
1612 *****************************************************************************/
1613 EVENT_HEADER * evel_new_heartbeat_nameid(const char* ev_name, const char *ev_id);
1616 /**************************************************************************//**
1617 * Free an event header.
1619 * Free off the event header supplied. Will free all the contained allocated
1622 * @note It does not free the header itself, since that may be part of a
1624 *****************************************************************************/
1625 void evel_free_header(EVENT_HEADER * const event);
1627 /**************************************************************************//**
1628 * Initialize a newly created event header.
1630 * @param header Pointer to the header being initialized.
1631 *****************************************************************************/
1632 void evel_init_header(EVENT_HEADER * const header,const char *const eventname);
1634 /**************************************************************************//**
1635 * Set the Event Type property of the event header.
1637 * @param header Pointer to the ::EVENT_HEADER.
1638 * @param type The Event Type to be set. ASCIIZ string. The caller
1639 * does not need to preserve the value once the function
1641 *****************************************************************************/
1642 void evel_header_type_set(EVENT_HEADER * const header,
1643 const char * const type);
1645 /**************************************************************************//**
1646 * Set the next event_sequence to use.
1648 * @param sequence The next sequence number to use.
1649 *****************************************************************************/
1650 void evel_set_global_event_sequence(const int sequence);
1652 /**************************************************************************//**
1653 * Set the Event Sequence property of the event header.
1655 * @note This is mainly for tracking fault event sequence numbers
1657 * @param header Pointer to the ::EVENT_HEADER.
1658 * @param sequence_number
1660 *****************************************************************************/
1661 void evel_event_sequence_set(EVENT_HEADER * const header,const int sequence_number);
1663 /**************************************************************************//**
1664 * Set the Start Epoch property of the event header.
1666 * @note The Start Epoch defaults to the time of event creation.
1668 * @param header Pointer to the ::EVENT_HEADER.
1669 * @param start_epoch_microsec
1670 * The start epoch to set, in microseconds.
1671 *****************************************************************************/
1672 void evel_start_epoch_set(EVENT_HEADER * const header,
1673 const unsigned long long start_epoch_microsec);
1675 /**************************************************************************//**
1676 * Set the Last Epoch property of the event header.
1678 * @note The Last Epoch defaults to the time of event creation.
1680 * @param header Pointer to the ::EVENT_HEADER.
1681 * @param last_epoch_microsec
1682 * The last epoch to set, in microseconds.
1683 *****************************************************************************/
1684 void evel_last_epoch_set(EVENT_HEADER * const header,
1685 const unsigned long long last_epoch_microsec);
1687 /**************************************************************************//**
1688 * Set the Reporting Entity Name property of the event header.
1690 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1692 * @param header Pointer to the ::EVENT_HEADER.
1693 * @param entity_name The entity name to set.
1694 *****************************************************************************/
1695 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1696 const char * const entity_name);
1698 /**************************************************************************//**
1699 * Set the Reporting Entity Id property of the event header.
1701 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1703 * @param header Pointer to the ::EVENT_HEADER.
1704 * @param entity_id The entity id to set.
1705 *****************************************************************************/
1706 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1707 const char * const entity_id);
1709 /**************************************************************************//**
1710 * Set the NFC Naming code property of the event header.
1712 * @param header Pointer to the ::EVENT_HEADER.
1713 * @param nfcnamingcode String
1714 *****************************************************************************/
1715 void evel_nfcnamingcode_set(EVENT_HEADER * const header,
1716 const char * const nfcnam);
1717 /**************************************************************************//**
1718 * Set the NF Naming code property of the event header.
1720 * @param header Pointer to the ::EVENT_HEADER.
1721 * @param nfnamingcode String
1722 *****************************************************************************/
1723 void evel_nfnamingcode_set(EVENT_HEADER * const header,
1724 const char * const nfnam);
1726 /*****************************************************************************/
1727 /*****************************************************************************/
1731 /*****************************************************************************/
1732 /*****************************************************************************/
1734 /**************************************************************************//**
1735 * Create a new fault event.
1737 * @note The mandatory fields on the Fault must be supplied to this factory
1738 * function and are immutable once set. Optional fields have explicit
1739 * setter functions, but again values may only be set once so that the
1740 * Fault has immutable properties.
1741 * @param event_name Unique Event Name
1742 * @param event_id A universal identifier of the event for analysis etc
1743 * @param condition The condition indicated by the Fault.
1744 * @param specific_problem The specific problem triggering the fault.
1745 * @param priority The priority of the event.
1746 * @param severity The severity of the Fault.
1747 * @param ev_source_type Source of Alarm event
1748 * @param version fault version
1749 * @param status status of Virtual Function
1750 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1751 * not used (i.e. posted) it must be released using ::evel_free_fault.
1752 * @retval NULL Failed to create the event.
1753 *****************************************************************************/
1754 EVENT_FAULT * evel_new_fault(const char* ev_name, const char *ev_id,
1755 const char * const condition,
1756 const char * const specific_problem,
1757 EVEL_EVENT_PRIORITIES priority,
1758 EVEL_SEVERITIES severity,
1759 EVEL_SOURCE_TYPES ev_source_type,
1760 EVEL_VF_STATUSES status);
1762 /**************************************************************************//**
1765 * Free off the Fault supplied. Will free all the contained allocated memory.
1767 * @note It does not free the Fault itself, since that may be part of a
1769 *****************************************************************************/
1770 void evel_free_fault(EVENT_FAULT * event);
1772 /**************************************************************************//**
1773 * Set the Fault Category property of the Fault.
1775 * @note The property is treated as immutable: it is only valid to call
1776 * the setter once. However, we don't assert if the caller tries to
1777 * overwrite, just ignoring the update instead.
1779 * @param fault Pointer to the fault.
1780 * @param category Category : license, link, routing, security, signaling.
1781 * ASCIIZ string. The caller
1782 * does not need to preserve the value once the function
1784 *****************************************************************************/
1785 void evel_fault_category_set(EVENT_FAULT * fault,
1786 const char * const category);
1788 /**************************************************************************//**
1789 * Set the Alarm Interface A property of the Fault.
1791 * @note The property is treated as immutable: it is only valid to call
1792 * the setter once. However, we don't assert if the caller tries to
1793 * overwrite, just ignoring the update instead.
1795 * @param fault Pointer to the fault.
1796 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1797 * does not need to preserve the value once the function
1799 *****************************************************************************/
1800 void evel_fault_interface_set(EVENT_FAULT * fault,
1801 const char * const interface);
1803 /**************************************************************************//**
1804 * Add an additional value name/value pair to the Fault.
1806 * The name and value are null delimited ASCII strings. The library takes
1807 * a copy so the caller does not have to preserve values after the function
1810 * @param fault Pointer to the fault.
1811 * @param name ASCIIZ string with the attribute's name.
1812 * @param value ASCIIZ string with the attribute's value.
1813 *****************************************************************************/
1814 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1816 /**************************************************************************//**
1817 * Set the Event Type property of the Fault.
1819 * @note The property is treated as immutable: it is only valid to call
1820 * the setter once. However, we don't assert if the caller tries to
1821 * overwrite, just ignoring the update instead.
1823 * @param fault Pointer to the fault.
1824 * @param type The Event Type to be set. ASCIIZ string. The caller
1825 * does not need to preserve the value once the function
1827 *****************************************************************************/
1828 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1830 /*****************************************************************************/
1831 /*****************************************************************************/
1835 /*****************************************************************************/
1836 /*****************************************************************************/
1838 /**************************************************************************//**
1839 * Create a new Measurement event.
1841 * @note The mandatory fields on the Measurement must be supplied to this
1842 * factory function and are immutable once set. Optional fields have
1843 * explicit setter functions, but again values may only be set once so
1844 * that the Measurement has immutable properties.
1846 * @param measurement_interval
1847 * @param event_name Unique Event Name
1848 * @param event_id A universal identifier of the event for analysis etc
1850 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1851 * event is not used (i.e. posted) it must be released using
1852 * ::evel_free_event.
1853 * @retval NULL Failed to create the event.
1854 *****************************************************************************/
1855 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval,const char* ev_name, const char *ev_id);
1857 /**************************************************************************//**
1858 * Free a Measurement.
1860 * Free off the Measurement supplied. Will free all the contained allocated
1863 * @note It does not free the Measurement itself, since that may be part of a
1865 *****************************************************************************/
1866 void evel_free_measurement(EVENT_MEASUREMENT * event);
1868 /**************************************************************************//**
1869 * Set the Event Type property of the Measurement.
1871 * @note The property is treated as immutable: it is only valid to call
1872 * the setter once. However, we don't assert if the caller tries to
1873 * overwrite, just ignoring the update instead.
1875 * @param measurement Pointer to the Measurement.
1876 * @param type The Event Type to be set. ASCIIZ string. The caller
1877 * does not need to preserve the value once the function
1879 *****************************************************************************/
1880 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1881 const char * const type);
1883 /**************************************************************************//**
1884 * Set the Concurrent Sessions property of the Measurement.
1886 * @note The property is treated as immutable: it is only valid to call
1887 * the setter once. However, we don't assert if the caller tries to
1888 * overwrite, just ignoring the update instead.
1890 * @param measurement Pointer to the Measurement.
1891 * @param concurrent_sessions The Concurrent Sessions to be set.
1892 *****************************************************************************/
1893 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1894 int concurrent_sessions);
1896 /**************************************************************************//**
1897 * Set the Configured Entities property of the Measurement.
1899 * @note The property is treated as immutable: it is only valid to call
1900 * the setter once. However, we don't assert if the caller tries to
1901 * overwrite, just ignoring the update instead.
1903 * @param measurement Pointer to the Measurement.
1904 * @param configured_entities The Configured Entities to be set.
1905 *****************************************************************************/
1906 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1907 int configured_entities);
1909 /**************************************************************************//**
1910 * Add an additional set of Errors to the Measurement.
1912 * @note The property is treated as immutable: it is only valid to call
1913 * the setter once. However, we don't assert if the caller tries to
1914 * overwrite, just ignoring the update instead.
1916 * @param measurement Pointer to the measurement.
1917 * @param receive_discards The number of receive discards.
1918 * @param receive_errors The number of receive errors.
1919 * @param transmit_discards The number of transmit discards.
1920 * @param transmit_errors The number of transmit errors.
1921 *****************************************************************************/
1922 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1923 int receive_discards,
1925 int transmit_discards,
1926 int transmit_errors);
1928 /**************************************************************************//**
1929 * Set the Mean Request Latency property of the Measurement.
1931 * @note The property is treated as immutable: it is only valid to call
1932 * the setter once. However, we don't assert if the caller tries to
1933 * overwrite, just ignoring the update instead.
1935 * @param measurement Pointer to the Measurement.
1936 * @param mean_request_latency The Mean Request Latency to be set.
1937 *****************************************************************************/
1938 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1939 double mean_request_latency);
1941 /**************************************************************************//**
1942 * Set the Request Rate property of the Measurement.
1944 * @note The property is treated as immutable: it is only valid to call
1945 * the setter once. However, we don't assert if the caller tries to
1946 * overwrite, just ignoring the update instead.
1948 * @param measurement Pointer to the Measurement.
1949 * @param request_rate The Request Rate to be set.
1950 *****************************************************************************/
1951 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
1954 /**************************************************************************//**
1955 * Add an additional CPU usage value name/value pair to the Measurement.
1957 * The name and value are null delimited ASCII strings. The library takes
1958 * a copy so the caller does not have to preserve values after the function
1961 * @param measurement Pointer to the measurement.
1962 * @param id ASCIIZ string with the CPU's identifier.
1963 * @param usage CPU utilization.
1964 *****************************************************************************/
1965 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
1967 /**************************************************************************//**
1968 * Set the CPU Idle value in measurement interval
1969 * percentage of CPU time spent in the idle task
1971 * @note The property is treated as immutable: it is only valid to call
1972 * the setter once. However, we don't assert if the caller tries to
1973 * overwrite, just ignoring the update instead.
1975 * @param cpu_use Pointer to the CPU Use.
1977 *****************************************************************************/
1978 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
1981 /**************************************************************************//**
1982 * Set the percentage of time spent servicing interrupts
1984 * @note The property is treated as immutable: it is only valid to call
1985 * the setter once. However, we don't assert if the caller tries to
1986 * overwrite, just ignoring the update instead.
1988 * @param cpu_use Pointer to the CPU Use.
1990 *****************************************************************************/
1991 void evel_measurement_cpu_use_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
1994 /**************************************************************************//**
1995 * Set the percentage of time spent running user space processes that have been niced
1997 * @note The property is treated as immutable: it is only valid to call
1998 * the setter once. However, we don't assert if the caller tries to
1999 * overwrite, just ignoring the update instead.
2001 * @param cpu_use Pointer to the CPU Use.
2003 *****************************************************************************/
2004 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
2007 /**************************************************************************//**
2008 * Set the percentage of time spent handling soft irq interrupts
2010 * @note The property is treated as immutable: it is only valid to call
2011 * the setter once. However, we don't assert if the caller tries to
2012 * overwrite, just ignoring the update instead.
2014 * @param cpu_use Pointer to the CPU Use.
2016 *****************************************************************************/
2017 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
2019 /**************************************************************************//**
2020 * Set the percentage of time spent in involuntary wait
2022 * @note The property is treated as immutable: it is only valid to call
2023 * the setter once. However, we don't assert if the caller tries to
2024 * overwrite, just ignoring the update instead.
2026 * @param cpu_use Pointer to the CPU Use.
2028 *****************************************************************************/
2029 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
2031 /**************************************************************************//**
2032 * Set the percentage of time spent on system tasks running the kernel
2034 * @note The property is treated as immutable: it is only valid to call
2035 * the setter once. However, we don't assert if the caller tries to
2036 * overwrite, just ignoring the update instead.
2038 * @param cpu_use Pointer to the CPU Use.
2040 *****************************************************************************/
2041 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
2043 /**************************************************************************//**
2044 * Set the percentage of time spent running un-niced user space processes
2046 * @note The property is treated as immutable: it is only valid to call
2047 * the setter once. However, we don't assert if the caller tries to
2048 * overwrite, just ignoring the update instead.
2050 * @param cpu_use Pointer to the CPU Use.
2052 *****************************************************************************/
2053 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
2055 /**************************************************************************//**
2056 * Set the percentage of CPU time spent waiting for I/O operations to complete
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_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
2068 /**************************************************************************//**
2069 * Add an additional File System usage value name/value pair to the
2072 * The filesystem_name is null delimited ASCII string. The library takes a
2073 * copy so the caller does not have to preserve values after the function
2076 * @param measurement Pointer to the measurement.
2077 * @param filesystem_name ASCIIZ string with the file-system's UUID.
2078 * @param block_configured Block storage configured.
2079 * @param block_used Block storage in use.
2080 * @param block_iops Block storage IOPS.
2081 * @param ephemeral_configured Ephemeral storage configured.
2082 * @param ephemeral_used Ephemeral storage in use.
2083 * @param ephemeral_iops Ephemeral storage IOPS.
2084 *****************************************************************************/
2085 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
2086 char * filesystem_name,
2087 double block_configured,
2090 double ephemeral_configured,
2091 double ephemeral_used,
2092 double ephemeral_iops);
2094 /**************************************************************************//**
2095 * Add a Feature usage value name/value pair to the Measurement.
2097 * The name is null delimited ASCII string. The library takes
2098 * a copy so the caller does not have to preserve values after the function
2101 * @param measurement Pointer to the measurement.
2102 * @param feature ASCIIZ string with the feature's name.
2103 * @param utilization Utilization of the feature.
2104 *****************************************************************************/
2105 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
2109 /**************************************************************************//**
2110 * Add a Additional Measurement value name/value pair to the Measurement.
2112 * The name is null delimited ASCII string. The library takes
2113 * a copy so the caller does not have to preserve values after the function
2116 * @param measurement Pointer to the Measurement.
2117 * @param group ASCIIZ string with the measurement group's name.
2118 * @param name ASCIIZ string containing the measurement's name.
2119 * @param name ASCIIZ string containing the measurement's value.
2120 *****************************************************************************/
2121 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
2122 const char * const group,
2123 const char * const name,
2124 const char * const value);
2126 /**************************************************************************//**
2127 * Add a Codec usage value name/value pair to the Measurement.
2129 * The name is null delimited ASCII string. The library takes
2130 * a copy so the caller does not have to preserve values after the function
2133 * @param measurement Pointer to the measurement.
2134 * @param codec ASCIIZ string with the codec's name.
2135 * @param utilization Utilization of the feature.
2136 *****************************************************************************/
2137 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
2141 /**************************************************************************//**
2142 * Set the Media Ports in Use property of the Measurement.
2144 * @note The property is treated as immutable: it is only valid to call
2145 * the setter once. However, we don't assert if the caller tries to
2146 * overwrite, just ignoring the update instead.
2148 * @param measurement Pointer to the measurement.
2149 * @param media_ports_in_use The media port usage to set.
2150 *****************************************************************************/
2151 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
2152 int media_ports_in_use);
2154 /**************************************************************************//**
2155 * Set the VNFC Scaling Metric property of the Measurement.
2157 * @note The property is treated as immutable: it is only valid to call
2158 * the setter once. However, we don't assert if the caller tries to
2159 * overwrite, just ignoring the update instead.
2161 * @param measurement Pointer to the measurement.
2162 * @param scaling_metric The scaling metric to set.
2163 *****************************************************************************/
2164 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
2165 int scaling_metric);
2167 /**************************************************************************//**
2168 * Create a new Latency Bucket to be added to a Measurement event.
2170 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
2171 * supplied to this factory function and are immutable once set.
2172 * Optional fields have explicit setter functions, but again values
2173 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
2174 * immutable properties.
2176 * @param count Count of events in this bucket.
2178 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
2179 * @retval NULL Failed to create the Latency Bucket.
2180 *****************************************************************************/
2181 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
2183 /**************************************************************************//**
2184 * Set the High End property of the Measurement Latency Bucket.
2186 * @note The property is treated as immutable: it is only valid to call
2187 * the setter once. However, we don't assert if the caller tries to
2188 * overwrite, just ignoring the update instead.
2190 * @param bucket Pointer to the Measurement Latency Bucket.
2191 * @param high_end High end of the bucket's range.
2192 *****************************************************************************/
2193 void evel_meas_latency_bucket_high_end_set(
2194 MEASUREMENT_LATENCY_BUCKET * const bucket,
2195 const double high_end);
2197 /**************************************************************************//**
2198 * Set the Low End property of the Measurement Latency Bucket.
2200 * @note The property is treated as immutable: it is only valid to call
2201 * the setter once. However, we don't assert if the caller tries to
2202 * overwrite, just ignoring the update instead.
2204 * @param bucket Pointer to the Measurement Latency Bucket.
2205 * @param low_end Low end of the bucket's range.
2206 *****************************************************************************/
2207 void evel_meas_latency_bucket_low_end_set(
2208 MEASUREMENT_LATENCY_BUCKET * const bucket,
2209 const double low_end);
2211 /**************************************************************************//**
2212 * Add an additional Measurement Latency Bucket to the specified event.
2214 * @param measurement Pointer to the Measurement event.
2215 * @param bucket Pointer to the Measurement Latency Bucket to add.
2216 *****************************************************************************/
2217 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2218 MEASUREMENT_LATENCY_BUCKET * const bucket);
2220 /**************************************************************************//**
2221 * Add an additional Latency Distribution bucket to the Measurement.
2223 * This function implements the previous API, purely for convenience.
2225 * @param measurement Pointer to the measurement.
2226 * @param low_end Low end of the bucket's range.
2227 * @param high_end High end of the bucket's range.
2228 * @param count Count of events in this bucket.
2229 *****************************************************************************/
2230 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2231 const double low_end,
2232 const double high_end,
2235 /**************************************************************************//**
2236 * Create a new vNIC Use to be added to a Measurement event.
2238 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2239 * to this factory function and are immutable once set. Optional
2240 * fields have explicit setter functions, but again values may only be
2241 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2244 * @param vnic_id ASCIIZ string with the vNIC's ID.
2245 * @param val_suspect True or false confidence in data.
2247 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2248 * If the structure is not used it must be released using
2249 * ::evel_measurement_free_vnic_performance.
2250 * @retval NULL Failed to create the vNIC Use.
2251 *****************************************************************************/
2252 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2254 /**************************************************************************//**
2257 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2260 * @note It does not free the vNIC Use itself, since that may be part of a
2262 *****************************************************************************/
2263 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2265 /**************************************************************************//**
2266 * Set the Accumulated Broadcast Packets Received in measurement interval
2267 * property of the vNIC performance.
2269 * @note The property is treated as immutable: it is only valid to call
2270 * the setter once. However, we don't assert if the caller tries to
2271 * overwrite, just ignoring the update instead.
2273 * @param vnic_performance Pointer to the vNIC Use.
2274 * @param recvd_bcast_packets_acc
2275 *****************************************************************************/
2276 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2277 const double recvd_bcast_packets_acc);
2278 /**************************************************************************//**
2279 * Set the Delta Broadcast Packets Received in measurement interval
2280 * property of the vNIC performance.
2282 * @note The property is treated as immutable: it is only valid to call
2283 * the setter once. However, we don't assert if the caller tries to
2284 * overwrite, just ignoring the update instead.
2286 * @param vnic_performance Pointer to the vNIC Use.
2287 * @param recvd_bcast_packets_delta
2288 *****************************************************************************/
2289 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2290 const double recvd_bcast_packets_delta);
2291 /**************************************************************************//**
2292 * Set the Discarded Packets Received in measurement interval
2293 * property of the vNIC performance.
2295 * @note The property is treated as immutable: it is only valid to call
2296 * the setter once. However, we don't assert if the caller tries to
2297 * overwrite, just ignoring the update instead.
2299 * @param vnic_performance Pointer to the vNIC Use.
2300 * @param recvd_discard_packets_acc
2301 *****************************************************************************/
2302 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2303 const double recvd_discard_packets_acc);
2304 /**************************************************************************//**
2305 * Set the Delta Discarded Packets Received in measurement interval
2306 * property of the vNIC performance.
2308 * @note The property is treated as immutable: it is only valid to call
2309 * the setter once. However, we don't assert if the caller tries to
2310 * overwrite, just ignoring the update instead.
2312 * @param vnic_performance Pointer to the vNIC Use.
2313 * @param recvd_discard_packets_delta
2314 *****************************************************************************/
2315 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2316 const double recvd_discard_packets_delta);
2317 /**************************************************************************//**
2318 * Set the Error Packets Received in measurement interval
2319 * property of the vNIC performance.
2321 * @note The property is treated as immutable: it is only valid to call
2322 * the setter once. However, we don't assert if the caller tries to
2323 * overwrite, just ignoring the update instead.
2325 * @param vnic_performance Pointer to the vNIC Use.
2326 * @param recvd_error_packets_acc
2327 *****************************************************************************/
2328 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2329 const double recvd_error_packets_acc);
2330 /**************************************************************************//**
2331 * Set the Delta Error Packets Received in measurement interval
2332 * property of the vNIC performance.
2334 * @note The property is treated as immutable: it is only valid to call
2335 * the setter once. However, we don't assert if the caller tries to
2336 * overwrite, just ignoring the update instead.
2338 * @param vnic_performance Pointer to the vNIC Use.
2339 * @param recvd_error_packets_delta
2340 *****************************************************************************/
2341 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2342 const double recvd_error_packets_delta);
2343 /**************************************************************************//**
2344 * Set the Accumulated Multicast Packets Received in measurement interval
2345 * property of the vNIC performance.
2347 * @note The property is treated as immutable: it is only valid to call
2348 * the setter once. However, we don't assert if the caller tries to
2349 * overwrite, just ignoring the update instead.
2351 * @param vnic_performance Pointer to the vNIC Use.
2352 * @param recvd_mcast_packets_acc
2353 *****************************************************************************/
2354 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2355 const double recvd_mcast_packets_acc);
2356 /**************************************************************************//**
2357 * Set the Delta Multicast Packets Received in measurement interval
2358 * property of the vNIC performance.
2360 * @note The property is treated as immutable: it is only valid to call
2361 * the setter once. However, we don't assert if the caller tries to
2362 * overwrite, just ignoring the update instead.
2364 * @param vnic_performance Pointer to the vNIC Use.
2365 * @param recvd_mcast_packets_delta
2366 *****************************************************************************/
2367 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2368 const double recvd_mcast_packets_delta);
2369 /**************************************************************************//**
2370 * Set the Accumulated Octets Received in measurement interval
2371 * property of the vNIC performance.
2373 * @note The property is treated as immutable: it is only valid to call
2374 * the setter once. However, we don't assert if the caller tries to
2375 * overwrite, just ignoring the update instead.
2377 * @param vnic_performance Pointer to the vNIC Use.
2378 * @param recvd_octets_acc
2379 *****************************************************************************/
2380 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2381 const double recvd_octets_acc);
2382 /**************************************************************************//**
2383 * Set the Delta Octets Received in measurement interval
2384 * property of the vNIC performance.
2386 * @note The property is treated as immutable: it is only valid to call
2387 * the setter once. However, we don't assert if the caller tries to
2388 * overwrite, just ignoring the update instead.
2390 * @param vnic_performance Pointer to the vNIC Use.
2391 * @param recvd_octets_delta
2392 *****************************************************************************/
2393 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2394 const double recvd_octets_delta);
2395 /**************************************************************************//**
2396 * Set the Accumulated Total Packets Received in measurement interval
2397 * property of the vNIC performance.
2399 * @note The property is treated as immutable: it is only valid to call
2400 * the setter once. However, we don't assert if the caller tries to
2401 * overwrite, just ignoring the update instead.
2403 * @param vnic_performance Pointer to the vNIC Use.
2404 * @param recvd_total_packets_acc
2405 *****************************************************************************/
2406 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2407 const double recvd_total_packets_acc);
2408 /**************************************************************************//**
2409 * Set the Delta Total Packets Received in measurement interval
2410 * property of the vNIC performance.
2412 * @note The property is treated as immutable: it is only valid to call
2413 * the setter once. However, we don't assert if the caller tries to
2414 * overwrite, just ignoring the update instead.
2416 * @param vnic_performance Pointer to the vNIC Use.
2417 * @param recvd_total_packets_delta
2418 *****************************************************************************/
2419 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2420 const double recvd_total_packets_delta);
2421 /**************************************************************************//**
2422 * Set the Accumulated Unicast Packets Received in measurement interval
2423 * property of the vNIC performance.
2425 * @note The property is treated as immutable: it is only valid to call
2426 * the setter once. However, we don't assert if the caller tries to
2427 * overwrite, just ignoring the update instead.
2429 * @param vnic_performance Pointer to the vNIC Use.
2430 * @param recvd_ucast_packets_acc
2431 *****************************************************************************/
2432 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2433 const double recvd_ucast_packets_acc);
2434 /**************************************************************************//**
2435 * Set the Delta Unicast packets Received in measurement interval
2436 * property of the vNIC performance.
2438 * @note The property is treated as immutable: it is only valid to call
2439 * the setter once. However, we don't assert if the caller tries to
2440 * overwrite, just ignoring the update instead.
2442 * @param vnic_performance Pointer to the vNIC Use.
2443 * @param recvd_ucast_packets_delta
2444 *****************************************************************************/
2445 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2446 const double recvd_ucast_packets_delta);
2447 /**************************************************************************//**
2448 * Set the Transmitted Broadcast Packets in measurement interval
2449 * property of the vNIC performance.
2451 * @note The property is treated as immutable: it is only valid to call
2452 * the setter once. However, we don't assert if the caller tries to
2453 * overwrite, just ignoring the update instead.
2455 * @param vnic_performance Pointer to the vNIC Use.
2456 * @param tx_bcast_packets_acc
2457 *****************************************************************************/
2458 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2459 const double tx_bcast_packets_acc);
2460 /**************************************************************************//**
2461 * Set the Delta Broadcast packets Transmitted in measurement interval
2462 * property of the vNIC performance.
2464 * @note The property is treated as immutable: it is only valid to call
2465 * the setter once. However, we don't assert if the caller tries to
2466 * overwrite, just ignoring the update instead.
2468 * @param vnic_performance Pointer to the vNIC Use.
2469 * @param tx_bcast_packets_delta
2470 *****************************************************************************/
2471 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2472 const double tx_bcast_packets_delta);
2473 /**************************************************************************//**
2474 * Set the Transmitted Discarded Packets in measurement interval
2475 * property of the vNIC performance.
2477 * @note The property is treated as immutable: it is only valid to call
2478 * the setter once. However, we don't assert if the caller tries to
2479 * overwrite, just ignoring the update instead.
2481 * @param vnic_performance Pointer to the vNIC Use.
2482 * @param tx_discarded_packets_acc
2483 *****************************************************************************/
2484 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2485 const double tx_discarded_packets_acc);
2486 /**************************************************************************//**
2487 * Set the Delta Discarded packets Transmitted in measurement interval
2488 * property of the vNIC performance.
2490 * @note The property is treated as immutable: it is only valid to call
2491 * the setter once. However, we don't assert if the caller tries to
2492 * overwrite, just ignoring the update instead.
2494 * @param vnic_performance Pointer to the vNIC Use.
2495 * @param tx_discarded_packets_delta
2496 *****************************************************************************/
2497 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2498 const double tx_discarded_packets_delta);
2499 /**************************************************************************//**
2500 * Set the Transmitted Errored Packets in measurement interval
2501 * property of the vNIC performance.
2503 * @note The property is treated as immutable: it is only valid to call
2504 * the setter once. However, we don't assert if the caller tries to
2505 * overwrite, just ignoring the update instead.
2507 * @param vnic_performance Pointer to the vNIC Use.
2508 * @param tx_error_packets_acc
2509 *****************************************************************************/
2510 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2511 const double tx_error_packets_acc);
2512 /**************************************************************************//**
2513 * Set the Delta Errored packets Transmitted in measurement interval
2514 * property of the vNIC performance.
2516 * @note The property is treated as immutable: it is only valid to call
2517 * the setter once. However, we don't assert if the caller tries to
2518 * overwrite, just ignoring the update instead.
2520 * @param vnic_performance Pointer to the vNIC Use.
2521 * @param tx_error_packets_delta
2522 *****************************************************************************/
2523 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2524 const double tx_error_packets_delta);
2525 /**************************************************************************//**
2526 * Set the Transmitted Multicast Packets in measurement interval
2527 * property of the vNIC performance.
2529 * @note The property is treated as immutable: it is only valid to call
2530 * the setter once. However, we don't assert if the caller tries to
2531 * overwrite, just ignoring the update instead.
2533 * @param vnic_performance Pointer to the vNIC Use.
2534 * @param tx_mcast_packets_acc
2535 *****************************************************************************/
2536 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2537 const double tx_mcast_packets_acc);
2538 /**************************************************************************//**
2539 * Set the Delta Multicast packets Transmitted in measurement interval
2540 * property of the vNIC performance.
2542 * @note The property is treated as immutable: it is only valid to call
2543 * the setter once. However, we don't assert if the caller tries to
2544 * overwrite, just ignoring the update instead.
2546 * @param vnic_performance Pointer to the vNIC Use.
2547 * @param tx_mcast_packets_delta
2548 *****************************************************************************/
2549 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2550 const double tx_mcast_packets_delta);
2551 /**************************************************************************//**
2552 * Set the Transmitted Octets in measurement interval
2553 * property of the vNIC performance.
2555 * @note The property is treated as immutable: it is only valid to call
2556 * the setter once. However, we don't assert if the caller tries to
2557 * overwrite, just ignoring the update instead.
2559 * @param vnic_performance Pointer to the vNIC Use.
2560 * @param tx_octets_acc
2561 *****************************************************************************/
2562 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2563 const double tx_octets_acc);
2564 /**************************************************************************//**
2565 * Set the Delta Octets Transmitted in measurement interval
2566 * property of the vNIC performance.
2568 * @note The property is treated as immutable: it is only valid to call
2569 * the setter once. However, we don't assert if the caller tries to
2570 * overwrite, just ignoring the update instead.
2572 * @param vnic_performance Pointer to the vNIC Use.
2573 * @param tx_octets_delta
2574 *****************************************************************************/
2575 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2576 const double tx_octets_delta);
2577 /**************************************************************************//**
2578 * Set the Transmitted Total Packets in measurement interval
2579 * property of the vNIC performance.
2581 * @note The property is treated as immutable: it is only valid to call
2582 * the setter once. However, we don't assert if the caller tries to
2583 * overwrite, just ignoring the update instead.
2585 * @param vnic_performance Pointer to the vNIC Use.
2586 * @param tx_total_packets_acc
2587 *****************************************************************************/
2588 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2589 const double tx_total_packets_acc);
2590 /**************************************************************************//**
2591 * Set the Delta Total Packets Transmitted in measurement interval
2592 * property of the vNIC performance.
2594 * @note The property is treated as immutable: it is only valid to call
2595 * the setter once. However, we don't assert if the caller tries to
2596 * overwrite, just ignoring the update instead.
2598 * @param vnic_performance Pointer to the vNIC Use.
2599 * @param tx_total_packets_delta
2600 *****************************************************************************/
2601 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2602 const double tx_total_packets_delta);
2603 /**************************************************************************//**
2604 * Set the Transmitted Unicast Packets in measurement interval
2605 * property of the vNIC performance.
2607 * @note The property is treated as immutable: it is only valid to call
2608 * the setter once. However, we don't assert if the caller tries to
2609 * overwrite, just ignoring the update instead.
2611 * @param vnic_performance Pointer to the vNIC Use.
2612 * @param tx_ucast_packets_acc
2613 *****************************************************************************/
2614 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2615 const double tx_ucast_packets_acc);
2616 /**************************************************************************//**
2617 * Set the Delta Octets Transmitted in measurement interval
2618 * property of the vNIC performance.
2620 * @note The property is treated as immutable: it is only valid to call
2621 * the setter once. However, we don't assert if the caller tries to
2622 * overwrite, just ignoring the update instead.
2624 * @param vnic_performance Pointer to the vNIC Use.
2625 * @param tx_ucast_packets_delta
2626 *****************************************************************************/
2627 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2628 const double tx_ucast_packets_delta);
2630 /**************************************************************************//**
2631 * Add an additional vNIC Use to the specified Measurement event.
2633 * @param measurement Pointer to the measurement.
2634 * @param vnic_performance Pointer to the vNIC Use to add.
2635 *****************************************************************************/
2636 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2637 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2639 /**************************************************************************//**
2640 * Add an additional vNIC usage record Measurement.
2642 * This function implements the previous API, purely for convenience.
2644 * The ID is null delimited ASCII string. The library takes a copy so the
2645 * caller does not have to preserve values after the function returns.
2647 * @param measurement Pointer to the measurement.
2648 * @param vnic_id ASCIIZ string with the vNIC's ID.
2649 * @param valset true or false confidence level
2650 * @param recvd_bcast_packets_acc Recieved broadcast packets
2651 * @param recvd_bcast_packets_delta Received delta broadcast packets
2652 * @param recvd_discarded_packets_acc Recieved discarded packets
2653 * @param recvd_discarded_packets_delta Received discarded delta packets
2654 * @param recvd_error_packets_acc Received error packets
2655 * @param recvd_error_packets_delta, Received delta error packets
2656 * @param recvd_mcast_packets_acc Received multicast packets
2657 * @param recvd_mcast_packets_delta Received delta multicast packets
2658 * @param recvd_octets_acc Received octets
2659 * @param recvd_octets_delta Received delta octets
2660 * @param recvd_total_packets_acc Received total packets
2661 * @param recvd_total_packets_delta Received delta total packets
2662 * @param recvd_ucast_packets_acc Received Unicast packets
2663 * @param recvd_ucast_packets_delta Received delta unicast packets
2664 * @param tx_bcast_packets_acc Transmitted broadcast packets
2665 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2666 * @param tx_discarded_packets_acc Transmitted packets discarded
2667 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2668 * @param tx_error_packets_acc Transmitted error packets
2669 * @param tx_error_packets_delta Transmitted delta error packets
2670 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2671 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2672 * @param tx_octets_acc Transmitted octets
2673 * @param tx_octets_delta Transmitted delta octets
2674 * @param tx_total_packets_acc Transmitted total packets
2675 * @param tx_total_packets_delta Transmitted delta total packets
2676 * @param tx_ucast_packets_acc Transmitted Unicast packets
2677 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2678 *****************************************************************************/
2679 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2680 char * const vnic_id,
2682 double recvd_bcast_packets_acc,
2683 double recvd_bcast_packets_delta,
2684 double recvd_discarded_packets_acc,
2685 double recvd_discarded_packets_delta,
2686 double recvd_error_packets_acc,
2687 double recvd_error_packets_delta,
2688 double recvd_mcast_packets_acc,
2689 double recvd_mcast_packets_delta,
2690 double recvd_octets_acc,
2691 double recvd_octets_delta,
2692 double recvd_total_packets_acc,
2693 double recvd_total_packets_delta,
2694 double recvd_ucast_packets_acc,
2695 double recvd_ucast_packets_delta,
2696 double tx_bcast_packets_acc,
2697 double tx_bcast_packets_delta,
2698 double tx_discarded_packets_acc,
2699 double tx_discarded_packets_delta,
2700 double tx_error_packets_acc,
2701 double tx_error_packets_delta,
2702 double tx_mcast_packets_acc,
2703 double tx_mcast_packets_delta,
2704 double tx_octets_acc,
2705 double tx_octets_delta,
2706 double tx_total_packets_acc,
2707 double tx_total_packets_delta,
2708 double tx_ucast_packets_acc,
2709 double tx_ucast_packets_delta);
2711 /*****************************************************************************/
2712 /*****************************************************************************/
2716 /*****************************************************************************/
2717 /*****************************************************************************/
2719 /**************************************************************************//**
2720 * Create a new Report event.
2722 * @note The mandatory fields on the Report must be supplied to this
2723 * factory function and are immutable once set. Optional fields have
2724 * explicit setter functions, but again values may only be set once so
2725 * that the Report has immutable properties.
2727 * @param measurement_interval
2728 * @param event_name Unique Event Name
2729 * @param event_id A universal identifier of the event for analysis etc
2731 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2732 * not used (i.e. posted) it must be released using
2733 * ::evel_free_report.
2734 * @retval NULL Failed to create the event.
2735 *****************************************************************************/
2736 EVENT_REPORT * evel_new_report(double measurement_interval,const char* ev_name, const char *ev_id);
2738 /**************************************************************************//**
2741 * Free off the Report supplied. Will free all the contained allocated memory.
2743 * @note It does not free the Report itself, since that may be part of a
2745 *****************************************************************************/
2746 void evel_free_report(EVENT_REPORT * event);
2748 /**************************************************************************//**
2749 * Set the Event Type property of the Report.
2751 * @note The property is treated as immutable: it is only valid to call
2752 * the setter once. However, we don't assert if the caller tries to
2753 * overwrite, just ignoring the update instead.
2755 * @param report Pointer to the Report.
2756 * @param type The Event Type to be set. ASCIIZ string. The caller
2757 * does not need to preserve the value once the function
2759 *****************************************************************************/
2760 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2762 /**************************************************************************//**
2763 * Add a Feature usage value name/value pair to the Report.
2765 * The name is null delimited ASCII string. The library takes
2766 * a copy so the caller does not have to preserve values after the function
2769 * @param report Pointer to the report.
2770 * @param feature ASCIIZ string with the feature's name.
2771 * @param utilization Utilization of the feature.
2772 *****************************************************************************/
2773 void evel_report_feature_use_add(EVENT_REPORT * report,
2777 /**************************************************************************//**
2778 * Add a Additional Measurement value name/value pair to the Report.
2780 * The name is null delimited ASCII string. The library takes
2781 * a copy so the caller does not have to preserve values after the function
2784 * @param report Pointer to the report.
2785 * @param group ASCIIZ string with the measurement group's name.
2786 * @param name ASCIIZ string containing the measurement's name.
2787 * @param value ASCIIZ string containing the measurement's value.
2788 *****************************************************************************/
2789 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2790 const char * const group,
2791 const char * const name,
2792 const char * const value);
2794 /*****************************************************************************/
2795 /*****************************************************************************/
2799 /*****************************************************************************/
2800 /*****************************************************************************/
2802 /**************************************************************************//**
2803 * Create a new Mobile Flow event.
2805 * @note The mandatory fields on the Mobile Flow must be supplied to this
2806 * factory function and are immutable once set. Optional fields have
2807 * explicit setter functions, but again values may only be set once so
2808 * that the Mobile Flow has immutable properties.
2810 * @param event_name Unique Event Name
2811 * @param event_id A universal identifier of the event for analysis etc
2812 * @param flow_direction
2813 * @param gtp_per_flow_metrics
2814 * @param ip_protocol_type
2816 * @param other_endpoint_ip_address
2817 * @param other_endpoint_port
2818 * @param reporting_endpoint_ip_addr
2819 * @param reporting_endpoint_port
2821 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2822 * event is not used (i.e. posted) it must be released using
2823 * ::evel_free_mobile_flow.
2824 * @retval NULL Failed to create the event.
2825 *****************************************************************************/
2826 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2827 const char* ev_name, const char *ev_id,
2828 const char * const flow_direction,
2829 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2830 const char * const ip_protocol_type,
2831 const char * const ip_version,
2832 const char * const other_endpoint_ip_address,
2833 int other_endpoint_port,
2834 const char * const reporting_endpoint_ip_addr,
2835 int reporting_endpoint_port);
2837 /**************************************************************************//**
2838 * Free a Mobile Flow.
2840 * Free off the Mobile Flow supplied. Will free all the contained allocated
2843 * @note It does not free the Mobile Flow itself, since that may be part of a
2845 *****************************************************************************/
2846 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2848 /**************************************************************************//**
2849 * Set the Event Type property of the Mobile Flow.
2851 * @note The property is treated as immutable: it is only valid to call
2852 * the setter once. However, we don't assert if the caller tries to
2853 * overwrite, just ignoring the update instead.
2855 * @param mobile_flow Pointer to the Mobile Flow.
2856 * @param type The Event Type to be set. ASCIIZ string. The caller
2857 * does not need to preserve the value once the function
2859 *****************************************************************************/
2860 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2861 const char * const type);
2863 /**************************************************************************//**
2864 * Set the Application Type property of the Mobile Flow.
2866 * @note The property is treated as immutable: it is only valid to call
2867 * the setter once. However, we don't assert if the caller tries to
2868 * overwrite, just ignoring the update instead.
2870 * @param mobile_flow Pointer to the Mobile Flow.
2871 * @param type The Application Type to be set. ASCIIZ string. The caller
2872 * does not need to preserve the value once the function
2874 *****************************************************************************/
2875 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2876 const char * const type);
2878 /**************************************************************************//**
2879 * Set the Application Protocol Type property of the Mobile Flow.
2881 * @note The property is treated as immutable: it is only valid to call
2882 * the setter once. However, we don't assert if the caller tries to
2883 * overwrite, just ignoring the update instead.
2885 * @param mobile_flow Pointer to the Mobile Flow.
2886 * @param type The Application Protocol Type to be set. ASCIIZ string.
2887 * The caller does not need to preserve the value once the
2889 *****************************************************************************/
2890 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2891 const char * const type);
2893 /**************************************************************************//**
2894 * Set the Application Protocol Version property of the Mobile Flow.
2896 * @note The property is treated as immutable: it is only valid to call
2897 * the setter once. However, we don't assert if the caller tries to
2898 * overwrite, just ignoring the update instead.
2900 * @param mobile_flow Pointer to the Mobile Flow.
2901 * @param version The Application Protocol Version to be set. ASCIIZ
2902 * string. The caller does not need to preserve the value
2903 * once the function returns.
2904 *****************************************************************************/
2905 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2906 const char * const version);
2908 /**************************************************************************//**
2909 * Set the CID property of the Mobile Flow.
2911 * @note The property is treated as immutable: it is only valid to call
2912 * the setter once. However, we don't assert if the caller tries to
2913 * overwrite, just ignoring the update instead.
2915 * @param mobile_flow Pointer to the Mobile Flow.
2916 * @param cid The CID to be set. ASCIIZ string. The caller does not
2917 * need to preserve the value once the function returns.
2918 *****************************************************************************/
2919 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2920 const char * const cid);
2922 /**************************************************************************//**
2923 * Set the Connection Type property of the Mobile Flow.
2925 * @note The property is treated as immutable: it is only valid to call
2926 * the setter once. However, we don't assert if the caller tries to
2927 * overwrite, just ignoring the update instead.
2929 * @param mobile_flow Pointer to the Mobile Flow.
2930 * @param type The Connection Type to be set. ASCIIZ string. The caller
2931 * does not need to preserve the value once the function
2933 *****************************************************************************/
2934 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2935 const char * const type);
2937 /**************************************************************************//**
2938 * Set the ECGI property of the Mobile Flow.
2940 * @note The property is treated as immutable: it is only valid to call
2941 * the setter once. However, we don't assert if the caller tries to
2942 * overwrite, just ignoring the update instead.
2944 * @param mobile_flow Pointer to the Mobile Flow.
2945 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2946 * need to preserve the value once the function returns.
2947 *****************************************************************************/
2948 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2949 const char * const ecgi);
2951 /**************************************************************************//**
2952 * Set the GTP Protocol Type property of the Mobile Flow.
2954 * @note The property is treated as immutable: it is only valid to call
2955 * the setter once. However, we don't assert if the caller tries to
2956 * overwrite, just ignoring the update instead.
2958 * @param mobile_flow Pointer to the Mobile Flow.
2959 * @param type The GTP Protocol Type to be set. ASCIIZ string. The
2960 * caller does not need to preserve the value once the
2962 *****************************************************************************/
2963 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2964 const char * const type);
2966 /**************************************************************************//**
2967 * Set the GTP Protocol Version property of the Mobile Flow.
2969 * @note The property is treated as immutable: it is only valid to call
2970 * the setter once. However, we don't assert if the caller tries to
2971 * overwrite, just ignoring the update instead.
2973 * @param mobile_flow Pointer to the Mobile Flow.
2974 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
2975 * caller does not need to preserve the value once the
2977 *****************************************************************************/
2978 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2979 const char * const version);
2981 /**************************************************************************//**
2982 * Set the HTTP Header property of the Mobile Flow.
2984 * @note The property is treated as immutable: it is only valid to call
2985 * the setter once. However, we don't assert if the caller tries to
2986 * overwrite, just ignoring the update instead.
2988 * @param mobile_flow Pointer to the Mobile Flow.
2989 * @param header The HTTP header to be set. ASCIIZ string. The caller does
2990 * not need to preserve the value once the function returns.
2991 *****************************************************************************/
2992 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
2993 const char * const header);
2995 /**************************************************************************//**
2996 * Set the IMEI property of the Mobile Flow.
2998 * @note The property is treated as immutable: it is only valid to call
2999 * the setter once. However, we don't assert if the caller tries to
3000 * overwrite, just ignoring the update instead.
3002 * @param mobile_flow Pointer to the Mobile Flow.
3003 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
3004 * need to preserve the value once the function returns.
3005 *****************************************************************************/
3006 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
3007 const char * const imei);
3009 /**************************************************************************//**
3010 * Set the IMSI property of the Mobile Flow.
3012 * @note The property is treated as immutable: it is only valid to call
3013 * the setter once. However, we don't assert if the caller tries to
3014 * overwrite, just ignoring the update instead.
3016 * @param mobile_flow Pointer to the Mobile Flow.
3017 * @param imsi The IMSI to be set. ASCIIZ string. The caller does not
3018 * need to preserve the value once the function returns.
3019 *****************************************************************************/
3020 void evel_mobile_flow_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
3021 const char * const imsi);
3023 /**************************************************************************//**
3024 * Set the LAC property of the Mobile Flow.
3026 * @note The property is treated as immutable: it is only valid to call
3027 * the setter once. However, we don't assert if the caller tries to
3028 * overwrite, just ignoring the update instead.
3030 * @param mobile_flow Pointer to the Mobile Flow.
3031 * @param lac The LAC to be set. ASCIIZ string. The caller does not
3032 * need to preserve the value once the function returns.
3033 *****************************************************************************/
3034 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
3035 const char * const lac);
3037 /**************************************************************************//**
3038 * Set the MCC property of the Mobile Flow.
3040 * @note The property is treated as immutable: it is only valid to call
3041 * the setter once. However, we don't assert if the caller tries to
3042 * overwrite, just ignoring the update instead.
3044 * @param mobile_flow Pointer to the Mobile Flow.
3045 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
3046 * need to preserve the value once the function returns.
3047 *****************************************************************************/
3048 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
3049 const char * const mcc);
3051 /**************************************************************************//**
3052 * Set the MNC property of the Mobile Flow.
3054 * @note The property is treated as immutable: it is only valid to call
3055 * the setter once. However, we don't assert if the caller tries to
3056 * overwrite, just ignoring the update instead.
3058 * @param mobile_flow Pointer to the Mobile Flow.
3059 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
3060 * need to preserve the value once the function returns.
3061 *****************************************************************************/
3062 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
3063 const char * const mnc);
3065 /**************************************************************************//**
3066 * Set the MSISDN property of the Mobile Flow.
3068 * @note The property is treated as immutable: it is only valid to call
3069 * the setter once. However, we don't assert if the caller tries to
3070 * overwrite, just ignoring the update instead.
3072 * @param mobile_flow Pointer to the Mobile Flow.
3073 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
3074 * need to preserve the value once the function returns.
3075 *****************************************************************************/
3076 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
3077 const char * const msisdn);
3079 /**************************************************************************//**
3080 * Set the Other Functional Role property of the Mobile Flow.
3082 * @note The property is treated as immutable: it is only valid to call
3083 * the setter once. However, we don't assert if the caller tries to
3084 * overwrite, just ignoring the update instead.
3086 * @param mobile_flow Pointer to the Mobile Flow.
3087 * @param role The Other Functional Role to be set. ASCIIZ string. The
3088 * caller does not need to preserve the value once the
3090 *****************************************************************************/
3091 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
3092 const char * const role);
3094 /**************************************************************************//**
3095 * Set the RAC property of the Mobile Flow.
3097 * @note The property is treated as immutable: it is only valid to call
3098 * the setter once. However, we don't assert if the caller tries to
3099 * overwrite, just ignoring the update instead.
3101 * @param mobile_flow Pointer to the Mobile Flow.
3102 * @param rac The RAC to be set. ASCIIZ string. The caller does not
3103 * need to preserve the value once the function returns.
3104 *****************************************************************************/
3105 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
3106 const char * const rac);
3108 /**************************************************************************//**
3109 * Set the Radio Access Technology property of the Mobile Flow.
3111 * @note The property is treated as immutable: it is only valid to call
3112 * the setter once. However, we don't assert if the caller tries to
3113 * overwrite, just ignoring the update instead.
3115 * @param mobile_flow Pointer to the Mobile Flow.
3116 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
3117 * caller does not need to preserve the value once the
3119 *****************************************************************************/
3120 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
3121 const char * const tech);
3123 /**************************************************************************//**
3124 * Set the SAC property of the Mobile Flow.
3126 * @note The property is treated as immutable: it is only valid to call
3127 * the setter once. However, we don't assert if the caller tries to
3128 * overwrite, just ignoring the update instead.
3130 * @param mobile_flow Pointer to the Mobile Flow.
3131 * @param sac The SAC to be set. ASCIIZ string. The caller does not
3132 * need to preserve the value once the function returns.
3133 *****************************************************************************/
3134 void evel_mobile_flow_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
3135 const char * const sac);
3137 /**************************************************************************//**
3138 * Set the Sampling Algorithm property of the Mobile Flow.
3140 * @note The property is treated as immutable: it is only valid to call
3141 * the setter once. However, we don't assert if the caller tries to
3142 * overwrite, just ignoring the update instead.
3144 * @param mobile_flow Pointer to the Mobile Flow.
3145 * @param algorithm The Sampling Algorithm to be set.
3146 *****************************************************************************/
3147 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
3150 /**************************************************************************//**
3151 * Set the TAC property of the Mobile Flow.
3153 * @note The property is treated as immutable: it is only valid to call
3154 * the setter once. However, we don't assert if the caller tries to
3155 * overwrite, just ignoring the update instead.
3157 * @param mobile_flow Pointer to the Mobile Flow.
3158 * @param tac The TAC to be set. ASCIIZ string. The caller does not
3159 * need to preserve the value once the function returns.
3160 *****************************************************************************/
3161 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
3162 const char * const tac);
3164 /**************************************************************************//**
3165 * Set the Tunnel ID property of the Mobile Flow.
3167 * @note The property is treated as immutable: it is only valid to call
3168 * the setter once. However, we don't assert if the caller tries to
3169 * overwrite, just ignoring the update instead.
3171 * @param mobile_flow Pointer to the Mobile Flow.
3172 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
3173 * not need to preserve the value once the function returns.
3174 *****************************************************************************/
3175 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3176 const char * const tunnel_id);
3178 /**************************************************************************//**
3179 * Set the VLAN ID property of the Mobile Flow.
3181 * @note The property is treated as immutable: it is only valid to call
3182 * the setter once. However, we don't assert if the caller tries to
3183 * overwrite, just ignoring the update instead.
3185 * @param mobile_flow Pointer to the Mobile Flow.
3186 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
3187 * not need to preserve the value once the function returns.
3188 *****************************************************************************/
3189 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3190 const char * const vlan_id);
3192 /**************************************************************************//**
3193 * Create a new Mobile GTP Per Flow Metrics.
3195 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
3196 * supplied to this factory function and are immutable once set.
3197 * Optional fields have explicit setter functions, but again values
3198 * may only be set once so that the Mobile GTP Per Flow Metrics has
3199 * immutable properties.
3201 * @param avg_bit_error_rate
3202 * @param avg_packet_delay_variation
3203 * @param avg_packet_latency
3204 * @param avg_receive_throughput
3205 * @param avg_transmit_throughput
3206 * @param flow_activation_epoch
3207 * @param flow_activation_microsec
3208 * @param flow_deactivation_epoch
3209 * @param flow_deactivation_microsec
3210 * @param flow_deactivation_time
3211 * @param flow_status
3212 * @param max_packet_delay_variation
3213 * @param num_activation_failures
3214 * @param num_bit_errors
3215 * @param num_bytes_received
3216 * @param num_bytes_transmitted
3217 * @param num_dropped_packets
3218 * @param num_l7_bytes_received
3219 * @param num_l7_bytes_transmitted
3220 * @param num_lost_packets
3221 * @param num_out_of_order_packets
3222 * @param num_packet_errors
3223 * @param num_packets_received_excl_retrans
3224 * @param num_packets_received_incl_retrans
3225 * @param num_packets_transmitted_incl_retrans
3226 * @param num_retries
3227 * @param num_timeouts
3228 * @param num_tunneled_l7_bytes_received
3229 * @param round_trip_time
3230 * @param time_to_first_byte
3232 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3233 * If the structure is not used it must be released using
3234 * ::evel_free_mobile_gtp_flow_metrics.
3235 * @retval NULL Failed to create the event.
3236 *****************************************************************************/
3237 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3238 double avg_bit_error_rate,
3239 double avg_packet_delay_variation,
3240 int avg_packet_latency,
3241 int avg_receive_throughput,
3242 int avg_transmit_throughput,
3243 int flow_activation_epoch,
3244 int flow_activation_microsec,
3245 int flow_deactivation_epoch,
3246 int flow_deactivation_microsec,
3247 time_t flow_deactivation_time,
3248 const char * const flow_status,
3249 int max_packet_delay_variation,
3250 int num_activation_failures,
3252 int num_bytes_received,
3253 int num_bytes_transmitted,
3254 int num_dropped_packets,
3255 int num_l7_bytes_received,
3256 int num_l7_bytes_transmitted,
3257 int num_lost_packets,
3258 int num_out_of_order_packets,
3259 int num_packet_errors,
3260 int num_packets_received_excl_retrans,
3261 int num_packets_received_incl_retrans,
3262 int num_packets_transmitted_incl_retrans,
3265 int num_tunneled_l7_bytes_received,
3266 int round_trip_time,
3267 int time_to_first_byte);
3269 /**************************************************************************//**
3270 * Free a Mobile GTP Per Flow Metrics.
3272 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3273 * contained allocated memory.
3275 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3276 * may be part of a larger structure.
3277 *****************************************************************************/
3278 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3280 /**************************************************************************//**
3281 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3284 * @note The property is treated as immutable: it is only valid to call
3285 * the setter once. However, we don't assert if the caller tries to
3286 * overwrite, just ignoring the update instead.
3288 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3289 * @param duration The Duration of Connection Failed Status to be set.
3290 *****************************************************************************/
3291 void evel_mobile_gtp_metrics_dur_con_fail_set(
3292 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3295 /**************************************************************************//**
3296 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3299 * @note The property is treated as immutable: it is only valid to call
3300 * the setter once. However, we don't assert if the caller tries to
3301 * overwrite, just ignoring the update instead.
3303 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3304 * @param duration The Duration of Tunnel Failed Status to be set.
3305 *****************************************************************************/
3306 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3307 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3310 /**************************************************************************//**
3311 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3313 * @note The property is treated as immutable: it is only valid to call
3314 * the setter once. However, we don't assert if the caller tries to
3315 * overwrite, just ignoring the update instead.
3317 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3318 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3319 * does not need to preserve the value once the function
3321 *****************************************************************************/
3322 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3323 const char * const act_by);
3325 /**************************************************************************//**
3326 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3328 * @note The property is treated as immutable: it is only valid to call
3329 * the setter once. However, we don't assert if the caller tries to
3330 * overwrite, just ignoring the update instead.
3332 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3333 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3334 * does not need to preserve the value once the function
3336 *****************************************************************************/
3337 void evel_mobile_gtp_metrics_act_time_set(
3338 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3341 /**************************************************************************//**
3342 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3344 * @note The property is treated as immutable: it is only valid to call
3345 * the setter once. However, we don't assert if the caller tries to
3346 * overwrite, just ignoring the update instead.
3348 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3349 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3350 * does not need to preserve the value once the function
3352 *****************************************************************************/
3353 void evel_mobile_gtp_metrics_deact_by_set(
3354 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3355 const char * const deact_by);
3357 /**************************************************************************//**
3358 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3360 * @note The property is treated as immutable: it is only valid to call
3361 * the setter once. However, we don't assert if the caller tries to
3362 * overwrite, just ignoring the update instead.
3364 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3365 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3366 * caller does not need to preserve the value once the
3368 *****************************************************************************/
3369 void evel_mobile_gtp_metrics_con_status_set(
3370 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3371 const char * const status);
3373 /**************************************************************************//**
3374 * Set the GTP Tunnel Status 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 status The GTP Tunnel Status to be set. ASCIIZ string. The
3382 * caller does not need to preserve the value once the
3384 *****************************************************************************/
3385 void evel_mobile_gtp_metrics_tun_status_set(
3386 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3387 const char * const status);
3389 /**************************************************************************//**
3390 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3392 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3393 * @param index The index of the IP Type-of-Service.
3394 * @param count The count.
3395 *****************************************************************************/
3396 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3400 /**************************************************************************//**
3401 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3404 * @note The property is treated as immutable: it is only valid to call
3405 * the setter once. However, we don't assert if the caller tries to
3406 * overwrite, just ignoring the update instead.
3408 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3409 * @param rtt The Large Packet Round-Trip Time to be set.
3410 *****************************************************************************/
3411 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3412 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3415 /**************************************************************************//**
3416 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3418 * @note The property is treated as immutable: it is only valid to call
3419 * the setter once. However, we don't assert if the caller tries to
3420 * overwrite, just ignoring the update instead.
3422 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3423 * @param threshold The Large Packet Threshold to be set.
3424 *****************************************************************************/
3425 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3426 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3429 /**************************************************************************//**
3430 * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.
3432 * @note The property is treated as immutable: it is only valid to call
3433 * the setter once. However, we don't assert if the caller tries to
3434 * overwrite, just ignoring the update instead.
3436 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3437 * @param rate The Max Receive Bit Rate to be set.
3438 *****************************************************************************/
3439 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3440 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3443 /**************************************************************************//**
3444 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
3446 * @note The property is treated as immutable: it is only valid to call
3447 * the setter once. However, we don't assert if the caller tries to
3448 * overwrite, just ignoring the update instead.
3450 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3451 * @param rate The Max Transmit Bit Rate to be set.
3452 *****************************************************************************/
3453 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3454 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3457 /**************************************************************************//**
3458 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3461 * @note The property is treated as immutable: it is only valid to call
3462 * the setter once. However, we don't assert if the caller tries to
3463 * overwrite, just ignoring the update instead.
3465 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3466 * @param num The Number of GTP Echo Failures to be set.
3467 *****************************************************************************/
3468 void evel_mobile_gtp_metrics_num_echo_fail_set(
3469 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3472 /**************************************************************************//**
3473 * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow
3476 * @note The property is treated as immutable: it is only valid to call
3477 * the setter once. However, we don't assert if the caller tries to
3478 * overwrite, just ignoring the update instead.
3480 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3481 * @param num The Number of GTP Tunnel Errors to be set.
3482 *****************************************************************************/
3483 void evel_mobile_gtp_metrics_num_tun_fail_set(
3484 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3487 /**************************************************************************//**
3488 * Set the Number of HTTP Errors property of the Mobile GTP Per Flow Metrics.
3490 * @note The property is treated as immutable: it is only valid to call
3491 * the setter once. However, we don't assert if the caller tries to
3492 * overwrite, just ignoring the update instead.
3494 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3495 * @param num The Number of HTTP Errors to be set.
3496 *****************************************************************************/
3497 void evel_mobile_gtp_metrics_num_http_errors_set(
3498 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3501 /**************************************************************************//**
3502 * Add a TCP flag count to the metrics.
3504 * @note The property is treated as immutable: it is only valid to call
3505 * the setter once. However, we don't assert if the caller tries to
3506 * overwrite, just ignoring the update instead.
3508 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3509 * @param tcp_flag The TCP flag count to be updated.
3510 * @param count The associated flag count.
3511 *****************************************************************************/
3512 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3513 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3514 const EVEL_TCP_FLAGS tcp_flag,
3517 /**************************************************************************//**
3518 * Add a QCI COS count to the metrics.
3520 * @note The property is treated as immutable: it is only valid to call
3521 * the setter once. However, we don't assert if the caller tries to
3522 * overwrite, just ignoring the update instead.
3524 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3525 * @param qci_cos The QCI COS count to be updated.
3526 * @param count The associated QCI COS count.
3527 *****************************************************************************/
3528 void evel_mobile_gtp_metrics_qci_cos_count_add(
3529 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3530 const EVEL_QCI_COS_TYPES qci_cos,
3533 /*****************************************************************************/
3534 /*****************************************************************************/
3538 /*****************************************************************************/
3539 /*****************************************************************************/
3541 /**************************************************************************//**
3542 * Create a new Signaling event.
3544 * @note The mandatory fields on the Signaling must be supplied to
3545 * this factory function and are immutable once set. Optional fields
3546 * have explicit setter functions, but again values may only be set
3547 * once so that the event has immutable properties.
3548 * @param event_name Unique Event Name
3549 * @param event_id A universal identifier of the event for analysis etc
3550 * @param vendor_name The vendor id to encode in the event vnf field.
3551 * @param module The module to encode in the event.
3552 * @param vnfname The Virtual network function to encode in the event.
3553 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3554 * is not used (i.e. posted) it must be released using
3555 * ::evel_free_signaling.
3556 * @retval NULL Failed to create the event.
3557 *****************************************************************************/
3558 EVENT_SIGNALING * evel_new_signaling(const char* ev_name, const char *ev_id,
3559 const char * const vendor_name,
3560 const char * const correlator,
3561 const char * const local_ip_address,
3562 const char * const local_port,
3563 const char * const remote_ip_address,
3564 const char * const remote_port);
3566 /**************************************************************************//**
3567 * Free a Signaling event.
3569 * Free off the event supplied. Will free all the contained allocated memory.
3571 * @note It does not free the event itself, since that may be part of a larger
3573 *****************************************************************************/
3574 void evel_free_signaling(EVENT_SIGNALING * const event);
3576 /**************************************************************************//**
3577 * Set the Event Type property of the Signaling event.
3579 * @note The property is treated as immutable: it is only valid to call
3580 * the setter once. However, we don't assert if the caller tries to
3581 * overwrite, just ignoring the update instead.
3583 * @param event Pointer to the Signaling event.
3584 * @param type The Event Type to be set. ASCIIZ string. The caller
3585 * does not need to preserve the value once the function
3587 *****************************************************************************/
3588 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3589 const char * const type);
3591 /**************************************************************************//**
3592 * Add an additional value name/value pair to the SIP signaling.
3594 * The name and value are null delimited ASCII strings. The library takes
3595 * a copy so the caller does not have to preserve values after the function
3598 * @param event Pointer to the fault.
3599 * @param name ASCIIZ string with the attribute's name. The caller
3600 * does not need to preserve the value once the function
3602 * @param value ASCIIZ string with the attribute's value. The caller
3603 * does not need to preserve the value once the function
3605 *****************************************************************************/
3606 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3608 /**************************************************************************//**
3609 * Set the Correlator property of the Signaling event.
3611 * @note The property is treated as immutable: it is only valid to call
3612 * the setter once. However, we don't assert if the caller tries to
3613 * overwrite, just ignoring the update instead.
3615 * @param event Pointer to the Signaling event.
3616 * @param correlator The correlator to be set. ASCIIZ string. The caller
3617 * does not need to preserve the value once the function
3619 *****************************************************************************/
3620 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3621 const char * const correlator);
3623 /**************************************************************************//**
3624 * Set the Local Ip Address property of the Signaling event.
3626 * @note The property is treated as immutable: it is only valid to call
3627 * the setter once. However, we don't assert if the caller tries to
3628 * overwrite, just ignoring the update instead.
3630 * @param event Pointer to the Signaling event.
3631 * @param local_ip_address
3632 * The Local Ip Address to be set. ASCIIZ string. The
3633 * caller does not need to preserve the value once the
3635 *****************************************************************************/
3636 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3637 const char * const local_ip_address);
3639 /**************************************************************************//**
3640 * Set the Local Port property of the Signaling event.
3642 * @note The property is treated as immutable: it is only valid to call
3643 * the setter once. However, we don't assert if the caller tries to
3644 * overwrite, just ignoring the update instead.
3646 * @param event Pointer to the Signaling event.
3647 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3648 * does not need to preserve the value once the function
3650 *****************************************************************************/
3651 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3652 const char * const local_port);
3654 /**************************************************************************//**
3655 * Set the Remote Ip Address property of the Signaling event.
3657 * @note The property is treated as immutable: it is only valid to call
3658 * the setter once. However, we don't assert if the caller tries to
3659 * overwrite, just ignoring the update instead.
3661 * @param event Pointer to the Signaling event.
3662 * @param remote_ip_address
3663 * The Remote Ip Address to be set. ASCIIZ string. The
3664 * caller does not need to preserve the value once the
3666 *****************************************************************************/
3667 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3668 const char * const remote_ip_address);
3670 /**************************************************************************//**
3671 * Set the Remote Port property of the Signaling event.
3673 * @note The property is treated as immutable: it is only valid to call
3674 * the setter once. However, we don't assert if the caller tries to
3675 * overwrite, just ignoring the update instead.
3677 * @param event Pointer to the Signaling event.
3678 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3679 * does not need to preserve the value once the function
3681 *****************************************************************************/
3682 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3683 const char * const remote_port);
3684 /**************************************************************************//**
3685 * Set the Vendor module property of the Signaling event.
3687 * @note The property is treated as immutable: it is only valid to call
3688 * the setter once. However, we don't assert if the caller tries to
3689 * overwrite, just ignoring the update instead.
3691 * @param event Pointer to the Signaling event.
3692 * @param modulename The module name to be set. ASCIIZ string. The caller
3693 * does not need to preserve the value once the function
3695 *****************************************************************************/
3696 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3697 const char * const module_name);
3698 /**************************************************************************//**
3699 * Set the Vendor module property of the Signaling event.
3701 * @note The property is treated as immutable: it is only valid to call
3702 * the setter once. However, we don't assert if the caller tries to
3703 * overwrite, just ignoring the update instead.
3705 * @param event Pointer to the Signaling event.
3706 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3707 * The caller does not need to preserve the value once
3708 * the function returns.
3709 *****************************************************************************/
3710 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3711 const char * const vnfname);
3713 /**************************************************************************//**
3714 * Set the Compressed SIP property of the Signaling event.
3716 * @note The property is treated as immutable: it is only valid to call
3717 * the setter once. However, we don't assert if the caller tries to
3718 * overwrite, just ignoring the update instead.
3720 * @param event Pointer to the Signaling event.
3721 * @param compressed_sip
3722 * The Compressed SIP to be set. ASCIIZ string. The caller
3723 * does not need to preserve the value once the function
3725 *****************************************************************************/
3726 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3727 const char * const compressed_sip);
3729 /**************************************************************************//**
3730 * Set the Summary SIP property of the Signaling event.
3732 * @note The property is treated as immutable: it is only valid to call
3733 * the setter once. However, we don't assert if the caller tries to
3734 * overwrite, just ignoring the update instead.
3736 * @param event Pointer to the Signaling event.
3737 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3738 * does not need to preserve the value once the function
3740 *****************************************************************************/
3741 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3742 const char * const summary_sip);
3745 /*****************************************************************************/
3746 /*****************************************************************************/
3750 /*****************************************************************************/
3751 /*****************************************************************************/
3753 /**************************************************************************//**
3754 * Create a new State Change event.
3756 * @note The mandatory fields on the Syslog must be supplied to this factory
3757 * function and are immutable once set. Optional fields have explicit
3758 * setter functions, but again values may only be set once so that the
3759 * Syslog has immutable properties.
3761 * @param event_name Unique Event Name
3762 * @param event_id A universal identifier of the event for analysis etc
3763 * @param new_state The new state of the reporting entity.
3764 * @param old_state The old state of the reporting entity.
3765 * @param interface The card or port name of the reporting entity.
3767 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3768 * event is not used it must be released using
3769 * ::evel_free_state_change
3770 * @retval NULL Failed to create the event.
3771 *****************************************************************************/
3772 EVENT_STATE_CHANGE * evel_new_state_change(const char* ev_name, const char *ev_id,
3773 const EVEL_ENTITY_STATE new_state,
3774 const EVEL_ENTITY_STATE old_state,
3775 const char * const interface);
3777 /**************************************************************************//**
3778 * Free a State Change.
3780 * Free off the State Change supplied. Will free all the contained allocated
3783 * @note It does not free the State Change itself, since that may be part of a
3785 *****************************************************************************/
3786 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3788 /**************************************************************************//**
3789 * Set the Event Type property of the State Change.
3791 * @note The property is treated as immutable: it is only valid to call
3792 * the setter once. However, we don't assert if the caller tries to
3793 * overwrite, just ignoring the update instead.
3795 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3796 * @param type The Event Type to be set. ASCIIZ string. The caller
3797 * does not need to preserve the value once the function
3799 *****************************************************************************/
3800 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3801 const char * const type);
3803 /**************************************************************************//**
3804 * Add an additional field name/value pair to the State Change.
3806 * The name and value are null delimited ASCII strings. The library takes
3807 * a copy so the caller does not have to preserve values after the function
3810 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3811 * @param name ASCIIZ string with the attribute's name. The caller
3812 * does not need to preserve the value once the function
3814 * @param value ASCIIZ string with the attribute's value. The caller
3815 * does not need to preserve the value once the function
3817 *****************************************************************************/
3818 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3819 const char * const name,
3820 const char * const value);
3822 /*****************************************************************************/
3823 /*****************************************************************************/
3827 /*****************************************************************************/
3828 /*****************************************************************************/
3830 /**************************************************************************//**
3831 * Create a new syslog event.
3833 * @note The mandatory fields on the Syslog must be supplied to this factory
3834 * function and are immutable once set. Optional fields have explicit
3835 * setter functions, but again values may only be set once so that the
3836 * Syslog has immutable properties.
3838 * @param event_name Unique Event Name
3839 * @param event_id A universal identifier of the event for analysis etc
3840 * @param event_source_type
3845 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3846 * not used it must be released using ::evel_free_syslog
3847 * @retval NULL Failed to create the event.
3848 *****************************************************************************/
3849 EVENT_SYSLOG * evel_new_syslog(const char* ev_name, const char *ev_id,
3850 EVEL_SOURCE_TYPES event_source_type,
3851 const char * const syslog_msg,
3852 const char * const syslog_tag);
3854 /**************************************************************************//**
3855 * Set the Event Type property of the Syslog.
3857 * @note The property is treated as immutable: it is only valid to call
3858 * the setter once. However, we don't assert if the caller tries to
3859 * overwrite, just ignoring the update instead.
3861 * @param syslog Pointer to the syslog.
3862 * @param type The Event Type to be set. ASCIIZ string. The caller
3863 * does not need to preserve the value once the function
3865 *****************************************************************************/
3866 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3867 const char * const type);
3869 /**************************************************************************//**
3872 * Free off the Syslog supplied. Will free all the contained allocated memory.
3874 * @note It does not free the Syslog itself, since that may be part of a
3876 *****************************************************************************/
3877 void evel_free_syslog(EVENT_SYSLOG * event);
3879 /**************************************************************************//**
3880 * Add an additional field name/value pair to the Syslog.
3882 * The name and value are null delimited ASCII strings. The library takes
3883 * a copy so the caller does not have to preserve values after the function
3886 * @param syslog Pointer to the syslog.
3887 * @param name ASCIIZ string with the attribute's name. The caller
3888 * does not need to preserve the value once the function
3890 * @param value ASCIIZ string with the attribute's value. The caller
3891 * does not need to preserve the value once the function
3893 *****************************************************************************/
3894 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3898 /**************************************************************************//**
3899 * Set the Event Source Host property of the Syslog.
3901 * @note The property is treated as immutable: it is only valid to call
3902 * the setter once. However, we don't assert if the caller tries to
3903 * overwrite, just ignoring the update instead.
3905 * @param syslog Pointer to the Syslog.
3906 * @param host The Event Source Host to be set. ASCIIZ string. The
3907 * caller does not need to preserve the value once the
3909 *****************************************************************************/
3910 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3911 const char * const host);
3913 /**************************************************************************//**
3914 * Set the Syslog Facility property of the Syslog.
3916 * @note The property is treated as immutable: it is only valid to call
3917 * the setter once. However, we don't assert if the caller tries to
3918 * overwrite, just ignoring the update instead.
3920 * @param syslog Pointer to the Syslog.
3921 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3922 * does not need to preserve the value once the function
3924 *****************************************************************************/
3925 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3926 EVEL_SYSLOG_FACILITIES facility);
3928 /**************************************************************************//**
3929 * Set the Process property of the Syslog.
3931 * @note The property is treated as immutable: it is only valid to call
3932 * the setter once. However, we don't assert if the caller tries to
3933 * overwrite, just ignoring the update instead.
3935 * @param syslog Pointer to the Syslog.
3936 * @param proc The Process to be set. ASCIIZ string. The caller does
3937 * not need to preserve the value once the function returns.
3938 *****************************************************************************/
3939 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3941 /**************************************************************************//**
3942 * Set the Process ID property of the Syslog.
3944 * @note The property is treated as immutable: it is only valid to call
3945 * the setter once. However, we don't assert if the caller tries to
3946 * overwrite, just ignoring the update instead.
3948 * @param syslog Pointer to the Syslog.
3949 * @param proc_id The Process ID to be set.
3950 *****************************************************************************/
3951 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
3953 /**************************************************************************//**
3954 * Set the Version property of the Syslog.
3956 * @note The property is treated as immutable: it is only valid to call
3957 * the setter once. However, we don't assert if the caller tries to
3958 * overwrite, just ignoring the update instead.
3960 * @param syslog Pointer to the Syslog.
3961 * @param version The Version to be set.
3962 *****************************************************************************/
3963 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
3965 /**************************************************************************//**
3966 * Set the Structured Data property of the Syslog.
3968 * @note The property is treated as immutable: it is only valid to call
3969 * the setter once. However, we don't assert if the caller tries to
3970 * overwrite, just ignoring the update instead.
3972 * @param syslog Pointer to the Syslog.
3973 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
3974 * does not need to preserve the value once the function
3976 *****************************************************************************/
3977 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
3979 /**************************************************************************//**
3980 * Set the Structured SDID property of the Syslog.
3982 * @note The property is treated as immutable: it is only valid to call
3983 * the setter once. However, we don't assert if the caller tries to
3984 * overwrite, just ignoring the update instead.
3986 * @param syslog Pointer to the Syslog.
3987 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
3988 * Caller does not need to preserve the value once the function
3990 *****************************************************************************/
3991 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
3993 /**************************************************************************//**
3994 * Set the Structured Severity property of the Syslog.
3996 * @note The property is treated as immutable: it is only valid to call
3997 * the setter once. However, we don't assert if the caller tries to
3998 * overwrite, just ignoring the update instead.
4000 * @param syslog Pointer to the Syslog.
4001 * @param sdid The Structured Data to be set. ASCIIZ string.
4002 * Caller does not need to preserve the value once the function
4004 *****************************************************************************/
4005 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
4008 /*****************************************************************************/
4009 /*****************************************************************************/
4013 /*****************************************************************************/
4014 /*****************************************************************************/
4016 /**************************************************************************//**
4017 * Create a new other event.
4019 * @param event_name Unique Event Name
4020 * @param event_id A universal identifier of the event for analysis etc
4022 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
4023 * not used it must be released using ::evel_free_other.
4024 * @retval NULL Failed to create the event.
4025 *****************************************************************************/
4026 EVENT_OTHER * evel_new_other(const char* ev_name, const char *ev_id);
4028 /**************************************************************************//**
4031 * Free off the Other supplied. Will free all the contained allocated memory.
4033 * @note It does not free the Other itself, since that may be part of a
4035 *****************************************************************************/
4036 void evel_free_other(EVENT_OTHER * event);
4038 /**************************************************************************//**
4039 * Set the Event Type property of the Other.
4041 * @note The property is treated as immutable: it is only valid to call
4042 * the setter once. However, we don't assert if the caller tries to
4043 * overwrite, just ignoring the update instead.
4045 * @param other Pointer to the Other.
4046 * @param type The Event Type to be set. ASCIIZ string. The caller
4047 * does not need to preserve the value once the function
4049 *****************************************************************************/
4050 void evel_other_type_set(EVENT_OTHER * other,
4051 const char * const type);
4053 /**************************************************************************//**
4054 * Add a value name/value pair to the Other.
4056 * The name and value are null delimited ASCII strings. The library takes
4057 * a copy so the caller does not have to preserve values after the function
4060 * @param other Pointer to the Other.
4061 * @param name ASCIIZ string with the attribute's name.
4062 * @param value ASCIIZ string with the attribute's value.
4063 *****************************************************************************/
4064 void evel_other_field_add(EVENT_OTHER * other,
4068 /*****************************************************************************/
4069 /*****************************************************************************/
4073 /*****************************************************************************/
4074 /*****************************************************************************/
4076 /**************************************************************************//**
4077 * Return the current measurement interval provided by the Event Listener.
4079 * @returns The current measurement interval
4080 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
4082 *****************************************************************************/
4083 int evel_get_measurement_interval();
4085 /*****************************************************************************/
4086 /* Supported Report version. */
4087 /*****************************************************************************/
4088 #define EVEL_VOICEQ_MAJOR_VERSION 1
4089 #define EVEL_VOICEQ_MINOR_VERSION 0
4091 /**************************************************************************//**
4092 * End of Call Voice Quality Metrices
4093 * JSON equivalent field: endOfCallVqmSummaries
4094 *****************************************************************************/
4095 typedef struct end_of_call_vqm_summaries {
4096 /***************************************************************************/
4097 /* Mandatory fields */
4098 /***************************************************************************/
4099 char* adjacencyName;
4100 char* endpointDescription;
4102 /***************************************************************************/
4103 /* Optional fields */
4104 /***************************************************************************/
4105 EVEL_OPTION_INT endpointJitter;
4106 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
4107 EVEL_OPTION_INT endpointRtpOctetsReceived;
4108 EVEL_OPTION_INT endpointRtpOctetsSent;
4109 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
4110 EVEL_OPTION_INT endpointRtpPacketsReceived;
4111 EVEL_OPTION_INT endpointRtpPacketsSent;
4112 EVEL_OPTION_INT localJitter;
4113 EVEL_OPTION_INT localRtpOctetsDiscarded;
4114 EVEL_OPTION_INT localRtpOctetsReceived;
4115 EVEL_OPTION_INT localRtpOctetsSent;
4116 EVEL_OPTION_INT localRtpPacketsDiscarded;
4117 EVEL_OPTION_INT localRtpPacketsReceived;
4118 EVEL_OPTION_INT localRtpPacketsSent;
4119 EVEL_OPTION_INT mosCqe;
4120 EVEL_OPTION_INT packetsLost;
4121 EVEL_OPTION_INT packetLossPercent;
4122 EVEL_OPTION_INT rFactor;
4123 EVEL_OPTION_INT roundTripDelay;
4125 } END_OF_CALL_VOICE_QUALITY_METRICS;
4127 /**************************************************************************//**
4129 * JSON equivalent field: voiceQualityFields
4130 *****************************************************************************/
4132 typedef struct event_voiceQuality {
4133 /***************************************************************************/
4134 /* Header and version */
4135 /***************************************************************************/
4136 EVENT_HEADER header;
4140 /***************************************************************************/
4141 /* Mandatory fields */
4142 /***************************************************************************/
4144 char *calleeSideCodec;
4145 char *callerSideCodec;
4148 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
4149 END_OF_CALL_VOICE_QUALITY_METRICS *endOfCallVqmSummaries;
4151 /***************************************************************************/
4152 /* Optional fields */
4153 /***************************************************************************/
4154 EVEL_OPTION_STRING phoneNumber;
4155 DLIST additionalInformation;
4157 } EVENT_VOICE_QUALITY;
4158 /**************************************************************************//**
4159 * Voice Quality Additional Info.
4160 * JSON equivalent field: additionalInformation
4161 *****************************************************************************/
4162 typedef struct voice_quality_additional_info {
4165 } VOICE_QUALITY_ADDL_INFO;
4167 /**************************************************************************//**
4168 * Create a new voice quality event.
4170 * @note The mandatory fields on the Voice Quality must be supplied to this
4171 * factory function and are immutable once set. Optional fields have
4172 * explicit setter functions, but again values may only be set once
4173 * so that the Voice Quality has immutable properties.
4174 * @param event_name Unique Event Name
4175 * @param event_id A universal identifier of the event for analysis etc
4176 * @param calleeSideCodec Callee codec for the call.
4177 * @param callerSideCodec Caller codec for the call.
4178 * @param correlator Constant across all events on this call.
4179 * @param midCallRtcp Base64 encoding of the binary RTCP data
4180 * (excluding Eth/IP/UDP headers).
4181 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
4182 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
4183 * event is not used (i.e. posted) it must be released using
4184 ::evel_free_voice_quality.
4185 * @retval NULL Failed to create the event.
4186 *****************************************************************************/
4187 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char* ev_name, const char *ev_id,
4188 const char * const calleeSideCodec,
4189 const char * const callerSideCodec, const char * const correlator,
4190 const char * const midCallRtcp, const char * const vendorVnfNameFields);
4192 /**************************************************************************//**
4193 * Set the Callee side codec for Call for domain Voice Quality
4195 * @note The property is treated as immutable: it is only valid to call
4196 * the setter once. However, we don't assert if the caller tries to
4197 * overwrite, just ignoring the update instead.
4199 * @param voiceQuality Pointer to the Voice Quality Event.
4200 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
4201 * string. The caller does not need to
4202 * preserve the value once the function
4204 *****************************************************************************/
4205 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4206 const char * const calleeCodecForCall);
4208 /**************************************************************************//**
4209 * Set the Caller side codec for Call for domain Voice Quality
4211 * @note The property is treated as immutable: it is only valid to call
4212 * the setter once. However, we don't assert if the caller tries to
4213 * overwrite, just ignoring the update instead.
4215 * @param voiceQuality Pointer to the Voice Quality Event.
4216 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
4217 * string. The caller does not need to
4218 * preserve the value once the function
4220 *****************************************************************************/
4221 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4222 const char * const callerCodecForCall);
4224 /**************************************************************************//**
4225 * Set the correlator for domain Voice Quality
4227 * @note The property is treated as immutable: it is only valid to call
4228 * the setter once. However, we don't assert if the caller tries to
4229 * overwrite, just ignoring the update instead.
4231 * @param voiceQuality Pointer to the Voice Quality Event.
4232 * @param correlator The correlator value to be set. ASCIIZ
4233 * string. The caller does not need to
4234 * preserve the value once the function
4236 *****************************************************************************/
4237 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4238 const char * const vCorrelator);
4240 /**************************************************************************//**
4241 * Set the RTCP Call Data 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 rtcpCallData The RTCP Call Data 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_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4254 const char * const rtcpCallData);
4256 /**************************************************************************//**
4257 * Set the Vendor VNF Name fields 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 nameFields The Vendor, VNF and VfModule names to be set.
4265 * ASCIIZ string. The caller does not need to
4266 * preserve the value once the function
4268 *****************************************************************************/
4269 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4270 const char * const nameFields);
4272 /**************************************************************************//**
4273 * Add an End of Call Voice Quality Metrices
4275 * The adjacencyName and endpointDescription is null delimited ASCII string.
4276 * The library takes a copy so the caller does not have to preserve values
4277 * after the function returns.
4279 * @param voiceQuality Pointer to the measurement.
4280 * @param adjacencyName Adjacency name
4281 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4282 * @param endpointJitter Endpoint jitter
4283 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4284 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4285 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4286 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4287 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4288 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4289 * @param localJitter Local jitter.
4290 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4291 * @param localRtpOctetsReceived Local RTP octets received.
4292 * @param localRtpOctetsSent Local RTP octets sent.
4293 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4294 * @param localRtpPacketsReceived Local RTP packets received.
4295 * @param localRtpPacketsSent Local RTP packets sent.
4296 * @param mosCqe Decimal range from 1 to 5
4298 * @param packetsLost No Packets lost
4299 * @param packetLossPercent Calculated percentage packet loss
4300 * @param rFactor rFactor from 0 to 100
4301 * @param roundTripDelay Round trip delay in milliseconds
4302 *****************************************************************************/
4303 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4304 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4306 int endpointRtpOctetsDiscarded,
4307 int endpointRtpOctetsReceived,
4308 int endpointRtpOctetsSent,
4309 int endpointRtpPacketsDiscarded,
4310 int endpointRtpPacketsReceived,
4311 int endpointRtpPacketsSent,
4313 int localRtpOctetsDiscarded,
4314 int localRtpOctetsReceived,
4315 int localRtpOctetsSent,
4316 int localRtpPacketsDiscarded,
4317 int localRtpPacketsReceived,
4318 int localRtpPacketsSent,
4321 int packetLossPercent,
4323 int roundTripDelay);
4325 /**************************************************************************//**
4326 * Free a Voice Quality.
4328 * Free off the Voce Quality supplied. Will free all the contained allocated
4331 * @note It does not free the Voice Quality itself, since that may be part of a
4333 *****************************************************************************/
4334 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4336 /**************************************************************************//**
4337 * Add an additional value name/value pair to the Voice Quality.
4339 * The name and value are null delimited ASCII strings. The library takes
4340 * a copy so the caller does not have to preserve values after the function
4343 * @param fault Pointer to the fault.
4344 * @param name ASCIIZ string with the attribute's name. The caller
4345 * does not need to preserve the value once the function
4347 * @param value ASCIIZ string with the attribute's value. The caller
4348 * does not need to preserve the value once the function
4350 *****************************************************************************/
4351 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4354 /*****************************************************************************/
4355 /*****************************************************************************/
4357 /* THRESHOLD CROSSING ALERT */
4359 /*****************************************************************************/
4360 /*****************************************************************************/
4362 typedef enum evel_event_action {
4363 EVEL_EVENT_ACTION_CLEAR,
4364 EVEL_EVENT_ACTION_CONTINUE,
4365 EVEL_EVENT_ACTION_SET,
4366 EVEL_MAX_EVENT_ACTION
4369 typedef enum evel_alert_type {
4371 EVEL_ELEMENT_ANOMALY,
4372 EVEL_INTERFACE_ANOMALY,
4373 EVEL_SERVICE_ANOMALY,
4378 typedef struct perf_counter {
4381 char * thresholdCrossed;
4386 /*****************************************************************************/
4387 /* Supported Threshold Crossing version. */
4388 /*****************************************************************************/
4389 #define EVEL_THRESHOLD_CROSS_MAJOR_VERSION 2
4390 #define EVEL_THRESHOLD_CROSS_MINOR_VERSION 0
4392 /**************************************************************************//**
4393 * Threshold Crossing.
4394 * JSON equivalent field: Threshold Cross Fields
4395 *****************************************************************************/
4396 typedef struct event_threshold_cross {
4397 /***************************************************************************/
4398 /* Header and version */
4399 /***************************************************************************/
4400 EVENT_HEADER header;
4404 /***************************************************************************/
4405 /* Mandatory fields */
4406 /***************************************************************************/
4407 PERF_COUNTER additionalParameters;
4408 EVEL_EVENT_ACTION alertAction;
4409 char * alertDescription;
4410 EVEL_ALERT_TYPE alertType;
4411 unsigned long long collectionTimestamp;
4412 EVEL_SEVERITIES eventSeverity;
4413 unsigned long long eventStartTimestamp;
4415 /***************************************************************************/
4416 /* Optional fields */
4417 /***************************************************************************/
4418 DLIST additional_info;
4419 EVEL_OPTION_STRING alertValue;
4421 EVEL_OPTION_STRING dataCollector;
4422 EVEL_OPTION_STRING elementType;
4423 EVEL_OPTION_STRING interfaceName;
4424 EVEL_OPTION_STRING networkService;
4425 EVEL_OPTION_STRING possibleRootCause;
4427 } EVENT_THRESHOLD_CROSS;
4430 /**************************************************************************//**
4431 * Create a new Threshold Crossing Alert event.
4433 * @note The mandatory fields on the TCA must be supplied to this factory
4434 * function and are immutable once set. Optional fields have explicit
4435 * setter functions, but again values may only be set once so that the
4436 * TCA has immutable properties.
4438 * @param event_name Unique Event Name
4439 * @param event_id A universal identifier of the event for analysis etc
4440 * @param char* tcriticality Performance Counter Criticality MAJ MIN,
4441 * @param char* tname Performance Counter Threshold name
4442 * @param char* tthresholdCrossed Counter Threshold crossed value
4443 * @param char* tvalue Counter actual value
4444 * @param EVEL_EVENT_ACTION talertAction Alert set continue or clear
4445 * @param char* talertDescription
4446 * @param EVEL_ALERT_TYPE talertType Kind of anamoly
4447 * @param unsigned long long tcollectionTimestamp time at which alert was collected
4448 * @param EVEL_SEVERITIES teventSeverity Severity of Alert
4449 * @param unsigned long long teventStartTimestamp Time when this alert started
4451 * @returns pointer to the newly manufactured ::EVENT_THRESHOLD_CROSS. If the
4452 * event is not used it must be released using
4453 * ::evel_free_threshold_cross
4454 * @retval NULL Failed to create the event.
4455 *****************************************************************************/
4456 EVENT_THRESHOLD_CROSS * evel_new_threshold_cross(
4457 const char* ev_name, const char *ev_id,
4458 char * tcriticality,
4460 char * tthresholdCrossed,
4462 EVEL_EVENT_ACTION talertAction,
4463 char * talertDescription,
4464 EVEL_ALERT_TYPE talertType,
4465 unsigned long long tcollectionTimestamp,
4466 EVEL_SEVERITIES teventSeverity,
4467 unsigned long long teventStartTimestamp);
4469 /**************************************************************************//**
4470 * Free a Threshold cross event.
4472 * Free off the Threshold crossing event supplied. Will free all the contained allocated
4475 * @note It does not free the Threshold Cross itself, since that may be part of a
4477 *****************************************************************************/
4478 void evel_free_threshold_cross(EVENT_THRESHOLD_CROSS * const tcp);
4480 /**************************************************************************//**
4481 * Set the Event Type property of the Threshold Cross.
4483 * @note The property is treated as immutable: it is only valid to call
4484 * the setter once. However, we don't assert if the caller tries to
4485 * overwrite, just ignoring the update instead.
4487 * @param tcp Pointer to the ::EVENT_THRESHOLD_CROSS.
4488 * @param type The Event Type to be set. ASCIIZ string. The caller
4489 * does not need to preserve the value once the function
4491 *****************************************************************************/
4492 void evel_threshold_cross_type_set(EVENT_THRESHOLD_CROSS * const tcp, char * type);
4494 /**************************************************************************//**
4495 * Add an optional additional alertid value to Alert.
4497 * @param alertid Adds Alert ID
4498 *****************************************************************************/
4499 void evel_threshold_cross_alertid_add(EVENT_THRESHOLD_CROSS * const event,char * alertid);
4501 /**************************************************************************//**
4502 * Set the TCA probable Root cause.
4504 * @param sheader Possible root cause to Threshold
4505 *****************************************************************************/
4506 void evel_threshold_cross_possible_rootcause_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4507 /**************************************************************************//**
4508 * Set the TCA networking cause.
4510 * @param sheader Possible networking service value to Threshold
4511 *****************************************************************************/
4512 void evel_threshold_cross_networkservice_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4513 /**************************************************************************//**
4514 * Set the TCA Interface name.
4516 * @param sheader Interface name to threshold
4517 *****************************************************************************/
4518 void evel_threshold_cross_interfacename_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4519 /**************************************************************************//**
4520 * Set the TCA Data element type.
4522 * @param sheader element type of Threshold
4523 *****************************************************************************/
4524 void evel_threshold_cross_data_elementtype_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4525 /**************************************************************************//**
4526 * Set the TCA Data collector value.
4528 * @param sheader Data collector value
4529 *****************************************************************************/
4530 void evel_threshold_cross_data_collector_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4531 /**************************************************************************//**
4532 * Set the TCA alert value.
4534 * @param sheader Possible alert value
4535 *****************************************************************************/
4536 void evel_threshold_cross_alertvalue_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4538 /**************************************************************************//**
4539 * Add an additional field name/value pair to the THRESHOLD CROSS event.
4541 * The name and value are null delimited ASCII strings. The library takes
4542 * a copy so the caller does not have to preserve values after the function
4545 * @param state_change Pointer to the ::EVENT_THRESHOLD_CROSS.
4546 * @param name ASCIIZ string with the attribute's name. The caller
4547 * does not need to preserve the value once the function
4549 * @param value ASCIIZ string with the attribute's value. The caller
4550 * does not need to preserve the value once the function
4552 *****************************************************************************/
4553 void evel_threshold_cross_addl_info_add(EVENT_THRESHOLD_CROSS * const tcp,
4554 const char * const name,
4555 const char * const value);
4557 /*****************************************************************************/
4558 /*****************************************************************************/
4562 /*****************************************************************************/
4563 /*****************************************************************************/
4565 /*****************************************************************************/
4567 /*****************************************************************************/
4568 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4569 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4570 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4571 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4573 #define EVEL_ENTER() \
4575 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4576 debug_indent += 2; \
4578 #define EVEL_EXIT() \
4580 debug_indent -= 2; \
4581 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4584 #define INDENT_SEPARATORS \
4585 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4587 extern EVEL_LOG_LEVELS debug_level;
4588 extern int debug_indent;
4591 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4593 /**************************************************************************//**
4594 * Initialize logging
4596 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4597 * @param[in] ident The identifier for our logs.
4598 *****************************************************************************/
4599 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4601 /**************************************************************************//**
4602 * Log debug information
4604 * Logs debugging information in a platform independent manner.
4606 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4607 * @param[in] format Log formatting string in printf format.
4608 * @param[in] ... Variable argument list.
4609 *****************************************************************************/
4610 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4612 /***************************************************************************//*
4613 * Store the formatted string into the static error string and log the error.
4615 * @param format Error string in standard printf format.
4616 * @param ... Variable parameters to be substituted into the format string.
4617 *****************************************************************************/
4618 void log_error_state(char * format, ...);