3 /**************************************************************************//**
5 * Header for EVEL library
7 * This file implements the EVEL library which is intended to provide a
8 * simple wrapper around the complexity of AT&T's Vendor Event Listener API so
9 * that VNFs can use it without worrying about details of the API transport.
11 * Zero return value is success (::EVEL_SUCCESS), non-zero is failure and will
12 * be one of ::EVEL_ERR_CODES.
17 * Copyright(c) <2016>, AT&T Intellectual Property. All other rights reserved.
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are met:
22 * 1. Redistributions of source code must retain the above copyright notice,
23 * this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright notice,
25 * this list of conditions and the following disclaimer in the documentation
26 * and/or other materials provided with the distribution.
27 * 3. All advertising materials mentioning features or use of this software
28 * must display the following acknowledgement: This product includes
29 * software developed by the AT&T.
30 * 4. Neither the name of AT&T nor the names of its contributors may be used to
31 * endorse or promote products derived from this software without specific
32 * prior written permission.
34 * THIS SOFTWARE IS PROVIDED BY AT&T INTELLECTUAL PROPERTY ''AS IS'' AND ANY
35 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37 * DISCLAIMED. IN NO EVENT SHALL AT&T INTELLECTUAL PROPERTY BE LIABLE FOR ANY
38 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
43 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *****************************************************************************/
56 #include "double_list.h"
57 #include "hashtable.h"
59 /*****************************************************************************/
60 /* Supported API version. */
61 /*****************************************************************************/
62 #define EVEL_API_MAJOR_VERSION 5
63 #define EVEL_API_MINOR_VERSION 0
65 /**************************************************************************//**
68 * Error codes for EVEL low level interface
69 *****************************************************************************/
71 EVEL_SUCCESS, /** The operation was successful. */
72 EVEL_ERR_GEN_FAIL, /** Non-specific failure. */
73 EVEL_CURL_LIBRARY_FAIL, /** A cURL library operation failed. */
74 EVEL_PTHREAD_LIBRARY_FAIL, /** A Posix threads operation failed. */
75 EVEL_OUT_OF_MEMORY, /** A memory allocation failure occurred. */
76 EVEL_EVENT_BUFFER_FULL, /** Too many events in the ring-buffer. */
77 EVEL_EVENT_HANDLER_INACTIVE, /** Attempt to raise event when inactive. */
78 EVEL_NO_METADATA, /** Failed to retrieve OpenStack metadata. */
79 EVEL_BAD_METADATA, /** OpenStack metadata invalid format. */
80 EVEL_BAD_JSON_FORMAT, /** JSON failed to parse correctly. */
81 EVEL_JSON_KEY_NOT_FOUND, /** Failed to find the specified JSON key. */
82 EVEL_MAX_ERROR_CODES /** Maximum number of valid error codes. */
85 /**************************************************************************//**
88 * Variable levels of verbosity in the logging functions.
89 *****************************************************************************/
99 /*****************************************************************************/
100 /* Maximum string lengths. */
101 /*****************************************************************************/
102 #define EVEL_MAX_STRING_LEN 4096
103 #define EVEL_MAX_JSON_BODY 16000
104 #define EVEL_MAX_ERROR_STRING_LEN 255
105 #define EVEL_MAX_URL_LEN 511
107 /**************************************************************************//**
108 * This value represents there being no restriction on the reporting interval.
109 *****************************************************************************/
110 static const int EVEL_MEASUREMENT_INTERVAL_UKNOWN = 0;
112 /**************************************************************************//**
113 * How many events can be backed-up before we start dropping events on the
116 * @note This value should be tuned in accordance with expected burstiness of
117 * the event load and the expected response time of the ECOMP event
118 * listener so that the probability of the buffer filling is suitably
120 *****************************************************************************/
121 static const int EVEL_EVENT_BUFFER_DEPTH = 100;
123 /*****************************************************************************/
124 /* How many different IP Types-of-Service are supported. */
125 /*****************************************************************************/
126 #define EVEL_TOS_SUPPORTED 256
128 /**************************************************************************//**
129 * Event domains for the various events we support.
130 * JSON equivalent field: domain
131 *****************************************************************************/
133 EVEL_DOMAIN_INTERNAL, /** Internal event, not for external routing. */
134 EVEL_DOMAIN_HEARTBEAT, /** A Heartbeat event (event header only). */
135 EVEL_DOMAIN_FAULT, /** A Fault event. */
136 EVEL_DOMAIN_MEASUREMENT, /** A Measurement for VF Scaling event. */
137 EVEL_DOMAIN_MOBILE_FLOW, /** A Mobile Flow event. */
138 EVEL_DOMAIN_REPORT, /** A Measurement for VF Reporting event. */
139 EVEL_DOMAIN_HEARTBEAT_FIELD,/** A Heartbeat field event. */
140 EVEL_DOMAIN_SIPSIGNALING, /** A Signaling event. */
141 EVEL_DOMAIN_STATE_CHANGE, /** A State Change event. */
142 EVEL_DOMAIN_SYSLOG, /** A Syslog event. */
143 EVEL_DOMAIN_OTHER, /** Another event. */
144 EVEL_DOMAIN_VOICE_QUALITY, /** A Voice Quality Event */
145 EVEL_MAX_DOMAINS /** Maximum number of recognized Event types. */
146 } EVEL_EVENT_DOMAINS;
148 /**************************************************************************//**
150 * JSON equivalent field: priority
151 *****************************************************************************/
154 EVEL_PRIORITY_MEDIUM,
155 EVEL_PRIORITY_NORMAL,
158 } EVEL_EVENT_PRIORITIES;
160 /**************************************************************************//**
161 * Fault / Threshold severities.
162 * JSON equivalent field: eventSeverity
163 *****************************************************************************/
165 EVEL_SEVERITY_CRITICAL,
168 EVEL_SEVERITY_WARNING,
169 EVEL_SEVERITY_NORMAL,
173 /**************************************************************************//**
174 * Fault source types.
175 * JSON equivalent field: eventSourceType
176 *****************************************************************************/
184 EVEL_SOURCE_SLOT_THRESHOLD,
185 EVEL_SOURCE_PORT_THRESHOLD,
186 EVEL_SOURCE_VIRTUAL_MACHINE,
187 EVEL_SOURCE_VIRTUAL_NETWORK_FUNCTION,
188 /***************************************************************************/
189 /* START OF VENDOR-SPECIFIC VALUES */
191 /* Vendor-specific values should be added here, and handled appropriately */
192 /* in evel_event.c. */
193 /***************************************************************************/
195 /***************************************************************************/
196 /* END OF VENDOR-SPECIFIC VALUES */
197 /***************************************************************************/
198 EVEL_MAX_SOURCE_TYPES
201 /**************************************************************************//**
203 * JSON equivalent field: vfStatus
204 *****************************************************************************/
206 EVEL_VF_STATUS_ACTIVE,
208 EVEL_VF_STATUS_PREP_TERMINATE,
209 EVEL_VF_STATUS_READY_TERMINATE,
210 EVEL_VF_STATUS_REQ_TERMINATE,
214 /**************************************************************************//**
215 * Counter criticalities.
216 * JSON equivalent field: criticality
217 *****************************************************************************/
219 EVEL_COUNTER_CRITICALITY_CRIT,
220 EVEL_COUNTER_CRITICALITY_MAJ,
221 EVEL_MAX_COUNTER_CRITICALITIES
222 } EVEL_COUNTER_CRITICALITIES;
224 /**************************************************************************//**
226 * JSON equivalent field: alertAction
227 *****************************************************************************/
229 EVEL_ALERT_ACTION_CLEAR,
230 EVEL_ALERT_ACTION_CONT,
231 EVEL_ALERT_ACTION_SET,
232 EVEL_MAX_ALERT_ACTIONS
233 } EVEL_ALERT_ACTIONS;
235 /**************************************************************************//**
237 * JSON equivalent field: alertType
238 *****************************************************************************/
240 EVEL_ALERT_TYPE_CARD,
241 EVEL_ALERT_TYPE_ELEMENT,
242 EVEL_ALERT_TYPE_INTERFACE,
243 EVEL_ALERT_TYPE_SERVICE,
247 /**************************************************************************//**
249 * JSON equivalent fields: newState, oldState
250 *****************************************************************************/
252 EVEL_ENTITY_STATE_IN_SERVICE,
253 EVEL_ENTITY_STATE_MAINTENANCE,
254 EVEL_ENTITY_STATE_OUT_OF_SERVICE,
255 EVEL_MAX_ENTITY_STATES
258 /**************************************************************************//**
260 * JSON equivalent field: syslogFacility
261 *****************************************************************************/
263 EVEL_SYSLOG_FACILITY_KERNEL,
264 EVEL_SYSLOG_FACILITY_USER,
265 EVEL_SYSLOG_FACILITY_MAIL,
266 EVEL_SYSLOG_FACILITY_SYSTEM_DAEMON,
267 EVEL_SYSLOG_FACILITY_SECURITY_AUTH,
268 EVEL_SYSLOG_FACILITY_INTERNAL,
269 EVEL_SYSLOG_FACILITY_LINE_PRINTER,
270 EVEL_SYSLOG_FACILITY_NETWORK_NEWS,
271 EVEL_SYSLOG_FACILITY_UUCP,
272 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON,
273 EVEL_SYSLOG_FACILITY_SECURITY_AUTH2,
274 EVEL_SYSLOG_FACILITY_FTP_DAEMON,
275 EVEL_SYSLOG_FACILITY_NTP,
276 EVEL_SYSLOG_FACILITY_LOG_AUDIT,
277 EVEL_SYSLOG_FACILITY_LOG_ALERT,
278 EVEL_SYSLOG_FACILITY_CLOCK_DAEMON2,
279 EVEL_SYSLOG_FACILITY_LOCAL0,
280 EVEL_SYSLOG_FACILITY_LOCAL1,
281 EVEL_SYSLOG_FACILITY_LOCAL2,
282 EVEL_SYSLOG_FACILITY_LOCAL3,
283 EVEL_SYSLOG_FACILITY_LOCAL4,
284 EVEL_SYSLOG_FACILITY_LOCAL5,
285 EVEL_SYSLOG_FACILITY_LOCAL6,
286 EVEL_SYSLOG_FACILITY_LOCAL7,
287 EVEL_MAX_SYSLOG_FACILITIES
288 } EVEL_SYSLOG_FACILITIES;
290 /**************************************************************************//**
292 * JSON equivalent fields: tcpFlagCountList, tcpFlagList
293 *****************************************************************************/
307 /**************************************************************************//**
308 * Mobile QCI Classes of Service.
309 * JSON equivalent fields: mobileQciCosCountList, mobileQciCosList
310 *****************************************************************************/
313 /***************************************************************************/
314 /* UMTS Classes of Service. */
315 /***************************************************************************/
316 EVEL_QCI_COS_UMTS_CONVERSATIONAL,
317 EVEL_QCI_COS_UMTS_STREAMING,
318 EVEL_QCI_COS_UMTS_INTERACTIVE,
319 EVEL_QCI_COS_UMTS_BACKGROUND,
321 /***************************************************************************/
322 /* LTE Classes of Service. */
323 /***************************************************************************/
337 EVEL_MAX_QCI_COS_TYPES
338 } EVEL_QCI_COS_TYPES;
340 /**************************************************************************//**
341 * Service Event endpoint description
342 * JSON equivalent field: endpointDesc
343 *****************************************************************************/
345 EVEL_SERVICE_ENDPOINT_CALLEE,
346 EVEL_SERVICE_ENDPOINT_CALLER,
347 EVEL_MAX_SERVICE_ENDPOINT_DESC
348 } EVEL_SERVICE_ENDPOINT_DESC;
350 /**************************************************************************//**
351 * Boolean type for EVEL library.
352 *****************************************************************************/
358 /**************************************************************************//**
359 * Optional parameter holder for double.
360 *****************************************************************************/
361 typedef struct evel_option_double
365 } EVEL_OPTION_DOUBLE;
367 /**************************************************************************//**
368 * Optional parameter holder for string.
369 *****************************************************************************/
370 typedef struct evel_option_string
374 } EVEL_OPTION_STRING;
376 /**************************************************************************//**
377 * Optional parameter holder for int.
378 *****************************************************************************/
379 typedef struct evel_option_int
385 /**************************************************************************//**
386 * Optional parameter holder for unsigned long long.
387 *****************************************************************************/
388 typedef struct evel_option_ull
390 unsigned long long value;
394 /**************************************************************************//**
395 * Optional parameter holder for time_t.
396 *****************************************************************************/
397 typedef struct evel_option_time
403 /**************************************************************************//**
404 * enrichment fields for internal VES Event Listener service use only,
405 * not supplied by event sources
406 *****************************************************************************/
407 typedef struct internal_header_fields
411 } EVEL_OPTION_INTHEADER_FIELDS;
413 /*****************************************************************************/
414 /* Supported Common Event Header version. */
415 /*****************************************************************************/
416 #define EVEL_HEADER_MAJOR_VERSION 1
417 #define EVEL_HEADER_MINOR_VERSION 2
419 /**************************************************************************//**
421 * JSON equivalent field: commonEventHeader
422 *****************************************************************************/
423 typedef struct event_header {
424 /***************************************************************************/
426 /***************************************************************************/
430 /***************************************************************************/
431 /* Mandatory fields */
432 /***************************************************************************/
433 EVEL_EVENT_DOMAINS event_domain;
437 char * reporting_entity_name;
438 EVEL_EVENT_PRIORITIES priority;
439 unsigned long long start_epoch_microsec;
440 unsigned long long last_epoch_microsec;
443 /***************************************************************************/
444 /* Optional fields */
445 /***************************************************************************/
446 EVEL_OPTION_STRING event_type;
447 EVEL_OPTION_STRING source_id;
448 EVEL_OPTION_STRING reporting_entity_id;
449 EVEL_OPTION_INTHEADER_FIELDS internal_field;
450 EVEL_OPTION_STRING nfcnaming_code;
451 EVEL_OPTION_STRING nfnaming_code;
455 /*****************************************************************************/
456 /* Supported Fault version. */
457 /*****************************************************************************/
458 #define EVEL_FAULT_MAJOR_VERSION 2
459 #define EVEL_FAULT_MINOR_VERSION 1
461 /**************************************************************************//**
463 * JSON equivalent field: faultFields
464 *****************************************************************************/
465 typedef struct event_fault {
466 /***************************************************************************/
467 /* Header and version */
468 /***************************************************************************/
473 /***************************************************************************/
474 /* Mandatory fields */
475 /***************************************************************************/
476 EVEL_SEVERITIES event_severity;
477 EVEL_SOURCE_TYPES event_source_type;
478 char * alarm_condition;
479 char * specific_problem;
480 EVEL_VF_STATUSES vf_status;
482 /***************************************************************************/
483 /* Optional fields */
484 /***************************************************************************/
485 EVEL_OPTION_STRING category;
486 EVEL_OPTION_STRING alarm_interface_a;
487 DLIST additional_info;
491 /**************************************************************************//**
492 * Fault Additional Info.
493 * JSON equivalent field: alarmAdditionalInformation
494 *****************************************************************************/
495 typedef struct fault_additional_info {
501 /**************************************************************************//**
502 * optional field block for fields specific to heartbeat events
503 *****************************************************************************/
504 typedef struct event_heartbeat_fields
506 /***************************************************************************/
507 /* Header and version */
508 /***************************************************************************/
513 /***************************************************************************/
514 /* Mandatory fields */
515 /***************************************************************************/
516 double heartbeat_version;
517 int heartbeat_interval;
519 /***************************************************************************/
520 /* Optional fields */
521 /***************************************************************************/
522 DLIST additional_info;
524 } EVENT_HEARTBEAT_FIELD;
526 /**************************************************************************//**
527 * tuple which provides the name of a key along with its value and
529 *****************************************************************************/
530 typedef struct internal_key
533 EVEL_OPTION_INT keyorder;
534 EVEL_OPTION_STRING keyvalue;
537 /**************************************************************************//**
538 * meta-information about an instance of a jsonObject along with
539 * the actual object instance
540 *****************************************************************************/
541 typedef struct json_object_instance
545 unsigned long long objinst_epoch_microsec;
546 DLIST object_keys; /*EVEL_INTERNAL_KEY list */
548 } EVEL_JSON_OBJECT_INSTANCE;
549 #define MAX_JSON_TOKENS 128
550 /**************************************************************************//**
551 * Create a new json object instance.
553 * @note The mandatory fields on the Other must be supplied to this factory
554 * function and are immutable once set. Optional fields have explicit
555 * setter functions, but again values may only be set once so that the
556 * Other has immutable properties.
557 * @param yourjson json string.
558 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT_INSTANCE.
559 * not used (i.e. posted) it must be released using ::evel_free_jsonobjectinstance.
560 * @retval NULL Failed to create the json object instance.
561 *****************************************************************************/
562 EVEL_JSON_OBJECT_INSTANCE * evel_new_jsonobjinstance(const char *const yourjson);
563 /**************************************************************************//**
564 * Free an json object instance.
566 * Free off the json object instance supplied.
567 * Will free all the contained allocated memory.
569 *****************************************************************************/
570 void evel_free_jsonobjinst(EVEL_JSON_OBJECT_INSTANCE * objinst);
572 /**************************************************************************//**
573 * enrichment fields for internal VES Event Listener service use only,
574 * not supplied by event sources
575 *****************************************************************************/
576 typedef struct json_object
580 EVEL_OPTION_STRING objectschema;
581 EVEL_OPTION_STRING objectschemaurl;
582 EVEL_OPTION_STRING nfsubscribedobjname;
583 EVEL_OPTION_STRING nfsubscriptionid;
584 DLIST jsonobjectinstances; /* EVEL_JSON_OBJECT_INSTANCE list */
588 /**************************************************************************//**
589 * Create a new json object.
591 * @note The mandatory fields on the Other must be supplied to this factory
592 * function and are immutable once set. Optional fields have explicit
593 * setter functions, but again values may only be set once so that the
594 * Other has immutable properties.
595 * @param name name of the object.
596 * @returns pointer to the newly manufactured ::EVEL_JSON_OBJECT.
597 * not used (i.e. posted) it must be released using ::evel_free_jsonobject.
598 * @retval NULL Failed to create the json object.
599 *****************************************************************************/
600 EVEL_JSON_OBJECT * evel_new_jsonobject(const char *const name);
601 /**************************************************************************//**
602 * Free an json object.
604 * Free off the json object instance supplied.
605 * Will free all the contained allocated memory.
607 *****************************************************************************/
608 void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj);
609 /*****************************************************************************/
610 /* Supported Measurement version. */
611 /*****************************************************************************/
612 #define EVEL_MEASUREMENT_MAJOR_VERSION 2
613 #define EVEL_MEASUREMENT_MINOR_VERSION 1
615 /**************************************************************************//**
617 * JSON equivalent field: errors
618 *****************************************************************************/
619 typedef struct measurement_errors {
620 int receive_discards;
622 int transmit_discards;
624 } MEASUREMENT_ERRORS;
626 /**************************************************************************//**
628 * JSON equivalent field: measurementsForVfScalingFields
629 *****************************************************************************/
630 typedef struct event_measurement {
631 /***************************************************************************/
632 /* Header and version */
633 /***************************************************************************/
638 /***************************************************************************/
639 /* Mandatory fields */
640 /***************************************************************************/
641 double measurement_interval;
643 /***************************************************************************/
644 /* Optional fields */
645 /***************************************************************************/
646 DLIST additional_info;
647 DLIST additional_measurements;
648 DLIST additional_objects;
650 EVEL_OPTION_INT concurrent_sessions;
651 EVEL_OPTION_INT configured_entities;
654 MEASUREMENT_ERRORS * errors;
656 DLIST filesystem_usage;
657 DLIST latency_distribution;
658 EVEL_OPTION_DOUBLE mean_request_latency;
660 EVEL_OPTION_INT media_ports_in_use;
661 EVEL_OPTION_INT request_rate;
662 EVEL_OPTION_INT vnfc_scaling_metric;
667 /**************************************************************************//**
669 * JSON equivalent field: cpuUsage
670 *****************************************************************************/
671 typedef struct measurement_cpu_use {
674 EVEL_OPTION_DOUBLE idle;
675 EVEL_OPTION_DOUBLE intrpt;
676 EVEL_OPTION_DOUBLE nice;
677 EVEL_OPTION_DOUBLE softirq;
678 EVEL_OPTION_DOUBLE steal;
679 EVEL_OPTION_DOUBLE sys;
680 EVEL_OPTION_DOUBLE user;
681 EVEL_OPTION_DOUBLE wait;
682 } MEASUREMENT_CPU_USE;
685 /**************************************************************************//**
687 * JSON equivalent field: diskUsage
688 *****************************************************************************/
689 typedef struct measurement_disk_use {
691 EVEL_OPTION_DOUBLE iotimeavg;
692 EVEL_OPTION_DOUBLE iotimelast;
693 EVEL_OPTION_DOUBLE iotimemax;
694 EVEL_OPTION_DOUBLE iotimemin;
695 EVEL_OPTION_DOUBLE mergereadavg;
696 EVEL_OPTION_DOUBLE mergereadlast;
697 EVEL_OPTION_DOUBLE mergereadmax;
698 EVEL_OPTION_DOUBLE mergereadmin;
699 EVEL_OPTION_DOUBLE mergewriteavg;
700 EVEL_OPTION_DOUBLE mergewritelast;
701 EVEL_OPTION_DOUBLE mergewritemax;
702 EVEL_OPTION_DOUBLE mergewritemin;
703 EVEL_OPTION_DOUBLE octetsreadavg;
704 EVEL_OPTION_DOUBLE octetsreadlast;
705 EVEL_OPTION_DOUBLE octetsreadmax;
706 EVEL_OPTION_DOUBLE octetsreadmin;
707 EVEL_OPTION_DOUBLE octetswriteavg;
708 EVEL_OPTION_DOUBLE octetswritelast;
709 EVEL_OPTION_DOUBLE octetswritemax;
710 EVEL_OPTION_DOUBLE octetswritemin;
711 EVEL_OPTION_DOUBLE opsreadavg;
712 EVEL_OPTION_DOUBLE opsreadlast;
713 EVEL_OPTION_DOUBLE opsreadmax;
714 EVEL_OPTION_DOUBLE opsreadmin;
715 EVEL_OPTION_DOUBLE opswriteavg;
716 EVEL_OPTION_DOUBLE opswritelast;
717 EVEL_OPTION_DOUBLE opswritemax;
718 EVEL_OPTION_DOUBLE opswritemin;
719 EVEL_OPTION_DOUBLE pendingopsavg;
720 EVEL_OPTION_DOUBLE pendingopslast;
721 EVEL_OPTION_DOUBLE pendingopsmax;
722 EVEL_OPTION_DOUBLE pendingopsmin;
723 EVEL_OPTION_DOUBLE timereadavg;
724 EVEL_OPTION_DOUBLE timereadlast;
725 EVEL_OPTION_DOUBLE timereadmax;
726 EVEL_OPTION_DOUBLE timereadmin;
727 EVEL_OPTION_DOUBLE timewriteavg;
728 EVEL_OPTION_DOUBLE timewritelast;
729 EVEL_OPTION_DOUBLE timewritemax;
730 EVEL_OPTION_DOUBLE timewritemin;
732 } MEASUREMENT_DISK_USE;
734 /**************************************************************************//**
735 * Add an additional Disk usage value name/value pair to the Measurement.
737 * The name and value are null delimited ASCII strings. The library takes
738 * a copy so the caller does not have to preserve values after the function
741 * @param measurement Pointer to the measurement.
742 * @param id ASCIIZ string with the CPU's identifier.
743 * @param usage Disk utilization.
744 *****************************************************************************/
745 MEASUREMENT_DISK_USE * evel_measurement_new_disk_use_add(EVENT_MEASUREMENT * measurement, char * id);
747 /**************************************************************************//**
749 * JSON equivalent field: filesystemUsage
750 *****************************************************************************/
751 typedef struct measurement_fsys_use {
752 char * filesystem_name;
753 double block_configured;
756 double ephemeral_configured;
758 double ephemeral_used;
759 } MEASUREMENT_FSYS_USE;
761 /**************************************************************************//**
763 * JSON equivalent field: memoryUsage
764 *****************************************************************************/
765 typedef struct measurement_mem_use {
769 EVEL_OPTION_DOUBLE memcache;
770 EVEL_OPTION_DOUBLE memconfig;
771 EVEL_OPTION_DOUBLE memfree;
772 EVEL_OPTION_DOUBLE slabrecl;
773 EVEL_OPTION_DOUBLE slabunrecl;
774 EVEL_OPTION_DOUBLE memused;
775 } MEASUREMENT_MEM_USE;
777 /**************************************************************************//**
778 * Add an additional Memory usage value name/value pair to the Measurement.
780 * The name and value are null delimited ASCII strings. The library takes
781 * a copy so the caller does not have to preserve values after the function
784 * @param measurement Pointer to the measurement.
785 * @param id ASCIIZ string with the Memory identifier.
786 * @param vmidentifier ASCIIZ string with the VM's identifier.
787 * @param membuffsz Memory Size.
789 * @return Returns pointer to memory use structure in measurements
790 *****************************************************************************/
791 MEASUREMENT_MEM_USE * evel_measurement_new_mem_use_add(EVENT_MEASUREMENT * measurement,
792 char * id, char *vmidentifier, double membuffsz);
794 /**************************************************************************//**
795 * Set kilobytes of memory used for cache
797 * @note The property is treated as immutable: it is only valid to call
798 * the setter once. However, we don't assert if the caller tries to
799 * overwrite, just ignoring the update instead.
801 * @param mem_use Pointer to the Memory Use.
803 *****************************************************************************/
804 void evel_measurement_mem_use_memcache_set(MEASUREMENT_MEM_USE * const mem_use,
806 /**************************************************************************//**
807 * Set kilobytes of memory configured in the virtual machine on which the VNFC reporting
809 * @note The property is treated as immutable: it is only valid to call
810 * the setter once. However, we don't assert if the caller tries to
811 * overwrite, just ignoring the update instead.
813 * @param mem_use Pointer to the Memory Use.
815 *****************************************************************************/
816 void evel_measurement_mem_use_memconfig_set(MEASUREMENT_MEM_USE * const mem_use,
818 /**************************************************************************//**
819 * Set kilobytes of physical RAM left unused by the system
821 * @note The property is treated as immutable: it is only valid to call
822 * the setter once. However, we don't assert if the caller tries to
823 * overwrite, just ignoring the update instead.
825 * @param mem_use Pointer to the Memory Use.
827 *****************************************************************************/
828 void evel_measurement_mem_use_memfree_set(MEASUREMENT_MEM_USE * const mem_use,
830 /**************************************************************************//**
831 * Set the part of the slab that can be reclaimed such as caches measured in kilobytes
833 * @note The property is treated as immutable: it is only valid to call
834 * the setter once. However, we don't assert if the caller tries to
835 * overwrite, just ignoring the update instead.
837 * @param mem_use Pointer to the Memory Use.
839 *****************************************************************************/
840 void evel_measurement_mem_use_slab_reclaimed_set(MEASUREMENT_MEM_USE * const mem_use,
842 /**************************************************************************//**
843 * Set the part of the slab that cannot be reclaimed such as caches measured in kilobytes
845 * @note The property is treated as immutable: it is only valid to call
846 * the setter once. However, we don't assert if the caller tries to
847 * overwrite, just ignoring the update instead.
849 * @param mem_use Pointer to the Memory Use.
851 *****************************************************************************/
852 void evel_measurement_mem_use_slab_unreclaimable_set(MEASUREMENT_MEM_USE * const mem_use,
854 /**************************************************************************//**
855 * Set the total memory minus the sum of free, buffered, cached and slab memory in kilobytes
857 * @note The property is treated as immutable: it is only valid to call
858 * the setter once. However, we don't assert if the caller tries to
859 * overwrite, just ignoring the update instead.
861 * @param mem_use Pointer to the Memory Use.
863 *****************************************************************************/
864 void evel_measurement_mem_use_usedup_set(MEASUREMENT_MEM_USE * const mem_use,
866 /**************************************************************************//**
868 * JSON equivalent field: latencyBucketMeasure
869 *****************************************************************************/
870 typedef struct measurement_latency_bucket {
873 /***************************************************************************/
874 /* Optional fields */
875 /***************************************************************************/
876 EVEL_OPTION_DOUBLE high_end;
877 EVEL_OPTION_DOUBLE low_end;
879 } MEASUREMENT_LATENCY_BUCKET;
881 /**************************************************************************//**
883 * JSON equivalent field: vNicUsage
884 *****************************************************************************/
885 typedef struct measurement_vnic_performance {
886 /***************************************************************************/
887 /* Optional fields */
888 /***************************************************************************/
889 /*Cumulative count of broadcast packets received as read at the end of
890 the measurement interval*/
891 EVEL_OPTION_DOUBLE recvd_bcast_packets_acc;
892 /*Count of broadcast packets received within the measurement interval*/
893 EVEL_OPTION_DOUBLE recvd_bcast_packets_delta;
894 /*Cumulative count of discarded packets received as read at the end of
895 the measurement interval*/
896 EVEL_OPTION_DOUBLE recvd_discarded_packets_acc;
897 /*Count of discarded packets received within the measurement interval*/
898 EVEL_OPTION_DOUBLE recvd_discarded_packets_delta;
899 /*Cumulative count of error packets received as read at the end of
900 the measurement interval*/
901 EVEL_OPTION_DOUBLE recvd_error_packets_acc;
902 /*Count of error packets received within the measurement interval*/
903 EVEL_OPTION_DOUBLE recvd_error_packets_delta;
904 /*Cumulative count of multicast packets received as read at the end of
905 the measurement interval*/
906 EVEL_OPTION_DOUBLE recvd_mcast_packets_acc;
907 /*Count of mcast packets received within the measurement interval*/
908 EVEL_OPTION_DOUBLE recvd_mcast_packets_delta;
909 /*Cumulative count of octets received as read at the end of
910 the measurement interval*/
911 EVEL_OPTION_DOUBLE recvd_octets_acc;
912 /*Count of octets received within the measurement interval*/
913 EVEL_OPTION_DOUBLE recvd_octets_delta;
914 /*Cumulative count of all packets received as read at the end of
915 the measurement interval*/
916 EVEL_OPTION_DOUBLE recvd_total_packets_acc;
917 /*Count of all packets received within the measurement interval*/
918 EVEL_OPTION_DOUBLE recvd_total_packets_delta;
919 /*Cumulative count of unicast packets received as read at the end of
920 the measurement interval*/
921 EVEL_OPTION_DOUBLE recvd_ucast_packets_acc;
922 /*Count of unicast packets received within the measurement interval*/
923 EVEL_OPTION_DOUBLE recvd_ucast_packets_delta;
924 /*Cumulative count of transmitted broadcast packets at the end of
925 the measurement interval*/
926 EVEL_OPTION_DOUBLE tx_bcast_packets_acc;
927 /*Count of transmitted broadcast packets within the measurement interval*/
928 EVEL_OPTION_DOUBLE tx_bcast_packets_delta;
929 /*Cumulative count of transmit discarded packets at the end of
930 the measurement interval*/
931 EVEL_OPTION_DOUBLE tx_discarded_packets_acc;
932 /*Count of transmit discarded packets within the measurement interval*/
933 EVEL_OPTION_DOUBLE tx_discarded_packets_delta;
934 /*Cumulative count of transmit error packets at the end of
935 the measurement interval*/
936 EVEL_OPTION_DOUBLE tx_error_packets_acc;
937 /*Count of transmit error packets within the measurement interval*/
938 EVEL_OPTION_DOUBLE tx_error_packets_delta;
939 /*Cumulative count of transmit multicast packets at the end of
940 the measurement interval*/
941 EVEL_OPTION_DOUBLE tx_mcast_packets_acc;
942 /*Count of transmit multicast packets within the measurement interval*/
943 EVEL_OPTION_DOUBLE tx_mcast_packets_delta;
944 /*Cumulative count of transmit octets at the end of
945 the measurement interval*/
946 EVEL_OPTION_DOUBLE tx_octets_acc;
947 /*Count of transmit octets received within the measurement interval*/
948 EVEL_OPTION_DOUBLE tx_octets_delta;
949 /*Cumulative count of all transmit packets at the end of
950 the measurement interval*/
951 EVEL_OPTION_DOUBLE tx_total_packets_acc;
952 /*Count of transmit packets within the measurement interval*/
953 EVEL_OPTION_DOUBLE tx_total_packets_delta;
954 /*Cumulative count of all transmit unicast packets at the end of
955 the measurement interval*/
956 EVEL_OPTION_DOUBLE tx_ucast_packets_acc;
957 /*Count of transmit unicast packets within the measurement interval*/
958 EVEL_OPTION_DOUBLE tx_ucast_packets_delta;
959 /* Indicates whether vNicPerformance values are likely inaccurate
960 due to counter overflow or other condtions*/
961 char *valuesaresuspect;
964 } MEASUREMENT_VNIC_PERFORMANCE;
966 /**************************************************************************//**
968 * JSON equivalent field: codecsInUse
969 *****************************************************************************/
970 typedef struct measurement_codec_use {
973 } MEASUREMENT_CODEC_USE;
975 /**************************************************************************//**
977 * JSON equivalent field: featuresInUse
978 *****************************************************************************/
979 typedef struct measurement_feature_use {
981 int feature_utilization;
982 } MEASUREMENT_FEATURE_USE;
984 /**************************************************************************//**
986 * JSON equivalent field: additionalMeasurements
987 *****************************************************************************/
988 typedef struct measurement_group {
993 /**************************************************************************//**
994 * Custom Defined Measurement.
995 * JSON equivalent field: measurements
996 *****************************************************************************/
997 typedef struct custom_measurement {
1000 } CUSTOM_MEASUREMENT;
1002 /*****************************************************************************/
1003 /* Supported Report version. */
1004 /*****************************************************************************/
1005 #define EVEL_REPORT_MAJOR_VERSION 1
1006 #define EVEL_REPORT_MINOR_VERSION 1
1008 /**************************************************************************//**
1010 * JSON equivalent field: measurementsForVfReportingFields
1012 * @note This is an experimental event type and is not currently a formal part
1013 * of AT&T's specification.
1014 *****************************************************************************/
1015 typedef struct event_report {
1016 /***************************************************************************/
1017 /* Header and version */
1018 /***************************************************************************/
1019 EVENT_HEADER header;
1023 /***************************************************************************/
1024 /* Mandatory fields */
1025 /***************************************************************************/
1026 double measurement_interval;
1028 /***************************************************************************/
1029 /* Optional fields */
1030 /***************************************************************************/
1031 DLIST feature_usage;
1032 DLIST measurement_groups;
1036 /**************************************************************************//**
1037 * Mobile GTP Per Flow Metrics.
1038 * JSON equivalent field: gtpPerFlowMetrics
1039 *****************************************************************************/
1040 typedef struct mobile_gtp_per_flow_metrics {
1041 double avg_bit_error_rate;
1042 double avg_packet_delay_variation;
1043 int avg_packet_latency;
1044 int avg_receive_throughput;
1045 int avg_transmit_throughput;
1046 int flow_activation_epoch;
1047 int flow_activation_microsec;
1048 int flow_deactivation_epoch;
1049 int flow_deactivation_microsec;
1050 time_t flow_deactivation_time;
1052 int max_packet_delay_variation;
1053 int num_activation_failures;
1055 int num_bytes_received;
1056 int num_bytes_transmitted;
1057 int num_dropped_packets;
1058 int num_l7_bytes_received;
1059 int num_l7_bytes_transmitted;
1060 int num_lost_packets;
1061 int num_out_of_order_packets;
1062 int num_packet_errors;
1063 int num_packets_received_excl_retrans;
1064 int num_packets_received_incl_retrans;
1065 int num_packets_transmitted_incl_retrans;
1068 int num_tunneled_l7_bytes_received;
1069 int round_trip_time;
1070 int time_to_first_byte;
1072 /***************************************************************************/
1073 /* Optional fields */
1074 /***************************************************************************/
1075 EVEL_OPTION_INT ip_tos_counts[EVEL_TOS_SUPPORTED];
1076 EVEL_OPTION_INT tcp_flag_counts[EVEL_MAX_TCP_FLAGS];
1077 EVEL_OPTION_INT qci_cos_counts[EVEL_MAX_QCI_COS_TYPES];
1078 EVEL_OPTION_INT dur_connection_failed_status;
1079 EVEL_OPTION_INT dur_tunnel_failed_status;
1080 EVEL_OPTION_STRING flow_activated_by;
1081 EVEL_OPTION_TIME flow_activation_time;
1082 EVEL_OPTION_STRING flow_deactivated_by;
1083 EVEL_OPTION_STRING gtp_connection_status;
1084 EVEL_OPTION_STRING gtp_tunnel_status;
1085 EVEL_OPTION_INT large_packet_rtt;
1086 EVEL_OPTION_DOUBLE large_packet_threshold;
1087 EVEL_OPTION_INT max_receive_bit_rate;
1088 EVEL_OPTION_INT max_transmit_bit_rate;
1089 EVEL_OPTION_INT num_gtp_echo_failures;
1090 EVEL_OPTION_INT num_gtp_tunnel_errors;
1091 EVEL_OPTION_INT num_http_errors;
1093 } MOBILE_GTP_PER_FLOW_METRICS;
1095 /*****************************************************************************/
1096 /* Supported Mobile Flow version. */
1097 /*****************************************************************************/
1098 #define EVEL_MOBILE_FLOW_MAJOR_VERSION 1
1099 #define EVEL_MOBILE_FLOW_MINOR_VERSION 2
1101 /**************************************************************************//**
1103 * JSON equivalent field: mobileFlow
1104 *****************************************************************************/
1105 typedef struct event_mobile_flow {
1106 /***************************************************************************/
1107 /* Header and version */
1108 /***************************************************************************/
1109 EVENT_HEADER header;
1113 /***************************************************************************/
1114 /* Mandatory fields */
1115 /***************************************************************************/
1116 char * flow_direction;
1117 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics;
1118 char * ip_protocol_type;
1120 char * other_endpoint_ip_address;
1121 int other_endpoint_port;
1122 char * reporting_endpoint_ip_addr;
1123 int reporting_endpoint_port;
1124 DLIST additional_info; /* JSON: additionalFields */
1126 /***************************************************************************/
1127 /* Optional fields */
1128 /***************************************************************************/
1129 EVEL_OPTION_STRING application_type;
1130 EVEL_OPTION_STRING app_protocol_type;
1131 EVEL_OPTION_STRING app_protocol_version;
1132 EVEL_OPTION_STRING cid;
1133 EVEL_OPTION_STRING connection_type;
1134 EVEL_OPTION_STRING ecgi;
1135 EVEL_OPTION_STRING gtp_protocol_type;
1136 EVEL_OPTION_STRING gtp_version;
1137 EVEL_OPTION_STRING http_header;
1138 EVEL_OPTION_STRING imei;
1139 EVEL_OPTION_STRING imsi;
1140 EVEL_OPTION_STRING lac;
1141 EVEL_OPTION_STRING mcc;
1142 EVEL_OPTION_STRING mnc;
1143 EVEL_OPTION_STRING msisdn;
1144 EVEL_OPTION_STRING other_functional_role;
1145 EVEL_OPTION_STRING rac;
1146 EVEL_OPTION_STRING radio_access_technology;
1147 EVEL_OPTION_STRING sac;
1148 EVEL_OPTION_INT sampling_algorithm;
1149 EVEL_OPTION_STRING tac;
1150 EVEL_OPTION_STRING tunnel_id;
1151 EVEL_OPTION_STRING vlan_id;
1153 } EVENT_MOBILE_FLOW;
1155 /*****************************************************************************/
1156 /* Supported Other field version. */
1157 /*****************************************************************************/
1158 #define EVEL_OTHER_EVENT_MAJOR_VERSION 1
1159 #define EVEL_OTHER_EVENT_MINOR_VERSION 1
1161 /**************************************************************************//**
1163 * JSON equivalent field: otherFields
1164 *****************************************************************************/
1165 typedef struct event_other {
1166 EVENT_HEADER header;
1170 HASHTABLE_T *namedarrays; /* HASHTABLE_T */
1171 DLIST jsonobjects; /* DLIST of EVEL_JSON_OBJECT */
1175 /**************************************************************************//**
1177 * JSON equivalent field: otherFields
1178 *****************************************************************************/
1179 typedef struct other_field {
1185 /*****************************************************************************/
1186 /* Supported Service Events version. */
1187 /*****************************************************************************/
1188 #define EVEL_HEARTBEAT_FIELD_MAJOR_VERSION 1
1189 #define EVEL_HEARTBEAT_FIELD_MINOR_VERSION 1
1192 /*****************************************************************************/
1193 /* Supported Signaling version. */
1194 /*****************************************************************************/
1195 #define EVEL_SIGNALING_MAJOR_VERSION 2
1196 #define EVEL_SIGNALING_MINOR_VERSION 1
1198 /**************************************************************************//**
1199 * Vendor VNF Name fields.
1200 * JSON equivalent field: vendorVnfNameFields
1201 *****************************************************************************/
1202 typedef struct vendor_vnfname_field {
1204 EVEL_OPTION_STRING vfmodule;
1205 EVEL_OPTION_STRING vnfname;
1206 } VENDOR_VNFNAME_FIELD;
1208 /**************************************************************************//**
1210 * JSON equivalent field: signalingFields
1211 *****************************************************************************/
1212 typedef struct event_signaling {
1213 /***************************************************************************/
1214 /* Header and version */
1215 /***************************************************************************/
1216 EVENT_HEADER header;
1220 /***************************************************************************/
1221 /* Mandatory fields */
1222 /***************************************************************************/
1223 VENDOR_VNFNAME_FIELD vnfname_field;
1224 EVEL_OPTION_STRING correlator; /* JSON: correlator */
1225 EVEL_OPTION_STRING local_ip_address; /* JSON: localIpAddress */
1226 EVEL_OPTION_STRING local_port; /* JSON: localPort */
1227 EVEL_OPTION_STRING remote_ip_address; /* JSON: remoteIpAddress */
1228 EVEL_OPTION_STRING remote_port; /* JSON: remotePort */
1230 /***************************************************************************/
1231 /* Optional fields */
1232 /***************************************************************************/
1233 EVEL_OPTION_STRING compressed_sip; /* JSON: compressedSip */
1234 EVEL_OPTION_STRING summary_sip; /* JSON: summarySip */
1235 DLIST additional_info;
1239 /**************************************************************************//**
1240 * Sgnaling Additional Field.
1241 * JSON equivalent field: additionalFields
1242 *****************************************************************************/
1243 typedef struct signaling_additional_field {
1246 } SIGNALING_ADDL_FIELD;
1248 /*****************************************************************************/
1249 /* Supported State Change version. */
1250 /*****************************************************************************/
1251 #define EVEL_STATE_CHANGE_MAJOR_VERSION 1
1252 #define EVEL_STATE_CHANGE_MINOR_VERSION 2
1254 /**************************************************************************//**
1256 * JSON equivalent field: stateChangeFields
1257 *****************************************************************************/
1258 typedef struct event_state_change {
1259 /***************************************************************************/
1260 /* Header and version */
1261 /***************************************************************************/
1262 EVENT_HEADER header;
1266 /***************************************************************************/
1267 /* Mandatory fields */
1268 /***************************************************************************/
1269 EVEL_ENTITY_STATE new_state;
1270 EVEL_ENTITY_STATE old_state;
1271 char * state_interface;
1274 /***************************************************************************/
1275 /* Optional fields */
1276 /***************************************************************************/
1277 DLIST additional_fields;
1279 } EVENT_STATE_CHANGE;
1281 /**************************************************************************//**
1282 * State Change Additional Field.
1283 * JSON equivalent field: additionalFields
1284 *****************************************************************************/
1285 typedef struct state_change_additional_field {
1288 } STATE_CHANGE_ADDL_FIELD;
1290 /*****************************************************************************/
1291 /* Supported Syslog version. */
1292 /*****************************************************************************/
1293 #define EVEL_SYSLOG_MAJOR_VERSION 1
1294 #define EVEL_SYSLOG_MINOR_VERSION 2
1296 /**************************************************************************//**
1298 * JSON equivalent field: syslogFields
1299 *****************************************************************************/
1300 typedef struct event_syslog {
1301 /***************************************************************************/
1302 /* Header and version */
1303 /***************************************************************************/
1304 EVENT_HEADER header;
1308 /***************************************************************************/
1309 /* Mandatory fields */
1310 /***************************************************************************/
1311 EVEL_SOURCE_TYPES event_source_type;
1315 /***************************************************************************/
1316 /* Optional fields */
1317 /***************************************************************************/
1318 EVEL_OPTION_STRING additional_filters;
1319 EVEL_OPTION_STRING event_source_host;
1320 EVEL_OPTION_INT syslog_facility;
1321 EVEL_OPTION_INT syslog_priority;
1322 EVEL_OPTION_STRING syslog_proc;
1323 EVEL_OPTION_INT syslog_proc_id;
1324 EVEL_OPTION_STRING syslog_s_data;
1325 EVEL_OPTION_STRING syslog_sdid;
1326 EVEL_OPTION_STRING syslog_severity;
1328 EVEL_OPTION_INT syslog_ver;
1332 /**************************************************************************//**
1334 * JSON equivalent object: attCopyrightNotice
1335 *****************************************************************************/
1336 typedef struct copyright {
1337 char * useAndRedistribution;
1342 char * disclaimerLine1;
1343 char * disclaimerLine2;
1344 char * disclaimerLine3;
1345 char * disclaimerLine4;
1348 /**************************************************************************//**
1349 * Library initialization.
1351 * Initialize the EVEL library.
1353 * @note This function initializes the cURL library. Applications making use
1354 * of libcurl may need to pull the initialization out of here. Note
1355 * also that this function is not threadsafe as a result - refer to
1356 * libcurl's API documentation for relevant warnings.
1358 * @sa Matching Term function.
1360 * @param fqdn The API's FQDN or IP address.
1361 * @param port The API's port.
1362 * @param path The optional path (may be NULL).
1363 * @param topic The optional topic part of the URL (may be NULL).
1364 * @param secure Whether to use HTTPS (0=HTTP, 1=HTTPS).
1365 * @param username Username for Basic Authentication of requests.
1366 * @param password Password for Basic Authentication of requests.
1367 * @param source_type The kind of node we represent.
1368 * @param role The role this node undertakes.
1369 * @param verbosity 0 for normal operation, positive values for chattier
1372 * @returns Status code
1373 * @retval EVEL_SUCCESS On success
1374 * @retval ::EVEL_ERR_CODES On failure.
1375 *****************************************************************************/
1376 EVEL_ERR_CODES evel_initialize(const char * const fqdn,
1378 const char * const path,
1379 const char * const topic,
1381 const char * const username,
1382 const char * const password,
1383 EVEL_SOURCE_TYPES source_type,
1384 const char * const role,
1388 /**************************************************************************//**
1389 * Clean up the EVEL library.
1391 * @note that at present don't expect Init/Term cycling not to leak memory!
1393 * @returns Status code
1394 * @retval EVEL_SUCCESS On success
1395 * @retval "One of ::EVEL_ERR_CODES" On failure.
1396 *****************************************************************************/
1397 EVEL_ERR_CODES evel_terminate(void);
1399 EVEL_ERR_CODES evel_post_event(EVENT_HEADER * event);
1400 const char * evel_error_string(void);
1403 /**************************************************************************//**
1406 * Free off the event supplied. Will free all the contained allocated memory.
1408 * @note It is safe to free a NULL pointer.
1409 *****************************************************************************/
1410 void evel_free_event(void * event);
1412 /**************************************************************************//**
1413 * Encode the event as a JSON event object according to AT&T's schema.
1415 * @param json Pointer to where to store the JSON encoded data.
1416 * @param max_size Size of storage available in json_body.
1417 * @param event Pointer to the ::EVENT_HEADER to encode.
1418 * @returns Number of bytes actually written.
1419 *****************************************************************************/
1420 int evel_json_encode_event(char * json,
1422 EVENT_HEADER * event);
1424 /**************************************************************************//**
1425 * Callback function to provide returned data.
1427 * Copy data into the supplied buffer, write_callback::ptr, checking size
1430 * @returns Number of bytes placed into write_callback::ptr. 0 for EOF.
1431 *****************************************************************************/
1432 size_t evel_write_callback(void *contents,
1437 /*****************************************************************************/
1438 /*****************************************************************************/
1440 /* HEARTBEAT - (includes common header, too) */
1442 /*****************************************************************************/
1443 /*****************************************************************************/
1445 /**************************************************************************//**
1446 * Create a new heartbeat event.
1448 * @note that the heartbeat is just a "naked" commonEventHeader!
1450 * @returns pointer to the newly manufactured ::EVENT_HEADER. If the event is
1451 * not used it must be released using ::evel_free_event
1452 * @retval NULL Failed to create the event.
1453 *****************************************************************************/
1454 EVENT_HEADER * evel_new_heartbeat(void);
1456 /**************************************************************************//**
1457 * Free an event header.
1459 * Free off the event header supplied. Will free all the contained allocated
1462 * @note It does not free the header itself, since that may be part of a
1464 *****************************************************************************/
1465 void evel_free_header(EVENT_HEADER * const event);
1467 /**************************************************************************//**
1468 * Initialize a newly created event header.
1470 * @param header Pointer to the header being initialized.
1471 *****************************************************************************/
1472 void evel_init_header(EVENT_HEADER * const header,const char *const eventname);
1474 /**************************************************************************//**
1475 * Set the Event Type property of the event header.
1477 * @param header Pointer to the ::EVENT_HEADER.
1478 * @param type The Event Type to be set. ASCIIZ string. The caller
1479 * does not need to preserve the value once the function
1481 *****************************************************************************/
1482 void evel_header_type_set(EVENT_HEADER * const header,
1483 const char * const type);
1485 /**************************************************************************//**
1486 * Set the Start Epoch property of the event header.
1488 * @note The Start Epoch defaults to the time of event creation.
1490 * @param header Pointer to the ::EVENT_HEADER.
1491 * @param start_epoch_microsec
1492 * The start epoch to set, in microseconds.
1493 *****************************************************************************/
1494 void evel_start_epoch_set(EVENT_HEADER * const header,
1495 const unsigned long long start_epoch_microsec);
1497 /**************************************************************************//**
1498 * Set the Last Epoch property of the event header.
1500 * @note The Last Epoch defaults to the time of event creation.
1502 * @param header Pointer to the ::EVENT_HEADER.
1503 * @param last_epoch_microsec
1504 * The last epoch to set, in microseconds.
1505 *****************************************************************************/
1506 void evel_last_epoch_set(EVENT_HEADER * const header,
1507 const unsigned long long last_epoch_microsec);
1509 /**************************************************************************//**
1510 * Set the Reporting Entity Name property of the event header.
1512 * @note The Reporting Entity Name defaults to the OpenStack VM Name.
1514 * @param header Pointer to the ::EVENT_HEADER.
1515 * @param entity_name The entity name to set.
1516 *****************************************************************************/
1517 void evel_reporting_entity_name_set(EVENT_HEADER * const header,
1518 const char * const entity_name);
1520 /**************************************************************************//**
1521 * Set the Reporting Entity Id property of the event header.
1523 * @note The Reporting Entity Id defaults to the OpenStack VM UUID.
1525 * @param header Pointer to the ::EVENT_HEADER.
1526 * @param entity_id The entity id to set.
1527 *****************************************************************************/
1528 void evel_reporting_entity_id_set(EVENT_HEADER * const header,
1529 const char * const entity_id);
1531 /*****************************************************************************/
1532 /*****************************************************************************/
1536 /*****************************************************************************/
1537 /*****************************************************************************/
1539 /**************************************************************************//**
1540 * Create a new fault event.
1542 * @note The mandatory fields on the Fault must be supplied to this factory
1543 * function and are immutable once set. Optional fields have explicit
1544 * setter functions, but again values may only be set once so that the
1545 * Fault has immutable properties.
1546 * @param condition The condition indicated by the Fault.
1547 * @param specific_problem The specific problem triggering the fault.
1548 * @param priority The priority of the event.
1549 * @param severity The severity of the Fault.
1550 * @param ev_source_type Source of Alarm event
1551 * @param version fault version
1552 * @param status status of Virtual Function
1553 * @returns pointer to the newly manufactured ::EVENT_FAULT. If the event is
1554 * not used (i.e. posted) it must be released using ::evel_free_fault.
1555 * @retval NULL Failed to create the event.
1556 *****************************************************************************/
1557 EVENT_FAULT * evel_new_fault(const char * const condition,
1558 const char * const specific_problem,
1559 EVEL_EVENT_PRIORITIES priority,
1560 EVEL_SEVERITIES severity,
1561 EVEL_SOURCE_TYPES ev_source_type,
1562 EVEL_VF_STATUSES status);
1564 /**************************************************************************//**
1567 * Free off the Fault supplied. Will free all the contained allocated memory.
1569 * @note It does not free the Fault itself, since that may be part of a
1571 *****************************************************************************/
1572 void evel_free_fault(EVENT_FAULT * event);
1574 /**************************************************************************//**
1575 * Set the Fault Category property of the Fault.
1577 * @note The property is treated as immutable: it is only valid to call
1578 * the setter once. However, we don't assert if the caller tries to
1579 * overwrite, just ignoring the update instead.
1581 * @param fault Pointer to the fault.
1582 * @param category Category : license, link, routing, security, signaling.
1583 * ASCIIZ string. The caller
1584 * does not need to preserve the value once the function
1586 *****************************************************************************/
1587 void evel_fault_category_set(EVENT_FAULT * fault,
1588 const char * const category);
1590 /**************************************************************************//**
1591 * Set the Alarm Interface A property of the Fault.
1593 * @note The property is treated as immutable: it is only valid to call
1594 * the setter once. However, we don't assert if the caller tries to
1595 * overwrite, just ignoring the update instead.
1597 * @param fault Pointer to the fault.
1598 * @param interface The Alarm Interface A to be set. ASCIIZ string. The caller
1599 * does not need to preserve the value once the function
1601 *****************************************************************************/
1602 void evel_fault_interface_set(EVENT_FAULT * fault,
1603 const char * const interface);
1605 /**************************************************************************//**
1606 * Add an additional value name/value pair to the Fault.
1608 * The name and value are null delimited ASCII strings. The library takes
1609 * a copy so the caller does not have to preserve values after the function
1612 * @param fault Pointer to the fault.
1613 * @param name ASCIIZ string with the attribute's name.
1614 * @param value ASCIIZ string with the attribute's value.
1615 *****************************************************************************/
1616 void evel_fault_addl_info_add(EVENT_FAULT * fault, char * name, char * value);
1618 /**************************************************************************//**
1619 * Set the Event Type property of the Fault.
1621 * @note The property is treated as immutable: it is only valid to call
1622 * the setter once. However, we don't assert if the caller tries to
1623 * overwrite, just ignoring the update instead.
1625 * @param fault Pointer to the fault.
1626 * @param type The Event Type to be set. ASCIIZ string. The caller
1627 * does not need to preserve the value once the function
1629 *****************************************************************************/
1630 void evel_fault_type_set(EVENT_FAULT * fault, const char * const type);
1632 /*****************************************************************************/
1633 /*****************************************************************************/
1637 /*****************************************************************************/
1638 /*****************************************************************************/
1640 /**************************************************************************//**
1641 * Create a new Measurement event.
1643 * @note The mandatory fields on the Measurement must be supplied to this
1644 * factory function and are immutable once set. Optional fields have
1645 * explicit setter functions, but again values may only be set once so
1646 * that the Measurement has immutable properties.
1648 * @param measurement_interval
1650 * @returns pointer to the newly manufactured ::EVENT_MEASUREMENT. If the
1651 * event is not used (i.e. posted) it must be released using
1652 * ::evel_free_event.
1653 * @retval NULL Failed to create the event.
1654 *****************************************************************************/
1655 EVENT_MEASUREMENT * evel_new_measurement(double measurement_interval);
1657 /**************************************************************************//**
1658 * Free a Measurement.
1660 * Free off the Measurement supplied. Will free all the contained allocated
1663 * @note It does not free the Measurement itself, since that may be part of a
1665 *****************************************************************************/
1666 void evel_free_measurement(EVENT_MEASUREMENT * event);
1668 /**************************************************************************//**
1669 * Set the Event Type property of the Measurement.
1671 * @note The property is treated as immutable: it is only valid to call
1672 * the setter once. However, we don't assert if the caller tries to
1673 * overwrite, just ignoring the update instead.
1675 * @param measurement Pointer to the Measurement.
1676 * @param type The Event Type to be set. ASCIIZ string. The caller
1677 * does not need to preserve the value once the function
1679 *****************************************************************************/
1680 void evel_measurement_type_set(EVENT_MEASUREMENT * measurement,
1681 const char * const type);
1683 /**************************************************************************//**
1684 * Set the Concurrent Sessions property of the Measurement.
1686 * @note The property is treated as immutable: it is only valid to call
1687 * the setter once. However, we don't assert if the caller tries to
1688 * overwrite, just ignoring the update instead.
1690 * @param measurement Pointer to the Measurement.
1691 * @param concurrent_sessions The Concurrent Sessions to be set.
1692 *****************************************************************************/
1693 void evel_measurement_conc_sess_set(EVENT_MEASUREMENT * measurement,
1694 int concurrent_sessions);
1696 /**************************************************************************//**
1697 * Set the Configured Entities property of the Measurement.
1699 * @note The property is treated as immutable: it is only valid to call
1700 * the setter once. However, we don't assert if the caller tries to
1701 * overwrite, just ignoring the update instead.
1703 * @param measurement Pointer to the Measurement.
1704 * @param configured_entities The Configured Entities to be set.
1705 *****************************************************************************/
1706 void evel_measurement_cfg_ents_set(EVENT_MEASUREMENT * measurement,
1707 int configured_entities);
1709 /**************************************************************************//**
1710 * Add an additional set of Errors to the Measurement.
1712 * @note The property is treated as immutable: it is only valid to call
1713 * the setter once. However, we don't assert if the caller tries to
1714 * overwrite, just ignoring the update instead.
1716 * @param measurement Pointer to the measurement.
1717 * @param receive_discards The number of receive discards.
1718 * @param receive_errors The number of receive errors.
1719 * @param transmit_discards The number of transmit discards.
1720 * @param transmit_errors The number of transmit errors.
1721 *****************************************************************************/
1722 void evel_measurement_errors_set(EVENT_MEASUREMENT * measurement,
1723 int receive_discards,
1725 int transmit_discards,
1726 int transmit_errors);
1728 /**************************************************************************//**
1729 * Set the Mean Request Latency property of the Measurement.
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 measurement Pointer to the Measurement.
1736 * @param mean_request_latency The Mean Request Latency to be set.
1737 *****************************************************************************/
1738 void evel_measurement_mean_req_lat_set(EVENT_MEASUREMENT * measurement,
1739 double mean_request_latency);
1741 /**************************************************************************//**
1742 * Set the Request Rate property of the Measurement.
1744 * @note The property is treated as immutable: it is only valid to call
1745 * the setter once. However, we don't assert if the caller tries to
1746 * overwrite, just ignoring the update instead.
1748 * @param measurement Pointer to the Measurement.
1749 * @param request_rate The Request Rate to be set.
1750 *****************************************************************************/
1751 void evel_measurement_request_rate_set(EVENT_MEASUREMENT * measurement,
1754 /**************************************************************************//**
1755 * Add an additional CPU usage value name/value pair to the Measurement.
1757 * The name and value are null delimited ASCII strings. The library takes
1758 * a copy so the caller does not have to preserve values after the function
1761 * @param measurement Pointer to the measurement.
1762 * @param id ASCIIZ string with the CPU's identifier.
1763 * @param usage CPU utilization.
1764 *****************************************************************************/
1765 MEASUREMENT_CPU_USE * evel_measurement_new_cpu_use_add(EVENT_MEASUREMENT * measurement, char * id, double usage);
1767 /**************************************************************************//**
1768 * Set the CPU Idle value in measurement interval
1769 * percentage of CPU time spent in the idle task
1771 * @note The property is treated as immutable: it is only valid to call
1772 * the setter once. However, we don't assert if the caller tries to
1773 * overwrite, just ignoring the update instead.
1775 * @param cpu_use Pointer to the CPU Use.
1777 *****************************************************************************/
1778 void evel_measurement_cpu_use_idle_set(MEASUREMENT_CPU_USE *const cpu_use,
1781 /**************************************************************************//**
1782 * Set the percentage of time spent servicing interrupts
1784 * @note The property is treated as immutable: it is only valid to call
1785 * the setter once. However, we don't assert if the caller tries to
1786 * overwrite, just ignoring the update instead.
1788 * @param cpu_use Pointer to the CPU Use.
1790 *****************************************************************************/
1791 void evel_measurement_cpu_use_interrupt_set(MEASUREMENT_CPU_USE * const cpu_use,
1794 /**************************************************************************//**
1795 * Set the percentage of time spent running user space processes that have been niced
1797 * @note The property is treated as immutable: it is only valid to call
1798 * the setter once. However, we don't assert if the caller tries to
1799 * overwrite, just ignoring the update instead.
1801 * @param cpu_use Pointer to the CPU Use.
1803 *****************************************************************************/
1804 void evel_measurement_cpu_use_nice_set(MEASUREMENT_CPU_USE * const cpu_use,
1807 /**************************************************************************//**
1808 * Set the percentage of time spent handling soft irq interrupts
1810 * @note The property is treated as immutable: it is only valid to call
1811 * the setter once. However, we don't assert if the caller tries to
1812 * overwrite, just ignoring the update instead.
1814 * @param cpu_use Pointer to the CPU Use.
1816 *****************************************************************************/
1817 void evel_measurement_cpu_use_softirq_set(MEASUREMENT_CPU_USE * const cpu_use,
1819 /**************************************************************************//**
1820 * Set the percentage of time spent in involuntary wait
1822 * @note The property is treated as immutable: it is only valid to call
1823 * the setter once. However, we don't assert if the caller tries to
1824 * overwrite, just ignoring the update instead.
1826 * @param cpu_use Pointer to the CPU Use.
1828 *****************************************************************************/
1829 void evel_measurement_cpu_use_steal_set(MEASUREMENT_CPU_USE * const cpu_use,
1831 /**************************************************************************//**
1832 * Set the percentage of time spent on system tasks running the kernel
1834 * @note The property is treated as immutable: it is only valid to call
1835 * the setter once. However, we don't assert if the caller tries to
1836 * overwrite, just ignoring the update instead.
1838 * @param cpu_use Pointer to the CPU Use.
1840 *****************************************************************************/
1841 void evel_measurement_cpu_use_system_set(MEASUREMENT_CPU_USE * const cpu_use,
1843 /**************************************************************************//**
1844 * Set the percentage of time spent running un-niced user space processes
1846 * @note The property is treated as immutable: it is only valid to call
1847 * the setter once. However, we don't assert if the caller tries to
1848 * overwrite, just ignoring the update instead.
1850 * @param cpu_use Pointer to the CPU Use.
1852 *****************************************************************************/
1853 void evel_measurement_cpu_use_usageuser_set(MEASUREMENT_CPU_USE * const cpu_use,
1855 /**************************************************************************//**
1856 * Set the percentage of CPU time spent waiting for I/O operations to complete
1858 * @note The property is treated as immutable: it is only valid to call
1859 * the setter once. However, we don't assert if the caller tries to
1860 * overwrite, just ignoring the update instead.
1862 * @param cpu_use Pointer to the CPU Use.
1864 *****************************************************************************/
1865 void evel_measurement_cpu_use_wait_set(MEASUREMENT_CPU_USE * const cpu_use,
1868 /**************************************************************************//**
1869 * Add an additional File System usage value name/value pair to the
1872 * The filesystem_name is null delimited ASCII string. The library takes a
1873 * copy so the caller does not have to preserve values after the function
1876 * @param measurement Pointer to the measurement.
1877 * @param filesystem_name ASCIIZ string with the file-system's UUID.
1878 * @param block_configured Block storage configured.
1879 * @param block_used Block storage in use.
1880 * @param block_iops Block storage IOPS.
1881 * @param ephemeral_configured Ephemeral storage configured.
1882 * @param ephemeral_used Ephemeral storage in use.
1883 * @param ephemeral_iops Ephemeral storage IOPS.
1884 *****************************************************************************/
1885 void evel_measurement_fsys_use_add(EVENT_MEASUREMENT * measurement,
1886 char * filesystem_name,
1887 double block_configured,
1890 double ephemeral_configured,
1891 double ephemeral_used,
1892 int ephemeral_iops);
1894 /**************************************************************************//**
1895 * Add a Feature usage value name/value pair to the Measurement.
1897 * The name is null delimited ASCII string. 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 feature ASCIIZ string with the feature's name.
1903 * @param utilization Utilization of the feature.
1904 *****************************************************************************/
1905 void evel_measurement_feature_use_add(EVENT_MEASUREMENT * measurement,
1909 /**************************************************************************//**
1910 * Add a Additional Measurement value name/value pair to the Measurement.
1912 * The name is null delimited ASCII string. The library takes
1913 * a copy so the caller does not have to preserve values after the function
1916 * @param measurement Pointer to the Measurement.
1917 * @param group ASCIIZ string with the measurement group's name.
1918 * @param name ASCIIZ string containing the measurement's name.
1919 * @param name ASCIIZ string containing the measurement's value.
1920 *****************************************************************************/
1921 void evel_measurement_custom_measurement_add(EVENT_MEASUREMENT * measurement,
1922 const char * const group,
1923 const char * const name,
1924 const char * const value);
1926 /**************************************************************************//**
1927 * Add a Codec usage value name/value pair to the Measurement.
1929 * The name is null delimited ASCII string. The library takes
1930 * a copy so the caller does not have to preserve values after the function
1933 * @param measurement Pointer to the measurement.
1934 * @param codec ASCIIZ string with the codec's name.
1935 * @param utilization Utilization of the feature.
1936 *****************************************************************************/
1937 void evel_measurement_codec_use_add(EVENT_MEASUREMENT * measurement,
1941 /**************************************************************************//**
1942 * Set the Media Ports in Use property of the Measurement.
1944 * @note The property is treated as immutable: it is only valid to call
1945 * the setter once. However, we don't assert if the caller tries to
1946 * overwrite, just ignoring the update instead.
1948 * @param measurement Pointer to the measurement.
1949 * @param media_ports_in_use The media port usage to set.
1950 *****************************************************************************/
1951 void evel_measurement_media_port_use_set(EVENT_MEASUREMENT * measurement,
1952 int media_ports_in_use);
1954 /**************************************************************************//**
1955 * Set the VNFC Scaling Metric property of the Measurement.
1957 * @note The property is treated as immutable: it is only valid to call
1958 * the setter once. However, we don't assert if the caller tries to
1959 * overwrite, just ignoring the update instead.
1961 * @param measurement Pointer to the measurement.
1962 * @param scaling_metric The scaling metric to set.
1963 *****************************************************************************/
1964 void evel_measurement_vnfc_scaling_metric_set(EVENT_MEASUREMENT * measurement,
1965 int scaling_metric);
1967 /**************************************************************************//**
1968 * Create a new Latency Bucket to be added to a Measurement event.
1970 * @note The mandatory fields on the ::MEASUREMENT_LATENCY_BUCKET must be
1971 * supplied to this factory function and are immutable once set.
1972 * Optional fields have explicit setter functions, but again values
1973 * may only be set once so that the ::MEASUREMENT_LATENCY_BUCKET has
1974 * immutable properties.
1976 * @param count Count of events in this bucket.
1978 * @returns pointer to the newly manufactured ::MEASUREMENT_LATENCY_BUCKET.
1979 * @retval NULL Failed to create the Latency Bucket.
1980 *****************************************************************************/
1981 MEASUREMENT_LATENCY_BUCKET * evel_new_meas_latency_bucket(const int count);
1983 /**************************************************************************//**
1984 * Set the High End property of the Measurement Latency Bucket.
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 bucket Pointer to the Measurement Latency Bucket.
1991 * @param high_end High end of the bucket's range.
1992 *****************************************************************************/
1993 void evel_meas_latency_bucket_high_end_set(
1994 MEASUREMENT_LATENCY_BUCKET * const bucket,
1995 const double high_end);
1997 /**************************************************************************//**
1998 * Set the Low End property of the Measurement Latency Bucket.
2000 * @note The property is treated as immutable: it is only valid to call
2001 * the setter once. However, we don't assert if the caller tries to
2002 * overwrite, just ignoring the update instead.
2004 * @param bucket Pointer to the Measurement Latency Bucket.
2005 * @param low_end Low end of the bucket's range.
2006 *****************************************************************************/
2007 void evel_meas_latency_bucket_low_end_set(
2008 MEASUREMENT_LATENCY_BUCKET * const bucket,
2009 const double low_end);
2011 /**************************************************************************//**
2012 * Add an additional Measurement Latency Bucket to the specified event.
2014 * @param measurement Pointer to the Measurement event.
2015 * @param bucket Pointer to the Measurement Latency Bucket to add.
2016 *****************************************************************************/
2017 void evel_meas_latency_bucket_add(EVENT_MEASUREMENT * const measurement,
2018 MEASUREMENT_LATENCY_BUCKET * const bucket);
2020 /**************************************************************************//**
2021 * Add an additional Latency Distribution bucket to the Measurement.
2023 * This function implements the previous API, purely for convenience.
2025 * @param measurement Pointer to the measurement.
2026 * @param low_end Low end of the bucket's range.
2027 * @param high_end High end of the bucket's range.
2028 * @param count Count of events in this bucket.
2029 *****************************************************************************/
2030 void evel_measurement_latency_add(EVENT_MEASUREMENT * const measurement,
2031 const double low_end,
2032 const double high_end,
2035 /**************************************************************************//**
2036 * Create a new vNIC Use to be added to a Measurement event.
2038 * @note The mandatory fields on the ::MEASUREMENT_VNIC_PERFORMANCE must be supplied
2039 * to this factory function and are immutable once set. Optional
2040 * fields have explicit setter functions, but again values may only be
2041 * set once so that the ::MEASUREMENT_VNIC_PERFORMANCE has immutable
2044 * @param vnic_id ASCIIZ string with the vNIC's ID.
2045 * @param val_suspect True or false confidence in data.
2047 * @returns pointer to the newly manufactured ::MEASUREMENT_VNIC_PERFORMANCE.
2048 * If the structure is not used it must be released using
2049 * ::evel_measurement_free_vnic_performance.
2050 * @retval NULL Failed to create the vNIC Use.
2051 *****************************************************************************/
2052 MEASUREMENT_VNIC_PERFORMANCE * evel_measurement_new_vnic_performance(char * const vnic_id, char * const val_suspect);
2054 /**************************************************************************//**
2057 * Free off the ::MEASUREMENT_VNIC_PERFORMANCE supplied. Will free all the contained
2060 * @note It does not free the vNIC Use itself, since that may be part of a
2062 *****************************************************************************/
2063 void evel_measurement_free_vnic_performance(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2065 /**************************************************************************//**
2066 * Set the Accumulated Broadcast Packets Received in measurement interval
2067 * property of the vNIC performance.
2069 * @note The property is treated as immutable: it is only valid to call
2070 * the setter once. However, we don't assert if the caller tries to
2071 * overwrite, just ignoring the update instead.
2073 * @param vnic_performance Pointer to the vNIC Use.
2074 * @param recvd_bcast_packets_acc
2075 *****************************************************************************/
2076 void evel_vnic_performance_rx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2077 const double recvd_bcast_packets_acc);
2078 /**************************************************************************//**
2079 * Set the Delta Broadcast Packets Received in measurement interval
2080 * property of the vNIC performance.
2082 * @note The property is treated as immutable: it is only valid to call
2083 * the setter once. However, we don't assert if the caller tries to
2084 * overwrite, just ignoring the update instead.
2086 * @param vnic_performance Pointer to the vNIC Use.
2087 * @param recvd_bcast_packets_delta
2088 *****************************************************************************/
2089 void evel_vnic_performance_rx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2090 const double recvd_bcast_packets_delta);
2091 /**************************************************************************//**
2092 * Set the Discarded Packets Received in measurement interval
2093 * property of the vNIC performance.
2095 * @note The property is treated as immutable: it is only valid to call
2096 * the setter once. However, we don't assert if the caller tries to
2097 * overwrite, just ignoring the update instead.
2099 * @param vnic_performance Pointer to the vNIC Use.
2100 * @param recvd_discard_packets_acc
2101 *****************************************************************************/
2102 void evel_vnic_performance_rx_discard_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2103 const double recvd_discard_packets_acc);
2104 /**************************************************************************//**
2105 * Set the Delta Discarded Packets Received in measurement interval
2106 * property of the vNIC performance.
2108 * @note The property is treated as immutable: it is only valid to call
2109 * the setter once. However, we don't assert if the caller tries to
2110 * overwrite, just ignoring the update instead.
2112 * @param vnic_performance Pointer to the vNIC Use.
2113 * @param recvd_discard_packets_delta
2114 *****************************************************************************/
2115 void evel_vnic_performance_rx_discard_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2116 const double recvd_discard_packets_delta);
2117 /**************************************************************************//**
2118 * Set the Error Packets Received in measurement interval
2119 * property of the vNIC performance.
2121 * @note The property is treated as immutable: it is only valid to call
2122 * the setter once. However, we don't assert if the caller tries to
2123 * overwrite, just ignoring the update instead.
2125 * @param vnic_performance Pointer to the vNIC Use.
2126 * @param recvd_error_packets_acc
2127 *****************************************************************************/
2128 void evel_vnic_performance_rx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2129 const double recvd_error_packets_acc);
2130 /**************************************************************************//**
2131 * Set the Delta Error Packets Received in measurement interval
2132 * property of the vNIC performance.
2134 * @note The property is treated as immutable: it is only valid to call
2135 * the setter once. However, we don't assert if the caller tries to
2136 * overwrite, just ignoring the update instead.
2138 * @param vnic_performance Pointer to the vNIC Use.
2139 * @param recvd_error_packets_delta
2140 *****************************************************************************/
2141 void evel_vnic_performance_rx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2142 const double recvd_error_packets_delta);
2143 /**************************************************************************//**
2144 * Set the Accumulated Multicast Packets Received in measurement interval
2145 * property of the vNIC performance.
2147 * @note The property is treated as immutable: it is only valid to call
2148 * the setter once. However, we don't assert if the caller tries to
2149 * overwrite, just ignoring the update instead.
2151 * @param vnic_performance Pointer to the vNIC Use.
2152 * @param recvd_mcast_packets_acc
2153 *****************************************************************************/
2154 void evel_vnic_performance_rx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2155 const double recvd_mcast_packets_acc);
2156 /**************************************************************************//**
2157 * Set the Delta Multicast Packets Received in measurement interval
2158 * property of the vNIC performance.
2160 * @note The property is treated as immutable: it is only valid to call
2161 * the setter once. However, we don't assert if the caller tries to
2162 * overwrite, just ignoring the update instead.
2164 * @param vnic_performance Pointer to the vNIC Use.
2165 * @param recvd_mcast_packets_delta
2166 *****************************************************************************/
2167 void evel_vnic_performance_rx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2168 const double recvd_mcast_packets_delta);
2169 /**************************************************************************//**
2170 * Set the Accumulated Octets Received in measurement interval
2171 * property of the vNIC performance.
2173 * @note The property is treated as immutable: it is only valid to call
2174 * the setter once. However, we don't assert if the caller tries to
2175 * overwrite, just ignoring the update instead.
2177 * @param vnic_performance Pointer to the vNIC Use.
2178 * @param recvd_octets_acc
2179 *****************************************************************************/
2180 void evel_vnic_performance_rx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2181 const double recvd_octets_acc);
2182 /**************************************************************************//**
2183 * Set the Delta Octets Received in measurement interval
2184 * property of the vNIC performance.
2186 * @note The property is treated as immutable: it is only valid to call
2187 * the setter once. However, we don't assert if the caller tries to
2188 * overwrite, just ignoring the update instead.
2190 * @param vnic_performance Pointer to the vNIC Use.
2191 * @param recvd_octets_delta
2192 *****************************************************************************/
2193 void evel_vnic_performance_rx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2194 const double recvd_octets_delta);
2195 /**************************************************************************//**
2196 * Set the Accumulated Total Packets Received in measurement interval
2197 * property of the vNIC performance.
2199 * @note The property is treated as immutable: it is only valid to call
2200 * the setter once. However, we don't assert if the caller tries to
2201 * overwrite, just ignoring the update instead.
2203 * @param vnic_performance Pointer to the vNIC Use.
2204 * @param recvd_total_packets_acc
2205 *****************************************************************************/
2206 void evel_vnic_performance_rx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2207 const double recvd_total_packets_acc);
2208 /**************************************************************************//**
2209 * Set the Delta Total Packets Received in measurement interval
2210 * property of the vNIC performance.
2212 * @note The property is treated as immutable: it is only valid to call
2213 * the setter once. However, we don't assert if the caller tries to
2214 * overwrite, just ignoring the update instead.
2216 * @param vnic_performance Pointer to the vNIC Use.
2217 * @param recvd_total_packets_delta
2218 *****************************************************************************/
2219 void evel_vnic_performance_rx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2220 const double recvd_total_packets_delta);
2221 /**************************************************************************//**
2222 * Set the Accumulated Unicast Packets Received in measurement interval
2223 * property of the vNIC performance.
2225 * @note The property is treated as immutable: it is only valid to call
2226 * the setter once. However, we don't assert if the caller tries to
2227 * overwrite, just ignoring the update instead.
2229 * @param vnic_performance Pointer to the vNIC Use.
2230 * @param recvd_ucast_packets_acc
2231 *****************************************************************************/
2232 void evel_vnic_performance_rx_ucast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2233 const double recvd_ucast_packets_acc);
2234 /**************************************************************************//**
2235 * Set the Delta Unicast packets Received in measurement interval
2236 * property of the vNIC performance.
2238 * @note The property is treated as immutable: it is only valid to call
2239 * the setter once. However, we don't assert if the caller tries to
2240 * overwrite, just ignoring the update instead.
2242 * @param vnic_performance Pointer to the vNIC Use.
2243 * @param recvd_ucast_packets_delta
2244 *****************************************************************************/
2245 void evel_vnic_performance_rx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2246 const double recvd_ucast_packets_delta);
2247 /**************************************************************************//**
2248 * Set the Transmitted Broadcast Packets in measurement interval
2249 * property of the vNIC performance.
2251 * @note The property is treated as immutable: it is only valid to call
2252 * the setter once. However, we don't assert if the caller tries to
2253 * overwrite, just ignoring the update instead.
2255 * @param vnic_performance Pointer to the vNIC Use.
2256 * @param tx_bcast_packets_acc
2257 *****************************************************************************/
2258 void evel_vnic_performance_tx_bcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2259 const double tx_bcast_packets_acc);
2260 /**************************************************************************//**
2261 * Set the Delta Broadcast packets Transmitted in measurement interval
2262 * property of the vNIC performance.
2264 * @note The property is treated as immutable: it is only valid to call
2265 * the setter once. However, we don't assert if the caller tries to
2266 * overwrite, just ignoring the update instead.
2268 * @param vnic_performance Pointer to the vNIC Use.
2269 * @param tx_bcast_packets_delta
2270 *****************************************************************************/
2271 void evel_vnic_performance_tx_bcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2272 const double tx_bcast_packets_delta);
2273 /**************************************************************************//**
2274 * Set the Transmitted Discarded Packets in measurement interval
2275 * property of the vNIC performance.
2277 * @note The property is treated as immutable: it is only valid to call
2278 * the setter once. However, we don't assert if the caller tries to
2279 * overwrite, just ignoring the update instead.
2281 * @param vnic_performance Pointer to the vNIC Use.
2282 * @param tx_discarded_packets_acc
2283 *****************************************************************************/
2284 void evel_vnic_performance_tx_discarded_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2285 const double tx_discarded_packets_acc);
2286 /**************************************************************************//**
2287 * Set the Delta Discarded packets Transmitted in measurement interval
2288 * property of the vNIC performance.
2290 * @note The property is treated as immutable: it is only valid to call
2291 * the setter once. However, we don't assert if the caller tries to
2292 * overwrite, just ignoring the update instead.
2294 * @param vnic_performance Pointer to the vNIC Use.
2295 * @param tx_discarded_packets_delta
2296 *****************************************************************************/
2297 void evel_vnic_performance_tx_discarded_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2298 const double tx_discarded_packets_delta);
2299 /**************************************************************************//**
2300 * Set the Transmitted Errored Packets in measurement interval
2301 * property of the vNIC performance.
2303 * @note The property is treated as immutable: it is only valid to call
2304 * the setter once. However, we don't assert if the caller tries to
2305 * overwrite, just ignoring the update instead.
2307 * @param vnic_performance Pointer to the vNIC Use.
2308 * @param tx_error_packets_acc
2309 *****************************************************************************/
2310 void evel_vnic_performance_tx_error_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2311 const double tx_error_packets_acc);
2312 /**************************************************************************//**
2313 * Set the Delta Errored packets Transmitted in measurement interval
2314 * property of the vNIC performance.
2316 * @note The property is treated as immutable: it is only valid to call
2317 * the setter once. However, we don't assert if the caller tries to
2318 * overwrite, just ignoring the update instead.
2320 * @param vnic_performance Pointer to the vNIC Use.
2321 * @param tx_error_packets_delta
2322 *****************************************************************************/
2323 void evel_vnic_performance_tx_error_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2324 const double tx_error_packets_delta);
2325 /**************************************************************************//**
2326 * Set the Transmitted Multicast Packets in measurement interval
2327 * property of the vNIC performance.
2329 * @note The property is treated as immutable: it is only valid to call
2330 * the setter once. However, we don't assert if the caller tries to
2331 * overwrite, just ignoring the update instead.
2333 * @param vnic_performance Pointer to the vNIC Use.
2334 * @param tx_mcast_packets_acc
2335 *****************************************************************************/
2336 void evel_vnic_performance_tx_mcast_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2337 const double tx_mcast_packets_acc);
2338 /**************************************************************************//**
2339 * Set the Delta Multicast packets Transmitted in measurement interval
2340 * property of the vNIC performance.
2342 * @note The property is treated as immutable: it is only valid to call
2343 * the setter once. However, we don't assert if the caller tries to
2344 * overwrite, just ignoring the update instead.
2346 * @param vnic_performance Pointer to the vNIC Use.
2347 * @param tx_mcast_packets_delta
2348 *****************************************************************************/
2349 void evel_vnic_performance_tx_mcast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2350 const double tx_mcast_packets_delta);
2351 /**************************************************************************//**
2352 * Set the Transmitted Octets in measurement interval
2353 * property of the vNIC performance.
2355 * @note The property is treated as immutable: it is only valid to call
2356 * the setter once. However, we don't assert if the caller tries to
2357 * overwrite, just ignoring the update instead.
2359 * @param vnic_performance Pointer to the vNIC Use.
2360 * @param tx_octets_acc
2361 *****************************************************************************/
2362 void evel_vnic_performance_tx_octets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2363 const double tx_octets_acc);
2364 /**************************************************************************//**
2365 * Set the Delta Octets Transmitted in measurement interval
2366 * property of the vNIC performance.
2368 * @note The property is treated as immutable: it is only valid to call
2369 * the setter once. However, we don't assert if the caller tries to
2370 * overwrite, just ignoring the update instead.
2372 * @param vnic_performance Pointer to the vNIC Use.
2373 * @param tx_octets_delta
2374 *****************************************************************************/
2375 void evel_vnic_performance_tx_octets_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2376 const double tx_octets_delta);
2377 /**************************************************************************//**
2378 * Set the Transmitted Total Packets in measurement interval
2379 * property of the vNIC performance.
2381 * @note The property is treated as immutable: it is only valid to call
2382 * the setter once. However, we don't assert if the caller tries to
2383 * overwrite, just ignoring the update instead.
2385 * @param vnic_performance Pointer to the vNIC Use.
2386 * @param tx_total_packets_acc
2387 *****************************************************************************/
2388 void evel_vnic_performance_tx_total_pkt_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2389 const double tx_total_packets_acc);
2390 /**************************************************************************//**
2391 * Set the Delta Total Packets Transmitted in measurement interval
2392 * property of the vNIC performance.
2394 * @note The property is treated as immutable: it is only valid to call
2395 * the setter once. However, we don't assert if the caller tries to
2396 * overwrite, just ignoring the update instead.
2398 * @param vnic_performance Pointer to the vNIC Use.
2399 * @param tx_total_packets_delta
2400 *****************************************************************************/
2401 void evel_vnic_performance_tx_total_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2402 const double tx_total_packets_delta);
2403 /**************************************************************************//**
2404 * Set the Transmitted Unicast Packets in measurement interval
2405 * property of the vNIC performance.
2407 * @note The property is treated as immutable: it is only valid to call
2408 * the setter once. However, we don't assert if the caller tries to
2409 * overwrite, just ignoring the update instead.
2411 * @param vnic_performance Pointer to the vNIC Use.
2412 * @param tx_ucast_packets_acc
2413 *****************************************************************************/
2414 void evel_vnic_performance_tx_ucast_packets_acc_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2415 const double tx_ucast_packets_acc);
2416 /**************************************************************************//**
2417 * Set the Delta Octets Transmitted in measurement interval
2418 * property of the vNIC performance.
2420 * @note The property is treated as immutable: it is only valid to call
2421 * the setter once. However, we don't assert if the caller tries to
2422 * overwrite, just ignoring the update instead.
2424 * @param vnic_performance Pointer to the vNIC Use.
2425 * @param tx_ucast_packets_delta
2426 *****************************************************************************/
2427 void evel_vnic_performance_tx_ucast_pkt_delta_set(MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance,
2428 const double tx_ucast_packets_delta);
2430 /**************************************************************************//**
2431 * Add an additional vNIC Use to the specified Measurement event.
2433 * @param measurement Pointer to the measurement.
2434 * @param vnic_performance Pointer to the vNIC Use to add.
2435 *****************************************************************************/
2436 void evel_meas_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2437 MEASUREMENT_VNIC_PERFORMANCE * const vnic_performance);
2439 /**************************************************************************//**
2440 * Add an additional vNIC usage record Measurement.
2442 * This function implements the previous API, purely for convenience.
2444 * The ID is null delimited ASCII string. The library takes a copy so the
2445 * caller does not have to preserve values after the function returns.
2447 * @param measurement Pointer to the measurement.
2448 * @param vnic_id ASCIIZ string with the vNIC's ID.
2449 * @param valset true or false confidence level
2450 * @param recvd_bcast_packets_acc Recieved broadcast packets
2451 * @param recvd_bcast_packets_delta Received delta broadcast packets
2452 * @param recvd_discarded_packets_acc Recieved discarded packets
2453 * @param recvd_discarded_packets_delta Received discarded delta packets
2454 * @param recvd_error_packets_acc Received error packets
2455 * @param recvd_error_packets_delta, Received delta error packets
2456 * @param recvd_mcast_packets_acc Received multicast packets
2457 * @param recvd_mcast_packets_delta Received delta multicast packets
2458 * @param recvd_octets_acc Received octets
2459 * @param recvd_octets_delta Received delta octets
2460 * @param recvd_total_packets_acc Received total packets
2461 * @param recvd_total_packets_delta Received delta total packets
2462 * @param recvd_ucast_packets_acc Received Unicast packets
2463 * @param recvd_ucast_packets_delta Received delta unicast packets
2464 * @param tx_bcast_packets_acc Transmitted broadcast packets
2465 * @param tx_bcast_packets_delta Transmitted delta broadcast packets
2466 * @param tx_discarded_packets_acc Transmitted packets discarded
2467 * @param tx_discarded_packets_delta Transmitted delta discarded packets
2468 * @param tx_error_packets_acc Transmitted error packets
2469 * @param tx_error_packets_delta Transmitted delta error packets
2470 * @param tx_mcast_packets_acc Transmitted multicast packets accumulated
2471 * @param tx_mcast_packets_delta Transmitted delta multicast packets
2472 * @param tx_octets_acc Transmitted octets
2473 * @param tx_octets_delta Transmitted delta octets
2474 * @param tx_total_packets_acc Transmitted total packets
2475 * @param tx_total_packets_delta Transmitted delta total packets
2476 * @param tx_ucast_packets_acc Transmitted Unicast packets
2477 * @param tx_ucast_packets_delta Transmitted delta Unicast packets
2478 *****************************************************************************/
2479 void evel_measurement_vnic_performance_add(EVENT_MEASUREMENT * const measurement,
2480 char * const vnic_id,
2482 double recvd_bcast_packets_acc,
2483 double recvd_bcast_packets_delta,
2484 double recvd_discarded_packets_acc,
2485 double recvd_discarded_packets_delta,
2486 double recvd_error_packets_acc,
2487 double recvd_error_packets_delta,
2488 double recvd_mcast_packets_acc,
2489 double recvd_mcast_packets_delta,
2490 double recvd_octets_acc,
2491 double recvd_octets_delta,
2492 double recvd_total_packets_acc,
2493 double recvd_total_packets_delta,
2494 double recvd_ucast_packets_acc,
2495 double recvd_ucast_packets_delta,
2496 double tx_bcast_packets_acc,
2497 double tx_bcast_packets_delta,
2498 double tx_discarded_packets_acc,
2499 double tx_discarded_packets_delta,
2500 double tx_error_packets_acc,
2501 double tx_error_packets_delta,
2502 double tx_mcast_packets_acc,
2503 double tx_mcast_packets_delta,
2504 double tx_octets_acc,
2505 double tx_octets_delta,
2506 double tx_total_packets_acc,
2507 double tx_total_packets_delta,
2508 double tx_ucast_packets_acc,
2509 double tx_ucast_packets_delta);
2511 /*****************************************************************************/
2512 /*****************************************************************************/
2516 /*****************************************************************************/
2517 /*****************************************************************************/
2519 /**************************************************************************//**
2520 * Create a new Report event.
2522 * @note The mandatory fields on the Report must be supplied to this
2523 * factory function and are immutable once set. Optional fields have
2524 * explicit setter functions, but again values may only be set once so
2525 * that the Report has immutable properties.
2527 * @param measurement_interval
2529 * @returns pointer to the newly manufactured ::EVENT_REPORT. If the event is
2530 * not used (i.e. posted) it must be released using
2531 * ::evel_free_report.
2532 * @retval NULL Failed to create the event.
2533 *****************************************************************************/
2534 EVENT_REPORT * evel_new_report(double measurement_interval);
2536 /**************************************************************************//**
2539 * Free off the Report supplied. Will free all the contained allocated memory.
2541 * @note It does not free the Report itself, since that may be part of a
2543 *****************************************************************************/
2544 void evel_free_report(EVENT_REPORT * event);
2546 /**************************************************************************//**
2547 * Set the Event Type property of the Report.
2549 * @note The property is treated as immutable: it is only valid to call
2550 * the setter once. However, we don't assert if the caller tries to
2551 * overwrite, just ignoring the update instead.
2553 * @param report Pointer to the Report.
2554 * @param type The Event Type to be set. ASCIIZ string. The caller
2555 * does not need to preserve the value once the function
2557 *****************************************************************************/
2558 void evel_report_type_set(EVENT_REPORT * report, const char * const type);
2560 /**************************************************************************//**
2561 * Add a Feature usage value name/value pair to the Report.
2563 * The name is null delimited ASCII string. The library takes
2564 * a copy so the caller does not have to preserve values after the function
2567 * @param report Pointer to the report.
2568 * @param feature ASCIIZ string with the feature's name.
2569 * @param utilization Utilization of the feature.
2570 *****************************************************************************/
2571 void evel_report_feature_use_add(EVENT_REPORT * report,
2575 /**************************************************************************//**
2576 * Add a Additional Measurement value name/value pair to the Report.
2578 * The name is null delimited ASCII string. The library takes
2579 * a copy so the caller does not have to preserve values after the function
2582 * @param report Pointer to the report.
2583 * @param group ASCIIZ string with the measurement group's name.
2584 * @param name ASCIIZ string containing the measurement's name.
2585 * @param value ASCIIZ string containing the measurement's value.
2586 *****************************************************************************/
2587 void evel_report_custom_measurement_add(EVENT_REPORT * report,
2588 const char * const group,
2589 const char * const name,
2590 const char * const value);
2592 /*****************************************************************************/
2593 /*****************************************************************************/
2597 /*****************************************************************************/
2598 /*****************************************************************************/
2600 /**************************************************************************//**
2601 * Create a new Mobile Flow event.
2603 * @note The mandatory fields on the Mobile Flow must be supplied to this
2604 * factory function and are immutable once set. Optional fields have
2605 * explicit setter functions, but again values may only be set once so
2606 * that the Mobile Flow has immutable properties.
2608 * @param flow_direction
2609 * @param gtp_per_flow_metrics
2610 * @param ip_protocol_type
2612 * @param other_endpoint_ip_address
2613 * @param other_endpoint_port
2614 * @param reporting_endpoint_ip_addr
2615 * @param reporting_endpoint_port
2617 * @returns pointer to the newly manufactured ::EVENT_MOBILE_FLOW. If the
2618 * event is not used (i.e. posted) it must be released using
2619 * ::evel_free_mobile_flow.
2620 * @retval NULL Failed to create the event.
2621 *****************************************************************************/
2622 EVENT_MOBILE_FLOW * evel_new_mobile_flow(
2623 const char * const flow_direction,
2624 MOBILE_GTP_PER_FLOW_METRICS * gtp_per_flow_metrics,
2625 const char * const ip_protocol_type,
2626 const char * const ip_version,
2627 const char * const other_endpoint_ip_address,
2628 int other_endpoint_port,
2629 const char * const reporting_endpoint_ip_addr,
2630 int reporting_endpoint_port);
2632 /**************************************************************************//**
2633 * Free a Mobile Flow.
2635 * Free off the Mobile Flow supplied. Will free all the contained allocated
2638 * @note It does not free the Mobile Flow itself, since that may be part of a
2640 *****************************************************************************/
2641 void evel_free_mobile_flow(EVENT_MOBILE_FLOW * event);
2643 /**************************************************************************//**
2644 * Set the Event Type property of the Mobile Flow.
2646 * @note The property is treated as immutable: it is only valid to call
2647 * the setter once. However, we don't assert if the caller tries to
2648 * overwrite, just ignoring the update instead.
2650 * @param mobile_flow Pointer to the Mobile Flow.
2651 * @param type The Event Type to be set. ASCIIZ string. The caller
2652 * does not need to preserve the value once the function
2654 *****************************************************************************/
2655 void evel_mobile_flow_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2656 const char * const type);
2658 /**************************************************************************//**
2659 * Set the Application Type property of the Mobile Flow.
2661 * @note The property is treated as immutable: it is only valid to call
2662 * the setter once. However, we don't assert if the caller tries to
2663 * overwrite, just ignoring the update instead.
2665 * @param mobile_flow Pointer to the Mobile Flow.
2666 * @param type The Application Type to be set. ASCIIZ string. The caller
2667 * does not need to preserve the value once the function
2669 *****************************************************************************/
2670 void evel_mobile_flow_app_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2671 const char * const type);
2673 /**************************************************************************//**
2674 * Set the Application Protocol Type property of the Mobile Flow.
2676 * @note The property is treated as immutable: it is only valid to call
2677 * the setter once. However, we don't assert if the caller tries to
2678 * overwrite, just ignoring the update instead.
2680 * @param mobile_flow Pointer to the Mobile Flow.
2681 * @param type The Application Protocol Type to be set. ASCIIZ string.
2682 * The caller does not need to preserve the value once the
2684 *****************************************************************************/
2685 void evel_mobile_flow_app_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2686 const char * const type);
2688 /**************************************************************************//**
2689 * Set the Application Protocol Version property of the Mobile Flow.
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 mobile_flow Pointer to the Mobile Flow.
2696 * @param version The Application Protocol Version to be set. ASCIIZ
2697 * string. The caller does not need to preserve the value
2698 * once the function returns.
2699 *****************************************************************************/
2700 void evel_mobile_flow_app_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2701 const char * const version);
2703 /**************************************************************************//**
2704 * Set the CID property of the Mobile Flow.
2706 * @note The property is treated as immutable: it is only valid to call
2707 * the setter once. However, we don't assert if the caller tries to
2708 * overwrite, just ignoring the update instead.
2710 * @param mobile_flow Pointer to the Mobile Flow.
2711 * @param cid The CID to be set. ASCIIZ string. The caller does not
2712 * need to preserve the value once the function returns.
2713 *****************************************************************************/
2714 void evel_mobile_flow_cid_set(EVENT_MOBILE_FLOW * mobile_flow,
2715 const char * const cid);
2717 /**************************************************************************//**
2718 * Set the Connection Type property of the Mobile Flow.
2720 * @note The property is treated as immutable: it is only valid to call
2721 * the setter once. However, we don't assert if the caller tries to
2722 * overwrite, just ignoring the update instead.
2724 * @param mobile_flow Pointer to the Mobile Flow.
2725 * @param type The Connection Type to be set. ASCIIZ string. The caller
2726 * does not need to preserve the value once the function
2728 *****************************************************************************/
2729 void evel_mobile_flow_con_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2730 const char * const type);
2732 /**************************************************************************//**
2733 * Set the ECGI property of the Mobile Flow.
2735 * @note The property is treated as immutable: it is only valid to call
2736 * the setter once. However, we don't assert if the caller tries to
2737 * overwrite, just ignoring the update instead.
2739 * @param mobile_flow Pointer to the Mobile Flow.
2740 * @param ecgi The ECGI to be set. ASCIIZ string. The caller does not
2741 * need to preserve the value once the function returns.
2742 *****************************************************************************/
2743 void evel_mobile_flow_ecgi_set(EVENT_MOBILE_FLOW * mobile_flow,
2744 const char * const ecgi);
2746 /**************************************************************************//**
2747 * Set the GTP Protocol Type property of the Mobile Flow.
2749 * @note The property is treated as immutable: it is only valid to call
2750 * the setter once. However, we don't assert if the caller tries to
2751 * overwrite, just ignoring the update instead.
2753 * @param mobile_flow Pointer to the Mobile Flow.
2754 * @param type The GTP Protocol Type to be set. ASCIIZ string. The
2755 * caller does not need to preserve the value once the
2757 *****************************************************************************/
2758 void evel_mobile_flow_gtp_prot_type_set(EVENT_MOBILE_FLOW * mobile_flow,
2759 const char * const type);
2761 /**************************************************************************//**
2762 * Set the GTP Protocol Version property of the Mobile Flow.
2764 * @note The property is treated as immutable: it is only valid to call
2765 * the setter once. However, we don't assert if the caller tries to
2766 * overwrite, just ignoring the update instead.
2768 * @param mobile_flow Pointer to the Mobile Flow.
2769 * @param version The GTP Protocol Version to be set. ASCIIZ string. The
2770 * caller does not need to preserve the value once the
2772 *****************************************************************************/
2773 void evel_mobile_flow_gtp_prot_ver_set(EVENT_MOBILE_FLOW * mobile_flow,
2774 const char * const version);
2776 /**************************************************************************//**
2777 * Set the HTTP Header property of the Mobile Flow.
2779 * @note The property is treated as immutable: it is only valid to call
2780 * the setter once. However, we don't assert if the caller tries to
2781 * overwrite, just ignoring the update instead.
2783 * @param mobile_flow Pointer to the Mobile Flow.
2784 * @param header The HTTP header to be set. ASCIIZ string. The caller does
2785 * not need to preserve the value once the function returns.
2786 *****************************************************************************/
2787 void evel_mobile_flow_http_header_set(EVENT_MOBILE_FLOW * mobile_flow,
2788 const char * const header);
2790 /**************************************************************************//**
2791 * Set the IMEI property of the Mobile Flow.
2793 * @note The property is treated as immutable: it is only valid to call
2794 * the setter once. However, we don't assert if the caller tries to
2795 * overwrite, just ignoring the update instead.
2797 * @param mobile_flow Pointer to the Mobile Flow.
2798 * @param imei The IMEI to be set. ASCIIZ string. The caller does not
2799 * need to preserve the value once the function returns.
2800 *****************************************************************************/
2801 void evel_mobile_flow_imei_set(EVENT_MOBILE_FLOW * mobile_flow,
2802 const char * const imei);
2804 /**************************************************************************//**
2805 * Set the IMSI property of the Mobile Flow.
2807 * @note The property is treated as immutable: it is only valid to call
2808 * the setter once. However, we don't assert if the caller tries to
2809 * overwrite, just ignoring the update instead.
2811 * @param mobile_flow Pointer to the Mobile Flow.
2812 * @param imsi The IMSI to be set. ASCIIZ string. The caller does not
2813 * need to preserve the value once the function returns.
2814 *****************************************************************************/
2815 void evel_mobile_flow_imsi_set(EVENT_MOBILE_FLOW * mobile_flow,
2816 const char * const imsi);
2818 /**************************************************************************//**
2819 * Set the LAC 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 lac The LAC to be set. ASCIIZ string. The caller does not
2827 * need to preserve the value once the function returns.
2828 *****************************************************************************/
2829 void evel_mobile_flow_lac_set(EVENT_MOBILE_FLOW * mobile_flow,
2830 const char * const lac);
2832 /**************************************************************************//**
2833 * Set the MCC property of the Mobile Flow.
2835 * @note The property is treated as immutable: it is only valid to call
2836 * the setter once. However, we don't assert if the caller tries to
2837 * overwrite, just ignoring the update instead.
2839 * @param mobile_flow Pointer to the Mobile Flow.
2840 * @param mcc The MCC to be set. ASCIIZ string. The caller does not
2841 * need to preserve the value once the function returns.
2842 *****************************************************************************/
2843 void evel_mobile_flow_mcc_set(EVENT_MOBILE_FLOW * mobile_flow,
2844 const char * const mcc);
2846 /**************************************************************************//**
2847 * Set the MNC property of the Mobile Flow.
2849 * @note The property is treated as immutable: it is only valid to call
2850 * the setter once. However, we don't assert if the caller tries to
2851 * overwrite, just ignoring the update instead.
2853 * @param mobile_flow Pointer to the Mobile Flow.
2854 * @param mnc The MNC to be set. ASCIIZ string. The caller does not
2855 * need to preserve the value once the function returns.
2856 *****************************************************************************/
2857 void evel_mobile_flow_mnc_set(EVENT_MOBILE_FLOW * mobile_flow,
2858 const char * const mnc);
2860 /**************************************************************************//**
2861 * Set the MSISDN property of the Mobile Flow.
2863 * @note The property is treated as immutable: it is only valid to call
2864 * the setter once. However, we don't assert if the caller tries to
2865 * overwrite, just ignoring the update instead.
2867 * @param mobile_flow Pointer to the Mobile Flow.
2868 * @param msisdn The MSISDN to be set. ASCIIZ string. The caller does not
2869 * need to preserve the value once the function returns.
2870 *****************************************************************************/
2871 void evel_mobile_flow_msisdn_set(EVENT_MOBILE_FLOW * mobile_flow,
2872 const char * const msisdn);
2874 /**************************************************************************//**
2875 * Set the Other Functional Role property of the Mobile Flow.
2877 * @note The property is treated as immutable: it is only valid to call
2878 * the setter once. However, we don't assert if the caller tries to
2879 * overwrite, just ignoring the update instead.
2881 * @param mobile_flow Pointer to the Mobile Flow.
2882 * @param role The Other Functional Role to be set. ASCIIZ string. The
2883 * caller does not need to preserve the value once the
2885 *****************************************************************************/
2886 void evel_mobile_flow_other_func_role_set(EVENT_MOBILE_FLOW * mobile_flow,
2887 const char * const role);
2889 /**************************************************************************//**
2890 * Set the RAC property of the Mobile Flow.
2892 * @note The property is treated as immutable: it is only valid to call
2893 * the setter once. However, we don't assert if the caller tries to
2894 * overwrite, just ignoring the update instead.
2896 * @param mobile_flow Pointer to the Mobile Flow.
2897 * @param rac The RAC to be set. ASCIIZ string. The caller does not
2898 * need to preserve the value once the function returns.
2899 *****************************************************************************/
2900 void evel_mobile_flow_rac_set(EVENT_MOBILE_FLOW * mobile_flow,
2901 const char * const rac);
2903 /**************************************************************************//**
2904 * Set the Radio Access Technology property of the Mobile Flow.
2906 * @note The property is treated as immutable: it is only valid to call
2907 * the setter once. However, we don't assert if the caller tries to
2908 * overwrite, just ignoring the update instead.
2910 * @param mobile_flow Pointer to the Mobile Flow.
2911 * @param tech The Radio Access Technology to be set. ASCIIZ string. The
2912 * caller does not need to preserve the value once the
2914 *****************************************************************************/
2915 void evel_mobile_flow_radio_acc_tech_set(EVENT_MOBILE_FLOW * mobile_flow,
2916 const char * const tech);
2918 /**************************************************************************//**
2919 * Set the SAC property of the Mobile Flow.
2921 * @note The property is treated as immutable: it is only valid to call
2922 * the setter once. However, we don't assert if the caller tries to
2923 * overwrite, just ignoring the update instead.
2925 * @param mobile_flow Pointer to the Mobile Flow.
2926 * @param sac The SAC to be set. ASCIIZ string. The caller does not
2927 * need to preserve the value once the function returns.
2928 *****************************************************************************/
2929 void evel_mobile_flow_sac_set(EVENT_MOBILE_FLOW * mobile_flow,
2930 const char * const sac);
2932 /**************************************************************************//**
2933 * Set the Sampling Algorithm property of the Mobile Flow.
2935 * @note The property is treated as immutable: it is only valid to call
2936 * the setter once. However, we don't assert if the caller tries to
2937 * overwrite, just ignoring the update instead.
2939 * @param mobile_flow Pointer to the Mobile Flow.
2940 * @param algorithm The Sampling Algorithm to be set.
2941 *****************************************************************************/
2942 void evel_mobile_flow_samp_alg_set(EVENT_MOBILE_FLOW * mobile_flow,
2945 /**************************************************************************//**
2946 * Set the TAC property of the Mobile Flow.
2948 * @note The property is treated as immutable: it is only valid to call
2949 * the setter once. However, we don't assert if the caller tries to
2950 * overwrite, just ignoring the update instead.
2952 * @param mobile_flow Pointer to the Mobile Flow.
2953 * @param tac The TAC to be set. ASCIIZ string. The caller does not
2954 * need to preserve the value once the function returns.
2955 *****************************************************************************/
2956 void evel_mobile_flow_tac_set(EVENT_MOBILE_FLOW * mobile_flow,
2957 const char * const tac);
2959 /**************************************************************************//**
2960 * Set the Tunnel ID property of the Mobile Flow.
2962 * @note The property is treated as immutable: it is only valid to call
2963 * the setter once. However, we don't assert if the caller tries to
2964 * overwrite, just ignoring the update instead.
2966 * @param mobile_flow Pointer to the Mobile Flow.
2967 * @param tunnel_id The Tunnel ID to be set. ASCIIZ string. The caller does
2968 * not need to preserve the value once the function returns.
2969 *****************************************************************************/
2970 void evel_mobile_flow_tunnel_id_set(EVENT_MOBILE_FLOW * mobile_flow,
2971 const char * const tunnel_id);
2973 /**************************************************************************//**
2974 * Set the VLAN ID property of the Mobile Flow.
2976 * @note The property is treated as immutable: it is only valid to call
2977 * the setter once. However, we don't assert if the caller tries to
2978 * overwrite, just ignoring the update instead.
2980 * @param mobile_flow Pointer to the Mobile Flow.
2981 * @param vlan_id The VLAN ID to be set. ASCIIZ string. The caller does
2982 * not need to preserve the value once the function returns.
2983 *****************************************************************************/
2984 void evel_mobile_flow_vlan_id_set(EVENT_MOBILE_FLOW * mobile_flow,
2985 const char * const vlan_id);
2987 /**************************************************************************//**
2988 * Create a new Mobile GTP Per Flow Metrics.
2990 * @note The mandatory fields on the Mobile GTP Per Flow Metrics must be
2991 * supplied to this factory function and are immutable once set.
2992 * Optional fields have explicit setter functions, but again values
2993 * may only be set once so that the Mobile GTP Per Flow Metrics has
2994 * immutable properties.
2996 * @param avg_bit_error_rate
2997 * @param avg_packet_delay_variation
2998 * @param avg_packet_latency
2999 * @param avg_receive_throughput
3000 * @param avg_transmit_throughput
3001 * @param flow_activation_epoch
3002 * @param flow_activation_microsec
3003 * @param flow_deactivation_epoch
3004 * @param flow_deactivation_microsec
3005 * @param flow_deactivation_time
3006 * @param flow_status
3007 * @param max_packet_delay_variation
3008 * @param num_activation_failures
3009 * @param num_bit_errors
3010 * @param num_bytes_received
3011 * @param num_bytes_transmitted
3012 * @param num_dropped_packets
3013 * @param num_l7_bytes_received
3014 * @param num_l7_bytes_transmitted
3015 * @param num_lost_packets
3016 * @param num_out_of_order_packets
3017 * @param num_packet_errors
3018 * @param num_packets_received_excl_retrans
3019 * @param num_packets_received_incl_retrans
3020 * @param num_packets_transmitted_incl_retrans
3021 * @param num_retries
3022 * @param num_timeouts
3023 * @param num_tunneled_l7_bytes_received
3024 * @param round_trip_time
3025 * @param time_to_first_byte
3027 * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.
3028 * If the structure is not used it must be released using
3029 * ::evel_free_mobile_gtp_flow_metrics.
3030 * @retval NULL Failed to create the event.
3031 *****************************************************************************/
3032 MOBILE_GTP_PER_FLOW_METRICS * evel_new_mobile_gtp_flow_metrics(
3033 double avg_bit_error_rate,
3034 double avg_packet_delay_variation,
3035 int avg_packet_latency,
3036 int avg_receive_throughput,
3037 int avg_transmit_throughput,
3038 int flow_activation_epoch,
3039 int flow_activation_microsec,
3040 int flow_deactivation_epoch,
3041 int flow_deactivation_microsec,
3042 time_t flow_deactivation_time,
3043 const char * const flow_status,
3044 int max_packet_delay_variation,
3045 int num_activation_failures,
3047 int num_bytes_received,
3048 int num_bytes_transmitted,
3049 int num_dropped_packets,
3050 int num_l7_bytes_received,
3051 int num_l7_bytes_transmitted,
3052 int num_lost_packets,
3053 int num_out_of_order_packets,
3054 int num_packet_errors,
3055 int num_packets_received_excl_retrans,
3056 int num_packets_received_incl_retrans,
3057 int num_packets_transmitted_incl_retrans,
3060 int num_tunneled_l7_bytes_received,
3061 int round_trip_time,
3062 int time_to_first_byte);
3064 /**************************************************************************//**
3065 * Free a Mobile GTP Per Flow Metrics.
3067 * Free off the Mobile GTP Per Flow Metrics supplied. Will free all the
3068 * contained allocated memory.
3070 * @note It does not free the Mobile GTP Per Flow Metrics itself, since that
3071 * may be part of a larger structure.
3072 *****************************************************************************/
3073 void evel_free_mobile_gtp_flow_metrics(MOBILE_GTP_PER_FLOW_METRICS * metrics);
3075 /**************************************************************************//**
3076 * Set the Duration of Connection Failed Status property of the Mobile GTP Per
3079 * @note The property is treated as immutable: it is only valid to call
3080 * the setter once. However, we don't assert if the caller tries to
3081 * overwrite, just ignoring the update instead.
3083 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3084 * @param duration The Duration of Connection Failed Status to be set.
3085 *****************************************************************************/
3086 void evel_mobile_gtp_metrics_dur_con_fail_set(
3087 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3090 /**************************************************************************//**
3091 * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow
3094 * @note The property is treated as immutable: it is only valid to call
3095 * the setter once. However, we don't assert if the caller tries to
3096 * overwrite, just ignoring the update instead.
3098 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3099 * @param duration The Duration of Tunnel Failed Status to be set.
3100 *****************************************************************************/
3101 void evel_mobile_gtp_metrics_dur_tun_fail_set(
3102 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3105 /**************************************************************************//**
3106 * Set the Activated By property of the Mobile GTP Per Flow metrics.
3108 * @note The property is treated as immutable: it is only valid to call
3109 * the setter once. However, we don't assert if the caller tries to
3110 * overwrite, just ignoring the update instead.
3112 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3113 * @param act_by The Activated By to be set. ASCIIZ string. The caller
3114 * does not need to preserve the value once the function
3116 *****************************************************************************/
3117 void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3118 const char * const act_by);
3120 /**************************************************************************//**
3121 * Set the Activation Time property of the Mobile GTP Per Flow metrics.
3123 * @note The property is treated as immutable: it is only valid to call
3124 * the setter once. However, we don't assert if the caller tries to
3125 * overwrite, just ignoring the update instead.
3127 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3128 * @param act_time The Activation Time to be set. ASCIIZ string. The caller
3129 * does not need to preserve the value once the function
3131 *****************************************************************************/
3132 void evel_mobile_gtp_metrics_act_time_set(
3133 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3136 /**************************************************************************//**
3137 * Set the Deactivated By property of the Mobile GTP Per Flow metrics.
3139 * @note The property is treated as immutable: it is only valid to call
3140 * the setter once. However, we don't assert if the caller tries to
3141 * overwrite, just ignoring the update instead.
3143 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3144 * @param deact_by The Deactivated By to be set. ASCIIZ string. The caller
3145 * does not need to preserve the value once the function
3147 *****************************************************************************/
3148 void evel_mobile_gtp_metrics_deact_by_set(
3149 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3150 const char * const deact_by);
3152 /**************************************************************************//**
3153 * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.
3155 * @note The property is treated as immutable: it is only valid to call
3156 * the setter once. However, we don't assert if the caller tries to
3157 * overwrite, just ignoring the update instead.
3159 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3160 * @param status The GTP Connection Status to be set. ASCIIZ string. The
3161 * caller does not need to preserve the value once the
3163 *****************************************************************************/
3164 void evel_mobile_gtp_metrics_con_status_set(
3165 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3166 const char * const status);
3168 /**************************************************************************//**
3169 * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.
3171 * @note The property is treated as immutable: it is only valid to call
3172 * the setter once. However, we don't assert if the caller tries to
3173 * overwrite, just ignoring the update instead.
3175 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3176 * @param status The GTP Tunnel Status to be set. ASCIIZ string. The
3177 * caller does not need to preserve the value once the
3179 *****************************************************************************/
3180 void evel_mobile_gtp_metrics_tun_status_set(
3181 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3182 const char * const status);
3184 /**************************************************************************//**
3185 * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.
3187 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3188 * @param index The index of the IP Type-of-Service.
3189 * @param count The count.
3190 *****************************************************************************/
3191 void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS * metrics,
3195 /**************************************************************************//**
3196 * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow
3199 * @note The property is treated as immutable: it is only valid to call
3200 * the setter once. However, we don't assert if the caller tries to
3201 * overwrite, just ignoring the update instead.
3203 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3204 * @param rtt The Large Packet Round-Trip Time to be set.
3205 *****************************************************************************/
3206 void evel_mobile_gtp_metrics_large_pkt_rtt_set(
3207 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3210 /**************************************************************************//**
3211 * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.
3213 * @note The property is treated as immutable: it is only valid to call
3214 * the setter once. However, we don't assert if the caller tries to
3215 * overwrite, just ignoring the update instead.
3217 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3218 * @param threshold The Large Packet Threshold to be set.
3219 *****************************************************************************/
3220 void evel_mobile_gtp_metrics_large_pkt_thresh_set(
3221 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3224 /**************************************************************************//**
3225 * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.
3227 * @note The property is treated as immutable: it is only valid to call
3228 * the setter once. However, we don't assert if the caller tries to
3229 * overwrite, just ignoring the update instead.
3231 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3232 * @param rate The Max Receive Bit Rate to be set.
3233 *****************************************************************************/
3234 void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(
3235 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3238 /**************************************************************************//**
3239 * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.
3241 * @note The property is treated as immutable: it is only valid to call
3242 * the setter once. However, we don't assert if the caller tries to
3243 * overwrite, just ignoring the update instead.
3245 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3246 * @param rate The Max Transmit Bit Rate to be set.
3247 *****************************************************************************/
3248 void evel_mobile_gtp_metrics_max_trx_bit_rate_set(
3249 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3252 /**************************************************************************//**
3253 * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow
3256 * @note The property is treated as immutable: it is only valid to call
3257 * the setter once. However, we don't assert if the caller tries to
3258 * overwrite, just ignoring the update instead.
3260 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3261 * @param num The Number of GTP Echo Failures to be set.
3262 *****************************************************************************/
3263 void evel_mobile_gtp_metrics_num_echo_fail_set(
3264 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3267 /**************************************************************************//**
3268 * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow
3271 * @note The property is treated as immutable: it is only valid to call
3272 * the setter once. However, we don't assert if the caller tries to
3273 * overwrite, just ignoring the update instead.
3275 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3276 * @param num The Number of GTP Tunnel Errors to be set.
3277 *****************************************************************************/
3278 void evel_mobile_gtp_metrics_num_tun_fail_set(
3279 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3282 /**************************************************************************//**
3283 * Set the Number of HTTP Errors property of the Mobile GTP Per Flow Metrics.
3285 * @note The property is treated as immutable: it is only valid to call
3286 * the setter once. However, we don't assert if the caller tries to
3287 * overwrite, just ignoring the update instead.
3289 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3290 * @param num The Number of HTTP Errors to be set.
3291 *****************************************************************************/
3292 void evel_mobile_gtp_metrics_num_http_errors_set(
3293 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3296 /**************************************************************************//**
3297 * Add a TCP flag count to the metrics.
3299 * @note The property is treated as immutable: it is only valid to call
3300 * the setter once. However, we don't assert if the caller tries to
3301 * overwrite, just ignoring the update instead.
3303 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3304 * @param tcp_flag The TCP flag count to be updated.
3305 * @param count The associated flag count.
3306 *****************************************************************************/
3307 void evel_mobile_gtp_metrics_tcp_flag_count_add(
3308 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3309 const EVEL_TCP_FLAGS tcp_flag,
3312 /**************************************************************************//**
3313 * Add a QCI COS count to the metrics.
3315 * @note The property is treated as immutable: it is only valid to call
3316 * the setter once. However, we don't assert if the caller tries to
3317 * overwrite, just ignoring the update instead.
3319 * @param metrics Pointer to the Mobile GTP Per Flow Metrics.
3320 * @param qci_cos The QCI COS count to be updated.
3321 * @param count The associated QCI COS count.
3322 *****************************************************************************/
3323 void evel_mobile_gtp_metrics_qci_cos_count_add(
3324 MOBILE_GTP_PER_FLOW_METRICS * metrics,
3325 const EVEL_QCI_COS_TYPES qci_cos,
3328 /*****************************************************************************/
3329 /*****************************************************************************/
3333 /*****************************************************************************/
3334 /*****************************************************************************/
3336 /**************************************************************************//**
3337 * Create a new Signaling event.
3339 * @note The mandatory fields on the Signaling must be supplied to
3340 * this factory function and are immutable once set. Optional fields
3341 * have explicit setter functions, but again values may only be set
3342 * once so that the event has immutable properties.
3343 * @param vendor_name The vendor id to encode in the event vnf field.
3344 * @param module The module to encode in the event.
3345 * @param vnfname The Virtual network function to encode in the event.
3346 * @returns pointer to the newly manufactured ::EVENT_SIGNALING. If the event
3347 * is not used (i.e. posted) it must be released using
3348 * ::evel_free_signaling.
3349 * @retval NULL Failed to create the event.
3350 *****************************************************************************/
3351 EVENT_SIGNALING * evel_new_signaling(const char * const vendor_name,
3352 const char * const correlator,
3353 const char * const local_ip_address,
3354 const char * const local_port,
3355 const char * const remote_ip_address,
3356 const char * const remote_port);
3358 /**************************************************************************//**
3359 * Free a Signaling event.
3361 * Free off the event supplied. Will free all the contained allocated memory.
3363 * @note It does not free the event itself, since that may be part of a larger
3365 *****************************************************************************/
3366 void evel_free_signaling(EVENT_SIGNALING * const event);
3368 /**************************************************************************//**
3369 * Set the Event Type property of the Signaling event.
3371 * @note The property is treated as immutable: it is only valid to call
3372 * the setter once. However, we don't assert if the caller tries to
3373 * overwrite, just ignoring the update instead.
3375 * @param event Pointer to the Signaling event.
3376 * @param type The Event Type to be set. ASCIIZ string. The caller
3377 * does not need to preserve the value once the function
3379 *****************************************************************************/
3380 void evel_signaling_type_set(EVENT_SIGNALING * const event,
3381 const char * const type);
3383 /**************************************************************************//**
3384 * Add an additional value name/value pair to the SIP signaling.
3386 * The name and value are null delimited ASCII strings. The library takes
3387 * a copy so the caller does not have to preserve values after the function
3390 * @param event Pointer to the fault.
3391 * @param name ASCIIZ string with the attribute's name. The caller
3392 * does not need to preserve the value once the function
3394 * @param value ASCIIZ string with the attribute's value. The caller
3395 * does not need to preserve the value once the function
3397 *****************************************************************************/
3398 void evel_signaling_addl_info_add(EVENT_SIGNALING * event, char * name, char * value);
3400 /**************************************************************************//**
3401 * Set the Correlator property of the Signaling event.
3403 * @note The property is treated as immutable: it is only valid to call
3404 * the setter once. However, we don't assert if the caller tries to
3405 * overwrite, just ignoring the update instead.
3407 * @param event Pointer to the Signaling event.
3408 * @param correlator The correlator to be set. ASCIIZ string. The caller
3409 * does not need to preserve the value once the function
3411 *****************************************************************************/
3412 void evel_signaling_correlator_set(EVENT_SIGNALING * const event,
3413 const char * const correlator);
3415 /**************************************************************************//**
3416 * Set the Local Ip Address property of the Signaling event.
3418 * @note The property is treated as immutable: it is only valid to call
3419 * the setter once. However, we don't assert if the caller tries to
3420 * overwrite, just ignoring the update instead.
3422 * @param event Pointer to the Signaling event.
3423 * @param local_ip_address
3424 * The Local Ip Address to be set. ASCIIZ string. The
3425 * caller does not need to preserve the value once the
3427 *****************************************************************************/
3428 void evel_signaling_local_ip_address_set(EVENT_SIGNALING * const event,
3429 const char * const local_ip_address);
3431 /**************************************************************************//**
3432 * Set the Local Port property of the Signaling event.
3434 * @note The property is treated as immutable: it is only valid to call
3435 * the setter once. However, we don't assert if the caller tries to
3436 * overwrite, just ignoring the update instead.
3438 * @param event Pointer to the Signaling event.
3439 * @param local_port The Local Port to be set. ASCIIZ string. The caller
3440 * does not need to preserve the value once the function
3442 *****************************************************************************/
3443 void evel_signaling_local_port_set(EVENT_SIGNALING * const event,
3444 const char * const local_port);
3446 /**************************************************************************//**
3447 * Set the Remote Ip Address property of the Signaling event.
3449 * @note The property is treated as immutable: it is only valid to call
3450 * the setter once. However, we don't assert if the caller tries to
3451 * overwrite, just ignoring the update instead.
3453 * @param event Pointer to the Signaling event.
3454 * @param remote_ip_address
3455 * The Remote Ip Address to be set. ASCIIZ string. The
3456 * caller does not need to preserve the value once the
3458 *****************************************************************************/
3459 void evel_signaling_remote_ip_address_set(EVENT_SIGNALING * const event,
3460 const char * const remote_ip_address);
3462 /**************************************************************************//**
3463 * Set the Remote Port property of the Signaling event.
3465 * @note The property is treated as immutable: it is only valid to call
3466 * the setter once. However, we don't assert if the caller tries to
3467 * overwrite, just ignoring the update instead.
3469 * @param event Pointer to the Signaling event.
3470 * @param remote_port The Remote Port to be set. ASCIIZ string. The caller
3471 * does not need to preserve the value once the function
3473 *****************************************************************************/
3474 void evel_signaling_remote_port_set(EVENT_SIGNALING * const event,
3475 const char * const remote_port);
3476 /**************************************************************************//**
3477 * Set the Vendor module property of the Signaling event.
3479 * @note The property is treated as immutable: it is only valid to call
3480 * the setter once. However, we don't assert if the caller tries to
3481 * overwrite, just ignoring the update instead.
3483 * @param event Pointer to the Signaling event.
3484 * @param modulename The module name to be set. ASCIIZ string. The caller
3485 * does not need to preserve the value once the function
3487 *****************************************************************************/
3488 void evel_signaling_vnfmodule_name_set(EVENT_SIGNALING * const event,
3489 const char * const module_name);
3490 /**************************************************************************//**
3491 * Set the Vendor module property of the Signaling event.
3493 * @note The property is treated as immutable: it is only valid to call
3494 * the setter once. However, we don't assert if the caller tries to
3495 * overwrite, just ignoring the update instead.
3497 * @param event Pointer to the Signaling event.
3498 * @param vnfname The Virtual Network function to be set. ASCIIZ string.
3499 * The caller does not need to preserve the value once
3500 * the function returns.
3501 *****************************************************************************/
3502 void evel_signaling_vnfname_set(EVENT_SIGNALING * const event,
3503 const char * const vnfname);
3505 /**************************************************************************//**
3506 * Set the Compressed SIP property of the Signaling event.
3508 * @note The property is treated as immutable: it is only valid to call
3509 * the setter once. However, we don't assert if the caller tries to
3510 * overwrite, just ignoring the update instead.
3512 * @param event Pointer to the Signaling event.
3513 * @param compressed_sip
3514 * The Compressed SIP to be set. ASCIIZ string. The caller
3515 * does not need to preserve the value once the function
3517 *****************************************************************************/
3518 void evel_signaling_compressed_sip_set(EVENT_SIGNALING * const event,
3519 const char * const compressed_sip);
3521 /**************************************************************************//**
3522 * Set the Summary SIP property of the Signaling event.
3524 * @note The property is treated as immutable: it is only valid to call
3525 * the setter once. However, we don't assert if the caller tries to
3526 * overwrite, just ignoring the update instead.
3528 * @param event Pointer to the Signaling event.
3529 * @param summary_sip The Summary SIP to be set. ASCIIZ string. The caller
3530 * does not need to preserve the value once the function
3532 *****************************************************************************/
3533 void evel_signaling_summary_sip_set(EVENT_SIGNALING * const event,
3534 const char * const summary_sip);
3537 /*****************************************************************************/
3538 /*****************************************************************************/
3542 /*****************************************************************************/
3543 /*****************************************************************************/
3545 /**************************************************************************//**
3546 * Create a new State Change event.
3548 * @note The mandatory fields on the Syslog must be supplied to this factory
3549 * function and are immutable once set. Optional fields have explicit
3550 * setter functions, but again values may only be set once so that the
3551 * Syslog has immutable properties.
3553 * @param new_state The new state of the reporting entity.
3554 * @param old_state The old state of the reporting entity.
3555 * @param interface The card or port name of the reporting entity.
3557 * @returns pointer to the newly manufactured ::EVENT_STATE_CHANGE. If the
3558 * event is not used it must be released using
3559 * ::evel_free_state_change
3560 * @retval NULL Failed to create the event.
3561 *****************************************************************************/
3562 EVENT_STATE_CHANGE * evel_new_state_change(const EVEL_ENTITY_STATE new_state,
3563 const EVEL_ENTITY_STATE old_state,
3564 const char * const interface);
3566 /**************************************************************************//**
3567 * Free a State Change.
3569 * Free off the State Change supplied. Will free all the contained allocated
3572 * @note It does not free the State Change itself, since that may be part of a
3574 *****************************************************************************/
3575 void evel_free_state_change(EVENT_STATE_CHANGE * const state_change);
3577 /**************************************************************************//**
3578 * Set the Event Type property of the State Change.
3580 * @note The property is treated as immutable: it is only valid to call
3581 * the setter once. However, we don't assert if the caller tries to
3582 * overwrite, just ignoring the update instead.
3584 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3585 * @param type The Event Type to be set. ASCIIZ string. The caller
3586 * does not need to preserve the value once the function
3588 *****************************************************************************/
3589 void evel_state_change_type_set(EVENT_STATE_CHANGE * const state_change,
3590 const char * const type);
3592 /**************************************************************************//**
3593 * Add an additional field name/value pair to the State Change.
3595 * The name and value are null delimited ASCII strings. The library takes
3596 * a copy so the caller does not have to preserve values after the function
3599 * @param state_change Pointer to the ::EVENT_STATE_CHANGE.
3600 * @param name ASCIIZ string with the attribute's name. The caller
3601 * does not need to preserve the value once the function
3603 * @param value ASCIIZ string with the attribute's value. The caller
3604 * does not need to preserve the value once the function
3606 *****************************************************************************/
3607 void evel_state_change_addl_field_add(EVENT_STATE_CHANGE * const state_change,
3608 const char * const name,
3609 const char * const value);
3611 /*****************************************************************************/
3612 /*****************************************************************************/
3616 /*****************************************************************************/
3617 /*****************************************************************************/
3619 /**************************************************************************//**
3620 * Create a new syslog event.
3622 * @note The mandatory fields on the Syslog must be supplied to this factory
3623 * function and are immutable once set. Optional fields have explicit
3624 * setter functions, but again values may only be set once so that the
3625 * Syslog has immutable properties.
3627 * @param event_source_type
3632 * @returns pointer to the newly manufactured ::EVENT_SYSLOG. If the event is
3633 * not used it must be released using ::evel_free_syslog
3634 * @retval NULL Failed to create the event.
3635 *****************************************************************************/
3636 EVENT_SYSLOG * evel_new_syslog(EVEL_SOURCE_TYPES event_source_type,
3637 const char * const syslog_msg,
3638 const char * const syslog_tag);
3640 /**************************************************************************//**
3641 * Set the Event Type property of the Syslog.
3643 * @note The property is treated as immutable: it is only valid to call
3644 * the setter once. However, we don't assert if the caller tries to
3645 * overwrite, just ignoring the update instead.
3647 * @param syslog Pointer to the syslog.
3648 * @param type The Event Type to be set. ASCIIZ string. The caller
3649 * does not need to preserve the value once the function
3651 *****************************************************************************/
3652 void evel_syslog_type_set(EVENT_SYSLOG * syslog,
3653 const char * const type);
3655 /**************************************************************************//**
3658 * Free off the Syslog supplied. Will free all the contained allocated memory.
3660 * @note It does not free the Syslog itself, since that may be part of a
3662 *****************************************************************************/
3663 void evel_free_syslog(EVENT_SYSLOG * event);
3665 /**************************************************************************//**
3666 * Add an additional field name/value pair to the Syslog.
3668 * The name and value are null delimited ASCII strings. The library takes
3669 * a copy so the caller does not have to preserve values after the function
3672 * @param syslog Pointer to the syslog.
3673 * @param name ASCIIZ string with the attribute's name. The caller
3674 * does not need to preserve the value once the function
3676 * @param value ASCIIZ string with the attribute's value. The caller
3677 * does not need to preserve the value once the function
3679 *****************************************************************************/
3680 void evel_syslog_addl_field_add(EVENT_SYSLOG * syslog,
3684 /**************************************************************************//**
3685 * Set the Event Source Host property of the Syslog.
3687 * @note The property is treated as immutable: it is only valid to call
3688 * the setter once. However, we don't assert if the caller tries to
3689 * overwrite, just ignoring the update instead.
3691 * @param syslog Pointer to the Syslog.
3692 * @param host The Event Source Host to be set. ASCIIZ string. The
3693 * caller does not need to preserve the value once the
3695 *****************************************************************************/
3696 void evel_syslog_event_source_host_set(EVENT_SYSLOG * syslog,
3697 const char * const host);
3699 /**************************************************************************//**
3700 * Set the Syslog Facility property of the Syslog.
3702 * @note The property is treated as immutable: it is only valid to call
3703 * the setter once. However, we don't assert if the caller tries to
3704 * overwrite, just ignoring the update instead.
3706 * @param syslog Pointer to the Syslog.
3707 * @param facility The Syslog Facility to be set. ASCIIZ string. The caller
3708 * does not need to preserve the value once the function
3710 *****************************************************************************/
3711 void evel_syslog_facility_set(EVENT_SYSLOG * syslog,
3712 EVEL_SYSLOG_FACILITIES facility);
3714 /**************************************************************************//**
3715 * Set the Process property of the Syslog.
3717 * @note The property is treated as immutable: it is only valid to call
3718 * the setter once. However, we don't assert if the caller tries to
3719 * overwrite, just ignoring the update instead.
3721 * @param syslog Pointer to the Syslog.
3722 * @param proc The Process to be set. ASCIIZ string. The caller does
3723 * not need to preserve the value once the function returns.
3724 *****************************************************************************/
3725 void evel_syslog_proc_set(EVENT_SYSLOG * syslog, const char * const proc);
3727 /**************************************************************************//**
3728 * Set the Process ID property of the Syslog.
3730 * @note The property is treated as immutable: it is only valid to call
3731 * the setter once. However, we don't assert if the caller tries to
3732 * overwrite, just ignoring the update instead.
3734 * @param syslog Pointer to the Syslog.
3735 * @param proc_id The Process ID to be set.
3736 *****************************************************************************/
3737 void evel_syslog_proc_id_set(EVENT_SYSLOG * syslog, int proc_id);
3739 /**************************************************************************//**
3740 * Set the Version property of the Syslog.
3742 * @note The property is treated as immutable: it is only valid to call
3743 * the setter once. However, we don't assert if the caller tries to
3744 * overwrite, just ignoring the update instead.
3746 * @param syslog Pointer to the Syslog.
3747 * @param version The Version to be set.
3748 *****************************************************************************/
3749 void evel_syslog_version_set(EVENT_SYSLOG * syslog, int version);
3751 /**************************************************************************//**
3752 * Set the Structured Data property of the Syslog.
3754 * @note The property is treated as immutable: it is only valid to call
3755 * the setter once. However, we don't assert if the caller tries to
3756 * overwrite, just ignoring the update instead.
3758 * @param syslog Pointer to the Syslog.
3759 * @param s_data The Structured Data to be set. ASCIIZ string. The caller
3760 * does not need to preserve the value once the function
3762 *****************************************************************************/
3763 void evel_syslog_s_data_set(EVENT_SYSLOG * syslog, const char * const s_data);
3765 /**************************************************************************//**
3766 * Set the Structured SDID property of the Syslog.
3768 * @note The property is treated as immutable: it is only valid to call
3769 * the setter once. However, we don't assert if the caller tries to
3770 * overwrite, just ignoring the update instead.
3772 * @param syslog Pointer to the Syslog.
3773 * @param sdid The Structured Data to be set. ASCIIZ string. name@number
3774 * Caller does not need to preserve the value once the function
3776 *****************************************************************************/
3777 void evel_syslog_sdid_set(EVENT_SYSLOG * syslog, const char * const sdid);
3779 /**************************************************************************//**
3780 * Set the Structured Severity property of the Syslog.
3782 * @note The property is treated as immutable: it is only valid to call
3783 * the setter once. However, we don't assert if the caller tries to
3784 * overwrite, just ignoring the update instead.
3786 * @param syslog Pointer to the Syslog.
3787 * @param sdid The Structured Data to be set. ASCIIZ string.
3788 * Caller does not need to preserve the value once the function
3790 *****************************************************************************/
3791 void evel_syslog_severity_set(EVENT_SYSLOG * syslog, const char * const severty);
3794 /*****************************************************************************/
3795 /*****************************************************************************/
3799 /*****************************************************************************/
3800 /*****************************************************************************/
3802 /**************************************************************************//**
3803 * Create a new other event.
3806 * @returns pointer to the newly manufactured ::EVENT_OTHER. If the event is
3807 * not used it must be released using ::evel_free_other.
3808 * @retval NULL Failed to create the event.
3809 *****************************************************************************/
3810 EVENT_OTHER * evel_new_other(void);
3812 /**************************************************************************//**
3815 * Free off the Other supplied. Will free all the contained allocated memory.
3817 * @note It does not free the Other itself, since that may be part of a
3819 *****************************************************************************/
3820 void evel_free_other(EVENT_OTHER * event);
3822 /**************************************************************************//**
3823 * Set the Event Type property of the Other.
3825 * @note The property is treated as immutable: it is only valid to call
3826 * the setter once. However, we don't assert if the caller tries to
3827 * overwrite, just ignoring the update instead.
3829 * @param other Pointer to the Other.
3830 * @param type The Event Type to be set. ASCIIZ string. The caller
3831 * does not need to preserve the value once the function
3833 *****************************************************************************/
3834 void evel_other_type_set(EVENT_OTHER * other,
3835 const char * const type);
3837 /**************************************************************************//**
3838 * Add a value name/value pair to the Other.
3840 * The name and value are null delimited ASCII strings. The library takes
3841 * a copy so the caller does not have to preserve values after the function
3844 * @param other Pointer to the Other.
3845 * @param name ASCIIZ string with the attribute's name.
3846 * @param value ASCIIZ string with the attribute's value.
3847 *****************************************************************************/
3848 void evel_other_field_add(EVENT_OTHER * other,
3852 /*****************************************************************************/
3853 /*****************************************************************************/
3857 /*****************************************************************************/
3858 /*****************************************************************************/
3860 /**************************************************************************//**
3861 * Return the current measurement interval provided by the Event Listener.
3863 * @returns The current measurement interval
3864 * @retval EVEL_MEASUREMENT_INTERVAL_UKNOWN (0) - interval has not been
3866 *****************************************************************************/
3867 int evel_get_measurement_interval();
3869 /*****************************************************************************/
3870 /* Supported Report version. */
3871 /*****************************************************************************/
3872 #define EVEL_VOICEQ_MAJOR_VERSION 1
3873 #define EVEL_VOICEQ_MINOR_VERSION 1
3875 /**************************************************************************//**
3877 * JSON equivalent field: voiceQualityFields
3878 *****************************************************************************/
3880 typedef struct event_voiceQuality {
3881 /***************************************************************************/
3882 /* Header and version */
3883 /***************************************************************************/
3884 EVENT_HEADER header;
3888 /***************************************************************************/
3889 /* Mandatory fields */
3890 /***************************************************************************/
3892 char *calleeSideCodec;
3893 char *callerSideCodec;
3896 VENDOR_VNFNAME_FIELD vendorVnfNameFields;
3898 /***************************************************************************/
3899 /* Optional fields */
3900 /***************************************************************************/
3901 EVEL_OPTION_STRING phoneNumber;
3902 DLIST additionalInformation;
3903 DLIST endOfCallVqmSummaries;
3905 } EVENT_VOICE_QUALITY;
3907 /**************************************************************************//**
3908 * End of Call Voice Quality Metrices
3909 * JSON equivalent field: endOfCallVqmSummaries
3910 *****************************************************************************/
3911 typedef struct end_of_call_vqm_summaries {
3912 /***************************************************************************/
3913 /* Mandatory fields */
3914 /***************************************************************************/
3915 char* adjacencyName;
3916 char* endpointDescription;
3918 /***************************************************************************/
3919 /* Optional fields */
3920 /***************************************************************************/
3921 EVEL_OPTION_INT endpointJitter;
3922 EVEL_OPTION_INT endpointRtpOctetsDiscarded;
3923 EVEL_OPTION_INT endpointRtpOctetsReceived;
3924 EVEL_OPTION_INT endpointRtpOctetsSent;
3925 EVEL_OPTION_INT endpointRtpPacketsDiscarded;
3926 EVEL_OPTION_INT endpointRtpPacketsReceived;
3927 EVEL_OPTION_INT endpointRtpPacketsSent;
3928 EVEL_OPTION_INT localJitter;
3929 EVEL_OPTION_INT localRtpOctetsDiscarded;
3930 EVEL_OPTION_INT localRtpOctetsReceived;
3931 EVEL_OPTION_INT localRtpOctetsSent;
3932 EVEL_OPTION_INT localRtpPacketsDiscarded;
3933 EVEL_OPTION_INT localRtpPacketsReceived;
3934 EVEL_OPTION_INT localRtpPacketsSent;
3935 EVEL_OPTION_INT mosCqe;
3936 EVEL_OPTION_INT packetsLost;
3937 EVEL_OPTION_INT packetLossPercent;
3938 EVEL_OPTION_INT rFactor;
3939 EVEL_OPTION_INT roundTripDelay;
3941 } END_OF_CALL_VOICE_QUALITY_METRICS;
3943 /**************************************************************************//**
3944 * Voice Quality Additional Info.
3945 * JSON equivalent field: additionalInformation
3946 *****************************************************************************/
3947 typedef struct voice_quality_additional_info {
3950 } VOICE_QUALITY_ADDL_INFO;
3952 /**************************************************************************//**
3953 * Create a new voice quality event.
3955 * @note The mandatory fields on the Voice Quality must be supplied to this
3956 * factory function and are immutable once set. Optional fields have
3957 * explicit setter functions, but again values may only be set once
3958 * so that the Voice Quality has immutable properties.
3959 * @param calleeSideCodec Callee codec for the call.
3960 * @param callerSideCodec Caller codec for the call.
3961 * @param correlator Constant across all events on this call.
3962 * @param midCallRtcp Base64 encoding of the binary RTCP data
3963 * (excluding Eth/IP/UDP headers).
3964 * @param vendorVnfNameFields Vendor, VNF and VfModule names.
3965 * @returns pointer to the newly manufactured ::EVENT_VOICE_QUALITY. If the
3966 * event is not used (i.e. posted) it must be released using
3967 ::evel_free_voice_quality.
3968 * @retval NULL Failed to create the event.
3969 *****************************************************************************/
3970 EVENT_VOICE_QUALITY * evel_new_voice_quality(const char * const calleeSideCodec,
3971 const char * const callerSideCodec, const char * const correlator,
3972 const char * const midCallRtcp, const char * const vendorVnfNameFields);
3974 /**************************************************************************//**
3975 * Set the Callee side codec for Call for domain Voice Quality
3977 * @note The property is treated as immutable: it is only valid to call
3978 * the setter once. However, we don't assert if the caller tries to
3979 * overwrite, just ignoring the update instead.
3981 * @param voiceQuality Pointer to the Voice Quality Event.
3982 * @param calleeCodecForCall The Callee Side Codec to be set. ASCIIZ
3983 * string. The caller does not need to
3984 * preserve the value once the function
3986 *****************************************************************************/
3987 void evel_voice_quality_callee_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
3988 const char * const calleeCodecForCall);
3990 /**************************************************************************//**
3991 * Set the Caller side codec for Call for domain Voice Quality
3993 * @note The property is treated as immutable: it is only valid to call
3994 * the setter once. However, we don't assert if the caller tries to
3995 * overwrite, just ignoring the update instead.
3997 * @param voiceQuality Pointer to the Voice Quality Event.
3998 * @param callerCodecForCall The Caller Side Codec to be set. ASCIIZ
3999 * string. The caller does not need to
4000 * preserve the value once the function
4002 *****************************************************************************/
4003 void evel_voice_quality_caller_codec_set(EVENT_VOICE_QUALITY * voiceQuality,
4004 const char * const callerCodecForCall);
4006 /**************************************************************************//**
4007 * Set the correlator for domain Voice Quality
4009 * @note The property is treated as immutable: it is only valid to call
4010 * the setter once. However, we don't assert if the caller tries to
4011 * overwrite, just ignoring the update instead.
4013 * @param voiceQuality Pointer to the Voice Quality Event.
4014 * @param correlator The correlator value to be set. ASCIIZ
4015 * string. The caller does not need to
4016 * preserve the value once the function
4018 *****************************************************************************/
4019 void evel_voice_quality_correlator_set(EVENT_VOICE_QUALITY * voiceQuality,
4020 const char * const vCorrelator);
4022 /**************************************************************************//**
4023 * Set the RTCP Call Data for domain Voice Quality
4025 * @note The property is treated as immutable: it is only valid to call
4026 * the setter once. However, we don't assert if the caller tries to
4027 * overwrite, just ignoring the update instead.
4029 * @param voiceQuality Pointer to the Voice Quality Event.
4030 * @param rtcpCallData The RTCP Call Data to be set. ASCIIZ
4031 * string. The caller does not need to
4032 * preserve the value once the function
4034 *****************************************************************************/
4035 void evel_voice_quality_rtcp_data_set(EVENT_VOICE_QUALITY * voiceQuality,
4036 const char * const rtcpCallData);
4038 /**************************************************************************//**
4039 * Set the Vendor VNF Name fields for domain Voice Quality
4041 * @note The property is treated as immutable: it is only valid to call
4042 * the setter once. However, we don't assert if the caller tries to
4043 * overwrite, just ignoring the update instead.
4045 * @param voiceQuality Pointer to the Voice Quality Event.
4046 * @param nameFields The Vendor, VNF and VfModule names to be set.
4047 * ASCIIZ string. The caller does not need to
4048 * preserve the value once the function
4050 *****************************************************************************/
4051 void evel_voice_quality_name_fields_set(EVENT_VOICE_QUALITY * voiceQuality,
4052 const char * const nameFields);
4054 /**************************************************************************//**
4055 * Add an End of Call Voice Quality Metrices
4057 * The adjacencyName and endpointDescription is null delimited ASCII string.
4058 * The library takes a copy so the caller does not have to preserve values
4059 * after the function returns.
4061 * @param voiceQuality Pointer to the measurement.
4062 * @param adjacencyName Adjacency name
4063 * @param endpointDescription Enumeration: ‘Caller’, ‘Callee’.
4064 * @param endpointJitter Endpoint jitter
4065 * @param endpointRtpOctetsDiscarded Endpoint RTP octets discarded.
4066 * @param endpointRtpOctetsReceived Endpoint RTP octets received.
4067 * @param endpointRtpOctetsSent Endpoint RTP octets sent
4068 * @param endpointRtpPacketsDiscarded Endpoint RTP packets discarded.
4069 * @param endpointRtpPacketsReceived Endpoint RTP packets received.
4070 * @param endpointRtpPacketsSent Endpoint RTP packets sent.
4071 * @param localJitter Local jitter.
4072 * @param localRtpOctetsDiscarded Local RTP octets discarded.
4073 * @param localRtpOctetsReceived Local RTP octets received.
4074 * @param localRtpOctetsSent Local RTP octets sent.
4075 * @param localRtpPacketsDiscarded Local RTP packets discarded.
4076 * @param localRtpPacketsReceived Local RTP packets received.
4077 * @param localRtpPacketsSent Local RTP packets sent.
4078 * @param mosCqe Decimal range from 1 to 5
4080 * @param packetsLost No Packets lost
4081 * @param packetLossPercent Calculated percentage packet loss
4082 * @param rFactor rFactor from 0 to 100
4083 * @param roundTripDelay Round trip delay in milliseconds
4084 *****************************************************************************/
4085 void evel_voice_quality_end_metrics_add(EVENT_VOICE_QUALITY * voiceQuality,
4086 const char * adjacencyName, EVEL_SERVICE_ENDPOINT_DESC endpointDescription,
4088 int endpointRtpOctetsDiscarded,
4089 int endpointRtpOctetsReceived,
4090 int endpointRtpOctetsSent,
4091 int endpointRtpPacketsDiscarded,
4092 int endpointRtpPacketsReceived,
4093 int endpointRtpPacketsSent,
4095 int localRtpOctetsDiscarded,
4096 int localRtpOctetsReceived,
4097 int localRtpOctetsSent,
4098 int localRtpPacketsDiscarded,
4099 int localRtpPacketsReceived,
4100 int localRtpPacketsSent,
4103 int packetLossPercent,
4105 int roundTripDelay);
4107 /**************************************************************************//**
4108 * Free a Voice Quality.
4110 * Free off the Voce Quality supplied. Will free all the contained allocated
4113 * @note It does not free the Voice Quality itself, since that may be part of a
4115 *****************************************************************************/
4116 void evel_free_voice_quality(EVENT_VOICE_QUALITY * voiceQuality);
4118 /**************************************************************************//**
4119 * Add an additional value name/value pair to the Voice Quality.
4121 * The name and value are null delimited ASCII strings. The library takes
4122 * a copy so the caller does not have to preserve values after the function
4125 * @param fault Pointer to the fault.
4126 * @param name ASCIIZ string with the attribute's name. The caller
4127 * does not need to preserve the value once the function
4129 * @param value ASCIIZ string with the attribute's value. The caller
4130 * does not need to preserve the value once the function
4132 *****************************************************************************/
4133 void evel_voice_quality_addl_info_add(EVENT_VOICE_QUALITY * voiceQuality, char * name, char * value);
4136 /*****************************************************************************/
4137 /*****************************************************************************/
4141 /*****************************************************************************/
4142 /*****************************************************************************/
4144 /*****************************************************************************/
4146 /*****************************************************************************/
4147 #define EVEL_DEBUG(FMT, ...) log_debug(EVEL_LOG_DEBUG, (FMT), ##__VA_ARGS__)
4148 #define EVEL_INFO(FMT, ...) log_debug(EVEL_LOG_INFO, (FMT), ##__VA_ARGS__)
4149 #define EVEL_SPAMMY(FMT, ...) log_debug(EVEL_LOG_SPAMMY, (FMT), ##__VA_ARGS__)
4150 #define EVEL_ERROR(FMT, ...) log_debug(EVEL_LOG_ERROR, "ERROR: " FMT, \
4152 #define EVEL_ENTER() \
4154 log_debug(EVEL_LOG_DEBUG, "Enter %s {", __FUNCTION__); \
4155 debug_indent += 2; \
4157 #define EVEL_EXIT() \
4159 debug_indent -= 2; \
4160 log_debug(EVEL_LOG_DEBUG, "Exit %s }", __FUNCTION__); \
4163 #define INDENT_SEPARATORS \
4164 "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "
4166 extern EVEL_LOG_LEVELS debug_level;
4167 extern int debug_indent;
4170 #define EVEL_DEBUG_ON() ((debug_level) >= EVEL_LOG_DEBUG)
4172 /**************************************************************************//**
4173 * Initialize logging
4175 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4176 * @param[in] ident The identifier for our logs.
4177 *****************************************************************************/
4178 void log_initialize(EVEL_LOG_LEVELS level, const char * ident);
4180 /**************************************************************************//**
4181 * Log debug information
4183 * Logs debugging information in a platform independent manner.
4185 * @param[in] level The debugging level - one of ::EVEL_LOG_LEVELS.
4186 * @param[in] format Log formatting string in printf format.
4187 * @param[in] ... Variable argument list.
4188 *****************************************************************************/
4189 void log_debug(EVEL_LOG_LEVELS level, char * format, ...);
4191 /***************************************************************************//*
4192 * Store the formatted string into the static error string and log the error.
4194 * @param format Error string in standard printf format.
4195 * @param ... Variable parameters to be substituted into the format string.
4196 *****************************************************************************/
4197 void log_error_state(char * format, ...);