1 /*************************************************************************//**
3 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 ****************************************************************************/
18 /**************************************************************************//**
20 * Header for EVEL library
22 * This file implements the EVEL library which is intended to provide a
23 * simple wrapper around the complexity of AT&T's Vendor Event Listener API so
24 * that VNFs can use it without worrying about details of the API transport.
26 * Zero return value is success (::EVEL_SUCCESS), non-zero is failure and will
27 * be one of ::EVEL_ERR_CODES.
28 *****************************************************************************/
43 #include "double_list.h"
44 #include "hashtable.h"
46 /*****************************************************************************/
47 /* Supported API version. */
48 /*****************************************************************************/
49 #define EVEL_API_MAJOR_VERSION 5
50 #define EVEL_API_MINOR_VERSION 0
52 /**************************************************************************//**
55 * Error codes for EVEL low level interface
56 *****************************************************************************/
58 EVEL_SUCCESS, /** The operation was successful. */
59 EVEL_ERR_GEN_FAIL, /** Non-specific failure. */
60 EVEL_CURL_LIBRARY_FAIL, /** A cURL library operation failed. */
61 EVEL_PTHREAD_LIBRARY_FAIL, /** A Posix threads operation failed. */
62 EVEL_OUT_OF_MEMORY, /** A memory allocation failure occurred. */
63 EVEL_EVENT_BUFFER_FULL, /** Too many events in the ring-buffer. */
64 EVEL_EVENT_HANDLER_INACTIVE, /** Attempt to raise event when inactive. */
65 EVEL_NO_METADATA, /** Failed to retrieve OpenStack metadata. */
66 EVEL_BAD_METADATA, /** OpenStack metadata invalid format. */
67 EVEL_BAD_JSON_FORMAT, /** JSON failed to parse correctly. */
68 EVEL_JSON_KEY_NOT_FOUND, /** Failed to find the specified JSON key. */
69 EVEL_MAX_ERROR_CODES /** Maximum number of valid error codes. */
72 /**************************************************************************//**
75 * Variable levels of verbosity in the logging functions.
76 *****************************************************************************/
86 /*****************************************************************************/
87 /* Maximum string lengths. */
88 /*****************************************************************************/
89 #define EVEL_MAX_STRING_LEN 4096
90 #define EVEL_MAX_JSON_BODY 524288
91 #define EVEL_MAX_ERROR_STRING_LEN 255
92 #define EVEL_MAX_URL_LEN 511
94 /**************************************************************************//**
95 * This value represents there being no restriction on the reporting interval.
96 *****************************************************************************/
97 static const int EVEL_MEASUREMENT_INTERVAL_UKNOWN = 0;
99 /**************************************************************************//**
100 * How many events can be backed-up before we start dropping events on the
103 * @note This value should be tuned in accordance with expected burstiness of
104 * the event load and the expected response time of the ECOMP event
105 * listener so that the probability of the buffer filling is suitably
107 *****************************************************************************/
108 static const int EVEL_EVENT_BUFFER_DEPTH = 100;
110 /*****************************************************************************/
111 /* How many different IP Types-of-Service are supported. */
112 /*****************************************************************************/
113 #define EVEL_TOS_SUPPORTED 256
115 /**************************************************************************//**
116 * Event domains for the various events we support.
117 * JSON equivalent field: domain
118 *****************************************************************************/
120 EVEL_DOMAIN_INTERNAL, /** Internal event, not for external routing. */
121 EVEL_DOMAIN_BATCH, /** Batch event, composite event. */
122 EVEL_DOMAIN_HEARTBEAT, /** A Heartbeat event (event header only). */
123 EVEL_DOMAIN_FAULT, /** A Fault event. */
124 EVEL_DOMAIN_MEASUREMENT, /** A Measurement for VF Scaling event. */
125 EVEL_DOMAIN_MOBILE_FLOW, /** A Mobile Flow event. */
126 EVEL_DOMAIN_REPORT, /** A Measurement for VF Reporting event. */
127 EVEL_DOMAIN_HEARTBEAT_FIELD,/** A Heartbeat field event. */
128 EVEL_DOMAIN_SIPSIGNALING, /** A Signaling event. */
129 EVEL_DOMAIN_STATE_CHANGE, /** A State Change event. */
130 EVEL_DOMAIN_SYSLOG, /** A Syslog event. */
131 EVEL_DOMAIN_OTHER, /** Another event. */
132 EVEL_DOMAIN_THRESHOLD_CROSS, /** A Threshold Crossing Event */
133 EVEL_DOMAIN_VOICE_QUALITY, /** A Voice Quality Event */
134 EVEL_MAX_DOMAINS /** Maximum number of recognized Event types. */
135 } EVEL_EVENT_DOMAINS;
137 /**************************************************************************//**
139 * JSON equivalent field: priority
140 *****************************************************************************/
143 EVEL_PRIORITY_MEDIUM,
144 EVEL_PRIORITY_NORMAL,
147 } EVEL_EVENT_PRIORITIES;
149 /**************************************************************************//**
150 * Fault / Threshold severities.
151 * JSON equivalent field: eventSeverity
152 *****************************************************************************/
154 EVEL_SEVERITY_CRITICAL,
157 EVEL_SEVERITY_WARNING,
158 EVEL_SEVERITY_NORMAL,
162 /**************************************************************************//**
163 * Fault source types.
164 * JSON equivalent field: eventSourceType
165 *****************************************************************************/
173 EVEL_SOURCE_SLOT_THRESHOLD,
174 EVEL_SOURCE_PORT_THRESHOLD,
175 EVEL_SOURCE_VIRTUAL_MACHINE,
176 EVEL_SOURCE_VIRTUAL_NETWORK_FUNCTION,
177 /***************************************************************************/
178 /* START OF VENDOR-SPECIFIC VALUES */
180 /* Vendor-specific values should be added here, and handled appropriately */
181 /* in evel_event.c. */
182 /***************************************************************************/
184 /***************************************************************************/
185 /* END OF VENDOR-SPECIFIC VALUES */
186 /***************************************************************************/
187 EVEL_MAX_SOURCE_TYPES
190 /**************************************************************************//**
192 * JSON equivalent field: vfStatus
193 *****************************************************************************/
195 EVEL_VF_STATUS_ACTIVE,
197 EVEL_VF_STATUS_PREP_TERMINATE,
198 EVEL_VF_STATUS_READY_TERMINATE,
199 EVEL_VF_STATUS_REQ_TERMINATE,
203 /**************************************************************************//**
204 * Counter criticalities.
205 * JSON equivalent field: criticality
206 *****************************************************************************/
208 EVEL_COUNTER_CRITICALITY_CRIT,
209 EVEL_COUNTER_CRITICALITY_MAJ,
210 EVEL_MAX_COUNTER_CRITICALITIES
211 } EVEL_COUNTER_CRITICALITIES;
213 /**************************************************************************//**
215 * JSON equivalent field: alertAction
216 *****************************************************************************/
218 EVEL_ALERT_ACTION_CLEAR,
219 EVEL_ALERT_ACTION_CONT,
220 EVEL_ALERT_ACTION_SET,
221 EVEL_MAX_ALERT_ACTIONS
222 } EVEL_ALERT_ACTIONS;
224 /**************************************************************************//**
226 * JSON equivalent field: alertType
227 *****************************************************************************/
229 EVEL_ALERT_TYPE_CARD,
230 EVEL_ALERT_TYPE_ELEMENT,
231 EVEL_ALERT_TYPE_INTERFACE,
232 EVEL_ALERT_TYPE_SERVICE,
236 /**************************************************************************//**
238 * JSON equivalent fields: newState, oldState
239 *****************************************************************************/
241 EVEL_ENTITY_STATE_IN_SERVICE,
242 EVEL_ENTITY_STATE_MAINTENANCE,
243 EVEL_ENTITY_STATE_OUT_OF_SERVICE,
244 EVEL_MAX_ENTITY_STATES
247 /**************************************************************************//**
249 * JSON equivalent field: syslogFacility
250 *****************************************************************************/
252 EVEL_SYSLOG_FACILITY_KERNEL,
253 EVEL_SYSLOG_FACILITY_USER,
254 EVEL_SYSLOG_FACILITY_MAIL,
255 EVEL_SYSLOG_FACILITY_SYSTEM_DAEMON,
256 EVEL_SYSLOG_FACILITY_SECURITY_AUTH,
257 EVEL_SYSLOG_FACILITY_INTERNAL,
258 EVEL_SYSLOG_FACILITY_LINE_PRINTER,
259 EVEL_SYSLOG_FACILITY_NETWORK_NEWS,
260 EVEL_SYSLOG_FACILITY_UUCP,
261 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON,
262 EVEL_SYSLOG_FACILITY_SECURITY_AUTH2,
263 EVEL_SYSLOG_FACILITY_FTP_DAEMON,
264 EVEL_SYSLOG_FACILITY_NTP,
265 EVEL_SYSLOG_FACILITY_LOG_AUDIT,
266 EVEL_SYSLOG_FACILITY_LOG_ALERT,
267 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON2,
268 EVEL_SYSLOG_FACILITY_LOCAL0,
269 EVEL_SYSLOG_FACILITY_LOCAL1,
270 EVEL_SYSLOG_FACILITY_LOCAL2,
271 EVEL_SYSLOG_FACILITY_LOCAL3,
272 EVEL_SYSLOG_FACILITY_LOCAL4,
273 EVEL_SYSLOG_FACILITY_LOCAL5,
274 EVEL_SYSLOG_FACILITY_LOCAL6,
275 EVEL_SYSLOG_FACILITY_LOCAL7,
276 EVEL_MAX_SYSLOG_FACILITIES
277 } EVEL_SYSLOG_FACILITIES;
279 /**************************************************************************//**
281 * JSON equivalent fields: tcpFlagCountList, tcpFlagList
282 *****************************************************************************/
296 /**************************************************************************//**
297 * Mobile QCI Classes of Service.
298 * JSON equivalent fields: mobileQciCosCountList, mobileQciCosList
299 *****************************************************************************/
302 /***************************************************************************/
303 /* UMTS Classes of Service. */
304 /***************************************************************************/
305 EVEL_QCI_COS_UMTS_CONVERSATIONAL,
306 EVEL_QCI_COS_UMTS_STREAMING,
307 EVEL_QCI_COS_UMTS_INTERACTIVE,
308 EVEL_QCI_COS_UMTS_BACKGROUND,
310 /***************************************************************************/
311 /* LTE Classes of Service. */
312 /***************************************************************************/
326 EVEL_MAX_QCI_COS_TYPES
327 } EVEL_QCI_COS_TYPES;
329 /**************************************************************************//**
330 * Service Event endpoint description
331 * JSON equivalent field: endpointDesc
332 *****************************************************************************/
334 EVEL_SERVICE_ENDPOINT_CALLEE,
335 EVEL_SERVICE_ENDPOINT_CALLER,
336 EVEL_MAX_SERVICE_ENDPOINT_DESC
337 } EVEL_SERVICE_ENDPOINT_DESC;
339 /**************************************************************************//**
340 * Boolean type for EVEL library.
341 *****************************************************************************/
347 /**************************************************************************//**
348 * Optional parameter holder for double.
349 *****************************************************************************/
350 typedef struct evel_option_double
354 } EVEL_OPTION_DOUBLE;
356 /**************************************************************************//**
357 * Optional parameter holder for string.
358 *****************************************************************************/
359 typedef struct evel_option_string
363 } EVEL_OPTION_STRING;
365 /**************************************************************************//**
366 * Optional parameter holder for int.
367 *****************************************************************************/
368 typedef struct evel_option_int
374 /**************************************************************************//**
375 * Optional parameter holder for unsigned long long.
376 *****************************************************************************/
377 typedef struct evel_option_ull
379 unsigned long long value;
383 /**************************************************************************//**
384 * Optional parameter holder for time_t.
385 *****************************************************************************/
386 typedef struct evel_option_time
392 /**************************************************************************//**
393 * enrichment fields for internal VES Event Listener service use only,
394 * not supplied by event sources
395 *****************************************************************************/
396 typedef struct internal_header_fields
400 } EVEL_OPTION_INTHEADER_FIELDS;
402 /*****************************************************************************/
403 /* Supported Common Event Header version. */
404 /*****************************************************************************/
405 #define EVEL_HEADER_MAJOR_VERSION 3
406 #define EVEL_HEADER_MINOR_VERSION 0
408 #define EVEL_BATCH_MAJOR_VERSION 1
409 #define EVEL_BATCH_MINOR_VERSION 0
410 /**************************************************************************//**
412 * JSON equivalent field: commonEventHeader
413 *****************************************************************************/
414 typedef struct event_header {
415 /***************************************************************************/
417 /***************************************************************************/
421 /***************************************************************************/
422 /* Mandatory fields */
423 /***************************************************************************/
424 EVEL_EVENT_DOMAINS event_domain;
428 char * reporting_entity_name;
429 EVEL_EVENT_PRIORITIES priority;
430 unsigned long long start_epoch_microsec;
431 unsigned long long last_epoch_microsec;
434 /***************************************************************************/
435 /* Optional fields */
436 /***************************************************************************/
437 EVEL_OPTION_STRING event_type;
438 EVEL_OPTION_STRING source_id;
439 EVEL_OPTION_STRING reporting_entity_id;
440 EVEL_OPTION_INTHEADER_FIELDS internal_field;
441 EVEL_OPTION_STRING nfcnaming_code;
442 EVEL_OPTION_STRING nfnaming_code;
447 /**************************************************************************//**
448 * Initialize a newly created event header.
450 * @param header Pointer to the header being initialized.
451 * @param eventname Eventname string
452 * @param eventid Event id : unique id for classification and analysis
453 * @param header Pointer to the header being initialized.
454 *****************************************************************************/
455 void evel_init_header_nameid(EVENT_HEADER * const header,const char *const eventname, const char *eventid);
457 /**************************************************************************//**
458 * Create a new Batch event.
460 * @note The mandatory fields on the Batch must be supplied to this factory
461 * function and are immutable once set. Optional fields have explicit
462 * setter functions, but again values may only be set once so that the
463 * Batch has immutable properties. At this time evename and eventid
464 * for batch events are set but not used in json encoding
465 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
466 * not used (i.e. posted) it must be released using ::evel_free_batch.
467 * @retval NULL Failed to create the event.
468 *****************************************************************************/
469 EVENT_HEADER * evel_new_batch(const char* ev_name, const char *ev_id);
472 /**************************************************************************//**
473 * Add an Event into Batch Event
475 * The name and value are null delimited ASCII strings. The library takes
476 * a copy so the caller does not have to preserve values after the function
479 * @param other Pointer to the Batch Event.
480 * @param jsonobj Pointer to additional Event
481 *****************************************************************************/
482 void evel_batch_add_event(EVENT_HEADER * batchev, EVENT_HEADER *child);
484 /**************************************************************************//**
487 * Free off the Batch supplied. Will free all the contained allocated memory.
489 * @note It does not free the Batch itself, since that may be part of a
491 *****************************************************************************/
492 void evel_free_batch(EVENT_HEADER * event);
494 /*****************************************************************************/
495 /* Supported Fault version. */
496 /*****************************************************************************/
497 #define EVEL_FAULT_MAJOR_VERSION 2
498 #define EVEL_FAULT_MINOR_VERSION 0
500 /**************************************************************************//**
502 * JSON equivalent field: faultFields
503 *****************************************************************************/
504 typedef struct event_fault {
505 /***************************************************************************/
506 /* Header and version */
507 /***************************************************************************/
512 /***************************************************************************/
513 /* Mandatory fields */
514 /***************************************************************************/
515 EVEL_SEVERITIES event_severity;
516 EVEL_SOURCE_TYPES event_source_type;
517 char * alarm_condition;
518 char * specific_problem;
519 EVEL_VF_STATUSES vf_status;
521 /***************************************************************************/
522 /* Optional fields */
523 /***************************************************************************/
524 EVEL_OPTION_STRING category;
525 EVEL_OPTION_STRING alarm_interface_a;
526 DLIST additional_info;
530 /**************************************************************************//**
531 * Fault Additional Info.
532 * JSON equivalent field: alarmAdditionalInformation
533 *****************************************************************************/
534 typedef struct fault_additional_info {
540 /**************************************************************************//**
541 * optional field block for fields specific to heartbeat events
542 *****************************************************************************/
543 typedef struct event_heartbeat_fields
545 /***************************************************************************/
546 /* Header and version */
547 /***************************************************************************/
552 /***************************************************************************/
553 /* Mandatory fields */
554 /***************************************************************************/
555 double heartbeat_version;
556 int heartbeat_interval;
558 /***************************************************************************/
559 /* Optional fields */
560 /***************************************************************************/
561 DLIST additional_info;
563 } EVENT_HEARTBEAT_FIELD;
565 /**************************************************************************//**
566 * tuple which provides the name of a key along with its value and
568 *****************************************************************************/
569 typedef struct internal_key
572 EVEL_OPTION_INT keyorder;
573 EVEL_OPTION_STRING keyvalue;
576 /**************************************************************************//**
577 * meta-information about an instance of a jsonObject along with
578 * the actual object instance
579 *****************************************************************************/
580 typedef struct json_object_instance
584 EVEL_OPTION_ULL objinst_epoch_microsec;
585 DLIST object_keys; /*EVEL_INTERNAL_KEY list */
587 } EVEL_JSON_OBJECT_INSTANCE;
588 #define MAX_JSON_TOKENS 128
589 /**************************************************************************//**
590 * Create a new json object instance.
592 * @note The mandatory fields on the Other must be supplied to this factory
593 * function and are immutable once set. Optional fields have explicit
594 * setter functions, but again values may only be set once so that the
595 * Other has immutable properties.
596 * @param yourjson json string.
597 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT_INSTANCE.
598 * not used (i.e. posted) it must be released using ::evel_free_jsonobjectinstance.
599 * @retval NULL Failed to create the json object instance.
600 *****************************************************************************/
601 EVEL_JSON_OBJECT_INSTANCE * evel_new_jsonobjinstance(const char *const yourjson);
602 /**************************************************************************//**
603 * Free an json object instance.
605 * Free off the json object instance supplied.
606 * Will free all the contained allocated memory.
608 *****************************************************************************/
609 void evel_free_jsonobjinst(EVEL_JSON_OBJECT_INSTANCE * objinst);
611 /**************************************************************************//**
612 * enrichment fields for internal VES Event Listener service use only,
613 * not supplied by event sources
614 *****************************************************************************/
615 typedef struct json_object
619 EVEL_OPTION_STRING objectschema;
620 EVEL_OPTION_STRING objectschemaurl;
621 EVEL_OPTION_STRING nfsubscribedobjname;
622 EVEL_OPTION_STRING nfsubscriptionid;
623 DLIST jsonobjectinstances; /* EVEL_JSON_OBJECT_INSTANCE list */
627 /**************************************************************************//**
628 * Create a new json object.
630 * @note The mandatory fields on the Other must be supplied to this factory
631 * function and are immutable once set. Optional fields have explicit
632 * setter functions, but again values may only be set once so that the
633 * Other has immutable properties.
634 * @param name name of the object.
635 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT.
636 * not used (i.e. posted) it must be released using ::evel_free_jsonobject.
637 * @retval NULL Failed to create the json object.
638 *****************************************************************************/
639 EVEL_JSON_OBJECT * evel_new_jsonobject(const char *const name);
640 /**************************************************************************//**
641 * Free an json object.
643 * Free off the json object instance supplied.
644 * Will free all the contained allocated memory.
646 *****************************************************************************/
647 void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj);
648 /*****************************************************************************/
649 /* Supported Measurement version. */
650 /*****************************************************************************/
651 #define EVEL_MEASUREMENT_MAJOR_VERSION 2
652 #define EVEL_MEASUREMENT_MINOR_VERSION 0
654 /**************************************************************************//**
656 * JSON equivalent field: errors
657 *****************************************************************************/
658 typedef struct measurement_errors {
659 int receive_discards;
661 int transmit_discards;
663 } MEASUREMENT_ERRORS;
665 /**************************************************************************//**
667 * JSON equivalent field: measurementsForVfScalingFields
668 *****************************************************************************/
669 typedef struct event_measurement {
670 /***************************************************************************/
671 /* Header and version */
672 /***************************************************************************/
677 /***************************************************************************/
678 /* Mandatory fields */
679 /***************************************************************************/
680 double measurement_interval;
682 /***************************************************************************/
683 /* Optional fields */
684 /***************************************************************************/
685 DLIST additional_info;
686 DLIST additional_measurements;
687 DLIST additional_objects;
689 EVEL_OPTION_INT concurrent_sessions;
690 EVEL_OPTION_INT configured_entities;
693 MEASUREMENT_ERRORS * errors;
695 DLIST filesystem_usage;
696 DLIST latency_distribution;
697 EVEL_OPTION_DOUBLE mean_request_latency;
699 EVEL_OPTION_INT media_ports_in_use;
700 EVEL_OPTION_INT request_rate;
701 EVEL_OPTION_INT vnfc_scaling_metric;
708 /**************************************************************************//**
709 * Add an additional value name/value pair to the Measurement.
711 * The name and value are null delimited ASCII strings. The library takes
712 * a copy so the caller does not have to preserve values after the function
715 * @param measurement Pointer to the measurement.
716 * @param name ASCIIZ string with the attribute's name. The caller
717 * does not need to preserve the value once the function
719 * @param value ASCIIZ string with the attribute's value. The caller
720 * does not need to preserve the value once the function
722 *****************************************************************************/
723 void evel_measurement_addl_info_add(EVENT_MEASUREMENT * measurement, char * name, char * value);
725 /**************************************************************************//**
726 * Add a json object to jsonObject list.
728 * The name and value are null delimited ASCII strings. The library takes
729 * a copy so the caller does not have to preserve values after the function
732 * @param measurement Pointer to the ScalingMeasurement
733 * @param jsonobj Pointer to json object
734 *****************************************************************************/
735 void evel_measurement_addl_object_add(EVENT_MEASUREMENT * measurement, EVEL_JSON_OBJECT *jsonobj);
737 /**************************************************************************//**
739 * JSON equivalent field: cpuUsage
740 *****************************************************************************/
741 typedef struct measurement_cpu_use {
744 EVEL_OPTION_DOUBLE idle;
745 EVEL_OPTION_DOUBLE intrpt;
746 EVEL_OPTION_DOUBLE nice;
747 EVEL_OPTION_DOUBLE softirq;
748 EVEL_OPTION_DOUBLE steal;
749 EVEL_OPTION_DOUBLE sys;
750 EVEL_OPTION_DOUBLE user;
751 EVEL_OPTION_DOUBLE wait;
752 } MEASUREMENT_CPU_USE;
755 /**************************************************************************//**
757 * JSON equivalent field: diskUsage
758 *****************************************************************************/
759 typedef struct measurement_disk_use {
761 EVEL_OPTION_DOUBLE iotimeavg;
762 EVEL_OPTION_DOUBLE iotimelast;
763 EVEL_OPTION_DOUBLE iotimemax;
764 EVEL_OPTION_DOUBLE iotimemin;
765 EVEL_OPTION_DOUBLE mergereadavg;
766 EVEL_OPTION_DOUBLE mergereadlast;
767 EVEL_OPTION_DOUBLE mergereadmax;
768 EVEL_OPTION_DOUBLE mergereadmin;
769 EVEL_OPTION_DOUBLE mergewriteavg;
770 EVEL_OPTION_DOUBLE mergewritelast;
771 EVEL_OPTION_DOUBLE mergewritemax;
772 EVEL_OPTION_DOUBLE mergewritemin;
773 EVEL_OPTION_DOUBLE octetsreadavg;
774 EVEL_OPTION_DOUBLE octetsreadlast;
775 EVEL_OPTION_DOUBLE octetsreadmax;
776 EVEL_OPTION_DOUBLE octetsreadmin;
777 EVEL_OPTION_DOUBLE octetswriteavg;
778 EVEL_OPTION_DOUBLE octetswritelast;
779 EVEL_OPTION_DOUBLE octetswritemax;
780 EVEL_OPTION_DOUBLE octetswritemin;
781 EVEL_OPTION_DOUBLE opsreadavg;
782 EVEL_OPTION_DOUBLE opsreadlast;
783 EVEL_OPTION_DOUBLE opsreadmax;
784 EVEL_OPTION_DOUBLE opsreadmin;
785 EVEL_OPTION_DOUBLE opswriteavg;
786 EVEL_OPTION_DOUBLE opswritelast;
787 EVEL_OPTION_DOUBLE opswritemax;
788 EVEL_OPTION_DOUBLE opswritemin;
789 EVEL_OPTION_DOUBLE pendingopsavg;
790 EVEL_OPTION_DOUBLE pendingopslast;
791 EVEL_OPTION_DOUBLE pendingopsmax;
792 EVEL_OPTION_DOUBLE pendingopsmin;
793 EVEL_OPTION_DOUBLE timereadavg;
794 EVEL_OPTION_DOUBLE timereadlast;
795 EVEL_OPTION_DOUBLE timereadmax;
796 EVEL_OPTION_DOUBLE timereadmin;
797 EVEL_OPTION_DOUBLE timewriteavg;
798 EVEL_OPTION_DOUBLE timewritelast;
799 EVEL_OPTION_DOUBLE timewritemax;
800 EVEL_OPTION_DOUBLE timewritemin;
802 } MEASUREMENT_DISK_USE;
804 /**************************************************************************//**
805 * Add an additional Disk usage value name/value pair to the Measurement.
807 * The name and value are null delimited ASCII strings. The library takes
808 * a copy so the caller does not have to preserve values after the function
811 * @param measurement Pointer to the measurement.
812 * @param id ASCIIZ string with the CPU's identifier.
813 * @param usage Disk utilization.
814 *****************************************************************************/
815 MEASUREMENT_DISK_USE * evel_measurement_new_disk_use_add(EVENT_MEASUREMENT * measurement, char * id);
817 /**************************************************************************//**
819 * JSON equivalent field: filesystemUsage
820 *****************************************************************************/
821 typedef struct measurement_fsys_use {
822 char * filesystem_name;
823 double block_configured;
826 double ephemeral_configured;
827 double ephemeral_iops;
828 double ephemeral_used;
829 } MEASUREMENT_FSYS_USE;
831 /**************************************************************************//**
833 * JSON equivalent field: memoryUsage
834 *****************************************************************************/
835 typedef struct measurement_mem_use {
839 EVEL_OPTION_DOUBLE memcache;
840 EVEL_OPTION_DOUBLE memconfig;
841 EVEL_OPTION_DOUBLE memfree;
842 EVEL_OPTION_DOUBLE slabrecl;
843 EVEL_OPTION_DOUBLE slabunrecl;
844 EVEL_OPTION_DOUBLE memused;
845 } MEASUREMENT_MEM_USE;
847 /**************************************************************************//**
848 * Add an additional Memory usage value name/value pair to the Measurement.
850 * The name and value are null delimited ASCII strings. The library takes
851 * a copy so the caller does not have to preserve values after the function
854 * @param measurement Pointer to the measurement.
855 * @param id ASCIIZ string with the Memory identifier.
856 * @param vmidentifier ASCIIZ string with the VM's identifier.
857 * @param membuffsz Memory Size.
859 * @return Returns pointer to memory use structure in measurements
860 *****************************************************************************/
861 MEASUREMENT_MEM_USE * evel_measurement_new_mem_use_add(EVENT_MEASUREMENT * measurement,
862 char * id, char *vmidentifier, double membuffsz);
864 /**************************************************************************//**
865 * Set kilobytes of memory used for cache
867 * @note The property is treated as immutable: it is only valid to call
868 * the setter once. However, we don't assert if the caller tries to
869 * overwrite, just ignoring the update instead.
871 * @param mem_use Pointer to the Memory Use.
873 *****************************************************************************/
874 void evel_measurement_mem_use_memcache_set(MEASUREMENT_MEM_USE * const mem_use,
876 /**************************************************************************//**
877 * Set kilobytes of memory configured in the virtual machine on which the VNFC reporting
879 * @note The property is treated as immutable: it is only valid to call
880 * the setter once. However, we don't assert if the caller tries to
881 * overwrite, just ignoring the update instead.
883 * @param mem_use Pointer to the Memory Use.
885 *****************************************************************************/
886 void evel_measurement_mem_use_memconfig_set(MEASUREMENT_MEM_USE * const mem_use,
888 /**************************************************************************//**
889 * Set kilobytes of physical RAM left unused by the system
891 * @note The property is treated as immutable: it is only valid to call
892 * the setter once. However, we don't assert if the caller tries to
893 * overwrite, just ignoring the update instead.
895 * @param mem_use Pointer to the Memory Use.
897 *****************************************************************************/
898 void evel_measurement_mem_use_memfree_set(MEASUREMENT_MEM_USE * const mem_use,
900 /**************************************************************************//**
901 * Set the part of the slab that can be reclaimed such as caches measured in kilobytes
903 * @note The property is treated as immutable: it is only valid to call
904 * the setter once. However, we don't assert if the caller tries to
905 * overwrite, just ignoring the update instead.
907 * @param mem_use Pointer to the Memory Use.
909 *****************************************************************************/
910 void evel_measurement_mem_use_slab_reclaimed_set(MEASUREMENT_MEM_USE * const mem_use,
912 /**************************************************************************//**
913 * Set the part of the slab that cannot be reclaimed such as caches measured in kilobytes
915 * @note The property is treated as immutable: it is only valid to call
916 * the setter once. However, we don't assert if the caller tries to
917 * overwrite, just ignoring the update instead.
919 * @param mem_use Pointer to the Memory Use.
921 *****************************************************************************/
922 void evel_measurement_mem_use_slab_unreclaimable_set(MEASUREMENT_MEM_USE * const mem_use,
924 /**************************************************************************//**
925 * Set the total memory minus the sum of free, buffered, cached and slab memory in kilobytes
927 * @note The property is treated as immutable: it is only valid to call
928 * the setter once. However, we don't assert if the caller tries to
929 * overwrite, just ignoring the update instead.
931 * @param mem_use Pointer to the Memory Use.
933 *****************************************************************************/
934 void evel_measurement_mem_use_usedup_set(MEASUREMENT_MEM_USE * const mem_use,
936 /**************************************************************************//**
938 * JSON equivalent field: latencyBucketMeasure
939 *****************************************************************************/
940 typedef struct measurement_latency_bucket {
943 /***************************************************************************/
944 /* Optional fields */
945 /***************************************************************************/
946 EVEL_OPTION_DOUBLE high_end;
947 EVEL_OPTION_DOUBLE low_end;
949 } MEASUREMENT_LATENCY_BUCKET;
951 /**************************************************************************//**
953 * JSON equivalent field: vNicUsage
954 *****************************************************************************/
955 typedef struct measurement_vnic_performance {
956 /***************************************************************************/
957 /* Optional fields */
958 /***************************************************************************/
959 /*Cumulative count of broadcast packets received as read at the end of
960 the measurement interval*/
961 EVEL_OPTION_DOUBLE recvd_bcast_packets_acc;
962 /*Count of broadcast packets received within the measurement interval*/
963 EVEL_OPTION_DOUBLE recvd_bcast_packets_delta;
964 /*Cumulative count of discarded packets received as read at the end of
965 the measurement interval*/
966 EVEL_OPTION_DOUBLE recvd_discarded_packets_acc;
967 /*Count of discarded packets received within the measurement interval*/
968 EVEL_OPTION_DOUBLE recvd_discarded_packets_delta;
969 /*Cumulative count of error packets received as read at the end of
970 the measurement interval*/
971 EVEL_OPTION_DOUBLE recvd_error_packets_acc;
972 /*Count of error packets received within the measurement interval*/
973 EVEL_OPTION_DOUBLE recvd_error_packets_delta;
974 /*Cumulative count of multicast packets received as read at the end of
975 the measurement interval*/
976 EVEL_OPTION_DOUBLE recvd_mcast_packets_acc;
977 /*Count of mcast packets received within the measurement interval*/
978 EVEL_OPTION_DOUBLE recvd_mcast_packets_delta;
979 /*Cumulative count of octets received as read at the end of
980 the measurement interval*/
981 EVEL_OPTION_DOUBLE recvd_octets_acc;
982 /*Count of octets received within the measurement interval*/
983 EVEL_OPTION_DOUBLE recvd_octets_delta;
984 /*Cumulative count of all packets received as read at the end of
985 the measurement interval*/
986 EVEL_OPTION_DOUBLE recvd_total_packets_acc;
987 /*Count of all packets received within the measurement interval*/
988 EVEL_OPTION_DOUBLE recvd_total_packets_delta;
989 /*Cumulative count of unicast packets received as read at the end of
990 the measurement interval*/
991 EVEL_OPTION_DOUBLE recvd_ucast_packets_acc;
992 /*Count of unicast packets received within the measurement interval*/
993 EVEL_OPTION_DOUBLE recvd_ucast_packets_delta;
994 /*Cumulative count of transmitted broadcast packets at the end of
995 the measurement interval*/
996 EVEL_OPTION_DOUBLE tx_bcast_packets_acc;
997 /*Count of transmitted broadcast packets within the measurement interval*/
998 EVEL_OPTION_DOUBLE tx_bcast_packets_delta;
999 /*Cumulative count of transmit discarded packets at the end of
1000 the measurement interval*/
1001 EVEL_OPTION_DOUBLE tx_discarded_packets_acc;
1002 /*Count of transmit discarded packets within the measurement interval*/
1003 EVEL_OPTION_DOUBLE tx_discarded_packets_delta;
1004 /*Cumulative count of transmit error packets at the end of
1005 the measurement interval*/
1006 EVEL_OPTION_DOUBLE tx_error_packets_acc;
1007 /*Count of transmit error packets within the measurement interval*/
1008 EVEL_OPTION_DOUBLE tx_error_packets_delta;
1009 /*Cumulative count of transmit multicast packets at the end of
1010 the measurement interval*/
1011 EVEL_OPTION_DOUBLE tx_mcast_packets_acc;
1012 /*Count of transmit multicast packets within the measurement interval*/
1013 EVEL_OPTION_DOUBLE tx_mcast_packets_delta;
1014 /*Cumulative count of transmit octets at the end of
1015 the measurement interval*/
1016 EVEL_OPTION_DOUBLE tx_octets_acc;
1017 /*Count of transmit octets received within the measurement interval*/
1018 EVEL_OPTION_DOUBLE tx_octets_delta;
1019 /*Cumulative count of all transmit packets at the end of
1020 the measurement interval*/
1021 EVEL_OPTION_DOUBLE tx_total_packets_acc;
1022 /*Count of transmit packets within the measurement interval*/
1023 EVEL_OPTION_DOUBLE tx_total_packets_delta;
1024 /*Cumulative count of all transmit unicast packets at the end of
1025 the measurement interval*/
1026 EVEL_OPTION_DOUBLE tx_ucast_packets_acc;
1027 /*Count of transmit unicast packets within the measurement interval*/
1028 EVEL_OPTION_DOUBLE tx_ucast_packets_delta;
1029 /* Indicates whether vNicPerformance values are likely inaccurate
1030 due to counter overflow or other condtions*/
1031 char *valuesaresuspect;
1034 } MEASUREMENT_VNIC_PERFORMANCE;
1036 /**************************************************************************//**
1038 * JSON equivalent field: codecsInUse
1039 *****************************************************************************/
1040 typedef struct measurement_codec_use {
1043 } MEASUREMENT_CODEC_USE;
1045 /**************************************************************************//**
1047 * JSON equivalent field: featuresInUse
1048 *****************************************************************************/
1049 typedef struct measurement_feature_use {
1051 int feature_utilization;
1052 } MEASUREMENT_FEATURE_USE;
1054 /**************************************************************************//**
1055 * Measurement Group.
1056 * JSON equivalent field: additionalMeasurements
1057 *****************************************************************************/
1058 typedef struct measurement_group {
1061 } MEASUREMENT_GROUP;
1063 /**************************************************************************//**
1064 * Custom Defined Measurement.
1065 * JSON equivalent field: measurements
1066 *****************************************************************************/
1067 typedef struct custom_measurement {
1070 } CUSTOM_MEASUREMENT;
1072 /*****************************************************************************/
1073 /* Supported Report version. */
1074 /*****************************************************************************/
1075 #define EVEL_REPORT_MAJOR_VERSION 1
1076 #define EVEL_REPORT_MINOR_VERSION 0
1078 /**************************************************************************//**
1080 * JSON equivalent field: measurementsForVfReportingFields
1082 * @note This is an experimental event type and is not currently a formal part
1083 * of AT&T's specification.
1084 *****************************************************************************/
1085 typedef struct event_report {
1086 /***************************************************************************/
1087 /* Header and version */
1088 /***************************************************************************/
1089 EVENT_HEADER header;
1093 /***************************************************************************/
1094 /* Mandatory fields */
1095 /***************************************************************************/
1096 double measurement_interval;
1098 /***************************************************************************/
1099 /* Optional fields */
1100 /***************************************************************************/
1101 DLIST feature_usage;
1102 DLIST measurement_groups;
1106 /**************************************************************************//**
1107 * Mobile GTP Per Flow Metrics.
1108 * JSON equivalent field: gtpPerFlowMetrics
1109 *****************************************************************************/
1110 typedef struct mobile_gtp_per_flow_metrics {
1111 double avg_bit_error_rate;
1112 double avg_packet_delay_variation;
1113 int avg_packet_latency;
1114 int avg_receive_throughput;
1115 int avg_transmit_throughput;
1116 int flow_activation_epoch;
1117 int flow_activation_microsec;
1118 int flow_deactivation_epoch;
1119 int flow_deactivation_microsec;
1120 time_t flow_deactivation_time;
1122 int max_packet_delay_variation;
1123 int num_activation_failures;
1125 int num_bytes_received;
1126 int num_bytes_transmitted;
1127 int num_dropped_packets;
1128 int num_l7_bytes_received;
1129 int num_l7_bytes_transmitted;
1130 int num_lost_packets;
1131 int num_out_of_order_packets;
1132 int num_packet_errors;
1133 int num_packets_received_excl_retrans;
1134 int num_packets_received_incl_retrans;
1135 int num_packets_transmitted_incl_retrans;
1138 int num_tunneled_l7_bytes_received;
1139 int round_trip_time;
1140 int time_to_first_byte;
1142 /***************************************************************************/
1143 /* Optional fields */
1144 /***************************************************************************/
1145 EVEL_OPTION_INT ip_tos_counts[EVEL_TOS_SUPPORTED];
1146 EVEL_OPTION_INT tcp_flag_counts[EVEL_MAX_TCP_FLAGS];
1147 EVEL_OPTION_INT qci_cos_counts[EVEL_MAX_QCI_COS_TYPES];
1148 EVEL_OPTION_INT dur_connection_failed_status;
1149 EVEL_OPTION_INT dur_tunnel_failed_status;
1150 EVEL_OPTION_STRING flow_activated_by;
1151 EVEL_OPTION_TIME flow_activation_time;
1152 EVEL_OPTION_STRING flow_deactivated_by;
1153 EVEL_OPTION_STRING gtp_connection_status;
1154 EVEL_OPTION_STRING gtp_tunnel_status;
1155 EVEL_OPTION_INT large_packet_rtt;
1156 EVEL_OPTION_DOUBLE large_packet_threshold;
1157 EVEL_OPTION_INT max_receive_bit_rate;
1158 EVEL_OPTION_INT max_transmit_bit_rate;
1159 EVEL_OPTION_INT num_gtp_echo_failures;
1160 EVEL_OPTION_INT num_gtp_tunnel_errors;
1161 EVEL_OPTION_INT num_http_errors;
1163 } MOBILE_GTP_PER_FLOW_METRICS;
1165 /*****************************************************************************/
1166 /* Supported Mobile Flow version. */
1167 /*****************************************************************************/
1168 #define EVEL_MOBILE_FLOW_MAJOR_VERSION 2
1169 #define EVEL_MOBILE_FLOW_MINOR_VERSION 0
1171 /**************************************************************************//**
1173 * JSON equivalent field: mobileFlow
1174 *****************************************************************************/
1175 typedef struct event_mobile_flow {
1176 /***************************************************************************/
1177 /* Header and version */
1178 /***************************************************************************/
1179 EVENT_HEADER header;
1183 /***************************************************************************/
1184 /* Mandatory fields */
1185 /***************************************************************************/
1186 char * flow_direction;
1187 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics;
1188 char * ip_protocol_type;
1190 char * other_endpoint_ip_address;
1191 int other_endpoint_port;
1192 char * reporting_endpoint_ip_addr;
1193 int reporting_endpoint_port;
1194 DLIST additional_info; /* JSON: additionalFields */
1196 /***************************************************************************/
1197 /* Optional fields */
1198 /***************************************************************************/
1199 EVEL_OPTION_STRING application_type;
1200 EVEL_OPTION_STRING app_protocol_type;
1201 EVEL_OPTION_STRING app_protocol_version;
1202 EVEL_OPTION_STRING cid;
1203 EVEL_OPTION_STRING connection_type;
1204 EVEL_OPTION_STRING ecgi;
1205 EVEL_OPTION_STRING gtp_protocol_type;
1206 EVEL_OPTION_STRING gtp_version;
1207 EVEL_OPTION_STRING http_header;
1208 EVEL_OPTION_STRING imei;
1209 EVEL_OPTION_STRING imsi;
1210 EVEL_OPTION_STRING lac;
1211 EVEL_OPTION_STRING mcc;
1212 EVEL_OPTION_STRING mnc;
1213 EVEL_OPTION_STRING msisdn;
1214 EVEL_OPTION_STRING other_functional_role;
1215 EVEL_OPTION_STRING rac;
1216 EVEL_OPTION_STRING radio_access_technology;
1217 EVEL_OPTION_STRING sac;
1218 EVEL_OPTION_INT sampling_algorithm;
1219 EVEL_OPTION_STRING tac;
1220 EVEL_OPTION_STRING tunnel_id;
1221 EVEL_OPTION_STRING vlan_id;
1223 } EVENT_MOBILE_FLOW;
1225 /*****************************************************************************/
1226 /* Supported Other field version. */
1227 /*****************************************************************************/
1228 #define EVEL_OTHER_EVENT_MAJOR_VERSION 1
1229 #define EVEL_OTHER_EVENT_MINOR_VERSION 0
1231 /**************************************************************************//**
1233 * JSON equivalent field: otherFields
1234 *****************************************************************************/
1235 typedef struct event_other {
1236 EVENT_HEADER header;
1240 HASHTABLE_T *namedarrays; /* HASHTABLE_T */
1241 DLIST jsonobjects; /* DLIST of EVEL_JSON_OBJECT */
1245 /**************************************************************************//**
1247 * JSON equivalent field: otherFields
1248 *****************************************************************************/
1249 typedef struct other_field {
1255 /*****************************************************************************/
1256 /* Supported Service Events version. */
1257 /*****************************************************************************/
1258 #define EVEL_HEARTBEAT_FIELD_MAJOR_VERSION 1
1259 #define EVEL_HEARTBEAT_FIELD_MINOR_VERSION 0
1262 /*****************************************************************************/
1263 /* Supported Signaling version. */
1264 /*****************************************************************************/
1265 #define EVEL_SIGNALING_MAJOR_VERSION 1
1266 #define EVEL_SIGNALING_MINOR_VERSION 0
1268 /**************************************************************************//**
1269 * Vendor VNF Name fields.
1270 * JSON equivalent field: vendorVnfNameFields
1271 *****************************************************************************/
1272 typedef struct vendor_vnfname_field {
1274 EVEL_OPTION_STRING vfmodule;
1275 EVEL_OPTION_STRING vnfname;
1276 } VENDOR_VNFNAME_FIELD;
1278 /**************************************************************************//**
1280 * JSON equivalent field: signalingFields
1281 *****************************************************************************/
1282 typedef struct event_signaling {
1283 /***************************************************************************/
1284 /* Header and version */
1285 /***************************************************************************/
1286 EVENT_HEADER header;
1290 /***************************************************************************/
1291 /* Mandatory fields */
1292 /***************************************************************************/
1293 VENDOR_VNFNAME_FIELD vnfname_field;
1294 EVEL_OPTION_STRING correlator; /* JSON: correlator */
1295 EVEL_OPTION_STRING local_ip_address; /* JSON: localIpAddress */
1296 EVEL_OPTION_STRING local_port; /* JSON: localPort */
1297 EVEL_OPTION_STRING remote_ip_address; /* JSON: remoteIpAddress */
1298 EVEL_OPTION_STRING remote_port; /* JSON: remotePort */
1300 /***************************************************************************/
1301 /* Optional fields */
1302 /***************************************************************************/
1303 EVEL_OPTION_STRING compressed_sip; /* JSON: compressedSip */
1304 EVEL_OPTION_STRING summary_sip; /* JSON: summarySip */
1305 DLIST additional_info;
1309 /**************************************************************************//**
1310 * Sgnaling Additional Field.
1311 * JSON equivalent field: additionalFields
1312 *****************************************************************************/
1313 typedef struct signaling_additional_field {
1316 } SIGNALING_ADDL_FIELD;
1318 /*****************************************************************************/
1319 /* Supported State Change version. */
1320 /*****************************************************************************/
1321 #define EVEL_STATE_CHANGE_MAJOR_VERSION 2
1322 #define EVEL_STATE_CHANGE_MINOR_VERSION 0
1324 /**************************************************************************//**
1326 * JSON equivalent field: stateChangeFields
1327 *****************************************************************************/
1328 typedef struct event_state_change {
1329 /***************************************************************************/
1330 /* Header and version */
1331 /***************************************************************************/
1332 EVENT_HEADER header;
1336 /***************************************************************************/
1337 /* Mandatory fields */
1338 /***************************************************************************/
1339 EVEL_ENTITY_STATE new_state;
1340 EVEL_ENTITY_STATE old_state;
1341 char * state_interface;
1344 /***************************************************************************/
1345 /* Optional fields */
1346 /***************************************************************************/
1347 DLIST additional_fields;
1349 } EVENT_STATE_CHANGE;
1351 /**************************************************************************//**
1352 * State Change Additional Field.
1353 * JSON equivalent field: additionalFields
1354 *****************************************************************************/
1355 typedef struct state_change_additional_field {
1358 } STATE_CHANGE_ADDL_FIELD;
1360 /*****************************************************************************/
1361 /* Supported Syslog version. */
1362 /*****************************************************************************/
1363 #define EVEL_SYSLOG_MAJOR_VERSION 3
1364 #define EVEL_SYSLOG_MINOR_VERSION 0
1366 /**************************************************************************//**
1368 * JSON equivalent field: syslogFields
1369 *****************************************************************************/
1370 typedef struct event_syslog {
1371 /***************************************************************************/
1372 /* Header and version */
1373 /***************************************************************************/
1374 EVENT_HEADER header;
1378 /***************************************************************************/
1379 /* Mandatory fields */
1380 /***************************************************************************/
1381 EVEL_SOURCE_TYPES event_source_type;
1385 /***************************************************************************/
1386 /* Optional fields */
1387 /***************************************************************************/
1388 EVEL_OPTION_STRING additional_filters;
1389 EVEL_OPTION_STRING event_source_host;
1390 EVEL_OPTION_INT syslog_facility;
1391 EVEL_OPTION_INT syslog_priority;
1392 EVEL_OPTION_STRING syslog_proc;
1393 EVEL_OPTION_INT syslog_proc_id;
1394 EVEL_OPTION_STRING syslog_s_data;
1395 EVEL_OPTION_STRING syslog_sdid;
1396 EVEL_OPTION_STRING syslog_severity;
1398 EVEL_OPTION_INT syslog_ver;
1402 /**************************************************************************//**
1404 * JSON equivalent object: attCopyrightNotice
1405 *****************************************************************************/
1406 typedef struct copyright {
1407 char * useAndRedistribution;
1412 char * disclaimerLine1;
1413 char * disclaimerLine2;
1414 char * disclaimerLine3;
1415 char * disclaimerLine4;
1418 /**************************************************************************//**
1419 * Library initialization.
1421 * Initialize the EVEL library.
1423 * @note This function initializes the cURL library. Applications making use
1424 * of libcurl may need to pull the initialization out of here. Note
1425 * also that this function is not threadsafe as a result - refer to
1426 * libcurl's API documentation for relevant warnings.
1428 * @sa Matching Term function.
1430 * @param fqdn The API's FQDN or IP address.
1431 * @param port The API's port.
1432 * @param bakup_fqdn The API's FQDN or IP address.
1433 * @param bakup_port The API's port.
1434 * @param path The optional path (may be NULL).
1435 * @param topic The optional topic part of the URL (may be NULL).
1436 * @param ring_buf_size Ring buffer size (>=100) ~ Avg Messages in 1hr
1437 * @param secure Whether to use HTTPS (0=HTTP, 1=HTTPS).
1438 * @param activmode Whether to use ActiveActive or ActiveStandby collector mode
1439 * @param cert_file_path Path to client certificate file
1440 * @param key_file_path Path to client key file
1441 * @param ca_info Path to CA info
1442 * @param ca_file_path Path to CA file
1443 * @param verify_peer SSL verification of peer 0 or 1
1444 * @param verify_host SSL verification of host 0 or 1
1445 * @param username Username for Basic Authentication of requests.
1446 * @param password Password for Basic Authentication of requests.
1447 * @param bakup_username Username for Basic Authentication of Bakup FQDN.
1448 * @param bakup_password Password for Basic Authentication of Bakup FQDN.
1449 * @param source_ip The ip of node we represent.(NULL for default ip)
1450 * @param bakup_source_ip The ip bakup fqdn interface.(NULL for default ip)
1451 * @param source_type The kind of node we represent.
1452 * @param role The role this node undertakes.
1453 * @param verbosity 0 for normal operation, positive values for chattier
1456 * @returns Status code
1457 * @retval EVEL_SUCCESS On success
1458 * @retval ::EVEL_ERR_CODES On failure.
1459 *****************************************************************************/
1460 EVEL_ERR_CODES evel_initialize(const char * const fqdn,
1462 const char * const bakup_fqdn,
1464 const char * const path,
1465 const char * const topic,
1469 const char * const cert_file_path,
1470 const char * const key_file_path,
1471 const char * const ca_info,
1472 const char * const ca_file_path,
1475 const char * const username,
1476 const char * const password,
1477 const char * const bakup_username,
1478 const char * const bakup_password,
1479 const char * const source_ip,
1480 const char * const bakup_source_ip,
1481 EVEL_SOURCE_TYPES source_type,
1482 const char * const role,
1486 /**************************************************************************//**
1487 * Initialize value for vm_name for all coming events
1488 * @param source_name Source name string.
1489 * Must confirm with EVEL source name standard
1490 * @returns Status code
1491 * @retval EVEL_SUCCESS On success
1492 * @retval ::EVEL_ERR_CODES On failure.
1493 *****************************************************************************/
1494 EVEL_ERR_CODES evel_set_source_name(char * src_name);
1497 /**************************************************************************//**
1498 * Clean up the EVEL library.
1500 * @note that at present don't expect Init/Term cycling not to leak memory!
1502 * @returns Status code
1503 * @retval EVEL_SUCCESS On success
1504 * @retval "One of ::EVEL_ERR_CODES" On failure.
1505 *****************************************************************************/
1506 EVEL_ERR_CODES evel_terminate(void);
1508 EVEL_ERR_CODES evel_post_event(EVENT_HEADER * event);
1509 const char * evel_error_string(void);
1512 /**************************************************************************//**
1515 * Free off the event supplied. Will free all the contained allocated memory.
1517 * @note It is safe to free a NULL pointer.
1518 *****************************************************************************/
1519 void evel_free_event(void * event);
1521 /**************************************************************************//**
1522 * Encode the event as a JSON event object according to AT&T's schema.
1524 * @param json Pointer to where to store the JSON encoded data.
1525 * @param mode Event mode or Batch mode
1526 * @param max_size Size of storage available in json_body.
1527 * @param event Pointer to the ::EVENT_HEADER to encode.
1528 * @returns Number of bytes actually written.
1529 *****************************************************************************/
1530 int evel_json_encode_event(char * json,
1532 EVENT_HEADER * event);
1533 int evel_json_encode_batch_event(char * json,
1535 EVENT_HEADER * event);
1536 /**************************************************************************//**
1537 * Initialize an event instance id.
1539 * @param vfield Pointer to the event vnfname field being initialized.
1540 * @param vendor_id The vendor id to encode in the event instance id.
1541 * @param event_id The event id to encode in the event instance id.
1542 *****************************************************************************/
1543 void evel_init_vendor_field(VENDOR_VNFNAME_FIELD * const vfield,
1544 const char * const vendor_name);
1546 /**************************************************************************//**
1547 * Set the Vendor module property of the Vendor.
1549 * @note The property is treated as immutable: it is only valid to call
1550 * the setter once. However, we don't assert if the caller tries to
1551 * overwrite, just ignoring the update instead.
1553 * @param vfield Pointer to the Vendor field.
1554 * @param module_name The module name to be set. ASCIIZ string. The caller
1555 * does not need to preserve the value once the function
1557 *****************************************************************************/
1558 void evel_vendor_field_module_set(VENDOR_VNFNAME_FIELD * const vfield,
1559 const char * const module_name);
1560 /**************************************************************************//**
1561 * Set the Vendor module property of the Vendor.
1563 * @note The property is treated as immutable: it is only valid to call
1564 * the setter once. However, we don't assert if the caller tries to
1565 * overwrite, just ignoring the update instead.
1567 * @param vfield Pointer to the Vendor field.
1568 * @param module_name The module name to be set. ASCIIZ string. The caller
1569 * does not need to preserve the value once the function
1571 *****************************************************************************/
1572 void evel_vendor_field_vnfname_set(VENDOR_VNFNAME_FIELD * const vfield,
1573 const char * const vnfname);
1574 /**************************************************************************//**
1575 * Free an event instance id.
1577 * @param vfield Pointer to the event vnfname_field being freed.
1578 *****************************************************************************/
1579 void evel_free_event_vendor_field(VENDOR_VNFNAME_FIELD * const vfield);
1581 /**************************************************************************//**
1582 * Callback function to provide returned data.
1584 * Copy data into the supplied buffer, write_callback::ptr, checking size
1587 * @returns Number of bytes placed into write_callback::ptr. 0 for EOF.
1588 *****************************************************************************/
1589 size_t evel_write_callback(void *contents,
1594 /*****************************************************************************/
1595 /*****************************************************************************/
1597 /* HEARTBEAT - (includes common header, too) */
1599 /*****************************************************************************/
1600 /*****************************************************************************/
1602 /**************************************************************************//**
1603 * Create a new heartbeat event.
1605 * @note that the heartbeat is just a "naked" commonEventHeader!
1607 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1608 * not used it must be released using ::evel_free_event
1609 * @retval NULL Failed to create the event.
1610 *****************************************************************************/
1611 EVENT_HEADER * evel_new_heartbeat(void);
1613 /**************************************************************************//**
1614 * Create a new heartbeat event of given name and type.
1616 * @note that the heartbeat is just a "naked" commonEventHeader!
1618 * @param event_name Unique Event Name: {DomainAbbreviation}_{AsdcModel or ApplicationPlatform}_{DescriptionOfInfoBeingConveyed}
1619 * @param event_id A universal identifier of the event for: troubleshooting, cross-referencing of alarms for alarm correlation, offline log analysis, etc
1621 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1622 * not used it must be released using ::evel_free_event
1623 * @retval NULL Failed to create the event.
1624 *****************************************************************************/
1625 EVENT_HEADER * evel_new_heartbeat_nameid(const char* ev_name, const char *ev_id);
1628 /**************************************************************************//**
1629 * Free an event header.
1631 * Free off the event header supplied. Will free all the contained allocated
1634 * @note It does not free the header itself, since that may be part of a
1636 *****************************************************************************/
1637 void evel_free_header(EVENT_HEADER * const event);
1639 /**************************************************************************//**
1640 * Initialize a newly created event header.
1642 * @param header Pointer to the header being initialized.
1643 *****************************************************************************/
1644 void evel_init_header(EVENT_HEADER * const header,const char *const eventname);
1646 /**************************************************************************//**
1647 * Set the Event Type property of the event header.
1649 * @param header Pointer to the ::EVENT_HEADER.
1650 * @param type The Event Type to be set. ASCIIZ string. The caller
1651 * does not need to preserve the value once the function
1653 *****************************************************************************/
1654 void evel_header_type_set(EVENT_HEADER * const header,
1655 const char * const type);
1657 /**************************************************************************//**
1658 * Set the next event_sequence to use.
1660 * @param sequence The next sequence number to use.
1661 *****************************************************************************/
1662 void evel_set_global_event_sequence(const int sequence);
1664 /**************************************************************************//**
1665 * Set the Event Sequence property of the event header.
1667 * @note This is mainly for tracking fault event sequence numbers
1669 * @param header Pointer to the ::EVENT_HEADER.
1670 * @param sequence_number
1672 *****************************************************************************/
1673 void evel_event_sequence_set(EVENT_HEADER * const header,const int sequence_number);
1675 /**************************************************************************//**
1676 * Set the Start Epoch property of the event header.
1678 * @note The Start Epoch defaults to the time of event creation.
1680 * @param header Pointer to the ::EVENT_HEADER.
1681 * @param start_epoch_microsec
1682 * The start epoch to set, in microseconds.
1683 *****************************************************************************/
1684 void evel_start_epoch_set(EVENT_HEADER * const header,
1685 const unsigned long long start_epoch_microsec);
1687 /**************************************************************************//**
1688 * Set the Last Epoch property of the event header.
1690 * @note The Last Epoch defaults to the time of event creation.
1692 * @param header Pointer to the ::EVENT_HEADER.
1693 * @param last_epoch_microsec
1694 * The last epoch to set, in microseconds.
1695 *****************************************************************************/
1696 void evel_last_epoch_set(EVENT_HEADER * const header,
1697 const unsigned long long last_epoch_microsec);
1699 /**************************************************************************//**
1700 * Set the Reporting Entity Name property of the event header.
1702 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1704 * @param header Pointer to the ::EVENT_HEADER.
1705 * @param entity_name The entity name to set.
1706 *****************************************************************************/
1707 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1708 const char * const entity_name);
1710 /**************************************************************************//**
1711 * Set the Reporting Entity Id property of the event header.
1713 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1715 * @param header Pointer to the ::EVENT_HEADER.
1716 * @param entity_id The entity id to set.
1717 *****************************************************************************/
1718 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1719 const char * const entity_id);
1721 /**************************************************************************//**
1722 * Set the NFC Naming code property of the event header.
1724 * @param header Pointer to the ::EVENT_HEADER.
1725 * @param nfcnamingcode String
1726 *****************************************************************************/
1727 void evel_nfcnamingcode_set(EVENT_HEADER * const header,
1728 const char * const nfcnam);
1729 /**************************************************************************//**
1730 * Set the NF Naming code property of the event header.
1732 * @param header Pointer to the ::EVENT_HEADER.
1733 * @param nfnamingcode String
1734 *****************************************************************************/
1735 void evel_nfnamingcode_set(EVENT_HEADER * const header,
1736 const char * const nfnam);
1738 /*****************************************************************************/
1739 /*****************************************************************************/
1743 /*****************************************************************************/
1744 /*****************************************************************************/
1746 /**************************************************************************//**
1747 * Create a new fault event.
1749 * @note The mandatory fields on the Fault must be supplied to this factory
1750 * function and are immutable once set. Optional fields have explicit
1751 * setter functions, but again values may only be set once so that the
1752 * Fault has immutable properties.
1753 * @param event_name Unique Event Name
1754 * @param event_id A universal identifier of the event for analysis etc
1755 * @param condition The condition indicated by the Fault.
1756 * @param specific_problem The specific problem triggering the fault.
1757 * @param priority The priority of the event.
1758 * @param severity The severity of the Fault.
1759 * @param ev_source_type Source of Alarm event
1760 * @param version fault version
1761 * @param status status of Virtual Function
1762 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1763 * not used (i.e. posted) it must be released using ::evel_free_fault.
1764 * @retval NULL Failed to create the event.
1765 *****************************************************************************/
1766 EVENT_FAULT * evel_new_fault(const char* ev_name, const char *ev_id,
1767 const char * const condition,
1768 const char * const specific_problem,
1769 EVEL_EVENT_PRIORITIES priority,
1770 EVEL_SEVERITIES severity,
1771 EVEL_SOURCE_TYPES ev_source_type,
1772 EVEL_VF_STATUSES status);
1774 /**************************************************************************//**
1777 * Free off the Fault supplied. Will free all the contained allocated memory.
1779 * @note It does not free the Fault itself, since that may be part of a
1781 *****************************************************************************/
1782 void evel_free_fault(EVENT_FAULT * event);
1784 /**************************************************************************//**
1785 * Set the Fault Category property of the Fault.
1787 * @note The property is treated as immutable: it is only valid to call
1788 * the setter once. However, we don't assert if the caller tries to
1789 * overwrite, just ignoring the update instead.
1791 * @param fault Pointer to the fault.
1792 * @param category Category : license, link, routing, security, signaling.
1793 * ASCIIZ string. The caller
1794 * does not need to preserve the value once the function
1796 *****************************************************************************/
1797 void evel_fault_category_set(EVENT_FAULT * fault,
1798 const char * const category);
1800 /**************************************************************************//**
1801 * Set the Alarm Interface A property of the Fault.
1803 * @note The property is treated as immutable: it is only valid to call
1804 * the setter once. However, we don't assert if the caller tries to
1805 * overwrite, just ignoring the update instead.
1807 * @param fault Pointer to the fault.
1808 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1809 * does not need to preserve the value once the function
1811 *****************************************************************************/
1812 void evel_fault_interface_set(EVENT_FAULT * fault,
1813 const char * const interface);
1815 /**************************************************************************//**
1816 * Add an additional value name/value pair to the Fault.
1818 * The name and value are null delimited ASCII strings. The library takes
1819 * a copy so the caller does not have to preserve values after the function
1822 * @param fault Pointer to the fault.
1823 * @param name ASCIIZ string with the attribute's name.
1824 * @param value ASCIIZ string with the attribute's value.
1825 *****************************************************************************/
1826 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1828 /**************************************************************************//**
1829 * Set the Event Type property of the Fault.
1831 * @note The property is treated as immutable: it is only valid to call
1832 * the setter once. However, we don't assert if the caller tries to
1833 * overwrite, just ignoring the update instead.
1835 * @param fault Pointer to the fault.
1836 * @param type The Event Type to be set. ASCIIZ string. The caller
1837 * does not need to preserve the value once the function
1839 *****************************************************************************/
1840 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1842 /*****************************************************************************/
1843 /*****************************************************************************/
1847 /*****************************************************************************/
1848 /*****************************************************************************/
1850 /**************************************************************************//**
1851 * Create a new Measurement event.
1853 * @note The mandatory fields on the Measurement must be supplied to this
1854 * factory function and are immutable once set. Optional fields have
1855 * explicit setter functions, but again values may only be set once so
1856 * that the Measurement has immutable properties.
1858 * @param measurement_interval
1859 * @param event_name Unique Event Name
1860 * @param event_id A universal identifier of the event for analysis etc
1862 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1863 * event is not used (i.e. posted) it must be released using
1864 * ::evel_free_event.
1865 * @retval NULL Failed to create the event.
1866 *****************************************************************************/
1867 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval,const char* ev_name, const char *ev_id);
1869 /**************************************************************************//**
1870 * Free a Measurement.
1872 * Free off the Measurement supplied. Will free all the contained allocated
1875 * @note It does not free the Measurement itself, since that may be part of a
1877 *****************************************************************************/
1878 void evel_free_measurement(EVENT_MEASUREMENT * event);
1880 /**************************************************************************//**
1881 * Set the Event Type property of the Measurement.
1883 * @note The property is treated as immutable: it is only valid to call
1884 * the setter once. However, we don't assert if the caller tries to
1885 * overwrite, just ignoring the update instead.
1887 * @param measurement Pointer to the Measurement.
1888 * @param type The Event Type to be set. ASCIIZ string. The caller
1889 * does not need to preserve the value once the function
1891 *****************************************************************************/
1892 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1893 const char * const type);
1895 /**************************************************************************//**
1896 * Set the Concurrent Sessions property of the Measurement.
1898 * @note The property is treated as immutable: it is only valid to call
1899 * the setter once. However, we don't assert if the caller tries to
1900 * overwrite, just ignoring the update instead.
1902 * @param measurement Pointer to the Measurement.
1903 * @param concurrent_sessions The Concurrent Sessions to be set.
1904 *****************************************************************************/
1905 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1906 int concurrent_sessions);
1908 /**************************************************************************//**
1909 * Set the Configured Entities property of the Measurement.
1911 * @note The property is treated as immutable: it is only valid to call
1912 * the setter once. However, we don't assert if the caller tries to
1913 * overwrite, just ignoring the update instead.
1915 * @param measurement Pointer to the Measurement.
1916 * @param configured_entities The Configured Entities to be set.
1917 *****************************************************************************/
1918 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1919 int configured_entities);
1921 /**************************************************************************//**
1922 * Add an additional set of Errors to the Measurement.
1924 * @note The property is treated as immutable: it is only valid to call
1925 * the setter once. However, we don't assert if the caller tries to
1926 * overwrite, just ignoring the update instead.
1928 * @param measurement Pointer to the measurement.
1929 * @param receive_discards The number of receive discards.
1930 * @param receive_errors The number of receive errors.
1931 * @param transmit_discards The number of transmit discards.
1932 * @param transmit_errors The number of transmit errors.
1933 *****************************************************************************/
1934 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1935 int receive_discards,
1937 int transmit_discards,
1938 int transmit_errors);
1940 /**************************************************************************//**
1941 * Set the Mean Request Latency property of the Measurement.
1943 * @note The property is treated as immutable: it is only valid to call
1944 * the setter once. However, we don't assert if the caller tries to
1945 * overwrite, just ignoring the update instead.
1947 * @param measurement Pointer to the Measurement.
1948 * @param mean_request_latency The Mean Request Latency to be set.
1949 *****************************************************************************/
1950 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1951 double mean_request_latency);
1953 /**************************************************************************//**
1954 * Set the Request Rate property of the Measurement.
1956 * @note The property is treated as immutable: it is only valid to call
1957 * the setter once. However, we don't assert if the caller tries to
1958 * overwrite, just ignoring the update instead.
1960 * @param measurement Pointer to the Measurement.
1961 * @param request_rate The Request Rate to be set.
1962 *****************************************************************************/
1963 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
1966 /**************************************************************************//**
1967 * Add an additional CPU usage value name/value pair to the Measurement.
1969 * The name and value are null delimited ASCII strings. The library takes
1970 * a copy so the caller does not have to preserve values after the function
1973 * @param measurement Pointer to the measurement.
1974 * @param id ASCIIZ string with the CPU's identifier.
1975 * @param usage CPU utilization.
1976 *****************************************************************************/
1977 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
1979 /**************************************************************************//**
1980 * Set the CPU Idle value in measurement interval
1981 * percentage of CPU time spent in the idle task
1983 * @note The property is treated as immutable: it is only valid to call
1984 * the setter once. However, we don't assert if the caller tries to
1985 * overwrite, just ignoring the update instead.
1987 * @param cpu_use Pointer to the CPU Use.
1989 *****************************************************************************/
1990 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
1993 /**************************************************************************//**
1994 * Set the percentage of time spent servicing interrupts
1996 * @note The property is treated as immutable: it is only valid to call
1997 * the setter once. However, we don't assert if the caller tries to
1998 * overwrite, just ignoring the update instead.
2000 * @param cpu_use Pointer to the CPU Use.
2002 *****************************************************************************/
2003 void evel_measurement_cpu_use_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
2006 /**************************************************************************//**
2007 * Set the percentage of time spent running user space processes that have been niced
2009 * @note The property is treated as immutable: it is only valid to call
2010 * the setter once. However, we don't assert if the caller tries to
2011 * overwrite, just ignoring the update instead.
2013 * @param cpu_use Pointer to the CPU Use.
2015 *****************************************************************************/
2016 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
2019 /**************************************************************************//**
2020 * Set the percentage of time spent handling soft irq interrupts
2022 * @note The property is treated as immutable: it is only valid to call
2023 * the setter once. However, we don't assert if the caller tries to
2024 * overwrite, just ignoring the update instead.
2026 * @param cpu_use Pointer to the CPU Use.
2028 *****************************************************************************/
2029 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
2031 /**************************************************************************//**
2032 * Set the percentage of time spent in involuntary wait
2034 * @note The property is treated as immutable: it is only valid to call
2035 * the setter once. However, we don't assert if the caller tries to
2036 * overwrite, just ignoring the update instead.
2038 * @param cpu_use Pointer to the CPU Use.
2040 *****************************************************************************/
2041 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
2043 /**************************************************************************//**
2044 * Set the percentage of time spent on system tasks running the kernel
2046 * @note The property is treated as immutable: it is only valid to call
2047 * the setter once. However, we don't assert if the caller tries to
2048 * overwrite, just ignoring the update instead.
2050 * @param cpu_use Pointer to the CPU Use.
2052 *****************************************************************************/
2053 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
2055 /**************************************************************************//**
2056 * Set the percentage of time spent running un-niced user space processes
2058 * @note The property is treated as immutable: it is only valid to call
2059 * the setter once. However, we don't assert if the caller tries to
2060 * overwrite, just ignoring the update instead.
2062 * @param cpu_use Pointer to the CPU Use.
2064 *****************************************************************************/
2065 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
2067 /**************************************************************************//**
2068 * Set the percentage of CPU time spent waiting for I/O operations to complete
2070 * @note The property is treated as immutable: it is only valid to call
2071 * the setter once. However, we don't assert if the caller tries to
2072 * overwrite, just ignoring the update instead.
2074 * @param cpu_use Pointer to the CPU Use.
2076 *****************************************************************************/
2077 void evel_measurement_cpu_use_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
2080 /**************************************************************************//**
2081 * Add an additional File System usage value name/value pair to the
2084 * The filesystem_name is null delimited ASCII string. The library takes a
2085 * copy so the caller does not have to preserve values after the function
2088 * @param measurement Pointer to the measurement.
2089 * @param filesystem_name ASCIIZ string with the file-system's UUID.
2090 * @param block_configured Block storage configured.
2091 * @param block_used Block storage in use.
2092 * @param block_iops Block storage IOPS.
2093 * @param ephemeral_configured Ephemeral storage configured.
2094 * @param ephemeral_used Ephemeral storage in use.
2095 * @param ephemeral_iops Ephemeral storage IOPS.
2096 *****************************************************************************/
2097 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
2098 char * filesystem_name,
2099 double block_configured,
2102 double ephemeral_configured,
2103 double ephemeral_used,
2104 double ephemeral_iops);
2106 /**************************************************************************//**
2107 * Add a Feature usage value name/value pair to the Measurement.
2109 * The name is null delimited ASCII string. The library takes
2110 * a copy so the caller does not have to preserve values after the function
2113 * @param measurement Pointer to the measurement.
2114 * @param feature ASCIIZ string with the feature's name.
2115 * @param utilization Utilization of the feature.
2116 *****************************************************************************/
2117 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
2121 /**************************************************************************//**
2122 * Add a Additional Measurement value name/value pair to the Measurement.
2124 * The name is null delimited ASCII string. The library takes
2125 * a copy so the caller does not have to preserve values after the function
2128 * @param measurement Pointer to the Measurement.
2129 * @param group ASCIIZ string with the measurement group's name.
2130 * @param name ASCIIZ string containing the measurement's name.
2131 * @param name ASCIIZ string containing the measurement's value.
2132 *****************************************************************************/
2133 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
2134 const char * const group,
2135 const char * const name,
2136 const char * const value);
2138 /**************************************************************************//**
2139 * Add a Codec usage value name/value pair to the Measurement.
2141 * The name is null delimited ASCII string. The library takes
2142 * a copy so the caller does not have to preserve values after the function
2145 * @param measurement Pointer to the measurement.
2146 * @param codec ASCIIZ string with the codec's name.
2147 * @param utilization Utilization of the feature.
2148 *****************************************************************************/
2149 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
2153 /**************************************************************************//**
2154 * Set the Media Ports in Use property of the Measurement.
2156 * @note The property is treated as immutable: it is only valid to call
2157 * the setter once. However, we don't assert if the caller tries to
2158 * overwrite, just ignoring the update instead.
2160 * @param measurement Pointer to the measurement.
2161 * @param media_ports_in_use The media port usage to set.
2162 *****************************************************************************/
2163 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
2164 int media_ports_in_use);
2166 /**************************************************************************//**
2167 * Set the VNFC Scaling Metric property of the Measurement.
2169 * @note The property is treated as immutable: it is only valid to call
2170 * the setter once. However, we don't assert if the caller tries to
2171 * overwrite, just ignoring the update instead.
2173 * @param measurement Pointer to the measurement.
2174 * @param scaling_metric The scaling metric to set.
2175 *****************************************************************************/
2176 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
2177 int scaling_metric);
2179 /**************************************************************************//**
2180 * Create a new Latency Bucket to be added to a Measurement event.
2182 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
2183 * supplied to this factory function and are immutable once set.
2184 * Optional fields have explicit setter functions, but again values
2185 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
2186 * immutable properties.
2188 * @param count Count of events in this bucket.
2190 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
2191 * @retval NULL Failed to create the Latency Bucket.
2192 *****************************************************************************/
2193 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
2195 /**************************************************************************//**
2196 * Set the High End property of the Measurement Latency Bucket.
2198 * @note The property is treated as immutable: it is only valid to call
2199 * the setter once. However, we don't assert if the caller tries to
2200 * overwrite, just ignoring the update instead.
2202 * @param bucket Pointer to the Measurement Latency Bucket.
2203 * @param high_end High end of the bucket's range.
2204 *****************************************************************************/
2205 void evel_meas_latency_bucket_high_end_set(
2206 MEASUREMENT_LATENCY_BUCKET * const bucket,
2207 const double high_end);
2209 /**************************************************************************//**
2210 * Set the Low End property of the Measurement Latency Bucket.
2212 * @note The property is treated as immutable: it is only valid to call
2213 * the setter once. However, we don't assert if the caller tries to
2214 * overwrite, just ignoring the update instead.
2216 * @param bucket Pointer to the Measurement Latency Bucket.
2217 * @param low_end Low end of the bucket's range.
2218 *****************************************************************************/
2219 void evel_meas_latency_bucket_low_end_set(
2220 MEASUREMENT_LATENCY_BUCKET * const bucket,
2221 const double low_end);
2223 /**************************************************************************//**
2224 * Add an additional Measurement Latency Bucket to the specified event.
2226 * @param measurement Pointer to the Measurement event.
2227 * @param bucket Pointer to the Measurement Latency Bucket to add.
2228 *****************************************************************************/
2229 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2230 MEASUREMENT_LATENCY_BUCKET * const bucket);
2232 /**************************************************************************//**
2233 * Add an additional Latency Distribution bucket to the Measurement.
2235 * This function implements the previous API, purely for convenience.
2237 * @param measurement Pointer to the measurement.
2238 * @param low_end Low end of the bucket's range.
2239 * @param high_end High end of the bucket's range.
2240 * @param count Count of events in this bucket.
2241 *****************************************************************************/
2242 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2243 const double low_end,
2244 const double high_end,
2247 /**************************************************************************//**
2248 * Create a new vNIC Use to be added to a Measurement event.
2250 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2251 * to this factory function and are immutable once set. Optional
2252 * fields have explicit setter functions, but again values may only be
2253 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2256 * @param vnic_id ASCIIZ string with the vNIC's ID.
2257 * @param val_suspect True or false confidence in data.
2259 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2260 * If the structure is not used it must be released using
2261 * ::evel_measurement_free_vnic_performance.
2262 * @retval NULL Failed to create the vNIC Use.
2263 *****************************************************************************/
2264 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2266 /**************************************************************************//**
2269 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2272 * @note It does not free the vNIC Use itself, since that may be part of a
2274 *****************************************************************************/
2275 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2277 /**************************************************************************//**
2278 * Set the Accumulated Broadcast Packets Received in measurement interval
2279 * property of the vNIC performance.
2281 * @note The property is treated as immutable: it is only valid to call
2282 * the setter once. However, we don't assert if the caller tries to
2283 * overwrite, just ignoring the update instead.
2285 * @param vnic_performance Pointer to the vNIC Use.
2286 * @param recvd_bcast_packets_acc
2287 *****************************************************************************/
2288 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2289 const double recvd_bcast_packets_acc);
2290 /**************************************************************************//**
2291 * Set the Delta Broadcast Packets Received in measurement interval
2292 * property of the vNIC performance.
2294 * @note The property is treated as immutable: it is only valid to call
2295 * the setter once. However, we don't assert if the caller tries to
2296 * overwrite, just ignoring the update instead.
2298 * @param vnic_performance Pointer to the vNIC Use.
2299 * @param recvd_bcast_packets_delta
2300 *****************************************************************************/
2301 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2302 const double recvd_bcast_packets_delta);
2303 /**************************************************************************//**
2304 * Set the Discarded Packets Received in measurement interval
2305 * property of the vNIC performance.
2307 * @note The property is treated as immutable: it is only valid to call
2308 * the setter once. However, we don't assert if the caller tries to
2309 * overwrite, just ignoring the update instead.
2311 * @param vnic_performance Pointer to the vNIC Use.
2312 * @param recvd_discard_packets_acc
2313 *****************************************************************************/
2314 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2315 const double recvd_discard_packets_acc);
2316 /**************************************************************************//**
2317 * Set the Delta Discarded Packets Received in measurement interval
2318 * property of the vNIC performance.
2320 * @note The property is treated as immutable: it is only valid to call
2321 * the setter once. However, we don't assert if the caller tries to
2322 * overwrite, just ignoring the update instead.
2324 * @param vnic_performance Pointer to the vNIC Use.
2325 * @param recvd_discard_packets_delta
2326 *****************************************************************************/
2327 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2328 const double recvd_discard_packets_delta);
2329 /**************************************************************************//**
2330 * Set the Error Packets Received in measurement interval
2331 * property of the vNIC performance.
2333 * @note The property is treated as immutable: it is only valid to call
2334 * the setter once. However, we don't assert if the caller tries to
2335 * overwrite, just ignoring the update instead.
2337 * @param vnic_performance Pointer to the vNIC Use.
2338 * @param recvd_error_packets_acc
2339 *****************************************************************************/
2340 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2341 const double recvd_error_packets_acc);
2342 /**************************************************************************//**
2343 * Set the Delta Error Packets Received in measurement interval
2344 * property of the vNIC performance.
2346 * @note The property is treated as immutable: it is only valid to call
2347 * the setter once. However, we don't assert if the caller tries to
2348 * overwrite, just ignoring the update instead.
2350 * @param vnic_performance Pointer to the vNIC Use.
2351 * @param recvd_error_packets_delta
2352 *****************************************************************************/
2353 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2354 const double recvd_error_packets_delta);
2355 /**************************************************************************//**
2356 * Set the Accumulated Multicast Packets Received in measurement interval
2357 * property of the vNIC performance.
2359 * @note The property is treated as immutable: it is only valid to call
2360 * the setter once. However, we don't assert if the caller tries to
2361 * overwrite, just ignoring the update instead.
2363 * @param vnic_performance Pointer to the vNIC Use.
2364 * @param recvd_mcast_packets_acc
2365 *****************************************************************************/
2366 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2367 const double recvd_mcast_packets_acc);
2368 /**************************************************************************//**
2369 * Set the Delta Multicast Packets Received in measurement interval
2370 * property of the vNIC performance.
2372 * @note The property is treated as immutable: it is only valid to call
2373 * the setter once. However, we don't assert if the caller tries to
2374 * overwrite, just ignoring the update instead.
2376 * @param vnic_performance Pointer to the vNIC Use.
2377 * @param recvd_mcast_packets_delta
2378 *****************************************************************************/
2379 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2380 const double recvd_mcast_packets_delta);
2381 /**************************************************************************//**
2382 * Set the Accumulated Octets Received in measurement interval
2383 * property of the vNIC performance.
2385 * @note The property is treated as immutable: it is only valid to call
2386 * the setter once. However, we don't assert if the caller tries to
2387 * overwrite, just ignoring the update instead.
2389 * @param vnic_performance Pointer to the vNIC Use.
2390 * @param recvd_octets_acc
2391 *****************************************************************************/
2392 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2393 const double recvd_octets_acc);
2394 /**************************************************************************//**
2395 * Set the Delta Octets Received in measurement interval
2396 * property of the vNIC performance.
2398 * @note The property is treated as immutable: it is only valid to call
2399 * the setter once. However, we don't assert if the caller tries to
2400 * overwrite, just ignoring the update instead.
2402 * @param vnic_performance Pointer to the vNIC Use.
2403 * @param recvd_octets_delta
2404 *****************************************************************************/
2405 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2406 const double recvd_octets_delta);
2407 /**************************************************************************//**
2408 * Set the Accumulated Total Packets Received in measurement interval
2409 * property of the vNIC performance.
2411 * @note The property is treated as immutable: it is only valid to call
2412 * the setter once. However, we don't assert if the caller tries to
2413 * overwrite, just ignoring the update instead.
2415 * @param vnic_performance Pointer to the vNIC Use.
2416 * @param recvd_total_packets_acc
2417 *****************************************************************************/
2418 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2419 const double recvd_total_packets_acc);
2420 /**************************************************************************//**
2421 * Set the Delta Total Packets Received in measurement interval
2422 * property of the vNIC performance.
2424 * @note The property is treated as immutable: it is only valid to call
2425 * the setter once. However, we don't assert if the caller tries to
2426 * overwrite, just ignoring the update instead.
2428 * @param vnic_performance Pointer to the vNIC Use.
2429 * @param recvd_total_packets_delta
2430 *****************************************************************************/
2431 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2432 const double recvd_total_packets_delta);
2433 /**************************************************************************//**
2434 * Set the Accumulated Unicast Packets Received in measurement interval
2435 * property of the vNIC performance.
2437 * @note The property is treated as immutable: it is only valid to call
2438 * the setter once. However, we don't assert if the caller tries to
2439 * overwrite, just ignoring the update instead.
2441 * @param vnic_performance Pointer to the vNIC Use.
2442 * @param recvd_ucast_packets_acc
2443 *****************************************************************************/
2444 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2445 const double recvd_ucast_packets_acc);
2446 /**************************************************************************//**
2447 * Set the Delta Unicast packets Received in measurement interval
2448 * property of the vNIC performance.
2450 * @note The property is treated as immutable: it is only valid to call
2451 * the setter once. However, we don't assert if the caller tries to
2452 * overwrite, just ignoring the update instead.
2454 * @param vnic_performance Pointer to the vNIC Use.
2455 * @param recvd_ucast_packets_delta
2456 *****************************************************************************/
2457 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2458 const double recvd_ucast_packets_delta);
2459 /**************************************************************************//**
2460 * Set the Transmitted Broadcast Packets in measurement interval
2461 * property of the vNIC performance.
2463 * @note The property is treated as immutable: it is only valid to call
2464 * the setter once. However, we don't assert if the caller tries to
2465 * overwrite, just ignoring the update instead.
2467 * @param vnic_performance Pointer to the vNIC Use.
2468 * @param tx_bcast_packets_acc
2469 *****************************************************************************/
2470 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2471 const double tx_bcast_packets_acc);
2472 /**************************************************************************//**
2473 * Set the Delta Broadcast packets Transmitted in measurement interval
2474 * property of the vNIC performance.
2476 * @note The property is treated as immutable: it is only valid to call
2477 * the setter once. However, we don't assert if the caller tries to
2478 * overwrite, just ignoring the update instead.
2480 * @param vnic_performance Pointer to the vNIC Use.
2481 * @param tx_bcast_packets_delta
2482 *****************************************************************************/
2483 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2484 const double tx_bcast_packets_delta);
2485 /**************************************************************************//**
2486 * Set the Transmitted Discarded Packets in measurement interval
2487 * property of the vNIC performance.
2489 * @note The property is treated as immutable: it is only valid to call
2490 * the setter once. However, we don't assert if the caller tries to
2491 * overwrite, just ignoring the update instead.
2493 * @param vnic_performance Pointer to the vNIC Use.
2494 * @param tx_discarded_packets_acc
2495 *****************************************************************************/
2496 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2497 const double tx_discarded_packets_acc);
2498 /**************************************************************************//**
2499 * Set the Delta Discarded packets Transmitted in measurement interval
2500 * property of the vNIC performance.
2502 * @note The property is treated as immutable: it is only valid to call
2503 * the setter once. However, we don't assert if the caller tries to
2504 * overwrite, just ignoring the update instead.
2506 * @param vnic_performance Pointer to the vNIC Use.
2507 * @param tx_discarded_packets_delta
2508 *****************************************************************************/
2509 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2510 const double tx_discarded_packets_delta);
2511 /**************************************************************************//**
2512 * Set the Transmitted Errored Packets in measurement interval
2513 * property of the vNIC performance.
2515 * @note The property is treated as immutable: it is only valid to call
2516 * the setter once. However, we don't assert if the caller tries to
2517 * overwrite, just ignoring the update instead.
2519 * @param vnic_performance Pointer to the vNIC Use.
2520 * @param tx_error_packets_acc
2521 *****************************************************************************/
2522 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2523 const double tx_error_packets_acc);
2524 /**************************************************************************//**
2525 * Set the Delta Errored packets Transmitted in measurement interval
2526 * property of the vNIC performance.
2528 * @note The property is treated as immutable: it is only valid to call
2529 * the setter once. However, we don't assert if the caller tries to
2530 * overwrite, just ignoring the update instead.
2532 * @param vnic_performance Pointer to the vNIC Use.
2533 * @param tx_error_packets_delta
2534 *****************************************************************************/
2535 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2536 const double tx_error_packets_delta);
2537 /**************************************************************************//**
2538 * Set the Transmitted Multicast Packets in measurement interval
2539 * property of the vNIC performance.
2541 * @note The property is treated as immutable: it is only valid to call
2542 * the setter once. However, we don't assert if the caller tries to
2543 * overwrite, just ignoring the update instead.
2545 * @param vnic_performance Pointer to the vNIC Use.
2546 * @param tx_mcast_packets_acc
2547 *****************************************************************************/
2548 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2549 const double tx_mcast_packets_acc);
2550 /**************************************************************************//**
2551 * Set the Delta Multicast packets Transmitted in measurement interval
2552 * property of the vNIC performance.
2554 * @note The property is treated as immutable: it is only valid to call
2555 * the setter once. However, we don't assert if the caller tries to
2556 * overwrite, just ignoring the update instead.
2558 * @param vnic_performance Pointer to the vNIC Use.
2559 * @param tx_mcast_packets_delta
2560 *****************************************************************************/
2561 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2562 const double tx_mcast_packets_delta);
2563 /**************************************************************************//**
2564 * Set the Transmitted Octets in measurement interval
2565 * property of the vNIC performance.
2567 * @note The property is treated as immutable: it is only valid to call
2568 * the setter once. However, we don't assert if the caller tries to
2569 * overwrite, just ignoring the update instead.
2571 * @param vnic_performance Pointer to the vNIC Use.
2572 * @param tx_octets_acc
2573 *****************************************************************************/
2574 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2575 const double tx_octets_acc);
2576 /**************************************************************************//**
2577 * Set the Delta Octets Transmitted in measurement interval
2578 * property of the vNIC performance.
2580 * @note The property is treated as immutable: it is only valid to call
2581 * the setter once. However, we don't assert if the caller tries to
2582 * overwrite, just ignoring the update instead.
2584 * @param vnic_performance Pointer to the vNIC Use.
2585 * @param tx_octets_delta
2586 *****************************************************************************/
2587 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2588 const double tx_octets_delta);
2589 /**************************************************************************//**
2590 * Set the Transmitted Total Packets in measurement interval
2591 * property of the vNIC performance.
2593 * @note The property is treated as immutable: it is only valid to call
2594 * the setter once. However, we don't assert if the caller tries to
2595 * overwrite, just ignoring the update instead.
2597 * @param vnic_performance Pointer to the vNIC Use.
2598 * @param tx_total_packets_acc
2599 *****************************************************************************/
2600 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2601 const double tx_total_packets_acc);
2602 /**************************************************************************//**
2603 * Set the Delta Total Packets Transmitted in measurement interval
2604 * property of the vNIC performance.
2606 * @note The property is treated as immutable: it is only valid to call
2607 * the setter once. However, we don't assert if the caller tries to
2608 * overwrite, just ignoring the update instead.
2610 * @param vnic_performance Pointer to the vNIC Use.
2611 * @param tx_total_packets_delta
2612 *****************************************************************************/
2613 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2614 const double tx_total_packets_delta);
2615 /**************************************************************************//**
2616 * Set the Transmitted Unicast Packets in measurement interval
2617 * property of the vNIC performance.
2619 * @note The property is treated as immutable: it is only valid to call
2620 * the setter once. However, we don't assert if the caller tries to
2621 * overwrite, just ignoring the update instead.
2623 * @param vnic_performance Pointer to the vNIC Use.
2624 * @param tx_ucast_packets_acc
2625 *****************************************************************************/
2626 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2627 const double tx_ucast_packets_acc);
2628 /**************************************************************************//**
2629 * Set the Delta Octets Transmitted in measurement interval
2630 * property of the vNIC performance.
2632 * @note The property is treated as immutable: it is only valid to call
2633 * the setter once. However, we don't assert if the caller tries to
2634 * overwrite, just ignoring the update instead.
2636 * @param vnic_performance Pointer to the vNIC Use.
2637 * @param tx_ucast_packets_delta
2638 *****************************************************************************/
2639 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2640 const double tx_ucast_packets_delta);
2642 /**************************************************************************//**
2643 * Add an additional vNIC Use to the specified Measurement event.
2645 * @param measurement Pointer to the measurement.
2646 * @param vnic_performance Pointer to the vNIC Use to add.
2647 *****************************************************************************/
2648 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2649 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2651 /**************************************************************************//**
2652 * Add an additional vNIC usage record Measurement.
2654 * This function implements the previous API, purely for convenience.
2656 * The ID is null delimited ASCII string. The library takes a copy so the
2657 * caller does not have to preserve values after the function returns.
2659 * @param measurement Pointer to the measurement.
2660 * @param vnic_id ASCIIZ string with the vNIC's ID.
2661 * @param valset true or false confidence level
2662 * @param recvd_bcast_packets_acc Recieved broadcast packets
2663 * @param recvd_bcast_packets_delta Received delta broadcast packets
2664 * @param recvd_discarded_packets_acc Recieved discarded packets
2665 * @param recvd_discarded_packets_delta Received discarded delta packets
2666 * @param recvd_error_packets_acc Received error packets
2667 * @param recvd_error_packets_delta, Received delta error packets
2668 * @param recvd_mcast_packets_acc Received multicast packets
2669 * @param recvd_mcast_packets_delta Received delta multicast packets
2670 * @param recvd_octets_acc Received octets
2671 * @param recvd_octets_delta Received delta octets
2672 * @param recvd_total_packets_acc Received total packets
2673 * @param recvd_total_packets_delta Received delta total packets
2674 * @param recvd_ucast_packets_acc Received Unicast packets
2675 * @param recvd_ucast_packets_delta Received delta unicast packets
2676 * @param tx_bcast_packets_acc Transmitted broadcast packets
2677 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2678 * @param tx_discarded_packets_acc Transmitted packets discarded
2679 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2680 * @param tx_error_packets_acc Transmitted error packets
2681 * @param tx_error_packets_delta Transmitted delta error packets
2682 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2683 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2684 * @param tx_octets_acc Transmitted octets
2685 * @param tx_octets_delta Transmitted delta octets
2686 * @param tx_total_packets_acc Transmitted total packets
2687 * @param tx_total_packets_delta Transmitted delta total packets
2688 * @param tx_ucast_packets_acc Transmitted Unicast packets
2689 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2690 *****************************************************************************/
2691 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2692 char * const vnic_id,
2694 double recvd_bcast_packets_acc,
2695 double recvd_bcast_packets_delta,
2696 double recvd_discarded_packets_acc,
2697 double recvd_discarded_packets_delta,
2698 double recvd_error_packets_acc,
2699 double recvd_error_packets_delta,
2700 double recvd_mcast_packets_acc,
2701 double recvd_mcast_packets_delta,
2702 double recvd_octets_acc,
2703 double recvd_octets_delta,
2704 double recvd_total_packets_acc,
2705 double recvd_total_packets_delta,
2706 double recvd_ucast_packets_acc,
2707 double recvd_ucast_packets_delta,
2708 double tx_bcast_packets_acc,
2709 double tx_bcast_packets_delta,
2710 double tx_discarded_packets_acc,
2711 double tx_discarded_packets_delta,
2712 double tx_error_packets_acc,
2713 double tx_error_packets_delta,
2714 double tx_mcast_packets_acc,
2715 double tx_mcast_packets_delta,
2716 double tx_octets_acc,
2717 double tx_octets_delta,
2718 double tx_total_packets_acc,
2719 double tx_total_packets_delta,
2720 double tx_ucast_packets_acc,
2721 double tx_ucast_packets_delta);
2723 /*****************************************************************************/
2724 /*****************************************************************************/
2728 /*****************************************************************************/
2729 /*****************************************************************************/
2731 /**************************************************************************//**
2732 * Create a new Report event.
2734 * @note The mandatory fields on the Report must be supplied to this
2735 * factory function and are immutable once set. Optional fields have
2736 * explicit setter functions, but again values may only be set once so
2737 * that the Report has immutable properties.
2739 * @param measurement_interval
2740 * @param event_name Unique Event Name
2741 * @param event_id A universal identifier of the event for analysis etc
2743 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2744 * not used (i.e. posted) it must be released using
2745 * ::evel_free_report.
2746 * @retval NULL Failed to create the event.
2747 *****************************************************************************/
2748 EVENT_REPORT * evel_new_report(double measurement_interval,const char* ev_name, const char *ev_id);
2750 /**************************************************************************//**
2753 * Free off the Report supplied. Will free all the contained allocated memory.
2755 * @note It does not free the Report itself, since that may be part of a
2757 *****************************************************************************/
2758 void evel_free_report(EVENT_REPORT * event);
2760 /**************************************************************************//**
2761 * Set the Event Type property of the Report.
2763 * @note The property is treated as immutable: it is only valid to call
2764 * the setter once. However, we don't assert if the caller tries to
2765 * overwrite, just ignoring the update instead.
2767 * @param report Pointer to the Report.
2768 * @param type The Event Type to be set. ASCIIZ string. The caller
2769 * does not need to preserve the value once the function
2771 *****************************************************************************/
2772 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2774 /**************************************************************************//**
2775 * Add a Feature usage value name/value pair to the Report.
2777 * The name is null delimited ASCII string. The library takes
2778 * a copy so the caller does not have to preserve values after the function
2781 * @param report Pointer to the report.
2782 * @param feature ASCIIZ string with the feature's name.
2783 * @param utilization Utilization of the feature.
2784 *****************************************************************************/
2785 void evel_report_feature_use_add(EVENT_REPORT * report,
2789 /**************************************************************************//**
2790 * Add a Additional Measurement value name/value pair to the Report.
2792 * The name is null delimited ASCII string. The library takes
2793 * a copy so the caller does not have to preserve values after the function
2796 * @param report Pointer to the report.
2797 * @param group ASCIIZ string with the measurement group's name.
2798 * @param name ASCIIZ string containing the measurement's name.
2799 * @param value ASCIIZ string containing the measurement's value.
2800 *****************************************************************************/
2801 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2802 const char * const group,
2803 const char * const name,
2804 const char * const value);
2806 /*****************************************************************************/
2807 /*****************************************************************************/
2811 /*****************************************************************************/
2812 /*****************************************************************************/
2814 /**************************************************************************//**
2815 * Create a new Mobile Flow event.
2817 * @note The mandatory fields on the Mobile Flow must be supplied to this
2818 * factory function and are immutable once set. Optional fields have
2819 * explicit setter functions, but again values may only be set once so
2820 * that the Mobile Flow has immutable properties.
2822 * @param event_name Unique Event Name
2823 * @param event_id A universal identifier of the event for analysis etc
2824 * @param flow_direction
2825 * @param gtp_per_flow_metrics
2826 * @param ip_protocol_type
2828 * @param other_endpoint_ip_address
2829 * @param other_endpoint_port
2830 * @param reporting_endpoint_ip_addr
2831 * @param reporting_endpoint_port
2833 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2834 * event is not used (i.e. posted) it must be released using
2835 * ::evel_free_mobile_flow.
2836 * @retval NULL Failed to create the event.
2837 *****************************************************************************/
2838 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2839 const char* ev_name, const char *ev_id,
2840 const char * const flow_direction,
2841 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2842 const char * const ip_protocol_type,
2843 const char * const ip_version,
2844 const char * const other_endpoint_ip_address,
2845 int other_endpoint_port,
2846 const char * const reporting_endpoint_ip_addr,
2847 int reporting_endpoint_port);
2849 /**************************************************************************//**
2850 * Free a Mobile Flow.
2852 * Free off the Mobile Flow supplied. Will free all the contained allocated
2855 * @note It does not free the Mobile Flow itself, since that may be part of a
2857 *****************************************************************************/
2858 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2860 /**************************************************************************//**
2861 * Set the Event 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 Event Type to be set. ASCIIZ string. The caller
2869 * does not need to preserve the value once the function
2871 *****************************************************************************/
2872 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2873 const char * const type);
2875 /**************************************************************************//**
2876 * Set the Application Type 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 type The Application Type to be set. ASCIIZ string. The caller
2884 * does not need to preserve the value once the function
2886 *****************************************************************************/
2887 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2888 const char * const type);
2890 /**************************************************************************//**
2891 * Set the Application Protocol Type 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 type The Application Protocol Type to be set. ASCIIZ string.
2899 * The caller does not need to preserve the value once the
2901 *****************************************************************************/
2902 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2903 const char * const type);
2905 /**************************************************************************//**
2906 * Set the Application Protocol Version property of the Mobile Flow.
2908 * @note The property is treated as immutable: it is only valid to call
2909 * the setter once. However, we don't assert if the caller tries to
2910 * overwrite, just ignoring the update instead.
2912 * @param mobile_flow Pointer to the Mobile Flow.
2913 * @param version The Application Protocol Version to be set. ASCIIZ
2914 * string. The caller does not need to preserve the value
2915 * once the function returns.
2916 *****************************************************************************/
2917 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2918 const char * const version);
2920 /**************************************************************************//**
2921 * Set the CID property of the Mobile Flow.
2923 * @note The property is treated as immutable: it is only valid to call
2924 * the setter once. However, we don't assert if the caller tries to
2925 * overwrite, just ignoring the update instead.
2927 * @param mobile_flow Pointer to the Mobile Flow.
2928 * @param cid The CID to be set. ASCIIZ string. The caller does not
2929 * need to preserve the value once the function returns.
2930 *****************************************************************************/
2931 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2932 const char * const cid);
2934 /**************************************************************************//**
2935 * Set the Connection Type property of the Mobile Flow.
2937 * @note The property is treated as immutable: it is only valid to call
2938 * the setter once. However, we don't assert if the caller tries to
2939 * overwrite, just ignoring the update instead.
2941 * @param mobile_flow Pointer to the Mobile Flow.
2942 * @param type The Connection Type to be set. ASCIIZ string. The caller
2943 * does not need to preserve the value once the function
2945 *****************************************************************************/
2946 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2947 const char * const type);
2949 /**************************************************************************//**
2950 * Set the ECGI property of the Mobile Flow.
2952 * @note The property is treated as immutable: it is only valid to call
2953 * the setter once. However, we don't assert if the caller tries to
2954 * overwrite, just ignoring the update instead.
2956 * @param mobile_flow Pointer to the Mobile Flow.
2957 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2958 * need to preserve the value once the function returns.
2959 *****************************************************************************/
2960 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2961 const char * const ecgi);
2963 /**************************************************************************//**
2964 * Set the GTP Protocol Type 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 type The GTP Protocol Type to be set. ASCIIZ string. The
2972 * caller does not need to preserve the value once the
2974 *****************************************************************************/
2975 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2976 const char * const type);
2978 /**************************************************************************//**
2979 * Set the GTP Protocol Version property of the Mobile Flow.
2981 * @note The property is treated as immutable: it is only valid to call
2982 * the setter once. However, we don't assert if the caller tries to
2983 * overwrite, just ignoring the update instead.
2985 * @param mobile_flow Pointer to the Mobile Flow.
2986 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
2987 * caller does not need to preserve the value once the
2989 *****************************************************************************/
2990 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2991 const char * const version);
2993 /**************************************************************************//**
2994 * Set the HTTP Header property of the Mobile Flow.
2996 * @note The property is treated as immutable: it is only valid to call
2997 * the setter once. However, we don't assert if the caller tries to
2998 * overwrite, just ignoring the update instead.
3000 * @param mobile_flow Pointer to the Mobile Flow.
3001 * @param header The HTTP header to be set. ASCIIZ string. The caller does
3002 * not need to preserve the value once the function returns.
3003 *****************************************************************************/
3004 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
3005 const char * const header);
3007 /**************************************************************************//**
3008 * Set the IMEI property of the Mobile Flow.
3010 * @note The property is treated as immutable: it is only valid to call
3011 * the setter once. However, we don't assert if the caller tries to
3012 * overwrite, just ignoring the update instead.
3014 * @param mobile_flow Pointer to the Mobile Flow.
3015 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
3016 * need to preserve the value once the function returns.
3017 *****************************************************************************/
3018 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
3019 const char * const imei);
3021 /**************************************************************************//**
3022 * Set the IMSI property of the Mobile Flow.
3024 * @note The property is treated as immutable: it is only valid to call
3025 * the setter once. However, we don't assert if the caller tries to
3026 * overwrite, just ignoring the update instead.
3028 * @param mobile_flow Pointer to the Mobile Flow.
3029 * @param imsi The IMSI to be set. ASCIIZ string. The caller does not
3030 * need to preserve the value once the function returns.
3031 *****************************************************************************/
3032 void evel_mobile_flow_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
3033 const char * const imsi);
3035 /**************************************************************************//**
3036 * Set the LAC property of the Mobile Flow.
3038 * @note The property is treated as immutable: it is only valid to call
3039 * the setter once. However, we don't assert if the caller tries to
3040 * overwrite, just ignoring the update instead.
3042 * @param mobile_flow Pointer to the Mobile Flow.
3043 * @param lac The LAC to be set. ASCIIZ string. The caller does not
3044 * need to preserve the value once the function returns.
3045 *****************************************************************************/
3046 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
3047 const char * const lac);
3049 /**************************************************************************//**
3050 * Set the MCC property of the Mobile Flow.
3052 * @note The property is treated as immutable: it is only valid to call
3053 * the setter once. However, we don't assert if the caller tries to
3054 * overwrite, just ignoring the update instead.
3056 * @param mobile_flow Pointer to the Mobile Flow.
3057 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
3058 * need to preserve the value once the function returns.
3059 *****************************************************************************/
3060 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
3061 const char * const mcc);
3063 /**************************************************************************//**
3064 * Set the MNC property of the Mobile Flow.
3066 * @note The property is treated as immutable: it is only valid to call
3067 * the setter once. However, we don't assert if the caller tries to
3068 * overwrite, just ignoring the update instead.
3070 * @param mobile_flow Pointer to the Mobile Flow.
3071 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
3072 * need to preserve the value once the function returns.
3073 *****************************************************************************/
3074 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
3075 const char * const mnc);
3077 /**************************************************************************//**
3078 * Set the MSISDN property of the Mobile Flow.
3080 * @note The property is treated as immutable: it is only valid to call
3081 * the setter once. However, we don't assert if the caller tries to
3082 * overwrite, just ignoring the update instead.
3084 * @param mobile_flow Pointer to the Mobile Flow.
3085 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
3086 * need to preserve the value once the function returns.
3087 *****************************************************************************/
3088 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
3089 const char * const msisdn);
3091 /**************************************************************************//**
3092 * Set the Other Functional Role property of the Mobile Flow.
3094 * @note The property is treated as immutable: it is only valid to call
3095 * the setter once. However, we don't assert if the caller tries to
3096 * overwrite, just ignoring the update instead.
3098 * @param mobile_flow Pointer to the Mobile Flow.
3099 * @param role The Other Functional Role to be set. ASCIIZ string. The
3100 * caller does not need to preserve the value once the
3102 *****************************************************************************/
3103 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
3104 const char * const role);
3106 /**************************************************************************//**
3107 * Set the RAC property of the Mobile Flow.
3109 * @note The property is treated as immutable: it is only valid to call
3110 * the setter once. However, we don't assert if the caller tries to
3111 * overwrite, just ignoring the update instead.
3113 * @param mobile_flow Pointer to the Mobile Flow.
3114 * @param rac The RAC to be set. ASCIIZ string. The caller does not
3115 * need to preserve the value once the function returns.
3116 *****************************************************************************/
3117 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
3118 const char * const rac);
3120 /**************************************************************************//**
3121 * Set the Radio Access Technology property of the Mobile Flow.
3123 * @note The property is treated as immutable: it is only valid to call
3124 * the setter once. However, we don't assert if the caller tries to
3125 * overwrite, just ignoring the update instead.
3127 * @param mobile_flow Pointer to the Mobile Flow.
3128 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
3129 * caller does not need to preserve the value once the
3131 *****************************************************************************/
3132 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
3133 const char * const tech);
3135 /**************************************************************************//**
3136 * Set the SAC property of the Mobile Flow.
3138 * @note The property is treated as immutable: it is only valid to call
3139 * the setter once. However, we don't assert if the caller tries to
3140 * overwrite, just ignoring the update instead.
3142 * @param mobile_flow Pointer to the Mobile Flow.
3143 * @param sac The SAC to be set. ASCIIZ string. The caller does not
3144 * need to preserve the value once the function returns.
3145 *****************************************************************************/
3146 void evel_mobile_flow_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
3147 const char * const sac);
3149 /**************************************************************************//**
3150 * Set the Sampling Algorithm property of the Mobile Flow.
3152 * @note The property is treated as immutable: it is only valid to call
3153 * the setter once. However, we don't assert if the caller tries to
3154 * overwrite, just ignoring the update instead.
3156 * @param mobile_flow Pointer to the Mobile Flow.
3157 * @param algorithm The Sampling Algorithm to be set.
3158 *****************************************************************************/
3159 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
3162 /**************************************************************************//**
3163 * Set the TAC property of the Mobile Flow.
3165 * @note The property is treated as immutable: it is only valid to call
3166 * the setter once. However, we don't assert if the caller tries to
3167 * overwrite, just ignoring the update instead.
3169 * @param mobile_flow Pointer to the Mobile Flow.
3170 * @param tac The TAC to be set. ASCIIZ string. The caller does not
3171 * need to preserve the value once the function returns.
3172 *****************************************************************************/
3173 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
3174 const char * const tac);
3176 /**************************************************************************//**
3177 * Set the Tunnel ID property of the Mobile Flow.
3179 * @note The property is treated as immutable: it is only valid to call
3180 * the setter once. However, we don't assert if the caller tries to
3181 * overwrite, just ignoring the update instead.
3183 * @param mobile_flow Pointer to the Mobile Flow.
3184 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
3185 * not need to preserve the value once the function returns.
3186 *****************************************************************************/
3187 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3188 const char * const tunnel_id);
3190 /**************************************************************************//**
3191 * Set the VLAN ID property of the Mobile Flow.
3193 * @note The property is treated as immutable: it is only valid to call
3194 * the setter once. However, we don't assert if the caller tries to
3195 * overwrite, just ignoring the update instead.
3197 * @param mobile_flow Pointer to the Mobile Flow.
3198 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
3199 * not need to preserve the value once the function returns.
3200 *****************************************************************************/
3201 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3202 const char * const vlan_id);
3204 /**************************************************************************//**
3205 * Create a new Mobile GTP Per Flow Metrics.
3207 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
3208 * supplied to this factory function and are immutable once set.
3209 * Optional fields have explicit setter functions, but again values
3210 * may only be set once so that the Mobile GTP Per Flow Metrics has
3211 * immutable properties.
3213 * @param avg_bit_error_rate
3214 * @param avg_packet_delay_variation
3215 * @param avg_packet_latency
3216 * @param avg_receive_throughput
3217 * @param avg_transmit_throughput
3218 * @param flow_activation_epoch
3219 * @param flow_activation_microsec
3220 * @param flow_deactivation_epoch
3221 * @param flow_deactivation_microsec
3222 * @param flow_deactivation_time
3223 * @param flow_status
3224 * @param max_packet_delay_variation
3225 * @param num_activation_failures
3226 * @param num_bit_errors
3227 * @param num_bytes_received
3228 * @param num_bytes_transmitted
3229 * @param num_dropped_packets
3230 * @param num_l7_bytes_received
3231 * @param num_l7_bytes_transmitted
3232 * @param num_lost_packets
3233 * @param num_out_of_order_packets
3234 * @param num_packet_errors
3235 * @param num_packets_received_excl_retrans
3236 * @param num_packets_received_incl_retrans
3237 * @param num_packets_transmitted_incl_retrans
3238 * @param num_retries
3239 * @param num_timeouts
3240 * @param num_tunneled_l7_bytes_received
3241 * @param round_trip_time
3242 * @param time_to_first_byte
3244 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3245 * If the structure is not used it must be released using
3246 * ::evel_free_mobile_gtp_flow_metrics.
3247 * @retval NULL Failed to create the event.
3248 *****************************************************************************/
3249 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3250 double avg_bit_error_rate,
3251 double avg_packet_delay_variation,
3252 int avg_packet_latency,
3253 int avg_receive_throughput,
3254 int avg_transmit_throughput,
3255 int flow_activation_epoch,
3256 int flow_activation_microsec,
3257 int flow_deactivation_epoch,
3258 int flow_deactivation_microsec,
3259 time_t flow_deactivation_time,
3260 const char * const flow_status,
3261 int max_packet_delay_variation,
3262 int num_activation_failures,
3264 int num_bytes_received,
3265 int num_bytes_transmitted,
3266 int num_dropped_packets,
3267 int num_l7_bytes_received,
3268 int num_l7_bytes_transmitted,
3269 int num_lost_packets,
3270 int num_out_of_order_packets,
3271 int num_packet_errors,
3272 int num_packets_received_excl_retrans,
3273 int num_packets_received_incl_retrans,
3274 int num_packets_transmitted_incl_retrans,
3277 int num_tunneled_l7_bytes_received,
3278 int round_trip_time,
3279 int time_to_first_byte);
3281 /**************************************************************************//**
3282 * Free a Mobile GTP Per Flow Metrics.
3284 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3285 * contained allocated memory.
3287 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3288 * may be part of a larger structure.
3289 *****************************************************************************/
3290 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3292 /**************************************************************************//**
3293 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3296 * @note The property is treated as immutable: it is only valid to call
3297 * the setter once. However, we don't assert if the caller tries to
3298 * overwrite, just ignoring the update instead.
3300 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3301 * @param duration The Duration of Connection Failed Status to be set.
3302 *****************************************************************************/
3303 void evel_mobile_gtp_metrics_dur_con_fail_set(
3304 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3307 /**************************************************************************//**
3308 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3311 * @note The property is treated as immutable: it is only valid to call
3312 * the setter once. However, we don't assert if the caller tries to
3313 * overwrite, just ignoring the update instead.
3315 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3316 * @param duration The Duration of Tunnel Failed Status to be set.
3317 *****************************************************************************/
3318 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3319 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3322 /**************************************************************************//**
3323 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3325 * @note The property is treated as immutable: it is only valid to call
3326 * the setter once. However, we don't assert if the caller tries to
3327 * overwrite, just ignoring the update instead.
3329 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3330 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3331 * does not need to preserve the value once the function
3333 *****************************************************************************/
3334 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3335 const char * const act_by);
3337 /**************************************************************************//**
3338 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3340 * @note The property is treated as immutable: it is only valid to call
3341 * the setter once. However, we don't assert if the caller tries to
3342 * overwrite, just ignoring the update instead.
3344 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3345 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3346 * does not need to preserve the value once the function
3348 *****************************************************************************/
3349 void evel_mobile_gtp_metrics_act_time_set(
3350 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3353 /**************************************************************************//**
3354 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3356 * @note The property is treated as immutable: it is only valid to call
3357 * the setter once. However, we don't assert if the caller tries to
3358 * overwrite, just ignoring the update instead.
3360 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3361 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3362 * does not need to preserve the value once the function
3364 *****************************************************************************/
3365 void evel_mobile_gtp_metrics_deact_by_set(
3366 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3367 const char * const deact_by);
3369 /**************************************************************************//**
3370 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3372 * @note The property is treated as immutable: it is only valid to call
3373 * the setter once. However, we don't assert if the caller tries to
3374 * overwrite, just ignoring the update instead.
3376 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3377 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3378 * caller does not need to preserve the value once the
3380 *****************************************************************************/
3381 void evel_mobile_gtp_metrics_con_status_set(
3382 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3383 const char * const status);
3385 /**************************************************************************//**
3386 * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.
3388 * @note The property is treated as immutable: it is only valid to call
3389 * the setter once. However, we don't assert if the caller tries to
3390 * overwrite, just ignoring the update instead.
3392 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3393 * @param status The GTP Tunnel Status to be set. ASCIIZ string. The
3394 * caller does not need to preserve the value once the
3396 *****************************************************************************/
3397 void evel_mobile_gtp_metrics_tun_status_set(
3398 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3399 const char * const status);
3401 /**************************************************************************//**
3402 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3404 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3405 * @param index The index of the IP Type-of-Service.
3406 * @param count The count.
3407 *****************************************************************************/
3408 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3412 /**************************************************************************//**
3413 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3416 * @note The property is treated as immutable: it is only valid to call
3417 * the setter once. However, we don't assert if the caller tries to
3418 * overwrite, just ignoring the update instead.
3420 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3421 * @param rtt The Large Packet Round-Trip Time to be set.
3422 *****************************************************************************/
3423 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3424 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3427 /**************************************************************************//**
3428 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3430 * @note The property is treated as immutable: it is only valid to call
3431 * the setter once. However, we don't assert if the caller tries to
3432 * overwrite, just ignoring the update instead.
3434 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3435 * @param threshold The Large Packet Threshold to be set.
3436 *****************************************************************************/
3437 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3438 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3441 /**************************************************************************//**
3442 * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.
3444 * @note The property is treated as immutable: it is only valid to call
3445 * the setter once. However, we don't assert if the caller tries to
3446 * overwrite, just ignoring the update instead.
3448 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3449 * @param rate The Max Receive Bit Rate to be set.
3450 *****************************************************************************/
3451 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3452 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3455 /**************************************************************************//**
3456 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
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 rate The Max Transmit Bit Rate to be set.
3464 *****************************************************************************/
3465 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3466 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3469 /**************************************************************************//**
3470 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3473 * @note The property is treated as immutable: it is only valid to call
3474 * the setter once. However, we don't assert if the caller tries to
3475 * overwrite, just ignoring the update instead.
3477 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3478 * @param num The Number of GTP Echo Failures to be set.
3479 *****************************************************************************/
3480 void evel_mobile_gtp_metrics_num_echo_fail_set(
3481 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3484 /**************************************************************************//**
3485 * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow
3488 * @note The property is treated as immutable: it is only valid to call
3489 * the setter once. However, we don't assert if the caller tries to
3490 * overwrite, just ignoring the update instead.
3492 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3493 * @param num The Number of GTP Tunnel Errors to be set.
3494 *****************************************************************************/
3495 void evel_mobile_gtp_metrics_num_tun_fail_set(
3496 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3499 /**************************************************************************//**
3500 * Set the Number of HTTP Errors property of the Mobile GTP Per Flow 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 num The Number of HTTP Errors to be set.
3508 *****************************************************************************/
3509 void evel_mobile_gtp_metrics_num_http_errors_set(
3510 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3513 /**************************************************************************//**
3514 * Add a TCP flag count to the metrics.
3516 * @note The property is treated as immutable: it is only valid to call
3517 * the setter once. However, we don't assert if the caller tries to
3518 * overwrite, just ignoring the update instead.
3520 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3521 * @param tcp_flag The TCP flag count to be updated.
3522 * @param count The associated flag count.
3523 *****************************************************************************/
3524 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3525 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3526 const EVEL_TCP_FLAGS tcp_flag,
3529 /**************************************************************************//**
3530 * Add a QCI COS count to the metrics.
3532 * @note The property is treated as immutable: it is only valid to call
3533 * the setter once. However, we don't assert if the caller tries to
3534 * overwrite, just ignoring the update instead.
3536 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3537 * @param qci_cos The QCI COS count to be updated.
3538 * @param count The associated QCI COS count.
3539 *****************************************************************************/
3540 void evel_mobile_gtp_metrics_qci_cos_count_add(
3541 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3542 const EVEL_QCI_COS_TYPES qci_cos,
3545 /*****************************************************************************/
3546 /*****************************************************************************/
3550 /*****************************************************************************/
3551 /*****************************************************************************/
3553 /**************************************************************************//**
3554 * Create a new Signaling event.
3556 * @note The mandatory fields on the Signaling must be supplied to
3557 * this factory function and are immutable once set. Optional fields
3558 * have explicit setter functions, but again values may only be set
3559 * once so that the event has immutable properties.
3560 * @param event_name Unique Event Name
3561 * @param event_id A universal identifier of the event for analysis etc
3562 * @param vendor_name The vendor id to encode in the event vnf field.
3563 * @param module The module to encode in the event.
3564 * @param vnfname The Virtual network function to encode in the event.
3565 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3566 * is not used (i.e. posted) it must be released using
3567 * ::evel_free_signaling.
3568 * @retval NULL Failed to create the event.
3569 *****************************************************************************/
3570 EVENT_SIGNALING * evel_new_signaling(const char* ev_name, const char *ev_id,
3571 const char * const vendor_name,
3572 const char * const correlator,
3573 const char * const local_ip_address,
3574 const char * const local_port,
3575 const char * const remote_ip_address,
3576 const char * const remote_port);
3578 /**************************************************************************//**
3579 * Free a Signaling event.
3581 * Free off the event supplied. Will free all the contained allocated memory.
3583 * @note It does not free the event itself, since that may be part of a larger
3585 *****************************************************************************/
3586 void evel_free_signaling(EVENT_SIGNALING * const event);
3588 /**************************************************************************//**
3589 * Set the Event Type property of the Signaling event.
3591 * @note The property is treated as immutable: it is only valid to call
3592 * the setter once. However, we don't assert if the caller tries to
3593 * overwrite, just ignoring the update instead.
3595 * @param event Pointer to the Signaling event.
3596 * @param type The Event Type to be set. ASCIIZ string. The caller
3597 * does not need to preserve the value once the function
3599 *****************************************************************************/
3600 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3601 const char * const type);
3603 /**************************************************************************//**
3604 * Add an additional value name/value pair to the SIP signaling.
3606 * The name and value are null delimited ASCII strings. The library takes
3607 * a copy so the caller does not have to preserve values after the function
3610 * @param event Pointer to the fault.
3611 * @param name ASCIIZ string with the attribute's name. The caller
3612 * does not need to preserve the value once the function
3614 * @param value ASCIIZ string with the attribute's value. The caller
3615 * does not need to preserve the value once the function
3617 *****************************************************************************/
3618 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3620 /**************************************************************************//**
3621 * Set the Correlator property of the Signaling event.
3623 * @note The property is treated as immutable: it is only valid to call
3624 * the setter once. However, we don't assert if the caller tries to
3625 * overwrite, just ignoring the update instead.
3627 * @param event Pointer to the Signaling event.
3628 * @param correlator The correlator to be set. ASCIIZ string. The caller
3629 * does not need to preserve the value once the function
3631 *****************************************************************************/
3632 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3633 const char * const correlator);
3635 /**************************************************************************//**
3636 * Set the Local Ip Address property of the Signaling event.
3638 * @note The property is treated as immutable: it is only valid to call
3639 * the setter once. However, we don't assert if the caller tries to
3640 * overwrite, just ignoring the update instead.
3642 * @param event Pointer to the Signaling event.
3643 * @param local_ip_address
3644 * The Local Ip Address to be set. ASCIIZ string. The
3645 * caller does not need to preserve the value once the
3647 *****************************************************************************/
3648 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3649 const char * const local_ip_address);
3651 /**************************************************************************//**
3652 * Set the Local Port property of the Signaling event.
3654 * @note The property is treated as immutable: it is only valid to call
3655 * the setter once. However, we don't assert if the caller tries to
3656 * overwrite, just ignoring the update instead.
3658 * @param event Pointer to the Signaling event.
3659 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3660 * does not need to preserve the value once the function
3662 *****************************************************************************/
3663 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3664 const char * const local_port);
3666 /**************************************************************************//**
3667 * Set the Remote Ip Address 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 remote_ip_address
3675 * The Remote Ip Address to be set. ASCIIZ string. The
3676 * caller does not need to preserve the value once the
3678 *****************************************************************************/
3679 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3680 const char * const remote_ip_address);
3682 /**************************************************************************//**
3683 * Set the Remote Port property of the Signaling event.
3685 * @note The property is treated as immutable: it is only valid to call
3686 * the setter once. However, we don't assert if the caller tries to
3687 * overwrite, just ignoring the update instead.
3689 * @param event Pointer to the Signaling event.
3690 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3691 * does not need to preserve the value once the function
3693 *****************************************************************************/
3694 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3695 const char * const remote_port);
3696 /**************************************************************************//**
3697 * Set the Vendor module property of the Signaling event.
3699 * @note The property is treated as immutable: it is only valid to call
3700 * the setter once. However, we don't assert if the caller tries to
3701 * overwrite, just ignoring the update instead.
3703 * @param event Pointer to the Signaling event.
3704 * @param modulename The module name to be set. ASCIIZ string. The caller
3705 * does not need to preserve the value once the function
3707 *****************************************************************************/
3708 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3709 const char * const module_name);
3710 /**************************************************************************//**
3711 * Set the Vendor module property of the Signaling event.
3713 * @note The property is treated as immutable: it is only valid to call
3714 * the setter once. However, we don't assert if the caller tries to
3715 * overwrite, just ignoring the update instead.
3717 * @param event Pointer to the Signaling event.
3718 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3719 * The caller does not need to preserve the value once
3720 * the function returns.
3721 *****************************************************************************/
3722 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3723 const char * const vnfname);
3725 /**************************************************************************//**
3726 * Set the Compressed SIP property of the Signaling event.
3728 * @note The property is treated as immutable: it is only valid to call
3729 * the setter once. However, we don't assert if the caller tries to
3730 * overwrite, just ignoring the update instead.
3732 * @param event Pointer to the Signaling event.
3733 * @param compressed_sip
3734 * The Compressed SIP to be set. ASCIIZ string. The caller
3735 * does not need to preserve the value once the function
3737 *****************************************************************************/
3738 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3739 const char * const compressed_sip);
3741 /**************************************************************************//**
3742 * Set the Summary SIP property of the Signaling event.
3744 * @note The property is treated as immutable: it is only valid to call
3745 * the setter once. However, we don't assert if the caller tries to
3746 * overwrite, just ignoring the update instead.
3748 * @param event Pointer to the Signaling event.
3749 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3750 * does not need to preserve the value once the function
3752 *****************************************************************************/
3753 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3754 const char * const summary_sip);
3757 /*****************************************************************************/
3758 /*****************************************************************************/
3762 /*****************************************************************************/
3763 /*****************************************************************************/
3765 /**************************************************************************//**
3766 * Create a new State Change event.
3768 * @note The mandatory fields on the Syslog must be supplied to this factory
3769 * function and are immutable once set. Optional fields have explicit
3770 * setter functions, but again values may only be set once so that the
3771 * Syslog has immutable properties.
3773 * @param event_name Unique Event Name
3774 * @param event_id A universal identifier of the event for analysis etc
3775 * @param new_state The new state of the reporting entity.
3776 * @param old_state The old state of the reporting entity.
3777 * @param interface The card or port name of the reporting entity.
3779 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3780 * event is not used it must be released using
3781 * ::evel_free_state_change
3782 * @retval NULL Failed to create the event.
3783 *****************************************************************************/
3784 EVENT_STATE_CHANGE * evel_new_state_change(const char* ev_name, const char *ev_id,
3785 const EVEL_ENTITY_STATE new_state,
3786 const EVEL_ENTITY_STATE old_state,
3787 const char * const interface);
3789 /**************************************************************************//**
3790 * Free a State Change.
3792 * Free off the State Change supplied. Will free all the contained allocated
3795 * @note It does not free the State Change itself, since that may be part of a
3797 *****************************************************************************/
3798 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3800 /**************************************************************************//**
3801 * Set the Event Type property of the State Change.
3803 * @note The property is treated as immutable: it is only valid to call
3804 * the setter once. However, we don't assert if the caller tries to
3805 * overwrite, just ignoring the update instead.
3807 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3808 * @param type The Event Type to be set. ASCIIZ string. The caller
3809 * does not need to preserve the value once the function
3811 *****************************************************************************/
3812 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3813 const char * const type);
3815 /**************************************************************************//**
3816 * Add an additional field name/value pair to the State Change.
3818 * The name and value are null delimited ASCII strings. The library takes
3819 * a copy so the caller does not have to preserve values after the function
3822 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3823 * @param name ASCIIZ string with the attribute's name. The caller
3824 * does not need to preserve the value once the function
3826 * @param value ASCIIZ string with the attribute's value. The caller
3827 * does not need to preserve the value once the function
3829 *****************************************************************************/
3830 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3831 const char * const name,
3832 const char * const value);
3834 /*****************************************************************************/
3835 /*****************************************************************************/
3839 /*****************************************************************************/
3840 /*****************************************************************************/
3842 /**************************************************************************//**
3843 * Create a new syslog event.
3845 * @note The mandatory fields on the Syslog must be supplied to this factory
3846 * function and are immutable once set. Optional fields have explicit
3847 * setter functions, but again values may only be set once so that the
3848 * Syslog has immutable properties.
3850 * @param event_name Unique Event Name
3851 * @param event_id A universal identifier of the event for analysis etc
3852 * @param event_source_type
3857 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3858 * not used it must be released using ::evel_free_syslog
3859 * @retval NULL Failed to create the event.
3860 *****************************************************************************/
3861 EVENT_SYSLOG * evel_new_syslog(const char* ev_name, const char *ev_id,
3862 EVEL_SOURCE_TYPES event_source_type,
3863 const char * const syslog_msg,
3864 const char * const syslog_tag);
3866 /**************************************************************************//**
3867 * Set the Event Type property of the Syslog.
3869 * @note The property is treated as immutable: it is only valid to call
3870 * the setter once. However, we don't assert if the caller tries to
3871 * overwrite, just ignoring the update instead.
3873 * @param syslog Pointer to the syslog.
3874 * @param type The Event Type to be set. ASCIIZ string. The caller
3875 * does not need to preserve the value once the function
3877 *****************************************************************************/
3878 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3879 const char * const type);
3881 /**************************************************************************//**
3884 * Free off the Syslog supplied. Will free all the contained allocated memory.
3886 * @note It does not free the Syslog itself, since that may be part of a
3888 *****************************************************************************/
3889 void evel_free_syslog(EVENT_SYSLOG * event);
3891 /**************************************************************************//**
3892 * Add an additional field name/value pair to the Syslog.
3894 * The name and value are null delimited ASCII strings. The library takes
3895 * a copy so the caller does not have to preserve values after the function
3898 * @param syslog Pointer to the syslog.
3899 * @param name ASCIIZ string with the attribute's name. The caller
3900 * does not need to preserve the value once the function
3902 * @param value ASCIIZ string with the attribute's value. The caller
3903 * does not need to preserve the value once the function
3905 *****************************************************************************/
3906 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3910 /**************************************************************************//**
3911 * Set the Event Source Host 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 host The Event Source Host to be set. ASCIIZ string. The
3919 * caller does not need to preserve the value once the
3921 *****************************************************************************/
3922 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3923 const char * const host);
3925 /**************************************************************************//**
3926 * Set the Syslog Facility property of the Syslog.
3928 * @note The property is treated as immutable: it is only valid to call
3929 * the setter once. However, we don't assert if the caller tries to
3930 * overwrite, just ignoring the update instead.
3932 * @param syslog Pointer to the Syslog.
3933 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3934 * does not need to preserve the value once the function
3936 *****************************************************************************/
3937 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3938 EVEL_SYSLOG_FACILITIES facility);
3940 /**************************************************************************//**
3941 * Set the Process property of the Syslog.
3943 * @note The property is treated as immutable: it is only valid to call
3944 * the setter once. However, we don't assert if the caller tries to
3945 * overwrite, just ignoring the update instead.
3947 * @param syslog Pointer to the Syslog.
3948 * @param proc The Process to be set. ASCIIZ string. The caller does
3949 * not need to preserve the value once the function returns.
3950 *****************************************************************************/
3951 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3953 /**************************************************************************//**
3954 * Set the Process ID property of the Syslog.
3956 * @note The property is treated as immutable: it is only valid to call
3957 * the setter once. However, we don't assert if the caller tries to
3958 * overwrite, just ignoring the update instead.
3960 * @param syslog Pointer to the Syslog.
3961 * @param proc_id The Process ID to be set.
3962 *****************************************************************************/
3963 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
3965 /**************************************************************************//**
3966 * Set the Version property of the Syslog.
3968 * @note The property is treated as immutable: it is only valid to call
3969 * the setter once. However, we don't assert if the caller tries to
3970 * overwrite, just ignoring the update instead.
3972 * @param syslog Pointer to the Syslog.
3973 * @param version The Version to be set.
3974 *****************************************************************************/
3975 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
3977 /**************************************************************************//**
3978 * Set the Structured Data property of the Syslog.
3980 * @note The property is treated as immutable: it is only valid to call
3981 * the setter once. However, we don't assert if the caller tries to
3982 * overwrite, just ignoring the update instead.
3984 * @param syslog Pointer to the Syslog.
3985 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
3986 * does not need to preserve the value once the function
3988 *****************************************************************************/
3989 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
3991 /**************************************************************************//**
3992 * Set the Structured SDID property of the Syslog.
3994 * @note The property is treated as immutable: it is only valid to call
3995 * the setter once. However, we don't assert if the caller tries to
3996 * overwrite, just ignoring the update instead.
3998 * @param syslog Pointer to the Syslog.
3999 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
4000 * Caller does not need to preserve the value once the function
4002 *****************************************************************************/
4003 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
4005 /**************************************************************************//**
4006 * Set the Structured Severity property of the Syslog.
4008 * @note The property is treated as immutable: it is only valid to call
4009 * the setter once. However, we don't assert if the caller tries to
4010 * overwrite, just ignoring the update instead.
4012 * @param syslog Pointer to the Syslog.
4013 * @param sdid The Structured Data to be set. ASCIIZ string.
4014 * Caller does not need to preserve the value once the function
4016 *****************************************************************************/
4017 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
4020 /*****************************************************************************/
4021 /*****************************************************************************/
4025 /*****************************************************************************/
4026 /*****************************************************************************/
4028 /**************************************************************************//**
4029 * Create a new other event.
4031 * @param event_name Unique Event Name
4032 * @param event_id A universal identifier of the event for analysis etc
4034 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
4035 * not used it must be released using ::evel_free_other.
4036 * @retval NULL Failed to create the event.
4037 *****************************************************************************/
4038 EVENT_OTHER * evel_new_other(const char* ev_name, const char *ev_id);
4040 /**************************************************************************//**
4043 * Free off the Other supplied. Will free all the contained allocated memory.
4045 * @note It does not free the Other itself, since that may be part of a
4047 *****************************************************************************/
4048 void evel_free_other(EVENT_OTHER * event);
4050 /**************************************************************************//**
4051 * Set the Event Type property of the Other.
4053 * @note The property is treated as immutable: it is only valid to call
4054 * the setter once. However, we don't assert if the caller tries to
4055 * overwrite, just ignoring the update instead.
4057 * @param other Pointer to the Other.
4058 * @param type The Event Type to be set. ASCIIZ string. The caller
4059 * does not need to preserve the value once the function
4061 *****************************************************************************/
4062 void evel_other_type_set(EVENT_OTHER * other,
4063 const char * const type);
4065 /**************************************************************************//**
4066 * Add a value name/value pair to the Other.
4068 * The name and value are null delimited ASCII strings. The library takes
4069 * a copy so the caller does not have to preserve values after the function
4072 * @param other Pointer to the Other.
4073 * @param name ASCIIZ string with the attribute's name.
4074 * @param value ASCIIZ string with the attribute's value.
4075 *****************************************************************************/
4076 void evel_other_field_add(EVENT_OTHER * other,
4080 /*****************************************************************************/
4081 /*****************************************************************************/
4085 /*****************************************************************************/
4086 /*****************************************************************************/
4088 /**************************************************************************//**
4089 * Return the current measurement interval provided by the Event Listener.
4091 * @returns The current measurement interval
4092 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
4094 *****************************************************************************/
4095 int evel_get_measurement_interval();
4097 /*****************************************************************************/
4098 /* Supported Report version. */
4099 /*****************************************************************************/
4100 #define EVEL_VOICEQ_MAJOR_VERSION 1
4101 #define EVEL_VOICEQ_MINOR_VERSION 0
4103 /**************************************************************************//**
4104 * End of Call Voice Quality Metrices
4105 * JSON equivalent field: endOfCallVqmSummaries
4106 *****************************************************************************/
4107 typedef struct end_of_call_vqm_summaries {
4108 /***************************************************************************/
4109 /* Mandatory fields */
4110 /***************************************************************************/
4111 char* adjacencyName;
4112 char* endpointDescription;
4114 /***************************************************************************/
4115 /* Optional fields */
4116 /***************************************************************************/
4117 EVEL_OPTION_INT endpointJitter;
4118 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
4119 EVEL_OPTION_INT endpointRtpOctetsReceived;
4120 EVEL_OPTION_INT endpointRtpOctetsSent;
4121 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
4122 EVEL_OPTION_INT endpointRtpPacketsReceived;
4123 EVEL_OPTION_INT endpointRtpPacketsSent;
4124 EVEL_OPTION_INT localJitter;
4125 EVEL_OPTION_INT localRtpOctetsDiscarded;
4126 EVEL_OPTION_INT localRtpOctetsReceived;
4127 EVEL_OPTION_INT localRtpOctetsSent;
4128 EVEL_OPTION_INT localRtpPacketsDiscarded;
4129 EVEL_OPTION_INT localRtpPacketsReceived;
4130 EVEL_OPTION_INT localRtpPacketsSent;
4131 EVEL_OPTION_INT mosCqe;
4132 EVEL_OPTION_INT packetsLost;
4133 EVEL_OPTION_INT packetLossPercent;
4134 EVEL_OPTION_INT rFactor;
4135 EVEL_OPTION_INT roundTripDelay;
4137 } END_OF_CALL_VOICE_QUALITY_METRICS;
4139 /**************************************************************************//**
4141 * JSON equivalent field: voiceQualityFields
4142 *****************************************************************************/
4144 typedef struct event_voiceQuality {
4145 /***************************************************************************/
4146 /* Header and version */
4147 /***************************************************************************/
4148 EVENT_HEADER header;
4152 /***************************************************************************/
4153 /* Mandatory fields */
4154 /***************************************************************************/
4156 char *calleeSideCodec;
4157 char *callerSideCodec;
4160 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
4161 END_OF_CALL_VOICE_QUALITY_METRICS *endOfCallVqmSummaries;
4163 /***************************************************************************/
4164 /* Optional fields */
4165 /***************************************************************************/
4166 EVEL_OPTION_STRING phoneNumber;
4167 DLIST additionalInformation;
4169 } EVENT_VOICE_QUALITY;
4170 /**************************************************************************//**
4171 * Voice Quality Additional Info.
4172 * JSON equivalent field: additionalInformation
4173 *****************************************************************************/
4174 typedef struct voice_quality_additional_info {
4177 } VOICE_QUALITY_ADDL_INFO;
4179 /**************************************************************************//**
4180 * Create a new voice quality event.
4182 * @note The mandatory fields on the Voice Quality must be supplied to this
4183 * factory function and are immutable once set. Optional fields have
4184 * explicit setter functions, but again values may only be set once
4185 * so that the Voice Quality has immutable properties.
4186 * @param event_name Unique Event Name
4187 * @param event_id A universal identifier of the event for analysis etc
4188 * @param calleeSideCodec Callee codec for the call.
4189 * @param callerSideCodec Caller codec for the call.
4190 * @param correlator Constant across all events on this call.
4191 * @param midCallRtcp Base64 encoding of the binary RTCP data
4192 * (excluding Eth/IP/UDP headers).
4193 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
4194 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
4195 * event is not used (i.e. posted) it must be released using
4196 ::evel_free_voice_quality.
4197 * @retval NULL Failed to create the event.
4198 *****************************************************************************/
4199 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char* ev_name, const char *ev_id,
4200 const char * const calleeSideCodec,
4201 const char * const callerSideCodec, const char * const correlator,
4202 const char * const midCallRtcp, const char * const vendorVnfNameFields);
4204 /**************************************************************************//**
4205 * Set the Callee side codec for Call for domain Voice Quality
4207 * @note The property is treated as immutable: it is only valid to call
4208 * the setter once. However, we don't assert if the caller tries to
4209 * overwrite, just ignoring the update instead.
4211 * @param voiceQuality Pointer to the Voice Quality Event.
4212 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
4213 * string. The caller does not need to
4214 * preserve the value once the function
4216 *****************************************************************************/
4217 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4218 const char * const calleeCodecForCall);
4220 /**************************************************************************//**
4221 * Set the Caller side codec for Call for domain Voice Quality
4223 * @note The property is treated as immutable: it is only valid to call
4224 * the setter once. However, we don't assert if the caller tries to
4225 * overwrite, just ignoring the update instead.
4227 * @param voiceQuality Pointer to the Voice Quality Event.
4228 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
4229 * string. The caller does not need to
4230 * preserve the value once the function
4232 *****************************************************************************/
4233 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4234 const char * const callerCodecForCall);
4236 /**************************************************************************//**
4237 * Set the correlator for domain Voice Quality
4239 * @note The property is treated as immutable: it is only valid to call
4240 * the setter once. However, we don't assert if the caller tries to
4241 * overwrite, just ignoring the update instead.
4243 * @param voiceQuality Pointer to the Voice Quality Event.
4244 * @param correlator The correlator value to be set. ASCIIZ
4245 * string. The caller does not need to
4246 * preserve the value once the function
4248 *****************************************************************************/
4249 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4250 const char * const vCorrelator);
4252 /**************************************************************************//**
4253 * Set the RTCP Call Data for domain Voice Quality
4255 * @note The property is treated as immutable: it is only valid to call
4256 * the setter once. However, we don't assert if the caller tries to
4257 * overwrite, just ignoring the update instead.
4259 * @param voiceQuality Pointer to the Voice Quality Event.
4260 * @param rtcpCallData The RTCP Call Data to be set. ASCIIZ
4261 * string. The caller does not need to
4262 * preserve the value once the function
4264 *****************************************************************************/
4265 void evel_voice_quality_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4266 const char * const rtcpCallData);
4268 /**************************************************************************//**
4269 * Set the Vendor VNF Name fields for domain Voice Quality
4271 * @note The property is treated as immutable: it is only valid to call
4272 * the setter once. However, we don't assert if the caller tries to
4273 * overwrite, just ignoring the update instead.
4275 * @param voiceQuality Pointer to the Voice Quality Event.
4276 * @param nameFields The Vendor, VNF and VfModule names to be set.
4277 * ASCIIZ string. The caller does not need to
4278 * preserve the value once the function
4280 *****************************************************************************/
4281 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4282 const char * const nameFields);
4284 /**************************************************************************//**
4285 * Add an End of Call Voice Quality Metrices
4287 * The adjacencyName and endpointDescription is null delimited ASCII string.
4288 * The library takes a copy so the caller does not have to preserve values
4289 * after the function returns.
4291 * @param voiceQuality Pointer to the measurement.
4292 * @param adjacencyName Adjacency name
4293 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4294 * @param endpointJitter Endpoint jitter
4295 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4296 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4297 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4298 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4299 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4300 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4301 * @param localJitter Local jitter.
4302 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4303 * @param localRtpOctetsReceived Local RTP octets received.
4304 * @param localRtpOctetsSent Local RTP octets sent.
4305 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4306 * @param localRtpPacketsReceived Local RTP packets received.
4307 * @param localRtpPacketsSent Local RTP packets sent.
4308 * @param mosCqe Decimal range from 1 to 5
4310 * @param packetsLost No Packets lost
4311 * @param packetLossPercent Calculated percentage packet loss
4312 * @param rFactor rFactor from 0 to 100
4313 * @param roundTripDelay Round trip delay in milliseconds
4314 *****************************************************************************/
4315 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4316 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4318 int endpointRtpOctetsDiscarded,
4319 int endpointRtpOctetsReceived,
4320 int endpointRtpOctetsSent,
4321 int endpointRtpPacketsDiscarded,
4322 int endpointRtpPacketsReceived,
4323 int endpointRtpPacketsSent,
4325 int localRtpOctetsDiscarded,
4326 int localRtpOctetsReceived,
4327 int localRtpOctetsSent,
4328 int localRtpPacketsDiscarded,
4329 int localRtpPacketsReceived,
4330 int localRtpPacketsSent,
4333 int packetLossPercent,
4335 int roundTripDelay);
4337 /**************************************************************************//**
4338 * Free a Voice Quality.
4340 * Free off the Voce Quality supplied. Will free all the contained allocated
4343 * @note It does not free the Voice Quality itself, since that may be part of a
4345 *****************************************************************************/
4346 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4348 /**************************************************************************//**
4349 * Add an additional value name/value pair to the Voice Quality.
4351 * The name and value are null delimited ASCII strings. The library takes
4352 * a copy so the caller does not have to preserve values after the function
4355 * @param fault Pointer to the fault.
4356 * @param name ASCIIZ string with the attribute's name. The caller
4357 * does not need to preserve the value once the function
4359 * @param value ASCIIZ string with the attribute's value. The caller
4360 * does not need to preserve the value once the function
4362 *****************************************************************************/
4363 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4366 /*****************************************************************************/
4367 /*****************************************************************************/
4369 /* THRESHOLD CROSSING ALERT */
4371 /*****************************************************************************/
4372 /*****************************************************************************/
4374 typedef enum evel_event_action {
4375 EVEL_EVENT_ACTION_CLEAR,
4376 EVEL_EVENT_ACTION_CONTINUE,
4377 EVEL_EVENT_ACTION_SET,
4378 EVEL_MAX_EVENT_ACTION
4381 typedef enum evel_alert_type {
4383 EVEL_ELEMENT_ANOMALY,
4384 EVEL_INTERFACE_ANOMALY,
4385 EVEL_SERVICE_ANOMALY,
4390 typedef struct perf_counter {
4393 char * thresholdCrossed;
4398 /*****************************************************************************/
4399 /* Supported Threshold Crossing version. */
4400 /*****************************************************************************/
4401 #define EVEL_THRESHOLD_CROSS_MAJOR_VERSION 2
4402 #define EVEL_THRESHOLD_CROSS_MINOR_VERSION 0
4404 /**************************************************************************//**
4405 * Threshold Crossing.
4406 * JSON equivalent field: Threshold Cross Fields
4407 *****************************************************************************/
4408 typedef struct event_threshold_cross {
4409 /***************************************************************************/
4410 /* Header and version */
4411 /***************************************************************************/
4412 EVENT_HEADER header;
4416 /***************************************************************************/
4417 /* Mandatory fields */
4418 /***************************************************************************/
4419 PERF_COUNTER additionalParameters;
4420 EVEL_EVENT_ACTION alertAction;
4421 char * alertDescription;
4422 EVEL_ALERT_TYPE alertType;
4423 unsigned long long collectionTimestamp;
4424 EVEL_SEVERITIES eventSeverity;
4425 unsigned long long eventStartTimestamp;
4427 /***************************************************************************/
4428 /* Optional fields */
4429 /***************************************************************************/
4430 DLIST additional_info;
4431 EVEL_OPTION_STRING alertValue;
4433 EVEL_OPTION_STRING dataCollector;
4434 EVEL_OPTION_STRING elementType;
4435 EVEL_OPTION_STRING interfaceName;
4436 EVEL_OPTION_STRING networkService;
4437 EVEL_OPTION_STRING possibleRootCause;
4439 } EVENT_THRESHOLD_CROSS;
4442 /**************************************************************************//**
4443 * Create a new Threshold Crossing Alert event.
4445 * @note The mandatory fields on the TCA must be supplied to this factory
4446 * function and are immutable once set. Optional fields have explicit
4447 * setter functions, but again values may only be set once so that the
4448 * TCA has immutable properties.
4450 * @param event_name Unique Event Name
4451 * @param event_id A universal identifier of the event for analysis etc
4452 * @param char* tcriticality Performance Counter Criticality MAJ MIN,
4453 * @param char* tname Performance Counter Threshold name
4454 * @param char* tthresholdCrossed Counter Threshold crossed value
4455 * @param char* tvalue Counter actual value
4456 * @param EVEL_EVENT_ACTION talertAction Alert set continue or clear
4457 * @param char* talertDescription
4458 * @param EVEL_ALERT_TYPE talertType Kind of anamoly
4459 * @param unsigned long long tcollectionTimestamp time at which alert was collected
4460 * @param EVEL_SEVERITIES teventSeverity Severity of Alert
4461 * @param unsigned long long teventStartTimestamp Time when this alert started
4463 * @returns pointer to the newly manufactured ::EVENT_THRESHOLD_CROSS. If the
4464 * event is not used it must be released using
4465 * ::evel_free_threshold_cross
4466 * @retval NULL Failed to create the event.
4467 *****************************************************************************/
4468 EVENT_THRESHOLD_CROSS * evel_new_threshold_cross(
4469 const char* ev_name, const char *ev_id,
4470 char * tcriticality,
4472 char * tthresholdCrossed,
4474 EVEL_EVENT_ACTION talertAction,
4475 char * talertDescription,
4476 EVEL_ALERT_TYPE talertType,
4477 unsigned long long tcollectionTimestamp,
4478 EVEL_SEVERITIES teventSeverity,
4479 unsigned long long teventStartTimestamp);
4481 /**************************************************************************//**
4482 * Free a Threshold cross event.
4484 * Free off the Threshold crossing event supplied. Will free all the contained allocated
4487 * @note It does not free the Threshold Cross itself, since that may be part of a
4489 *****************************************************************************/
4490 void evel_free_threshold_cross(EVENT_THRESHOLD_CROSS * const tcp);
4492 /**************************************************************************//**
4493 * Set the Event Type property of the Threshold Cross.
4495 * @note The property is treated as immutable: it is only valid to call
4496 * the setter once. However, we don't assert if the caller tries to
4497 * overwrite, just ignoring the update instead.
4499 * @param tcp Pointer to the ::EVENT_THRESHOLD_CROSS.
4500 * @param type The Event Type to be set. ASCIIZ string. The caller
4501 * does not need to preserve the value once the function
4503 *****************************************************************************/
4504 void evel_threshold_cross_type_set(EVENT_THRESHOLD_CROSS * const tcp, char * type);
4506 /**************************************************************************//**
4507 * Add an optional additional alertid value to Alert.
4509 * @param alertid Adds Alert ID
4510 *****************************************************************************/
4511 void evel_threshold_cross_alertid_add(EVENT_THRESHOLD_CROSS * const event,char * alertid);
4513 /**************************************************************************//**
4514 * Set the TCA probable Root cause.
4516 * @param sheader Possible root cause to Threshold
4517 *****************************************************************************/
4518 void evel_threshold_cross_possible_rootcause_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4519 /**************************************************************************//**
4520 * Set the TCA networking cause.
4522 * @param sheader Possible networking service value to Threshold
4523 *****************************************************************************/
4524 void evel_threshold_cross_networkservice_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4525 /**************************************************************************//**
4526 * Set the TCA Interface name.
4528 * @param sheader Interface name to threshold
4529 *****************************************************************************/
4530 void evel_threshold_cross_interfacename_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4531 /**************************************************************************//**
4532 * Set the TCA Data element type.
4534 * @param sheader element type of Threshold
4535 *****************************************************************************/
4536 void evel_threshold_cross_data_elementtype_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4537 /**************************************************************************//**
4538 * Set the TCA Data collector value.
4540 * @param sheader Data collector value
4541 *****************************************************************************/
4542 void evel_threshold_cross_data_collector_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4543 /**************************************************************************//**
4544 * Set the TCA alert value.
4546 * @param sheader Possible alert value
4547 *****************************************************************************/
4548 void evel_threshold_cross_alertvalue_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4550 /**************************************************************************//**
4551 * Add an additional field name/value pair to the THRESHOLD CROSS event.
4553 * The name and value are null delimited ASCII strings. The library takes
4554 * a copy so the caller does not have to preserve values after the function
4557 * @param state_change Pointer to the ::EVENT_THRESHOLD_CROSS.
4558 * @param name ASCIIZ string with the attribute's name. The caller
4559 * does not need to preserve the value once the function
4561 * @param value ASCIIZ string with the attribute's value. The caller
4562 * does not need to preserve the value once the function
4564 *****************************************************************************/
4565 void evel_threshold_cross_addl_info_add(EVENT_THRESHOLD_CROSS * const tcp,
4566 const char * const name,
4567 const char * const value);
4569 /*****************************************************************************/
4570 /*****************************************************************************/
4574 /*****************************************************************************/
4575 /*****************************************************************************/
4577 /*****************************************************************************/
4579 /*****************************************************************************/
4580 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4581 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4582 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4583 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4585 #define EVEL_ENTER() \
4587 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4588 debug_indent += 2; \
4590 #define EVEL_EXIT() \
4592 debug_indent -= 2; \
4593 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4596 #define INDENT_SEPARATORS \
4597 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4599 extern EVEL_LOG_LEVELS debug_level;
4600 extern int debug_indent;
4603 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4605 /**************************************************************************//**
4606 * Initialize logging
4608 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4609 * @param[in] ident The identifier for our logs.
4610 *****************************************************************************/
4611 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4613 /**************************************************************************//**
4614 * Log debug information
4616 * Logs debugging information in a platform independent manner.
4618 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4619 * @param[in] format Log formatting string in printf format.
4620 * @param[in] ... Variable argument list.
4621 *****************************************************************************/
4622 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4624 /***************************************************************************//*
4625 * Store the formatted string into the static error string and log the error.
4627 * @param format Error string in standard printf format.
4628 * @param ... Variable parameters to be substituted into the format string.
4629 *****************************************************************************/
4630 void log_error_state(char * format, ...);