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 1
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 unsigned long long 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 1
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 1
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 1
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 1
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 1
1322 #define EVEL_STATE_CHANGE_MINOR_VERSION 2
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 Start Epoch property of the event header.
1648 * @note The Start Epoch defaults to the time of event creation.
1650 * @param header Pointer to the ::EVENT_HEADER.
1651 * @param start_epoch_microsec
1652 * The start epoch to set, in microseconds.
1653 *****************************************************************************/
1654 void evel_start_epoch_set(EVENT_HEADER * const header,
1655 const unsigned long long start_epoch_microsec);
1657 /**************************************************************************//**
1658 * Set the Last Epoch property of the event header.
1660 * @note The Last Epoch defaults to the time of event creation.
1662 * @param header Pointer to the ::EVENT_HEADER.
1663 * @param last_epoch_microsec
1664 * The last epoch to set, in microseconds.
1665 *****************************************************************************/
1666 void evel_last_epoch_set(EVENT_HEADER * const header,
1667 const unsigned long long last_epoch_microsec);
1669 /**************************************************************************//**
1670 * Set the Reporting Entity Name property of the event header.
1672 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1674 * @param header Pointer to the ::EVENT_HEADER.
1675 * @param entity_name The entity name to set.
1676 *****************************************************************************/
1677 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1678 const char * const entity_name);
1680 /**************************************************************************//**
1681 * Set the Reporting Entity Id property of the event header.
1683 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1685 * @param header Pointer to the ::EVENT_HEADER.
1686 * @param entity_id The entity id to set.
1687 *****************************************************************************/
1688 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1689 const char * const entity_id);
1691 /**************************************************************************//**
1692 * Set the NFC Naming code property of the event header.
1694 * @param header Pointer to the ::EVENT_HEADER.
1695 * @param nfcnamingcode String
1696 *****************************************************************************/
1697 void evel_nfcnamingcode_set(EVENT_HEADER * const header,
1698 const char * const nfcnam);
1699 /**************************************************************************//**
1700 * Set the NF Naming code property of the event header.
1702 * @param header Pointer to the ::EVENT_HEADER.
1703 * @param nfnamingcode String
1704 *****************************************************************************/
1705 void evel_nfnamingcode_set(EVENT_HEADER * const header,
1706 const char * const nfnam);
1708 /*****************************************************************************/
1709 /*****************************************************************************/
1713 /*****************************************************************************/
1714 /*****************************************************************************/
1716 /**************************************************************************//**
1717 * Create a new fault event.
1719 * @note The mandatory fields on the Fault must be supplied to this factory
1720 * function and are immutable once set. Optional fields have explicit
1721 * setter functions, but again values may only be set once so that the
1722 * Fault has immutable properties.
1723 * @param event_name Unique Event Name
1724 * @param event_id A universal identifier of the event for analysis etc
1725 * @param condition The condition indicated by the Fault.
1726 * @param specific_problem The specific problem triggering the fault.
1727 * @param priority The priority of the event.
1728 * @param severity The severity of the Fault.
1729 * @param ev_source_type Source of Alarm event
1730 * @param version fault version
1731 * @param status status of Virtual Function
1732 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1733 * not used (i.e. posted) it must be released using ::evel_free_fault.
1734 * @retval NULL Failed to create the event.
1735 *****************************************************************************/
1736 EVENT_FAULT * evel_new_fault(const char* ev_name, const char *ev_id,
1737 const char * const condition,
1738 const char * const specific_problem,
1739 EVEL_EVENT_PRIORITIES priority,
1740 EVEL_SEVERITIES severity,
1741 EVEL_SOURCE_TYPES ev_source_type,
1742 EVEL_VF_STATUSES status);
1744 /**************************************************************************//**
1747 * Free off the Fault supplied. Will free all the contained allocated memory.
1749 * @note It does not free the Fault itself, since that may be part of a
1751 *****************************************************************************/
1752 void evel_free_fault(EVENT_FAULT * event);
1754 /**************************************************************************//**
1755 * Set the Fault Category property of the Fault.
1757 * @note The property is treated as immutable: it is only valid to call
1758 * the setter once. However, we don't assert if the caller tries to
1759 * overwrite, just ignoring the update instead.
1761 * @param fault Pointer to the fault.
1762 * @param category Category : license, link, routing, security, signaling.
1763 * ASCIIZ string. The caller
1764 * does not need to preserve the value once the function
1766 *****************************************************************************/
1767 void evel_fault_category_set(EVENT_FAULT * fault,
1768 const char * const category);
1770 /**************************************************************************//**
1771 * Set the Alarm Interface A property of the Fault.
1773 * @note The property is treated as immutable: it is only valid to call
1774 * the setter once. However, we don't assert if the caller tries to
1775 * overwrite, just ignoring the update instead.
1777 * @param fault Pointer to the fault.
1778 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1779 * does not need to preserve the value once the function
1781 *****************************************************************************/
1782 void evel_fault_interface_set(EVENT_FAULT * fault,
1783 const char * const interface);
1785 /**************************************************************************//**
1786 * Add an additional value name/value pair to the Fault.
1788 * The name and value are null delimited ASCII strings. The library takes
1789 * a copy so the caller does not have to preserve values after the function
1792 * @param fault Pointer to the fault.
1793 * @param name ASCIIZ string with the attribute's name.
1794 * @param value ASCIIZ string with the attribute's value.
1795 *****************************************************************************/
1796 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1798 /**************************************************************************//**
1799 * Set the Event Type property of the Fault.
1801 * @note The property is treated as immutable: it is only valid to call
1802 * the setter once. However, we don't assert if the caller tries to
1803 * overwrite, just ignoring the update instead.
1805 * @param fault Pointer to the fault.
1806 * @param type The Event Type to be set. ASCIIZ string. The caller
1807 * does not need to preserve the value once the function
1809 *****************************************************************************/
1810 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1812 /*****************************************************************************/
1813 /*****************************************************************************/
1817 /*****************************************************************************/
1818 /*****************************************************************************/
1820 /**************************************************************************//**
1821 * Create a new Measurement event.
1823 * @note The mandatory fields on the Measurement must be supplied to this
1824 * factory function and are immutable once set. Optional fields have
1825 * explicit setter functions, but again values may only be set once so
1826 * that the Measurement has immutable properties.
1828 * @param measurement_interval
1829 * @param event_name Unique Event Name
1830 * @param event_id A universal identifier of the event for analysis etc
1832 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1833 * event is not used (i.e. posted) it must be released using
1834 * ::evel_free_event.
1835 * @retval NULL Failed to create the event.
1836 *****************************************************************************/
1837 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval,const char* ev_name, const char *ev_id);
1839 /**************************************************************************//**
1840 * Free a Measurement.
1842 * Free off the Measurement supplied. Will free all the contained allocated
1845 * @note It does not free the Measurement itself, since that may be part of a
1847 *****************************************************************************/
1848 void evel_free_measurement(EVENT_MEASUREMENT * event);
1850 /**************************************************************************//**
1851 * Set the Event Type property of the Measurement.
1853 * @note The property is treated as immutable: it is only valid to call
1854 * the setter once. However, we don't assert if the caller tries to
1855 * overwrite, just ignoring the update instead.
1857 * @param measurement Pointer to the Measurement.
1858 * @param type The Event Type to be set. ASCIIZ string. The caller
1859 * does not need to preserve the value once the function
1861 *****************************************************************************/
1862 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1863 const char * const type);
1865 /**************************************************************************//**
1866 * Set the Concurrent Sessions property of the Measurement.
1868 * @note The property is treated as immutable: it is only valid to call
1869 * the setter once. However, we don't assert if the caller tries to
1870 * overwrite, just ignoring the update instead.
1872 * @param measurement Pointer to the Measurement.
1873 * @param concurrent_sessions The Concurrent Sessions to be set.
1874 *****************************************************************************/
1875 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1876 int concurrent_sessions);
1878 /**************************************************************************//**
1879 * Set the Configured Entities property of the Measurement.
1881 * @note The property is treated as immutable: it is only valid to call
1882 * the setter once. However, we don't assert if the caller tries to
1883 * overwrite, just ignoring the update instead.
1885 * @param measurement Pointer to the Measurement.
1886 * @param configured_entities The Configured Entities to be set.
1887 *****************************************************************************/
1888 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1889 int configured_entities);
1891 /**************************************************************************//**
1892 * Add an additional set of Errors to the Measurement.
1894 * @note The property is treated as immutable: it is only valid to call
1895 * the setter once. However, we don't assert if the caller tries to
1896 * overwrite, just ignoring the update instead.
1898 * @param measurement Pointer to the measurement.
1899 * @param receive_discards The number of receive discards.
1900 * @param receive_errors The number of receive errors.
1901 * @param transmit_discards The number of transmit discards.
1902 * @param transmit_errors The number of transmit errors.
1903 *****************************************************************************/
1904 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1905 int receive_discards,
1907 int transmit_discards,
1908 int transmit_errors);
1910 /**************************************************************************//**
1911 * Set the Mean Request Latency property of the Measurement.
1913 * @note The property is treated as immutable: it is only valid to call
1914 * the setter once. However, we don't assert if the caller tries to
1915 * overwrite, just ignoring the update instead.
1917 * @param measurement Pointer to the Measurement.
1918 * @param mean_request_latency The Mean Request Latency to be set.
1919 *****************************************************************************/
1920 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1921 double mean_request_latency);
1923 /**************************************************************************//**
1924 * Set the Request Rate property of the Measurement.
1926 * @note The property is treated as immutable: it is only valid to call
1927 * the setter once. However, we don't assert if the caller tries to
1928 * overwrite, just ignoring the update instead.
1930 * @param measurement Pointer to the Measurement.
1931 * @param request_rate The Request Rate to be set.
1932 *****************************************************************************/
1933 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
1936 /**************************************************************************//**
1937 * Add an additional CPU usage value name/value pair to the Measurement.
1939 * The name and value are null delimited ASCII strings. The library takes
1940 * a copy so the caller does not have to preserve values after the function
1943 * @param measurement Pointer to the measurement.
1944 * @param id ASCIIZ string with the CPU's identifier.
1945 * @param usage CPU utilization.
1946 *****************************************************************************/
1947 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
1949 /**************************************************************************//**
1950 * Set the CPU Idle value in measurement interval
1951 * percentage of CPU time spent in the idle task
1953 * @note The property is treated as immutable: it is only valid to call
1954 * the setter once. However, we don't assert if the caller tries to
1955 * overwrite, just ignoring the update instead.
1957 * @param cpu_use Pointer to the CPU Use.
1959 *****************************************************************************/
1960 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
1963 /**************************************************************************//**
1964 * Set the percentage of time spent servicing interrupts
1966 * @note The property is treated as immutable: it is only valid to call
1967 * the setter once. However, we don't assert if the caller tries to
1968 * overwrite, just ignoring the update instead.
1970 * @param cpu_use Pointer to the CPU Use.
1972 *****************************************************************************/
1973 void evel_measurement_cpu_use_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
1976 /**************************************************************************//**
1977 * Set the percentage of time spent running user space processes that have been niced
1979 * @note The property is treated as immutable: it is only valid to call
1980 * the setter once. However, we don't assert if the caller tries to
1981 * overwrite, just ignoring the update instead.
1983 * @param cpu_use Pointer to the CPU Use.
1985 *****************************************************************************/
1986 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
1989 /**************************************************************************//**
1990 * Set the percentage of time spent handling soft irq interrupts
1992 * @note The property is treated as immutable: it is only valid to call
1993 * the setter once. However, we don't assert if the caller tries to
1994 * overwrite, just ignoring the update instead.
1996 * @param cpu_use Pointer to the CPU Use.
1998 *****************************************************************************/
1999 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
2001 /**************************************************************************//**
2002 * Set the percentage of time spent in involuntary wait
2004 * @note The property is treated as immutable: it is only valid to call
2005 * the setter once. However, we don't assert if the caller tries to
2006 * overwrite, just ignoring the update instead.
2008 * @param cpu_use Pointer to the CPU Use.
2010 *****************************************************************************/
2011 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
2013 /**************************************************************************//**
2014 * Set the percentage of time spent on system tasks running the kernel
2016 * @note The property is treated as immutable: it is only valid to call
2017 * the setter once. However, we don't assert if the caller tries to
2018 * overwrite, just ignoring the update instead.
2020 * @param cpu_use Pointer to the CPU Use.
2022 *****************************************************************************/
2023 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
2025 /**************************************************************************//**
2026 * Set the percentage of time spent running un-niced user space processes
2028 * @note The property is treated as immutable: it is only valid to call
2029 * the setter once. However, we don't assert if the caller tries to
2030 * overwrite, just ignoring the update instead.
2032 * @param cpu_use Pointer to the CPU Use.
2034 *****************************************************************************/
2035 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
2037 /**************************************************************************//**
2038 * Set the percentage of CPU time spent waiting for I/O operations to complete
2040 * @note The property is treated as immutable: it is only valid to call
2041 * the setter once. However, we don't assert if the caller tries to
2042 * overwrite, just ignoring the update instead.
2044 * @param cpu_use Pointer to the CPU Use.
2046 *****************************************************************************/
2047 void evel_measurement_cpu_use_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
2050 /**************************************************************************//**
2051 * Add an additional File System usage value name/value pair to the
2054 * The filesystem_name is null delimited ASCII string. The library takes a
2055 * copy so the caller does not have to preserve values after the function
2058 * @param measurement Pointer to the measurement.
2059 * @param filesystem_name ASCIIZ string with the file-system's UUID.
2060 * @param block_configured Block storage configured.
2061 * @param block_used Block storage in use.
2062 * @param block_iops Block storage IOPS.
2063 * @param ephemeral_configured Ephemeral storage configured.
2064 * @param ephemeral_used Ephemeral storage in use.
2065 * @param ephemeral_iops Ephemeral storage IOPS.
2066 *****************************************************************************/
2067 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
2068 char * filesystem_name,
2069 double block_configured,
2072 double ephemeral_configured,
2073 double ephemeral_used,
2074 double ephemeral_iops);
2076 /**************************************************************************//**
2077 * Add a Feature usage value name/value pair to the Measurement.
2079 * The name is null delimited ASCII string. The library takes
2080 * a copy so the caller does not have to preserve values after the function
2083 * @param measurement Pointer to the measurement.
2084 * @param feature ASCIIZ string with the feature's name.
2085 * @param utilization Utilization of the feature.
2086 *****************************************************************************/
2087 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
2091 /**************************************************************************//**
2092 * Add a Additional Measurement value name/value pair to the Measurement.
2094 * The name is null delimited ASCII string. The library takes
2095 * a copy so the caller does not have to preserve values after the function
2098 * @param measurement Pointer to the Measurement.
2099 * @param group ASCIIZ string with the measurement group's name.
2100 * @param name ASCIIZ string containing the measurement's name.
2101 * @param name ASCIIZ string containing the measurement's value.
2102 *****************************************************************************/
2103 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
2104 const char * const group,
2105 const char * const name,
2106 const char * const value);
2108 /**************************************************************************//**
2109 * Add a Codec usage value name/value pair to the Measurement.
2111 * The name is null delimited ASCII string. The library takes
2112 * a copy so the caller does not have to preserve values after the function
2115 * @param measurement Pointer to the measurement.
2116 * @param codec ASCIIZ string with the codec's name.
2117 * @param utilization Utilization of the feature.
2118 *****************************************************************************/
2119 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
2123 /**************************************************************************//**
2124 * Set the Media Ports in Use property of the Measurement.
2126 * @note The property is treated as immutable: it is only valid to call
2127 * the setter once. However, we don't assert if the caller tries to
2128 * overwrite, just ignoring the update instead.
2130 * @param measurement Pointer to the measurement.
2131 * @param media_ports_in_use The media port usage to set.
2132 *****************************************************************************/
2133 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
2134 int media_ports_in_use);
2136 /**************************************************************************//**
2137 * Set the VNFC Scaling Metric property of the Measurement.
2139 * @note The property is treated as immutable: it is only valid to call
2140 * the setter once. However, we don't assert if the caller tries to
2141 * overwrite, just ignoring the update instead.
2143 * @param measurement Pointer to the measurement.
2144 * @param scaling_metric The scaling metric to set.
2145 *****************************************************************************/
2146 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
2147 int scaling_metric);
2149 /**************************************************************************//**
2150 * Create a new Latency Bucket to be added to a Measurement event.
2152 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
2153 * supplied to this factory function and are immutable once set.
2154 * Optional fields have explicit setter functions, but again values
2155 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
2156 * immutable properties.
2158 * @param count Count of events in this bucket.
2160 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
2161 * @retval NULL Failed to create the Latency Bucket.
2162 *****************************************************************************/
2163 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
2165 /**************************************************************************//**
2166 * Set the High End property of the Measurement Latency Bucket.
2168 * @note The property is treated as immutable: it is only valid to call
2169 * the setter once. However, we don't assert if the caller tries to
2170 * overwrite, just ignoring the update instead.
2172 * @param bucket Pointer to the Measurement Latency Bucket.
2173 * @param high_end High end of the bucket's range.
2174 *****************************************************************************/
2175 void evel_meas_latency_bucket_high_end_set(
2176 MEASUREMENT_LATENCY_BUCKET * const bucket,
2177 const double high_end);
2179 /**************************************************************************//**
2180 * Set the Low End property of the Measurement Latency Bucket.
2182 * @note The property is treated as immutable: it is only valid to call
2183 * the setter once. However, we don't assert if the caller tries to
2184 * overwrite, just ignoring the update instead.
2186 * @param bucket Pointer to the Measurement Latency Bucket.
2187 * @param low_end Low end of the bucket's range.
2188 *****************************************************************************/
2189 void evel_meas_latency_bucket_low_end_set(
2190 MEASUREMENT_LATENCY_BUCKET * const bucket,
2191 const double low_end);
2193 /**************************************************************************//**
2194 * Add an additional Measurement Latency Bucket to the specified event.
2196 * @param measurement Pointer to the Measurement event.
2197 * @param bucket Pointer to the Measurement Latency Bucket to add.
2198 *****************************************************************************/
2199 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2200 MEASUREMENT_LATENCY_BUCKET * const bucket);
2202 /**************************************************************************//**
2203 * Add an additional Latency Distribution bucket to the Measurement.
2205 * This function implements the previous API, purely for convenience.
2207 * @param measurement Pointer to the measurement.
2208 * @param low_end Low end of the bucket's range.
2209 * @param high_end High end of the bucket's range.
2210 * @param count Count of events in this bucket.
2211 *****************************************************************************/
2212 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2213 const double low_end,
2214 const double high_end,
2217 /**************************************************************************//**
2218 * Create a new vNIC Use to be added to a Measurement event.
2220 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2221 * to this factory function and are immutable once set. Optional
2222 * fields have explicit setter functions, but again values may only be
2223 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2226 * @param vnic_id ASCIIZ string with the vNIC's ID.
2227 * @param val_suspect True or false confidence in data.
2229 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2230 * If the structure is not used it must be released using
2231 * ::evel_measurement_free_vnic_performance.
2232 * @retval NULL Failed to create the vNIC Use.
2233 *****************************************************************************/
2234 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2236 /**************************************************************************//**
2239 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2242 * @note It does not free the vNIC Use itself, since that may be part of a
2244 *****************************************************************************/
2245 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2247 /**************************************************************************//**
2248 * Set the Accumulated Broadcast Packets Received in measurement interval
2249 * property of the vNIC performance.
2251 * @note The property is treated as immutable: it is only valid to call
2252 * the setter once. However, we don't assert if the caller tries to
2253 * overwrite, just ignoring the update instead.
2255 * @param vnic_performance Pointer to the vNIC Use.
2256 * @param recvd_bcast_packets_acc
2257 *****************************************************************************/
2258 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2259 const double recvd_bcast_packets_acc);
2260 /**************************************************************************//**
2261 * Set the Delta Broadcast Packets Received in measurement interval
2262 * property of the vNIC performance.
2264 * @note The property is treated as immutable: it is only valid to call
2265 * the setter once. However, we don't assert if the caller tries to
2266 * overwrite, just ignoring the update instead.
2268 * @param vnic_performance Pointer to the vNIC Use.
2269 * @param recvd_bcast_packets_delta
2270 *****************************************************************************/
2271 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2272 const double recvd_bcast_packets_delta);
2273 /**************************************************************************//**
2274 * Set the Discarded Packets Received in measurement interval
2275 * property of the vNIC performance.
2277 * @note The property is treated as immutable: it is only valid to call
2278 * the setter once. However, we don't assert if the caller tries to
2279 * overwrite, just ignoring the update instead.
2281 * @param vnic_performance Pointer to the vNIC Use.
2282 * @param recvd_discard_packets_acc
2283 *****************************************************************************/
2284 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2285 const double recvd_discard_packets_acc);
2286 /**************************************************************************//**
2287 * Set the Delta Discarded Packets Received in measurement interval
2288 * property of the vNIC performance.
2290 * @note The property is treated as immutable: it is only valid to call
2291 * the setter once. However, we don't assert if the caller tries to
2292 * overwrite, just ignoring the update instead.
2294 * @param vnic_performance Pointer to the vNIC Use.
2295 * @param recvd_discard_packets_delta
2296 *****************************************************************************/
2297 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2298 const double recvd_discard_packets_delta);
2299 /**************************************************************************//**
2300 * Set the Error Packets Received in measurement interval
2301 * property of the vNIC performance.
2303 * @note The property is treated as immutable: it is only valid to call
2304 * the setter once. However, we don't assert if the caller tries to
2305 * overwrite, just ignoring the update instead.
2307 * @param vnic_performance Pointer to the vNIC Use.
2308 * @param recvd_error_packets_acc
2309 *****************************************************************************/
2310 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2311 const double recvd_error_packets_acc);
2312 /**************************************************************************//**
2313 * Set the Delta Error Packets Received in measurement interval
2314 * property of the vNIC performance.
2316 * @note The property is treated as immutable: it is only valid to call
2317 * the setter once. However, we don't assert if the caller tries to
2318 * overwrite, just ignoring the update instead.
2320 * @param vnic_performance Pointer to the vNIC Use.
2321 * @param recvd_error_packets_delta
2322 *****************************************************************************/
2323 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2324 const double recvd_error_packets_delta);
2325 /**************************************************************************//**
2326 * Set the Accumulated Multicast Packets Received in measurement interval
2327 * property of the vNIC performance.
2329 * @note The property is treated as immutable: it is only valid to call
2330 * the setter once. However, we don't assert if the caller tries to
2331 * overwrite, just ignoring the update instead.
2333 * @param vnic_performance Pointer to the vNIC Use.
2334 * @param recvd_mcast_packets_acc
2335 *****************************************************************************/
2336 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2337 const double recvd_mcast_packets_acc);
2338 /**************************************************************************//**
2339 * Set the Delta Multicast Packets Received in measurement interval
2340 * property of the vNIC performance.
2342 * @note The property is treated as immutable: it is only valid to call
2343 * the setter once. However, we don't assert if the caller tries to
2344 * overwrite, just ignoring the update instead.
2346 * @param vnic_performance Pointer to the vNIC Use.
2347 * @param recvd_mcast_packets_delta
2348 *****************************************************************************/
2349 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2350 const double recvd_mcast_packets_delta);
2351 /**************************************************************************//**
2352 * Set the Accumulated Octets Received in measurement interval
2353 * property of the vNIC performance.
2355 * @note The property is treated as immutable: it is only valid to call
2356 * the setter once. However, we don't assert if the caller tries to
2357 * overwrite, just ignoring the update instead.
2359 * @param vnic_performance Pointer to the vNIC Use.
2360 * @param recvd_octets_acc
2361 *****************************************************************************/
2362 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2363 const double recvd_octets_acc);
2364 /**************************************************************************//**
2365 * Set the Delta Octets Received in measurement interval
2366 * property of the vNIC performance.
2368 * @note The property is treated as immutable: it is only valid to call
2369 * the setter once. However, we don't assert if the caller tries to
2370 * overwrite, just ignoring the update instead.
2372 * @param vnic_performance Pointer to the vNIC Use.
2373 * @param recvd_octets_delta
2374 *****************************************************************************/
2375 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2376 const double recvd_octets_delta);
2377 /**************************************************************************//**
2378 * Set the Accumulated Total Packets Received in measurement interval
2379 * property of the vNIC performance.
2381 * @note The property is treated as immutable: it is only valid to call
2382 * the setter once. However, we don't assert if the caller tries to
2383 * overwrite, just ignoring the update instead.
2385 * @param vnic_performance Pointer to the vNIC Use.
2386 * @param recvd_total_packets_acc
2387 *****************************************************************************/
2388 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2389 const double recvd_total_packets_acc);
2390 /**************************************************************************//**
2391 * Set the Delta Total Packets Received in measurement interval
2392 * property of the vNIC performance.
2394 * @note The property is treated as immutable: it is only valid to call
2395 * the setter once. However, we don't assert if the caller tries to
2396 * overwrite, just ignoring the update instead.
2398 * @param vnic_performance Pointer to the vNIC Use.
2399 * @param recvd_total_packets_delta
2400 *****************************************************************************/
2401 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2402 const double recvd_total_packets_delta);
2403 /**************************************************************************//**
2404 * Set the Accumulated Unicast Packets Received in measurement interval
2405 * property of the vNIC performance.
2407 * @note The property is treated as immutable: it is only valid to call
2408 * the setter once. However, we don't assert if the caller tries to
2409 * overwrite, just ignoring the update instead.
2411 * @param vnic_performance Pointer to the vNIC Use.
2412 * @param recvd_ucast_packets_acc
2413 *****************************************************************************/
2414 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2415 const double recvd_ucast_packets_acc);
2416 /**************************************************************************//**
2417 * Set the Delta Unicast packets Received in measurement interval
2418 * property of the vNIC performance.
2420 * @note The property is treated as immutable: it is only valid to call
2421 * the setter once. However, we don't assert if the caller tries to
2422 * overwrite, just ignoring the update instead.
2424 * @param vnic_performance Pointer to the vNIC Use.
2425 * @param recvd_ucast_packets_delta
2426 *****************************************************************************/
2427 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2428 const double recvd_ucast_packets_delta);
2429 /**************************************************************************//**
2430 * Set the Transmitted Broadcast Packets in measurement interval
2431 * property of the vNIC performance.
2433 * @note The property is treated as immutable: it is only valid to call
2434 * the setter once. However, we don't assert if the caller tries to
2435 * overwrite, just ignoring the update instead.
2437 * @param vnic_performance Pointer to the vNIC Use.
2438 * @param tx_bcast_packets_acc
2439 *****************************************************************************/
2440 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2441 const double tx_bcast_packets_acc);
2442 /**************************************************************************//**
2443 * Set the Delta Broadcast packets Transmitted in measurement interval
2444 * property of the vNIC performance.
2446 * @note The property is treated as immutable: it is only valid to call
2447 * the setter once. However, we don't assert if the caller tries to
2448 * overwrite, just ignoring the update instead.
2450 * @param vnic_performance Pointer to the vNIC Use.
2451 * @param tx_bcast_packets_delta
2452 *****************************************************************************/
2453 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2454 const double tx_bcast_packets_delta);
2455 /**************************************************************************//**
2456 * Set the Transmitted Discarded Packets in measurement interval
2457 * property of the vNIC performance.
2459 * @note The property is treated as immutable: it is only valid to call
2460 * the setter once. However, we don't assert if the caller tries to
2461 * overwrite, just ignoring the update instead.
2463 * @param vnic_performance Pointer to the vNIC Use.
2464 * @param tx_discarded_packets_acc
2465 *****************************************************************************/
2466 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2467 const double tx_discarded_packets_acc);
2468 /**************************************************************************//**
2469 * Set the Delta Discarded packets Transmitted in measurement interval
2470 * property of the vNIC performance.
2472 * @note The property is treated as immutable: it is only valid to call
2473 * the setter once. However, we don't assert if the caller tries to
2474 * overwrite, just ignoring the update instead.
2476 * @param vnic_performance Pointer to the vNIC Use.
2477 * @param tx_discarded_packets_delta
2478 *****************************************************************************/
2479 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2480 const double tx_discarded_packets_delta);
2481 /**************************************************************************//**
2482 * Set the Transmitted Errored Packets in measurement interval
2483 * property of the vNIC performance.
2485 * @note The property is treated as immutable: it is only valid to call
2486 * the setter once. However, we don't assert if the caller tries to
2487 * overwrite, just ignoring the update instead.
2489 * @param vnic_performance Pointer to the vNIC Use.
2490 * @param tx_error_packets_acc
2491 *****************************************************************************/
2492 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2493 const double tx_error_packets_acc);
2494 /**************************************************************************//**
2495 * Set the Delta Errored packets Transmitted in measurement interval
2496 * property of the vNIC performance.
2498 * @note The property is treated as immutable: it is only valid to call
2499 * the setter once. However, we don't assert if the caller tries to
2500 * overwrite, just ignoring the update instead.
2502 * @param vnic_performance Pointer to the vNIC Use.
2503 * @param tx_error_packets_delta
2504 *****************************************************************************/
2505 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2506 const double tx_error_packets_delta);
2507 /**************************************************************************//**
2508 * Set the Transmitted Multicast Packets in measurement interval
2509 * property of the vNIC performance.
2511 * @note The property is treated as immutable: it is only valid to call
2512 * the setter once. However, we don't assert if the caller tries to
2513 * overwrite, just ignoring the update instead.
2515 * @param vnic_performance Pointer to the vNIC Use.
2516 * @param tx_mcast_packets_acc
2517 *****************************************************************************/
2518 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2519 const double tx_mcast_packets_acc);
2520 /**************************************************************************//**
2521 * Set the Delta Multicast packets Transmitted in measurement interval
2522 * property of the vNIC performance.
2524 * @note The property is treated as immutable: it is only valid to call
2525 * the setter once. However, we don't assert if the caller tries to
2526 * overwrite, just ignoring the update instead.
2528 * @param vnic_performance Pointer to the vNIC Use.
2529 * @param tx_mcast_packets_delta
2530 *****************************************************************************/
2531 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2532 const double tx_mcast_packets_delta);
2533 /**************************************************************************//**
2534 * Set the Transmitted Octets in measurement interval
2535 * property of the vNIC performance.
2537 * @note The property is treated as immutable: it is only valid to call
2538 * the setter once. However, we don't assert if the caller tries to
2539 * overwrite, just ignoring the update instead.
2541 * @param vnic_performance Pointer to the vNIC Use.
2542 * @param tx_octets_acc
2543 *****************************************************************************/
2544 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2545 const double tx_octets_acc);
2546 /**************************************************************************//**
2547 * Set the Delta Octets Transmitted in measurement interval
2548 * property of the vNIC performance.
2550 * @note The property is treated as immutable: it is only valid to call
2551 * the setter once. However, we don't assert if the caller tries to
2552 * overwrite, just ignoring the update instead.
2554 * @param vnic_performance Pointer to the vNIC Use.
2555 * @param tx_octets_delta
2556 *****************************************************************************/
2557 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2558 const double tx_octets_delta);
2559 /**************************************************************************//**
2560 * Set the Transmitted Total Packets in measurement interval
2561 * property of the vNIC performance.
2563 * @note The property is treated as immutable: it is only valid to call
2564 * the setter once. However, we don't assert if the caller tries to
2565 * overwrite, just ignoring the update instead.
2567 * @param vnic_performance Pointer to the vNIC Use.
2568 * @param tx_total_packets_acc
2569 *****************************************************************************/
2570 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2571 const double tx_total_packets_acc);
2572 /**************************************************************************//**
2573 * Set the Delta Total Packets Transmitted in measurement interval
2574 * property of the vNIC performance.
2576 * @note The property is treated as immutable: it is only valid to call
2577 * the setter once. However, we don't assert if the caller tries to
2578 * overwrite, just ignoring the update instead.
2580 * @param vnic_performance Pointer to the vNIC Use.
2581 * @param tx_total_packets_delta
2582 *****************************************************************************/
2583 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2584 const double tx_total_packets_delta);
2585 /**************************************************************************//**
2586 * Set the Transmitted Unicast Packets in measurement interval
2587 * property of the vNIC performance.
2589 * @note The property is treated as immutable: it is only valid to call
2590 * the setter once. However, we don't assert if the caller tries to
2591 * overwrite, just ignoring the update instead.
2593 * @param vnic_performance Pointer to the vNIC Use.
2594 * @param tx_ucast_packets_acc
2595 *****************************************************************************/
2596 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2597 const double tx_ucast_packets_acc);
2598 /**************************************************************************//**
2599 * Set the Delta Octets Transmitted in measurement interval
2600 * property of the vNIC performance.
2602 * @note The property is treated as immutable: it is only valid to call
2603 * the setter once. However, we don't assert if the caller tries to
2604 * overwrite, just ignoring the update instead.
2606 * @param vnic_performance Pointer to the vNIC Use.
2607 * @param tx_ucast_packets_delta
2608 *****************************************************************************/
2609 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2610 const double tx_ucast_packets_delta);
2612 /**************************************************************************//**
2613 * Add an additional vNIC Use to the specified Measurement event.
2615 * @param measurement Pointer to the measurement.
2616 * @param vnic_performance Pointer to the vNIC Use to add.
2617 *****************************************************************************/
2618 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2619 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2621 /**************************************************************************//**
2622 * Add an additional vNIC usage record Measurement.
2624 * This function implements the previous API, purely for convenience.
2626 * The ID is null delimited ASCII string. The library takes a copy so the
2627 * caller does not have to preserve values after the function returns.
2629 * @param measurement Pointer to the measurement.
2630 * @param vnic_id ASCIIZ string with the vNIC's ID.
2631 * @param valset true or false confidence level
2632 * @param recvd_bcast_packets_acc Recieved broadcast packets
2633 * @param recvd_bcast_packets_delta Received delta broadcast packets
2634 * @param recvd_discarded_packets_acc Recieved discarded packets
2635 * @param recvd_discarded_packets_delta Received discarded delta packets
2636 * @param recvd_error_packets_acc Received error packets
2637 * @param recvd_error_packets_delta, Received delta error packets
2638 * @param recvd_mcast_packets_acc Received multicast packets
2639 * @param recvd_mcast_packets_delta Received delta multicast packets
2640 * @param recvd_octets_acc Received octets
2641 * @param recvd_octets_delta Received delta octets
2642 * @param recvd_total_packets_acc Received total packets
2643 * @param recvd_total_packets_delta Received delta total packets
2644 * @param recvd_ucast_packets_acc Received Unicast packets
2645 * @param recvd_ucast_packets_delta Received delta unicast packets
2646 * @param tx_bcast_packets_acc Transmitted broadcast packets
2647 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2648 * @param tx_discarded_packets_acc Transmitted packets discarded
2649 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2650 * @param tx_error_packets_acc Transmitted error packets
2651 * @param tx_error_packets_delta Transmitted delta error packets
2652 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2653 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2654 * @param tx_octets_acc Transmitted octets
2655 * @param tx_octets_delta Transmitted delta octets
2656 * @param tx_total_packets_acc Transmitted total packets
2657 * @param tx_total_packets_delta Transmitted delta total packets
2658 * @param tx_ucast_packets_acc Transmitted Unicast packets
2659 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2660 *****************************************************************************/
2661 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2662 char * const vnic_id,
2664 double recvd_bcast_packets_acc,
2665 double recvd_bcast_packets_delta,
2666 double recvd_discarded_packets_acc,
2667 double recvd_discarded_packets_delta,
2668 double recvd_error_packets_acc,
2669 double recvd_error_packets_delta,
2670 double recvd_mcast_packets_acc,
2671 double recvd_mcast_packets_delta,
2672 double recvd_octets_acc,
2673 double recvd_octets_delta,
2674 double recvd_total_packets_acc,
2675 double recvd_total_packets_delta,
2676 double recvd_ucast_packets_acc,
2677 double recvd_ucast_packets_delta,
2678 double tx_bcast_packets_acc,
2679 double tx_bcast_packets_delta,
2680 double tx_discarded_packets_acc,
2681 double tx_discarded_packets_delta,
2682 double tx_error_packets_acc,
2683 double tx_error_packets_delta,
2684 double tx_mcast_packets_acc,
2685 double tx_mcast_packets_delta,
2686 double tx_octets_acc,
2687 double tx_octets_delta,
2688 double tx_total_packets_acc,
2689 double tx_total_packets_delta,
2690 double tx_ucast_packets_acc,
2691 double tx_ucast_packets_delta);
2693 /*****************************************************************************/
2694 /*****************************************************************************/
2698 /*****************************************************************************/
2699 /*****************************************************************************/
2701 /**************************************************************************//**
2702 * Create a new Report event.
2704 * @note The mandatory fields on the Report must be supplied to this
2705 * factory function and are immutable once set. Optional fields have
2706 * explicit setter functions, but again values may only be set once so
2707 * that the Report has immutable properties.
2709 * @param measurement_interval
2710 * @param event_name Unique Event Name
2711 * @param event_id A universal identifier of the event for analysis etc
2713 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2714 * not used (i.e. posted) it must be released using
2715 * ::evel_free_report.
2716 * @retval NULL Failed to create the event.
2717 *****************************************************************************/
2718 EVENT_REPORT * evel_new_report(double measurement_interval,const char* ev_name, const char *ev_id);
2720 /**************************************************************************//**
2723 * Free off the Report supplied. Will free all the contained allocated memory.
2725 * @note It does not free the Report itself, since that may be part of a
2727 *****************************************************************************/
2728 void evel_free_report(EVENT_REPORT * event);
2730 /**************************************************************************//**
2731 * Set the Event Type property of the Report.
2733 * @note The property is treated as immutable: it is only valid to call
2734 * the setter once. However, we don't assert if the caller tries to
2735 * overwrite, just ignoring the update instead.
2737 * @param report Pointer to the Report.
2738 * @param type The Event Type to be set. ASCIIZ string. The caller
2739 * does not need to preserve the value once the function
2741 *****************************************************************************/
2742 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2744 /**************************************************************************//**
2745 * Add a Feature usage value name/value pair to the Report.
2747 * The name is null delimited ASCII string. The library takes
2748 * a copy so the caller does not have to preserve values after the function
2751 * @param report Pointer to the report.
2752 * @param feature ASCIIZ string with the feature's name.
2753 * @param utilization Utilization of the feature.
2754 *****************************************************************************/
2755 void evel_report_feature_use_add(EVENT_REPORT * report,
2759 /**************************************************************************//**
2760 * Add a Additional Measurement value name/value pair to the Report.
2762 * The name is null delimited ASCII string. The library takes
2763 * a copy so the caller does not have to preserve values after the function
2766 * @param report Pointer to the report.
2767 * @param group ASCIIZ string with the measurement group's name.
2768 * @param name ASCIIZ string containing the measurement's name.
2769 * @param value ASCIIZ string containing the measurement's value.
2770 *****************************************************************************/
2771 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2772 const char * const group,
2773 const char * const name,
2774 const char * const value);
2776 /*****************************************************************************/
2777 /*****************************************************************************/
2781 /*****************************************************************************/
2782 /*****************************************************************************/
2784 /**************************************************************************//**
2785 * Create a new Mobile Flow event.
2787 * @note The mandatory fields on the Mobile Flow must be supplied to this
2788 * factory function and are immutable once set. Optional fields have
2789 * explicit setter functions, but again values may only be set once so
2790 * that the Mobile Flow has immutable properties.
2792 * @param event_name Unique Event Name
2793 * @param event_id A universal identifier of the event for analysis etc
2794 * @param flow_direction
2795 * @param gtp_per_flow_metrics
2796 * @param ip_protocol_type
2798 * @param other_endpoint_ip_address
2799 * @param other_endpoint_port
2800 * @param reporting_endpoint_ip_addr
2801 * @param reporting_endpoint_port
2803 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2804 * event is not used (i.e. posted) it must be released using
2805 * ::evel_free_mobile_flow.
2806 * @retval NULL Failed to create the event.
2807 *****************************************************************************/
2808 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2809 const char* ev_name, const char *ev_id,
2810 const char * const flow_direction,
2811 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2812 const char * const ip_protocol_type,
2813 const char * const ip_version,
2814 const char * const other_endpoint_ip_address,
2815 int other_endpoint_port,
2816 const char * const reporting_endpoint_ip_addr,
2817 int reporting_endpoint_port);
2819 /**************************************************************************//**
2820 * Free a Mobile Flow.
2822 * Free off the Mobile Flow supplied. Will free all the contained allocated
2825 * @note It does not free the Mobile Flow itself, since that may be part of a
2827 *****************************************************************************/
2828 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2830 /**************************************************************************//**
2831 * Set the Event Type property of the Mobile Flow.
2833 * @note The property is treated as immutable: it is only valid to call
2834 * the setter once. However, we don't assert if the caller tries to
2835 * overwrite, just ignoring the update instead.
2837 * @param mobile_flow Pointer to the Mobile Flow.
2838 * @param type The Event Type to be set. ASCIIZ string. The caller
2839 * does not need to preserve the value once the function
2841 *****************************************************************************/
2842 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2843 const char * const type);
2845 /**************************************************************************//**
2846 * Set the Application Type property of the Mobile Flow.
2848 * @note The property is treated as immutable: it is only valid to call
2849 * the setter once. However, we don't assert if the caller tries to
2850 * overwrite, just ignoring the update instead.
2852 * @param mobile_flow Pointer to the Mobile Flow.
2853 * @param type The Application Type to be set. ASCIIZ string. The caller
2854 * does not need to preserve the value once the function
2856 *****************************************************************************/
2857 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2858 const char * const type);
2860 /**************************************************************************//**
2861 * Set the Application Protocol Type property of the Mobile Flow.
2863 * @note The property is treated as immutable: it is only valid to call
2864 * the setter once. However, we don't assert if the caller tries to
2865 * overwrite, just ignoring the update instead.
2867 * @param mobile_flow Pointer to the Mobile Flow.
2868 * @param type The Application Protocol Type to be set. ASCIIZ string.
2869 * The caller does not need to preserve the value once the
2871 *****************************************************************************/
2872 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2873 const char * const type);
2875 /**************************************************************************//**
2876 * Set the Application Protocol Version property of the Mobile Flow.
2878 * @note The property is treated as immutable: it is only valid to call
2879 * the setter once. However, we don't assert if the caller tries to
2880 * overwrite, just ignoring the update instead.
2882 * @param mobile_flow Pointer to the Mobile Flow.
2883 * @param version The Application Protocol Version to be set. ASCIIZ
2884 * string. The caller does not need to preserve the value
2885 * once the function returns.
2886 *****************************************************************************/
2887 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2888 const char * const version);
2890 /**************************************************************************//**
2891 * Set the CID property of the Mobile Flow.
2893 * @note The property is treated as immutable: it is only valid to call
2894 * the setter once. However, we don't assert if the caller tries to
2895 * overwrite, just ignoring the update instead.
2897 * @param mobile_flow Pointer to the Mobile Flow.
2898 * @param cid The CID to be set. ASCIIZ string. The caller does not
2899 * need to preserve the value once the function returns.
2900 *****************************************************************************/
2901 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2902 const char * const cid);
2904 /**************************************************************************//**
2905 * Set the Connection Type property of the Mobile Flow.
2907 * @note The property is treated as immutable: it is only valid to call
2908 * the setter once. However, we don't assert if the caller tries to
2909 * overwrite, just ignoring the update instead.
2911 * @param mobile_flow Pointer to the Mobile Flow.
2912 * @param type The Connection Type to be set. ASCIIZ string. The caller
2913 * does not need to preserve the value once the function
2915 *****************************************************************************/
2916 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2917 const char * const type);
2919 /**************************************************************************//**
2920 * Set the ECGI property of the Mobile Flow.
2922 * @note The property is treated as immutable: it is only valid to call
2923 * the setter once. However, we don't assert if the caller tries to
2924 * overwrite, just ignoring the update instead.
2926 * @param mobile_flow Pointer to the Mobile Flow.
2927 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2928 * need to preserve the value once the function returns.
2929 *****************************************************************************/
2930 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2931 const char * const ecgi);
2933 /**************************************************************************//**
2934 * Set the GTP Protocol Type property of the Mobile Flow.
2936 * @note The property is treated as immutable: it is only valid to call
2937 * the setter once. However, we don't assert if the caller tries to
2938 * overwrite, just ignoring the update instead.
2940 * @param mobile_flow Pointer to the Mobile Flow.
2941 * @param type The GTP Protocol Type to be set. ASCIIZ string. The
2942 * caller does not need to preserve the value once the
2944 *****************************************************************************/
2945 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2946 const char * const type);
2948 /**************************************************************************//**
2949 * Set the GTP Protocol Version property of the Mobile Flow.
2951 * @note The property is treated as immutable: it is only valid to call
2952 * the setter once. However, we don't assert if the caller tries to
2953 * overwrite, just ignoring the update instead.
2955 * @param mobile_flow Pointer to the Mobile Flow.
2956 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
2957 * caller does not need to preserve the value once the
2959 *****************************************************************************/
2960 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2961 const char * const version);
2963 /**************************************************************************//**
2964 * Set the HTTP Header property of the Mobile Flow.
2966 * @note The property is treated as immutable: it is only valid to call
2967 * the setter once. However, we don't assert if the caller tries to
2968 * overwrite, just ignoring the update instead.
2970 * @param mobile_flow Pointer to the Mobile Flow.
2971 * @param header The HTTP header to be set. ASCIIZ string. The caller does
2972 * not need to preserve the value once the function returns.
2973 *****************************************************************************/
2974 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
2975 const char * const header);
2977 /**************************************************************************//**
2978 * Set the IMEI property of the Mobile Flow.
2980 * @note The property is treated as immutable: it is only valid to call
2981 * the setter once. However, we don't assert if the caller tries to
2982 * overwrite, just ignoring the update instead.
2984 * @param mobile_flow Pointer to the Mobile Flow.
2985 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
2986 * need to preserve the value once the function returns.
2987 *****************************************************************************/
2988 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
2989 const char * const imei);
2991 /**************************************************************************//**
2992 * Set the IMSI property of the Mobile Flow.
2994 * @note The property is treated as immutable: it is only valid to call
2995 * the setter once. However, we don't assert if the caller tries to
2996 * overwrite, just ignoring the update instead.
2998 * @param mobile_flow Pointer to the Mobile Flow.
2999 * @param imsi The IMSI to be set. ASCIIZ string. The caller does not
3000 * need to preserve the value once the function returns.
3001 *****************************************************************************/
3002 void evel_mobile_flow_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
3003 const char * const imsi);
3005 /**************************************************************************//**
3006 * Set the LAC property of the Mobile Flow.
3008 * @note The property is treated as immutable: it is only valid to call
3009 * the setter once. However, we don't assert if the caller tries to
3010 * overwrite, just ignoring the update instead.
3012 * @param mobile_flow Pointer to the Mobile Flow.
3013 * @param lac The LAC to be set. ASCIIZ string. The caller does not
3014 * need to preserve the value once the function returns.
3015 *****************************************************************************/
3016 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
3017 const char * const lac);
3019 /**************************************************************************//**
3020 * Set the MCC property of the Mobile Flow.
3022 * @note The property is treated as immutable: it is only valid to call
3023 * the setter once. However, we don't assert if the caller tries to
3024 * overwrite, just ignoring the update instead.
3026 * @param mobile_flow Pointer to the Mobile Flow.
3027 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
3028 * need to preserve the value once the function returns.
3029 *****************************************************************************/
3030 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
3031 const char * const mcc);
3033 /**************************************************************************//**
3034 * Set the MNC property of the Mobile Flow.
3036 * @note The property is treated as immutable: it is only valid to call
3037 * the setter once. However, we don't assert if the caller tries to
3038 * overwrite, just ignoring the update instead.
3040 * @param mobile_flow Pointer to the Mobile Flow.
3041 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
3042 * need to preserve the value once the function returns.
3043 *****************************************************************************/
3044 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
3045 const char * const mnc);
3047 /**************************************************************************//**
3048 * Set the MSISDN property of the Mobile Flow.
3050 * @note The property is treated as immutable: it is only valid to call
3051 * the setter once. However, we don't assert if the caller tries to
3052 * overwrite, just ignoring the update instead.
3054 * @param mobile_flow Pointer to the Mobile Flow.
3055 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
3056 * need to preserve the value once the function returns.
3057 *****************************************************************************/
3058 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
3059 const char * const msisdn);
3061 /**************************************************************************//**
3062 * Set the Other Functional Role property of the Mobile Flow.
3064 * @note The property is treated as immutable: it is only valid to call
3065 * the setter once. However, we don't assert if the caller tries to
3066 * overwrite, just ignoring the update instead.
3068 * @param mobile_flow Pointer to the Mobile Flow.
3069 * @param role The Other Functional Role to be set. ASCIIZ string. The
3070 * caller does not need to preserve the value once the
3072 *****************************************************************************/
3073 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
3074 const char * const role);
3076 /**************************************************************************//**
3077 * Set the RAC property of the Mobile Flow.
3079 * @note The property is treated as immutable: it is only valid to call
3080 * the setter once. However, we don't assert if the caller tries to
3081 * overwrite, just ignoring the update instead.
3083 * @param mobile_flow Pointer to the Mobile Flow.
3084 * @param rac The RAC to be set. ASCIIZ string. The caller does not
3085 * need to preserve the value once the function returns.
3086 *****************************************************************************/
3087 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
3088 const char * const rac);
3090 /**************************************************************************//**
3091 * Set the Radio Access Technology property of the Mobile Flow.
3093 * @note The property is treated as immutable: it is only valid to call
3094 * the setter once. However, we don't assert if the caller tries to
3095 * overwrite, just ignoring the update instead.
3097 * @param mobile_flow Pointer to the Mobile Flow.
3098 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
3099 * caller does not need to preserve the value once the
3101 *****************************************************************************/
3102 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
3103 const char * const tech);
3105 /**************************************************************************//**
3106 * Set the SAC property of the Mobile Flow.
3108 * @note The property is treated as immutable: it is only valid to call
3109 * the setter once. However, we don't assert if the caller tries to
3110 * overwrite, just ignoring the update instead.
3112 * @param mobile_flow Pointer to the Mobile Flow.
3113 * @param sac The SAC to be set. ASCIIZ string. The caller does not
3114 * need to preserve the value once the function returns.
3115 *****************************************************************************/
3116 void evel_mobile_flow_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
3117 const char * const sac);
3119 /**************************************************************************//**
3120 * Set the Sampling Algorithm property of the Mobile Flow.
3122 * @note The property is treated as immutable: it is only valid to call
3123 * the setter once. However, we don't assert if the caller tries to
3124 * overwrite, just ignoring the update instead.
3126 * @param mobile_flow Pointer to the Mobile Flow.
3127 * @param algorithm The Sampling Algorithm to be set.
3128 *****************************************************************************/
3129 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
3132 /**************************************************************************//**
3133 * Set the TAC property of the Mobile Flow.
3135 * @note The property is treated as immutable: it is only valid to call
3136 * the setter once. However, we don't assert if the caller tries to
3137 * overwrite, just ignoring the update instead.
3139 * @param mobile_flow Pointer to the Mobile Flow.
3140 * @param tac The TAC to be set. ASCIIZ string. The caller does not
3141 * need to preserve the value once the function returns.
3142 *****************************************************************************/
3143 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
3144 const char * const tac);
3146 /**************************************************************************//**
3147 * Set the Tunnel ID property of the Mobile Flow.
3149 * @note The property is treated as immutable: it is only valid to call
3150 * the setter once. However, we don't assert if the caller tries to
3151 * overwrite, just ignoring the update instead.
3153 * @param mobile_flow Pointer to the Mobile Flow.
3154 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
3155 * not need to preserve the value once the function returns.
3156 *****************************************************************************/
3157 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3158 const char * const tunnel_id);
3160 /**************************************************************************//**
3161 * Set the VLAN ID property of the Mobile Flow.
3163 * @note The property is treated as immutable: it is only valid to call
3164 * the setter once. However, we don't assert if the caller tries to
3165 * overwrite, just ignoring the update instead.
3167 * @param mobile_flow Pointer to the Mobile Flow.
3168 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
3169 * not need to preserve the value once the function returns.
3170 *****************************************************************************/
3171 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3172 const char * const vlan_id);
3174 /**************************************************************************//**
3175 * Create a new Mobile GTP Per Flow Metrics.
3177 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
3178 * supplied to this factory function and are immutable once set.
3179 * Optional fields have explicit setter functions, but again values
3180 * may only be set once so that the Mobile GTP Per Flow Metrics has
3181 * immutable properties.
3183 * @param avg_bit_error_rate
3184 * @param avg_packet_delay_variation
3185 * @param avg_packet_latency
3186 * @param avg_receive_throughput
3187 * @param avg_transmit_throughput
3188 * @param flow_activation_epoch
3189 * @param flow_activation_microsec
3190 * @param flow_deactivation_epoch
3191 * @param flow_deactivation_microsec
3192 * @param flow_deactivation_time
3193 * @param flow_status
3194 * @param max_packet_delay_variation
3195 * @param num_activation_failures
3196 * @param num_bit_errors
3197 * @param num_bytes_received
3198 * @param num_bytes_transmitted
3199 * @param num_dropped_packets
3200 * @param num_l7_bytes_received
3201 * @param num_l7_bytes_transmitted
3202 * @param num_lost_packets
3203 * @param num_out_of_order_packets
3204 * @param num_packet_errors
3205 * @param num_packets_received_excl_retrans
3206 * @param num_packets_received_incl_retrans
3207 * @param num_packets_transmitted_incl_retrans
3208 * @param num_retries
3209 * @param num_timeouts
3210 * @param num_tunneled_l7_bytes_received
3211 * @param round_trip_time
3212 * @param time_to_first_byte
3214 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3215 * If the structure is not used it must be released using
3216 * ::evel_free_mobile_gtp_flow_metrics.
3217 * @retval NULL Failed to create the event.
3218 *****************************************************************************/
3219 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3220 double avg_bit_error_rate,
3221 double avg_packet_delay_variation,
3222 int avg_packet_latency,
3223 int avg_receive_throughput,
3224 int avg_transmit_throughput,
3225 int flow_activation_epoch,
3226 int flow_activation_microsec,
3227 int flow_deactivation_epoch,
3228 int flow_deactivation_microsec,
3229 time_t flow_deactivation_time,
3230 const char * const flow_status,
3231 int max_packet_delay_variation,
3232 int num_activation_failures,
3234 int num_bytes_received,
3235 int num_bytes_transmitted,
3236 int num_dropped_packets,
3237 int num_l7_bytes_received,
3238 int num_l7_bytes_transmitted,
3239 int num_lost_packets,
3240 int num_out_of_order_packets,
3241 int num_packet_errors,
3242 int num_packets_received_excl_retrans,
3243 int num_packets_received_incl_retrans,
3244 int num_packets_transmitted_incl_retrans,
3247 int num_tunneled_l7_bytes_received,
3248 int round_trip_time,
3249 int time_to_first_byte);
3251 /**************************************************************************//**
3252 * Free a Mobile GTP Per Flow Metrics.
3254 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3255 * contained allocated memory.
3257 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3258 * may be part of a larger structure.
3259 *****************************************************************************/
3260 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3262 /**************************************************************************//**
3263 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3266 * @note The property is treated as immutable: it is only valid to call
3267 * the setter once. However, we don't assert if the caller tries to
3268 * overwrite, just ignoring the update instead.
3270 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3271 * @param duration The Duration of Connection Failed Status to be set.
3272 *****************************************************************************/
3273 void evel_mobile_gtp_metrics_dur_con_fail_set(
3274 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3277 /**************************************************************************//**
3278 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3281 * @note The property is treated as immutable: it is only valid to call
3282 * the setter once. However, we don't assert if the caller tries to
3283 * overwrite, just ignoring the update instead.
3285 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3286 * @param duration The Duration of Tunnel Failed Status to be set.
3287 *****************************************************************************/
3288 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3289 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3292 /**************************************************************************//**
3293 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3295 * @note The property is treated as immutable: it is only valid to call
3296 * the setter once. However, we don't assert if the caller tries to
3297 * overwrite, just ignoring the update instead.
3299 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3300 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3301 * does not need to preserve the value once the function
3303 *****************************************************************************/
3304 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3305 const char * const act_by);
3307 /**************************************************************************//**
3308 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3310 * @note The property is treated as immutable: it is only valid to call
3311 * the setter once. However, we don't assert if the caller tries to
3312 * overwrite, just ignoring the update instead.
3314 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3315 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3316 * does not need to preserve the value once the function
3318 *****************************************************************************/
3319 void evel_mobile_gtp_metrics_act_time_set(
3320 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3323 /**************************************************************************//**
3324 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3326 * @note The property is treated as immutable: it is only valid to call
3327 * the setter once. However, we don't assert if the caller tries to
3328 * overwrite, just ignoring the update instead.
3330 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3331 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3332 * does not need to preserve the value once the function
3334 *****************************************************************************/
3335 void evel_mobile_gtp_metrics_deact_by_set(
3336 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3337 const char * const deact_by);
3339 /**************************************************************************//**
3340 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3342 * @note The property is treated as immutable: it is only valid to call
3343 * the setter once. However, we don't assert if the caller tries to
3344 * overwrite, just ignoring the update instead.
3346 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3347 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3348 * caller does not need to preserve the value once the
3350 *****************************************************************************/
3351 void evel_mobile_gtp_metrics_con_status_set(
3352 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3353 const char * const status);
3355 /**************************************************************************//**
3356 * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.
3358 * @note The property is treated as immutable: it is only valid to call
3359 * the setter once. However, we don't assert if the caller tries to
3360 * overwrite, just ignoring the update instead.
3362 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3363 * @param status The GTP Tunnel Status to be set. ASCIIZ string. The
3364 * caller does not need to preserve the value once the
3366 *****************************************************************************/
3367 void evel_mobile_gtp_metrics_tun_status_set(
3368 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3369 const char * const status);
3371 /**************************************************************************//**
3372 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3374 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3375 * @param index The index of the IP Type-of-Service.
3376 * @param count The count.
3377 *****************************************************************************/
3378 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3382 /**************************************************************************//**
3383 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3386 * @note The property is treated as immutable: it is only valid to call
3387 * the setter once. However, we don't assert if the caller tries to
3388 * overwrite, just ignoring the update instead.
3390 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3391 * @param rtt The Large Packet Round-Trip Time to be set.
3392 *****************************************************************************/
3393 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3394 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3397 /**************************************************************************//**
3398 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3400 * @note The property is treated as immutable: it is only valid to call
3401 * the setter once. However, we don't assert if the caller tries to
3402 * overwrite, just ignoring the update instead.
3404 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3405 * @param threshold The Large Packet Threshold to be set.
3406 *****************************************************************************/
3407 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3408 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3411 /**************************************************************************//**
3412 * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.
3414 * @note The property is treated as immutable: it is only valid to call
3415 * the setter once. However, we don't assert if the caller tries to
3416 * overwrite, just ignoring the update instead.
3418 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3419 * @param rate The Max Receive Bit Rate to be set.
3420 *****************************************************************************/
3421 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3422 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3425 /**************************************************************************//**
3426 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
3428 * @note The property is treated as immutable: it is only valid to call
3429 * the setter once. However, we don't assert if the caller tries to
3430 * overwrite, just ignoring the update instead.
3432 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3433 * @param rate The Max Transmit Bit Rate to be set.
3434 *****************************************************************************/
3435 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3436 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3439 /**************************************************************************//**
3440 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3443 * @note The property is treated as immutable: it is only valid to call
3444 * the setter once. However, we don't assert if the caller tries to
3445 * overwrite, just ignoring the update instead.
3447 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3448 * @param num The Number of GTP Echo Failures to be set.
3449 *****************************************************************************/
3450 void evel_mobile_gtp_metrics_num_echo_fail_set(
3451 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3454 /**************************************************************************//**
3455 * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow
3458 * @note The property is treated as immutable: it is only valid to call
3459 * the setter once. However, we don't assert if the caller tries to
3460 * overwrite, just ignoring the update instead.
3462 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3463 * @param num The Number of GTP Tunnel Errors to be set.
3464 *****************************************************************************/
3465 void evel_mobile_gtp_metrics_num_tun_fail_set(
3466 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3469 /**************************************************************************//**
3470 * Set the Number of HTTP Errors property of the Mobile GTP Per Flow Metrics.
3472 * @note The property is treated as immutable: it is only valid to call
3473 * the setter once. However, we don't assert if the caller tries to
3474 * overwrite, just ignoring the update instead.
3476 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3477 * @param num The Number of HTTP Errors to be set.
3478 *****************************************************************************/
3479 void evel_mobile_gtp_metrics_num_http_errors_set(
3480 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3483 /**************************************************************************//**
3484 * Add a TCP flag count to the metrics.
3486 * @note The property is treated as immutable: it is only valid to call
3487 * the setter once. However, we don't assert if the caller tries to
3488 * overwrite, just ignoring the update instead.
3490 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3491 * @param tcp_flag The TCP flag count to be updated.
3492 * @param count The associated flag count.
3493 *****************************************************************************/
3494 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3495 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3496 const EVEL_TCP_FLAGS tcp_flag,
3499 /**************************************************************************//**
3500 * Add a QCI COS count to the metrics.
3502 * @note The property is treated as immutable: it is only valid to call
3503 * the setter once. However, we don't assert if the caller tries to
3504 * overwrite, just ignoring the update instead.
3506 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3507 * @param qci_cos The QCI COS count to be updated.
3508 * @param count The associated QCI COS count.
3509 *****************************************************************************/
3510 void evel_mobile_gtp_metrics_qci_cos_count_add(
3511 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3512 const EVEL_QCI_COS_TYPES qci_cos,
3515 /*****************************************************************************/
3516 /*****************************************************************************/
3520 /*****************************************************************************/
3521 /*****************************************************************************/
3523 /**************************************************************************//**
3524 * Create a new Signaling event.
3526 * @note The mandatory fields on the Signaling must be supplied to
3527 * this factory function and are immutable once set. Optional fields
3528 * have explicit setter functions, but again values may only be set
3529 * once so that the event has immutable properties.
3530 * @param event_name Unique Event Name
3531 * @param event_id A universal identifier of the event for analysis etc
3532 * @param vendor_name The vendor id to encode in the event vnf field.
3533 * @param module The module to encode in the event.
3534 * @param vnfname The Virtual network function to encode in the event.
3535 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3536 * is not used (i.e. posted) it must be released using
3537 * ::evel_free_signaling.
3538 * @retval NULL Failed to create the event.
3539 *****************************************************************************/
3540 EVENT_SIGNALING * evel_new_signaling(const char* ev_name, const char *ev_id,
3541 const char * const vendor_name,
3542 const char * const correlator,
3543 const char * const local_ip_address,
3544 const char * const local_port,
3545 const char * const remote_ip_address,
3546 const char * const remote_port);
3548 /**************************************************************************//**
3549 * Free a Signaling event.
3551 * Free off the event supplied. Will free all the contained allocated memory.
3553 * @note It does not free the event itself, since that may be part of a larger
3555 *****************************************************************************/
3556 void evel_free_signaling(EVENT_SIGNALING * const event);
3558 /**************************************************************************//**
3559 * Set the Event Type property of the Signaling event.
3561 * @note The property is treated as immutable: it is only valid to call
3562 * the setter once. However, we don't assert if the caller tries to
3563 * overwrite, just ignoring the update instead.
3565 * @param event Pointer to the Signaling event.
3566 * @param type The Event Type to be set. ASCIIZ string. The caller
3567 * does not need to preserve the value once the function
3569 *****************************************************************************/
3570 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3571 const char * const type);
3573 /**************************************************************************//**
3574 * Add an additional value name/value pair to the SIP signaling.
3576 * The name and value are null delimited ASCII strings. The library takes
3577 * a copy so the caller does not have to preserve values after the function
3580 * @param event Pointer to the fault.
3581 * @param name ASCIIZ string with the attribute's name. The caller
3582 * does not need to preserve the value once the function
3584 * @param value ASCIIZ string with the attribute's value. The caller
3585 * does not need to preserve the value once the function
3587 *****************************************************************************/
3588 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3590 /**************************************************************************//**
3591 * Set the Correlator property of the Signaling event.
3593 * @note The property is treated as immutable: it is only valid to call
3594 * the setter once. However, we don't assert if the caller tries to
3595 * overwrite, just ignoring the update instead.
3597 * @param event Pointer to the Signaling event.
3598 * @param correlator The correlator to be set. ASCIIZ string. The caller
3599 * does not need to preserve the value once the function
3601 *****************************************************************************/
3602 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3603 const char * const correlator);
3605 /**************************************************************************//**
3606 * Set the Local Ip Address property of the Signaling event.
3608 * @note The property is treated as immutable: it is only valid to call
3609 * the setter once. However, we don't assert if the caller tries to
3610 * overwrite, just ignoring the update instead.
3612 * @param event Pointer to the Signaling event.
3613 * @param local_ip_address
3614 * The Local Ip Address to be set. ASCIIZ string. The
3615 * caller does not need to preserve the value once the
3617 *****************************************************************************/
3618 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3619 const char * const local_ip_address);
3621 /**************************************************************************//**
3622 * Set the Local Port property of the Signaling event.
3624 * @note The property is treated as immutable: it is only valid to call
3625 * the setter once. However, we don't assert if the caller tries to
3626 * overwrite, just ignoring the update instead.
3628 * @param event Pointer to the Signaling event.
3629 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3630 * does not need to preserve the value once the function
3632 *****************************************************************************/
3633 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3634 const char * const local_port);
3636 /**************************************************************************//**
3637 * Set the Remote Ip Address property of the Signaling event.
3639 * @note The property is treated as immutable: it is only valid to call
3640 * the setter once. However, we don't assert if the caller tries to
3641 * overwrite, just ignoring the update instead.
3643 * @param event Pointer to the Signaling event.
3644 * @param remote_ip_address
3645 * The Remote Ip Address to be set. ASCIIZ string. The
3646 * caller does not need to preserve the value once the
3648 *****************************************************************************/
3649 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3650 const char * const remote_ip_address);
3652 /**************************************************************************//**
3653 * Set the Remote Port property of the Signaling event.
3655 * @note The property is treated as immutable: it is only valid to call
3656 * the setter once. However, we don't assert if the caller tries to
3657 * overwrite, just ignoring the update instead.
3659 * @param event Pointer to the Signaling event.
3660 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3661 * does not need to preserve the value once the function
3663 *****************************************************************************/
3664 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3665 const char * const remote_port);
3666 /**************************************************************************//**
3667 * Set the Vendor module property of the Signaling event.
3669 * @note The property is treated as immutable: it is only valid to call
3670 * the setter once. However, we don't assert if the caller tries to
3671 * overwrite, just ignoring the update instead.
3673 * @param event Pointer to the Signaling event.
3674 * @param modulename The module name to be set. ASCIIZ string. The caller
3675 * does not need to preserve the value once the function
3677 *****************************************************************************/
3678 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3679 const char * const module_name);
3680 /**************************************************************************//**
3681 * Set the Vendor module property of the Signaling event.
3683 * @note The property is treated as immutable: it is only valid to call
3684 * the setter once. However, we don't assert if the caller tries to
3685 * overwrite, just ignoring the update instead.
3687 * @param event Pointer to the Signaling event.
3688 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3689 * The caller does not need to preserve the value once
3690 * the function returns.
3691 *****************************************************************************/
3692 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3693 const char * const vnfname);
3695 /**************************************************************************//**
3696 * Set the Compressed SIP property of the Signaling event.
3698 * @note The property is treated as immutable: it is only valid to call
3699 * the setter once. However, we don't assert if the caller tries to
3700 * overwrite, just ignoring the update instead.
3702 * @param event Pointer to the Signaling event.
3703 * @param compressed_sip
3704 * The Compressed SIP to be set. ASCIIZ string. The caller
3705 * does not need to preserve the value once the function
3707 *****************************************************************************/
3708 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3709 const char * const compressed_sip);
3711 /**************************************************************************//**
3712 * Set the Summary SIP property of the Signaling event.
3714 * @note The property is treated as immutable: it is only valid to call
3715 * the setter once. However, we don't assert if the caller tries to
3716 * overwrite, just ignoring the update instead.
3718 * @param event Pointer to the Signaling event.
3719 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3720 * does not need to preserve the value once the function
3722 *****************************************************************************/
3723 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3724 const char * const summary_sip);
3727 /*****************************************************************************/
3728 /*****************************************************************************/
3732 /*****************************************************************************/
3733 /*****************************************************************************/
3735 /**************************************************************************//**
3736 * Create a new State Change event.
3738 * @note The mandatory fields on the Syslog must be supplied to this factory
3739 * function and are immutable once set. Optional fields have explicit
3740 * setter functions, but again values may only be set once so that the
3741 * Syslog has immutable properties.
3743 * @param event_name Unique Event Name
3744 * @param event_id A universal identifier of the event for analysis etc
3745 * @param new_state The new state of the reporting entity.
3746 * @param old_state The old state of the reporting entity.
3747 * @param interface The card or port name of the reporting entity.
3749 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3750 * event is not used it must be released using
3751 * ::evel_free_state_change
3752 * @retval NULL Failed to create the event.
3753 *****************************************************************************/
3754 EVENT_STATE_CHANGE * evel_new_state_change(const char* ev_name, const char *ev_id,
3755 const EVEL_ENTITY_STATE new_state,
3756 const EVEL_ENTITY_STATE old_state,
3757 const char * const interface);
3759 /**************************************************************************//**
3760 * Free a State Change.
3762 * Free off the State Change supplied. Will free all the contained allocated
3765 * @note It does not free the State Change itself, since that may be part of a
3767 *****************************************************************************/
3768 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3770 /**************************************************************************//**
3771 * Set the Event Type property of the State Change.
3773 * @note The property is treated as immutable: it is only valid to call
3774 * the setter once. However, we don't assert if the caller tries to
3775 * overwrite, just ignoring the update instead.
3777 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3778 * @param type The Event Type to be set. ASCIIZ string. The caller
3779 * does not need to preserve the value once the function
3781 *****************************************************************************/
3782 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3783 const char * const type);
3785 /**************************************************************************//**
3786 * Add an additional field name/value pair to the State Change.
3788 * The name and value are null delimited ASCII strings. The library takes
3789 * a copy so the caller does not have to preserve values after the function
3792 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3793 * @param name ASCIIZ string with the attribute's name. The caller
3794 * does not need to preserve the value once the function
3796 * @param value ASCIIZ string with the attribute's value. The caller
3797 * does not need to preserve the value once the function
3799 *****************************************************************************/
3800 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3801 const char * const name,
3802 const char * const value);
3804 /*****************************************************************************/
3805 /*****************************************************************************/
3809 /*****************************************************************************/
3810 /*****************************************************************************/
3812 /**************************************************************************//**
3813 * Create a new syslog event.
3815 * @note The mandatory fields on the Syslog must be supplied to this factory
3816 * function and are immutable once set. Optional fields have explicit
3817 * setter functions, but again values may only be set once so that the
3818 * Syslog has immutable properties.
3820 * @param event_name Unique Event Name
3821 * @param event_id A universal identifier of the event for analysis etc
3822 * @param event_source_type
3827 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3828 * not used it must be released using ::evel_free_syslog
3829 * @retval NULL Failed to create the event.
3830 *****************************************************************************/
3831 EVENT_SYSLOG * evel_new_syslog(const char* ev_name, const char *ev_id,
3832 EVEL_SOURCE_TYPES event_source_type,
3833 const char * const syslog_msg,
3834 const char * const syslog_tag);
3836 /**************************************************************************//**
3837 * Set the Event Type property of the Syslog.
3839 * @note The property is treated as immutable: it is only valid to call
3840 * the setter once. However, we don't assert if the caller tries to
3841 * overwrite, just ignoring the update instead.
3843 * @param syslog Pointer to the syslog.
3844 * @param type The Event Type to be set. ASCIIZ string. The caller
3845 * does not need to preserve the value once the function
3847 *****************************************************************************/
3848 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3849 const char * const type);
3851 /**************************************************************************//**
3854 * Free off the Syslog supplied. Will free all the contained allocated memory.
3856 * @note It does not free the Syslog itself, since that may be part of a
3858 *****************************************************************************/
3859 void evel_free_syslog(EVENT_SYSLOG * event);
3861 /**************************************************************************//**
3862 * Add an additional field name/value pair to the Syslog.
3864 * The name and value are null delimited ASCII strings. The library takes
3865 * a copy so the caller does not have to preserve values after the function
3868 * @param syslog Pointer to the syslog.
3869 * @param name ASCIIZ string with the attribute's name. The caller
3870 * does not need to preserve the value once the function
3872 * @param value ASCIIZ string with the attribute's value. The caller
3873 * does not need to preserve the value once the function
3875 *****************************************************************************/
3876 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3880 /**************************************************************************//**
3881 * Set the Event Source Host property of the Syslog.
3883 * @note The property is treated as immutable: it is only valid to call
3884 * the setter once. However, we don't assert if the caller tries to
3885 * overwrite, just ignoring the update instead.
3887 * @param syslog Pointer to the Syslog.
3888 * @param host The Event Source Host to be set. ASCIIZ string. The
3889 * caller does not need to preserve the value once the
3891 *****************************************************************************/
3892 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3893 const char * const host);
3895 /**************************************************************************//**
3896 * Set the Syslog Facility property of the Syslog.
3898 * @note The property is treated as immutable: it is only valid to call
3899 * the setter once. However, we don't assert if the caller tries to
3900 * overwrite, just ignoring the update instead.
3902 * @param syslog Pointer to the Syslog.
3903 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3904 * does not need to preserve the value once the function
3906 *****************************************************************************/
3907 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3908 EVEL_SYSLOG_FACILITIES facility);
3910 /**************************************************************************//**
3911 * Set the Process property of the Syslog.
3913 * @note The property is treated as immutable: it is only valid to call
3914 * the setter once. However, we don't assert if the caller tries to
3915 * overwrite, just ignoring the update instead.
3917 * @param syslog Pointer to the Syslog.
3918 * @param proc The Process to be set. ASCIIZ string. The caller does
3919 * not need to preserve the value once the function returns.
3920 *****************************************************************************/
3921 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3923 /**************************************************************************//**
3924 * Set the Process ID property of the Syslog.
3926 * @note The property is treated as immutable: it is only valid to call
3927 * the setter once. However, we don't assert if the caller tries to
3928 * overwrite, just ignoring the update instead.
3930 * @param syslog Pointer to the Syslog.
3931 * @param proc_id The Process ID to be set.
3932 *****************************************************************************/
3933 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
3935 /**************************************************************************//**
3936 * Set the Version property of the Syslog.
3938 * @note The property is treated as immutable: it is only valid to call
3939 * the setter once. However, we don't assert if the caller tries to
3940 * overwrite, just ignoring the update instead.
3942 * @param syslog Pointer to the Syslog.
3943 * @param version The Version to be set.
3944 *****************************************************************************/
3945 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
3947 /**************************************************************************//**
3948 * Set the Structured Data property of the Syslog.
3950 * @note The property is treated as immutable: it is only valid to call
3951 * the setter once. However, we don't assert if the caller tries to
3952 * overwrite, just ignoring the update instead.
3954 * @param syslog Pointer to the Syslog.
3955 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
3956 * does not need to preserve the value once the function
3958 *****************************************************************************/
3959 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
3961 /**************************************************************************//**
3962 * Set the Structured SDID property of the Syslog.
3964 * @note The property is treated as immutable: it is only valid to call
3965 * the setter once. However, we don't assert if the caller tries to
3966 * overwrite, just ignoring the update instead.
3968 * @param syslog Pointer to the Syslog.
3969 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
3970 * Caller does not need to preserve the value once the function
3972 *****************************************************************************/
3973 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
3975 /**************************************************************************//**
3976 * Set the Structured Severity property of the Syslog.
3978 * @note The property is treated as immutable: it is only valid to call
3979 * the setter once. However, we don't assert if the caller tries to
3980 * overwrite, just ignoring the update instead.
3982 * @param syslog Pointer to the Syslog.
3983 * @param sdid The Structured Data to be set. ASCIIZ string.
3984 * Caller does not need to preserve the value once the function
3986 *****************************************************************************/
3987 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
3990 /*****************************************************************************/
3991 /*****************************************************************************/
3995 /*****************************************************************************/
3996 /*****************************************************************************/
3998 /**************************************************************************//**
3999 * Create a new other event.
4001 * @param event_name Unique Event Name
4002 * @param event_id A universal identifier of the event for analysis etc
4004 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
4005 * not used it must be released using ::evel_free_other.
4006 * @retval NULL Failed to create the event.
4007 *****************************************************************************/
4008 EVENT_OTHER * evel_new_other(const char* ev_name, const char *ev_id);
4010 /**************************************************************************//**
4013 * Free off the Other supplied. Will free all the contained allocated memory.
4015 * @note It does not free the Other itself, since that may be part of a
4017 *****************************************************************************/
4018 void evel_free_other(EVENT_OTHER * event);
4020 /**************************************************************************//**
4021 * Set the Event Type property of the Other.
4023 * @note The property is treated as immutable: it is only valid to call
4024 * the setter once. However, we don't assert if the caller tries to
4025 * overwrite, just ignoring the update instead.
4027 * @param other Pointer to the Other.
4028 * @param type The Event Type to be set. ASCIIZ string. The caller
4029 * does not need to preserve the value once the function
4031 *****************************************************************************/
4032 void evel_other_type_set(EVENT_OTHER * other,
4033 const char * const type);
4035 /**************************************************************************//**
4036 * Add a value name/value pair to the Other.
4038 * The name and value are null delimited ASCII strings. The library takes
4039 * a copy so the caller does not have to preserve values after the function
4042 * @param other Pointer to the Other.
4043 * @param name ASCIIZ string with the attribute's name.
4044 * @param value ASCIIZ string with the attribute's value.
4045 *****************************************************************************/
4046 void evel_other_field_add(EVENT_OTHER * other,
4050 /*****************************************************************************/
4051 /*****************************************************************************/
4055 /*****************************************************************************/
4056 /*****************************************************************************/
4058 /**************************************************************************//**
4059 * Return the current measurement interval provided by the Event Listener.
4061 * @returns The current measurement interval
4062 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
4064 *****************************************************************************/
4065 int evel_get_measurement_interval();
4067 /*****************************************************************************/
4068 /* Supported Report version. */
4069 /*****************************************************************************/
4070 #define EVEL_VOICEQ_MAJOR_VERSION 1
4071 #define EVEL_VOICEQ_MINOR_VERSION 1
4073 /**************************************************************************//**
4074 * End of Call Voice Quality Metrices
4075 * JSON equivalent field: endOfCallVqmSummaries
4076 *****************************************************************************/
4077 typedef struct end_of_call_vqm_summaries {
4078 /***************************************************************************/
4079 /* Mandatory fields */
4080 /***************************************************************************/
4081 char* adjacencyName;
4082 char* endpointDescription;
4084 /***************************************************************************/
4085 /* Optional fields */
4086 /***************************************************************************/
4087 EVEL_OPTION_INT endpointJitter;
4088 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
4089 EVEL_OPTION_INT endpointRtpOctetsReceived;
4090 EVEL_OPTION_INT endpointRtpOctetsSent;
4091 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
4092 EVEL_OPTION_INT endpointRtpPacketsReceived;
4093 EVEL_OPTION_INT endpointRtpPacketsSent;
4094 EVEL_OPTION_INT localJitter;
4095 EVEL_OPTION_INT localRtpOctetsDiscarded;
4096 EVEL_OPTION_INT localRtpOctetsReceived;
4097 EVEL_OPTION_INT localRtpOctetsSent;
4098 EVEL_OPTION_INT localRtpPacketsDiscarded;
4099 EVEL_OPTION_INT localRtpPacketsReceived;
4100 EVEL_OPTION_INT localRtpPacketsSent;
4101 EVEL_OPTION_INT mosCqe;
4102 EVEL_OPTION_INT packetsLost;
4103 EVEL_OPTION_INT packetLossPercent;
4104 EVEL_OPTION_INT rFactor;
4105 EVEL_OPTION_INT roundTripDelay;
4107 } END_OF_CALL_VOICE_QUALITY_METRICS;
4109 /**************************************************************************//**
4111 * JSON equivalent field: voiceQualityFields
4112 *****************************************************************************/
4114 typedef struct event_voiceQuality {
4115 /***************************************************************************/
4116 /* Header and version */
4117 /***************************************************************************/
4118 EVENT_HEADER header;
4122 /***************************************************************************/
4123 /* Mandatory fields */
4124 /***************************************************************************/
4126 char *calleeSideCodec;
4127 char *callerSideCodec;
4130 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
4131 END_OF_CALL_VOICE_QUALITY_METRICS *endOfCallVqmSummaries;
4133 /***************************************************************************/
4134 /* Optional fields */
4135 /***************************************************************************/
4136 EVEL_OPTION_STRING phoneNumber;
4137 DLIST additionalInformation;
4139 } EVENT_VOICE_QUALITY;
4140 /**************************************************************************//**
4141 * Voice Quality Additional Info.
4142 * JSON equivalent field: additionalInformation
4143 *****************************************************************************/
4144 typedef struct voice_quality_additional_info {
4147 } VOICE_QUALITY_ADDL_INFO;
4149 /**************************************************************************//**
4150 * Create a new voice quality event.
4152 * @note The mandatory fields on the Voice Quality must be supplied to this
4153 * factory function and are immutable once set. Optional fields have
4154 * explicit setter functions, but again values may only be set once
4155 * so that the Voice Quality has immutable properties.
4156 * @param event_name Unique Event Name
4157 * @param event_id A universal identifier of the event for analysis etc
4158 * @param calleeSideCodec Callee codec for the call.
4159 * @param callerSideCodec Caller codec for the call.
4160 * @param correlator Constant across all events on this call.
4161 * @param midCallRtcp Base64 encoding of the binary RTCP data
4162 * (excluding Eth/IP/UDP headers).
4163 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
4164 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
4165 * event is not used (i.e. posted) it must be released using
4166 ::evel_free_voice_quality.
4167 * @retval NULL Failed to create the event.
4168 *****************************************************************************/
4169 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char* ev_name, const char *ev_id,
4170 const char * const calleeSideCodec,
4171 const char * const callerSideCodec, const char * const correlator,
4172 const char * const midCallRtcp, const char * const vendorVnfNameFields);
4174 /**************************************************************************//**
4175 * Set the Callee side codec for Call for domain Voice Quality
4177 * @note The property is treated as immutable: it is only valid to call
4178 * the setter once. However, we don't assert if the caller tries to
4179 * overwrite, just ignoring the update instead.
4181 * @param voiceQuality Pointer to the Voice Quality Event.
4182 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
4183 * string. The caller does not need to
4184 * preserve the value once the function
4186 *****************************************************************************/
4187 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4188 const char * const calleeCodecForCall);
4190 /**************************************************************************//**
4191 * Set the Caller side codec for Call for domain Voice Quality
4193 * @note The property is treated as immutable: it is only valid to call
4194 * the setter once. However, we don't assert if the caller tries to
4195 * overwrite, just ignoring the update instead.
4197 * @param voiceQuality Pointer to the Voice Quality Event.
4198 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
4199 * string. The caller does not need to
4200 * preserve the value once the function
4202 *****************************************************************************/
4203 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4204 const char * const callerCodecForCall);
4206 /**************************************************************************//**
4207 * Set the correlator for domain Voice Quality
4209 * @note The property is treated as immutable: it is only valid to call
4210 * the setter once. However, we don't assert if the caller tries to
4211 * overwrite, just ignoring the update instead.
4213 * @param voiceQuality Pointer to the Voice Quality Event.
4214 * @param correlator The correlator value to be set. ASCIIZ
4215 * string. The caller does not need to
4216 * preserve the value once the function
4218 *****************************************************************************/
4219 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4220 const char * const vCorrelator);
4222 /**************************************************************************//**
4223 * Set the RTCP Call Data for domain Voice Quality
4225 * @note The property is treated as immutable: it is only valid to call
4226 * the setter once. However, we don't assert if the caller tries to
4227 * overwrite, just ignoring the update instead.
4229 * @param voiceQuality Pointer to the Voice Quality Event.
4230 * @param rtcpCallData The RTCP Call Data to be set. ASCIIZ
4231 * string. The caller does not need to
4232 * preserve the value once the function
4234 *****************************************************************************/
4235 void evel_voice_quality_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4236 const char * const rtcpCallData);
4238 /**************************************************************************//**
4239 * Set the Vendor VNF Name fields for domain Voice Quality
4241 * @note The property is treated as immutable: it is only valid to call
4242 * the setter once. However, we don't assert if the caller tries to
4243 * overwrite, just ignoring the update instead.
4245 * @param voiceQuality Pointer to the Voice Quality Event.
4246 * @param nameFields The Vendor, VNF and VfModule names to be set.
4247 * ASCIIZ string. The caller does not need to
4248 * preserve the value once the function
4250 *****************************************************************************/
4251 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4252 const char * const nameFields);
4254 /**************************************************************************//**
4255 * Add an End of Call Voice Quality Metrices
4257 * The adjacencyName and endpointDescription is null delimited ASCII string.
4258 * The library takes a copy so the caller does not have to preserve values
4259 * after the function returns.
4261 * @param voiceQuality Pointer to the measurement.
4262 * @param adjacencyName Adjacency name
4263 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4264 * @param endpointJitter Endpoint jitter
4265 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4266 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4267 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4268 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4269 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4270 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4271 * @param localJitter Local jitter.
4272 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4273 * @param localRtpOctetsReceived Local RTP octets received.
4274 * @param localRtpOctetsSent Local RTP octets sent.
4275 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4276 * @param localRtpPacketsReceived Local RTP packets received.
4277 * @param localRtpPacketsSent Local RTP packets sent.
4278 * @param mosCqe Decimal range from 1 to 5
4280 * @param packetsLost No Packets lost
4281 * @param packetLossPercent Calculated percentage packet loss
4282 * @param rFactor rFactor from 0 to 100
4283 * @param roundTripDelay Round trip delay in milliseconds
4284 *****************************************************************************/
4285 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4286 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4288 int endpointRtpOctetsDiscarded,
4289 int endpointRtpOctetsReceived,
4290 int endpointRtpOctetsSent,
4291 int endpointRtpPacketsDiscarded,
4292 int endpointRtpPacketsReceived,
4293 int endpointRtpPacketsSent,
4295 int localRtpOctetsDiscarded,
4296 int localRtpOctetsReceived,
4297 int localRtpOctetsSent,
4298 int localRtpPacketsDiscarded,
4299 int localRtpPacketsReceived,
4300 int localRtpPacketsSent,
4303 int packetLossPercent,
4305 int roundTripDelay);
4307 /**************************************************************************//**
4308 * Free a Voice Quality.
4310 * Free off the Voce Quality supplied. Will free all the contained allocated
4313 * @note It does not free the Voice Quality itself, since that may be part of a
4315 *****************************************************************************/
4316 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4318 /**************************************************************************//**
4319 * Add an additional value name/value pair to the Voice Quality.
4321 * The name and value are null delimited ASCII strings. The library takes
4322 * a copy so the caller does not have to preserve values after the function
4325 * @param fault Pointer to the fault.
4326 * @param name ASCIIZ string with the attribute's name. The caller
4327 * does not need to preserve the value once the function
4329 * @param value ASCIIZ string with the attribute's value. The caller
4330 * does not need to preserve the value once the function
4332 *****************************************************************************/
4333 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4336 /*****************************************************************************/
4337 /*****************************************************************************/
4339 /* THRESHOLD CROSSING ALERT */
4341 /*****************************************************************************/
4342 /*****************************************************************************/
4344 typedef enum evel_event_action {
4345 EVEL_EVENT_ACTION_CLEAR,
4346 EVEL_EVENT_ACTION_CONTINUE,
4347 EVEL_EVENT_ACTION_SET,
4348 EVEL_MAX_EVENT_ACTION
4351 typedef enum evel_alert_type {
4353 EVEL_ELEMENT_ANOMALY,
4354 EVEL_INTERFACE_ANOMALY,
4355 EVEL_SERVICE_ANOMALY,
4360 typedef struct perf_counter {
4363 char * thresholdCrossed;
4368 /*****************************************************************************/
4369 /* Supported Threshold Crossing version. */
4370 /*****************************************************************************/
4371 #define EVEL_THRESHOLD_CROSS_MAJOR_VERSION 2
4372 #define EVEL_THRESHOLD_CROSS_MINOR_VERSION 0
4374 /**************************************************************************//**
4375 * Threshold Crossing.
4376 * JSON equivalent field: Threshold Cross Fields
4377 *****************************************************************************/
4378 typedef struct event_threshold_cross {
4379 /***************************************************************************/
4380 /* Header and version */
4381 /***************************************************************************/
4382 EVENT_HEADER header;
4386 /***************************************************************************/
4387 /* Mandatory fields */
4388 /***************************************************************************/
4389 PERF_COUNTER additionalParameters;
4390 EVEL_EVENT_ACTION alertAction;
4391 char * alertDescription;
4392 EVEL_ALERT_TYPE alertType;
4393 unsigned long long collectionTimestamp;
4394 EVEL_SEVERITIES eventSeverity;
4395 unsigned long long eventStartTimestamp;
4397 /***************************************************************************/
4398 /* Optional fields */
4399 /***************************************************************************/
4400 DLIST additional_info;
4401 EVEL_OPTION_STRING alertValue;
4403 EVEL_OPTION_STRING dataCollector;
4404 EVEL_OPTION_STRING elementType;
4405 EVEL_OPTION_STRING interfaceName;
4406 EVEL_OPTION_STRING networkService;
4407 EVEL_OPTION_STRING possibleRootCause;
4409 } EVENT_THRESHOLD_CROSS;
4412 /**************************************************************************//**
4413 * Create a new Threshold Crossing Alert event.
4415 * @note The mandatory fields on the TCA must be supplied to this factory
4416 * function and are immutable once set. Optional fields have explicit
4417 * setter functions, but again values may only be set once so that the
4418 * TCA has immutable properties.
4420 * @param event_name Unique Event Name
4421 * @param event_id A universal identifier of the event for analysis etc
4422 * @param char* tcriticality Performance Counter Criticality MAJ MIN,
4423 * @param char* tname Performance Counter Threshold name
4424 * @param char* tthresholdCrossed Counter Threshold crossed value
4425 * @param char* tvalue Counter actual value
4426 * @param EVEL_EVENT_ACTION talertAction Alert set continue or clear
4427 * @param char* talertDescription
4428 * @param EVEL_ALERT_TYPE talertType Kind of anamoly
4429 * @param unsigned long long tcollectionTimestamp time at which alert was collected
4430 * @param EVEL_SEVERITIES teventSeverity Severity of Alert
4431 * @param unsigned long long teventStartTimestamp Time when this alert started
4433 * @returns pointer to the newly manufactured ::EVENT_THRESHOLD_CROSS. If the
4434 * event is not used it must be released using
4435 * ::evel_free_threshold_cross
4436 * @retval NULL Failed to create the event.
4437 *****************************************************************************/
4438 EVENT_THRESHOLD_CROSS * evel_new_threshold_cross(
4439 const char* ev_name, const char *ev_id,
4440 char * tcriticality,
4442 char * tthresholdCrossed,
4444 EVEL_EVENT_ACTION talertAction,
4445 char * talertDescription,
4446 EVEL_ALERT_TYPE talertType,
4447 unsigned long long tcollectionTimestamp,
4448 EVEL_SEVERITIES teventSeverity,
4449 unsigned long long teventStartTimestamp);
4451 /**************************************************************************//**
4452 * Free a Threshold cross event.
4454 * Free off the Threshold crossing event supplied. Will free all the contained allocated
4457 * @note It does not free the Threshold Cross itself, since that may be part of a
4459 *****************************************************************************/
4460 void evel_free_threshold_cross(EVENT_THRESHOLD_CROSS * const tcp);
4462 /**************************************************************************//**
4463 * Set the Event Type property of the Threshold Cross.
4465 * @note The property is treated as immutable: it is only valid to call
4466 * the setter once. However, we don't assert if the caller tries to
4467 * overwrite, just ignoring the update instead.
4469 * @param tcp Pointer to the ::EVENT_THRESHOLD_CROSS.
4470 * @param type The Event Type to be set. ASCIIZ string. The caller
4471 * does not need to preserve the value once the function
4473 *****************************************************************************/
4474 void evel_threshold_cross_type_set(EVENT_THRESHOLD_CROSS * const tcp, char * type);
4476 /**************************************************************************//**
4477 * Add an optional additional alertid value to Alert.
4479 * @param alertid Adds Alert ID
4480 *****************************************************************************/
4481 void evel_threshold_cross_alertid_add(EVENT_THRESHOLD_CROSS * const event,char * alertid);
4483 /**************************************************************************//**
4484 * Set the TCA probable Root cause.
4486 * @param sheader Possible root cause to Threshold
4487 *****************************************************************************/
4488 void evel_threshold_cross_possible_rootcause_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4489 /**************************************************************************//**
4490 * Set the TCA networking cause.
4492 * @param sheader Possible networking service value to Threshold
4493 *****************************************************************************/
4494 void evel_threshold_cross_networkservice_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4495 /**************************************************************************//**
4496 * Set the TCA Interface name.
4498 * @param sheader Interface name to threshold
4499 *****************************************************************************/
4500 void evel_threshold_cross_interfacename_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4501 /**************************************************************************//**
4502 * Set the TCA Data element type.
4504 * @param sheader element type of Threshold
4505 *****************************************************************************/
4506 void evel_threshold_cross_data_elementtype_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4507 /**************************************************************************//**
4508 * Set the TCA Data collector value.
4510 * @param sheader Data collector value
4511 *****************************************************************************/
4512 void evel_threshold_cross_data_collector_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4513 /**************************************************************************//**
4514 * Set the TCA alert value.
4516 * @param sheader Possible alert value
4517 *****************************************************************************/
4518 void evel_threshold_cross_alertvalue_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4520 /**************************************************************************//**
4521 * Add an additional field name/value pair to the THRESHOLD CROSS event.
4523 * The name and value are null delimited ASCII strings. The library takes
4524 * a copy so the caller does not have to preserve values after the function
4527 * @param state_change Pointer to the ::EVENT_THRESHOLD_CROSS.
4528 * @param name ASCIIZ string with the attribute's name. The caller
4529 * does not need to preserve the value once the function
4531 * @param value ASCIIZ string with the attribute's value. The caller
4532 * does not need to preserve the value once the function
4534 *****************************************************************************/
4535 void evel_threshold_cross_addl_info_add(EVENT_THRESHOLD_CROSS * const tcp,
4536 const char * const name,
4537 const char * const value);
4539 /*****************************************************************************/
4540 /*****************************************************************************/
4544 /*****************************************************************************/
4545 /*****************************************************************************/
4547 /*****************************************************************************/
4549 /*****************************************************************************/
4550 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4551 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4552 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4553 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4555 #define EVEL_ENTER() \
4557 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4558 debug_indent += 2; \
4560 #define EVEL_EXIT() \
4562 debug_indent -= 2; \
4563 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4566 #define INDENT_SEPARATORS \
4567 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4569 extern EVEL_LOG_LEVELS debug_level;
4570 extern int debug_indent;
4573 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4575 /**************************************************************************//**
4576 * Initialize logging
4578 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4579 * @param[in] ident The identifier for our logs.
4580 *****************************************************************************/
4581 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4583 /**************************************************************************//**
4584 * Log debug information
4586 * Logs debugging information in a platform independent manner.
4588 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4589 * @param[in] format Log formatting string in printf format.
4590 * @param[in] ... Variable argument list.
4591 *****************************************************************************/
4592 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4594 /***************************************************************************//*
4595 * Store the formatted string into the static error string and log the error.
4597 * @param format Error string in standard printf format.
4598 * @param ... Variable parameters to be substituted into the format string.
4599 *****************************************************************************/
4600 void log_error_state(char * format, ...);