1 /*************************************************************************//**
3 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 ****************************************************************************/
18 /**************************************************************************//**
20 * Header for EVEL library
22 * This file implements the EVEL library which is intended to provide a
23 * simple wrapper around the complexity of AT&T's Vendor Event Listener API so
24 * that VNFs can use it without worrying about details of the API transport.
26 * Zero return value is success (::EVEL_SUCCESS), non-zero is failure and will
27 * be one of ::EVEL_ERR_CODES.
28 *****************************************************************************/
43 #include "double_list.h"
44 #include "hashtable.h"
46 /*****************************************************************************/
47 /* Supported API version. */
48 /*****************************************************************************/
49 #define EVEL_API_MAJOR_VERSION 5
50 #define EVEL_API_MINOR_VERSION 0
52 /**************************************************************************//**
55 * Error codes for EVEL low level interface
56 *****************************************************************************/
58 EVEL_SUCCESS, /** The operation was successful. */
59 EVEL_ERR_GEN_FAIL, /** Non-specific failure. */
60 EVEL_CURL_LIBRARY_FAIL, /** A cURL library operation failed. */
61 EVEL_PTHREAD_LIBRARY_FAIL, /** A Posix threads operation failed. */
62 EVEL_OUT_OF_MEMORY, /** A memory allocation failure occurred. */
63 EVEL_EVENT_BUFFER_FULL, /** Too many events in the ring-buffer. */
64 EVEL_EVENT_HANDLER_INACTIVE, /** Attempt to raise event when inactive. */
65 EVEL_NO_METADATA, /** Failed to retrieve OpenStack metadata. */
66 EVEL_BAD_METADATA, /** OpenStack metadata invalid format. */
67 EVEL_BAD_JSON_FORMAT, /** JSON failed to parse correctly. */
68 EVEL_JSON_KEY_NOT_FOUND, /** Failed to find the specified JSON key. */
69 EVEL_MAX_ERROR_CODES /** Maximum number of valid error codes. */
72 /**************************************************************************//**
75 * Variable levels of verbosity in the logging functions.
76 *****************************************************************************/
86 /*****************************************************************************/
87 /* Maximum string lengths. */
88 /*****************************************************************************/
89 #define EVEL_MAX_STRING_LEN 4096
90 #define EVEL_MAX_JSON_BODY 524288
91 #define EVEL_MAX_ERROR_STRING_LEN 255
92 #define EVEL_MAX_URL_LEN 511
94 /**************************************************************************//**
95 * This value represents there being no restriction on the reporting interval.
96 *****************************************************************************/
97 static const int EVEL_MEASUREMENT_INTERVAL_UKNOWN = 0;
99 /**************************************************************************//**
100 * How many events can be backed-up before we start dropping events on the
103 * @note This value should be tuned in accordance with expected burstiness of
104 * the event load and the expected response time of the ECOMP event
105 * listener so that the probability of the buffer filling is suitably
107 *****************************************************************************/
108 static const int EVEL_EVENT_BUFFER_DEPTH = 100;
110 /*****************************************************************************/
111 /* How many different IP Types-of-Service are supported. */
112 /*****************************************************************************/
113 #define EVEL_TOS_SUPPORTED 256
115 /**************************************************************************//**
116 * Event domains for the various events we support.
117 * JSON equivalent field: domain
118 *****************************************************************************/
120 EVEL_DOMAIN_INTERNAL, /** Internal event, not for external routing. */
121 EVEL_DOMAIN_BATCH, /** Batch event, composite event. */
122 EVEL_DOMAIN_HEARTBEAT, /** A Heartbeat event (event header only). */
123 EVEL_DOMAIN_FAULT, /** A Fault event. */
124 EVEL_DOMAIN_MEASUREMENT, /** A Measurement for VF Scaling event. */
125 EVEL_DOMAIN_MOBILE_FLOW, /** A Mobile Flow event. */
126 EVEL_DOMAIN_REPORT, /** A Measurement for VF Reporting event. */
127 EVEL_DOMAIN_HEARTBEAT_FIELD,/** A Heartbeat field event. */
128 EVEL_DOMAIN_SIPSIGNALING, /** A Signaling event. */
129 EVEL_DOMAIN_STATE_CHANGE, /** A State Change event. */
130 EVEL_DOMAIN_SYSLOG, /** A Syslog event. */
131 EVEL_DOMAIN_OTHER, /** Another event. */
132 EVEL_DOMAIN_THRESHOLD_CROSS, /** A Threshold Crossing Event */
133 EVEL_DOMAIN_VOICE_QUALITY, /** A Voice Quality Event */
134 EVEL_MAX_DOMAINS /** Maximum number of recognized Event types. */
135 } EVEL_EVENT_DOMAINS;
137 /**************************************************************************//**
139 * JSON equivalent field: priority
140 *****************************************************************************/
143 EVEL_PRIORITY_MEDIUM,
144 EVEL_PRIORITY_NORMAL,
147 } EVEL_EVENT_PRIORITIES;
149 /**************************************************************************//**
150 * Fault / Threshold severities.
151 * JSON equivalent field: eventSeverity
152 *****************************************************************************/
154 EVEL_SEVERITY_CRITICAL,
157 EVEL_SEVERITY_WARNING,
158 EVEL_SEVERITY_NORMAL,
162 /**************************************************************************//**
163 * Fault source types.
164 * JSON equivalent field: eventSourceType
165 *****************************************************************************/
173 EVEL_SOURCE_SLOT_THRESHOLD,
174 EVEL_SOURCE_PORT_THRESHOLD,
175 EVEL_SOURCE_VIRTUAL_MACHINE,
176 EVEL_SOURCE_VIRTUAL_NETWORK_FUNCTION,
177 /***************************************************************************/
178 /* START OF VENDOR-SPECIFIC VALUES */
180 /* Vendor-specific values should be added here, and handled appropriately */
181 /* in evel_event.c. */
182 /***************************************************************************/
184 /***************************************************************************/
185 /* END OF VENDOR-SPECIFIC VALUES */
186 /***************************************************************************/
187 EVEL_MAX_SOURCE_TYPES
190 /**************************************************************************//**
192 * JSON equivalent field: vfStatus
193 *****************************************************************************/
195 EVEL_VF_STATUS_ACTIVE,
197 EVEL_VF_STATUS_PREP_TERMINATE,
198 EVEL_VF_STATUS_READY_TERMINATE,
199 EVEL_VF_STATUS_REQ_TERMINATE,
203 /**************************************************************************//**
204 * Counter criticalities.
205 * JSON equivalent field: criticality
206 *****************************************************************************/
208 EVEL_COUNTER_CRITICALITY_CRIT,
209 EVEL_COUNTER_CRITICALITY_MAJ,
210 EVEL_MAX_COUNTER_CRITICALITIES
211 } EVEL_COUNTER_CRITICALITIES;
213 /**************************************************************************//**
215 * JSON equivalent field: alertAction
216 *****************************************************************************/
218 EVEL_ALERT_ACTION_CLEAR,
219 EVEL_ALERT_ACTION_CONT,
220 EVEL_ALERT_ACTION_SET,
221 EVEL_MAX_ALERT_ACTIONS
222 } EVEL_ALERT_ACTIONS;
224 /**************************************************************************//**
226 * JSON equivalent field: alertType
227 *****************************************************************************/
229 EVEL_ALERT_TYPE_CARD,
230 EVEL_ALERT_TYPE_ELEMENT,
231 EVEL_ALERT_TYPE_INTERFACE,
232 EVEL_ALERT_TYPE_SERVICE,
236 /**************************************************************************//**
238 * JSON equivalent fields: newState, oldState
239 *****************************************************************************/
241 EVEL_ENTITY_STATE_IN_SERVICE,
242 EVEL_ENTITY_STATE_MAINTENANCE,
243 EVEL_ENTITY_STATE_OUT_OF_SERVICE,
244 EVEL_MAX_ENTITY_STATES
247 /**************************************************************************//**
249 * JSON equivalent field: syslogFacility
250 *****************************************************************************/
252 EVEL_SYSLOG_FACILITY_KERNEL,
253 EVEL_SYSLOG_FACILITY_USER,
254 EVEL_SYSLOG_FACILITY_MAIL,
255 EVEL_SYSLOG_FACILITY_SYSTEM_DAEMON,
256 EVEL_SYSLOG_FACILITY_SECURITY_AUTH,
257 EVEL_SYSLOG_FACILITY_INTERNAL,
258 EVEL_SYSLOG_FACILITY_LINE_PRINTER,
259 EVEL_SYSLOG_FACILITY_NETWORK_NEWS,
260 EVEL_SYSLOG_FACILITY_UUCP,
261 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON,
262 EVEL_SYSLOG_FACILITY_SECURITY_AUTH2,
263 EVEL_SYSLOG_FACILITY_FTP_DAEMON,
264 EVEL_SYSLOG_FACILITY_NTP,
265 EVEL_SYSLOG_FACILITY_LOG_AUDIT,
266 EVEL_SYSLOG_FACILITY_LOG_ALERT,
267 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON2,
268 EVEL_SYSLOG_FACILITY_LOCAL0,
269 EVEL_SYSLOG_FACILITY_LOCAL1,
270 EVEL_SYSLOG_FACILITY_LOCAL2,
271 EVEL_SYSLOG_FACILITY_LOCAL3,
272 EVEL_SYSLOG_FACILITY_LOCAL4,
273 EVEL_SYSLOG_FACILITY_LOCAL5,
274 EVEL_SYSLOG_FACILITY_LOCAL6,
275 EVEL_SYSLOG_FACILITY_LOCAL7,
276 EVEL_MAX_SYSLOG_FACILITIES
277 } EVEL_SYSLOG_FACILITIES;
279 /**************************************************************************//**
281 * JSON equivalent fields: tcpFlagCountList, tcpFlagList
282 *****************************************************************************/
296 /**************************************************************************//**
297 * Mobile QCI Classes of Service.
298 * JSON equivalent fields: mobileQciCosCountList, mobileQciCosList
299 *****************************************************************************/
302 /***************************************************************************/
303 /* UMTS Classes of Service. */
304 /***************************************************************************/
305 EVEL_QCI_COS_UMTS_CONVERSATIONAL,
306 EVEL_QCI_COS_UMTS_STREAMING,
307 EVEL_QCI_COS_UMTS_INTERACTIVE,
308 EVEL_QCI_COS_UMTS_BACKGROUND,
310 /***************************************************************************/
311 /* LTE Classes of Service. */
312 /***************************************************************************/
326 EVEL_MAX_QCI_COS_TYPES
327 } EVEL_QCI_COS_TYPES;
329 /**************************************************************************//**
330 * Service Event endpoint description
331 * JSON equivalent field: endpointDesc
332 *****************************************************************************/
334 EVEL_SERVICE_ENDPOINT_CALLEE,
335 EVEL_SERVICE_ENDPOINT_CALLER,
336 EVEL_MAX_SERVICE_ENDPOINT_DESC
337 } EVEL_SERVICE_ENDPOINT_DESC;
339 /**************************************************************************//**
340 * Boolean type for EVEL library.
341 *****************************************************************************/
347 /**************************************************************************//**
348 * Optional parameter holder for double.
349 *****************************************************************************/
350 typedef struct evel_option_double
354 } EVEL_OPTION_DOUBLE;
356 /**************************************************************************//**
357 * Optional parameter holder for string.
358 *****************************************************************************/
359 typedef struct evel_option_string
363 } EVEL_OPTION_STRING;
365 /**************************************************************************//**
366 * Optional parameter holder for int.
367 *****************************************************************************/
368 typedef struct evel_option_int
374 /**************************************************************************//**
375 * Optional parameter holder for unsigned long long.
376 *****************************************************************************/
377 typedef struct evel_option_ull
379 unsigned long long value;
383 /**************************************************************************//**
384 * Optional parameter holder for time_t.
385 *****************************************************************************/
386 typedef struct evel_option_time
392 /**************************************************************************//**
393 * enrichment fields for internal VES Event Listener service use only,
394 * not supplied by event sources
395 *****************************************************************************/
396 typedef struct internal_header_fields
400 } EVEL_OPTION_INTHEADER_FIELDS;
402 /*****************************************************************************/
403 /* Supported Common Event Header version. */
404 /*****************************************************************************/
405 #define EVEL_HEADER_MAJOR_VERSION 3
406 #define EVEL_HEADER_MINOR_VERSION 0
408 #define EVEL_BATCH_MAJOR_VERSION 1
409 #define EVEL_BATCH_MINOR_VERSION 0
410 /**************************************************************************//**
412 * JSON equivalent field: commonEventHeader
413 *****************************************************************************/
414 typedef struct event_header {
415 /***************************************************************************/
417 /***************************************************************************/
421 /***************************************************************************/
422 /* Mandatory fields */
423 /***************************************************************************/
424 EVEL_EVENT_DOMAINS event_domain;
428 char * reporting_entity_name;
429 EVEL_EVENT_PRIORITIES priority;
430 unsigned long long start_epoch_microsec;
431 unsigned long long last_epoch_microsec;
434 /***************************************************************************/
435 /* Optional fields */
436 /***************************************************************************/
437 EVEL_OPTION_STRING event_type;
438 EVEL_OPTION_STRING source_id;
439 EVEL_OPTION_STRING reporting_entity_id;
440 EVEL_OPTION_INTHEADER_FIELDS internal_field;
441 EVEL_OPTION_STRING nfcnaming_code;
442 EVEL_OPTION_STRING nfnaming_code;
447 /**************************************************************************//**
448 * Initialize a newly created event header.
450 * @param header Pointer to the header being initialized.
451 * @param eventname Eventname string
452 * @param eventid Event id : unique id for classification and analysis
453 * @param header Pointer to the header being initialized.
454 *****************************************************************************/
455 void evel_init_header_nameid(EVENT_HEADER * const header,const char *const eventname, const char *eventid);
457 /**************************************************************************//**
458 * Create a new Batch event.
460 * @note The mandatory fields on the Batch must be supplied to this factory
461 * function and are immutable once set. Optional fields have explicit
462 * setter functions, but again values may only be set once so that the
463 * Batch has immutable properties. At this time evename and eventid
464 * for batch events are set but not used in json encoding
465 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
466 * not used (i.e. posted) it must be released using ::evel_free_batch.
467 * @retval NULL Failed to create the event.
468 *****************************************************************************/
469 EVENT_HEADER * evel_new_batch(const char* ev_name, const char *ev_id);
472 /**************************************************************************//**
473 * Add an Event into Batch Event
475 * The name and value are null delimited ASCII strings. The library takes
476 * a copy so the caller does not have to preserve values after the function
479 * @param other Pointer to the Batch Event.
480 * @param jsonobj Pointer to additional Event
481 *****************************************************************************/
482 void evel_batch_add_event(EVENT_HEADER * batchev, EVENT_HEADER *child);
484 /**************************************************************************//**
487 * Free off the Batch supplied. Will free all the contained allocated memory.
489 * @note It does not free the Batch itself, since that may be part of a
491 *****************************************************************************/
492 void evel_free_batch(EVENT_HEADER * event);
494 /*****************************************************************************/
495 /* Supported Fault version. */
496 /*****************************************************************************/
497 #define EVEL_FAULT_MAJOR_VERSION 2
498 #define EVEL_FAULT_MINOR_VERSION 1
500 /**************************************************************************//**
502 * JSON equivalent field: faultFields
503 *****************************************************************************/
504 typedef struct event_fault {
505 /***************************************************************************/
506 /* Header and version */
507 /***************************************************************************/
512 /***************************************************************************/
513 /* Mandatory fields */
514 /***************************************************************************/
515 EVEL_SEVERITIES event_severity;
516 EVEL_SOURCE_TYPES event_source_type;
517 char * alarm_condition;
518 char * specific_problem;
519 EVEL_VF_STATUSES vf_status;
521 /***************************************************************************/
522 /* Optional fields */
523 /***************************************************************************/
524 EVEL_OPTION_STRING category;
525 EVEL_OPTION_STRING alarm_interface_a;
526 DLIST additional_info;
530 /**************************************************************************//**
531 * Fault Additional Info.
532 * JSON equivalent field: alarmAdditionalInformation
533 *****************************************************************************/
534 typedef struct fault_additional_info {
540 /**************************************************************************//**
541 * optional field block for fields specific to heartbeat events
542 *****************************************************************************/
543 typedef struct event_heartbeat_fields
545 /***************************************************************************/
546 /* Header and version */
547 /***************************************************************************/
552 /***************************************************************************/
553 /* Mandatory fields */
554 /***************************************************************************/
555 double heartbeat_version;
556 int heartbeat_interval;
558 /***************************************************************************/
559 /* Optional fields */
560 /***************************************************************************/
561 DLIST additional_info;
563 } EVENT_HEARTBEAT_FIELD;
565 /**************************************************************************//**
566 * tuple which provides the name of a key along with its value and
568 *****************************************************************************/
569 typedef struct internal_key
572 EVEL_OPTION_INT keyorder;
573 EVEL_OPTION_STRING keyvalue;
576 /**************************************************************************//**
577 * meta-information about an instance of a jsonObject along with
578 * the actual object instance
579 *****************************************************************************/
580 typedef struct json_object_instance
584 unsigned long long objinst_epoch_microsec;
585 DLIST object_keys; /*EVEL_INTERNAL_KEY list */
587 } EVEL_JSON_OBJECT_INSTANCE;
588 #define MAX_JSON_TOKENS 128
589 /**************************************************************************//**
590 * Create a new json object instance.
592 * @note The mandatory fields on the Other must be supplied to this factory
593 * function and are immutable once set. Optional fields have explicit
594 * setter functions, but again values may only be set once so that the
595 * Other has immutable properties.
596 * @param yourjson json string.
597 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT_INSTANCE.
598 * not used (i.e. posted) it must be released using ::evel_free_jsonobjectinstance.
599 * @retval NULL Failed to create the json object instance.
600 *****************************************************************************/
601 EVEL_JSON_OBJECT_INSTANCE * evel_new_jsonobjinstance(const char *const yourjson);
602 /**************************************************************************//**
603 * Free an json object instance.
605 * Free off the json object instance supplied.
606 * Will free all the contained allocated memory.
608 *****************************************************************************/
609 void evel_free_jsonobjinst(EVEL_JSON_OBJECT_INSTANCE * objinst);
611 /**************************************************************************//**
612 * enrichment fields for internal VES Event Listener service use only,
613 * not supplied by event sources
614 *****************************************************************************/
615 typedef struct json_object
619 EVEL_OPTION_STRING objectschema;
620 EVEL_OPTION_STRING objectschemaurl;
621 EVEL_OPTION_STRING nfsubscribedobjname;
622 EVEL_OPTION_STRING nfsubscriptionid;
623 DLIST jsonobjectinstances; /* EVEL_JSON_OBJECT_INSTANCE list */
627 /**************************************************************************//**
628 * Create a new json object.
630 * @note The mandatory fields on the Other must be supplied to this factory
631 * function and are immutable once set. Optional fields have explicit
632 * setter functions, but again values may only be set once so that the
633 * Other has immutable properties.
634 * @param name name of the object.
635 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT.
636 * not used (i.e. posted) it must be released using ::evel_free_jsonobject.
637 * @retval NULL Failed to create the json object.
638 *****************************************************************************/
639 EVEL_JSON_OBJECT * evel_new_jsonobject(const char *const name);
640 /**************************************************************************//**
641 * Free an json object.
643 * Free off the json object instance supplied.
644 * Will free all the contained allocated memory.
646 *****************************************************************************/
647 void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj);
648 /*****************************************************************************/
649 /* Supported Measurement version. */
650 /*****************************************************************************/
651 #define EVEL_MEASUREMENT_MAJOR_VERSION 2
652 #define EVEL_MEASUREMENT_MINOR_VERSION 1
654 /**************************************************************************//**
656 * JSON equivalent field: errors
657 *****************************************************************************/
658 typedef struct measurement_errors {
659 int receive_discards;
661 int transmit_discards;
663 } MEASUREMENT_ERRORS;
665 /**************************************************************************//**
667 * JSON equivalent field: measurementsForVfScalingFields
668 *****************************************************************************/
669 typedef struct event_measurement {
670 /***************************************************************************/
671 /* Header and version */
672 /***************************************************************************/
677 /***************************************************************************/
678 /* Mandatory fields */
679 /***************************************************************************/
680 double measurement_interval;
682 /***************************************************************************/
683 /* Optional fields */
684 /***************************************************************************/
685 DLIST additional_info;
686 DLIST additional_measurements;
687 DLIST additional_objects;
689 EVEL_OPTION_INT concurrent_sessions;
690 EVEL_OPTION_INT configured_entities;
693 MEASUREMENT_ERRORS * errors;
695 DLIST filesystem_usage;
696 DLIST latency_distribution;
697 EVEL_OPTION_DOUBLE mean_request_latency;
699 EVEL_OPTION_INT media_ports_in_use;
700 EVEL_OPTION_INT request_rate;
701 EVEL_OPTION_INT vnfc_scaling_metric;
706 /**************************************************************************//**
708 * JSON equivalent field: cpuUsage
709 *****************************************************************************/
710 typedef struct measurement_cpu_use {
713 EVEL_OPTION_DOUBLE idle;
714 EVEL_OPTION_DOUBLE intrpt;
715 EVEL_OPTION_DOUBLE nice;
716 EVEL_OPTION_DOUBLE softirq;
717 EVEL_OPTION_DOUBLE steal;
718 EVEL_OPTION_DOUBLE sys;
719 EVEL_OPTION_DOUBLE user;
720 EVEL_OPTION_DOUBLE wait;
721 } MEASUREMENT_CPU_USE;
724 /**************************************************************************//**
726 * JSON equivalent field: diskUsage
727 *****************************************************************************/
728 typedef struct measurement_disk_use {
730 EVEL_OPTION_DOUBLE iotimeavg;
731 EVEL_OPTION_DOUBLE iotimelast;
732 EVEL_OPTION_DOUBLE iotimemax;
733 EVEL_OPTION_DOUBLE iotimemin;
734 EVEL_OPTION_DOUBLE mergereadavg;
735 EVEL_OPTION_DOUBLE mergereadlast;
736 EVEL_OPTION_DOUBLE mergereadmax;
737 EVEL_OPTION_DOUBLE mergereadmin;
738 EVEL_OPTION_DOUBLE mergewriteavg;
739 EVEL_OPTION_DOUBLE mergewritelast;
740 EVEL_OPTION_DOUBLE mergewritemax;
741 EVEL_OPTION_DOUBLE mergewritemin;
742 EVEL_OPTION_DOUBLE octetsreadavg;
743 EVEL_OPTION_DOUBLE octetsreadlast;
744 EVEL_OPTION_DOUBLE octetsreadmax;
745 EVEL_OPTION_DOUBLE octetsreadmin;
746 EVEL_OPTION_DOUBLE octetswriteavg;
747 EVEL_OPTION_DOUBLE octetswritelast;
748 EVEL_OPTION_DOUBLE octetswritemax;
749 EVEL_OPTION_DOUBLE octetswritemin;
750 EVEL_OPTION_DOUBLE opsreadavg;
751 EVEL_OPTION_DOUBLE opsreadlast;
752 EVEL_OPTION_DOUBLE opsreadmax;
753 EVEL_OPTION_DOUBLE opsreadmin;
754 EVEL_OPTION_DOUBLE opswriteavg;
755 EVEL_OPTION_DOUBLE opswritelast;
756 EVEL_OPTION_DOUBLE opswritemax;
757 EVEL_OPTION_DOUBLE opswritemin;
758 EVEL_OPTION_DOUBLE pendingopsavg;
759 EVEL_OPTION_DOUBLE pendingopslast;
760 EVEL_OPTION_DOUBLE pendingopsmax;
761 EVEL_OPTION_DOUBLE pendingopsmin;
762 EVEL_OPTION_DOUBLE timereadavg;
763 EVEL_OPTION_DOUBLE timereadlast;
764 EVEL_OPTION_DOUBLE timereadmax;
765 EVEL_OPTION_DOUBLE timereadmin;
766 EVEL_OPTION_DOUBLE timewriteavg;
767 EVEL_OPTION_DOUBLE timewritelast;
768 EVEL_OPTION_DOUBLE timewritemax;
769 EVEL_OPTION_DOUBLE timewritemin;
771 } MEASUREMENT_DISK_USE;
773 /**************************************************************************//**
774 * Add an additional Disk usage value name/value pair to the Measurement.
776 * The name and value are null delimited ASCII strings. The library takes
777 * a copy so the caller does not have to preserve values after the function
780 * @param measurement Pointer to the measurement.
781 * @param id ASCIIZ string with the CPU's identifier.
782 * @param usage Disk utilization.
783 *****************************************************************************/
784 MEASUREMENT_DISK_USE * evel_measurement_new_disk_use_add(EVENT_MEASUREMENT * measurement, char * id);
786 /**************************************************************************//**
788 * JSON equivalent field: filesystemUsage
789 *****************************************************************************/
790 typedef struct measurement_fsys_use {
791 char * filesystem_name;
792 double block_configured;
795 double ephemeral_configured;
796 double ephemeral_iops;
797 double ephemeral_used;
798 } MEASUREMENT_FSYS_USE;
800 /**************************************************************************//**
802 * JSON equivalent field: memoryUsage
803 *****************************************************************************/
804 typedef struct measurement_mem_use {
808 EVEL_OPTION_DOUBLE memcache;
809 EVEL_OPTION_DOUBLE memconfig;
810 EVEL_OPTION_DOUBLE memfree;
811 EVEL_OPTION_DOUBLE slabrecl;
812 EVEL_OPTION_DOUBLE slabunrecl;
813 EVEL_OPTION_DOUBLE memused;
814 } MEASUREMENT_MEM_USE;
816 /**************************************************************************//**
817 * Add an additional Memory usage value name/value pair to the Measurement.
819 * The name and value are null delimited ASCII strings. The library takes
820 * a copy so the caller does not have to preserve values after the function
823 * @param measurement Pointer to the measurement.
824 * @param id ASCIIZ string with the Memory identifier.
825 * @param vmidentifier ASCIIZ string with the VM's identifier.
826 * @param membuffsz Memory Size.
828 * @return Returns pointer to memory use structure in measurements
829 *****************************************************************************/
830 MEASUREMENT_MEM_USE * evel_measurement_new_mem_use_add(EVENT_MEASUREMENT * measurement,
831 char * id, char *vmidentifier, double membuffsz);
833 /**************************************************************************//**
834 * Set kilobytes of memory used for cache
836 * @note The property is treated as immutable: it is only valid to call
837 * the setter once. However, we don't assert if the caller tries to
838 * overwrite, just ignoring the update instead.
840 * @param mem_use Pointer to the Memory Use.
842 *****************************************************************************/
843 void evel_measurement_mem_use_memcache_set(MEASUREMENT_MEM_USE * const mem_use,
845 /**************************************************************************//**
846 * Set kilobytes of memory configured in the virtual machine on which the VNFC reporting
848 * @note The property is treated as immutable: it is only valid to call
849 * the setter once. However, we don't assert if the caller tries to
850 * overwrite, just ignoring the update instead.
852 * @param mem_use Pointer to the Memory Use.
854 *****************************************************************************/
855 void evel_measurement_mem_use_memconfig_set(MEASUREMENT_MEM_USE * const mem_use,
857 /**************************************************************************//**
858 * Set kilobytes of physical RAM left unused by the system
860 * @note The property is treated as immutable: it is only valid to call
861 * the setter once. However, we don't assert if the caller tries to
862 * overwrite, just ignoring the update instead.
864 * @param mem_use Pointer to the Memory Use.
866 *****************************************************************************/
867 void evel_measurement_mem_use_memfree_set(MEASUREMENT_MEM_USE * const mem_use,
869 /**************************************************************************//**
870 * Set the part of the slab that can be reclaimed such as caches measured in kilobytes
872 * @note The property is treated as immutable: it is only valid to call
873 * the setter once. However, we don't assert if the caller tries to
874 * overwrite, just ignoring the update instead.
876 * @param mem_use Pointer to the Memory Use.
878 *****************************************************************************/
879 void evel_measurement_mem_use_slab_reclaimed_set(MEASUREMENT_MEM_USE * const mem_use,
881 /**************************************************************************//**
882 * Set the part of the slab that cannot be reclaimed such as caches measured in kilobytes
884 * @note The property is treated as immutable: it is only valid to call
885 * the setter once. However, we don't assert if the caller tries to
886 * overwrite, just ignoring the update instead.
888 * @param mem_use Pointer to the Memory Use.
890 *****************************************************************************/
891 void evel_measurement_mem_use_slab_unreclaimable_set(MEASUREMENT_MEM_USE * const mem_use,
893 /**************************************************************************//**
894 * Set the total memory minus the sum of free, buffered, cached and slab memory in kilobytes
896 * @note The property is treated as immutable: it is only valid to call
897 * the setter once. However, we don't assert if the caller tries to
898 * overwrite, just ignoring the update instead.
900 * @param mem_use Pointer to the Memory Use.
902 *****************************************************************************/
903 void evel_measurement_mem_use_usedup_set(MEASUREMENT_MEM_USE * const mem_use,
905 /**************************************************************************//**
907 * JSON equivalent field: latencyBucketMeasure
908 *****************************************************************************/
909 typedef struct measurement_latency_bucket {
912 /***************************************************************************/
913 /* Optional fields */
914 /***************************************************************************/
915 EVEL_OPTION_DOUBLE high_end;
916 EVEL_OPTION_DOUBLE low_end;
918 } MEASUREMENT_LATENCY_BUCKET;
920 /**************************************************************************//**
922 * JSON equivalent field: vNicUsage
923 *****************************************************************************/
924 typedef struct measurement_vnic_performance {
925 /***************************************************************************/
926 /* Optional fields */
927 /***************************************************************************/
928 /*Cumulative count of broadcast packets received as read at the end of
929 the measurement interval*/
930 EVEL_OPTION_DOUBLE recvd_bcast_packets_acc;
931 /*Count of broadcast packets received within the measurement interval*/
932 EVEL_OPTION_DOUBLE recvd_bcast_packets_delta;
933 /*Cumulative count of discarded packets received as read at the end of
934 the measurement interval*/
935 EVEL_OPTION_DOUBLE recvd_discarded_packets_acc;
936 /*Count of discarded packets received within the measurement interval*/
937 EVEL_OPTION_DOUBLE recvd_discarded_packets_delta;
938 /*Cumulative count of error packets received as read at the end of
939 the measurement interval*/
940 EVEL_OPTION_DOUBLE recvd_error_packets_acc;
941 /*Count of error packets received within the measurement interval*/
942 EVEL_OPTION_DOUBLE recvd_error_packets_delta;
943 /*Cumulative count of multicast packets received as read at the end of
944 the measurement interval*/
945 EVEL_OPTION_DOUBLE recvd_mcast_packets_acc;
946 /*Count of mcast packets received within the measurement interval*/
947 EVEL_OPTION_DOUBLE recvd_mcast_packets_delta;
948 /*Cumulative count of octets received as read at the end of
949 the measurement interval*/
950 EVEL_OPTION_DOUBLE recvd_octets_acc;
951 /*Count of octets received within the measurement interval*/
952 EVEL_OPTION_DOUBLE recvd_octets_delta;
953 /*Cumulative count of all packets received as read at the end of
954 the measurement interval*/
955 EVEL_OPTION_DOUBLE recvd_total_packets_acc;
956 /*Count of all packets received within the measurement interval*/
957 EVEL_OPTION_DOUBLE recvd_total_packets_delta;
958 /*Cumulative count of unicast packets received as read at the end of
959 the measurement interval*/
960 EVEL_OPTION_DOUBLE recvd_ucast_packets_acc;
961 /*Count of unicast packets received within the measurement interval*/
962 EVEL_OPTION_DOUBLE recvd_ucast_packets_delta;
963 /*Cumulative count of transmitted broadcast packets at the end of
964 the measurement interval*/
965 EVEL_OPTION_DOUBLE tx_bcast_packets_acc;
966 /*Count of transmitted broadcast packets within the measurement interval*/
967 EVEL_OPTION_DOUBLE tx_bcast_packets_delta;
968 /*Cumulative count of transmit discarded packets at the end of
969 the measurement interval*/
970 EVEL_OPTION_DOUBLE tx_discarded_packets_acc;
971 /*Count of transmit discarded packets within the measurement interval*/
972 EVEL_OPTION_DOUBLE tx_discarded_packets_delta;
973 /*Cumulative count of transmit error packets at the end of
974 the measurement interval*/
975 EVEL_OPTION_DOUBLE tx_error_packets_acc;
976 /*Count of transmit error packets within the measurement interval*/
977 EVEL_OPTION_DOUBLE tx_error_packets_delta;
978 /*Cumulative count of transmit multicast packets at the end of
979 the measurement interval*/
980 EVEL_OPTION_DOUBLE tx_mcast_packets_acc;
981 /*Count of transmit multicast packets within the measurement interval*/
982 EVEL_OPTION_DOUBLE tx_mcast_packets_delta;
983 /*Cumulative count of transmit octets at the end of
984 the measurement interval*/
985 EVEL_OPTION_DOUBLE tx_octets_acc;
986 /*Count of transmit octets received within the measurement interval*/
987 EVEL_OPTION_DOUBLE tx_octets_delta;
988 /*Cumulative count of all transmit packets at the end of
989 the measurement interval*/
990 EVEL_OPTION_DOUBLE tx_total_packets_acc;
991 /*Count of transmit packets within the measurement interval*/
992 EVEL_OPTION_DOUBLE tx_total_packets_delta;
993 /*Cumulative count of all transmit unicast packets at the end of
994 the measurement interval*/
995 EVEL_OPTION_DOUBLE tx_ucast_packets_acc;
996 /*Count of transmit unicast packets within the measurement interval*/
997 EVEL_OPTION_DOUBLE tx_ucast_packets_delta;
998 /* Indicates whether vNicPerformance values are likely inaccurate
999 due to counter overflow or other condtions*/
1000 char *valuesaresuspect;
1003 } MEASUREMENT_VNIC_PERFORMANCE;
1005 /**************************************************************************//**
1007 * JSON equivalent field: codecsInUse
1008 *****************************************************************************/
1009 typedef struct measurement_codec_use {
1012 } MEASUREMENT_CODEC_USE;
1014 /**************************************************************************//**
1016 * JSON equivalent field: featuresInUse
1017 *****************************************************************************/
1018 typedef struct measurement_feature_use {
1020 int feature_utilization;
1021 } MEASUREMENT_FEATURE_USE;
1023 /**************************************************************************//**
1024 * Measurement Group.
1025 * JSON equivalent field: additionalMeasurements
1026 *****************************************************************************/
1027 typedef struct measurement_group {
1030 } MEASUREMENT_GROUP;
1032 /**************************************************************************//**
1033 * Custom Defined Measurement.
1034 * JSON equivalent field: measurements
1035 *****************************************************************************/
1036 typedef struct custom_measurement {
1039 } CUSTOM_MEASUREMENT;
1041 /*****************************************************************************/
1042 /* Supported Report version. */
1043 /*****************************************************************************/
1044 #define EVEL_REPORT_MAJOR_VERSION 1
1045 #define EVEL_REPORT_MINOR_VERSION 1
1047 /**************************************************************************//**
1049 * JSON equivalent field: measurementsForVfReportingFields
1051 * @note This is an experimental event type and is not currently a formal part
1052 * of AT&T's specification.
1053 *****************************************************************************/
1054 typedef struct event_report {
1055 /***************************************************************************/
1056 /* Header and version */
1057 /***************************************************************************/
1058 EVENT_HEADER header;
1062 /***************************************************************************/
1063 /* Mandatory fields */
1064 /***************************************************************************/
1065 double measurement_interval;
1067 /***************************************************************************/
1068 /* Optional fields */
1069 /***************************************************************************/
1070 DLIST feature_usage;
1071 DLIST measurement_groups;
1075 /**************************************************************************//**
1076 * Mobile GTP Per Flow Metrics.
1077 * JSON equivalent field: gtpPerFlowMetrics
1078 *****************************************************************************/
1079 typedef struct mobile_gtp_per_flow_metrics {
1080 double avg_bit_error_rate;
1081 double avg_packet_delay_variation;
1082 int avg_packet_latency;
1083 int avg_receive_throughput;
1084 int avg_transmit_throughput;
1085 int flow_activation_epoch;
1086 int flow_activation_microsec;
1087 int flow_deactivation_epoch;
1088 int flow_deactivation_microsec;
1089 time_t flow_deactivation_time;
1091 int max_packet_delay_variation;
1092 int num_activation_failures;
1094 int num_bytes_received;
1095 int num_bytes_transmitted;
1096 int num_dropped_packets;
1097 int num_l7_bytes_received;
1098 int num_l7_bytes_transmitted;
1099 int num_lost_packets;
1100 int num_out_of_order_packets;
1101 int num_packet_errors;
1102 int num_packets_received_excl_retrans;
1103 int num_packets_received_incl_retrans;
1104 int num_packets_transmitted_incl_retrans;
1107 int num_tunneled_l7_bytes_received;
1108 int round_trip_time;
1109 int time_to_first_byte;
1111 /***************************************************************************/
1112 /* Optional fields */
1113 /***************************************************************************/
1114 EVEL_OPTION_INT ip_tos_counts[EVEL_TOS_SUPPORTED];
1115 EVEL_OPTION_INT tcp_flag_counts[EVEL_MAX_TCP_FLAGS];
1116 EVEL_OPTION_INT qci_cos_counts[EVEL_MAX_QCI_COS_TYPES];
1117 EVEL_OPTION_INT dur_connection_failed_status;
1118 EVEL_OPTION_INT dur_tunnel_failed_status;
1119 EVEL_OPTION_STRING flow_activated_by;
1120 EVEL_OPTION_TIME flow_activation_time;
1121 EVEL_OPTION_STRING flow_deactivated_by;
1122 EVEL_OPTION_STRING gtp_connection_status;
1123 EVEL_OPTION_STRING gtp_tunnel_status;
1124 EVEL_OPTION_INT large_packet_rtt;
1125 EVEL_OPTION_DOUBLE large_packet_threshold;
1126 EVEL_OPTION_INT max_receive_bit_rate;
1127 EVEL_OPTION_INT max_transmit_bit_rate;
1128 EVEL_OPTION_INT num_gtp_echo_failures;
1129 EVEL_OPTION_INT num_gtp_tunnel_errors;
1130 EVEL_OPTION_INT num_http_errors;
1132 } MOBILE_GTP_PER_FLOW_METRICS;
1134 /*****************************************************************************/
1135 /* Supported Mobile Flow version. */
1136 /*****************************************************************************/
1137 #define EVEL_MOBILE_FLOW_MAJOR_VERSION 2
1138 #define EVEL_MOBILE_FLOW_MINOR_VERSION 0
1140 /**************************************************************************//**
1142 * JSON equivalent field: mobileFlow
1143 *****************************************************************************/
1144 typedef struct event_mobile_flow {
1145 /***************************************************************************/
1146 /* Header and version */
1147 /***************************************************************************/
1148 EVENT_HEADER header;
1152 /***************************************************************************/
1153 /* Mandatory fields */
1154 /***************************************************************************/
1155 char * flow_direction;
1156 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics;
1157 char * ip_protocol_type;
1159 char * other_endpoint_ip_address;
1160 int other_endpoint_port;
1161 char * reporting_endpoint_ip_addr;
1162 int reporting_endpoint_port;
1163 DLIST additional_info; /* JSON: additionalFields */
1165 /***************************************************************************/
1166 /* Optional fields */
1167 /***************************************************************************/
1168 EVEL_OPTION_STRING application_type;
1169 EVEL_OPTION_STRING app_protocol_type;
1170 EVEL_OPTION_STRING app_protocol_version;
1171 EVEL_OPTION_STRING cid;
1172 EVEL_OPTION_STRING connection_type;
1173 EVEL_OPTION_STRING ecgi;
1174 EVEL_OPTION_STRING gtp_protocol_type;
1175 EVEL_OPTION_STRING gtp_version;
1176 EVEL_OPTION_STRING http_header;
1177 EVEL_OPTION_STRING imei;
1178 EVEL_OPTION_STRING imsi;
1179 EVEL_OPTION_STRING lac;
1180 EVEL_OPTION_STRING mcc;
1181 EVEL_OPTION_STRING mnc;
1182 EVEL_OPTION_STRING msisdn;
1183 EVEL_OPTION_STRING other_functional_role;
1184 EVEL_OPTION_STRING rac;
1185 EVEL_OPTION_STRING radio_access_technology;
1186 EVEL_OPTION_STRING sac;
1187 EVEL_OPTION_INT sampling_algorithm;
1188 EVEL_OPTION_STRING tac;
1189 EVEL_OPTION_STRING tunnel_id;
1190 EVEL_OPTION_STRING vlan_id;
1192 } EVENT_MOBILE_FLOW;
1194 /*****************************************************************************/
1195 /* Supported Other field version. */
1196 /*****************************************************************************/
1197 #define EVEL_OTHER_EVENT_MAJOR_VERSION 1
1198 #define EVEL_OTHER_EVENT_MINOR_VERSION 1
1200 /**************************************************************************//**
1202 * JSON equivalent field: otherFields
1203 *****************************************************************************/
1204 typedef struct event_other {
1205 EVENT_HEADER header;
1209 HASHTABLE_T *namedarrays; /* HASHTABLE_T */
1210 DLIST jsonobjects; /* DLIST of EVEL_JSON_OBJECT */
1214 /**************************************************************************//**
1216 * JSON equivalent field: otherFields
1217 *****************************************************************************/
1218 typedef struct other_field {
1224 /*****************************************************************************/
1225 /* Supported Service Events version. */
1226 /*****************************************************************************/
1227 #define EVEL_HEARTBEAT_FIELD_MAJOR_VERSION 1
1228 #define EVEL_HEARTBEAT_FIELD_MINOR_VERSION 1
1231 /*****************************************************************************/
1232 /* Supported Signaling version. */
1233 /*****************************************************************************/
1234 #define EVEL_SIGNALING_MAJOR_VERSION 1
1235 #define EVEL_SIGNALING_MINOR_VERSION 0
1237 /**************************************************************************//**
1238 * Vendor VNF Name fields.
1239 * JSON equivalent field: vendorVnfNameFields
1240 *****************************************************************************/
1241 typedef struct vendor_vnfname_field {
1243 EVEL_OPTION_STRING vfmodule;
1244 EVEL_OPTION_STRING vnfname;
1245 } VENDOR_VNFNAME_FIELD;
1247 /**************************************************************************//**
1249 * JSON equivalent field: signalingFields
1250 *****************************************************************************/
1251 typedef struct event_signaling {
1252 /***************************************************************************/
1253 /* Header and version */
1254 /***************************************************************************/
1255 EVENT_HEADER header;
1259 /***************************************************************************/
1260 /* Mandatory fields */
1261 /***************************************************************************/
1262 VENDOR_VNFNAME_FIELD vnfname_field;
1263 EVEL_OPTION_STRING correlator; /* JSON: correlator */
1264 EVEL_OPTION_STRING local_ip_address; /* JSON: localIpAddress */
1265 EVEL_OPTION_STRING local_port; /* JSON: localPort */
1266 EVEL_OPTION_STRING remote_ip_address; /* JSON: remoteIpAddress */
1267 EVEL_OPTION_STRING remote_port; /* JSON: remotePort */
1269 /***************************************************************************/
1270 /* Optional fields */
1271 /***************************************************************************/
1272 EVEL_OPTION_STRING compressed_sip; /* JSON: compressedSip */
1273 EVEL_OPTION_STRING summary_sip; /* JSON: summarySip */
1274 DLIST additional_info;
1278 /**************************************************************************//**
1279 * Sgnaling Additional Field.
1280 * JSON equivalent field: additionalFields
1281 *****************************************************************************/
1282 typedef struct signaling_additional_field {
1285 } SIGNALING_ADDL_FIELD;
1287 /*****************************************************************************/
1288 /* Supported State Change version. */
1289 /*****************************************************************************/
1290 #define EVEL_STATE_CHANGE_MAJOR_VERSION 1
1291 #define EVEL_STATE_CHANGE_MINOR_VERSION 2
1293 /**************************************************************************//**
1295 * JSON equivalent field: stateChangeFields
1296 *****************************************************************************/
1297 typedef struct event_state_change {
1298 /***************************************************************************/
1299 /* Header and version */
1300 /***************************************************************************/
1301 EVENT_HEADER header;
1305 /***************************************************************************/
1306 /* Mandatory fields */
1307 /***************************************************************************/
1308 EVEL_ENTITY_STATE new_state;
1309 EVEL_ENTITY_STATE old_state;
1310 char * state_interface;
1313 /***************************************************************************/
1314 /* Optional fields */
1315 /***************************************************************************/
1316 DLIST additional_fields;
1318 } EVENT_STATE_CHANGE;
1320 /**************************************************************************//**
1321 * State Change Additional Field.
1322 * JSON equivalent field: additionalFields
1323 *****************************************************************************/
1324 typedef struct state_change_additional_field {
1327 } STATE_CHANGE_ADDL_FIELD;
1329 /*****************************************************************************/
1330 /* Supported Syslog version. */
1331 /*****************************************************************************/
1332 #define EVEL_SYSLOG_MAJOR_VERSION 3
1333 #define EVEL_SYSLOG_MINOR_VERSION 0
1335 /**************************************************************************//**
1337 * JSON equivalent field: syslogFields
1338 *****************************************************************************/
1339 typedef struct event_syslog {
1340 /***************************************************************************/
1341 /* Header and version */
1342 /***************************************************************************/
1343 EVENT_HEADER header;
1347 /***************************************************************************/
1348 /* Mandatory fields */
1349 /***************************************************************************/
1350 EVEL_SOURCE_TYPES event_source_type;
1354 /***************************************************************************/
1355 /* Optional fields */
1356 /***************************************************************************/
1357 EVEL_OPTION_STRING additional_filters;
1358 EVEL_OPTION_STRING event_source_host;
1359 EVEL_OPTION_INT syslog_facility;
1360 EVEL_OPTION_INT syslog_priority;
1361 EVEL_OPTION_STRING syslog_proc;
1362 EVEL_OPTION_INT syslog_proc_id;
1363 EVEL_OPTION_STRING syslog_s_data;
1364 EVEL_OPTION_STRING syslog_sdid;
1365 EVEL_OPTION_STRING syslog_severity;
1367 EVEL_OPTION_INT syslog_ver;
1371 /**************************************************************************//**
1373 * JSON equivalent object: attCopyrightNotice
1374 *****************************************************************************/
1375 typedef struct copyright {
1376 char * useAndRedistribution;
1381 char * disclaimerLine1;
1382 char * disclaimerLine2;
1383 char * disclaimerLine3;
1384 char * disclaimerLine4;
1387 /**************************************************************************//**
1388 * Library initialization.
1390 * Initialize the EVEL library.
1392 * @note This function initializes the cURL library. Applications making use
1393 * of libcurl may need to pull the initialization out of here. Note
1394 * also that this function is not threadsafe as a result - refer to
1395 * libcurl's API documentation for relevant warnings.
1397 * @sa Matching Term function.
1399 * @param fqdn The API's FQDN or IP address.
1400 * @param port The API's port.
1401 * @param path The optional path (may be NULL).
1402 * @param topic The optional topic part of the URL (may be NULL).
1403 * @param ring_buf_size Ring buffer size (>=100) ~ Avg Messages in 1hr
1404 * @param secure Whether to use HTTPS (0=HTTP, 1=HTTPS).
1405 * @param cert_file_path Path to client certificate file
1406 * @param key_file_path Path to client key file
1407 * @param ca_info Path to CA info
1408 * @param ca_file_path Path to CA file
1409 * @param verify_peer SSL verification of peer 0 or 1
1410 * @param verify_host SSL verification of host 0 or 1
1411 * @param username Username for Basic Authentication of requests.
1412 * @param password Password for Basic Authentication of requests.
1413 * @param source_ip The ip of node we represent.(NULL for default ip)
1414 * @param source_type The kind of node we represent.
1415 * @param role The role this node undertakes.
1416 * @param verbosity 0 for normal operation, positive values for chattier
1419 * @returns Status code
1420 * @retval EVEL_SUCCESS On success
1421 * @retval ::EVEL_ERR_CODES On failure.
1422 *****************************************************************************/
1423 EVEL_ERR_CODES evel_initialize(const char * const fqdn,
1425 const char * const path,
1426 const char * const topic,
1429 const char * const cert_file_path,
1430 const char * const key_file_path,
1431 const char * const ca_info,
1432 const char * const ca_file_path,
1435 const char * const username,
1436 const char * const password,
1437 const char * const source_ip,
1438 EVEL_SOURCE_TYPES source_type,
1439 const char * const role,
1443 /**************************************************************************//**
1444 * Clean up the EVEL library.
1446 * @note that at present don't expect Init/Term cycling not to leak memory!
1448 * @returns Status code
1449 * @retval EVEL_SUCCESS On success
1450 * @retval "One of ::EVEL_ERR_CODES" On failure.
1451 *****************************************************************************/
1452 EVEL_ERR_CODES evel_terminate(void);
1454 EVEL_ERR_CODES evel_post_event(EVENT_HEADER * event);
1455 const char * evel_error_string(void);
1458 /**************************************************************************//**
1461 * Free off the event supplied. Will free all the contained allocated memory.
1463 * @note It is safe to free a NULL pointer.
1464 *****************************************************************************/
1465 void evel_free_event(void * event);
1467 /**************************************************************************//**
1468 * Encode the event as a JSON event object according to AT&T's schema.
1470 * @param json Pointer to where to store the JSON encoded data.
1471 * @param mode Event mode or Batch mode
1472 * @param max_size Size of storage available in json_body.
1473 * @param event Pointer to the ::EVENT_HEADER to encode.
1474 * @returns Number of bytes actually written.
1475 *****************************************************************************/
1476 int evel_json_encode_event(char * json,
1478 EVENT_HEADER * event);
1479 int evel_json_encode_batch_event(char * json,
1481 EVENT_HEADER * event);
1482 /**************************************************************************//**
1483 * Initialize an event instance id.
1485 * @param vfield Pointer to the event vnfname field being initialized.
1486 * @param vendor_id The vendor id to encode in the event instance id.
1487 * @param event_id The event id to encode in the event instance id.
1488 *****************************************************************************/
1489 void evel_init_vendor_field(VENDOR_VNFNAME_FIELD * const vfield,
1490 const char * const vendor_name);
1492 /**************************************************************************//**
1493 * Set the Vendor module property of the Vendor.
1495 * @note The property is treated as immutable: it is only valid to call
1496 * the setter once. However, we don't assert if the caller tries to
1497 * overwrite, just ignoring the update instead.
1499 * @param vfield Pointer to the Vendor field.
1500 * @param module_name The module name to be set. ASCIIZ string. The caller
1501 * does not need to preserve the value once the function
1503 *****************************************************************************/
1504 void evel_vendor_field_module_set(VENDOR_VNFNAME_FIELD * const vfield,
1505 const char * const module_name);
1506 /**************************************************************************//**
1507 * Set the Vendor module property of the Vendor.
1509 * @note The property is treated as immutable: it is only valid to call
1510 * the setter once. However, we don't assert if the caller tries to
1511 * overwrite, just ignoring the update instead.
1513 * @param vfield Pointer to the Vendor field.
1514 * @param module_name The module name to be set. ASCIIZ string. The caller
1515 * does not need to preserve the value once the function
1517 *****************************************************************************/
1518 void evel_vendor_field_vnfname_set(VENDOR_VNFNAME_FIELD * const vfield,
1519 const char * const vnfname);
1520 /**************************************************************************//**
1521 * Free an event instance id.
1523 * @param vfield Pointer to the event vnfname_field being freed.
1524 *****************************************************************************/
1525 void evel_free_event_vendor_field(VENDOR_VNFNAME_FIELD * const vfield);
1527 /**************************************************************************//**
1528 * Callback function to provide returned data.
1530 * Copy data into the supplied buffer, write_callback::ptr, checking size
1533 * @returns Number of bytes placed into write_callback::ptr. 0 for EOF.
1534 *****************************************************************************/
1535 size_t evel_write_callback(void *contents,
1540 /*****************************************************************************/
1541 /*****************************************************************************/
1543 /* HEARTBEAT - (includes common header, too) */
1545 /*****************************************************************************/
1546 /*****************************************************************************/
1548 /**************************************************************************//**
1549 * Create a new heartbeat event.
1551 * @note that the heartbeat is just a "naked" commonEventHeader!
1553 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1554 * not used it must be released using ::evel_free_event
1555 * @retval NULL Failed to create the event.
1556 *****************************************************************************/
1557 EVENT_HEADER * evel_new_heartbeat(void);
1559 /**************************************************************************//**
1560 * Create a new heartbeat event of given name and type.
1562 * @note that the heartbeat is just a "naked" commonEventHeader!
1564 * @param event_name Unique Event Name: {DomainAbbreviation}_{AsdcModel or ApplicationPlatform}_{DescriptionOfInfoBeingConveyed}
1565 * @param event_id A universal identifier of the event for: troubleshooting, cross-referencing of alarms for alarm correlation, offline log analysis, etc
1567 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1568 * not used it must be released using ::evel_free_event
1569 * @retval NULL Failed to create the event.
1570 *****************************************************************************/
1571 EVENT_HEADER * evel_new_heartbeat_nameid(const char* ev_name, const char *ev_id);
1574 /**************************************************************************//**
1575 * Free an event header.
1577 * Free off the event header supplied. Will free all the contained allocated
1580 * @note It does not free the header itself, since that may be part of a
1582 *****************************************************************************/
1583 void evel_free_header(EVENT_HEADER * const event);
1585 /**************************************************************************//**
1586 * Initialize a newly created event header.
1588 * @param header Pointer to the header being initialized.
1589 *****************************************************************************/
1590 void evel_init_header(EVENT_HEADER * const header,const char *const eventname);
1592 /**************************************************************************//**
1593 * Set the Event Type property of the event header.
1595 * @param header Pointer to the ::EVENT_HEADER.
1596 * @param type The Event Type to be set. ASCIIZ string. The caller
1597 * does not need to preserve the value once the function
1599 *****************************************************************************/
1600 void evel_header_type_set(EVENT_HEADER * const header,
1601 const char * const type);
1603 /**************************************************************************//**
1604 * Set the Start Epoch property of the event header.
1606 * @note The Start Epoch defaults to the time of event creation.
1608 * @param header Pointer to the ::EVENT_HEADER.
1609 * @param start_epoch_microsec
1610 * The start epoch to set, in microseconds.
1611 *****************************************************************************/
1612 void evel_start_epoch_set(EVENT_HEADER * const header,
1613 const unsigned long long start_epoch_microsec);
1615 /**************************************************************************//**
1616 * Set the Last Epoch property of the event header.
1618 * @note The Last Epoch defaults to the time of event creation.
1620 * @param header Pointer to the ::EVENT_HEADER.
1621 * @param last_epoch_microsec
1622 * The last epoch to set, in microseconds.
1623 *****************************************************************************/
1624 void evel_last_epoch_set(EVENT_HEADER * const header,
1625 const unsigned long long last_epoch_microsec);
1627 /**************************************************************************//**
1628 * Set the Reporting Entity Name property of the event header.
1630 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1632 * @param header Pointer to the ::EVENT_HEADER.
1633 * @param entity_name The entity name to set.
1634 *****************************************************************************/
1635 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1636 const char * const entity_name);
1638 /**************************************************************************//**
1639 * Set the Reporting Entity Id property of the event header.
1641 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1643 * @param header Pointer to the ::EVENT_HEADER.
1644 * @param entity_id The entity id to set.
1645 *****************************************************************************/
1646 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1647 const char * const entity_id);
1649 /**************************************************************************//**
1650 * Set the NFC Naming code property of the event header.
1652 * @param header Pointer to the ::EVENT_HEADER.
1653 * @param nfcnamingcode String
1654 *****************************************************************************/
1655 void evel_nfcnamingcode_set(EVENT_HEADER * const header,
1656 const char * const nfcnam);
1657 /**************************************************************************//**
1658 * Set the NF Naming code property of the event header.
1660 * @param header Pointer to the ::EVENT_HEADER.
1661 * @param nfnamingcode String
1662 *****************************************************************************/
1663 void evel_nfnamingcode_set(EVENT_HEADER * const header,
1664 const char * const nfnam);
1666 /*****************************************************************************/
1667 /*****************************************************************************/
1671 /*****************************************************************************/
1672 /*****************************************************************************/
1674 /**************************************************************************//**
1675 * Create a new fault event.
1677 * @note The mandatory fields on the Fault must be supplied to this factory
1678 * function and are immutable once set. Optional fields have explicit
1679 * setter functions, but again values may only be set once so that the
1680 * Fault has immutable properties.
1681 * @param event_name Unique Event Name
1682 * @param event_id A universal identifier of the event for analysis etc
1683 * @param condition The condition indicated by the Fault.
1684 * @param specific_problem The specific problem triggering the fault.
1685 * @param priority The priority of the event.
1686 * @param severity The severity of the Fault.
1687 * @param ev_source_type Source of Alarm event
1688 * @param version fault version
1689 * @param status status of Virtual Function
1690 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1691 * not used (i.e. posted) it must be released using ::evel_free_fault.
1692 * @retval NULL Failed to create the event.
1693 *****************************************************************************/
1694 EVENT_FAULT * evel_new_fault(const char* ev_name, const char *ev_id,
1695 const char * const condition,
1696 const char * const specific_problem,
1697 EVEL_EVENT_PRIORITIES priority,
1698 EVEL_SEVERITIES severity,
1699 EVEL_SOURCE_TYPES ev_source_type,
1700 EVEL_VF_STATUSES status);
1702 /**************************************************************************//**
1705 * Free off the Fault supplied. Will free all the contained allocated memory.
1707 * @note It does not free the Fault itself, since that may be part of a
1709 *****************************************************************************/
1710 void evel_free_fault(EVENT_FAULT * event);
1712 /**************************************************************************//**
1713 * Set the Fault Category property of the Fault.
1715 * @note The property is treated as immutable: it is only valid to call
1716 * the setter once. However, we don't assert if the caller tries to
1717 * overwrite, just ignoring the update instead.
1719 * @param fault Pointer to the fault.
1720 * @param category Category : license, link, routing, security, signaling.
1721 * ASCIIZ string. The caller
1722 * does not need to preserve the value once the function
1724 *****************************************************************************/
1725 void evel_fault_category_set(EVENT_FAULT * fault,
1726 const char * const category);
1728 /**************************************************************************//**
1729 * Set the Alarm Interface A property of the Fault.
1731 * @note The property is treated as immutable: it is only valid to call
1732 * the setter once. However, we don't assert if the caller tries to
1733 * overwrite, just ignoring the update instead.
1735 * @param fault Pointer to the fault.
1736 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1737 * does not need to preserve the value once the function
1739 *****************************************************************************/
1740 void evel_fault_interface_set(EVENT_FAULT * fault,
1741 const char * const interface);
1743 /**************************************************************************//**
1744 * Add an additional value name/value pair to the Fault.
1746 * The name and value are null delimited ASCII strings. The library takes
1747 * a copy so the caller does not have to preserve values after the function
1750 * @param fault Pointer to the fault.
1751 * @param name ASCIIZ string with the attribute's name.
1752 * @param value ASCIIZ string with the attribute's value.
1753 *****************************************************************************/
1754 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1756 /**************************************************************************//**
1757 * Set the Event Type property of the Fault.
1759 * @note The property is treated as immutable: it is only valid to call
1760 * the setter once. However, we don't assert if the caller tries to
1761 * overwrite, just ignoring the update instead.
1763 * @param fault Pointer to the fault.
1764 * @param type The Event Type to be set. ASCIIZ string. The caller
1765 * does not need to preserve the value once the function
1767 *****************************************************************************/
1768 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1770 /*****************************************************************************/
1771 /*****************************************************************************/
1775 /*****************************************************************************/
1776 /*****************************************************************************/
1778 /**************************************************************************//**
1779 * Create a new Measurement event.
1781 * @note The mandatory fields on the Measurement must be supplied to this
1782 * factory function and are immutable once set. Optional fields have
1783 * explicit setter functions, but again values may only be set once so
1784 * that the Measurement has immutable properties.
1786 * @param measurement_interval
1787 * @param event_name Unique Event Name
1788 * @param event_id A universal identifier of the event for analysis etc
1790 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1791 * event is not used (i.e. posted) it must be released using
1792 * ::evel_free_event.
1793 * @retval NULL Failed to create the event.
1794 *****************************************************************************/
1795 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval,const char* ev_name, const char *ev_id);
1797 /**************************************************************************//**
1798 * Free a Measurement.
1800 * Free off the Measurement supplied. Will free all the contained allocated
1803 * @note It does not free the Measurement itself, since that may be part of a
1805 *****************************************************************************/
1806 void evel_free_measurement(EVENT_MEASUREMENT * event);
1808 /**************************************************************************//**
1809 * Set the Event Type property of the Measurement.
1811 * @note The property is treated as immutable: it is only valid to call
1812 * the setter once. However, we don't assert if the caller tries to
1813 * overwrite, just ignoring the update instead.
1815 * @param measurement Pointer to the Measurement.
1816 * @param type The Event Type to be set. ASCIIZ string. The caller
1817 * does not need to preserve the value once the function
1819 *****************************************************************************/
1820 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1821 const char * const type);
1823 /**************************************************************************//**
1824 * Set the Concurrent Sessions property of the Measurement.
1826 * @note The property is treated as immutable: it is only valid to call
1827 * the setter once. However, we don't assert if the caller tries to
1828 * overwrite, just ignoring the update instead.
1830 * @param measurement Pointer to the Measurement.
1831 * @param concurrent_sessions The Concurrent Sessions to be set.
1832 *****************************************************************************/
1833 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1834 int concurrent_sessions);
1836 /**************************************************************************//**
1837 * Set the Configured Entities property of the Measurement.
1839 * @note The property is treated as immutable: it is only valid to call
1840 * the setter once. However, we don't assert if the caller tries to
1841 * overwrite, just ignoring the update instead.
1843 * @param measurement Pointer to the Measurement.
1844 * @param configured_entities The Configured Entities to be set.
1845 *****************************************************************************/
1846 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1847 int configured_entities);
1849 /**************************************************************************//**
1850 * Add an additional set of Errors to the Measurement.
1852 * @note The property is treated as immutable: it is only valid to call
1853 * the setter once. However, we don't assert if the caller tries to
1854 * overwrite, just ignoring the update instead.
1856 * @param measurement Pointer to the measurement.
1857 * @param receive_discards The number of receive discards.
1858 * @param receive_errors The number of receive errors.
1859 * @param transmit_discards The number of transmit discards.
1860 * @param transmit_errors The number of transmit errors.
1861 *****************************************************************************/
1862 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1863 int receive_discards,
1865 int transmit_discards,
1866 int transmit_errors);
1868 /**************************************************************************//**
1869 * Set the Mean Request Latency property of the Measurement.
1871 * @note The property is treated as immutable: it is only valid to call
1872 * the setter once. However, we don't assert if the caller tries to
1873 * overwrite, just ignoring the update instead.
1875 * @param measurement Pointer to the Measurement.
1876 * @param mean_request_latency The Mean Request Latency to be set.
1877 *****************************************************************************/
1878 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1879 double mean_request_latency);
1881 /**************************************************************************//**
1882 * Set the Request Rate property of the Measurement.
1884 * @note The property is treated as immutable: it is only valid to call
1885 * the setter once. However, we don't assert if the caller tries to
1886 * overwrite, just ignoring the update instead.
1888 * @param measurement Pointer to the Measurement.
1889 * @param request_rate The Request Rate to be set.
1890 *****************************************************************************/
1891 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
1894 /**************************************************************************//**
1895 * Add an additional CPU usage value name/value pair to the Measurement.
1897 * The name and value are null delimited ASCII strings. The library takes
1898 * a copy so the caller does not have to preserve values after the function
1901 * @param measurement Pointer to the measurement.
1902 * @param id ASCIIZ string with the CPU's identifier.
1903 * @param usage CPU utilization.
1904 *****************************************************************************/
1905 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
1907 /**************************************************************************//**
1908 * Set the CPU Idle value in measurement interval
1909 * percentage of CPU time spent in the idle task
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 cpu_use Pointer to the CPU Use.
1917 *****************************************************************************/
1918 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
1921 /**************************************************************************//**
1922 * Set the percentage of time spent servicing interrupts
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 cpu_use Pointer to the CPU Use.
1930 *****************************************************************************/
1931 void evel_measurement_cpu_use_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
1934 /**************************************************************************//**
1935 * Set the percentage of time spent running user space processes that have been niced
1937 * @note The property is treated as immutable: it is only valid to call
1938 * the setter once. However, we don't assert if the caller tries to
1939 * overwrite, just ignoring the update instead.
1941 * @param cpu_use Pointer to the CPU Use.
1943 *****************************************************************************/
1944 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
1947 /**************************************************************************//**
1948 * Set the percentage of time spent handling soft irq interrupts
1950 * @note The property is treated as immutable: it is only valid to call
1951 * the setter once. However, we don't assert if the caller tries to
1952 * overwrite, just ignoring the update instead.
1954 * @param cpu_use Pointer to the CPU Use.
1956 *****************************************************************************/
1957 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
1959 /**************************************************************************//**
1960 * Set the percentage of time spent in involuntary wait
1962 * @note The property is treated as immutable: it is only valid to call
1963 * the setter once. However, we don't assert if the caller tries to
1964 * overwrite, just ignoring the update instead.
1966 * @param cpu_use Pointer to the CPU Use.
1968 *****************************************************************************/
1969 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
1971 /**************************************************************************//**
1972 * Set the percentage of time spent on system tasks running the kernel
1974 * @note The property is treated as immutable: it is only valid to call
1975 * the setter once. However, we don't assert if the caller tries to
1976 * overwrite, just ignoring the update instead.
1978 * @param cpu_use Pointer to the CPU Use.
1980 *****************************************************************************/
1981 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
1983 /**************************************************************************//**
1984 * Set the percentage of time spent running un-niced user space processes
1986 * @note The property is treated as immutable: it is only valid to call
1987 * the setter once. However, we don't assert if the caller tries to
1988 * overwrite, just ignoring the update instead.
1990 * @param cpu_use Pointer to the CPU Use.
1992 *****************************************************************************/
1993 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
1995 /**************************************************************************//**
1996 * Set the percentage of CPU time spent waiting for I/O operations to complete
1998 * @note The property is treated as immutable: it is only valid to call
1999 * the setter once. However, we don't assert if the caller tries to
2000 * overwrite, just ignoring the update instead.
2002 * @param cpu_use Pointer to the CPU Use.
2004 *****************************************************************************/
2005 void evel_measurement_cpu_use_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
2008 /**************************************************************************//**
2009 * Add an additional File System usage value name/value pair to the
2012 * The filesystem_name is null delimited ASCII string. The library takes a
2013 * copy so the caller does not have to preserve values after the function
2016 * @param measurement Pointer to the measurement.
2017 * @param filesystem_name ASCIIZ string with the file-system's UUID.
2018 * @param block_configured Block storage configured.
2019 * @param block_used Block storage in use.
2020 * @param block_iops Block storage IOPS.
2021 * @param ephemeral_configured Ephemeral storage configured.
2022 * @param ephemeral_used Ephemeral storage in use.
2023 * @param ephemeral_iops Ephemeral storage IOPS.
2024 *****************************************************************************/
2025 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
2026 char * filesystem_name,
2027 double block_configured,
2030 double ephemeral_configured,
2031 double ephemeral_used,
2032 double ephemeral_iops);
2034 /**************************************************************************//**
2035 * Add a Feature usage value name/value pair to the Measurement.
2037 * The name is null delimited ASCII string. The library takes
2038 * a copy so the caller does not have to preserve values after the function
2041 * @param measurement Pointer to the measurement.
2042 * @param feature ASCIIZ string with the feature's name.
2043 * @param utilization Utilization of the feature.
2044 *****************************************************************************/
2045 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
2049 /**************************************************************************//**
2050 * Add a Additional Measurement value name/value pair to the Measurement.
2052 * The name is null delimited ASCII string. The library takes
2053 * a copy so the caller does not have to preserve values after the function
2056 * @param measurement Pointer to the Measurement.
2057 * @param group ASCIIZ string with the measurement group's name.
2058 * @param name ASCIIZ string containing the measurement's name.
2059 * @param name ASCIIZ string containing the measurement's value.
2060 *****************************************************************************/
2061 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
2062 const char * const group,
2063 const char * const name,
2064 const char * const value);
2066 /**************************************************************************//**
2067 * Add a Codec usage value name/value pair to the Measurement.
2069 * The name is null delimited ASCII string. The library takes
2070 * a copy so the caller does not have to preserve values after the function
2073 * @param measurement Pointer to the measurement.
2074 * @param codec ASCIIZ string with the codec's name.
2075 * @param utilization Utilization of the feature.
2076 *****************************************************************************/
2077 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
2081 /**************************************************************************//**
2082 * Set the Media Ports in Use property of the Measurement.
2084 * @note The property is treated as immutable: it is only valid to call
2085 * the setter once. However, we don't assert if the caller tries to
2086 * overwrite, just ignoring the update instead.
2088 * @param measurement Pointer to the measurement.
2089 * @param media_ports_in_use The media port usage to set.
2090 *****************************************************************************/
2091 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
2092 int media_ports_in_use);
2094 /**************************************************************************//**
2095 * Set the VNFC Scaling Metric property of the Measurement.
2097 * @note The property is treated as immutable: it is only valid to call
2098 * the setter once. However, we don't assert if the caller tries to
2099 * overwrite, just ignoring the update instead.
2101 * @param measurement Pointer to the measurement.
2102 * @param scaling_metric The scaling metric to set.
2103 *****************************************************************************/
2104 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
2105 int scaling_metric);
2107 /**************************************************************************//**
2108 * Create a new Latency Bucket to be added to a Measurement event.
2110 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
2111 * supplied to this factory function and are immutable once set.
2112 * Optional fields have explicit setter functions, but again values
2113 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
2114 * immutable properties.
2116 * @param count Count of events in this bucket.
2118 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
2119 * @retval NULL Failed to create the Latency Bucket.
2120 *****************************************************************************/
2121 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
2123 /**************************************************************************//**
2124 * Set the High End property of the Measurement Latency Bucket.
2126 * @note The property is treated as immutable: it is only valid to call
2127 * the setter once. However, we don't assert if the caller tries to
2128 * overwrite, just ignoring the update instead.
2130 * @param bucket Pointer to the Measurement Latency Bucket.
2131 * @param high_end High end of the bucket's range.
2132 *****************************************************************************/
2133 void evel_meas_latency_bucket_high_end_set(
2134 MEASUREMENT_LATENCY_BUCKET * const bucket,
2135 const double high_end);
2137 /**************************************************************************//**
2138 * Set the Low End property of the Measurement Latency Bucket.
2140 * @note The property is treated as immutable: it is only valid to call
2141 * the setter once. However, we don't assert if the caller tries to
2142 * overwrite, just ignoring the update instead.
2144 * @param bucket Pointer to the Measurement Latency Bucket.
2145 * @param low_end Low end of the bucket's range.
2146 *****************************************************************************/
2147 void evel_meas_latency_bucket_low_end_set(
2148 MEASUREMENT_LATENCY_BUCKET * const bucket,
2149 const double low_end);
2151 /**************************************************************************//**
2152 * Add an additional Measurement Latency Bucket to the specified event.
2154 * @param measurement Pointer to the Measurement event.
2155 * @param bucket Pointer to the Measurement Latency Bucket to add.
2156 *****************************************************************************/
2157 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2158 MEASUREMENT_LATENCY_BUCKET * const bucket);
2160 /**************************************************************************//**
2161 * Add an additional Latency Distribution bucket to the Measurement.
2163 * This function implements the previous API, purely for convenience.
2165 * @param measurement Pointer to the measurement.
2166 * @param low_end Low end of the bucket's range.
2167 * @param high_end High end of the bucket's range.
2168 * @param count Count of events in this bucket.
2169 *****************************************************************************/
2170 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2171 const double low_end,
2172 const double high_end,
2175 /**************************************************************************//**
2176 * Create a new vNIC Use to be added to a Measurement event.
2178 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2179 * to this factory function and are immutable once set. Optional
2180 * fields have explicit setter functions, but again values may only be
2181 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2184 * @param vnic_id ASCIIZ string with the vNIC's ID.
2185 * @param val_suspect True or false confidence in data.
2187 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2188 * If the structure is not used it must be released using
2189 * ::evel_measurement_free_vnic_performance.
2190 * @retval NULL Failed to create the vNIC Use.
2191 *****************************************************************************/
2192 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2194 /**************************************************************************//**
2197 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2200 * @note It does not free the vNIC Use itself, since that may be part of a
2202 *****************************************************************************/
2203 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2205 /**************************************************************************//**
2206 * Set the Accumulated Broadcast Packets Received in measurement interval
2207 * property of the vNIC performance.
2209 * @note The property is treated as immutable: it is only valid to call
2210 * the setter once. However, we don't assert if the caller tries to
2211 * overwrite, just ignoring the update instead.
2213 * @param vnic_performance Pointer to the vNIC Use.
2214 * @param recvd_bcast_packets_acc
2215 *****************************************************************************/
2216 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2217 const double recvd_bcast_packets_acc);
2218 /**************************************************************************//**
2219 * Set the Delta Broadcast Packets Received in measurement interval
2220 * property of the vNIC performance.
2222 * @note The property is treated as immutable: it is only valid to call
2223 * the setter once. However, we don't assert if the caller tries to
2224 * overwrite, just ignoring the update instead.
2226 * @param vnic_performance Pointer to the vNIC Use.
2227 * @param recvd_bcast_packets_delta
2228 *****************************************************************************/
2229 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2230 const double recvd_bcast_packets_delta);
2231 /**************************************************************************//**
2232 * Set the Discarded Packets Received in measurement interval
2233 * property of the vNIC performance.
2235 * @note The property is treated as immutable: it is only valid to call
2236 * the setter once. However, we don't assert if the caller tries to
2237 * overwrite, just ignoring the update instead.
2239 * @param vnic_performance Pointer to the vNIC Use.
2240 * @param recvd_discard_packets_acc
2241 *****************************************************************************/
2242 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2243 const double recvd_discard_packets_acc);
2244 /**************************************************************************//**
2245 * Set the Delta Discarded Packets Received in measurement interval
2246 * property of the vNIC performance.
2248 * @note The property is treated as immutable: it is only valid to call
2249 * the setter once. However, we don't assert if the caller tries to
2250 * overwrite, just ignoring the update instead.
2252 * @param vnic_performance Pointer to the vNIC Use.
2253 * @param recvd_discard_packets_delta
2254 *****************************************************************************/
2255 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2256 const double recvd_discard_packets_delta);
2257 /**************************************************************************//**
2258 * Set the Error Packets Received in measurement interval
2259 * property of the vNIC performance.
2261 * @note The property is treated as immutable: it is only valid to call
2262 * the setter once. However, we don't assert if the caller tries to
2263 * overwrite, just ignoring the update instead.
2265 * @param vnic_performance Pointer to the vNIC Use.
2266 * @param recvd_error_packets_acc
2267 *****************************************************************************/
2268 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2269 const double recvd_error_packets_acc);
2270 /**************************************************************************//**
2271 * Set the Delta Error Packets Received in measurement interval
2272 * property of the vNIC performance.
2274 * @note The property is treated as immutable: it is only valid to call
2275 * the setter once. However, we don't assert if the caller tries to
2276 * overwrite, just ignoring the update instead.
2278 * @param vnic_performance Pointer to the vNIC Use.
2279 * @param recvd_error_packets_delta
2280 *****************************************************************************/
2281 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2282 const double recvd_error_packets_delta);
2283 /**************************************************************************//**
2284 * Set the Accumulated Multicast Packets Received in measurement interval
2285 * property of the vNIC performance.
2287 * @note The property is treated as immutable: it is only valid to call
2288 * the setter once. However, we don't assert if the caller tries to
2289 * overwrite, just ignoring the update instead.
2291 * @param vnic_performance Pointer to the vNIC Use.
2292 * @param recvd_mcast_packets_acc
2293 *****************************************************************************/
2294 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2295 const double recvd_mcast_packets_acc);
2296 /**************************************************************************//**
2297 * Set the Delta Multicast Packets Received in measurement interval
2298 * property of the vNIC performance.
2300 * @note The property is treated as immutable: it is only valid to call
2301 * the setter once. However, we don't assert if the caller tries to
2302 * overwrite, just ignoring the update instead.
2304 * @param vnic_performance Pointer to the vNIC Use.
2305 * @param recvd_mcast_packets_delta
2306 *****************************************************************************/
2307 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2308 const double recvd_mcast_packets_delta);
2309 /**************************************************************************//**
2310 * Set the Accumulated Octets Received in measurement interval
2311 * property of the vNIC performance.
2313 * @note The property is treated as immutable: it is only valid to call
2314 * the setter once. However, we don't assert if the caller tries to
2315 * overwrite, just ignoring the update instead.
2317 * @param vnic_performance Pointer to the vNIC Use.
2318 * @param recvd_octets_acc
2319 *****************************************************************************/
2320 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2321 const double recvd_octets_acc);
2322 /**************************************************************************//**
2323 * Set the Delta Octets Received in measurement interval
2324 * property of the vNIC performance.
2326 * @note The property is treated as immutable: it is only valid to call
2327 * the setter once. However, we don't assert if the caller tries to
2328 * overwrite, just ignoring the update instead.
2330 * @param vnic_performance Pointer to the vNIC Use.
2331 * @param recvd_octets_delta
2332 *****************************************************************************/
2333 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2334 const double recvd_octets_delta);
2335 /**************************************************************************//**
2336 * Set the Accumulated Total Packets Received in measurement interval
2337 * property of the vNIC performance.
2339 * @note The property is treated as immutable: it is only valid to call
2340 * the setter once. However, we don't assert if the caller tries to
2341 * overwrite, just ignoring the update instead.
2343 * @param vnic_performance Pointer to the vNIC Use.
2344 * @param recvd_total_packets_acc
2345 *****************************************************************************/
2346 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2347 const double recvd_total_packets_acc);
2348 /**************************************************************************//**
2349 * Set the Delta Total Packets Received in measurement interval
2350 * property of the vNIC performance.
2352 * @note The property is treated as immutable: it is only valid to call
2353 * the setter once. However, we don't assert if the caller tries to
2354 * overwrite, just ignoring the update instead.
2356 * @param vnic_performance Pointer to the vNIC Use.
2357 * @param recvd_total_packets_delta
2358 *****************************************************************************/
2359 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2360 const double recvd_total_packets_delta);
2361 /**************************************************************************//**
2362 * Set the Accumulated Unicast Packets Received in measurement interval
2363 * property of the vNIC performance.
2365 * @note The property is treated as immutable: it is only valid to call
2366 * the setter once. However, we don't assert if the caller tries to
2367 * overwrite, just ignoring the update instead.
2369 * @param vnic_performance Pointer to the vNIC Use.
2370 * @param recvd_ucast_packets_acc
2371 *****************************************************************************/
2372 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2373 const double recvd_ucast_packets_acc);
2374 /**************************************************************************//**
2375 * Set the Delta Unicast packets Received in measurement interval
2376 * property of the vNIC performance.
2378 * @note The property is treated as immutable: it is only valid to call
2379 * the setter once. However, we don't assert if the caller tries to
2380 * overwrite, just ignoring the update instead.
2382 * @param vnic_performance Pointer to the vNIC Use.
2383 * @param recvd_ucast_packets_delta
2384 *****************************************************************************/
2385 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2386 const double recvd_ucast_packets_delta);
2387 /**************************************************************************//**
2388 * Set the Transmitted Broadcast Packets in measurement interval
2389 * property of the vNIC performance.
2391 * @note The property is treated as immutable: it is only valid to call
2392 * the setter once. However, we don't assert if the caller tries to
2393 * overwrite, just ignoring the update instead.
2395 * @param vnic_performance Pointer to the vNIC Use.
2396 * @param tx_bcast_packets_acc
2397 *****************************************************************************/
2398 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2399 const double tx_bcast_packets_acc);
2400 /**************************************************************************//**
2401 * Set the Delta Broadcast packets Transmitted in measurement interval
2402 * property of the vNIC performance.
2404 * @note The property is treated as immutable: it is only valid to call
2405 * the setter once. However, we don't assert if the caller tries to
2406 * overwrite, just ignoring the update instead.
2408 * @param vnic_performance Pointer to the vNIC Use.
2409 * @param tx_bcast_packets_delta
2410 *****************************************************************************/
2411 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2412 const double tx_bcast_packets_delta);
2413 /**************************************************************************//**
2414 * Set the Transmitted Discarded Packets in measurement interval
2415 * property of the vNIC performance.
2417 * @note The property is treated as immutable: it is only valid to call
2418 * the setter once. However, we don't assert if the caller tries to
2419 * overwrite, just ignoring the update instead.
2421 * @param vnic_performance Pointer to the vNIC Use.
2422 * @param tx_discarded_packets_acc
2423 *****************************************************************************/
2424 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2425 const double tx_discarded_packets_acc);
2426 /**************************************************************************//**
2427 * Set the Delta Discarded packets Transmitted in measurement interval
2428 * property of the vNIC performance.
2430 * @note The property is treated as immutable: it is only valid to call
2431 * the setter once. However, we don't assert if the caller tries to
2432 * overwrite, just ignoring the update instead.
2434 * @param vnic_performance Pointer to the vNIC Use.
2435 * @param tx_discarded_packets_delta
2436 *****************************************************************************/
2437 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2438 const double tx_discarded_packets_delta);
2439 /**************************************************************************//**
2440 * Set the Transmitted Errored Packets in measurement interval
2441 * property of the vNIC performance.
2443 * @note The property is treated as immutable: it is only valid to call
2444 * the setter once. However, we don't assert if the caller tries to
2445 * overwrite, just ignoring the update instead.
2447 * @param vnic_performance Pointer to the vNIC Use.
2448 * @param tx_error_packets_acc
2449 *****************************************************************************/
2450 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2451 const double tx_error_packets_acc);
2452 /**************************************************************************//**
2453 * Set the Delta Errored packets Transmitted in measurement interval
2454 * property of the vNIC performance.
2456 * @note The property is treated as immutable: it is only valid to call
2457 * the setter once. However, we don't assert if the caller tries to
2458 * overwrite, just ignoring the update instead.
2460 * @param vnic_performance Pointer to the vNIC Use.
2461 * @param tx_error_packets_delta
2462 *****************************************************************************/
2463 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2464 const double tx_error_packets_delta);
2465 /**************************************************************************//**
2466 * Set the Transmitted Multicast Packets in measurement interval
2467 * property of the vNIC performance.
2469 * @note The property is treated as immutable: it is only valid to call
2470 * the setter once. However, we don't assert if the caller tries to
2471 * overwrite, just ignoring the update instead.
2473 * @param vnic_performance Pointer to the vNIC Use.
2474 * @param tx_mcast_packets_acc
2475 *****************************************************************************/
2476 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2477 const double tx_mcast_packets_acc);
2478 /**************************************************************************//**
2479 * Set the Delta Multicast packets Transmitted in measurement interval
2480 * property of the vNIC performance.
2482 * @note The property is treated as immutable: it is only valid to call
2483 * the setter once. However, we don't assert if the caller tries to
2484 * overwrite, just ignoring the update instead.
2486 * @param vnic_performance Pointer to the vNIC Use.
2487 * @param tx_mcast_packets_delta
2488 *****************************************************************************/
2489 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2490 const double tx_mcast_packets_delta);
2491 /**************************************************************************//**
2492 * Set the Transmitted Octets in measurement interval
2493 * property of the vNIC performance.
2495 * @note The property is treated as immutable: it is only valid to call
2496 * the setter once. However, we don't assert if the caller tries to
2497 * overwrite, just ignoring the update instead.
2499 * @param vnic_performance Pointer to the vNIC Use.
2500 * @param tx_octets_acc
2501 *****************************************************************************/
2502 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2503 const double tx_octets_acc);
2504 /**************************************************************************//**
2505 * Set the Delta Octets Transmitted in measurement interval
2506 * property of the vNIC performance.
2508 * @note The property is treated as immutable: it is only valid to call
2509 * the setter once. However, we don't assert if the caller tries to
2510 * overwrite, just ignoring the update instead.
2512 * @param vnic_performance Pointer to the vNIC Use.
2513 * @param tx_octets_delta
2514 *****************************************************************************/
2515 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2516 const double tx_octets_delta);
2517 /**************************************************************************//**
2518 * Set the Transmitted Total Packets in measurement interval
2519 * property of the vNIC performance.
2521 * @note The property is treated as immutable: it is only valid to call
2522 * the setter once. However, we don't assert if the caller tries to
2523 * overwrite, just ignoring the update instead.
2525 * @param vnic_performance Pointer to the vNIC Use.
2526 * @param tx_total_packets_acc
2527 *****************************************************************************/
2528 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2529 const double tx_total_packets_acc);
2530 /**************************************************************************//**
2531 * Set the Delta Total Packets Transmitted in measurement interval
2532 * property of the vNIC performance.
2534 * @note The property is treated as immutable: it is only valid to call
2535 * the setter once. However, we don't assert if the caller tries to
2536 * overwrite, just ignoring the update instead.
2538 * @param vnic_performance Pointer to the vNIC Use.
2539 * @param tx_total_packets_delta
2540 *****************************************************************************/
2541 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2542 const double tx_total_packets_delta);
2543 /**************************************************************************//**
2544 * Set the Transmitted Unicast Packets in measurement interval
2545 * property of the vNIC performance.
2547 * @note The property is treated as immutable: it is only valid to call
2548 * the setter once. However, we don't assert if the caller tries to
2549 * overwrite, just ignoring the update instead.
2551 * @param vnic_performance Pointer to the vNIC Use.
2552 * @param tx_ucast_packets_acc
2553 *****************************************************************************/
2554 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2555 const double tx_ucast_packets_acc);
2556 /**************************************************************************//**
2557 * Set the Delta Octets Transmitted in measurement interval
2558 * property of the vNIC performance.
2560 * @note The property is treated as immutable: it is only valid to call
2561 * the setter once. However, we don't assert if the caller tries to
2562 * overwrite, just ignoring the update instead.
2564 * @param vnic_performance Pointer to the vNIC Use.
2565 * @param tx_ucast_packets_delta
2566 *****************************************************************************/
2567 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2568 const double tx_ucast_packets_delta);
2570 /**************************************************************************//**
2571 * Add an additional vNIC Use to the specified Measurement event.
2573 * @param measurement Pointer to the measurement.
2574 * @param vnic_performance Pointer to the vNIC Use to add.
2575 *****************************************************************************/
2576 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2577 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2579 /**************************************************************************//**
2580 * Add an additional vNIC usage record Measurement.
2582 * This function implements the previous API, purely for convenience.
2584 * The ID is null delimited ASCII string. The library takes a copy so the
2585 * caller does not have to preserve values after the function returns.
2587 * @param measurement Pointer to the measurement.
2588 * @param vnic_id ASCIIZ string with the vNIC's ID.
2589 * @param valset true or false confidence level
2590 * @param recvd_bcast_packets_acc Recieved broadcast packets
2591 * @param recvd_bcast_packets_delta Received delta broadcast packets
2592 * @param recvd_discarded_packets_acc Recieved discarded packets
2593 * @param recvd_discarded_packets_delta Received discarded delta packets
2594 * @param recvd_error_packets_acc Received error packets
2595 * @param recvd_error_packets_delta, Received delta error packets
2596 * @param recvd_mcast_packets_acc Received multicast packets
2597 * @param recvd_mcast_packets_delta Received delta multicast packets
2598 * @param recvd_octets_acc Received octets
2599 * @param recvd_octets_delta Received delta octets
2600 * @param recvd_total_packets_acc Received total packets
2601 * @param recvd_total_packets_delta Received delta total packets
2602 * @param recvd_ucast_packets_acc Received Unicast packets
2603 * @param recvd_ucast_packets_delta Received delta unicast packets
2604 * @param tx_bcast_packets_acc Transmitted broadcast packets
2605 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2606 * @param tx_discarded_packets_acc Transmitted packets discarded
2607 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2608 * @param tx_error_packets_acc Transmitted error packets
2609 * @param tx_error_packets_delta Transmitted delta error packets
2610 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2611 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2612 * @param tx_octets_acc Transmitted octets
2613 * @param tx_octets_delta Transmitted delta octets
2614 * @param tx_total_packets_acc Transmitted total packets
2615 * @param tx_total_packets_delta Transmitted delta total packets
2616 * @param tx_ucast_packets_acc Transmitted Unicast packets
2617 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2618 *****************************************************************************/
2619 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2620 char * const vnic_id,
2622 double recvd_bcast_packets_acc,
2623 double recvd_bcast_packets_delta,
2624 double recvd_discarded_packets_acc,
2625 double recvd_discarded_packets_delta,
2626 double recvd_error_packets_acc,
2627 double recvd_error_packets_delta,
2628 double recvd_mcast_packets_acc,
2629 double recvd_mcast_packets_delta,
2630 double recvd_octets_acc,
2631 double recvd_octets_delta,
2632 double recvd_total_packets_acc,
2633 double recvd_total_packets_delta,
2634 double recvd_ucast_packets_acc,
2635 double recvd_ucast_packets_delta,
2636 double tx_bcast_packets_acc,
2637 double tx_bcast_packets_delta,
2638 double tx_discarded_packets_acc,
2639 double tx_discarded_packets_delta,
2640 double tx_error_packets_acc,
2641 double tx_error_packets_delta,
2642 double tx_mcast_packets_acc,
2643 double tx_mcast_packets_delta,
2644 double tx_octets_acc,
2645 double tx_octets_delta,
2646 double tx_total_packets_acc,
2647 double tx_total_packets_delta,
2648 double tx_ucast_packets_acc,
2649 double tx_ucast_packets_delta);
2651 /*****************************************************************************/
2652 /*****************************************************************************/
2656 /*****************************************************************************/
2657 /*****************************************************************************/
2659 /**************************************************************************//**
2660 * Create a new Report event.
2662 * @note The mandatory fields on the Report must be supplied to this
2663 * factory function and are immutable once set. Optional fields have
2664 * explicit setter functions, but again values may only be set once so
2665 * that the Report has immutable properties.
2667 * @param measurement_interval
2668 * @param event_name Unique Event Name
2669 * @param event_id A universal identifier of the event for analysis etc
2671 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2672 * not used (i.e. posted) it must be released using
2673 * ::evel_free_report.
2674 * @retval NULL Failed to create the event.
2675 *****************************************************************************/
2676 EVENT_REPORT * evel_new_report(double measurement_interval,const char* ev_name, const char *ev_id);
2678 /**************************************************************************//**
2681 * Free off the Report supplied. Will free all the contained allocated memory.
2683 * @note It does not free the Report itself, since that may be part of a
2685 *****************************************************************************/
2686 void evel_free_report(EVENT_REPORT * event);
2688 /**************************************************************************//**
2689 * Set the Event Type property of the Report.
2691 * @note The property is treated as immutable: it is only valid to call
2692 * the setter once. However, we don't assert if the caller tries to
2693 * overwrite, just ignoring the update instead.
2695 * @param report Pointer to the Report.
2696 * @param type The Event Type to be set. ASCIIZ string. The caller
2697 * does not need to preserve the value once the function
2699 *****************************************************************************/
2700 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2702 /**************************************************************************//**
2703 * Add a Feature usage value name/value pair to the Report.
2705 * The name is null delimited ASCII string. The library takes
2706 * a copy so the caller does not have to preserve values after the function
2709 * @param report Pointer to the report.
2710 * @param feature ASCIIZ string with the feature's name.
2711 * @param utilization Utilization of the feature.
2712 *****************************************************************************/
2713 void evel_report_feature_use_add(EVENT_REPORT * report,
2717 /**************************************************************************//**
2718 * Add a Additional Measurement value name/value pair to the Report.
2720 * The name is null delimited ASCII string. The library takes
2721 * a copy so the caller does not have to preserve values after the function
2724 * @param report Pointer to the report.
2725 * @param group ASCIIZ string with the measurement group's name.
2726 * @param name ASCIIZ string containing the measurement's name.
2727 * @param value ASCIIZ string containing the measurement's value.
2728 *****************************************************************************/
2729 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2730 const char * const group,
2731 const char * const name,
2732 const char * const value);
2734 /*****************************************************************************/
2735 /*****************************************************************************/
2739 /*****************************************************************************/
2740 /*****************************************************************************/
2742 /**************************************************************************//**
2743 * Create a new Mobile Flow event.
2745 * @note The mandatory fields on the Mobile Flow must be supplied to this
2746 * factory function and are immutable once set. Optional fields have
2747 * explicit setter functions, but again values may only be set once so
2748 * that the Mobile Flow has immutable properties.
2750 * @param event_name Unique Event Name
2751 * @param event_id A universal identifier of the event for analysis etc
2752 * @param flow_direction
2753 * @param gtp_per_flow_metrics
2754 * @param ip_protocol_type
2756 * @param other_endpoint_ip_address
2757 * @param other_endpoint_port
2758 * @param reporting_endpoint_ip_addr
2759 * @param reporting_endpoint_port
2761 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2762 * event is not used (i.e. posted) it must be released using
2763 * ::evel_free_mobile_flow.
2764 * @retval NULL Failed to create the event.
2765 *****************************************************************************/
2766 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2767 const char* ev_name, const char *ev_id,
2768 const char * const flow_direction,
2769 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2770 const char * const ip_protocol_type,
2771 const char * const ip_version,
2772 const char * const other_endpoint_ip_address,
2773 int other_endpoint_port,
2774 const char * const reporting_endpoint_ip_addr,
2775 int reporting_endpoint_port);
2777 /**************************************************************************//**
2778 * Free a Mobile Flow.
2780 * Free off the Mobile Flow supplied. Will free all the contained allocated
2783 * @note It does not free the Mobile Flow itself, since that may be part of a
2785 *****************************************************************************/
2786 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2788 /**************************************************************************//**
2789 * Set the Event Type property of the Mobile Flow.
2791 * @note The property is treated as immutable: it is only valid to call
2792 * the setter once. However, we don't assert if the caller tries to
2793 * overwrite, just ignoring the update instead.
2795 * @param mobile_flow Pointer to the Mobile Flow.
2796 * @param type The Event Type to be set. ASCIIZ string. The caller
2797 * does not need to preserve the value once the function
2799 *****************************************************************************/
2800 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2801 const char * const type);
2803 /**************************************************************************//**
2804 * Set the Application Type property of the Mobile Flow.
2806 * @note The property is treated as immutable: it is only valid to call
2807 * the setter once. However, we don't assert if the caller tries to
2808 * overwrite, just ignoring the update instead.
2810 * @param mobile_flow Pointer to the Mobile Flow.
2811 * @param type The Application Type to be set. ASCIIZ string. The caller
2812 * does not need to preserve the value once the function
2814 *****************************************************************************/
2815 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2816 const char * const type);
2818 /**************************************************************************//**
2819 * Set the Application Protocol Type property of the Mobile Flow.
2821 * @note The property is treated as immutable: it is only valid to call
2822 * the setter once. However, we don't assert if the caller tries to
2823 * overwrite, just ignoring the update instead.
2825 * @param mobile_flow Pointer to the Mobile Flow.
2826 * @param type The Application Protocol Type to be set. ASCIIZ string.
2827 * The caller does not need to preserve the value once the
2829 *****************************************************************************/
2830 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2831 const char * const type);
2833 /**************************************************************************//**
2834 * Set the Application Protocol Version property of the Mobile Flow.
2836 * @note The property is treated as immutable: it is only valid to call
2837 * the setter once. However, we don't assert if the caller tries to
2838 * overwrite, just ignoring the update instead.
2840 * @param mobile_flow Pointer to the Mobile Flow.
2841 * @param version The Application Protocol Version to be set. ASCIIZ
2842 * string. The caller does not need to preserve the value
2843 * once the function returns.
2844 *****************************************************************************/
2845 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2846 const char * const version);
2848 /**************************************************************************//**
2849 * Set the CID property of the Mobile Flow.
2851 * @note The property is treated as immutable: it is only valid to call
2852 * the setter once. However, we don't assert if the caller tries to
2853 * overwrite, just ignoring the update instead.
2855 * @param mobile_flow Pointer to the Mobile Flow.
2856 * @param cid The CID to be set. ASCIIZ string. The caller does not
2857 * need to preserve the value once the function returns.
2858 *****************************************************************************/
2859 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2860 const char * const cid);
2862 /**************************************************************************//**
2863 * Set the Connection Type property of the Mobile Flow.
2865 * @note The property is treated as immutable: it is only valid to call
2866 * the setter once. However, we don't assert if the caller tries to
2867 * overwrite, just ignoring the update instead.
2869 * @param mobile_flow Pointer to the Mobile Flow.
2870 * @param type The Connection Type to be set. ASCIIZ string. The caller
2871 * does not need to preserve the value once the function
2873 *****************************************************************************/
2874 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2875 const char * const type);
2877 /**************************************************************************//**
2878 * Set the ECGI property of the Mobile Flow.
2880 * @note The property is treated as immutable: it is only valid to call
2881 * the setter once. However, we don't assert if the caller tries to
2882 * overwrite, just ignoring the update instead.
2884 * @param mobile_flow Pointer to the Mobile Flow.
2885 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2886 * need to preserve the value once the function returns.
2887 *****************************************************************************/
2888 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2889 const char * const ecgi);
2891 /**************************************************************************//**
2892 * Set the GTP Protocol Type property of the Mobile Flow.
2894 * @note The property is treated as immutable: it is only valid to call
2895 * the setter once. However, we don't assert if the caller tries to
2896 * overwrite, just ignoring the update instead.
2898 * @param mobile_flow Pointer to the Mobile Flow.
2899 * @param type The GTP Protocol Type to be set. ASCIIZ string. The
2900 * caller does not need to preserve the value once the
2902 *****************************************************************************/
2903 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2904 const char * const type);
2906 /**************************************************************************//**
2907 * Set the GTP Protocol Version property of the Mobile Flow.
2909 * @note The property is treated as immutable: it is only valid to call
2910 * the setter once. However, we don't assert if the caller tries to
2911 * overwrite, just ignoring the update instead.
2913 * @param mobile_flow Pointer to the Mobile Flow.
2914 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
2915 * caller does not need to preserve the value once the
2917 *****************************************************************************/
2918 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2919 const char * const version);
2921 /**************************************************************************//**
2922 * Set the HTTP Header property of the Mobile Flow.
2924 * @note The property is treated as immutable: it is only valid to call
2925 * the setter once. However, we don't assert if the caller tries to
2926 * overwrite, just ignoring the update instead.
2928 * @param mobile_flow Pointer to the Mobile Flow.
2929 * @param header The HTTP header to be set. ASCIIZ string. The caller does
2930 * not need to preserve the value once the function returns.
2931 *****************************************************************************/
2932 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
2933 const char * const header);
2935 /**************************************************************************//**
2936 * Set the IMEI property of the Mobile Flow.
2938 * @note The property is treated as immutable: it is only valid to call
2939 * the setter once. However, we don't assert if the caller tries to
2940 * overwrite, just ignoring the update instead.
2942 * @param mobile_flow Pointer to the Mobile Flow.
2943 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
2944 * need to preserve the value once the function returns.
2945 *****************************************************************************/
2946 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
2947 const char * const imei);
2949 /**************************************************************************//**
2950 * Set the IMSI 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 imsi The IMSI 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_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
2961 const char * const imsi);
2963 /**************************************************************************//**
2964 * Set the LAC 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 lac The LAC to be set. ASCIIZ string. The caller does not
2972 * need to preserve the value once the function returns.
2973 *****************************************************************************/
2974 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
2975 const char * const lac);
2977 /**************************************************************************//**
2978 * Set the MCC property of the Mobile Flow.
2980 * @note The property is treated as immutable: it is only valid to call
2981 * the setter once. However, we don't assert if the caller tries to
2982 * overwrite, just ignoring the update instead.
2984 * @param mobile_flow Pointer to the Mobile Flow.
2985 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
2986 * need to preserve the value once the function returns.
2987 *****************************************************************************/
2988 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
2989 const char * const mcc);
2991 /**************************************************************************//**
2992 * Set the MNC property of the Mobile Flow.
2994 * @note The property is treated as immutable: it is only valid to call
2995 * the setter once. However, we don't assert if the caller tries to
2996 * overwrite, just ignoring the update instead.
2998 * @param mobile_flow Pointer to the Mobile Flow.
2999 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
3000 * need to preserve the value once the function returns.
3001 *****************************************************************************/
3002 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
3003 const char * const mnc);
3005 /**************************************************************************//**
3006 * Set the MSISDN property of the Mobile Flow.
3008 * @note The property is treated as immutable: it is only valid to call
3009 * the setter once. However, we don't assert if the caller tries to
3010 * overwrite, just ignoring the update instead.
3012 * @param mobile_flow Pointer to the Mobile Flow.
3013 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
3014 * need to preserve the value once the function returns.
3015 *****************************************************************************/
3016 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
3017 const char * const msisdn);
3019 /**************************************************************************//**
3020 * Set the Other Functional Role property of the Mobile Flow.
3022 * @note The property is treated as immutable: it is only valid to call
3023 * the setter once. However, we don't assert if the caller tries to
3024 * overwrite, just ignoring the update instead.
3026 * @param mobile_flow Pointer to the Mobile Flow.
3027 * @param role The Other Functional Role to be set. ASCIIZ string. The
3028 * caller does not need to preserve the value once the
3030 *****************************************************************************/
3031 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
3032 const char * const role);
3034 /**************************************************************************//**
3035 * Set the RAC property of the Mobile Flow.
3037 * @note The property is treated as immutable: it is only valid to call
3038 * the setter once. However, we don't assert if the caller tries to
3039 * overwrite, just ignoring the update instead.
3041 * @param mobile_flow Pointer to the Mobile Flow.
3042 * @param rac The RAC to be set. ASCIIZ string. The caller does not
3043 * need to preserve the value once the function returns.
3044 *****************************************************************************/
3045 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
3046 const char * const rac);
3048 /**************************************************************************//**
3049 * Set the Radio Access Technology property of the Mobile Flow.
3051 * @note The property is treated as immutable: it is only valid to call
3052 * the setter once. However, we don't assert if the caller tries to
3053 * overwrite, just ignoring the update instead.
3055 * @param mobile_flow Pointer to the Mobile Flow.
3056 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
3057 * caller does not need to preserve the value once the
3059 *****************************************************************************/
3060 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
3061 const char * const tech);
3063 /**************************************************************************//**
3064 * Set the SAC 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 sac The SAC 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_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
3075 const char * const sac);
3077 /**************************************************************************//**
3078 * Set the Sampling Algorithm 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 algorithm The Sampling Algorithm to be set.
3086 *****************************************************************************/
3087 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
3090 /**************************************************************************//**
3091 * Set the TAC property of the Mobile Flow.
3093 * @note The property is treated as immutable: it is only valid to call
3094 * the setter once. However, we don't assert if the caller tries to
3095 * overwrite, just ignoring the update instead.
3097 * @param mobile_flow Pointer to the Mobile Flow.
3098 * @param tac The TAC to be set. ASCIIZ string. The caller does not
3099 * need to preserve the value once the function returns.
3100 *****************************************************************************/
3101 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
3102 const char * const tac);
3104 /**************************************************************************//**
3105 * Set the Tunnel ID property of the Mobile Flow.
3107 * @note The property is treated as immutable: it is only valid to call
3108 * the setter once. However, we don't assert if the caller tries to
3109 * overwrite, just ignoring the update instead.
3111 * @param mobile_flow Pointer to the Mobile Flow.
3112 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
3113 * not need to preserve the value once the function returns.
3114 *****************************************************************************/
3115 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3116 const char * const tunnel_id);
3118 /**************************************************************************//**
3119 * Set the VLAN ID property of the Mobile Flow.
3121 * @note The property is treated as immutable: it is only valid to call
3122 * the setter once. However, we don't assert if the caller tries to
3123 * overwrite, just ignoring the update instead.
3125 * @param mobile_flow Pointer to the Mobile Flow.
3126 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
3127 * not need to preserve the value once the function returns.
3128 *****************************************************************************/
3129 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
3130 const char * const vlan_id);
3132 /**************************************************************************//**
3133 * Create a new Mobile GTP Per Flow Metrics.
3135 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
3136 * supplied to this factory function and are immutable once set.
3137 * Optional fields have explicit setter functions, but again values
3138 * may only be set once so that the Mobile GTP Per Flow Metrics has
3139 * immutable properties.
3141 * @param avg_bit_error_rate
3142 * @param avg_packet_delay_variation
3143 * @param avg_packet_latency
3144 * @param avg_receive_throughput
3145 * @param avg_transmit_throughput
3146 * @param flow_activation_epoch
3147 * @param flow_activation_microsec
3148 * @param flow_deactivation_epoch
3149 * @param flow_deactivation_microsec
3150 * @param flow_deactivation_time
3151 * @param flow_status
3152 * @param max_packet_delay_variation
3153 * @param num_activation_failures
3154 * @param num_bit_errors
3155 * @param num_bytes_received
3156 * @param num_bytes_transmitted
3157 * @param num_dropped_packets
3158 * @param num_l7_bytes_received
3159 * @param num_l7_bytes_transmitted
3160 * @param num_lost_packets
3161 * @param num_out_of_order_packets
3162 * @param num_packet_errors
3163 * @param num_packets_received_excl_retrans
3164 * @param num_packets_received_incl_retrans
3165 * @param num_packets_transmitted_incl_retrans
3166 * @param num_retries
3167 * @param num_timeouts
3168 * @param num_tunneled_l7_bytes_received
3169 * @param round_trip_time
3170 * @param time_to_first_byte
3172 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3173 * If the structure is not used it must be released using
3174 * ::evel_free_mobile_gtp_flow_metrics.
3175 * @retval NULL Failed to create the event.
3176 *****************************************************************************/
3177 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3178 double avg_bit_error_rate,
3179 double avg_packet_delay_variation,
3180 int avg_packet_latency,
3181 int avg_receive_throughput,
3182 int avg_transmit_throughput,
3183 int flow_activation_epoch,
3184 int flow_activation_microsec,
3185 int flow_deactivation_epoch,
3186 int flow_deactivation_microsec,
3187 time_t flow_deactivation_time,
3188 const char * const flow_status,
3189 int max_packet_delay_variation,
3190 int num_activation_failures,
3192 int num_bytes_received,
3193 int num_bytes_transmitted,
3194 int num_dropped_packets,
3195 int num_l7_bytes_received,
3196 int num_l7_bytes_transmitted,
3197 int num_lost_packets,
3198 int num_out_of_order_packets,
3199 int num_packet_errors,
3200 int num_packets_received_excl_retrans,
3201 int num_packets_received_incl_retrans,
3202 int num_packets_transmitted_incl_retrans,
3205 int num_tunneled_l7_bytes_received,
3206 int round_trip_time,
3207 int time_to_first_byte);
3209 /**************************************************************************//**
3210 * Free a Mobile GTP Per Flow Metrics.
3212 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3213 * contained allocated memory.
3215 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3216 * may be part of a larger structure.
3217 *****************************************************************************/
3218 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3220 /**************************************************************************//**
3221 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3224 * @note The property is treated as immutable: it is only valid to call
3225 * the setter once. However, we don't assert if the caller tries to
3226 * overwrite, just ignoring the update instead.
3228 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3229 * @param duration The Duration of Connection Failed Status to be set.
3230 *****************************************************************************/
3231 void evel_mobile_gtp_metrics_dur_con_fail_set(
3232 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3235 /**************************************************************************//**
3236 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3239 * @note The property is treated as immutable: it is only valid to call
3240 * the setter once. However, we don't assert if the caller tries to
3241 * overwrite, just ignoring the update instead.
3243 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3244 * @param duration The Duration of Tunnel Failed Status to be set.
3245 *****************************************************************************/
3246 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3247 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3250 /**************************************************************************//**
3251 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3253 * @note The property is treated as immutable: it is only valid to call
3254 * the setter once. However, we don't assert if the caller tries to
3255 * overwrite, just ignoring the update instead.
3257 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3258 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3259 * does not need to preserve the value once the function
3261 *****************************************************************************/
3262 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3263 const char * const act_by);
3265 /**************************************************************************//**
3266 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3268 * @note The property is treated as immutable: it is only valid to call
3269 * the setter once. However, we don't assert if the caller tries to
3270 * overwrite, just ignoring the update instead.
3272 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3273 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3274 * does not need to preserve the value once the function
3276 *****************************************************************************/
3277 void evel_mobile_gtp_metrics_act_time_set(
3278 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3281 /**************************************************************************//**
3282 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3284 * @note The property is treated as immutable: it is only valid to call
3285 * the setter once. However, we don't assert if the caller tries to
3286 * overwrite, just ignoring the update instead.
3288 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3289 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3290 * does not need to preserve the value once the function
3292 *****************************************************************************/
3293 void evel_mobile_gtp_metrics_deact_by_set(
3294 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3295 const char * const deact_by);
3297 /**************************************************************************//**
3298 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3300 * @note The property is treated as immutable: it is only valid to call
3301 * the setter once. However, we don't assert if the caller tries to
3302 * overwrite, just ignoring the update instead.
3304 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3305 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3306 * caller does not need to preserve the value once the
3308 *****************************************************************************/
3309 void evel_mobile_gtp_metrics_con_status_set(
3310 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3311 const char * const status);
3313 /**************************************************************************//**
3314 * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.
3316 * @note The property is treated as immutable: it is only valid to call
3317 * the setter once. However, we don't assert if the caller tries to
3318 * overwrite, just ignoring the update instead.
3320 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3321 * @param status The GTP Tunnel Status to be set. ASCIIZ string. The
3322 * caller does not need to preserve the value once the
3324 *****************************************************************************/
3325 void evel_mobile_gtp_metrics_tun_status_set(
3326 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3327 const char * const status);
3329 /**************************************************************************//**
3330 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3332 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3333 * @param index The index of the IP Type-of-Service.
3334 * @param count The count.
3335 *****************************************************************************/
3336 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3340 /**************************************************************************//**
3341 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3344 * @note The property is treated as immutable: it is only valid to call
3345 * the setter once. However, we don't assert if the caller tries to
3346 * overwrite, just ignoring the update instead.
3348 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3349 * @param rtt The Large Packet Round-Trip Time to be set.
3350 *****************************************************************************/
3351 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3352 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3355 /**************************************************************************//**
3356 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3358 * @note The property is treated as immutable: it is only valid to call
3359 * the setter once. However, we don't assert if the caller tries to
3360 * overwrite, just ignoring the update instead.
3362 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3363 * @param threshold The Large Packet Threshold to be set.
3364 *****************************************************************************/
3365 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3366 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3369 /**************************************************************************//**
3370 * Set the Max Receive Bit Rate 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 rate The Max Receive Bit Rate to be set.
3378 *****************************************************************************/
3379 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3380 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3383 /**************************************************************************//**
3384 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
3386 * @note The property is treated as immutable: it is only valid to call
3387 * the setter once. However, we don't assert if the caller tries to
3388 * overwrite, just ignoring the update instead.
3390 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3391 * @param rate The Max Transmit Bit Rate to be set.
3392 *****************************************************************************/
3393 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3394 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3397 /**************************************************************************//**
3398 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3401 * @note The property is treated as immutable: it is only valid to call
3402 * the setter once. However, we don't assert if the caller tries to
3403 * overwrite, just ignoring the update instead.
3405 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3406 * @param num The Number of GTP Echo Failures to be set.
3407 *****************************************************************************/
3408 void evel_mobile_gtp_metrics_num_echo_fail_set(
3409 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3412 /**************************************************************************//**
3413 * Set the Number of GTP Tunnel Errors 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 num The Number of GTP Tunnel Errors to be set.
3422 *****************************************************************************/
3423 void evel_mobile_gtp_metrics_num_tun_fail_set(
3424 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3427 /**************************************************************************//**
3428 * Set the Number of HTTP Errors 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 num The Number of HTTP Errors to be set.
3436 *****************************************************************************/
3437 void evel_mobile_gtp_metrics_num_http_errors_set(
3438 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3441 /**************************************************************************//**
3442 * Add a TCP flag count to the 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 tcp_flag The TCP flag count to be updated.
3450 * @param count The associated flag count.
3451 *****************************************************************************/
3452 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3453 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3454 const EVEL_TCP_FLAGS tcp_flag,
3457 /**************************************************************************//**
3458 * Add a QCI COS count to the metrics.
3460 * @note The property is treated as immutable: it is only valid to call
3461 * the setter once. However, we don't assert if the caller tries to
3462 * overwrite, just ignoring the update instead.
3464 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3465 * @param qci_cos The QCI COS count to be updated.
3466 * @param count The associated QCI COS count.
3467 *****************************************************************************/
3468 void evel_mobile_gtp_metrics_qci_cos_count_add(
3469 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3470 const EVEL_QCI_COS_TYPES qci_cos,
3473 /*****************************************************************************/
3474 /*****************************************************************************/
3478 /*****************************************************************************/
3479 /*****************************************************************************/
3481 /**************************************************************************//**
3482 * Create a new Signaling event.
3484 * @note The mandatory fields on the Signaling must be supplied to
3485 * this factory function and are immutable once set. Optional fields
3486 * have explicit setter functions, but again values may only be set
3487 * once so that the event has immutable properties.
3488 * @param event_name Unique Event Name
3489 * @param event_id A universal identifier of the event for analysis etc
3490 * @param vendor_name The vendor id to encode in the event vnf field.
3491 * @param module The module to encode in the event.
3492 * @param vnfname The Virtual network function to encode in the event.
3493 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3494 * is not used (i.e. posted) it must be released using
3495 * ::evel_free_signaling.
3496 * @retval NULL Failed to create the event.
3497 *****************************************************************************/
3498 EVENT_SIGNALING * evel_new_signaling(const char* ev_name, const char *ev_id,
3499 const char * const vendor_name,
3500 const char * const correlator,
3501 const char * const local_ip_address,
3502 const char * const local_port,
3503 const char * const remote_ip_address,
3504 const char * const remote_port);
3506 /**************************************************************************//**
3507 * Free a Signaling event.
3509 * Free off the event supplied. Will free all the contained allocated memory.
3511 * @note It does not free the event itself, since that may be part of a larger
3513 *****************************************************************************/
3514 void evel_free_signaling(EVENT_SIGNALING * const event);
3516 /**************************************************************************//**
3517 * Set the Event Type property of the Signaling event.
3519 * @note The property is treated as immutable: it is only valid to call
3520 * the setter once. However, we don't assert if the caller tries to
3521 * overwrite, just ignoring the update instead.
3523 * @param event Pointer to the Signaling event.
3524 * @param type The Event Type to be set. ASCIIZ string. The caller
3525 * does not need to preserve the value once the function
3527 *****************************************************************************/
3528 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3529 const char * const type);
3531 /**************************************************************************//**
3532 * Add an additional value name/value pair to the SIP signaling.
3534 * The name and value are null delimited ASCII strings. The library takes
3535 * a copy so the caller does not have to preserve values after the function
3538 * @param event Pointer to the fault.
3539 * @param name ASCIIZ string with the attribute's name. The caller
3540 * does not need to preserve the value once the function
3542 * @param value ASCIIZ string with the attribute's value. The caller
3543 * does not need to preserve the value once the function
3545 *****************************************************************************/
3546 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3548 /**************************************************************************//**
3549 * Set the Correlator property of the Signaling event.
3551 * @note The property is treated as immutable: it is only valid to call
3552 * the setter once. However, we don't assert if the caller tries to
3553 * overwrite, just ignoring the update instead.
3555 * @param event Pointer to the Signaling event.
3556 * @param correlator The correlator to be set. ASCIIZ string. The caller
3557 * does not need to preserve the value once the function
3559 *****************************************************************************/
3560 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3561 const char * const correlator);
3563 /**************************************************************************//**
3564 * Set the Local Ip Address property of the Signaling event.
3566 * @note The property is treated as immutable: it is only valid to call
3567 * the setter once. However, we don't assert if the caller tries to
3568 * overwrite, just ignoring the update instead.
3570 * @param event Pointer to the Signaling event.
3571 * @param local_ip_address
3572 * The Local Ip Address to be set. ASCIIZ string. The
3573 * caller does not need to preserve the value once the
3575 *****************************************************************************/
3576 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3577 const char * const local_ip_address);
3579 /**************************************************************************//**
3580 * Set the Local Port property of the Signaling event.
3582 * @note The property is treated as immutable: it is only valid to call
3583 * the setter once. However, we don't assert if the caller tries to
3584 * overwrite, just ignoring the update instead.
3586 * @param event Pointer to the Signaling event.
3587 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3588 * does not need to preserve the value once the function
3590 *****************************************************************************/
3591 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3592 const char * const local_port);
3594 /**************************************************************************//**
3595 * Set the Remote Ip Address property of the Signaling event.
3597 * @note The property is treated as immutable: it is only valid to call
3598 * the setter once. However, we don't assert if the caller tries to
3599 * overwrite, just ignoring the update instead.
3601 * @param event Pointer to the Signaling event.
3602 * @param remote_ip_address
3603 * The Remote Ip Address to be set. ASCIIZ string. The
3604 * caller does not need to preserve the value once the
3606 *****************************************************************************/
3607 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3608 const char * const remote_ip_address);
3610 /**************************************************************************//**
3611 * Set the Remote Port property of the Signaling event.
3613 * @note The property is treated as immutable: it is only valid to call
3614 * the setter once. However, we don't assert if the caller tries to
3615 * overwrite, just ignoring the update instead.
3617 * @param event Pointer to the Signaling event.
3618 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3619 * does not need to preserve the value once the function
3621 *****************************************************************************/
3622 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3623 const char * const remote_port);
3624 /**************************************************************************//**
3625 * Set the Vendor module property of the Signaling event.
3627 * @note The property is treated as immutable: it is only valid to call
3628 * the setter once. However, we don't assert if the caller tries to
3629 * overwrite, just ignoring the update instead.
3631 * @param event Pointer to the Signaling event.
3632 * @param modulename The module name to be set. ASCIIZ string. The caller
3633 * does not need to preserve the value once the function
3635 *****************************************************************************/
3636 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3637 const char * const module_name);
3638 /**************************************************************************//**
3639 * Set the Vendor module property of the Signaling event.
3641 * @note The property is treated as immutable: it is only valid to call
3642 * the setter once. However, we don't assert if the caller tries to
3643 * overwrite, just ignoring the update instead.
3645 * @param event Pointer to the Signaling event.
3646 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3647 * The caller does not need to preserve the value once
3648 * the function returns.
3649 *****************************************************************************/
3650 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3651 const char * const vnfname);
3653 /**************************************************************************//**
3654 * Set the Compressed SIP property of the Signaling event.
3656 * @note The property is treated as immutable: it is only valid to call
3657 * the setter once. However, we don't assert if the caller tries to
3658 * overwrite, just ignoring the update instead.
3660 * @param event Pointer to the Signaling event.
3661 * @param compressed_sip
3662 * The Compressed SIP to be set. ASCIIZ string. The caller
3663 * does not need to preserve the value once the function
3665 *****************************************************************************/
3666 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3667 const char * const compressed_sip);
3669 /**************************************************************************//**
3670 * Set the Summary SIP property of the Signaling event.
3672 * @note The property is treated as immutable: it is only valid to call
3673 * the setter once. However, we don't assert if the caller tries to
3674 * overwrite, just ignoring the update instead.
3676 * @param event Pointer to the Signaling event.
3677 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3678 * does not need to preserve the value once the function
3680 *****************************************************************************/
3681 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3682 const char * const summary_sip);
3685 /*****************************************************************************/
3686 /*****************************************************************************/
3690 /*****************************************************************************/
3691 /*****************************************************************************/
3693 /**************************************************************************//**
3694 * Create a new State Change event.
3696 * @note The mandatory fields on the Syslog must be supplied to this factory
3697 * function and are immutable once set. Optional fields have explicit
3698 * setter functions, but again values may only be set once so that the
3699 * Syslog has immutable properties.
3701 * @param event_name Unique Event Name
3702 * @param event_id A universal identifier of the event for analysis etc
3703 * @param new_state The new state of the reporting entity.
3704 * @param old_state The old state of the reporting entity.
3705 * @param interface The card or port name of the reporting entity.
3707 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3708 * event is not used it must be released using
3709 * ::evel_free_state_change
3710 * @retval NULL Failed to create the event.
3711 *****************************************************************************/
3712 EVENT_STATE_CHANGE * evel_new_state_change(const char* ev_name, const char *ev_id,
3713 const EVEL_ENTITY_STATE new_state,
3714 const EVEL_ENTITY_STATE old_state,
3715 const char * const interface);
3717 /**************************************************************************//**
3718 * Free a State Change.
3720 * Free off the State Change supplied. Will free all the contained allocated
3723 * @note It does not free the State Change itself, since that may be part of a
3725 *****************************************************************************/
3726 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3728 /**************************************************************************//**
3729 * Set the Event Type property of the State Change.
3731 * @note The property is treated as immutable: it is only valid to call
3732 * the setter once. However, we don't assert if the caller tries to
3733 * overwrite, just ignoring the update instead.
3735 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3736 * @param type The Event Type to be set. ASCIIZ string. The caller
3737 * does not need to preserve the value once the function
3739 *****************************************************************************/
3740 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3741 const char * const type);
3743 /**************************************************************************//**
3744 * Add an additional field name/value pair to the State Change.
3746 * The name and value are null delimited ASCII strings. The library takes
3747 * a copy so the caller does not have to preserve values after the function
3750 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3751 * @param name ASCIIZ string with the attribute's name. The caller
3752 * does not need to preserve the value once the function
3754 * @param value ASCIIZ string with the attribute's value. The caller
3755 * does not need to preserve the value once the function
3757 *****************************************************************************/
3758 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3759 const char * const name,
3760 const char * const value);
3762 /*****************************************************************************/
3763 /*****************************************************************************/
3767 /*****************************************************************************/
3768 /*****************************************************************************/
3770 /**************************************************************************//**
3771 * Create a new syslog event.
3773 * @note The mandatory fields on the Syslog must be supplied to this factory
3774 * function and are immutable once set. Optional fields have explicit
3775 * setter functions, but again values may only be set once so that the
3776 * Syslog has immutable properties.
3778 * @param event_name Unique Event Name
3779 * @param event_id A universal identifier of the event for analysis etc
3780 * @param event_source_type
3785 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3786 * not used it must be released using ::evel_free_syslog
3787 * @retval NULL Failed to create the event.
3788 *****************************************************************************/
3789 EVENT_SYSLOG * evel_new_syslog(const char* ev_name, const char *ev_id,
3790 EVEL_SOURCE_TYPES event_source_type,
3791 const char * const syslog_msg,
3792 const char * const syslog_tag);
3794 /**************************************************************************//**
3795 * Set the Event Type property of the Syslog.
3797 * @note The property is treated as immutable: it is only valid to call
3798 * the setter once. However, we don't assert if the caller tries to
3799 * overwrite, just ignoring the update instead.
3801 * @param syslog Pointer to the syslog.
3802 * @param type The Event Type to be set. ASCIIZ string. The caller
3803 * does not need to preserve the value once the function
3805 *****************************************************************************/
3806 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3807 const char * const type);
3809 /**************************************************************************//**
3812 * Free off the Syslog supplied. Will free all the contained allocated memory.
3814 * @note It does not free the Syslog itself, since that may be part of a
3816 *****************************************************************************/
3817 void evel_free_syslog(EVENT_SYSLOG * event);
3819 /**************************************************************************//**
3820 * Add an additional field name/value pair to the Syslog.
3822 * The name and value are null delimited ASCII strings. The library takes
3823 * a copy so the caller does not have to preserve values after the function
3826 * @param syslog Pointer to the syslog.
3827 * @param name ASCIIZ string with the attribute's name. The caller
3828 * does not need to preserve the value once the function
3830 * @param value ASCIIZ string with the attribute's value. The caller
3831 * does not need to preserve the value once the function
3833 *****************************************************************************/
3834 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3838 /**************************************************************************//**
3839 * Set the Event Source Host property of the Syslog.
3841 * @note The property is treated as immutable: it is only valid to call
3842 * the setter once. However, we don't assert if the caller tries to
3843 * overwrite, just ignoring the update instead.
3845 * @param syslog Pointer to the Syslog.
3846 * @param host The Event Source Host to be set. ASCIIZ string. The
3847 * caller does not need to preserve the value once the
3849 *****************************************************************************/
3850 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3851 const char * const host);
3853 /**************************************************************************//**
3854 * Set the Syslog Facility property of the Syslog.
3856 * @note The property is treated as immutable: it is only valid to call
3857 * the setter once. However, we don't assert if the caller tries to
3858 * overwrite, just ignoring the update instead.
3860 * @param syslog Pointer to the Syslog.
3861 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3862 * does not need to preserve the value once the function
3864 *****************************************************************************/
3865 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3866 EVEL_SYSLOG_FACILITIES facility);
3868 /**************************************************************************//**
3869 * Set the Process property of the Syslog.
3871 * @note The property is treated as immutable: it is only valid to call
3872 * the setter once. However, we don't assert if the caller tries to
3873 * overwrite, just ignoring the update instead.
3875 * @param syslog Pointer to the Syslog.
3876 * @param proc The Process to be set. ASCIIZ string. The caller does
3877 * not need to preserve the value once the function returns.
3878 *****************************************************************************/
3879 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3881 /**************************************************************************//**
3882 * Set the Process ID property of the Syslog.
3884 * @note The property is treated as immutable: it is only valid to call
3885 * the setter once. However, we don't assert if the caller tries to
3886 * overwrite, just ignoring the update instead.
3888 * @param syslog Pointer to the Syslog.
3889 * @param proc_id The Process ID to be set.
3890 *****************************************************************************/
3891 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
3893 /**************************************************************************//**
3894 * Set the Version property of the Syslog.
3896 * @note The property is treated as immutable: it is only valid to call
3897 * the setter once. However, we don't assert if the caller tries to
3898 * overwrite, just ignoring the update instead.
3900 * @param syslog Pointer to the Syslog.
3901 * @param version The Version to be set.
3902 *****************************************************************************/
3903 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
3905 /**************************************************************************//**
3906 * Set the Structured Data property of the Syslog.
3908 * @note The property is treated as immutable: it is only valid to call
3909 * the setter once. However, we don't assert if the caller tries to
3910 * overwrite, just ignoring the update instead.
3912 * @param syslog Pointer to the Syslog.
3913 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
3914 * does not need to preserve the value once the function
3916 *****************************************************************************/
3917 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
3919 /**************************************************************************//**
3920 * Set the Structured SDID property of the Syslog.
3922 * @note The property is treated as immutable: it is only valid to call
3923 * the setter once. However, we don't assert if the caller tries to
3924 * overwrite, just ignoring the update instead.
3926 * @param syslog Pointer to the Syslog.
3927 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
3928 * Caller does not need to preserve the value once the function
3930 *****************************************************************************/
3931 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
3933 /**************************************************************************//**
3934 * Set the Structured Severity property of the Syslog.
3936 * @note The property is treated as immutable: it is only valid to call
3937 * the setter once. However, we don't assert if the caller tries to
3938 * overwrite, just ignoring the update instead.
3940 * @param syslog Pointer to the Syslog.
3941 * @param sdid The Structured Data to be set. ASCIIZ string.
3942 * Caller does not need to preserve the value once the function
3944 *****************************************************************************/
3945 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
3948 /*****************************************************************************/
3949 /*****************************************************************************/
3953 /*****************************************************************************/
3954 /*****************************************************************************/
3956 /**************************************************************************//**
3957 * Create a new other event.
3959 * @param event_name Unique Event Name
3960 * @param event_id A universal identifier of the event for analysis etc
3962 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
3963 * not used it must be released using ::evel_free_other.
3964 * @retval NULL Failed to create the event.
3965 *****************************************************************************/
3966 EVENT_OTHER * evel_new_other(const char* ev_name, const char *ev_id);
3968 /**************************************************************************//**
3971 * Free off the Other supplied. Will free all the contained allocated memory.
3973 * @note It does not free the Other itself, since that may be part of a
3975 *****************************************************************************/
3976 void evel_free_other(EVENT_OTHER * event);
3978 /**************************************************************************//**
3979 * Set the Event Type property of the Other.
3981 * @note The property is treated as immutable: it is only valid to call
3982 * the setter once. However, we don't assert if the caller tries to
3983 * overwrite, just ignoring the update instead.
3985 * @param other Pointer to the Other.
3986 * @param type The Event Type to be set. ASCIIZ string. The caller
3987 * does not need to preserve the value once the function
3989 *****************************************************************************/
3990 void evel_other_type_set(EVENT_OTHER * other,
3991 const char * const type);
3993 /**************************************************************************//**
3994 * Add a value name/value pair to the Other.
3996 * The name and value are null delimited ASCII strings. The library takes
3997 * a copy so the caller does not have to preserve values after the function
4000 * @param other Pointer to the Other.
4001 * @param name ASCIIZ string with the attribute's name.
4002 * @param value ASCIIZ string with the attribute's value.
4003 *****************************************************************************/
4004 void evel_other_field_add(EVENT_OTHER * other,
4008 /*****************************************************************************/
4009 /*****************************************************************************/
4013 /*****************************************************************************/
4014 /*****************************************************************************/
4016 /**************************************************************************//**
4017 * Return the current measurement interval provided by the Event Listener.
4019 * @returns The current measurement interval
4020 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
4022 *****************************************************************************/
4023 int evel_get_measurement_interval();
4025 /*****************************************************************************/
4026 /* Supported Report version. */
4027 /*****************************************************************************/
4028 #define EVEL_VOICEQ_MAJOR_VERSION 1
4029 #define EVEL_VOICEQ_MINOR_VERSION 1
4031 /**************************************************************************//**
4032 * End of Call Voice Quality Metrices
4033 * JSON equivalent field: endOfCallVqmSummaries
4034 *****************************************************************************/
4035 typedef struct end_of_call_vqm_summaries {
4036 /***************************************************************************/
4037 /* Mandatory fields */
4038 /***************************************************************************/
4039 char* adjacencyName;
4040 char* endpointDescription;
4042 /***************************************************************************/
4043 /* Optional fields */
4044 /***************************************************************************/
4045 EVEL_OPTION_INT endpointJitter;
4046 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
4047 EVEL_OPTION_INT endpointRtpOctetsReceived;
4048 EVEL_OPTION_INT endpointRtpOctetsSent;
4049 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
4050 EVEL_OPTION_INT endpointRtpPacketsReceived;
4051 EVEL_OPTION_INT endpointRtpPacketsSent;
4052 EVEL_OPTION_INT localJitter;
4053 EVEL_OPTION_INT localRtpOctetsDiscarded;
4054 EVEL_OPTION_INT localRtpOctetsReceived;
4055 EVEL_OPTION_INT localRtpOctetsSent;
4056 EVEL_OPTION_INT localRtpPacketsDiscarded;
4057 EVEL_OPTION_INT localRtpPacketsReceived;
4058 EVEL_OPTION_INT localRtpPacketsSent;
4059 EVEL_OPTION_INT mosCqe;
4060 EVEL_OPTION_INT packetsLost;
4061 EVEL_OPTION_INT packetLossPercent;
4062 EVEL_OPTION_INT rFactor;
4063 EVEL_OPTION_INT roundTripDelay;
4065 } END_OF_CALL_VOICE_QUALITY_METRICS;
4067 /**************************************************************************//**
4069 * JSON equivalent field: voiceQualityFields
4070 *****************************************************************************/
4072 typedef struct event_voiceQuality {
4073 /***************************************************************************/
4074 /* Header and version */
4075 /***************************************************************************/
4076 EVENT_HEADER header;
4080 /***************************************************************************/
4081 /* Mandatory fields */
4082 /***************************************************************************/
4084 char *calleeSideCodec;
4085 char *callerSideCodec;
4088 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
4089 END_OF_CALL_VOICE_QUALITY_METRICS *endOfCallVqmSummaries;
4091 /***************************************************************************/
4092 /* Optional fields */
4093 /***************************************************************************/
4094 EVEL_OPTION_STRING phoneNumber;
4095 DLIST additionalInformation;
4097 } EVENT_VOICE_QUALITY;
4098 /**************************************************************************//**
4099 * Voice Quality Additional Info.
4100 * JSON equivalent field: additionalInformation
4101 *****************************************************************************/
4102 typedef struct voice_quality_additional_info {
4105 } VOICE_QUALITY_ADDL_INFO;
4107 /**************************************************************************//**
4108 * Create a new voice quality event.
4110 * @note The mandatory fields on the Voice Quality must be supplied to this
4111 * factory function and are immutable once set. Optional fields have
4112 * explicit setter functions, but again values may only be set once
4113 * so that the Voice Quality has immutable properties.
4114 * @param event_name Unique Event Name
4115 * @param event_id A universal identifier of the event for analysis etc
4116 * @param calleeSideCodec Callee codec for the call.
4117 * @param callerSideCodec Caller codec for the call.
4118 * @param correlator Constant across all events on this call.
4119 * @param midCallRtcp Base64 encoding of the binary RTCP data
4120 * (excluding Eth/IP/UDP headers).
4121 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
4122 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
4123 * event is not used (i.e. posted) it must be released using
4124 ::evel_free_voice_quality.
4125 * @retval NULL Failed to create the event.
4126 *****************************************************************************/
4127 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char* ev_name, const char *ev_id,
4128 const char * const calleeSideCodec,
4129 const char * const callerSideCodec, const char * const correlator,
4130 const char * const midCallRtcp, const char * const vendorVnfNameFields);
4132 /**************************************************************************//**
4133 * Set the Callee side codec for Call for domain Voice Quality
4135 * @note The property is treated as immutable: it is only valid to call
4136 * the setter once. However, we don't assert if the caller tries to
4137 * overwrite, just ignoring the update instead.
4139 * @param voiceQuality Pointer to the Voice Quality Event.
4140 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
4141 * string. The caller does not need to
4142 * preserve the value once the function
4144 *****************************************************************************/
4145 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4146 const char * const calleeCodecForCall);
4148 /**************************************************************************//**
4149 * Set the Caller side codec for Call for domain Voice Quality
4151 * @note The property is treated as immutable: it is only valid to call
4152 * the setter once. However, we don't assert if the caller tries to
4153 * overwrite, just ignoring the update instead.
4155 * @param voiceQuality Pointer to the Voice Quality Event.
4156 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
4157 * string. The caller does not need to
4158 * preserve the value once the function
4160 *****************************************************************************/
4161 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4162 const char * const callerCodecForCall);
4164 /**************************************************************************//**
4165 * Set the correlator for domain Voice Quality
4167 * @note The property is treated as immutable: it is only valid to call
4168 * the setter once. However, we don't assert if the caller tries to
4169 * overwrite, just ignoring the update instead.
4171 * @param voiceQuality Pointer to the Voice Quality Event.
4172 * @param correlator The correlator value to be set. ASCIIZ
4173 * string. The caller does not need to
4174 * preserve the value once the function
4176 *****************************************************************************/
4177 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4178 const char * const vCorrelator);
4180 /**************************************************************************//**
4181 * Set the RTCP Call Data for domain Voice Quality
4183 * @note The property is treated as immutable: it is only valid to call
4184 * the setter once. However, we don't assert if the caller tries to
4185 * overwrite, just ignoring the update instead.
4187 * @param voiceQuality Pointer to the Voice Quality Event.
4188 * @param rtcpCallData The RTCP Call Data to be set. ASCIIZ
4189 * string. The caller does not need to
4190 * preserve the value once the function
4192 *****************************************************************************/
4193 void evel_voice_quality_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4194 const char * const rtcpCallData);
4196 /**************************************************************************//**
4197 * Set the Vendor VNF Name fields for domain Voice Quality
4199 * @note The property is treated as immutable: it is only valid to call
4200 * the setter once. However, we don't assert if the caller tries to
4201 * overwrite, just ignoring the update instead.
4203 * @param voiceQuality Pointer to the Voice Quality Event.
4204 * @param nameFields The Vendor, VNF and VfModule names to be set.
4205 * ASCIIZ string. The caller does not need to
4206 * preserve the value once the function
4208 *****************************************************************************/
4209 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4210 const char * const nameFields);
4212 /**************************************************************************//**
4213 * Add an End of Call Voice Quality Metrices
4215 * The adjacencyName and endpointDescription is null delimited ASCII string.
4216 * The library takes a copy so the caller does not have to preserve values
4217 * after the function returns.
4219 * @param voiceQuality Pointer to the measurement.
4220 * @param adjacencyName Adjacency name
4221 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4222 * @param endpointJitter Endpoint jitter
4223 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4224 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4225 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4226 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4227 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4228 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4229 * @param localJitter Local jitter.
4230 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4231 * @param localRtpOctetsReceived Local RTP octets received.
4232 * @param localRtpOctetsSent Local RTP octets sent.
4233 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4234 * @param localRtpPacketsReceived Local RTP packets received.
4235 * @param localRtpPacketsSent Local RTP packets sent.
4236 * @param mosCqe Decimal range from 1 to 5
4238 * @param packetsLost No Packets lost
4239 * @param packetLossPercent Calculated percentage packet loss
4240 * @param rFactor rFactor from 0 to 100
4241 * @param roundTripDelay Round trip delay in milliseconds
4242 *****************************************************************************/
4243 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4244 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4246 int endpointRtpOctetsDiscarded,
4247 int endpointRtpOctetsReceived,
4248 int endpointRtpOctetsSent,
4249 int endpointRtpPacketsDiscarded,
4250 int endpointRtpPacketsReceived,
4251 int endpointRtpPacketsSent,
4253 int localRtpOctetsDiscarded,
4254 int localRtpOctetsReceived,
4255 int localRtpOctetsSent,
4256 int localRtpPacketsDiscarded,
4257 int localRtpPacketsReceived,
4258 int localRtpPacketsSent,
4261 int packetLossPercent,
4263 int roundTripDelay);
4265 /**************************************************************************//**
4266 * Free a Voice Quality.
4268 * Free off the Voce Quality supplied. Will free all the contained allocated
4271 * @note It does not free the Voice Quality itself, since that may be part of a
4273 *****************************************************************************/
4274 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4276 /**************************************************************************//**
4277 * Add an additional value name/value pair to the Voice Quality.
4279 * The name and value are null delimited ASCII strings. The library takes
4280 * a copy so the caller does not have to preserve values after the function
4283 * @param fault Pointer to the fault.
4284 * @param name ASCIIZ string with the attribute's name. The caller
4285 * does not need to preserve the value once the function
4287 * @param value ASCIIZ string with the attribute's value. The caller
4288 * does not need to preserve the value once the function
4290 *****************************************************************************/
4291 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4294 /*****************************************************************************/
4295 /*****************************************************************************/
4297 /* THRESHOLD CROSSING ALERT */
4299 /*****************************************************************************/
4300 /*****************************************************************************/
4302 typedef enum evel_event_action {
4303 EVEL_EVENT_ACTION_CLEAR,
4304 EVEL_EVENT_ACTION_CONTINUE,
4305 EVEL_EVENT_ACTION_SET,
4306 EVEL_MAX_EVENT_ACTION
4309 typedef enum evel_alert_type {
4311 EVEL_ELEMENT_ANOMALY,
4312 EVEL_INTERFACE_ANOMALY,
4313 EVEL_SERVICE_ANOMALY,
4318 typedef struct perf_counter {
4321 char * thresholdCrossed;
4326 /*****************************************************************************/
4327 /* Supported Threshold Crossing version. */
4328 /*****************************************************************************/
4329 #define EVEL_THRESHOLD_CROSS_MAJOR_VERSION 2
4330 #define EVEL_THRESHOLD_CROSS_MINOR_VERSION 0
4332 /**************************************************************************//**
4333 * Threshold Crossing.
4334 * JSON equivalent field: Threshold Cross Fields
4335 *****************************************************************************/
4336 typedef struct event_threshold_cross {
4337 /***************************************************************************/
4338 /* Header and version */
4339 /***************************************************************************/
4340 EVENT_HEADER header;
4344 /***************************************************************************/
4345 /* Mandatory fields */
4346 /***************************************************************************/
4347 PERF_COUNTER additionalParameters;
4348 EVEL_EVENT_ACTION alertAction;
4349 char * alertDescription;
4350 EVEL_ALERT_TYPE alertType;
4351 unsigned long long collectionTimestamp;
4352 EVEL_SEVERITIES eventSeverity;
4353 unsigned long long eventStartTimestamp;
4355 /***************************************************************************/
4356 /* Optional fields */
4357 /***************************************************************************/
4358 DLIST additional_info;
4359 EVEL_OPTION_STRING alertValue;
4361 EVEL_OPTION_STRING dataCollector;
4362 EVEL_OPTION_STRING elementType;
4363 EVEL_OPTION_STRING interfaceName;
4364 EVEL_OPTION_STRING networkService;
4365 EVEL_OPTION_STRING possibleRootCause;
4367 } EVENT_THRESHOLD_CROSS;
4370 /**************************************************************************//**
4371 * Create a new Threshold Crossing Alert event.
4373 * @note The mandatory fields on the TCA must be supplied to this factory
4374 * function and are immutable once set. Optional fields have explicit
4375 * setter functions, but again values may only be set once so that the
4376 * TCA has immutable properties.
4378 * @param event_name Unique Event Name
4379 * @param event_id A universal identifier of the event for analysis etc
4380 * @param char* tcriticality Performance Counter Criticality MAJ MIN,
4381 * @param char* tname Performance Counter Threshold name
4382 * @param char* tthresholdCrossed Counter Threshold crossed value
4383 * @param char* tvalue Counter actual value
4384 * @param EVEL_EVENT_ACTION talertAction Alert set continue or clear
4385 * @param char* talertDescription
4386 * @param EVEL_ALERT_TYPE talertType Kind of anamoly
4387 * @param unsigned long long tcollectionTimestamp time at which alert was collected
4388 * @param EVEL_SEVERITIES teventSeverity Severity of Alert
4389 * @param unsigned long long teventStartTimestamp Time when this alert started
4391 * @returns pointer to the newly manufactured ::EVENT_THRESHOLD_CROSS. If the
4392 * event is not used it must be released using
4393 * ::evel_free_threshold_cross
4394 * @retval NULL Failed to create the event.
4395 *****************************************************************************/
4396 EVENT_THRESHOLD_CROSS * evel_new_threshold_cross(
4397 const char* ev_name, const char *ev_id,
4398 char * tcriticality,
4400 char * tthresholdCrossed,
4402 EVEL_EVENT_ACTION talertAction,
4403 char * talertDescription,
4404 EVEL_ALERT_TYPE talertType,
4405 unsigned long long tcollectionTimestamp,
4406 EVEL_SEVERITIES teventSeverity,
4407 unsigned long long teventStartTimestamp);
4409 /**************************************************************************//**
4410 * Free a Threshold cross event.
4412 * Free off the Threshold crossing event supplied. Will free all the contained allocated
4415 * @note It does not free the Threshold Cross itself, since that may be part of a
4417 *****************************************************************************/
4418 void evel_free_threshold_cross(EVENT_THRESHOLD_CROSS * const tcp);
4420 /**************************************************************************//**
4421 * Set the Event Type property of the Threshold Cross.
4423 * @note The property is treated as immutable: it is only valid to call
4424 * the setter once. However, we don't assert if the caller tries to
4425 * overwrite, just ignoring the update instead.
4427 * @param tcp Pointer to the ::EVENT_THRESHOLD_CROSS.
4428 * @param type The Event Type to be set. ASCIIZ string. The caller
4429 * does not need to preserve the value once the function
4431 *****************************************************************************/
4432 void evel_threshold_cross_type_set(EVENT_THRESHOLD_CROSS * const tcp, char * type);
4434 /**************************************************************************//**
4435 * Add an optional additional alertid value to Alert.
4437 * @param alertid Adds Alert ID
4438 *****************************************************************************/
4439 void evel_threshold_cross_alertid_add(EVENT_THRESHOLD_CROSS * const event,char * alertid);
4441 /**************************************************************************//**
4442 * Set the TCA probable Root cause.
4444 * @param sheader Possible root cause to Threshold
4445 *****************************************************************************/
4446 void evel_threshold_cross_possible_rootcause_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4447 /**************************************************************************//**
4448 * Set the TCA networking cause.
4450 * @param sheader Possible networking service value to Threshold
4451 *****************************************************************************/
4452 void evel_threshold_cross_networkservice_set(EVENT_THRESHOLD_CROSS * const event, char * sheader);
4453 /**************************************************************************//**
4454 * Set the TCA Interface name.
4456 * @param sheader Interface name to threshold
4457 *****************************************************************************/
4458 void evel_threshold_cross_interfacename_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4459 /**************************************************************************//**
4460 * Set the TCA Data element type.
4462 * @param sheader element type of Threshold
4463 *****************************************************************************/
4464 void evel_threshold_cross_data_elementtype_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4465 /**************************************************************************//**
4466 * Set the TCA Data collector value.
4468 * @param sheader Data collector value
4469 *****************************************************************************/
4470 void evel_threshold_cross_data_collector_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4471 /**************************************************************************//**
4472 * Set the TCA alert value.
4474 * @param sheader Possible alert value
4475 *****************************************************************************/
4476 void evel_threshold_cross_alertvalue_set(EVENT_THRESHOLD_CROSS * const event,char * sheader);
4478 /**************************************************************************//**
4479 * Add an additional field name/value pair to the THRESHOLD CROSS event.
4481 * The name and value are null delimited ASCII strings. The library takes
4482 * a copy so the caller does not have to preserve values after the function
4485 * @param state_change Pointer to the ::EVENT_THRESHOLD_CROSS.
4486 * @param name ASCIIZ string with the attribute's name. The caller
4487 * does not need to preserve the value once the function
4489 * @param value ASCIIZ string with the attribute's value. The caller
4490 * does not need to preserve the value once the function
4492 *****************************************************************************/
4493 void evel_threshold_cross_addl_info_add(EVENT_THRESHOLD_CROSS * const tcp,
4494 const char * const name,
4495 const char * const value);
4497 /*****************************************************************************/
4498 /*****************************************************************************/
4502 /*****************************************************************************/
4503 /*****************************************************************************/
4505 /*****************************************************************************/
4507 /*****************************************************************************/
4508 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4509 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4510 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4511 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4513 #define EVEL_ENTER() \
4515 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4516 debug_indent += 2; \
4518 #define EVEL_EXIT() \
4520 debug_indent -= 2; \
4521 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4524 #define INDENT_SEPARATORS \
4525 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4527 extern EVEL_LOG_LEVELS debug_level;
4528 extern int debug_indent;
4531 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4533 /**************************************************************************//**
4534 * Initialize logging
4536 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4537 * @param[in] ident The identifier for our logs.
4538 *****************************************************************************/
4539 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4541 /**************************************************************************//**
4542 * Log debug information
4544 * Logs debugging information in a platform independent manner.
4546 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4547 * @param[in] format Log formatting string in printf format.
4548 * @param[in] ... Variable argument list.
4549 *****************************************************************************/
4550 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4552 /***************************************************************************//*
4553 * Store the formatted string into the static error string and log the error.
4555 * @param format Error string in standard printf format.
4556 * @param ... Variable parameters to be substituted into the format string.
4557 *****************************************************************************/
4558 void log_error_state(char * format, ...);