Merge "ASN compiled code for E2AP v1.1"
[ric-plt/e2.git] / RIC-E2-TERMINATION / sctpThread.h
index 4cd494a..51527c0 100644 (file)
@@ -41,6 +41,8 @@
 #include <atomic>
 #include <sys/param.h>
 #include <sys/file.h>
+#include <sys/types.h>
+#include <ifaddrs.h>
 #include <ctime>
 #include <netdb.h>
 #include <sys/epoll.h>
@@ -148,6 +150,7 @@ typedef struct sctp_params {
     string prometheusPort {"8088"};
     Family<Counter> *prometheusFamily;
     Exposer *prometheusExposer = nullptr;
+    Counter *e2tCounters[6][2][ProcedureCode_id_RICsubscriptionDelete + 1] {};
 } sctp_params_t;
 
 // RAN to RIC
@@ -417,6 +420,7 @@ static int enable_log_change_notify(const char* fileName);
 static int register_log_change_notify(const char *fileName);
 static void * monitor_loglevel_change_handler(void* arg);
 void  update_mdc_log_level_severity(char* log_level);
+char* getinterfaceip();
 static char* parse_file(char* filename);
 
 
@@ -430,8 +434,10 @@ static inline uint64_t rdtscp(uint32_t &aux) {
 #endif
 
 #ifdef UNIT_TEST
-int e2_test_main(const int argc, char **argv, sctp_params_t &sctpParams);
-int buildListeningPort(sctp_params_t &sctpParams);
+    #define FILE_DESCRIPTOR 53424 /*Dummy value for file descriptor only when UT is defined*/
 #endif
 
+int buildListeningPort(sctp_params_t &sctpParams);
+void buildE2TPrometheusCounters(sctp_params_t &sctpParams);
+
 #endif //X2_SCTP_THREAD_H