diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index e60651393513bab12e18fafe7b9174f89dbecd29..2b19a8098461e1d2679a0d6f6f7bad065ec66848 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -636,7 +636,7 @@ class Containerize():
 				mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + self.eNB_logFile[self.eNB_instance], self.eNBSourceCodePath + '/cmake_targets/')
 		logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
 
-	def DeployGenObject(self, HTML):
+	def DeployGenObject(self, HTML, RAN, UE):
 		self.exitStatus = 0
 		logging.info('\u001B[1m Checking Services to deploy\u001B[0m')
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services'
@@ -679,12 +679,15 @@ class Containerize():
 		healthy = 0
 		while (count < 10):
 			count += 1
+			containerStatus = []
 			deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
 			healthy = 0
 			for state in deployStatus.split('\n'):
-				res = re.search('Up \(healthy\)', state)
-				if res is not None:
+				if re.search('Up \(healthy\)', state) is not None:
 					healthy += 1
+				if re.search('rfsim4g-db-init.*Exit 0', state) is not None:
+					subprocess.check_output('docker rm -f rfsim4g-db-init || true', shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+				containerStatus.append(state)
 			if healthy == self.nb_healthy[0]:
 				count = 100
 			else:
@@ -694,27 +697,41 @@ class Containerize():
 			if self.tsharkStarted == False:
 				logging.debug('Starting tshark on public network')
 				self.CaptureOnDockerNetworks()
-				self.tsharkStarted = True
 			HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
+			for cState in containerStatus:
+				logging.debug(cState)
 			logging.info('\u001B[1m Deploying OAI Object(s) PASS\u001B[0m')
 		else:
-			self.exitStatus = 1
 			HTML.CreateHtmlTestRow('Could not deploy in time', 'KO', CONST.ALL_PROCESSES_OK)
+			for cState in containerStatus:
+				logging.debug(cState)
 			logging.error('\u001B[1m Deploying OAI Object(s) FAILED\u001B[0m')
+			HTML.testCase_id = 'AUTO-UNDEPLOY'
+			UE.testCase_id = 'AUTO-UNDEPLOY'
+			HTML.desc = 'Automatic Undeployment'
+			UE.desc = 'Automatic Undeployment'
+			UE.ShowTestID()
+			self.UndeployGenObject(HTML, RAN, UE)
+			self.exitStatus = 1
 
 	def CaptureOnDockerNetworks(self):
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"'
 		networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
-		cmd = 'sudo nohup tshark -f "not tcp and not arp and not port 53 and not host archive.ubuntu.com and not host security.ubuntu.com and not port 2152"'
+		if re.search('4g.*rfsimulator', self.yamlPath[0]) is not None:
+			cmd = 'sudo nohup tshark -f "(host 192.168.61.11 and icmp) or (not host 192.168.61.11 and not host 192.168.61.30 and not arp and not port 53 and not port 2152)"'
+		elif re.search('5g.*rfsimulator', self.yamlPath[0]) is not None:
+			cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not arp and not port 53 and not port 2152 and not port 2153)"'
+		else:
+			return
 		for name in networkNames.split('\n'):
-			res = re.search('rfsim', name)
-			if res is not None:
+			if re.search('rfsim', name) is not None:
 				cmd += ' -i ' + name
 		cmd += ' -w /tmp/capture_'
 		ymlPath = self.yamlPath[0].split('/')
 		cmd += ymlPath[1] + '.pcap > /tmp/tshark.log 2>&1 &'
 		logging.debug(cmd)
 		networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		self.tsharkStarted = True
 
 	def UndeployGenObject(self, HTML, RAN, UE):
 		self.exitStatus = 0
@@ -745,7 +762,11 @@ class Containerize():
 				cName = res.group('container_name')
 				cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1'
 				logging.debug(cmd)
-				deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+				subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+				if re.search('magma-mme', cName) is not None:
+					cmd = 'cd ' + self.yamlPath[0] + ' && docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log'
+					logging.debug(cmd)
+					subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
 		fullStatus = True
 		if anyLogs:
 			cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath
diff --git a/ci-scripts/conf_files/benetel-4g.conf b/ci-scripts/conf_files/benetel-4g.conf
index 9423ebe56ecb84c5b2559abf057ce8f1fde8bad3..e2974a171d924086feb848e0fa20592033aec50f 100644
--- a/ci-scripts/conf_files/benetel-4g.conf
+++ b/ci-scripts/conf_files/benetel-4g.conf
@@ -269,17 +269,10 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/benetel-5g.conf b/ci-scripts/conf_files/benetel-5g.conf
index dc86567c1fe70b6ecc18965dc466cd5c1b0ef986..bfe61188b64514fcbff501725624a9330e7a05a9 100644
--- a/ci-scripts/conf_files/benetel-5g.conf
+++ b/ci-scripts/conf_files/benetel-5g.conf
@@ -262,18 +262,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/cu.band7.tm1.100PRB.conf b/ci-scripts/conf_files/cu.band7.tm1.100PRB.conf
index e2c94b14ab176b9273373f7631ae3ac188a547c4..1102528cd3721d1b7b5a2922691571b1bacd3008 100644
--- a/ci-scripts/conf_files/cu.band7.tm1.100PRB.conf
+++ b/ci-scripts/conf_files/cu.band7.tm1.100PRB.conf
@@ -201,15 +201,10 @@ eNBs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   pdcp_log_level              = "info";
-  pdcp_log_verbosity          = "high";
   rrc_log_level               = "info";
-  rrc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
   gtp_log_level               = "info";
-  gtp_log_verbosity           = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/ci-scripts/conf_files/cu.band7.tm1.25PRB.conf b/ci-scripts/conf_files/cu.band7.tm1.25PRB.conf
index 5b994ed29b15cb99f374d7b11fb5e2fc20cc7ab4..ec7620a724419b768f1656a4a9880495fb2e935f 100644
--- a/ci-scripts/conf_files/cu.band7.tm1.25PRB.conf
+++ b/ci-scripts/conf_files/cu.band7.tm1.25PRB.conf
@@ -201,15 +201,10 @@ eNBs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   pdcp_log_level              = "info";
-  pdcp_log_verbosity          = "high";
   rrc_log_level               = "info";
-  rrc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
   gtp_log_level               = "info";
-  gtp_log_verbosity           = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/ci-scripts/conf_files/cu.band7.tm1.50PRB.conf b/ci-scripts/conf_files/cu.band7.tm1.50PRB.conf
index 148c5a9903f2e435cf17bd884c0234ca6be686e0..7e64ad80393e51087a6368cf40c6ffac4056e88f 100644
--- a/ci-scripts/conf_files/cu.band7.tm1.50PRB.conf
+++ b/ci-scripts/conf_files/cu.band7.tm1.50PRB.conf
@@ -201,15 +201,10 @@ eNBs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   pdcp_log_level              = "info";
-  pdcp_log_verbosity          = "high";
   rrc_log_level               = "info";
-  rrc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
   gtp_log_level               = "info";
-  gtp_log_verbosity           = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf
index a3ecffb9be7b349cfe35a940483bbf558c0b1856..217c694055c71f74775efc1a58b00b75f3260c9f 100644
--- a/ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/du.band7.tm1.100PRB.usrpb210.conf
@@ -96,17 +96,11 @@ RUs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   hw_log_level                = "info";
-  hw_log_verbosity            = "medium";
   phy_log_level               = "info";
-  phy_log_verbosity           = "medium";
   mac_log_level               = "info";
-  mac_log_verbosity           = "high";
   rlc_log_level               = "info";
-  rlc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/ci-scripts/conf_files/du.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/du.band7.tm1.25PRB.usrpb210.conf
index 1920992d70c608a764529c747e3115e274e970ac..61d4cff51b6ec141ae17bccf5c619656db99ae99 100644
--- a/ci-scripts/conf_files/du.band7.tm1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/du.band7.tm1.25PRB.usrpb210.conf
@@ -96,17 +96,11 @@ RUs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   hw_log_level                = "info";
-  hw_log_verbosity            = "medium";
   phy_log_level               = "info";
-  phy_log_verbosity           = "medium";
   mac_log_level               = "info";
-  mac_log_verbosity           = "high";
   rlc_log_level               = "info";
-  rlc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/ci-scripts/conf_files/du.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/du.band7.tm1.50PRB.usrpb210.conf
index 5df8da05a3aeca11bb4c9c4148f0b00b1bbb0c38..4342e8f4b47f851120c65ebce304267a6feca568 100644
--- a/ci-scripts/conf_files/du.band7.tm1.50PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/du.band7.tm1.50PRB.usrpb210.conf
@@ -96,17 +96,11 @@ RUs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   hw_log_level                = "info";
-  hw_log_verbosity            = "medium";
   phy_log_level               = "info";
-  phy_log_verbosity           = "medium";
   mac_log_level               = "info";
-  mac_log_verbosity           = "high";
   rlc_log_level               = "info";
-  rlc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/ci-scripts/conf_files/enb.band13.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band13.tm1.25PRB.usrpb210.conf
index e70ca782050be7e67afa529540d178608a7b523b..122654df260522c88d10fcd028afd72e04c35708 100644
--- a/ci-scripts/conf_files/enb.band13.tm1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band13.tm1.25PRB.usrpb210.conf
@@ -257,18 +257,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band13.tm1.50PRB.emtc.conf b/ci-scripts/conf_files/enb.band13.tm1.50PRB.emtc.conf
index 400d1a6c9d8099fbf1beb09ac4c2cce18a61286b..ae572f9e05afb5ef4d53a0c5e97a2735fde62ef1 100644
--- a/ci-scripts/conf_files/enb.band13.tm1.50PRB.emtc.conf
+++ b/ci-scripts/conf_files/enb.band13.tm1.50PRB.emtc.conf
@@ -385,19 +385,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
@@ -457,17 +450,10 @@ NETWORK_CONTROLLER :
 log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/enb.band17.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band17.tm1.25PRB.usrpb210.conf
index bd2999b5d549037804d4f6f16d1de2aa0129adcd..5a4be9f187313c596be8ca469b2e7d24e056a2b2 100644
--- a/ci-scripts/conf_files/enb.band17.tm1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band17.tm1.25PRB.usrpb210.conf
@@ -260,18 +260,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band17.tm1.mbms.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band17.tm1.mbms.25PRB.usrpb210.conf
index 19ef6d07972c60cfece101229bd8d5436e51da74..7ac056b75e89ce2af11366553e5b9e9b1d08a2fd 100644
--- a/ci-scripts/conf_files/enb.band17.tm1.mbms.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band17.tm1.mbms.25PRB.usrpb210.conf
@@ -404,18 +404,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf b/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf
index d2e91fb872b39707671ad39e130aa33a092eef51..24c35dedbf07d8afed9075df7179eb3a2d64d678 100644
--- a/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/enb.band38.lte_2x2.100PRB.usrpn310.conf
@@ -264,18 +264,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf b/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf
index f116c3708d4dd07544b6effbf8f1f6ca941dbc57..4a16a641058d2a4316e355db37b5b1ca8b8526ce 100644
--- a/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/enb.band38.lte_2x2_tm2.100PRB.usrpn310.conf
@@ -264,18 +264,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf b/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf
index 6c8d5ba6f057c33d591cce1755a7972cfe95bab2..bccd37abe98dc20c033ca4808164adce1821a5d2 100644
--- a/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/enb.band38.nsa_2x2.100PRB.usrpn310.conf
@@ -264,18 +264,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf
index f34878c5691efa7def3f353cbb7922b6a98e8feb..0633d233ef80c265e5d522c6cc0e2caa96840a3f 100644
--- a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf
index e2e482a7c7d98496635bb6d2f2f89b71237d0bfc..4de8a3f759809fdce5f71d2d2c9413cb55a3d7b1 100644
--- a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf
index bfea139e92147d58a8b44e2803e899072ff3121f..df902faf8b581dd13cd5c51e753dca906ede464a 100644
--- a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf
index 4e0025770b4a645805b9ff17f0b6eccfcf11a777..0da4b1181a02a0cced00bda322822e8a123c6c34 100644
--- a/ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf
@@ -163,19 +163,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf
index 1627d21e1aefba2c49c003ef85f6c20994ec37b9..bd7e19ca6031f01bba583b70aa95e7f4ee1e31ce 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf
@@ -256,18 +256,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf
index efa1fa64b8004325aea95792c11c3f82635a075b..fdd2304ba5d1d14e73fcb8f885b435555c3a5f4c 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf
@@ -265,18 +265,11 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
index 6fc84012361a0c9c59d0b7a456f04f2b304525f4..5b05627700f9501199ae639b4075afe4b5b59e80 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
@@ -263,18 +263,11 @@ NETWORK_CONTROLLER :
 log_config :
 {
     global_log_level                      ="info";
-    global_log_verbosity                  ="medium";
     hw_log_level                          ="info";
-    hw_log_verbosity                      ="medium";
     phy_log_level                         ="info";
-    phy_log_verbosity                     ="medium";
     mac_log_level                         ="info";
-    mac_log_verbosity                     ="high";
     rlc_log_level                         ="info";
-    rlc_log_verbosity                     ="medium";
     pdcp_log_level                        ="info";
-    pdcp_log_verbosity                    ="medium";
     rrc_log_level                         ="info";
-    rrc_log_verbosity                     ="medium";
 };
 
diff --git a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf
index 087ee37f01b961d7f09ce997ae14d1bddf626288..44d22a8953b7099f79d4ff45b64d21cc01dd60ec 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf
@@ -263,19 +263,12 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
 @include "channelmod_rfsimu.conf"
diff --git a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
index 64bcb4b35f0fc5789c5c9754ca75cc7955fd592a..38cd90cd44fb05fc54d84d6b22b04192e134b521 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
@@ -264,18 +264,11 @@ NETWORK_CONTROLLER :
 log_config : 
   {
      global_log_level                      ="info"; 
-     global_log_verbosity                  ="high";
      hw_log_level                          ="info"; 
-     hw_log_verbosity                      ="medium";
      phy_log_level                         ="info"; 
-     phy_log_verbosity                     ="medium";
      mac_log_level                         ="info"; 
-     mac_log_verbosity                     ="high";
      rlc_log_level                         ="info"; 
-     rlc_log_verbosity                     ="high";
      pdcp_log_level                        ="info"; 
-     pdcp_log_verbosity                    ="high";
      rrc_log_level                         ="info"; 
-     rrc_log_verbosity                     ="medium";
 };
 
diff --git a/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
index 72754165d06319d5e38dec4eecafd0ee933d2b5a..c8223d0c42aa4171f703b232b7b31b613713d05f 100644
--- a/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
@@ -258,17 +258,10 @@ NETWORK_CONTROLLER :
 log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/enb.slave.band13.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.slave.band13.tm1.25PRB.usrpb210.conf
index da65aad775e4154d95f8ff2ea9c7d571c556d89e..609d76d7206c3470383ccb4e7066513a27e8e20e 100644
--- a/ci-scripts/conf_files/enb.slave.band13.tm1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.slave.band13.tm1.25PRB.usrpb210.conf
@@ -262,18 +262,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf
index 682fb376cfd95e6a741bbd3d95fee731a55b7dbe..a98179197f159bef82afb5fc3e91cfe7eebc11d3 100644
--- a/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/episci/episci_gnb.band78.sa.fr1.106PRB.usrpn310.conf
@@ -306,20 +306,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/episci/episci_nr-ue.nfapi.conf b/ci-scripts/conf_files/episci/episci_nr-ue.nfapi.conf
index f5563ecc026c9e162bebc99afc3232f8080c44b1..22ffb4cd3d2317e93a1e050b905bf124bc767d39 100644
--- a/ci-scripts/conf_files/episci/episci_nr-ue.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_nr-ue.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 uicc0 = {
diff --git a/ci-scripts/conf_files/episci/episci_nr-ue0.nfapi.conf b/ci-scripts/conf_files/episci/episci_nr-ue0.nfapi.conf
index f5563ecc026c9e162bebc99afc3232f8080c44b1..22ffb4cd3d2317e93a1e050b905bf124bc767d39 100644
--- a/ci-scripts/conf_files/episci/episci_nr-ue0.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_nr-ue0.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 uicc0 = {
diff --git a/ci-scripts/conf_files/episci/episci_nr-ue1.nfapi.conf b/ci-scripts/conf_files/episci/episci_nr-ue1.nfapi.conf
index 5df3ccf6cc15686af1b3cca34543468a0fb59d56..3d1c008f2361836fac94e8634a8fb096701ae7ce 100644
--- a/ci-scripts/conf_files/episci/episci_nr-ue1.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_nr-ue1.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 uicc0 = {
diff --git a/ci-scripts/conf_files/episci/episci_nr-ue2.nfapi.conf b/ci-scripts/conf_files/episci/episci_nr-ue2.nfapi.conf
index b1ce5fee8d0ee856ce483658eba66f37149ea46c..73c3292809f0a27ca4cb752b3db33dec7fd8aee4 100644
--- a/ci-scripts/conf_files/episci/episci_nr-ue2.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_nr-ue2.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 uicc0 = {
diff --git a/ci-scripts/conf_files/episci/episci_nr-ue3.nfapi.conf b/ci-scripts/conf_files/episci/episci_nr-ue3.nfapi.conf
index aea5104f1c6f42356495e15b7910bc0dd659da74..1f8f7306c60eeea212660b5ab9d587694aee34c9 100644
--- a/ci-scripts/conf_files/episci/episci_nr-ue3.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_nr-ue3.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 uicc0 = {
diff --git a/ci-scripts/conf_files/episci/episci_rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/episci/episci_rcc.band7.tm1.nfapi.conf
index 4e596f81b59b1e72fca2ba3786ccf39479985ac7..81951e521978ae17dd3b5de85f232ab0e0bd6e83 100644
--- a/ci-scripts/conf_files/episci/episci_rcc.band7.tm1.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_rcc.band7.tm1.nfapi.conf
@@ -231,17 +231,10 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
diff --git a/ci-scripts/conf_files/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf b/ci-scripts/conf_files/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf
index b64b88ddeabbac5332093567592ef8018520950b..9b3f205a0f36b69f3ddc66f8bf71236ca96f1a0f 100644
--- a/ci-scripts/conf_files/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_rcc.band78.tm1.106PRB.nfapi.conf
@@ -248,18 +248,11 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
                                     
diff --git a/ci-scripts/conf_files/episci/episci_ue.nfapi.conf b/ci-scripts/conf_files/episci/episci_ue.nfapi.conf
index 0170a466552424119c05fa5ae8c6c40cdb45a471..8f7c8ee68a5458762f942f4b7562fbe651f84700 100644
--- a/ci-scripts/conf_files/episci/episci_ue.nfapi.conf
+++ b/ci-scripts/conf_files/episci/episci_ue.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 
diff --git a/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf
index c0d4c6d4c95aa128ab45389e2f55fe021ff4ef30..0597e962455666686da6f69dd2331cd5714dac62 100644
--- a/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/episci/proxy_gnb.band78.sa.fr1.106PRB.usrpn310.conf
@@ -307,20 +307,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/episci/proxy_nr-ue.nfapi.conf b/ci-scripts/conf_files/episci/proxy_nr-ue.nfapi.conf
index 8411ed8fc6d0a2552e109ccfa3040a1a8b523803..b6c0e9b5a10c854a5352f0c616ead7bbc67a00af 100644
--- a/ci-scripts/conf_files/episci/proxy_nr-ue.nfapi.conf
+++ b/ci-scripts/conf_files/episci/proxy_nr-ue.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 uicc0 = {
diff --git a/ci-scripts/conf_files/episci/proxy_rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/episci/proxy_rcc.band7.tm1.nfapi.conf
index d4c72d6c1411433ac8fca598def78739009e1236..50ece56b23d2c028c2ea49058bcd9d4a003c6130 100644
--- a/ci-scripts/conf_files/episci/proxy_rcc.band7.tm1.nfapi.conf
+++ b/ci-scripts/conf_files/episci/proxy_rcc.band7.tm1.nfapi.conf
@@ -231,17 +231,10 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
diff --git a/ci-scripts/conf_files/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf b/ci-scripts/conf_files/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf
index 0ef317d63e8c5d13c0c5d607582d442ddbaa3fda..341010419928648bea390634dfac1c81006724c0 100644
--- a/ci-scripts/conf_files/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf
+++ b/ci-scripts/conf_files/episci/proxy_rcc.band78.tm1.106PRB.nfapi.conf
@@ -288,18 +288,11 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
                                     
diff --git a/ci-scripts/conf_files/episci/proxy_ue.nfapi.conf b/ci-scripts/conf_files/episci/proxy_ue.nfapi.conf
index 3f227d573ce08d877303567177ace3a1fb3611b0..51c30fb42de00b1fed2bd2b9b20e7b10876b0a4a 100644
--- a/ci-scripts/conf_files/episci/proxy_ue.nfapi.conf
+++ b/ci-scripts/conf_files/episci/proxy_ue.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 
diff --git a/ci-scripts/conf_files/gNB_SA_CU.conf b/ci-scripts/conf_files/gNB_SA_CU.conf
index d3cfbfc97368a942bc634a824cc593e37784c214..1e84e479bcd7de445a1c53fc8c265d73c459b895 100644
--- a/ci-scripts/conf_files/gNB_SA_CU.conf
+++ b/ci-scripts/conf_files/gNB_SA_CU.conf
@@ -254,22 +254,13 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="debug";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/gNB_SA_DU.conf b/ci-scripts/conf_files/gNB_SA_DU.conf
index 64f2dd5d0e68cd485317dffc863471aa31375b44..95fa75bc1de8d0f2dbc789cf74554cb1a6af35e6 100644
--- a/ci-scripts/conf_files/gNB_SA_DU.conf
+++ b/ci-scripts/conf_files/gNB_SA_DU.conf
@@ -273,22 +273,13 @@ serveraddr = "server";
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf
index e3bdde8469350298c09e416bc32316a0990176cb..082cc826f3a95b37a85ef29cce062637be80bedd 100644
--- a/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf
+++ b/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf
@@ -291,19 +291,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf
index 3955b1542ecf28e6f708754fab817900ad49b784..6af8a23407c83d0d194c37458d4de27ce536a642 100644
--- a/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf
+++ b/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf
@@ -287,19 +287,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf
index dd9c210c0ddc61e105a0c87a9a4659cb961bebfb..e8c6cab1b496ac0e6295cd2b5ef53c216328e9a8 100644
--- a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf
@@ -266,18 +266,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf
index 13838a178ae00260298075391db4bada6ed0332c..7d3409d4d490cfe99fbe1969315ec257547bdc4a 100644
--- a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf
@@ -245,18 +245,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf
index adb79ceb8db7513bd2b5c86506be98431c70e0d1..e798e40d64f767e4be2b82f94c2c9d20fea3c20e 100644
--- a/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf
@@ -266,18 +266,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
index 72ead42784243d8e7c0a810f7b3c704fd49b19aa..b92c7df92d45255145931ca421e01d681c561817 100644
--- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
+++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
@@ -294,19 +294,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf
index 32a40fe9516eb60ac3651f4c8428995673fed0c6..6c778a7c3156dd260b28238388bcc389db2bb14a 100644
--- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf
@@ -298,19 +298,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf
index 3579d1e3c285105ed0c17b4b959a8e77587d0786..5c826ca862e9a5ec01352c7b952329dbfda239c0 100644
--- a/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf
+++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf
@@ -293,19 +293,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
index 9cc8f554e812d517316e977f0ee93a97066511f9..d21cf90cd93a51e58405419ead809a0c3f883e23 100644
--- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
@@ -255,18 +255,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
index 249b7e45270bdf61e6ff1b909e1e3806effdd08a..55cb7b36c4dc495678847f78fb41b52f6be64746 100644
--- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
@@ -263,19 +263,12 @@ security = {
 log_config :
 {
   global_log_level      ="info";
-  global_log_verbosity  ="medium";
   hw_log_level          ="info";
-  hw_log_verbosity      ="medium";
   phy_log_level         ="info";
-  phy_log_verbosity     ="medium";
   mac_log_level         ="info";
-  mac_log_verbosity     ="high";
   rlc_log_level         ="info";
-  rlc_log_verbosity     ="medium";
   pdcp_log_level        ="info";
-  pdcp_log_verbosity    ="medium";
   rrc_log_level         ="info";
-  rrc_log_verbosity     ="medium";
 };
 
 uicc: {
diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf
index f232106d561bb233a9c7be736f7800af1cadd574..7c4bb9cc59d5f6dc5374188ab78672f3c1033353 100644
--- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf
+++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf
@@ -265,19 +265,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
 uicc: {
diff --git a/ci-scripts/conf_files/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.sa.band66.fr1.106PRB.usrpn300.conf
index 21bdb4e9d239a01c2fdd0ae1d349c048981e25c4..7f5a9d434371e4eeee7c56a5835d93b021141ff3 100644
--- a/ci-scripts/conf_files/gnb.sa.band66.fr1.106PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.sa.band66.fr1.106PRB.usrpn300.conf
@@ -280,20 +280,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        ngap_log_level                        ="debug";
-       ngap_log_verbosity                    ="medium";
     };
 
diff --git a/ci-scripts/conf_files/lte-fdd-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-basic-sim.conf
index a4d8e007dcc2365ea5617d6f83bdb7eee5171556..6c81d512a6c92b68c230a05b3285591aa18385e1 100644
--- a/ci-scripts/conf_files/lte-fdd-basic-sim.conf
+++ b/ci-scripts/conf_files/lte-fdd-basic-sim.conf
@@ -257,17 +257,10 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/lte-fdd-fembms-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-fembms-basic-sim.conf
index 458ab7cf89b365fb2c8b113a276dde6c74bae2b4..c2f6ab9d6c79071bc24d4ce5b9f61e93b6665e06 100644
--- a/ci-scripts/conf_files/lte-fdd-fembms-basic-sim.conf
+++ b/ci-scripts/conf_files/lte-fdd-fembms-basic-sim.conf
@@ -406,19 +406,12 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
 //rfsimulator :
diff --git a/ci-scripts/conf_files/lte-fdd-mbms-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-mbms-basic-sim.conf
index e80ff2b9cb8ec058e17079725db0a30a831c4f84..9c74d2e328353354624f10019a4ee2a7a56e1225 100644
--- a/ci-scripts/conf_files/lte-fdd-mbms-basic-sim.conf
+++ b/ci-scripts/conf_files/lte-fdd-mbms-basic-sim.conf
@@ -406,19 +406,12 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
 //rfsimulator :
diff --git a/ci-scripts/conf_files/lte-tdd-basic-sim.conf b/ci-scripts/conf_files/lte-tdd-basic-sim.conf
index f443a907f2e1834c186221f15a3bddab0f7de1c3..ddfdddda83c08edff44645c7117866c82de52057 100644
--- a/ci-scripts/conf_files/lte-tdd-basic-sim.conf
+++ b/ci-scripts/conf_files/lte-tdd-basic-sim.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/nr-ue.nfapi.conf b/ci-scripts/conf_files/nr-ue.nfapi.conf
index b12e0c8d05beee6edaa4de41334f8beace656c19..90798702cf93ff59974da55ce0300712931da2a4 100644
--- a/ci-scripts/conf_files/nr-ue.nfapi.conf
+++ b/ci-scripts/conf_files/nr-ue.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 
diff --git a/ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf b/ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf
index 502e3c548a4ebd7fad92217b2294f745ea5bc577..6651f380e499283b9034790974cd6d7c3f320d32 100644
--- a/ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf
+++ b/ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf
@@ -227,17 +227,10 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf
index d01e4e1c4e039ba4e77888b8b29537b9798c16a0..47bcc35cb38952a9840b90c5075617ee10fa3751 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf
@@ -168,19 +168,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
index 7f6bff304d6d3fe9d52fed202369256d2a66e25a..660478ca11512f9ee80c8a4801a947102dd86c6a 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
@@ -168,19 +168,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf
index d4f2eb9ef2f46def7cb4e273ee1f8ce9e303e6e2..6997c8023424083a46817616e2cbeda2b9ec04c5 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf
@@ -168,19 +168,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf
index 683fff0bc800106c28dd84f51c6df3a5d7036d07..798871edce715c41df0d348cb09ece3c8aab28ca 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf
@@ -263,17 +263,10 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
index 574c8b25456d5ce7d8f9d72f4a2c379e64143798..628188aea25e538cef4eade05de68cde401e60df 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
@@ -263,17 +263,10 @@ NETWORK_CONTROLLER :
 log_config :
 {
   global_log_level         ="info";
-  global_log_verbosity     ="medium";
   hw_log_level             ="info";
-  hw_log_verbosity         ="medium";
   phy_log_level            ="info";
-  phy_log_verbosity        ="medium";
   mac_log_level            ="info";
-  mac_log_verbosity        ="high";
   rlc_log_level            ="info";
-  rlc_log_verbosity        ="medium";
   pdcp_log_level           ="info";
-  pdcp_log_verbosity       ="medium";
   rrc_log_level            ="info";
-  rrc_log_verbosity        ="medium";
 };
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf
index 49365a1f616e58a44e7641c68b2a4d153fab9664..75d947c009325aed640edae7aa6710ea84725f2d 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf
@@ -263,17 +263,10 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf b/ci-scripts/conf_files/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf
index 640b85930a2f525ff613eee906f3923e88978d56..1bcd26b931dc30fed0d2e98815db6feb93c9ae9b 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.mbms-s1ap.if4p5.50PRB.lo.conf
@@ -365,17 +365,10 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf b/ci-scripts/conf_files/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf
index 7fe682f29edd7e8b352631ee8356e43afcf95935..e398310a35561d0f565be57bb94ea80b975da927 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.mbms.if4p5.50PRB.lo.conf
@@ -365,17 +365,10 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
index 281f7433af58217262fcda6cc914a07651b32b80..6f7a5d2dfdb96878d43e39675e1db820467d7ade 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
@@ -230,17 +230,10 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
diff --git a/ci-scripts/conf_files/rru.band38.tm1.master.conf b/ci-scripts/conf_files/rru.band38.tm1.master.conf
index 101ce83892e66d3d52ef1a70b55be9c24ca384e4..e6bd0b75aacb7e7d9df598025190414df83316f6 100644
--- a/ci-scripts/conf_files/rru.band38.tm1.master.conf
+++ b/ci-scripts/conf_files/rru.band38.tm1.master.conf
@@ -30,18 +30,11 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
 
diff --git a/ci-scripts/conf_files/rru.band38.tm1.slave.conf b/ci-scripts/conf_files/rru.band38.tm1.slave.conf
index d5efe6bd61ae925e9c08cf12350a6635abbcec27..2bc79028b4cf82e253dfa1442c65cc35a125f9cf 100644
--- a/ci-scripts/conf_files/rru.band38.tm1.slave.conf
+++ b/ci-scripts/conf_files/rru.band38.tm1.slave.conf
@@ -30,18 +30,11 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
 
diff --git a/ci-scripts/conf_files/rru.fdd.band7.conf b/ci-scripts/conf_files/rru.fdd.band7.conf
index 057f518046573be0b8de1bfc15096792bbe38964..a3b297049dc494c302eb0d247b22e51be3618f57 100644
--- a/ci-scripts/conf_files/rru.fdd.band7.conf
+++ b/ci-scripts/conf_files/rru.fdd.band7.conf
@@ -31,17 +31,10 @@ THREAD_STRUCT =
 log_config =
 {
   global_log_level      ="error";
-  global_log_verbosity  ="medium";
   hw_log_level          ="error";
-  hw_log_verbosity      ="medium";
   phy_log_level         ="error";
-  phy_log_verbosity     ="medium";
   mac_log_level         ="error";
-  mac_log_verbosity     ="high";
   rlc_log_level         ="error";
-  rlc_log_verbosity     ="medium";
   pdcp_log_level        ="error";
-  pdcp_log_verbosity    ="medium";
   rrc_log_level         ="error";
-  rrc_log_verbosity     ="medium";
 };
diff --git a/ci-scripts/conf_files/rru.tdd.band40.conf b/ci-scripts/conf_files/rru.tdd.band40.conf
index 5ce3a515f58987b63d4a578925eb24a7cf5de4d2..40af241cca2696d577d988ce0ceb9da4ece8ab77 100644
--- a/ci-scripts/conf_files/rru.tdd.band40.conf
+++ b/ci-scripts/conf_files/rru.tdd.band40.conf
@@ -31,17 +31,10 @@ THREAD_STRUCT =
 log_config =
 {
   global_log_level      ="error";
-  global_log_verbosity  ="medium";
   hw_log_level          ="error";
-  hw_log_verbosity      ="medium";
   phy_log_level         ="error";
-  phy_log_verbosity     ="medium";
   mac_log_level         ="error";
-  mac_log_verbosity     ="high";
   rlc_log_level         ="error";
-  rlc_log_verbosity     ="medium";
   pdcp_log_level        ="error";
-  pdcp_log_verbosity    ="medium";
   rrc_log_level         ="error";
-  rrc_log_verbosity     ="medium";
 };
diff --git a/ci-scripts/conf_files/ue.nfapi.conf b/ci-scripts/conf_files/ue.nfapi.conf
index 2b602cbcf292902e6702f134aeabfaa012956185..09ad7529b1541190859ab923c2f6a91d103aba14 100644
--- a/ci-scripts/conf_files/ue.nfapi.conf
+++ b/ci-scripts/conf_files/ue.nfapi.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="full";
 };
 
 
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 43772fb655f3b65bce5a8abd2b115d7e64077272..5357a90a3d6e5c280bcad66bbf8e63c145bfecc9 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -910,7 +910,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
 				elif action == 'Deploy_Run_PhySim':
 					PHYSIM.Deploy_PhySim(HTML, RAN)
 				elif action == 'DeployGenObject':
-					CONTAINERS.DeployGenObject(HTML)
+					CONTAINERS.DeployGenObject(HTML, RAN, CiTestObj)
 					if CONTAINERS.exitStatus==1:
 						RAN.prematureExit = True
 				elif action == 'UndeployGenObject':
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
index fd254f185677c81ee189f636dbef00b7eb3bbf21..a598b2bdc15cf9e63b5a72bd7bb758cf42785cbb 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
@@ -66,8 +66,8 @@
                 <class>DeployGenObject</class>
                 <desc>Deploy OAI 4G CoreNetwork</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
-                <services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
-                <nb_healthy>6</nb_healthy>
+                <services>oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen</services>
+                <nb_healthy>7</nb_healthy>
         </testCase>
 
         <testCase id="000013">
@@ -75,15 +75,15 @@
                 <desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
                 <services>enb</services>
-                <nb_healthy>7</nb_healthy>
+                <nb_healthy>8</nb_healthy>
         </testCase>
 
         <testCase id="000014">
                 <class>DeployGenObject</class>
-                <desc>Deploy OAI 4G NR-UE RF sim (FDD 05MHz)</desc>
+                <desc>Deploy OAI 4G LTE-UE RF sim (FDD 05MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
                 <services>oai_ue0</services>
-                <nb_healthy>8</nb_healthy>
+                <nb_healthy>9</nb_healthy>
         </testCase>
 
         <testCase id="020011">
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
index 2ff9461b9361d490d8574d0a89034444449db4c0..07ea358ad538904ac0f24a621747967637c892e9 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
@@ -60,7 +60,7 @@
 
         <testCase id="000014">
                 <class>DeployGenObject</class>
-                <desc>Deploy OAI 4G NR-UE RF sim (FDD 05MHz)</desc>
+                <desc>Deploy OAI 4G LTE-UE RF sim (FDD 05MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
                 <services>oai_ue0</services>
                 <nb_healthy>2</nb_healthy>
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
index f00e277c36f3bb7e91ad96f4737c895017323967..29acfa3b09f1e39bfd089b174f9c4a6364cfb726 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
@@ -66,8 +66,8 @@
                 <class>DeployGenObject</class>
                 <desc>Deploy OAI 4G CoreNetwork</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
-                <services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
-                <nb_healthy>6</nb_healthy>
+                <services>oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen</services>
+                <nb_healthy>7</nb_healthy>
         </testCase>
 
         <testCase id="000013">
@@ -75,15 +75,15 @@
                 <desc>Deploy OAI 4G eNB RF sim (FDD 10MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
                 <services>enb</services>
-                <nb_healthy>7</nb_healthy>
+                <nb_healthy>8</nb_healthy>
         </testCase>
 
         <testCase id="000014">
                 <class>DeployGenObject</class>
-                <desc>Deploy OAI 4G NR-UE RF sim (FDD 10MHz)</desc>
+                <desc>Deploy OAI 4G LTE-UE RF sim (FDD 10MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
                 <services>oai_ue0</services>
-                <nb_healthy>8</nb_healthy>
+                <nb_healthy>9</nb_healthy>
         </testCase>
 
         <testCase id="020011">
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
index 52e1ac7de18ee874300c685e2c0ae62282556e81..74f712ebdaab002b1175ff224af8947cb77ae1a8 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
@@ -66,8 +66,8 @@
                 <class>DeployGenObject</class>
                 <desc>Deploy OAI 4G CoreNetwork</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
-                <services>oai_hss oai_mme oai_spgwc oai_spgwu trf_gen</services>
-                <nb_healthy>6</nb_healthy>
+                <services>oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen</services>
+                <nb_healthy>7</nb_healthy>
         </testCase>
 
         <testCase id="000013">
@@ -75,15 +75,15 @@
                 <desc>Deploy OAI 4G eNB RF sim (FDD 20MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
                 <services>enb</services>
-                <nb_healthy>7</nb_healthy>
+                <nb_healthy>8</nb_healthy>
         </testCase>
 
         <testCase id="000014">
                 <class>DeployGenObject</class>
-                <desc>Deploy OAI 4G NR-UE RF sim (FDD 20MHz)</desc>
+                <desc>Deploy OAI 4G LTE-UE RF sim (FDD 20MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
                 <services>oai_ue0</services>
-                <nb_healthy>8</nb_healthy>
+                <nb_healthy>9</nb_healthy>
         </testCase>
 
         <testCase id="020011">
diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
index cdaee430efc3c092a5cfd60cb95e94d10c0c7975..aa70db1fed4331e9a4a22830c6ce933d19367d6b 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
@@ -81,7 +81,7 @@
 
         <testCase id="000014">
                 <class>DeployGenObject</class>
-                <desc>Deploy OAI 4G NR-UE RF sim (TDD 05MHz)</desc>
+                <desc>Deploy OAI 4G LTE-UE RF sim (TDD 05MHz)</desc>
                 <yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
                 <services>oai_ue0</services>
                 <nb_healthy>8</nb_healthy>
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
index b2a7f8e30cc74622d02435986513aa01863c04da..400559d26988ec1dd5d04aee886ad89e225ba493 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
@@ -48,8 +48,9 @@ Now pull images.
 
 ```bash
 $ docker pull cassandra:2.1
+$ docker pull redis:6.0.5
 $ docker pull rdefosseoai/oai-hss:latest
-$ docker pull rdefosseoai/oai-mme:latest
+$ docker pull rdefosseoai/magma-mme:latest
 $ docker pull rdefosseoai/oai-spgwc:latest
 $ docker pull rdefosseoai/oai-spgwu-tiny:latest
 
@@ -57,13 +58,15 @@ $ docker pull rdefosseoai/oai-enb:develop
 $ docker pull rdefosseoai/oai-lte-ue:develop
 ```
 
+If the `redis` tag is not available, pick the newest available `6.0.x` tag at [Docker Hub Redis Tags](https://hub.docker.com/_/redis?tab=tags).
+
 And **re-tag** them for tutorials' docker-compose file to work.
 
 ```bash
 $ docker image tag rdefosseoai/oai-spgwc:latest oai-spgwc:latest
 $ docker image tag rdefosseoai/oai-hss:latest oai-hss:latest
 $ docker image tag rdefosseoai/oai-spgwu-tiny:latest oai-spgwu-tiny:latest 
-$ docker image tag rdefosseoai/oai-mme:latest oai-mme:latest
+$ docker image tag rdefosseoai/magma-mme:latest magma-mme:latest
 
 $ docker image tag rdefosseoai/oai-enb:develop oai-enb:develop
 $ docker image tag rdefosseoai/oai-lte-ue:develop oai-lte-ue:develop
@@ -81,14 +84,14 @@ How to build the Traffic-Generator image is explained [here](https://github.com/
 
 **Just `docker-compose up -d` WILL NOT WORK!**
 
-All the following commands **SHALL** be run from the `ci-scripts/yaml_files/4g_rfsimulator` folder.
+All the following commands **SHALL** be run from the `ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz` folder.
 
 ## 2.1. Deploy and Configure Cassandra Database ##
 
 It is very crutial that the Cassandra DB is fully configured before you do anything else!
 
 ```bash
-$ cd ci-scripts/yaml_files/4g_rfsimulator
+$ cd ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz
 $ docker-compose up -d db_init
 Creating network "rfsim4g-oai-private-net" with the default driver
 Creating network "rfsim4g-oai-public-net" with the default driver
@@ -128,11 +131,12 @@ $ sudo tshark -i rfsim4g-public -f 'port 3868 or port 2123 or port 36412 or port
 ## 2.2. Deploy OAI CN4G containers ##
 
 ```bash
-$ docker-compose up -d oai_mme oai_spgwu trf_gen
+$ docker-compose up -d magma_mme oai_spgwu trf_gen
 rfsim4g-cassandra is up-to-date
-Creating rfsim4g-trf-gen   ... done
+Creating rfsim4g-trf-gen ... done
+Creating rfsim4g-redis   ... done
 Creating rfsim4g-oai-hss ... done
-Creating rfsim4g-oai-mme ... done
+Creating rfsim4g-magma-mme ... done
 Creating rfsim4g-oai-spgwc ... done
 Creating rfsim4g-oai-spgwu-tiny ... done
 ```
@@ -144,11 +148,12 @@ $ docker-compose ps -a
          Name                       Command                  State                            Ports                      
 -------------------------------------------------------------------------------------------------------------------------
 rfsim4g-cassandra        docker-entrypoint.sh cassa ...   Up (healthy)   7000/tcp, 7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp
-rfsim4g-oai-hss          /openair-hss/bin/entrypoin ...   Up (healthy)   5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp          
-rfsim4g-oai-mme          /openair-mme/bin/entrypoin ...   Up (healthy)   2123/udp, 3870/tcp, 5870/tcp                    
-rfsim4g-oai-spgwc        /openair-spgwc/bin/entrypo ...   Up (healthy)   2123/udp, 8805/udp                              
-rfsim4g-oai-spgwu-tiny   /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp                              
-rfsim4g-trf-gen          /bin/bash -c ip route add  ...   Up (healthy)                                                   
+rfsim4g-magma-mme        /bin/bash -c /magma-mme/bi ...   Up (healthy)   2123/udp, 3870/tcp, 5870/tcp
+rfsim4g-oai-hss          /openair-hss/bin/entrypoin ...   Up (healthy)   5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp
+rfsim4g-oai-spgwc        /openair-spgwc/bin/entrypo ...   Up (healthy)   2123/udp, 8805/udp
+rfsim4g-oai-spgwu-tiny   /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp
+rfsim4g-redis            /bin/bash -c redis-server  ...   Up (healthy)   6379/tcp
+rfsim4g-trf-gen          /bin/bash -c ip route add  ...   Up (healthy)
 ```
 
 ## 2.3. Deploy OAI eNB in RF simulator mode ##
@@ -165,77 +170,55 @@ $ docker-compose ps -a
          Name                       Command                  State                            Ports                      
 -------------------------------------------------------------------------------------------------------------------------
 rfsim4g-cassandra        docker-entrypoint.sh cassa ...   Up (healthy)   7000/tcp, 7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp
-rfsim4g-oai-enb          /opt/oai-enb/bin/entrypoin ...   Up (healthy)   2152/udp, 36412/udp, 36422/udp                  
-rfsim4g-oai-hss          /openair-hss/bin/entrypoin ...   Up (healthy)   5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp          
-rfsim4g-oai-mme          /openair-mme/bin/entrypoin ...   Up (healthy)   2123/udp, 3870/tcp, 5870/tcp                    
-rfsim4g-oai-spgwc        /openair-spgwc/bin/entrypo ...   Up (healthy)   2123/udp, 8805/udp                              
-rfsim4g-oai-spgwu-tiny   /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp                              
-rfsim4g-trf-gen          /bin/bash -c ip route add  ...   Up (healthy)                                    
+rfsim4g-magma-mme        /bin/bash -c /magma-mme/bi ...   Up (healthy)   2123/udp, 3870/tcp, 5870/tcp
+rfsim4g-oai-enb          /opt/oai-enb/bin/entrypoin ...   Up (healthy)   2152/udp, 36412/udp, 36422/udp
+rfsim4g-oai-hss          /openair-hss/bin/entrypoin ...   Up (healthy)   5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp
+rfsim4g-oai-spgwc        /openair-spgwc/bin/entrypo ...   Up (healthy)   2123/udp, 8805/udp
+rfsim4g-oai-spgwu-tiny   /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp
+rfsim4g-redis            /bin/bash -c redis-server  ...   Up (healthy)   6379/tcp
+rfsim4g-trf-gen          /bin/bash -c ip route add  ...   Up (healthy)
 ```
 
-Check if the eNB connected to MME:
+Check if the eNB connected to MME: with MAGMA-MME, the logs are not pushed to `stdout` but to a file at `/var/log/mme.log`
 
 ```bash
-$ docker logs rfsim4g-oai-mme
+$ docker exec rfsim4g-magma-mme /bin/bash -c "cat /var/log/mme.log"
 ...
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0039    ======================================= STATISTICS ============================================
-
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0042                   |   Current Status| Added since last display|  Removed since last display |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0048    Connected eNBs |          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0054    Attached UEs   |          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0060    Connected UEs  |          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0066    Default Bearers|          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0072    S1-U Bearers   |          0      |              0              |             0               |
-
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0075    ======================================= STATISTICS ============================================
-
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0469    Client association changed: 0
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0101    ----------------------
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0102    SCTP Status:
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0103    assoc id .....: 675
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0104    state ........: 4
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0105    instrms ......: 2
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0106    outstrms .....: 2
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0108    fragmentation : 1452
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0109    pending data .: 0
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0110    unack data ...: 0
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0111    rwnd .........: 106496
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0112    peer info     :
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0114        state ....: 2
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0116        cwnd .....: 4380
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0118        srtt .....: 0
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0120        rto ......: 3000
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0122        mtu ......: 1500
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0123    ----------------------
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0479    New connection
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0205    ----------------------
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0206    Local addresses:
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0217        - [192.168.61.3]
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0234    ----------------------
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0151    ----------------------
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0152    Peer addresses:
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0163        - [192.168.61.20]
-DEBUG SCTP   enair-mme/src/sctp/sctp_common.c:0178    ----------------------
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0554    SCTP RETURNING!!
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0547    [675][44] Msg of length 51 received from port 36412, on stream 0, PPID 18
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0554    SCTP RETURNING!!
-DEBUG S1AP   mme/src/s1ap/s1ap_mme_handlers.c:2826    Create eNB context for assoc_id: 675
-DEBUG S1AP   mme/src/s1ap/s1ap_mme_handlers.c:0361    S1-Setup-Request macroENB_ID.size 3 (should be 20)
-DEBUG S1AP   mme/src/s1ap/s1ap_mme_handlers.c:0321    New s1 setup request incoming from macro eNB id: 00e01
-DEBUG S1AP   mme/src/s1ap/s1ap_mme_handlers.c:0423    Adding eNB to the list of served eNBs
-DEBUG S1AP   mme/src/s1ap/s1ap_mme_handlers.c:0438    Adding eNB id 3585 to the list of served eNBs
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0283    [44][675] Sending buffer 0x7f9394009f90 of 27 bytes on stream 0 with ppid 18
-DEBUG SCTP   rc/sctp/sctp_primitives_server.c:0296    Successfully sent 27 bytes on stream 0
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0039    ======================================= STATISTICS ============================================
-
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0042                   |   Current Status| Added since last display|  Removed since last display |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0048    Connected eNBs |          1      |              1              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0054    Attached UEs   |          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0060    Connected UEs  |          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0066    Default Bearers|          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0072    S1-U Bearers   |          0      |              0              |             0               |
-
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0075    ======================================= STATISTICS ============================================
+000141 Fri Feb 11 09:49:29 2022 7EFFE7BE4700 DEBUG S6A    tasks/s6a/s6a_peer.c            :0095    Diameter identity of MME: mme.openairinterface.org with length: 24
+000142 Fri Feb 11 09:49:29 2022 7EFFE7BE4700 DEBUG S6A    tasks/s6a/s6a_peer.c            :0130    S6a peer connection attempt 1 / 8
+000143 Fri Feb 11 09:49:29 2022 7EFFE7BE4700 DEBUG S6A    tasks/s6a/s6a_peer.c            :0141    Peer hss.openairinterface.org is now connected...
+000144 Fri Feb 11 09:49:29 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
+000146 Fri Feb 11 09:49:29 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_main.c    :0083    MME APP ZMQ latency: 214.
+000145 Fri Feb 11 09:49:29 2022 7EFFE83E5700 DEBUG S1AP   tasks/s1ap/s1ap_mme.c           :0121    S1AP ZMQ latency: 146.
+000147 Fri Feb 11 09:50:23 2022 7EFFE83E5700 DEBUG S1AP   tasks/s1ap/s1ap_mme.c           :0121    S1AP ZMQ latency: 144.
+000148 Fri Feb 11 09:50:23 2022 7EFFE83E5700 DEBUG S1AP   tasks/s1ap/s1ap_mme_handlers.c  :3775    Create eNB context for assoc_id: 4121
+000149 Fri Feb 11 09:50:23 2022 7EFFE83E5700 DEBUG S1AP   tasks/s1ap/s1ap_mme.c           :0121    S1AP ZMQ latency: 48.
+000150 Fri Feb 11 09:50:23 2022 7EFFE83E5700 DEBUG S1AP   tasks/s1ap/s1ap_mme_handlers.c  :0536    New s1 setup request incoming from eNB-rf-sim macro eNB id: 00e01
+000151 Fri Feb 11 09:50:23 2022 7EFFE83E5700 DEBUG S1AP   tasks/s1ap/s1ap_mme_handlers.c  :0639    Adding eNB with enb_id :3585 to the list of served eNBs 
+000152 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0049    ======================================= STATISTICS ============================================
+
+000153 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0050                   |   Current Status|
+000154 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0053    Attached UEs   |          0      |
+000155 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0056    Connected UEs  |          0      |
+000156 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0059    Connected eNBs |          0      |
+000157 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0062    Default Bearers|          0      |
+000158 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0065    S1-U Bearers   |          0      |
+
+000159 Fri Feb 11 09:50:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0070    ======================================= STATISTICS ============================================
+
+000160 Fri Feb 11 09:50:28 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
+000161 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0049    ======================================= STATISTICS ============================================
+
+000162 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0050                   |   Current Status|
+000163 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0053    Attached UEs   |          0      |
+000164 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0056    Connected UEs  |          0      |
+000165 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0059    Connected eNBs |          1      |
+000166 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0062    Default Bearers|          0      |
+000167 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0065    S1-U Bearers   |          0      |
+
+000168 Fri Feb 11 09:51:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0070    ======================================= STATISTICS ============================================
+
+000169 Fri Feb 11 09:51:28 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
 ...
 ```
 
@@ -253,14 +236,14 @@ $ docker-compose ps -a
          Name                       Command                  State                            Ports                      
 -------------------------------------------------------------------------------------------------------------------------
 rfsim4g-cassandra        docker-entrypoint.sh cassa ...   Up (healthy)   7000/tcp, 7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp
-rfsim4g-oai-enb          /opt/oai-enb/bin/entrypoin ...   Up (healthy)   2152/udp, 36412/udp, 36422/udp                  
-rfsim4g-oai-hss          /openair-hss/bin/entrypoin ...   Up (healthy)   5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp          
-rfsim4g-oai-lte-ue0      /opt/oai-lte-ue/bin/entryp ...   Up (healthy)   10000/tcp                                       
-rfsim4g-oai-mme          /openair-mme/bin/entrypoin ...   Up (healthy)   2123/udp, 3870/tcp, 5870/tcp                    
-rfsim4g-oai-spgwc        /openair-spgwc/bin/entrypo ...   Up (healthy)   2123/udp, 8805/udp                              
-rfsim4g-oai-spgwu-tiny   /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp                              
-rfsim4g-trf-gen          /bin/bash -c ip route add  ...   Up (healthy)                                             
-Creating rfsim4g-oai-enb ... done
+rfsim4g-magma-mme        /bin/bash -c /magma-mme/bi ...   Up (healthy)   2123/udp, 3870/tcp, 5870/tcp
+rfsim4g-oai-enb          /opt/oai-enb/bin/entrypoin ...   Up (healthy)   2152/udp, 36412/udp, 36422/udp
+rfsim4g-oai-hss          /openair-hss/bin/entrypoin ...   Up (healthy)   5868/tcp, 9042/tcp, 9080/tcp, 9081/tcp
+rfsim4g-oai-lte-ue0      /opt/oai-lte-ue/bin/entryp ...   Up (healthy)   10000/tcp
+rfsim4g-oai-spgwc        /openair-spgwc/bin/entrypo ...   Up (healthy)   2123/udp, 8805/udp
+rfsim4g-oai-spgwu-tiny   /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp
+rfsim4g-redis            /bin/bash -c redis-server  ...   Up (healthy)   6379/tcp
+rfsim4g-trf-gen          /bin/bash -c ip route add  ...   Up (healthy)
 ```
 
 Making sure the OAI UE is connected:
@@ -268,40 +251,69 @@ Making sure the OAI UE is connected:
 ```bash
 $ docker logs rfsim4g-oai-enb
 ...
-[RRC]   RRCConnectionReconfiguration Encoded 1098 bits (138 bytes)
-[RRC]   [eNB 0] Frame 0, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes 138, UE id 617b)
-[RRC]   sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
-[PDCP]   [FRAME 00000][eNB][MOD 00][RNTI 617b][SRB 02]  Action ADD  LCID 2 (SRB id 2) configured with SN size 5 bits and RLC AM
-[PDCP]   [FRAME 00000][eNB][MOD 00][RNTI 617b][DRB 01]  Action ADD  LCID 3 (DRB id 1) configured with SN size 12 bits and RLC AM
-[SCTP]   Successfully sent 46 bytes on stream 1 for assoc_id 676
-[RRC]   [FRAME 00000][eNB][MOD 00][RNTI 617b] UE State = RRC_RECONFIGURED (default DRB, xid 0)
-[PDCP]   [FRAME 00000][eNB][MOD 00][RNTI 617b][SRB 02]  Action MODIFY LCID 2 RB id 2 reconfigured with SN size 5 and RLC AM 
-[PDCP]   [FRAME 00000][eNB][MOD 00][RNTI 617b][DRB 01]  Action MODIFY LCID 3 RB id 1 reconfigured with SN size 1 and RLC AM 
-[RRC]   [eNB 0] Frame  0 CC 0 : SRB2 is now active
-[RRC]   [eNB 0] Frame  0 : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE rnti 617b, reconfiguring DRB 1/LCID 3
-[RRC]   [eNB 0] Frame  0 : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete, reconfiguring DRB 1/LCID 3
-[MAC]   UE 0 RNTI 617b adding LC 3 idx 2 to scheduling control (total 3)
-[MAC]   Added physicalConfigDedicated 0x7f98e0004950 for 0.0
-[S1AP]   initial_ctxt_resp_p: e_rab ID 5, enb_addr 192.168.61.20, SIZE 4 
-[SCTP]   Successfully sent 40 bytes on stream 1 for assoc_id 676
-[SCTP]   Successfully sent 61 bytes on stream 1 for assoc_id 676
+7320446.555734 [RRC] I [FRAME 00000][eNB][MOD 00][RNTI bd8c] Logical Channel DL-DCCH, Generate UECapabilityEnquiry (bytes 10)
+7320446.555739 [RRC] I sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
+7320446.570284 [RRC] I [FRAME 00000][eNB][MOD 00][RNTI bd8c] received ueCapabilityInformation on UL-DCCH 1 from UE
+7320446.570293 [RRC] A got UE capabilities for UE bd8c
+7320446.570346 [RRC] W drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated
+7320446.570370 [RRC] I [eNB 0] frame 0: requesting A2, A3, A4, and A5 event reporting
+7320446.570435 [RRC] I RRCConnectionReconfiguration Encoded 1146 bits (144 bytes)
+7320446.570440 [RRC] I [eNB 0] Frame 0, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes 144, UE id bd8c)
+7320446.570445 [RRC] I sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
+7320446.570446 [SCTP] I Successfully sent 46 bytes on stream 1 for assoc_id 4120
+7320446.570449 [PDCP] I [FRAME 00000][eNB][MOD 00][RNTI bd8c][SRB 02]  Action ADD  LCID 2 (SRB id 2) configured with SN size 5 bits and RLC AM
+7320446.570455 [PDCP] I [FRAME 00000][eNB][MOD 00][RNTI bd8c][DRB 01]  Action ADD  LCID 3 (DRB id 1) configured with SN size 12 bits and RLC AM
+7320446.583036 [RRC] I [FRAME 00000][eNB][MOD 00][RNTI bd8c] UE State = RRC_RECONFIGURED (default DRB, xid 0)
+7320446.583056 [PDCP] I [FRAME 00000][eNB][MOD 00][RNTI bd8c][SRB 02]  Action MODIFY LCID 2 RB id 2 reconfigured with SN size 5 and RLC AM 
+7320446.583060 [PDCP] I [FRAME 00000][eNB][MOD 00][RNTI bd8c][DRB 01]  Action MODIFY LCID 3 RB id 1 reconfigured with SN size 1 and RLC AM 
+7320446.583065 [RRC] I [eNB 0] Frame  0 CC 0 : SRB2 is now active
+7320446.583067 [RRC] I [eNB 0] Frame  0 : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE rnti bd8c, reconfiguring DRB 1/LCID 3
+7320446.583070 [RRC] I [eNB 0] Frame  0 : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete, reconfiguring DRB 1/LCID 3
+7320446.583074 [MAC] I UE 0 RNTI bd8c adding LC 3 idx 2 to scheduling control (total 3)
+7320446.583077 [MAC] I Added physicalConfigDedicated 0x7fd18c46be50 for 0.0
+7320446.583095 [S1AP] I initial_ctxt_resp_p: e_rab ID 5, enb_addr 192.168.61.20, SIZE 4 
+7320446.583150 [SCTP] I Successfully sent 40 bytes on stream 1 for assoc_id 4120
+7320446.595495 [SCTP] I Successfully sent 61 bytes on stream 1 for assoc_id 4120
+7320446.774197 [SCTP] I Found data for descriptor 103
+7320446.774227 [SCTP] I [4120][103] Msg of length 53 received, on stream 1, PPID 18
+7320446.774295 [RRC] I [eNB 0] Received S1AP_DOWNLINK_NAS: ue_initial_id 0, eNB_ue_s1ap_id 4527568
+7320446.774316 [RRC] I sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
 ...
 ```
 
-On the MME:
+On the MME: be patient, the statistics display update is slow!
 
 ```bash
-$ docker logs rfsim4g-oai-mme
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0039    ======================================= STATISTICS ============================================
-
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0042                   |   Current Status| Added since last display|  Removed since last display |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0048    Connected eNBs |          1      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0054    Attached UEs   |          1      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0060    Connected UEs  |          1      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0066    Default Bearers|          0      |              0              |             0               |
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0072    S1-U Bearers   |          0      |              0              |             0               |
-
-DEBUG MME-AP src/mme_app/mme_app_statistics.c:0075    ======================================= STATISTICS ============================================
+$ docker exec rfsim4g-magma-mme /bin/bash -c "cat /var/log/mme.log"
+000413 Fri Feb 11 09:52:52 2022 7EFFE8BE6700 INFO  GTPv2- lib/gtpv2-c/nwgtpv2c-0.11/src/Nw:2376    Stopped active timer 0x2 for info 0x0x60700001a9b0!
+000414 Fri Feb 11 09:52:52 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
+000415 Fri Feb 11 09:52:52 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_main.c    :0083    MME APP ZMQ latency: 172.
+000416 Fri Feb 11 09:52:52 2022 7EFFEA3E9700 INFO  MME-AP tasks/mme_app/mme_app_main.c    :0137    Received S11 MODIFY BEARER RESPONSE from SPGW
+000417 Fri Feb 11 09:52:52 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_main.c    :0150    S11 MODIFY BEARER RESPONSE local S11 teid = 1
+000418 Fri Feb 11 09:52:52 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
+000419 Fri Feb 11 09:53:28 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
+000420 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0049    ======================================= STATISTICS ============================================
+
+000421 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0050                   |   Current Status|
+000422 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0053    Attached UEs   |          0      |
+000423 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0056    Connected UEs  |          0      |
+000424 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0059    Connected eNBs |          1      |
+000425 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0062    Default Bearers|          0      |
+000426 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0065    S1-U Bearers   |          0      |
+
+000427 Fri Feb 11 09:53:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0070    ======================================= STATISTICS ============================================
+
+000428 Fri Feb 11 09:54:28 2022 7EFFEA3E9700 DEBUG MME-AP tasks/mme_app/mme_app_state_mana:0097    Inside get_state with read_from_db 0
+000429 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0049    ======================================= STATISTICS ============================================
+
+000430 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0050                   |   Current Status|
+000431 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0053    Attached UEs   |          1      |
+000432 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0056    Connected UEs  |          1      |
+000433 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0059    Connected eNBs |          1      |
+000434 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0062    Default Bearers|          1      |
+000435 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0065    S1-U Bearers   |          1      |
+
+000436 Fri Feb 11 09:54:28 2022 7EFFEC3ED700 DEBUG SERVIC tasks/service303/service303_mme_:0070    ======================================= STATISTICS ============================================
 ```
 
 On the LTE UE:
@@ -377,16 +389,18 @@ Stopping rfsim4g-oai-lte-ue0    ... done
 Stopping rfsim4g-oai-enb        ... done
 Stopping rfsim4g-oai-spgwu-tiny ... done
 Stopping rfsim4g-oai-spgwc      ... done
-Stopping rfsim4g-oai-mme        ... done
+Stopping rfsim4g-magma-mme      ... done
 Stopping rfsim4g-oai-hss        ... done
+Stopping rfsim4g-redis          ... done
 Stopping rfsim4g-trf-gen        ... done
 Stopping rfsim4g-cassandra      ... done
 Removing rfsim4g-oai-lte-ue0    ... done
 Removing rfsim4g-oai-enb        ... done
 Removing rfsim4g-oai-spgwu-tiny ... done
 Removing rfsim4g-oai-spgwc      ... done
-Removing rfsim4g-oai-mme        ... done
+Removing rfsim4g-magma-mme      ... done
 Removing rfsim4g-oai-hss        ... done
+Removing rfsim4g-redis          ... done
 Removing rfsim4g-trf-gen        ... done
 Removing rfsim4g-cassandra      ... done
 Removing network rfsim4g-oai-private-net
@@ -443,19 +457,23 @@ My 1st UE IMSI is an aggregation of `MCC`, `MNC`, `SHORT_IMSI`.
 
 ## 5.2. PLMN and TAI ##
 
-in MME config:
+in MME config, in the docker-compose there is not much besides REALM fields:
 
 ```yaml
+            TZ: Europe/Paris
             REALM: openairinterface.org
-..
-            MCC: '208'
-            MNC: '96'
-            MME_GID: 32768
-            MME_CODE: 3
-            TAC_0: 1
-            TAC_1: 2
-            TAC_2: 3
+            PREFIX: /openair-mme/etc
+            HSS_HOSTNAME: hss
+            HSS_FQDN: hss.openairinterface.org
+            HSS_REALM: openairinterface.org
             MME_FQDN: mme.openairinterface.org
+            FEATURES: mme_oai
+```
+
+Everything is hard-coded in the `mme.conf` that is mounted as a volume: look for instances of
+
+```
+MCC="208" ; MNC="96";  TAC = "1";
 ```
 
 in SPGW-C/-U configs:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
index e852643ab9227564e8cbc2c3dca1721a473c8e23..b15e794c1026a11657e4c1deaa9ef2b75aace8c6 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
@@ -58,57 +58,45 @@ services:
             timeout: 5s
             retries: 5
 
-    oai_mme:
-        image: oai-mme:latest
-        container_name: rfsim4g-oai-mme
+    redis:
+        image: redis:6.0.5
+        container_name: rfsim4g-redis
         privileged: true
-        depends_on: [oai_hss]
+        networks:
+            public_net:
+                ipv4_address: 192.168.61.6
+        volumes:
+            - ./redis_extern.conf:/usr/local/etc/redis/redis.conf
+        entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
+        healthcheck:
+            test: /bin/bash -c "redis-cli -h 192.168.61.6 -p 6380 ping"
+            interval: 10s
+            timeout: 5s
+            retries: 5
+
+    magma_mme:
+        image: magma-mme:latest
+        container_name: rfsim4g-magma-mme
+        hostname: mme
+        privileged: true
+        depends_on: [oai_hss, redis]
         networks:
             public_net:
                 ipv4_address: 192.168.61.3
         environment:
+            TZ: Europe/Paris
             REALM: openairinterface.org
             PREFIX: /openair-mme/etc
-            INSTANCE: 1
-            PID_DIRECTORY: /var/run
-            HSS_IP_ADDR: 192.168.61.2
             HSS_HOSTNAME: hss
             HSS_FQDN: hss.openairinterface.org
             HSS_REALM: openairinterface.org
-            MCC: '208'
-            MNC: '96'
-            MME_GID: 32768
-            MME_CODE: 3
-            TAC_0: 1
-            TAC_1: 2
-            TAC_2: 3
             MME_FQDN: mme.openairinterface.org
-            MME_S6A_IP_ADDR: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S1_MME: eth0
-            MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S11: eth0
-            MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S10: lo
-            MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
-            OUTPUT: CONSOLE
-            SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
-            PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
-            PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
-            MCC_SGW_0: '208'
-            MNC3_SGW_0: '096'
-            TAC_LB_SGW_0: '01'
-            TAC_HB_SGW_0: '00'
-            MCC_MME_0: '208'
-            MNC3_MME_0: '096'
-            TAC_LB_MME_0: '02'
-            TAC_HB_MME_0: '00'
-            MCC_MME_1: '208'
-            MNC3_MME_1: '096'
-            TAC_LB_MME_1: '03'
-            TAC_HB_MME_1: '00'
-            TAC_LB_SGW_TEST_0: '03'
-            TAC_HB_SGW_TEST_0: '00'
-            SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
+            FEATURES: mme_oai
+        volumes:
+            - ./mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
+            - ./mme.conf:/magma-mme/etc/mme.conf
+            - ./entrypoint.sh:/magma-mme/bin/entrypoint.sh
+        entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
         healthcheck:
             test: /bin/bash -c "pgrep oai_mme"
             interval: 10s
@@ -118,7 +106,7 @@ services:
     oai_spgwc:
         image: oai-spgwc:latest
         privileged: true
-        depends_on: [oai_mme]
+        depends_on: [magma_mme]
         container_name: rfsim4g-oai-spgwc
         networks:
             public_net:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/entrypoint.sh b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/entrypoint.sh
new file mode 100755
index 0000000000000000000000000000000000000000..24960e215d5f56bf5dd78aa67270a490e8745125
--- /dev/null
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/entrypoint.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+INSTANCE=1
+PREFIX='/magma-mme/etc'
+MY_REALM='openairinterface.org'
+
+declare -A MME_CONF
+
+pushd $PREFIX
+MME_CONF[@MME_S6A_IP_ADDR@]="192.168.61.3"
+MME_CONF[@INSTANCE@]=$INSTANCE
+MME_CONF[@PREFIX@]=$PREFIX
+MME_CONF[@REALM@]=$MY_REALM
+MME_CONF[@MME_FQDN@]="mme.${MME_CONF[@REALM@]}"
+MME_CONF[@HSS_HOSTNAME@]='hss'
+MME_CONF[@HSS_FQDN@]="${MME_CONF[@HSS_HOSTNAME@]}.${MME_CONF[@REALM@]}"
+MME_CONF[@HSS_IP_ADDR@]="192.168.61.2"
+
+cp mme_fd.conf.tmplt $PREFIX/mme_fd.conf
+
+for K in "${!MME_CONF[@]}"; do 
+  egrep -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
+  ret=$?;[[ ret -ne 0 ]] && echo "Could not replace $K with ${MME_CONF[$K]}"
+done
+
+sed -i -e "s@etc/freeDiameter@etc@" /magma-mme/etc/mme_fd.conf
+sed -i -e "s@bind: 127.0.0.1@bind: 192.168.61.6@" /etc/magma/redis.yml
+# Generate freeDiameter certificate
+popd
+cd /magma-mme/scripts
+./check_mme_s6a_certificate $PREFIX mme.${MME_CONF[@REALM@]}
+
+cd /magma-mme
+nohup /magma-mme/bin/sctpd > /var/log/sctpd.log 2>&1 &
+sleep 5
+/magma-mme/bin/oai_mme -c /magma-mme/etc/mme.conf
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/mme.conf b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/mme.conf
new file mode 100644
index 0000000000000000000000000000000000000000..4f491cc63db602d521a13dde9d36ab25c5ee91fb
--- /dev/null
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/mme.conf
@@ -0,0 +1,134 @@
+# generated by generate_mme_config_script.py
+MME :
+{
+    REALM                                     = "openairinterface.org"
+    PID_DIRECTORY                             = "/var/run";
+    MAXENB                                    = 8;                              # power of 2
+    MAXUE                                     = 16;                             # power of 2
+    RELATIVE_CAPACITY                         = 10;
+
+    EMERGENCY_ATTACH_SUPPORTED                     = "no";
+    UNAUTHENTICATED_IMSI_SUPPORTED                 = "no";
+
+    # EPS network feature support
+    EPS_NETWORK_FEATURE_SUPPORT_IMS_VOICE_OVER_PS_SESSION_IN_S1      = "no";    # DO NOT CHANGE
+    EPS_NETWORK_FEATURE_SUPPORT_EMERGENCY_BEARER_SERVICES_IN_S1_MODE = "no";    # DO NOT CHANGE
+    EPS_NETWORK_FEATURE_SUPPORT_LOCATION_SERVICES_VIA_EPC            = "no";    # DO NOT CHANGE
+    EPS_NETWORK_FEATURE_SUPPORT_EXTENDED_SERVICE_REQUEST             = "no";    # DO NOT CHANGE
+
+    # Display statistics about whole system (expressed in seconds)
+    MME_STATISTIC_TIMER                       = 10;
+    IP_CAPABILITY = "IPV4";                                                   # UE PDN_TYPE
+    USE_STATELESS = "";
+
+    INTERTASK_INTERFACE :
+    {
+        # max queue size per task
+        ITTI_QUEUE_SIZE            = 2000000;
+    };
+
+    S6A :
+    {
+        S6A_CONF                   = "/magma-mme/etc/mme_fd.conf"; # YOUR MME freeDiameter config file path
+        HSS_HOSTNAME               = "hss.openairinterface.org";
+        HSS_REALM                  = "openairinterface.org";
+    };
+
+    # ------- SCTP definitions
+    SCTP :
+    {
+        # Number of streams to use in input/output
+        SCTP_INSTREAMS  = 8;
+        SCTP_OUTSTREAMS = 8;
+    };
+
+    # ------- S1AP definitions
+    S1AP :
+    {
+        # outcome drop timer value (seconds)
+        S1AP_OUTCOME_TIMER = 10;
+    };
+
+    # ------- MME served GUMMEIs
+    GUMMEI_LIST = (
+         { MCC="208" ; MNC="96"; MME_GID="32768" ; MME_CODE="3"; }
+    );
+
+    # ------- MME served TAIs
+    TAI_LIST = (
+         {MCC="208" ; MNC="96";  TAC = "1"; }
+    );
+
+    TAC_LIST = (
+         {MCC="208" ; MNC="96";  TAC = "1"; }
+    );
+
+    CSFB :
+    {
+        NON_EPS_SERVICE_CONTROL = "OFF";
+        CSFB_MCC = "208";
+        CSFB_MNC = "96";
+        LAC = "1";
+    };
+    NAS :
+    {
+        ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ];
+        ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ];
+        T3402                                 =  1                              # in minutes (default is 12 minutes)
+        T3412                                 =  54                             # in minutes (default is 54 minutes, network dependent)
+        T3422                                 =  6                              # in seconds (default is 6s)
+        T3450                                 =  6                              # in seconds (default is 6s)
+        T3460                                 =  6                              # in seconds (default is 6s)
+        T3470                                 =  6                              # in seconds (default is 6s)
+        T3485                                 =  8                              # UNUSED in seconds (default is 8s)
+        T3486                                 =  8                              # UNUSED in seconds (default is 8s)
+        T3489                                 =  4                              # UNUSED in seconds (default is 4s)
+        T3495                                 =  8                              # UNUSED in seconds (default is 8s)
+    };
+
+    SGS :
+    {
+        TS6_1                                 =  10                             # in seconds (default is 10s)
+        TS8                                   =  4                              # in seconds (default is 4s)
+        TS9                                   =  2                              # in seconds (default is 4s)
+        TS10                                   =  4                              # in seconds (default is 4s)
+        TS13                                   =  4                              # in seconds (default is 4s)
+    };
+
+    NETWORK_INTERFACES :
+    {
+        MME_INTERFACE_NAME_FOR_S1_MME         = "eth0";
+        MME_IPV4_ADDRESS_FOR_S1_MME           = "192.168.61.3/24";
+        MME_INTERFACE_NAME_FOR_S11_MME        = "eth0";
+        MME_IPV4_ADDRESS_FOR_S11_MME          = "192.168.61.3/24";
+        MME_PORT_FOR_S11_MME                  = 2123;
+    };
+
+    LOGGING :
+    {
+        OUTPUT            = "CONSOLE";
+        THREAD_SAFE       = "no";
+        COLOR             = "no";
+
+        SCTP_LOG_LEVEL     = "ERROR";
+        GTPV1U_LOG_LEVEL   = "INFO";
+        SPGW_APP_LOG_LEVEL = "INFO";
+        UDP_LOG_LEVEL      = "INFO";
+        S1AP_LOG_LEVEL     = "DEBUG";
+        NAS_LOG_LEVEL      = "INFO";
+        MME_APP_LOG_LEVEL  = "DEBUG";
+        GTPV2C_LOG_LEVEL   = "INFO";
+        S11_LOG_LEVEL      = "DEBUG";
+        S6A_LOG_LEVEL      = "DEBUG";
+        UTIL_LOG_LEVEL     = "INFO";
+        MSC_LOG_LEVEL      = "ERROR";
+        ITTI_LOG_LEVEL     = "ERROR";
+        MME_SCENARIO_PLAYER_LOG_LEVEL = "ERROR";
+        ASN1_VERBOSITY    = "INFO";
+    };
+
+    S-GW :
+   {
+       SGW_IPV4_ADDRESS_FOR_S11              = "192.168.61.4";
+   };
+};
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf
new file mode 100644
index 0000000000000000000000000000000000000000..6f87ed8c2b29db3008ca415b263e911dc3383e4e
--- /dev/null
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf
@@ -0,0 +1,169 @@
+# -------- Local ---------
+
+# Uncomment if the framework cannot resolv it.
+Identity = "@MME_FQDN@";
+Realm = "@REALM@";
+
+# TLS configuration (see previous section)
+TLS_Cred = "@PREFIX@/freeDiameter/mme.cert.pem",
+           "@PREFIX@/freeDiameter/mme.key.pem";
+TLS_CA   = "@PREFIX@/freeDiameter/mme.cacert.pem";
+
+# Disable use of TCP protocol (only listen and connect in SCTP)
+# Default : TCP enabled
+No_SCTP;
+
+# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
+# Prefer TCP instead of SCTP for establishing new connections.
+# This setting may be overwritten per peer in peer configuration blocs.
+# Default : SCTP is attempted first.
+Prefer_TCP;
+
+
+No_IPv6;
+
+# Overwrite the number of SCTP streams. This value should be kept low, 
+# especially if you are using TLS over SCTP, because it consumes a lot of 
+# resources in that case. See tickets 19 and 27 for some additional details on 
+# this.
+# Limit the number of SCTP streams
+SCTP_streams = 3;
+
+
+# By default, freeDiameter acts as a Diameter Relay Agent by forwarding all 
+# messages it cannot handle locally. This parameter disables this behavior.
+NoRelay;
+
+# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed
+# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the
+# CER/CEA exchange on a dedicated secure port.
+# This parameter only affects outgoing connections.
+# The setting can be also defined per-peer (see Peers configuration section).
+# Default: use RFC6733 method with separate port for TLS.
+
+#TLS_old_method;
+
+AppServThreads = 4;
+
+# Specify the addresses on which to bind the listening server. This must be 
+# specified if the framework is unable to auto-detect these addresses, or if the
+# auto-detected values are incorrect. Note that the list of addresses is sent 
+# in CER or CEA message, so one should pay attention to this parameter if some 
+# adresses should be kept hidden. 
+ListenOn = "@MME_S6A_IP_ADDR@";
+
+Port = 3870;
+SecPort = 5870;
+
+# -------- Extensions ---------
+
+# Uncomment (and create rtd.conf) to specify routing table for this peer.
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx" : "rtd.conf";
+
+#LoadExtension = "/usr/local/lib/freeDiameter/_sample.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/app_acct.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/app_diameap.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/app_radgw.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/app_redirect.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/app_sip.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dbg_interactive.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dbg_monitor.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_dumps.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_timings.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dbg_rt.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_CxDx.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_NAS.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Ro.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Rx.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_S6mS6n.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_SGd.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_SLh.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Sd.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Sh.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_T4.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_T6aT6bT7.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Tsp.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_3gpp.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_starent.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_eap.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_legacy_xml.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6a.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6i.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_nas_mipv6.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_nasreq.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_sip.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_busypeers.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_ereg.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_ignore_dh.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_load_balance.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_randomize.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/rt_redirect.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/test_acct.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/test_app.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/test_hss.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/test_netemul.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/test_rt_any.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/test_sip.fdx";
+#LoadExtension = "/usr/local/lib/freeDiameter/dict_Rf.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_S6as6d.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_S6t.fdx";
+LoadExtension = "/usr/local/lib/freeDiameter/dict_S6c.fdx";
+
+
+# -------- Peers ---------
+
+# The framework will actively attempt to establish and maintain a connection
+# with the peers listed here.
+# For only accepting incoming connections, see the acl_wl.fx extension.
+
+# ConnectPeer
+# Declare a remote peer to which this peer must maintain a connection. 
+# In addition, this allows specifying non-default parameters for this peer only
+# (for example disable SCTP with this peer, or use RFC3588-flavour TLS). 
+# Note that by default, if a peer is not listed as a ConnectPeer entry, an 
+# incoming connection from this peer will be rejected. If you want to accept 
+# incoming connections from other peers, see the acl_wl.fdx? extension which 
+# allows exactly this. 
+
+ConnectPeer= "@HSS_FQDN@" { ConnectTo = "@HSS_IP_ADDR@"; No_SCTP ; No_IPv6; Prefer_TCP; No_TLS; port = 3868;};
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/redis_extern.conf b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/redis_extern.conf
new file mode 100644
index 0000000000000000000000000000000000000000..1ee9dd9a788f71657c0cff646fe7118cdbfda0bb
--- /dev/null
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/redis_extern.conf
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2016-present, Facebook, Inc.
+# All rights reserved.
+#
+# This source code is licensed under the BSD-style license found in the
+# LICENSE file in the root directory of this source tree. An additional grant
+# of patent rights can be found in the PATENTS file in the same directory.
+
+# Jinja template for Redis configuration
+# See the default config file for options and explanations:
+# https://github.com/antirez/redis/blob/unstable/redis.conf
+
+# TODO: make sensible, production-aware config decisions
+
+bind 192.168.61.6
+port 6380
+
+daemonize no
+loglevel notice
+
+timeout 0
+databases 1
+
+dbfilename redis_dump.rdb
+dir /data
+
+# Save the DB on disk
+
+save 900 1
+
+save 300 10
+
+save 60 1000
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
index 4c1ceb424a09e08d3d5d5a316500fb7efda90f9e..e1e992c94c2a668cdd4f9fd2ab0c1449f25d753f 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
@@ -58,57 +58,45 @@ services:
             timeout: 5s
             retries: 5
 
-    oai_mme:
-        image: oai-mme:latest
-        container_name: rfsim4g-oai-mme
+    redis:
+        image: redis:6.0.5
+        container_name: rfsim4g-redis
         privileged: true
-        depends_on: [oai_hss]
+        networks:
+            public_net:
+                ipv4_address: 192.168.61.6
+        volumes:
+            - ../4g_rfsimulator_fdd_05MHz/redis_extern.conf:/usr/local/etc/redis/redis.conf
+        entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
+        healthcheck:
+            test: /bin/bash -c "redis-cli -h 192.168.61.6 -p 6380 ping"
+            interval: 10s
+            timeout: 5s
+            retries: 5
+
+    magma_mme:
+        image: magma-mme:latest
+        container_name: rfsim4g-magma-mme
+        hostname: mme
+        privileged: true
+        depends_on: [oai_hss, redis]
         networks:
             public_net:
                 ipv4_address: 192.168.61.3
         environment:
+            TZ: Europe/Paris
             REALM: openairinterface.org
             PREFIX: /openair-mme/etc
-            INSTANCE: 1
-            PID_DIRECTORY: /var/run
-            HSS_IP_ADDR: 192.168.61.2
             HSS_HOSTNAME: hss
             HSS_FQDN: hss.openairinterface.org
             HSS_REALM: openairinterface.org
-            MCC: '208'
-            MNC: '96'
-            MME_GID: 32768
-            MME_CODE: 3
-            TAC_0: 1
-            TAC_1: 2
-            TAC_2: 3
             MME_FQDN: mme.openairinterface.org
-            MME_S6A_IP_ADDR: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S1_MME: eth0
-            MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S11: eth0
-            MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S10: lo
-            MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
-            OUTPUT: CONSOLE
-            SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
-            PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
-            PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
-            MCC_SGW_0: '208'
-            MNC3_SGW_0: '096'
-            TAC_LB_SGW_0: '01'
-            TAC_HB_SGW_0: '00'
-            MCC_MME_0: '208'
-            MNC3_MME_0: '096'
-            TAC_LB_MME_0: '02'
-            TAC_HB_MME_0: '00'
-            MCC_MME_1: '208'
-            MNC3_MME_1: '096'
-            TAC_LB_MME_1: '03'
-            TAC_HB_MME_1: '00'
-            TAC_LB_SGW_TEST_0: '03'
-            TAC_HB_SGW_TEST_0: '00'
-            SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
+            FEATURES: mme_oai
+        volumes:
+            - ../4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
+            - ../4g_rfsimulator_fdd_05MHz/mme.conf:/magma-mme/etc/mme.conf
+            - ../4g_rfsimulator_fdd_05MHz/entrypoint.sh:/magma-mme/bin/entrypoint.sh
+        entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
         healthcheck:
             test: /bin/bash -c "pgrep oai_mme"
             interval: 10s
@@ -118,7 +106,7 @@ services:
     oai_spgwc:
         image: oai-spgwc:latest
         privileged: true
-        depends_on: [oai_mme]
+        depends_on: [magma_mme]
         container_name: rfsim4g-oai-spgwc
         networks:
             public_net:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
index 4a61181afbb620fa64d839e3b82fac5291eddfc5..ad665813f2a5bb1a956e7f7056dadf63bc7c4d5b 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
@@ -58,57 +58,45 @@ services:
             timeout: 5s
             retries: 5
 
-    oai_mme:
-        image: oai-mme:latest
-        container_name: rfsim4g-oai-mme
+    redis:
+        image: redis:6.0.5
+        container_name: rfsim4g-redis
         privileged: true
-        depends_on: [oai_hss]
+        networks:
+            public_net:
+                ipv4_address: 192.168.61.6
+        volumes:
+            - ../4g_rfsimulator_fdd_05MHz/redis_extern.conf:/usr/local/etc/redis/redis.conf
+        entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
+        healthcheck:
+            test: /bin/bash -c "redis-cli -h 192.168.61.6 -p 6380 ping"
+            interval: 10s
+            timeout: 5s
+            retries: 5
+
+    magma_mme:
+        image: magma-mme:latest
+        container_name: rfsim4g-magma-mme
+        hostname: mme
+        privileged: true
+        depends_on: [oai_hss, redis]
         networks:
             public_net:
                 ipv4_address: 192.168.61.3
         environment:
+            TZ: Europe/Paris
             REALM: openairinterface.org
             PREFIX: /openair-mme/etc
-            INSTANCE: 1
-            PID_DIRECTORY: /var/run
-            HSS_IP_ADDR: 192.168.61.2
             HSS_HOSTNAME: hss
             HSS_FQDN: hss.openairinterface.org
             HSS_REALM: openairinterface.org
-            MCC: '208'
-            MNC: '96'
-            MME_GID: 32768
-            MME_CODE: 3
-            TAC_0: 1
-            TAC_1: 2
-            TAC_2: 3
             MME_FQDN: mme.openairinterface.org
-            MME_S6A_IP_ADDR: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S1_MME: eth0
-            MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S11: eth0
-            MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S10: lo
-            MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
-            OUTPUT: CONSOLE
-            SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
-            PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
-            PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
-            MCC_SGW_0: '208'
-            MNC3_SGW_0: '096'
-            TAC_LB_SGW_0: '01'
-            TAC_HB_SGW_0: '00'
-            MCC_MME_0: '208'
-            MNC3_MME_0: '096'
-            TAC_LB_MME_0: '02'
-            TAC_HB_MME_0: '00'
-            MCC_MME_1: '208'
-            MNC3_MME_1: '096'
-            TAC_LB_MME_1: '03'
-            TAC_HB_MME_1: '00'
-            TAC_LB_SGW_TEST_0: '03'
-            TAC_HB_SGW_TEST_0: '00'
-            SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
+            FEATURES: mme_oai
+        volumes:
+            - ../4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
+            - ../4g_rfsimulator_fdd_05MHz/mme.conf:/magma-mme/etc/mme.conf
+            - ../4g_rfsimulator_fdd_05MHz/entrypoint.sh:/magma-mme/bin/entrypoint.sh
+        entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
         healthcheck:
             test: /bin/bash -c "pgrep oai_mme"
             interval: 10s
@@ -118,7 +106,7 @@ services:
     oai_spgwc:
         image: oai-spgwc:latest
         privileged: true
-        depends_on: [oai_mme]
+        depends_on: [magma_mme]
         container_name: rfsim4g-oai-spgwc
         networks:
             public_net:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
index 3424780791e5b1efaf468781bb99b698fade02e0..ffa92bac4907046960d4f7a4bcaa4af6b488dafe 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
@@ -58,57 +58,45 @@ services:
             timeout: 5s
             retries: 5
 
-    oai_mme:
-        image: oai-mme:latest
-        container_name: rfsim4g-oai-mme
+    redis:
+        image: redis:6.0.5
+        container_name: rfsim4g-redis
         privileged: true
-        depends_on: [oai_hss]
+        networks:
+            public_net:
+                ipv4_address: 192.168.61.6
+        volumes:
+            - ../4g_rfsimulator_fdd_05MHz/redis_extern.conf:/usr/local/etc/redis/redis.conf
+        entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
+        healthcheck:
+            test: /bin/bash -c "redis-cli -h 192.168.61.6 -p 6380 ping"
+            interval: 10s
+            timeout: 5s
+            retries: 5
+
+    magma_mme:
+        image: magma-mme:latest
+        container_name: rfsim4g-magma-mme
+        hostname: mme
+        privileged: true
+        depends_on: [oai_hss, redis]
         networks:
             public_net:
                 ipv4_address: 192.168.61.3
         environment:
+            TZ: Europe/Paris
             REALM: openairinterface.org
             PREFIX: /openair-mme/etc
-            INSTANCE: 1
-            PID_DIRECTORY: /var/run
-            HSS_IP_ADDR: 192.168.61.2
             HSS_HOSTNAME: hss
             HSS_FQDN: hss.openairinterface.org
             HSS_REALM: openairinterface.org
-            MCC: '208'
-            MNC: '96'
-            MME_GID: 32768
-            MME_CODE: 3
-            TAC_0: 1
-            TAC_1: 2
-            TAC_2: 3
             MME_FQDN: mme.openairinterface.org
-            MME_S6A_IP_ADDR: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S1_MME: eth0
-            MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S11: eth0
-            MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
-            MME_INTERFACE_NAME_FOR_S10: lo
-            MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
-            OUTPUT: CONSOLE
-            SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
-            PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
-            PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
-            MCC_SGW_0: '208'
-            MNC3_SGW_0: '096'
-            TAC_LB_SGW_0: '01'
-            TAC_HB_SGW_0: '00'
-            MCC_MME_0: '208'
-            MNC3_MME_0: '096'
-            TAC_LB_MME_0: '02'
-            TAC_HB_MME_0: '00'
-            MCC_MME_1: '208'
-            MNC3_MME_1: '096'
-            TAC_LB_MME_1: '03'
-            TAC_HB_MME_1: '00'
-            TAC_LB_SGW_TEST_0: '03'
-            TAC_HB_SGW_TEST_0: '00'
-            SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
+            FEATURES: mme_oai
+        volumes:
+            - ../4g_rfsimulator_fdd_05MHz/mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
+            - ../4g_rfsimulator_fdd_05MHz/mme.conf:/magma-mme/etc/mme.conf
+            - ../4g_rfsimulator_fdd_05MHz/entrypoint.sh:/magma-mme/bin/entrypoint.sh
+        entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
         healthcheck:
             test: /bin/bash -c "pgrep oai_mme"
             interval: 10s
@@ -118,7 +106,7 @@ services:
     oai_spgwc:
         image: oai-spgwc:latest
         privileged: true
-        depends_on: [oai_mme]
+        depends_on: [magma_mme]
         container_name: rfsim4g-oai-spgwc
         networks:
             public_net:
diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml
index 6a39f2147ea7719ba7337db9b0ffc6713240f0d8..74a23905f0abc4e5258e3837d88c1ae410696732 100644
--- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml
@@ -241,12 +241,12 @@ services:
             NSSAI_SD1: 112233
             AMF_IP_ADDRESS: 192.168.71.132
             GNB_NGA_IF_NAME: eth0
-            GNB_NGA_IP_ADDRESS: 192.168.71.136
+            GNB_NGA_IP_ADDRESS: 192.168.71.140
             GNB_NGU_IF_NAME: eth0
-            GNB_NGU_IP_ADDRESS: 192.168.71.136
+            GNB_NGU_IP_ADDRESS: 192.168.71.140
             F1_IF_NAME: eth0
-            F1_CU_IP_ADDRESS: 192.168.71.136
-            F1_DU_IP_ADDRESS: 192.168.71.138
+            F1_CU_IP_ADDRESS: 192.168.71.140
+            F1_DU_IP_ADDRESS: 192.168.71.142
             F1_CU_D_PORT: 2153
             F1_DU_D_PORT: 2153
             USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
@@ -254,7 +254,7 @@ services:
             - oai-ext-dn
         networks:
             public_net:
-                ipv4_address: 192.168.71.136
+                ipv4_address: 192.168.71.140
         healthcheck:
             test: /bin/bash -c "pgrep nr-softmodem"
             interval: 10s
@@ -277,12 +277,12 @@ services:
             NSSAI_SD1: 112233
             AMF_IP_ADDRESS: 192.168.71.132
             GNB_NGA_IF_NAME: eth0
-            GNB_NGA_IP_ADDRESS: 192.168.71.138
+            GNB_NGA_IP_ADDRESS: 192.168.71.142
             GNB_NGU_IF_NAME: eth0
-            GNB_NGU_IP_ADDRESS: 192.168.71.138
+            GNB_NGU_IP_ADDRESS: 192.168.71.142
             F1_IF_NAME: eth0
-            F1_CU_IP_ADDRESS: 192.168.71.136
-            F1_DU_IP_ADDRESS: 192.168.71.138
+            F1_CU_IP_ADDRESS: 192.168.71.140
+            F1_DU_IP_ADDRESS: 192.168.71.142
             F1_CU_D_PORT: 2153
             F1_DU_D_PORT: 2153
             USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time
@@ -290,7 +290,7 @@ services:
             - oai-cu
         networks:
             public_net:
-                ipv4_address: 192.168.71.138
+                ipv4_address: 192.168.71.142
         healthcheck:
             test: /bin/bash -c "pgrep nr-softmodem"
             interval: 10s
@@ -301,7 +301,7 @@ services:
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment: 
-            RFSIMULATOR: 192.168.71.138
+            RFSIMULATOR: 192.168.71.142
             FULL_IMSI: '208990100001100'
             FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
             OPC: 'C42449363BBAD02B66D16BC975D77CC1'
@@ -313,7 +313,7 @@ services:
             - oai-du
         networks:
             public_net:
-                ipv4_address: 192.168.71.137
+                ipv4_address: 192.168.71.150
         healthcheck:
             test: /bin/bash -c "pgrep nr-uesoftmodem"
             interval: 10s
diff --git a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml
index f0476b0a1efd0ed1932c16ca927e7c9dac926bc0..808be7d83d5f8c370a49c1a91050e2642f700070 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml
@@ -241,15 +241,15 @@ services:
             NSSAI_SD1: 112233
             AMF_IP_ADDRESS: 192.168.71.132
             GNB_NGA_IF_NAME: eth0
-            GNB_NGA_IP_ADDRESS: 192.168.71.136
+            GNB_NGA_IP_ADDRESS: 192.168.71.140
             GNB_NGU_IF_NAME: eth0
-            GNB_NGU_IP_ADDRESS: 192.168.71.136
+            GNB_NGU_IP_ADDRESS: 192.168.71.140
             USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
         depends_on:
             - oai-ext-dn
         networks:
             public_net:
-                ipv4_address: 192.168.71.136
+                ipv4_address: 192.168.71.140
         healthcheck:
             test: /bin/bash -c "pgrep nr-softmodem"
             interval: 10s
@@ -260,7 +260,7 @@ services:
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment: 
-            RFSIMULATOR: 192.168.71.136
+            RFSIMULATOR: 192.168.71.140
             FULL_IMSI: '208990100001100'
             FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
             OPC: 'C42449363BBAD02B66D16BC975D77CC1'
@@ -272,7 +272,7 @@ services:
             - oai-gnb
         networks:
             public_net:
-                ipv4_address: 192.168.71.137
+                ipv4_address: 192.168.71.150
         healthcheck:
             test: /bin/bash -c "pgrep nr-uesoftmodem"
             interval: 10s
diff --git a/ci-scripts/yaml_files/fr1_epc_20897/mme.conf b/ci-scripts/yaml_files/fr1_epc_20897/mme.conf
index 9dcb44ef2a892c6702780c56ffb3a2aba4e9a658..923bf1c3884234a20d92ff39de84b330e580042d 100644
--- a/ci-scripts/yaml_files/fr1_epc_20897/mme.conf
+++ b/ci-scripts/yaml_files/fr1_epc_20897/mme.conf
@@ -114,7 +114,6 @@ MME :
         MME_APP_LOG_LEVEL = "TRACE";
         S6A_LOG_LEVEL     = "TRACE";
         UTIL_LOG_LEVEL    = "ERROR";
-        MSC_LOG_LEVEL     = "ERROR";
         ITTI_LOG_LEVEL    = "ERROR";
         ASN1_VERBOSITY    = "annoying";
     };
diff --git a/ci-scripts/yaml_files/magma_nsa_20897/mme.conf b/ci-scripts/yaml_files/magma_nsa_20897/mme.conf
index 242b780a40dfd2406ecb004ae8d06d5780f117f9..6bdace2c28c32df422a4c9d5190f5eea58764f35 100644
--- a/ci-scripts/yaml_files/magma_nsa_20897/mme.conf
+++ b/ci-scripts/yaml_files/magma_nsa_20897/mme.conf
@@ -121,7 +121,6 @@ MME :
         S11_LOG_LEVEL      = "DEBUG";
         S6A_LOG_LEVEL      = "DEBUG";
         UTIL_LOG_LEVEL     = "INFO";
-        MSC_LOG_LEVEL      = "ERROR";
         ITTI_LOG_LEVEL     = "ERROR";
         MME_SCENARIO_PLAYER_LOG_LEVEL = "ERROR";
         ASN1_VERBOSITY    = "INFO";
diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index b7b365741cb90c9c9a3ec1f196c42ed9bd1ccbf9..82022da78f3dfa9786471d94913bb9cf58a3f032 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -938,10 +938,6 @@ add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only vali
 add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
 add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
 
-add_boolean_option(MESSAGE_CHART_GENERATOR False         "For generating sequence diagrams")
-add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams")
-add_boolean_option(MESSAGE_CHART_GENERATOR_PHY     False "trace some PHY exchanges in sequence diagrams")
-
 add_boolean_option(UE_EXPANSION             False         "enable UE_EXPANSION with max 256 UE")
 add_boolean_option(PHY_TX_THREAD            False         "enable UE_EXPANSION with max 256 UE")
 add_boolean_option(PRE_SCD_THREAD           False         "enable UE_EXPANSION with max 256 UE")
@@ -1019,7 +1015,6 @@ add_boolean_option(TRACE_RLC_UM_TX_STATUS  False "TRACE for RLC UM, TO BE CHANGE
 ##########################
 #add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER  False "For eNB, PDCP communicate with a IP driver")
 #add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U     True  "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
-add_definitions(-DNEW_GTPU=1)
 
 ##########################
 # RRC LAYER OPTIONS
@@ -1097,8 +1092,7 @@ include_directories("${OPENAIR3_DIR}/S1AP")
 include_directories("${OPENAIR2_DIR}/X2AP")
 include_directories("${OPENAIR2_DIR}/M2AP")
 include_directories("${OPENAIR2_DIR}/F1AP")
-include_directories("${OPENAIR3_DIR}/UDP")
-include_directories("${OPENAIR3_DIR}/GTPV1-U")
+include_directories("${OPENAIR3_DIR}/ocp-gtpu")
 include_directories("${OPENAIR3_DIR}/M3AP")
 include_directories("${OPENAIR3_DIR}/MME_APP")
 include_directories("${OPENAIR_DIR}/targets/COMMON")
@@ -1111,7 +1105,6 @@ include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/S1AP")
 include_directories("${OPENAIR2_DIR}/UTIL/OSA")
 include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
 include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
-include_directories("${OPENAIR2_DIR}/LAYER2/PROTO_AGENT")
 include_directories("${OPENAIR2_DIR}/UTIL/MEM")
 include_directories("${OPENAIR2_DIR}/UTIL/LISTS")
 include_directories("${OPENAIR2_DIR}/UTIL/FIFO")
@@ -1124,8 +1117,6 @@ include_directories("${OPENAIR2_DIR}/UTIL/CLI")
 include_directories("${OPENAIR2_DIR}/UTIL/OPT")
 include_directories("${OPENAIR2_DIR}/UTIL/OMV")
 include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
-include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/shared")
-include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/include")
 include_directories("${OPENAIR_DIR}")
 
 # Utilities Library
@@ -1279,18 +1270,6 @@ include_directories (${FSPT_C_DIR})
 #  set(ASYNC_IF_LIB ASYNC_IF)
 #  include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
 
-add_library(PROTO_AGENT
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
-  )
-set(PROTO_AGENT_LIB PROTO_AGENT)
-include_directories(${OPENAIR2_DIR}/LAYER2/PROTO_AGENT)
-
-
-
 set(PROTOBUF_LIB "protobuf-c")
 
 #set(PROTOBUF_LIB "protobuf") #for Cpp
@@ -1301,11 +1280,6 @@ add_library(HASHTABLE
 )
 include_directories(${OPENAIR_DIR}/common/utils/hashtable)
 
-add_library(msc MODULE ${OPENAIR_DIR}/common/utils/msc/msc.c )
-target_link_libraries (msc LFDS)
-
-include_directories(${OPENAIR_DIR}/common/utils/msc)
-
 set(UTIL_SRC
   #  ${OPENAIR2_DIR}/UTIL/CLI/cli.c
   #  ${OPENAIR2_DIR}/UTIL/CLI/cli_cmd.c
@@ -2161,7 +2135,6 @@ add_library(L2_NR
   ${MAC_NR_SRC}
   ${GNB_APP_SRC}
   )
-target_compile_definitions(L2_NR PUBLIC NEW_GTPU)
 
 add_library(L2_LTE_NR
   ${L2_RRC_SRC}
@@ -2169,7 +2142,6 @@ add_library(L2_LTE_NR
   ${ENB_APP_SRC}
   ${MCE_APP_SRC}
 )
-target_compile_definitions(L2_LTE_NR PUBLIC NEW_GTPU)
 
 add_dependencies(L2_NR rrc_flag nr_rrc_flag s1ap_flag x2_flag)
 
@@ -2210,32 +2182,14 @@ add_library(CN_UTILS
   ${OPENAIR3_DIR}/UTILS/mcc_mnc_itu.c
   )
 
-set(GTPV1U_DIR ${OPENAIR3_DIR}/GTPV1-U)
-
-add_library (GTPV1U_OCP
+add_library (GTPV1U
   ${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
   ${RRC_DIR}/rrc_eNB_GTPV1U.c
   ${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
   )
-target_compile_definitions(GTPV1U_OCP PUBLIC NEW_GTPU)
-add_dependencies(GTPV1U_OCP rrc_flag)
+add_dependencies(GTPV1U rrc_flag)
 include_directories(${OPENAIR3_DIR}/ocp-gtp)
 
-#NR case
-set (NR_GTPV1U_SRC
-  ${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
-  ${RRC_DIR}/rrc_eNB_GTPV1U.c
-  ${GTPV1U_DIR}/gtpv1u_eNB.c
-  ${GTPV1U_DIR}/gtpv1u_gNB.c
-  ${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
-  ${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTrxn.c
-  ${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uMsg.c
-  ${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1u.c
-  ${GTPV1U_DIR}/gtpv1u_teid_pool.c
-  )
-add_library(NR_GTPV1U ${NR_GTPV1U_SRC})
-add_dependencies(NR_GTPV1U rrc_flag)
-
 set (MME_APP_SRC
   ${OPENAIR3_DIR}/MME_APP/mme_app.c
   ${OPENAIR3_DIR}/MME_APP/mme_config.c
@@ -2251,9 +2205,6 @@ set(SCTP_SRC
 add_library(SCTP_CLIENT ${SCTP_SRC})
 add_dependencies(SCTP_CLIENT rrc_flag)
 
-add_library(UDP ${OPENAIR3_DIR}/UDP/udp_eNB_task.c)
-add_dependencies(UDP rrc_flag)
-
 set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
 set(libnas_api_OBJS
   ${NAS_SRC}COMMON/API/NETWORK/as_message.c
@@ -2808,9 +2759,9 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
 
 target_link_libraries (lte-softmodem
   -Wl,--start-group
-  RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U_OCP F1AP_LIB F1AP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
+  RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U F1AP_LIB F1AP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
   PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
-  ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
+  ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB}
   -Wl,--end-group z dl)
 
 target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
@@ -2852,40 +2803,12 @@ add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer coding params_l
 target_link_libraries (ocp-enb
   -Wl,--start-group
 
-  RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U_OCP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
+  RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
   PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
-  ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
+  ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB}
   -Wl,--end-group z dl)
 target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB}  ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
 
-add_executable(cu_test
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
-  ${T_SOURCE}
-)
-target_link_libraries(cu_test
-  ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
-  ${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ITTI
-)
-
-add_executable(du_test
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/du_test.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_common.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
-  ${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_async.c
-  ${T_SOURCE}
-)
-target_link_libraries(du_test
-  ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FSPT_MSG_LIB} ${PROTOBUF_LIB}
-  ${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ITTI
-)
-
 add_executable(oairu
   ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
   ${OPENAIR_TARGETS}/RT/USER/ru_control.c
@@ -2946,13 +2869,13 @@ endif()
 target_link_libraries (lte-uesoftmodem
   -Wl,--start-group
   RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB
-  SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
+  SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
   PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
-  ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
+  ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
   -Wl,--end-group z dl)
 
 target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
-target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB}  ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
+target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
 target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
 target_link_libraries (lte-uesoftmodem ${T_LIB})
 
@@ -2988,13 +2911,12 @@ add_executable(nr-softmodem
   ${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
   )
 
-target_compile_definitions(nr-softmodem PUBLIC NEW_GTPU)
 target_link_libraries (nr-softmodem
   -Wl,--start-group
-  UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA
-  ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
+  UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
+  ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
   NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-  X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
+  X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB}
   -Wl,--end-group z dl)
 
 target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES})
@@ -3031,8 +2953,8 @@ add_executable(ocp-gnb
 
 target_link_libraries (ocp-gnb
   -Wl,--start-group
-  UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA
-  ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
+  UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
+  ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
   NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
   X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
   -Wl,--end-group z dl)
@@ -3075,16 +2997,16 @@ add_executable(nr-uesoftmodem
 
 target_link_libraries (nr-uesoftmodem
   -Wl,--start-group
-  RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
+  RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
   PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
   NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB
-  ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
+  ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
   NFAPI_USER_LIB S1AP_LIB S1AP_ENB
-  ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB}
+  ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB}
   -Wl,--end-group z dl)
 
 target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
-target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp  ${XFORMS_LIBRARIES} ${PROTOBUF_LIB}  ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
+target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp  ${XFORMS_LIBRARIES} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
 target_link_libraries (nr-uesoftmodem ${LIB_LMS_LIBRARIES})
 target_link_libraries (nr-uesoftmodem ${T_LIB})
 
@@ -3329,7 +3251,7 @@ add_executable(test_epc_generate_scenario
   ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
   )
 target_link_libraries (test_epc_generate_scenario
-  -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U_OCP LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ITTI ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
+  -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB PHY LFDS ITTI L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
   )
 
 add_executable(test_epc_play_scenario
@@ -3348,7 +3270,7 @@ add_executable(test_epc_play_scenario
   )
 target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
 target_link_libraries (test_epc_play_scenario
-  -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U_OCP LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ITTI ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
+  -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ITTI -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
   )
 
 
@@ -3389,13 +3311,13 @@ if (${T_TRACER})
         ITTI RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP
         params_libconfig oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
         oai_eth_transpro oai_mobipass tcp_bridge tcp_bridge_oai
-        coding FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO
+        coding FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE UTIL OMG_SUMO
         SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
         NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
         PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
         L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB
-        CN_UTILS GTPV1U_OCP GTPV1U_OCP SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
-        ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
+        CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
+        ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
     if (TARGET ${i})
       add_dependencies(${i} generate_T)
     endif()
@@ -3499,14 +3421,13 @@ add_executable(nr-ittisim
   ${CONFIG_SOURCES}
   ${SHLIB_LOADER_SOURCES}
   )
-target_compile_definitions(nr-ittisim PUBLIC NEW_GTPU)
 
 target_link_libraries (nr-ittisim
   -Wl,--start-group
-  UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA
-  ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
+  UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
+  ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB
   NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-  X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
+  X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB}
   PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE
   -Wl,--end-group z dl)
 
diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt
index bd71125cf0ac1d920b742f12dccb8b04ffbc671f..dc91f3c31c99a5683be3404a0950b4f5b8a0b591 100755
--- a/cmake_targets/at_commands/CMakeLists.txt
+++ b/cmake_targets/at_commands/CMakeLists.txt
@@ -409,7 +409,6 @@ set(emm_HDR
 add_library(emm ${emm_SRC} ${emm_HDR})
 
 target_include_directories(emm PRIVATE 
-                     ${OPENAIR_DIR}/common/utils/msc 
                      ${OPENAIR_DIR}/common/utils
                      ${OPENAIR_DIR}/openair2/COMMON
                      ${OPENAIR_NAS_DIR}/UE
@@ -693,7 +692,6 @@ include_directories(
                      ${OPENAIR_TARGETS}/COMMON
                      ${OPENAIR_NAS_DIR}/UE
                      ${OPENAIR_DIR}/common/utils
-                     ${OPENAIR_DIR}/common/utils/msc 
                      ${OPENAIR3_DIR}/COMMON 
                      ${OPENAIR3_DIR}/SECU 
                      ${OPENAIR_NAS_DIR}/src 
diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf
index 7158790b284bc476fc98a1c409ff37101c991135..df4ec5d01ca65341a7fe608717c7f7a68afc379f 100755
--- a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf
+++ b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf
index 70819d0e29f117806a37223e7aaf534fecf41283..f9bb8338bf7b1537f3d118c1df571a83db237823 100755
--- a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf
+++ b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf
index 7381fefc1a279f050cca6fb81334d941dc97e68f..5c3d9214bc7f6a847a0da42c75cfff11da53d544 100755
--- a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf
+++ b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf
index 8eecfa2ac5bbc5017638bbcfd1bb094747c99952..f214f12783a95fdbfab030c3ff56dd6a7c0107d4 100755
--- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf
+++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf
index ce2b71bdd2cc5446c5ba3a01841d2ef8585d5f7f..f9f70281cadc0523426e7df24bf4808d81751d7a 100755
--- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf
+++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf
index 11e6e244187e1be173e2546795aadcc5521cfacf..87deb031727fd554cd67347324f201d75e1e6c1d 100755
--- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf
+++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf
@@ -165,19 +165,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf
index 11f6adbb4d055ab0a2c8595c22ca6923cb16041d..039b1d8aa3f6d871645b925c97ac40ee707e9353 100755
--- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf
+++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf
@@ -182,19 +182,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf
index 3bf79f94bf279171782fbf6796e6cadb4ae694f0..3c70040bfc0f4b3983206c28434598067e578ceb 100755
--- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf
+++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf
@@ -182,19 +182,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf
index 67a2bae08c3c55a372ec6d0e0110107bce5fc075..f9d3da2c35ba5e45e31ed963a908b1f5cdb0bfd5 100755
--- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf
+++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf
@@ -182,19 +182,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf
index 02f29c4c2ed971fff645eb63dfc436ebe37d0100..c4b3e00a75f00c4e05346e67bcec05f2ed22668b 100755
--- a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf
+++ b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf
@@ -184,19 +184,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf
index 71a479a5126f7da57da0578158d5ff7db94a4b21..e2786ef21cf55ed37432d6febc18370d8b96c04e 100755
--- a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf
+++ b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf
@@ -184,19 +184,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf
index 09958d62e4b1be8b1081330249802f73592c7c3e..8cd9bd6c677caaa5aa111c1f317d11e5789884e6 100755
--- a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf
+++ b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf
@@ -184,19 +184,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
   }
 );
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index 92bcfd88e2e577e27b3d481321e770e1b6d8ed8b..c2b63058315552bb3ee899cefae456ce320fab4f 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -67,7 +67,7 @@ BUILD_ECLIPSE=0
 NR="False"
 ITTI_SIM="False"
 SANITIZE_ADDRESS="False"
-OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc"
+OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope"
 RU=0
 trap handle_ctrl_c INT
 
diff --git a/cmake_targets/epc_test/CMakeLists.template b/cmake_targets/epc_test/CMakeLists.template
index 7a097fffb027f81f94a210f50f8ea37939639bee..28da13437c1465ea19590b1e7f7bedf79e8c4106 100755
--- a/cmake_targets/epc_test/CMakeLists.template
+++ b/cmake_targets/epc_test/CMakeLists.template
@@ -26,7 +26,6 @@ set (  LOG_NO_THREAD True )
 set (  DEADLINE_SCHEDULER False )
 set (  MAC_CONTEXT 1 )
 set (  MAX_NUM_CCs 1 )
-set (  MESSAGE_CHART_GENERATOR False)
 set (  MSG_PRINT False )
 set (  MU_RECEIVER False )
 set (  NAS_ADDRESS_FIX False )
diff --git a/cmake_targets/install_external_packages.ubuntu20 b/cmake_targets/install_external_packages.ubuntu20
index e58f5c9bb16ec52c5ede52a01a0eda26f402fe72..1f10ca53c7f3f7ab503ec6bebc4349872e2bc59a 100755
--- a/cmake_targets/install_external_packages.ubuntu20
+++ b/cmake_targets/install_external_packages.ubuntu20
@@ -409,7 +409,6 @@ check_install_ubuntu_packages() {
 	      libxml2 \
 	      libxml2-dev  \
 	      libxslt1-dev \
-	      mscgen  \
 	      octave-signal \
 	      openssh-client \
 	      openssh-server \
diff --git a/cmake_targets/s1c_mme_test/CMakeLists.template b/cmake_targets/s1c_mme_test/CMakeLists.template
index e62df04bc6f345783c35f0d8749a7af523e1e68f..d2d2d3e05374739e3db21eee9387536a82f36004 100755
--- a/cmake_targets/s1c_mme_test/CMakeLists.template
+++ b/cmake_targets/s1c_mme_test/CMakeLists.template
@@ -26,7 +26,6 @@ set (  LOG_NO_THREAD True )
 set (  DEADLINE_SCHEDULER False )
 set (  MAC_CONTEXT 1 )
 set (  MAX_NUM_CCs 1 )
-set (  MESSAGE_CHART_GENERATOR False)
 set (  MSG_PRINT False )
 set (  MU_RECEIVER False )
 set (  NAS_ADDRESS_FIX False )
diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index ec5de6a0d1b4272afafefd37d1a177338e81b95c..55a39c6b2b67e2aa47bf2a3f76efc48374990293 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -765,7 +765,6 @@ check_install_oai_software() {
 	libxml2 \
 	libxml2-dev  \
 	libxslt1-dev \
-	mscgen  \
 	octave-signal \
 	openssh-client \
 	openssh-server \
@@ -793,7 +792,7 @@ check_install_oai_software() {
       fi
       $SUDO $INSTALLER install -y python-epdb vim-common
     else
-      $SUDO $INSTALLER install -y mscgen pydb
+      $SUDO $INSTALLER install -y pydb
     fi
 
     $SUDO $INSTALLER install -y \
diff --git a/cmake_targets/tools/example_enb_exmimo_mme_hss.txt b/cmake_targets/tools/example_enb_exmimo_mme_hss.txt
index 238554f8e2a71ccb667c537d5086c0e99c40a442..b55266dfe7aaae9a3da16b770a9219c143efda42 100755
--- a/cmake_targets/tools/example_enb_exmimo_mme_hss.txt
+++ b/cmake_targets/tools/example_enb_exmimo_mme_hss.txt
@@ -85,18 +85,7 @@ Tools available:
 
 1) itti_analyser (list messages exchanged between protocol layers)
 2) xforms (Layer 1)
-3) mscgen (under construction, but can give some results now)
-    (http://www.mcternan.me.uk/mscgen/)
-    We use the software to generate sequence diagrams
-    with traces generated during the execution of the eNB.
-    After the enb execution:
-    yang@yang:...$ cd /tmp
-    yang@yang:/tmp$ /home/yang/openair4G/trunk/targets/SCRIPTS/msc_gen.py
-    The results are located in the current directory (/tmp in this example) in a folder. The name of the folder 
-    is the current date (for example: 2015-04-08_20.34.10).
-    The results are input files for the mscgen tool containing events or messages and the 
-    corresponding generated png files.
-4) vcd (timing mesurements)
+3) vcd (timing mesurements)
 
 
 
diff --git a/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt b/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
index 9996a53e1907cf3ddd75550187c984917d9158f7..805d121e6dd50c6cf7ee71b97a1816ca744f5d78 100755
--- a/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
+++ b/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
@@ -92,18 +92,7 @@ Tools available:
 
 1) itti_analyser (list messages exchanged between protocol layers)
 2) xforms (Layer 1)
-3) mscgen (under construction, but can give some results now)
-    (http://www.mcternan.me.uk/mscgen/)
-    We use the software to generate sequence diagrams
-    with traces generated during the execution of the eNB.
-    After the enb execution:
-    yang@yang:...$ cd /tmp
-    yang@yang:/tmp$ /home/yang/openair4G/trunk/targets/SCRIPTS/msc_gen.py
-    The results are located in the current directory (/tmp in this example) in a folder. The name of the folder 
-    is the current date (for example: 2015-04-08_20.34.10).
-    The results are input files for the mscgen tool containing events or messages and the 
-    corresponding generated png files.
-4) vcd (timing mesurements)
+3) vcd (timing mesurements)
 
 
 
diff --git a/cmake_targets/tools/run_enb_s1_usrp b/cmake_targets/tools/run_enb_s1_usrp
index 1a4c6b10b8381a367762e8032ae5235aa68e8a6a..db22e31493dd20eb338b3f968e25514d0bb1681c 100755
--- a/cmake_targets/tools/run_enb_s1_usrp
+++ b/cmake_targets/tools/run_enb_s1_usrp
@@ -32,8 +32,6 @@
 ################################
 THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
 source $THIS_SCRIPT_PATH/build_helper
-declare -i g_run_msc_gen=0
-declare    g_msc_dir="/tmp"
 
 
 function help()
@@ -55,7 +53,6 @@ function help()
   echo_error "  -M, --target-dl-mcs       mcs       Downlink target MCS."
   echo_error "  -n, --T-no-wait                     don't wait for tracer, start immediately"
   echo_error "  -p, --T-port              port      use given port"
-  echo_error "  -m, --mscgen                        directory Generate mscgen output files in a directory"
   echo_error "  -s, --show-stdout                   Do not redirect stdout and stderr to file /tmp/lte_softmodem.stdout.txt."
   echo_error "  -S, --enable-missed-slot            Continue execution in case of missed slot."
   echo_error "  -T, --target-ul-mcs       mcs       Uplink target MCS."
@@ -68,30 +65,10 @@ function help()
 }
 
 
-function do_msc_gen()
-{
-  cd $g_msc_dir
-  last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
-  $OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
-  sync
-  last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
-        
-  if [ x"$last_created_file" != x"$last_created_file2" ]; then
-    if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then 
-      command -v eog 2>/dev/null &&  eog ./$last_created_file2/oai_mscgen_page_0.png
-    fi
-  fi 
-
-}
-
-
 function control_c()
 # run if user hits control-c
 {
   echo_warning "\nExiting by ctrl+c\n"
-  if [ $g_run_msc_gen -eq 1 ]; then 
-    do_msc_gen
-  fi
   exit $?
 }
 
@@ -153,18 +130,6 @@ function main()
             exe_arguments="$exe_arguments --rf-config-file=$rf_config_file"
 	fi 
         ;;      
-      -m | --mscgen)
-        g_msc_dir=$2
-        # can omit file name if last arg on the line
-        if [ -d  "$g_msc_dir" ]; then
-          echo "setting mscgen log files to dir: $g_msc_dir"
-          g_run_msc_gen=1
-          shift 2;
-        else
-          echo_error "Mscgen log dir does not exist"
-          exit -1
-        fi
-        ;;      
       -M | --target-dl-mcs)
         echo "setting target dl MCS to $2"
         exe_arguments="$exe_arguments -m $2"
@@ -251,9 +216,6 @@ function main()
     else
       gdb -n -x ~/.gdb_lte_softmodem 
     fi
-    if [ $g_run_msc_gen -eq 1 ]; then 
-      do_msc_gen
-    fi
   fi
 }
 
diff --git a/cmake_targets/tools/run_enb_ue_virt_noS1 b/cmake_targets/tools/run_enb_ue_virt_noS1
index 79d5bc35dc1586fbbde90762affd87a718f50c91..5f8e7e5374ca047f333688f4b9de6995b13fdeec 100755
--- a/cmake_targets/tools/run_enb_ue_virt_noS1
+++ b/cmake_targets/tools/run_enb_ue_virt_noS1
@@ -57,7 +57,6 @@ function help()
   echo_error "  -l, --log-level                         set the global log level (8:trace, 7:debug, 6:info, 4:warn, 3:error). Note that the log configuration is eNB config file is ignored for oaisim."
   echo_error "  -h, --help                              Print this help."
   echo_error "  -K, --itti-dump-file   filename         ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
-  echo_error "  -m, --mscgen           directory        Generate mscgen output files in a directory"
   echo_error "  -V, --vcd                               Dump timings of processing in a GTKWave compliant file format."
   echo_error "  -W, --wireshark-l2                      Dump MAC frames for visualization with wireshark."
   echo_error "                                          You need to open Wireshark, open the preferences, and check try heuristics for the UDP protocol, MAC-LTE, RLC-LTE,"
@@ -75,11 +74,9 @@ function main()
   cecho "OPENAIR_DIR    = $OPENAIR_DIR" $green
 
   local -i run_gdb=0
-  local -i run_mscgen=0
   local    exe_arguments=""
   local    DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf
   local    CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB
-  local    MSC_DIR="/tmp"
   local abstraction_flag=0
 
   until [ -z "$1" ]
@@ -136,17 +133,6 @@ function main()
         exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
         ;;      
 
-      -m | --mscgen)
-        MSC_DIR=$2
-        if [ -d  "$MSC_DIR" ]; then
-          echo "setting mscgen log files to dir: $MSC_DIR"
-          run_mscgen=1
-          shift 2;
-        else
-          echo_error "Mscgen log dir does not exist"
-          exit -1
-        fi
-        ;;      
 #      -u | --num-ue )
 	    
       -V | --vcd)
@@ -212,10 +198,6 @@ function main()
   cd  $OPENAIR_DIR/targets/bin
    
    
-  if [ $run_mscgen -eq 1 ]; then 
-    $SUDO rm -f /tmp/openair.msc.*
-  fi
-  
   if [ $run_gdb -eq 0 ]; then 
     exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel14 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
   else
@@ -227,20 +209,6 @@ function main()
     cat ~/.gdb_enb_ue_nos1
     $SUDO gdb -n -x ~/.gdb_enb_ue_nos1 
   fi
-  
-  if [ $run_mscgen -eq 1 ]; then 
-    cd $MSC_DIR
-    last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
-    $OPENAIR_DIR/targets/SCRIPTS/msc_gen.py  --profile E_UTRAN
-    sync
-    last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
-        
-    if [ x"$last_created_file" != x"$last_created_file2" ]; then
-      if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then 
-        command -v eog 2>/dev/null &&  eog ./$last_created_file2/oai_mscgen_page_0.png
-      fi
-    fi 
-  fi
 }
 
 main "$@"
diff --git a/cmake_targets/tools/run_enb_ue_virt_s1 b/cmake_targets/tools/run_enb_ue_virt_s1
index 50fc819ec869b243da177435bcc19ea6a571dd7d..76bc3c2b39f6d2760cbb816101d7dd05456248f8 100755
--- a/cmake_targets/tools/run_enb_ue_virt_s1
+++ b/cmake_targets/tools/run_enb_ue_virt_s1
@@ -81,7 +81,6 @@ function help()
   echo_error "  -g, --gdb                               Run with GDB."
   echo_error "  -h, --help                              Print this help."
   echo_error "  -K, --itti-dump-file   filename         ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
-  echo_error "  -m, --mscgen           directory        Generate mscgen output files in a directory"
   echo_error "  -V, --vcd                               Dump timings of processing in a GTKWave compliant file format."
   echo_error "  -W, --wireshark-l2                      Dump MAC frames for visualization with wireshark."
   echo_error "                                          You need to open Wireshark, open the preferences, and check try heuristics for the UDP protocol, MAC-LTE, RLC-LTE,"
@@ -100,11 +99,9 @@ function main()
   cecho "OPENAIR_DIR    = $OPENAIR_DIR" $green
 
   local -i run_gdb=0
-  local -i run_mscgen=0
   local    exe_arguments=""
   local    DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf
   local    CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB
-  local    MSC_DIR="/tmp"
   
   until [ -z "$1" ]
     do
@@ -160,19 +157,6 @@ function main()
         exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
         ;;      
 
-      -m | --mscgen)
-        MSC_DIR=$2
-        # can omit file name if last arg on the line
-        if [ -d  "$MSC_DIR" ]; then
-          echo "setting mscgen log files to dir: $MSC_DIR"
-          run_mscgen=1
-          shift 2;
-        else
-          echo_error "Mscgen log dir does not exist"
-          exit -1
-        fi
-        ;;      
-
       -V | --vcd)
         echo "setting gtk-wave output"
         exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
@@ -258,10 +242,6 @@ function main()
   cd  $OPENAIR_DIR/targets/bin
    
    
-  if [ $run_mscgen -eq 1 ]; then 
-    rm -f /tmp/openair.msc.*
-  fi
-   
   if [ $run_gdb -eq 0 ]; then 
     exec $OPENAIR_DIR/targets/bin/oaisim.Rel14 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
   else
@@ -273,21 +253,6 @@ function main()
     cat ~/.gdb_enb_ue_s1
     gdb -n -x ~/.gdb_enb_ue_s1 
   fi
-  
-  if [ $run_mscgen -eq 1 ]; then 
-    cd $MSC_DIR
-    last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
-    $OPENAIR_DIR/targets/SCRIPTS/msc_gen.py  --profile E_UTRAN
-    sync
-    last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
-        
-    if [ x"$last_created_file" != x"$last_created_file2" ]; then
-      if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then 
-        command -v eog 2>/dev/null &&  eog ./$last_created_file2/oai_mscgen_page_0.png
-      fi
-    fi 
-  fi
-  
 }
 
 sudo echo
diff --git a/common/config/DOC/config/rtusage.md b/common/config/DOC/config/rtusage.md
index 10cbee24950bb3972f80118745f4efb65a50b516..8db58ddac35d7add615d73dde499a2c86a514343 100644
--- a/common/config/DOC/config/rtusage.md
+++ b/common/config/DOC/config/rtusage.md
@@ -65,7 +65,6 @@ To get help on supported parameters you can use specific options:
     -R: Enable online log
     -g: Set the global log level, valide options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))
     --telnetsrv: Start embedded telnet server
-    --msc: Enable the MSC tracing utility
 --------------------------------------------------------------------
 
 [LIBCONFIG] loader: 2/2 parameters successfully set, (2 to default value)
diff --git a/common/ran_context.h b/common/ran_context.h
index db981e9182f31405019a5a9ffc767b54dd0d3c48..055c6f783e562563519b161706ec06098c918b11 100644
--- a/common/ran_context.h
+++ b/common/ran_context.h
@@ -42,17 +42,11 @@
 //#include "ENB_APP/enb_config.h"
 #include "flexran_agent_defs.h"
 
-#include "gtpv1u.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uMsg.h"
-#include "NwGtpv1uPrivate.h"
-#include "gtpv1u_eNB_defs.h"
-#include "gtpv1u_gNB_defs.h"
-
 #include "PHY/defs_L1_NB_IoT.h"
 #include "RRC/LTE/defs_NB_IoT.h"
 #include "RRC/LTE/rrc_defs.h"
 #include "RRC/NR/nr_rrc_defs.h"
+#include <openair3/ocp-gtpu/gtpv1u_eNB_task.h>
 
 
 typedef struct {
@@ -110,8 +104,6 @@ typedef struct {
   struct gNB_MAC_INST_s **nrmac;
   /// GTPu descriptor 
   gtpv1u_data_t *gtpv1u_data_g;
-  /// NR GTPu descriptor 
-  nr_gtpv1u_data_t *nr_gtpv1u_data_g;
   /// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces
   struct RU_t_s **ru;
   /// Mask to indicate fronthaul setup status of RU (hard-limit to 64 RUs)
diff --git a/common/utils/LOG/DOC/rtusage.md b/common/utils/LOG/DOC/rtusage.md
index 041c29e688ecea97e84b99e97b27e6e018bb76d2..2f6fa5e6ea907b7634a0bfa1b4c5101e452e365c 100644
--- a/common/utils/LOG/DOC/rtusage.md
+++ b/common/utils/LOG/DOC/rtusage.md
@@ -49,7 +49,6 @@ The list of components defined within oai can be retrieved from the  [config mod
 [CONFIG] log_config.perf_log_level set to default value "info"
 [CONFIG] log_config.oip_log_level set to default value "info"
 [CONFIG] log_config.cli_log_level set to default value "info"
-[CONFIG] log_config.msc_log_level set to default value "info"
 [CONFIG] log_config.ocm_log_level set to default value "info"
 [CONFIG] log_config.udp_log_level set to default value "info"
 [CONFIG] log_config.gtpv1u_log_level set to default value "info"
@@ -108,8 +107,6 @@ The list of components defined within oai can be retrieved from the  [config mod
 [CONFIG] log_config.oip_log_infile set to default value
 [CONFIG] cli_log_infile: 0
 [CONFIG] log_config.cli_log_infile set to default value
-[CONFIG] msc_log_infile: 0
-[CONFIG] log_config.msc_log_infile set to default value
 [CONFIG] ocm_log_infile: 0
 [CONFIG] log_config.ocm_log_infile set to default value
 [CONFIG] udp_log_infile: 0
diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c
index 29e4f718c699e90998225159b1c0a1a4890e8114..a65a9732e7d0b201f7ea37ce9ac0cbabf5204cc5 100644
--- a/common/utils/LOG/log.c
+++ b/common/utils/LOG/log.c
@@ -449,7 +449,6 @@ int logInit (void)
   register_log_component("OCG","",OCG);
   register_log_component("PERF","",PERF);
   register_log_component("OIP","",OIP);
-  register_log_component("MSC","log",MSC);
   register_log_component("OCM","log",OCM);
   register_log_component("HW","",HW);
   register_log_component("OSA","",OSA);
diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h
index 46c73427c183910010233a1c18fbc8590cefe4cf..8299c48fbb0ff873cf9be6b7518332c31c28f5db 100644
--- a/common/utils/LOG/log.h
+++ b/common/utils/LOG/log.h
@@ -212,7 +212,6 @@ typedef enum {
   PERF,
   OIP,
   CLI,
-  MSC,
   OCM,
   UDP_,
   GTPU,
diff --git a/common/utils/assertions.h b/common/utils/assertions.h
index d85dab79a0c744f7d8cda566caa66638a2e9f34b..573036b1d949e23730cb15cc44d46e3023305d9f 100644
--- a/common/utils/assertions.h
+++ b/common/utils/assertions.h
@@ -25,14 +25,21 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <inttypes.h>
+#include <sys/types.h>
+#include <unistd.h>
 #include <platform_types.h>
 #include "backtrace.h"
 
-#define _Assert_Exit_                           \
-    fprintf(stderr, "\nExiting execution\n");   \
-    fflush(stdout);                             \
-    fflush(stderr);                             \
-    abort();
+#define _Assert_Exit_							\
+  if (getenv("gdbStacks")) {						\
+    char tmp [1000];							\
+    sprintf(tmp,"gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid());  \
+    __attribute__((unused)) int dummy=system(tmp);						\
+  }									\
+  fprintf(stderr, "\nExiting execution\n");				\
+  fflush(stdout);							\
+  fflush(stderr);							\
+  abort();
 
 #define _Assert_(cOND, aCTION, fORMAT, aRGS...)             \
 do {                                                        \
diff --git a/common/utils/lte/ue_power.h b/common/utils/lte/ue_power.h
deleted file mode 100644
index caeebec2c8f01fabfb4362313e44649835f6a492..0000000000000000000000000000000000000000
--- a/common/utils/lte/ue_power.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file ue_power.h
-* \brief support routines used in MAC and PHY 
-* \author R. Knopp, F. Kaltenberger
-* \date 2020
-* \version 0.1
-* \company Eurecom
-* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
-* \note
-* \warning
-*/
-
-int16_t estimate_ue_tx_power(int norm,uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs);
-
diff --git a/common/utils/msc/msc.c b/common/utils/msc/msc.c
deleted file mode 100644
index 84b723b02286694f0837f7ac817c592e5e98f72c..0000000000000000000000000000000000000000
--- a/common/utils/msc/msc.c
+++ /dev/null
@@ -1,785 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file msc.c
- * \brief Message chart generator logging utility (generated files to processed by a script to produce a mscgen input file for generating a sequence diagram document)
- * \author  Lionel GAUTHIER
- * \date 2015
- * \email: lionel.gauthier@eurecom.fr
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <stdint.h>
-#include <inttypes.h>
-
-#define MSC_LIBRARY
-#include "msc.h"
-
-#include "liblfds611.h"
-#include "intertask_interface.h"
-
-
-
-#include "assertions.h"
-
-//-------------------------------
-#define MSC_MAX_QUEUE_ELEMENTS    1024
-#define MSC_MAX_PROTO_NAME_LENGTH 16
-#define MSC_MAX_MESSAGE_LENGTH    512
-
-//-------------------------------
-
-FILE    *g_msc_fd;
-char     g_msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
-
-msc_interface_t msc_interface;
-
-typedef unsigned long msc_message_number_t;
-typedef struct msc_queue_item_s {
-  char       *message_str;
-  uint32_t    message_str_size;
-  uint8_t    *message_bin;
-  uint32_t    message_bin_size;
-} msc_queue_item_t;
-
-msc_message_number_t             g_message_number = 0;
-struct lfds611_queue_state      *g_msc_message_queue_p = NULL;
-struct lfds611_stack_state      *g_msc_memory_stack_p  = NULL;
-
-//------------------------------------------------------------------------------
-void *msc_task(void *args_p)
-//------------------------------------------------------------------------------
-{
-  MessageDef         *received_message_p    = NULL;
-  //  const char         *msg_name = NULL;
-  //  instance_t          instance  = 0;
-  long                timer_id;
-  itti_mark_task_ready(TASK_MSC);
-  msc_start_use();
-  timer_setup(0, // seconds
-              50000, // usec
-              TASK_MSC,
-              INSTANCE_DEFAULT,
-              TIMER_PERIODIC,
-              NULL,
-              &timer_id);
-
-  while(1) {
-    itti_receive_msg(TASK_MSC, &received_message_p);
-
-    if (received_message_p != NULL) {
-      //      msg_name = ITTI_MSG_NAME (received_message_p);
-      //      instance = ITTI_MSG_DESTINATION_INSTANCE (received_message_p);
-      switch (ITTI_MSG_ID(received_message_p)) {
-        case TIMER_HAS_EXPIRED: {
-          msc_flush_messages();
-        }
-        break;
-
-        case TERMINATE_MESSAGE: {
-          fprintf(stderr, " *** Exiting MSC thread\n");
-          timer_remove(timer_id);
-          msc_end();
-          itti_exit_task();
-        }
-        break;
-
-        case MESSAGE_TEST: {
-        }
-        break;
-
-        default: {
-        }
-        break;
-      }
-    }
-  }
-
-  fprintf(stderr, "Task MSC exiting\n");
-  return NULL;
-}
-
-//------------------------------------------------------------------------------
-int msc_init(const msc_env_t envP, const int max_threadsP)
-//------------------------------------------------------------------------------
-{
-  int   i;
-  int   rv;
-  void *pointer_p;
-  char  msc_filename[256];
-  fprintf(stderr, "Initializing MSC logs\n");
-  rv = snprintf(msc_filename, 256, "/tmp/openair.msc.%i.log", envP); // TODO NAME
-
-  if ((0 >= rv) || (256 < rv)) {
-    fprintf(stderr, "Error in MSC log file name");
-  }
-
-  g_msc_fd = fopen(msc_filename,"w");
-  AssertFatal(g_msc_fd != NULL, "Could not open MSC log file %s : %s", msc_filename, strerror(errno));
-  rv = lfds611_stack_new(&g_msc_memory_stack_p, (lfds611_atom_t)max_threadsP + 2);
-
-  if (0 >= rv) {
-    AssertFatal (0, "lfds611_stack_new failed!\n");
-  }
-
-  rv = lfds611_queue_new(&g_msc_message_queue_p, (lfds611_atom_t)MSC_MAX_QUEUE_ELEMENTS);
-  AssertFatal (rv, "lfds611_queue_new failed!\n");
-  AssertFatal (g_msc_message_queue_p != NULL, "g_msc_message_queue_p is NULL!\n");
-  msc_start_use();
-
-  for (i=0; i < max_threadsP * 30; i++) {
-    pointer_p = malloc(MSC_MAX_MESSAGE_LENGTH);
-    AssertFatal (pointer_p, "malloc failed!\n");
-    rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, pointer_p );
-    AssertFatal (rv, "lfds611_stack_guaranteed_push failed for item %d\n", i);
-  }
-
-  for (i = MIN_MSC_PROTOS; i < MAX_MSC_PROTOS; i++) {
-    switch (i) {
-      case MSC_IP_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_IP_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if (envP == MSC_E_UTRAN_LIPA) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_NAS_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_RRC_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RRC_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_PDCP_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PDCP_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_RLC_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RLC_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_MAC_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MAC_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_PHY_UE:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PHY_UE");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_PHY_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PHY_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_MAC_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MAC_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_RLC_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RLC_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_PDCP_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PDCP_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_RRC_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RRC_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_S1AP_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S1AP_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_MME_GW)  || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_GTPU_ENB:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "GTPU_ENB");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_GTPU_SGW:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "GTPU_SGW");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_S1AP_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S1AP_MME");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_MME) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_MMEAPP_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MME_APP");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_NAS_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_MME");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        msc_log_declare_proto(i);
-        break;
-
-      case MSC_NAS_EMM_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_EMM");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_NAS_ESM_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_ESM");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_SP_GWAPP_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "SP_GW_MME");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if (envP == MSC_MME_GW) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_S11_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S11_MME");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if (envP == MSC_MME) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_S6A_MME:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S6A");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-
-      case MSC_HSS:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "HSS");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-
-        if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        }
-
-        break;
-      case MSC_F1AP_CU:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "F1AP_CU");
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
-        //if ((envP == MSC_E_UTRAN) || (envP == MSC_MME_GW)  || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        //}
-        break;
-      case MSC_F1AP_DU:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "F1AP_DU");
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
-        //if ((envP == MSC_E_UTRAN) || (envP == MSC_MME_GW)  || (envP == MSC_MME)) {
-          msc_log_declare_proto(i);
-        //}
-        break;
-      default:
-        rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "UNKNOWN");
-
-        if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {
-          g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;
-        }
-    }
-  }
-
-  rv = itti_create_task (TASK_MSC, msc_task, NULL);
-  AssertFatal (rv == 0, "Create task for MSC failed!\n");
-  fprintf(stderr, "Initializing MSC logs Done\n");
-  return 0;
-}
-
-//------------------------------------------------------------------------------
-void msc_start_use(void)
-//------------------------------------------------------------------------------
-{
-  lfds611_queue_use(g_msc_message_queue_p);
-  lfds611_stack_use(g_msc_memory_stack_p);
-}
-
-
-//------------------------------------------------------------------------------
-void msc_flush_messages(void)
-//------------------------------------------------------------------------------
-{
-  int               rv;
-  msc_queue_item_t *item_p = NULL;
-
-  while ((rv = lfds611_queue_dequeue( g_msc_message_queue_p, (void **)&item_p )) == 1) {
-    if (NULL != item_p->message_str) {
-      fputs(item_p->message_str, g_msc_fd);
-      // TODO BIN DATA
-      rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, item_p->message_str );
-    }
-
-    // TODO FREE BIN DATA
-    free(item_p);
-  }
-
-  fflush(g_msc_fd);
-}
-
-
-//------------------------------------------------------------------------------
-void msc_end(void)
-//------------------------------------------------------------------------------
-{
-  int rv;
-
-  if (NULL != g_msc_fd ) {
-    msc_flush_messages();
-    rv = fflush(g_msc_fd);
-
-    if (rv != 0) {
-      fprintf(stderr, "Error while flushing stream of MSC log file: %s", strerror(errno));
-    }
-
-    rv = fclose(g_msc_fd);
-
-    if (rv != 0) {
-      fprintf(stderr, "Error while closing MSC log file: %s", strerror(errno));
-    }
-  }
-}
-
-//------------------------------------------------------------------------------
-void msc_log_declare_proto(
-  const msc_proto_t  protoP
-)
-//------------------------------------------------------------------------------
-{
-  int               rv             = 0;
-  msc_queue_item_t *new_item_p     = NULL;
-  char             *char_message_p = NULL;
-
-  if ((MIN_MSC_PROTOS <= protoP) && (MAX_MSC_PROTOS > protoP)) {
-    // may be build a memory pool for that also ?
-    new_item_p = malloc(sizeof(msc_queue_item_t));
-
-    if (NULL != new_item_p) {
-      rv = lfds611_stack_pop(g_msc_memory_stack_p, (void **)&char_message_p);
-
-      if (0 == rv) {
-        msc_flush_messages();
-        rv = lfds611_stack_pop(g_msc_memory_stack_p, (void **)&char_message_p);
-      }
-
-      if (1 == rv) {
-        rv = snprintf(char_message_p, MSC_MAX_MESSAGE_LENGTH, "%"PRIu64" [PROTO] %d %s\n", __sync_fetch_and_add (&g_message_number, 1), protoP, &g_msc_proto2str[protoP][0]);
-
-        if (0 > rv) {
-          fprintf(stderr, "Error while declaring new protocol in MSC: %s", strerror(errno));
-        }
-
-        new_item_p->message_str       = char_message_p;
-        new_item_p->message_str_size  = rv;
-        new_item_p->message_bin       = NULL;
-        new_item_p->message_bin_size  = 0;
-        rv = lfds611_queue_enqueue( g_msc_message_queue_p, new_item_p );
-
-        if (0 == rv) {
-          rv = lfds611_queue_guaranteed_enqueue(g_msc_message_queue_p, new_item_p );
-
-          if (0 == rv) {
-            fprintf(stderr, "Error while lfds611_queue_guaranteed_enqueue message %s in MSC", char_message_p);
-            rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
-            free(new_item_p);
-          }
-        }
-
-        return;
-      } else {
-        fprintf(stderr, "Error while lfds611_stack_pop()\n");
-      }
-
-      free(new_item_p);
-    } else {
-      fprintf(stderr, "Error while malloc in MSC");
-    }
-  }
-}
-//------------------------------------------------------------------------------
-void msc_log_event(
-  const msc_proto_t  protoP,
-  char *format, ...)
-//------------------------------------------------------------------------------
-{
-  va_list           args;
-  int               rv;
-  int               rv2;
-  msc_queue_item_t *new_item_p     = NULL;
-  char             *char_message_p = NULL;
-
-  if ((MIN_MSC_PROTOS > protoP) || (MAX_MSC_PROTOS <= protoP)) {
-    return;
-  }
-
-  new_item_p = malloc(sizeof(msc_queue_item_t));
-
-  if (NULL != new_item_p) {
-    rv = lfds611_stack_pop(g_msc_memory_stack_p, (void **)&char_message_p);
-
-    if (0 == rv) {
-      msc_flush_messages();
-      rv = lfds611_stack_pop(g_msc_memory_stack_p, (void **)&char_message_p);
-    }
-
-    if (1 == rv) {
-      rv = snprintf(char_message_p, MSC_MAX_MESSAGE_LENGTH, "%"PRIu64" [EVENT] %d ",  __sync_fetch_and_add (&g_message_number, 1), protoP);
-
-      if ((0 > rv) || (MSC_MAX_MESSAGE_LENGTH < rv)) {
-        fprintf(stderr, "Error while logging MSC event : %s", &g_msc_proto2str[protoP][0]);
-        goto error_event;
-      }
-
-      va_start(args, format);
-      rv2 = vsnprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv,  format, args);
-      va_end(args);
-
-      if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
-        fprintf(stderr, "Error while logging MSC event : %s", &g_msc_proto2str[protoP][0]);
-        goto error_event;
-      }
-
-      rv += rv2;
-      rv2 = snprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv, "\n");
-
-      if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
-        fprintf(stderr, "Error while logging MSC event : %s", &g_msc_proto2str[protoP][0]);
-        goto error_event;
-      }
-
-      rv += rv2;
-      new_item_p->message_str       = char_message_p;
-      new_item_p->message_str_size  = rv;
-      new_item_p->message_bin       = NULL;
-      new_item_p->message_bin_size  = 0;
-      rv = lfds611_queue_enqueue( g_msc_message_queue_p, new_item_p );
-
-      if (0 == rv) {
-        fprintf(stderr, "Error while lfds611_queue_guaranteed_enqueue message %s in MSC", char_message_p);
-        rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
-        free(new_item_p);
-      }
-    } else {
-      fprintf(stderr, "Error while lfds611_stack_pop()\n");
-    }
-  }
-
-  return;
-error_event:
-  rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
-  free(new_item_p);
-}
-//------------------------------------------------------------------------------
-void msc_log_message(
-  const char *const message_operationP,
-  const msc_proto_t  proto1P,
-  const msc_proto_t  proto2P,
-  const uint8_t *const bytesP,
-  const unsigned int num_bytes,
-  char *format, ...)
-//------------------------------------------------------------------------------
-{
-  va_list           args;
-  uint64_t          mac = 0; // TO DO mac on bytesP param
-  int               rv;
-  int               rv2;
-  msc_queue_item_t *new_item_p     = NULL;
-  char             *char_message_p = NULL;
-
-  if ((MIN_MSC_PROTOS > proto1P) || (MAX_MSC_PROTOS <= proto1P) ||
-      (MIN_MSC_PROTOS > proto2P)   || (MAX_MSC_PROTOS <= proto2P)  ) {
-    return;
-  }
-
-  new_item_p = malloc(sizeof(msc_queue_item_t));
-
-  if (NULL != new_item_p) {
-    rv = lfds611_stack_pop(g_msc_memory_stack_p, (void **)&char_message_p);
-
-    if (0 == rv) {
-      msc_flush_messages();
-      rv = lfds611_stack_pop(g_msc_memory_stack_p, (void **)&char_message_p);
-    }
-
-    if (1 == rv) {
-      rv = snprintf(char_message_p, MSC_MAX_MESSAGE_LENGTH, "%"PRIu64" [MESSAGE] %d %s %d %"PRIu64" ",
-                    __sync_fetch_and_add (&g_message_number, 1), proto1P, message_operationP, proto2P, mac);
-
-      if ((0 > rv) || (MSC_MAX_MESSAGE_LENGTH < rv)) {
-        fprintf(stderr, "Error while logging MSC message : %s/%s", &g_msc_proto2str[proto1P][0], &g_msc_proto2str[proto2P][0]);
-        goto error_event;
-      }
-
-      va_start(args, format);
-      rv2 = vsnprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv,  format, args);
-      va_end(args);
-
-      if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
-        fprintf(stderr, "Error while logging MSC message : %s/%s", &g_msc_proto2str[proto1P][0], &g_msc_proto2str[proto2P][0]);
-        goto error_event;
-      }
-
-      rv += rv2;
-      rv2 = snprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv, "\n");
-
-      if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
-        fprintf(stderr, "Error while logging MSC message : %s/%s", &g_msc_proto2str[proto1P][0], &g_msc_proto2str[proto2P][0]);
-        goto error_event;
-      }
-
-      rv += rv2;
-      new_item_p->message_str       = char_message_p;
-      new_item_p->message_str_size  = rv;
-      new_item_p->message_bin       = NULL; // TO DO
-      new_item_p->message_bin_size  = 0;    // TO DO
-      rv = lfds611_queue_enqueue( g_msc_message_queue_p, new_item_p );
-
-      if (0 == rv) {
-        fprintf(stderr, "Error while lfds611_queue_guaranteed_enqueue message %s in MSC", char_message_p);
-        rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
-        free(new_item_p);
-      }
-    } else {
-      fprintf(stderr, "Error while lfds611_stack_pop()\n");
-      msc_flush_messages();
-    }
-  }
-
-  return;
-error_event:
-  rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
-  free(new_item_p);
-}
-
-//------------------------------------------------------------------------------
-//  function called when oai loader loads the msc shared lib
-int msc_autoinit(msc_interface_t *msc_interface)
-//------------------------------------------------------------------------------
-{
-  msc_interface->msc_init = msc_init;
-  msc_interface->msc_start_use = msc_start_use;
-  msc_interface->msc_end = msc_end;
-  msc_interface->msc_log_event = msc_log_event;
-  msc_interface->msc_log_message = msc_log_message;
-  msc_interface->msc_loaded = 1;
-  return 0;
-}
diff --git a/common/utils/msc/msc.h b/common/utils/msc/msc.h
deleted file mode 100644
index adb0d9e657e5ef7a54ad433938d9c372ef225ec3..0000000000000000000000000000000000000000
--- a/common/utils/msc/msc.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-#ifndef MSC_H_
-#define MSC_H_
-#include <stdarg.h>
-#include <stdint.h>
-
-typedef enum {
-  MIN_MSC_ENV = 0,
-  MSC_E_UTRAN = MIN_MSC_ENV,
-  MSC_E_UTRAN_LIPA,
-  MSC_MME_GW,
-  MSC_MME,
-  MSC_SP_GW,
-  MAX_MSC_ENV
-} msc_env_t;
-
-
-typedef enum {
-  MIN_MSC_PROTOS = 0,
-  MSC_IP_UE = MIN_MSC_PROTOS,
-  MSC_NAS_UE,
-  MSC_RRC_UE,
-  MSC_PDCP_UE,
-  MSC_RLC_UE,
-  MSC_MAC_UE,
-  MSC_PHY_UE,
-  MSC_PHY_ENB,
-  MSC_MAC_ENB,
-  MSC_RLC_ENB,
-  MSC_PDCP_ENB,
-  MSC_PDCP_GNB,
-  MSC_RRC_ENB,
-  MSC_RRC_GNB,
-  MSC_IP_ENB,
-  MSC_S1AP_ENB,
-  MSC_NGAP_GNB,
-  MSC_GTPU_ENB,
-  MSC_GTPU_GNB,
-  MSC_GTPU_SGW,
-  MSC_S1AP_MME,
-  MSC_NGAP_AMF,
-  MSC_MMEAPP_MME,
-  MSC_NAS_MME,
-  MSC_NAS_EMM_MME,
-  MSC_NAS_ESM_MME,
-  MSC_SP_GWAPP_MME,
-  MSC_S11_MME,
-  MSC_S6A_MME,
-  MSC_HSS,
-  MSC_F1AP_CU,
-  MSC_F1AP_DU,
-  MSC_X2AP_SRC_ENB,
-  MSC_X2AP_TARGET_ENB,
-  MAX_MSC_PROTOS,
-} msc_proto_t;
-
-
-
-// Access stratum
-#define MSC_AS_TIME_FMT "%05u:%02u"
-
-#define MSC_AS_TIME_ARGS(CTXT_Pp) \
-  (CTXT_Pp)->frame, \
-  (CTXT_Pp)->subframe
-
-typedef int(*msc_init_t)(const msc_env_t, const int );
-typedef void(*msc_start_use_t)(void );
-typedef void(*msc_end_t)(void);
-typedef void(*msc_log_event_t)(const msc_proto_t,char *, ...);
-typedef void(*msc_log_message_t)(const char    *const, const msc_proto_t, const msc_proto_t,
-                                 const uint8_t *const, const unsigned int, char *, ...);
-typedef struct msc_interface {
-  int               msc_loaded;
-  msc_init_t        msc_init;
-  msc_start_use_t   msc_start_use;
-  msc_end_t         msc_end;
-  msc_log_event_t   msc_log_event;
-  msc_log_message_t msc_log_message;
-} msc_interface_t;
-
-#ifdef MSC_LIBRARY
-int msc_init(const msc_env_t envP, const int max_threadsP);
-void msc_start_use(void);
-void msc_flush_messages(void);
-void msc_end(void);
-void msc_log_declare_proto(const msc_proto_t  protoP);
-void msc_log_event(const msc_proto_t  protoP,char *format, ...);
-void msc_log_message(
-  const char *const message_operationP,
-  const msc_proto_t  receiverP,
-  const msc_proto_t  senderP,
-  const uint8_t *const bytesP,
-  const unsigned int num_bytes,
-  char *format, ...);
-
-#else
-
-#define MESSAGE_CHART_GENERATOR  msc_interface.msc_loaded
-
-extern msc_interface_t msc_interface;
-#define MSC_INIT(arg1,arg2)                                     if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2)
-#define MSC_START_USE                                           if(msc_interface.msc_loaded) msc_interface.msc_start_use
-#define MSC_END                                                 if(msc_interface.msc_loaded) msc_interface.msc_end
-#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...)               if(msc_interface.msc_loaded) msc_interface.msc_log_event(mScPaRaMs, fORMAT, ##aRGS)
-#define MSC_LOG_RX_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...)           if(msc_interface.msc_loaded) msc_interface.msc_log_message("<-",rECEIVER, sENDER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
-#define MSC_LOG_RX_DISCARDED_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("x-",rECEIVER, sENDER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
-#define MSC_LOG_TX_MESSAGE(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...)           if(msc_interface.msc_loaded) msc_interface.msc_log_message("->",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
-#define MSC_LOG_TX_MESSAGE_FAILED(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...)    if(msc_interface.msc_loaded) msc_interface.msc_log_message("-x",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
-#endif
-
-#endif
diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c
index d823fcc1c45ed0e8e413c3f2400e65cd3bcecf6d..b0a6266d349ce3328cbf6161cd6aab136861eb36 100644
--- a/common/utils/nr/nr_common.c
+++ b/common/utils/nr/nr_common.c
@@ -231,7 +231,6 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx) {
   }
 }
 
-
 void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset) {
 
   uint8_t count=0, start=0, start_set=0;
@@ -483,6 +482,7 @@ int get_nr_table_idx(int nr_bandP, uint8_t scs_index) {
   return i;
 }
 
+
 int get_subband_size(int NPRB,int size) {
   // implements table  5.2.1.4-2 from 36.214
   //
diff --git a/common/utils/ocp_itti/intertask_interface.h b/common/utils/ocp_itti/intertask_interface.h
index 3188e5889f0d2b43d47c4a1b0e67c620e7a09c18..e595311b26cc90720653e39318127cd45c757ba0 100644
--- a/common/utils/ocp_itti/intertask_interface.h
+++ b/common/utils/ocp_itti/intertask_interface.h
@@ -256,8 +256,8 @@ typedef struct IttiMsgText_s {
 #include <openair3/MME_APP/mme_app.h>
 //#include <proto.h>
 
-#include <openair3/GTPV1-U/gtpv1u_eNB_task.h>
-#include <openair3/GTPV1-U/gtpv1u_gNB_task.h>
+#include <openair3/ocp-gtpu/gtpv1u_eNB_task.h>
+#include <openair3/ocp-gtpu/gtpv1u_gNB_task.h>
 void *rrc_enb_process_itti_msg(void *);
 #include <openair3/SCTP/sctp_eNB_task.h>
 #include <openair3/NGAP/ngap_gNB.h>
@@ -338,10 +338,7 @@ void *rrc_enb_process_msg(void *);
   TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED,  200, NULL, NULL)  \
   TASK_DEF(TASK_NAS_UE,   TASK_PRIORITY_MED,  200, NULL, NULL)  \
   TASK_DEF(TASK_RAL_UE,   TASK_PRIORITY_MED,  200, NULL, NULL)  \
-  TASK_DEF(TASK_MSC,      TASK_PRIORITY_MED,  200, NULL, NULL)\
   TASK_DEF(TASK_GTPV1_U,  TASK_PRIORITY_MED,  1000,NULL, NULL)\
-  TASK_DEF(OCP_GTPV1_U,  TASK_PRIORITY_MED,  1000,NULL, NULL)\
-  TASK_DEF(TASK_UDP,      TASK_PRIORITY_MED,  1000, NULL, NULL)\
   TASK_DEF(TASK_CU_F1,    TASK_PRIORITY_MED,  200, NULL, NULL) \
   TASK_DEF(TASK_DU_F1,    TASK_PRIORITY_MED,  200, NULL, NULL) \
   TASK_DEF(TASK_RRC_UE_SIM,   TASK_PRIORITY_MED,  200, NULL, NULL)  \
@@ -560,7 +557,6 @@ MessageDef *itti_alloc_new_message_sized(
    This function should be called from the main thread after having created all ITTI tasks.
  **/
 void itti_wait_tasks_end(void);
-#define  ADDED_QUEUES_MAX 10 // Fix me: MSC component too hard to understand, we keep room for 10 queues created dynamically
 void itti_set_task_real_time(task_id_t task_id);
 
 /** \brief Send a termination message to all tasks.
diff --git a/common/utils/telnetsrv/DOC/telnetlog.md b/common/utils/telnetsrv/DOC/telnetlog.md
index 36c5cfb3486d5ff79efebb8921860ed4f185d1a3..cb008fc8bb5b47a7537f2b744938c96e69942acf 100644
--- a/common/utils/telnetsrv/DOC/telnetlog.md
+++ b/common/utils/telnetsrv/DOC/telnetlog.md
@@ -62,7 +62,6 @@ component                 verbosity  level  enabled
 16              PERF:    medium      info  N
 17               OIP:    medium      info  N
 18               CLI:    medium      info  N
-19               MSC:    medium      info  N
 20               OCM:    medium      info  N
 21               UDP:    medium      info  N
 22            GTPV1U:    medium      info  N
diff --git a/configuration/bladeRF/enb-band7-5mhz.conf b/configuration/bladeRF/enb-band7-5mhz.conf
index 9d192075223ebd1ad1a6d525ec39e167946e18b6..985f4eb378cbaa17fe5b026b5630cb4c38c85e08 100644
--- a/configuration/bladeRF/enb-band7-5mhz.conf
+++ b/configuration/bladeRF/enb-band7-5mhz.conf
@@ -206,19 +206,12 @@ eNBs =
     log_config : 
     {
 	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
 	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="debug"; 
-    	rlc_log_verbosity                     ="high";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
    
   }
@@ -267,17 +260,10 @@ RUs = (
     log_config : 
     {
 	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
 	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="info"; 
-    	rlc_log_verbosity                     ="high";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
diff --git a/doc/SW_archi.md b/doc/SW_archi.md
index 0e77cfa580afa5647df6173fc9458adef0f23f20..7648fb2e167ece0f133013e7339685b8de6674d8 100644
--- a/doc/SW_archi.md
+++ b/doc/SW_archi.md
@@ -369,7 +369,7 @@ gtpv1u_create_s1u_tunnel(), delete tunnel, ... functions are called inside the o
 # New GTP
 ## initialization
 
-ocp_gtpv1uTask(): this creates only the thread, doesn't configure anything
+gtpv1uTask(): this creates only the thread, doesn't configure anything
 gtpv1Init(): creates a listening socket to Linux for a given reception and select a local IP address
 
 ## newGtpuCreateTunnel()   
diff --git a/doc/testing_gnb_w_cots_ue_resources/enb.conf b/doc/testing_gnb_w_cots_ue_resources/enb.conf
index a6bbd98bda359b47c0d817d52245d8588b09565a..027b6f2499e21d1031dc6f318c798bc8219b4b12 100755
--- a/doc/testing_gnb_w_cots_ue_resources/enb.conf
+++ b/doc/testing_gnb_w_cots_ue_resources/enb.conf
@@ -206,19 +206,12 @@ eNBs =
     log_config : 
     {
 	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
 	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="debug"; 
-    	rlc_log_verbosity                     ="high";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
    
   }
@@ -267,17 +260,10 @@ RUs = (
     log_config : 
     {
 	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
 	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="info"; 
-    	rlc_log_verbosity                     ="high";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
diff --git a/doc/testing_gnb_w_cots_ue_resources/gnb.conf b/doc/testing_gnb_w_cots_ue_resources/gnb.conf
index aae22a92bac58dce87a8ddf94324f04469555243..c96d2074456e2db36880f9faadb10468d1d33dfd 100755
--- a/doc/testing_gnb_w_cots_ue_resources/gnb.conf
+++ b/doc/testing_gnb_w_cots_ue_resources/gnb.conf
@@ -258,18 +258,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/doc/testing_gnb_w_cots_ue_resources/oai_enb.log b/doc/testing_gnb_w_cots_ue_resources/oai_enb.log
index 9b9de24a86e8e29de56ba06007d1cdfc0c833843..7356c0c88d776f95eeb581fef47eaca6caa7d1bc 100755
--- a/doc/testing_gnb_w_cots_ue_resources/oai_enb.log
+++ b/doc/testing_gnb_w_cots_ue_resources/oai_enb.log
@@ -62,7 +62,6 @@ ITTI init, useMME: 1
 [TMR]   Starting itti queue: TASK_RRC_UE as task 31
 [TMR]   Starting itti queue: TASK_NAS_UE as task 32
 [TMR]   Starting itti queue: TASK_RAL_UE as task 33
-[TMR]   Starting itti queue: TASK_MSC as task 34
 [TMR]   Starting itti queue: TASK_GTPV1_U as task 35
 [TMR]   Starting itti queue: TASK_UDP as task 36
 [TMR]   Starting itti queue: TASK_CU_F1 as task 37
diff --git a/doc/testing_gnb_w_cots_ue_resources/oai_gnb.log b/doc/testing_gnb_w_cots_ue_resources/oai_gnb.log
index 37b3c105165a1638f2faca61ad17cda578ce3a36..3c76c0d0d68b4a3b74ba5aafce17c4687aa4ac82 100755
--- a/doc/testing_gnb_w_cots_ue_resources/oai_gnb.log
+++ b/doc/testing_gnb_w_cots_ue_resources/oai_gnb.log
@@ -58,7 +58,6 @@ CPU Freq is 3.092986
 [TMR]   Starting itti queue: TASK_RRC_UE as task 31
 [TMR]   Starting itti queue: TASK_NAS_UE as task 32
 [TMR]   Starting itti queue: TASK_RAL_UE as task 33
-[TMR]   Starting itti queue: TASK_MSC as task 34
 [TMR]   Starting itti queue: TASK_GTPV1_U as task 35
 [TMR]   Starting itti queue: TASK_UDP as task 36
 [TMR]   Starting itti queue: TASK_CU_F1 as task 37
diff --git a/executables/nr-softmodem-common.h b/executables/nr-softmodem-common.h
index 45d7852adc134fb6de30b5b60d598563ff90097d..47fd816db5a95f4ac5cd642f109f1af8904c8c5b 100644
--- a/executables/nr-softmodem-common.h
+++ b/executables/nr-softmodem-common.h
@@ -104,7 +104,6 @@
 #define CONFIG_HLP_LOGL          "Set the global log level, valid options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n"
 #define CONFIG_HLP_LOGV          "Set the global log verbosity \n"
 #define CONFIG_HLP_TELN          "Start embedded telnet server \n"
-#define CONFIG_HLP_MSC           "Enable the MSC tracing utility \n"
 #define CONFIG_HLP_SNR           "Set average SNR in dB (for --siml1 option)\n"
 #define CONFIG_HLP_NOS1          "Disable s1 interface\n"
 #define CONFIG_HLP_NOKRNMOD      "(noS1 only): Use tun instead of namesh module \n"
@@ -112,13 +111,11 @@
 /*                                            command line parameters for LOG utility                                             */
 /*   optname         helpstr          paramflags          XXXptr                     defXXXval            type           numelt   */
 /*--------------------------------------------------------------------------------------------------------------------------------*/
-#define START_MSC                softmodem_params.start_msc
 #define CMDLINE_LOGPARAMS_DESC_NR {  \
     {"R" ,           CONFIG_HLP_FLOG, 0,                  uptr:&online_log_messages, defintval:1,         TYPE_INT,      0},       \
     {"g" ,           CONFIG_HLP_LOGL, 0,                  uptr:&glog_level,          defintval:0,         TYPE_UINT,     0},       \
     {"G" ,           CONFIG_HLP_LOGV, 0,                  uptr:&glog_verbosity,      defintval:0,         TYPE_UINT16,   0},       \
     {"telnetsrv",    CONFIG_HLP_TELN, PARAMFLAG_BOOL,     uptr:&start_telnetsrv,     defintval:0,         TYPE_UINT,     0},       \
-    {"msc",          CONFIG_HLP_MSC,  PARAMFLAG_BOOL,     uptr:&START_MSC,           defintval:0,         TYPE_UINT,     0},       \
   }
 
 #define CMDLINE_ONLINELOG_IDX     0
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index 5f579196455bd3afce45f6c989211cb917b2c295..7410e303b1a22eca1cf01f6df51d3a5210977cae 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -29,8 +29,6 @@
 #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
 #include <common/utils/assertions.h>
 
-#include "msc.h"
-
 #include "PHY/types.h"
 #include "common/ran_context.h"
 
@@ -365,7 +363,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
 
     //Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario
     if(is_x2ap_enabled() || AMF_MODE_ENABLED) {
-      if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
+      if (itti_create_task (TASK_GTPV1_U, &gtpv1uTask, NULL) < 0) {
         LOG_E(GTPU, "Create task for GTPV1U failed\n");
         return -1;
       }
@@ -589,48 +587,20 @@ static  void wait_nfapi_init(char *thread_name) {
 }
 
 void init_pdcp(void) {
+  uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
+    PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT:
+    LINK_ENB_PDCP_TO_GTPV1U_BIT;
+  
   if (!get_softmodem_params()->nsa) {
     if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
-      //pdcp_layer_init();
-      uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
-                              (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
-
-      if (IS_SOFTMODEM_NOS1) {
-        printf("IS_SOFTMODEM_NOS1 option enabled \n");
-        pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
-      }
-
       nr_pdcp_module_init(pdcp_initmask, 0);
-
-      if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
-        LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
-        pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
-      } else {
-        LOG_I(PDCP, "node is gNB \n");
-        pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
-        pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
-      }
-    } else {
-      LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
-      pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
     }
   } else {
     pdcp_layer_init();
-    uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
-                             (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
-
-    if (IS_SOFTMODEM_NOS1) {
-      printf("IS_SOFTMODEM_NOS1 option enabled \n");
-      pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
-    }
-
     nr_pdcp_module_init(pdcp_initmask, 0);
-    pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
-    pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
   }
 }
 
-
 int main( int argc, char **argv ) {
   int ru_id, CC_id = 0;
   start_background_system();
@@ -684,7 +654,6 @@ int main( int argc, char **argv ) {
   cpuf=get_cpu_freq_GHz();
   itti_init(TASK_MAX, tasks_info);
   // initialize mscgen log after ITTI
-  MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
   init_opt();
   if(PDCP_USE_NETLINK && !IS_SOFTMODEM_NOS1) {
     netlink_init();
diff --git a/executables/nr-softmodem.h b/executables/nr-softmodem.h
index 4190a6074bde182afcacec428a31dc4a84f57471..834e89b40390f242af8cb3936d79888a52667f2d 100644
--- a/executables/nr-softmodem.h
+++ b/executables/nr-softmodem.h
@@ -5,7 +5,6 @@
 
 #include "flexran_agent.h"
 #include "PHY/defs_gNB.h"
-#include "proto_agent.h"
 
 #define DEFAULT_DLF 2680000000
 
@@ -65,5 +64,6 @@ void init_gNB_afterRU(void);
 
 extern int stop_L1L2(module_id_t gnb_id);
 extern int restart_L1L2(module_id_t gnb_id);
+void init_pdcp(void);
 
 #endif
diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 0a59ba3b6aebc34ceaa015987463cf3fd3c0d179..d1b26601b4d61506879c5d75b5c99f4e9d07fd90 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -18,7 +18,8 @@
  * For more information about the OpenAirInterface (OAI) Software Alliance:
  *      contact@openairinterface.org
  */
-
+#define _GNU_SOURCE 
+#include <pthread.h>
 #include <openair1/PHY/impl_defs_top.h>
 #include "executables/nr-uesoftmodem.h"
 #include "PHY/phy_extern_nr_ue.h"
diff --git a/executables/ocp-gnb.c b/executables/ocp-gnb.c
index 462a07c7073884df12af47c2830efa59abe9bc32..23fd3ae1329737e44470eeb1223632f083cdb0b6 100644
--- a/executables/ocp-gnb.c
+++ b/executables/ocp-gnb.c
@@ -93,7 +93,6 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
 // not used but needed for link
 openair0_config_t openair0_cfg[MAX_CARDS];
 uint16_t slot_ahead=6;
-msc_interface_t msc_interface;
 AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
 AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
 int flexran_agent_start(mid_t mod_id) {
diff --git a/executables/softmodem-common.c b/executables/softmodem-common.c
index 3e20081b18ee32de4bdd2c8bdca47ca1eac4507e..12c60e98fdf17446583e96da7ba9938dce09ff4e 100644
--- a/executables/softmodem-common.c
+++ b/executables/softmodem-common.c
@@ -45,7 +45,6 @@
 static softmodem_params_t softmodem_params;
 char *parallel_config=NULL;
 char *worker_config=NULL;
-msc_interface_t msc_interface;
 int usrp_tx_thread = 0;
 
 uint8_t nfapi_mode=0;
diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h
index 9aca677473566301b97a45d51635496ac4a0407d..16014c60249de31967f70c6d22c6d264c0520515 100644
--- a/executables/softmodem-common.h
+++ b/executables/softmodem-common.h
@@ -171,21 +171,17 @@ extern int usrp_tx_thread;
 #define CONFIG_HLP_NSA           "Enable NSA mode \n"
 #define CONFIG_HLP_FLOG          "Enable online log \n"
 #define CONFIG_HLP_LOGL          "Set the global log level, valid options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n"
-#define CONFIG_HLP_LOGV          "Set the global log verbosity \n"
 #define CONFIG_HLP_TELN          "Start embedded telnet server \n"
-#define CONFIG_HLP_MSC           "Enable the MSC tracing utility \n"
 #define CONFIG_FLOG_OPT          "R"
 #define CONFIG_LOGL_OPT          "g"
 /*-------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*                                            command line parameters for LOG utility                                                              */
 /*   optname                        helpstr       paramflags        XXXptr                              defXXXval            type           numelt */
 /*-------------------------------------------------------------------------------------------------------------------------------------------------*/
-#define START_MSC                softmodem_params.start_msc
 #define CMDLINE_LOGPARAMS_DESC {  \
     {CONFIG_FLOG_OPT ,           CONFIG_HLP_FLOG, 0,                uptr:&online_log_messages,           defintval:1,         TYPE_INT,      0},     \
     {CONFIG_LOGL_OPT ,           CONFIG_HLP_LOGL, 0,                uptr:&glog_level,                    defintval:0,         TYPE_UINT,     0},     \
 	{"telnetsrv",                CONFIG_HLP_TELN, PARAMFLAG_BOOL,   uptr:&start_telnetsrv,               defintval:0,         TYPE_UINT,     0},     \
-    {"msc",                      CONFIG_HLP_MSC,  PARAMFLAG_BOOL,   uptr:&START_MSC,                     defintval:0,         TYPE_UINT,     0},     \
 	{"log-mem",                  NULL,            0,                strptr:(char **)&logmem_filename,    defstrval:NULL,      TYPE_STRING,   0},     \
 	{"telnetclt",                NULL,            0,                uptr:&start_telnetclt,               defstrval:NULL,      TYPE_UINT,     0},     \
   }
@@ -250,7 +246,6 @@ typedef struct {
   int            chain_offset;
   int            numerology;
   int            band;
-  unsigned int   start_msc;
   uint32_t       clock_source;
   uint32_t       timing_source;
   int            hw_timing_advance;
diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
index 3b429a5e84e30edd094246b44bf2b65b5e15fff7..dac75bd6ec542d5b654fb59a46adae660ae59721 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
@@ -444,7 +444,7 @@ typedef struct {
   uint8_t pucch_resource_id;
   uint8_t pdsch_to_harq_feedback_time_ind;
   uint8_t n_dmrs_cdm_groups;
-  uint8_t dmrs_ports[10];
+  uint16_t dmrs_ports;
   uint8_t n_front_load_symb;
   uint8_t tci_state;
   fapi_nr_dl_srs_config_t srs_config;
diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c
index 308a059d51417cc760318d98da2419e25ffb99b8..c92d926a8f321f18037392a5659ab60dc9eb605c 100644
--- a/openair1/PHY/INIT/lte_init.c
+++ b/openair1/PHY/INIT/lte_init.c
@@ -415,10 +415,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
         fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
         fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset
        );
-  LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02"PRIu8"][]\n", eNB->Mod_id);
   LOG_I (PHY, "[eNB %" PRIu8 "] Initializing DL_FRAME_PARMS : N_RB_DL %" PRIu8 ", PHICH Resource %d, PHICH Duration %d\n",
          eNB->Mod_id, fp->N_RB_DL, fp->phich_config_common.phich_resource, fp->phich_config_common.phich_duration);
-  LOG_D (PHY, "[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02" PRIu8 "][]\n", eNB->Mod_id);
   crcTableInit();
   lte_gold (fp, eNB->lte_gold_table, fp->Nid_cell);
   generate_pcfich_reg_mapping (fp);
diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c
index 3bf450703cddc6384adcb2bc91035735f7f7f50d..e6b6c828346fa849b0c014953e7d95fa90b3c9fd 100644
--- a/openair1/PHY/INIT/nr_init.c
+++ b/openair1/PHY/INIT/nr_init.c
@@ -104,7 +104,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
 
   load_dftslib();
 
-  LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"PRIu8"][]\n", gNB->Mod_id);
   crcTableInit();
   init_scrambling_luts();
   init_pucch2_luts();
diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c
index 4024ed16172ebf2ae87f7bdb4469458f6d2a7ce1..d032746718b215e190288af832a6815677cc074e 100644
--- a/openair1/PHY/INIT/nr_init_ru.c
+++ b/openair1/PHY/INIT/nr_init_ru.c
@@ -124,32 +124,32 @@ int nr_phy_init_RU(RU_t *ru) {
 		ru->num_gNB,NUMBER_OF_gNB_MAX);
 
     LOG_I(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB);
-
-    if (ru->do_precoding == 1) {
+    if (ru->do_precoding == 1) { 
       int beam_count = 0;
       if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1
+
         for (p=0;p<ru->nb_log_antennas;p++) {
           //if ((fp->L_ssb >> (63-p)) & 0x01)//64 bit-map with the MSB @2⁶³ corresponds to SSB ssb_index 0
             beam_count++;
         }
         AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx));
     
-      for (i=0; i<ru->num_gNB; i++) {
-        int l_ind = 0;
-        for (p=0;p<ru->nb_log_antennas;p++) {
+        for (i=0; i<ru->num_gNB; i++) {
+          int l_ind = 0;
+          for (p=0;p<ru->nb_log_antennas;p++) {
           //if ((fp->L_ssb >> (63-p)) & 0x01)  {
-          ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
-          for (j=0; j<ru->nb_tx; j++) {
-            ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
-            AssertFatal(ru->bw_list[i],"ru->bw_list[%d] is null\n",i);
-            for (re=0; re<fp->ofdm_symbol_size; re++)
-              ru->beam_weights[i][p][j][re] = ru->bw_list[i][l_ind];
-            //printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j);
-            l_ind++;
-          } // for j
+            ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
+            for (j=0; j<ru->nb_tx; j++) {
+              ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
+              AssertFatal(ru->bw_list[i],"ru->bw_list[%d] is null\n",i);
+              for (re=0; re<fp->ofdm_symbol_size; re++)
+                ru->beam_weights[i][p][j][re] = ru->bw_list[i][l_ind];
+              //printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j);
+              l_ind++;
+            } // for j
           //}
-        } // for p
-      } //for i
+          } // for p
+        } //for i
       }
 
       ru->common.beam_id = (uint8_t**)malloc16_clear(ru->nb_tx*sizeof(uint8_t*));
diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c
index b571afe41631da5a307b3e31cce8fd5067cef195..b09e8690f32d95dd5c114990013116e1789c9e58 100644
--- a/openair1/PHY/INIT/nr_init_ue.c
+++ b/openair1/PHY/INIT/nr_init_ue.c
@@ -138,7 +138,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
   int n_scid;
   abstraction_flag = 0;
   LOG_I(PHY, "Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u\n", abstraction_flag, fp->nb_antennas_tx, fp->nb_antennas_rx);
-  //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_gNB_INST);
   phy_init_nr_top(ue);
   // many memory allocation sizes are hard coded
   AssertFatal( fp->nb_antennas_rx <= 4, "hard coded allocation for ue_common_vars->dl_ch_estimates[gNB_id]" );
diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
index c6c89c80be9d415c8181cf32211b16009cb7e7e4..37ef5fb2076b115bbddebd693db007e538b3bfa4 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
@@ -224,21 +224,23 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
     printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %d,nb_layers %d)\n",
 	   start_sc, rel15->StartSymbolIndex, rel15->rbSize, nb_re,rel15->nrOfLayers);
 #endif
-    start_meas(&gNB->dlsch_resource_mapping_stats);
-    for (int ap=0; ap<rel15->nrOfLayers; ap++) {
 
-      // DMRS params for this ap
-      get_Wt(Wt, ap, dmrs_Type);
-      get_Wf(Wf, ap, dmrs_Type);
-      delta = get_delta(ap, dmrs_Type);
-      l_prime = 0; // single symbol ap 0
+    start_meas(&gNB->dlsch_resource_mapping_stats);
+    for (int nl=0; nl<rel15->nrOfLayers; nl++) {
+
+      int dmrs_port = get_dmrs_port(nl,rel15->dmrsPorts);
+      // DMRS params for this dmrs port
+      get_Wt(Wt, dmrs_port, dmrs_Type);
+      get_Wf(Wf, dmrs_port, dmrs_Type);
+      delta = get_delta(dmrs_port, dmrs_Type);
+      l_prime = 0; // single symbol nl 0
       l0 = get_l0(rel15->dlDmrsSymbPos);
       l_overline = l0;
 
 #ifdef DEBUG_DLSCH_MAPPING
       uint8_t dmrs_symbol = l0+l_prime;
-      printf("DMRS Type %d params for ap %d: Wt %d %d \t Wf %d %d \t delta %d \t l_prime %d \t l0 %d\tDMRS symbol %d\n",
-	     1+dmrs_Type,ap, Wt[0], Wt[1], Wf[0], Wf[1], delta, l_prime, l0, dmrs_symbol);
+      printf("DMRS Type %d params for nl %d: Wt %d %d \t Wf %d %d \t delta %d \t l_prime %d \t l0 %d\tDMRS symbol %d\n",
+	     1+dmrs_Type,nl, Wt[0], Wt[1], Wf[0], Wf[1], delta, l_prime, l0, dmrs_symbol);
 #endif
 
       uint16_t m=0, dmrs_idx=0;
@@ -307,7 +309,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
             if (ptrs_symbol)
               is_ptrs_re = is_ptrs_subcarrier(k,
                                               rel15->rnti,
-                                              ap,
+                                              nl,
                                               rel15->dmrsConfigType,
                                               rel15->PTRSFreqDensity,
                                               rel15->rbSize,
@@ -317,12 +319,12 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
             /* Map DMRS Symbol */
             if ( (dmrs_symbol_map & (1 << l)) &&
                  (k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) {
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)     ] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15;
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 ] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)     ] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 ] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15;
 #ifdef DEBUG_DLSCH_MAPPING
               printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
-                     dmrs_idx, l, k, k_prime, n, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)],
-                     txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1]);
+                     dmrs_idx, l, k, k_prime, n, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)],
+                     txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1]);
 #endif
               dmrs_idx++;
               k_prime++;
@@ -330,30 +332,30 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
               n+=(k_prime)?0:1;
             }
             else if(is_ptrs_re){
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
 #ifdef DEBUG_DLSCH_MAPPING
               printf("ptrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d, mod_ptrs: %d %d\n",
-                     ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
-                     ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)],mod_ptrs[ptrs_idx<<1],mod_ptrs[(ptrs_idx<<1)+1]);
+                     ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF_precoding[nl])[((l*frame_parms->ofdm_symbol_size + k)<<1)],
+                     ((int16_t*)txdataF_precoding[nl])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1],mod_ptrs[ptrs_idx<<1],mod_ptrs[(ptrs_idx<<1)+1]);
 #endif
               ptrs_idx++;
             }
           /* Map DATA Symbol */
             else if( ptrs_symbol || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,frame_parms->ofdm_symbol_size,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = (amp * tx_layers[ap][m<<1]) >> 15;
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = (amp * tx_layers[nl][m<<1]) >> 15;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (amp * tx_layers[nl][(m<<1) + 1]) >> 15;
 #ifdef DEBUG_DLSCH_MAPPING
               printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
-                     m, l, k, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)],
-                     txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1]);
+                     m, l, k, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)],
+                     txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1]);
 #endif
               m++;
             }
             /* mute RE */
             else {
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = 0;
-              txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = 0;
+              txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
             }
             if (++k >= frame_parms->ofdm_symbol_size)
               k -= frame_parms->ofdm_symbol_size;
@@ -369,26 +371,26 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
           }
           // fix the alignment issues later, use 64-bit SIMD below instead of 128.
           if (0/*(frame_parms->N_RB_DL&1)==0*/) {
-            __m128i *txF=(__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc)<<1)];
+            __m128i *txF=(__m128i*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size+start_sc)<<1)];
 
-            __m128i *txl = (__m128i*)&tx_layers[ap][m<<1];
+            __m128i *txl = (__m128i*)&tx_layers[nl][m<<1];
             __m128i amp128=_mm_set1_epi16(amp);
             for (int i=0; i<(upper_limit>>2); i++) {
               txF[i] = _mm_mulhrs_epi16(amp128,txl[i]);
             } //RE loop, first part
             m+=upper_limit;
             if (remaining_re > 0) {
-               txF = (__m128i*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size)<<1)];
-               txl = (__m128i*)&tx_layers[ap][m<<1];
+               txF = (__m128i*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size)<<1)];
+               txl = (__m128i*)&tx_layers[nl][m<<1];
                for (int i=0; i<(remaining_re>>2); i++) {
                  txF[i] = _mm_mulhrs_epi16(amp128,txl[i]);
                }
             }
           }
           else {
-            __m64 *txF=(__m64*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size+start_sc)<<1)];
+            __m64 *txF=(__m64*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size+start_sc)<<1)];
 
-            __m64 *txl = (__m64*)&tx_layers[ap][m<<1];
+            __m64 *txl = (__m64*)&tx_layers[nl][m<<1];
             __m64 amp64=_mm_set1_pi16(amp);
             for (int i=0; i<(upper_limit>>1); i++) {
 
@@ -396,31 +398,31 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
 #ifdef DEBUG_DLSCH_MAPPING
               if ((i&1) > 0)
                   printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
-                       m, l, start_sc+(i>>1), txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1)],
-                  txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + 1]);
+                         m, l, start_sc+(i>>1), txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1)],
+                         txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + 1]);
 #endif
               /* handle this, mute RE */
               /*else {
-                txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = 0;
-                txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
+                txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) ] = 0;
+                txdataF_precoding[anl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
               }*/
             } //RE loop, first part
             m+=upper_limit;
             if (remaining_re > 0) {
-               txF = (__m64*)&txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size)<<1)];
-               txl = (__m64*)&tx_layers[ap][m<<1];
+               txF = (__m64*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size)<<1)];
+               txl = (__m64*)&tx_layers[nl][m<<1];
                for (int i=0; i<(remaining_re>>1); i++) {
                  txF[i] = _mm_mulhrs_pi16(amp64,txl[i]);
 #ifdef DEBUG_DLSCH_MAPPING
                  if ((i&1) > 0)
                    printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
-                          m, l, i>>1, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) ],
-                          txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + 1]);
+                          m, l, i>>1, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) ],
+                          txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + 1]);
 #endif
                  /* handle this, mute RE */
                  /*else {
-                   txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = 0;
-                   txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
+                   txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1)    ] = 0;
+                   txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = 0;
                  }*/
                } //RE loop, second part
             } // 
diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
index 7ac2e67be0892a1e6ec868f498264b435d31dc1b..a398df877e4c9f37a4c84f4a70e67c6e43bef709 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
@@ -328,8 +328,8 @@ void nr_processULSegment(void* arg) {
                                rv_index,
                                ulsch_harq->new_rx,
                                E,
-       ulsch_harq->F,
-       Kr-ulsch_harq->F-2*(p_decoderParms->Z))==-1) {
+                               ulsch_harq->F,
+                               Kr-ulsch_harq->F-2*(p_decoderParms->Z))==-1) {
 
     stop_meas(&phy_vars_gNB->ulsch_rate_unmatching_stats);
 
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
index 9b9f1add6e175dd9d391e55660c956ff5739b1f7..caf3a19d855c04a474689198d941283a6f71d8c6 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
@@ -272,6 +272,8 @@ typedef struct {
   uint8_t dmrsConfigType;
   // Number of DMRS CDM groups with no data
   uint8_t n_dmrs_cdm_groups;
+  /// DMRS ports bitmap
+  uint16_t dmrs_ports;
   /// Starting Symbol number
   uint16_t start_symbol;
   /// Current subband PMI allocation
diff --git a/openair1/PHY/TOOLS/lte_enb_scope.c b/openair1/PHY/TOOLS/lte_enb_scope.c
index 7fde9f244c00468c3c13913186bf6813c69a0549..0e873addbcf44f6c73fe1d205b311f0e4cee831e 100644
--- a/openair1/PHY/TOOLS/lte_enb_scope.c
+++ b/openair1/PHY/TOOLS/lte_enb_scope.c
@@ -49,12 +49,6 @@ void reset_stats(FL_OBJECT *button, long arg) {
   int i,j,k;
   PHY_VARS_eNB *phy_vars_eNB = RC.eNB[0][0];
 
-  printf("XXX %d %d %d\n",
-	 sizeofArray(phy_vars_eNB->UE_stats),
-	 sizeofArray( phy_vars_eNB->UE_stats[i].dlsch_NAK),
-	 sizeofArray( *phy_vars_eNB->UE_stats[i].dlsch_NAK)
-	 );
- 
   for (i=0; i<sizeofArray(phy_vars_eNB->UE_stats); i++) {
     for (k=0; k<sizeofArray(phy_vars_eNB->UE_stats[i].dlsch_NAK); k++) { //harq_processes
       for (j=0; j<sizeofArray(*phy_vars_eNB->UE_stats[i].dlsch_NAK); j++) {
diff --git a/openair1/PHY/defs_UE.h b/openair1/PHY/defs_UE.h
index 2d2697a4b7afbdd4611d49496bac350616a16bcf..fc3d939f65d2b665f912a147aaf33052cf12716c 100644
--- a/openair1/PHY/defs_UE.h
+++ b/openair1/PHY/defs_UE.h
@@ -55,7 +55,6 @@
 #include <string.h>
 #include <math.h>
 #include "common_lib.h"
-#include "msc.h"
 
 #include "defs_common.h"
 #include "impl_defs_top.h"
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index a371b2334ba4f008fcdf0a76dbda3cf4f9b0dd47..c79530434aee8f29bc82f3929ff9052013119cea 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -54,7 +54,6 @@
 #include <string.h>
 #include <math.h>
 #include "common_lib.h"
-#include "msc.h"
 #include <common/utils/LOG/log.h>
 #include "assertions.h"
 
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index 030d50bc048f74190379cf184c5dae5c1eb87b38..995a4a934e4d0e603d19314dfc03b762c948b763 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -55,7 +55,6 @@
 #include <unistd.h>
 
 #include "common_lib.h"
-#include "msc.h"
 #include "defs_common.h"
 #include "defs_RU.h"
 #include "impl_defs_top.h"
diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h
index bca956bf75bcafb31526b77f3a2a803201bb17ad..0fa839f1040f393cbd779e78da280cafb926af3f 100644
--- a/openair1/PHY/defs_nr_UE.h
+++ b/openair1/PHY/defs_nr_UE.h
@@ -44,7 +44,6 @@
 #include <string.h>
 #include <math.h>
 #include "common_lib.h"
-#include "msc.h"
 #include "fapi_nr_ue_interface.h"
 #include "assertions.h"
 
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 569d2a464a10397b72744f025d4a198375312c40..ee1e0be49af41369d6a57fa79a29b14e99c63ca5 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -43,7 +43,6 @@
 #include <nfapi/oai_integration/nfapi_pnf.h>
 
 #include "assertions.h"
-#include "msc.h"
 
 #include <time.h>
 
diff --git a/openair1/SCHED/prach_procedures.c b/openair1/SCHED/prach_procedures.c
index 4d0fe428e84de72f10712063e27cb673f46c77e3..805354ce1be5ce7d7b7043f60e44482807fc78e0 100644
--- a/openair1/SCHED/prach_procedures.c
+++ b/openair1/SCHED/prach_procedures.c
@@ -40,7 +40,6 @@
 
 
 #include "assertions.h"
-#include "msc.h"
 
 #include <time.h>
 
diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c
index 15eba7b5bc4f59bfacbd13b83d6383c5451680e9..dc84279a961b5d3b024d96244923e8d758cb10af 100644
--- a/openair1/SCHED/ru_procedures.c
+++ b/openair1/SCHED/ru_procedures.c
@@ -69,7 +69,6 @@
 
 #include "assertions.h"
 #include "common/utils/system.h"
-#include "msc.h"
 
 #include <time.h>
 
diff --git a/openair1/SCHED_NR/nr_prach_procedures.c b/openair1/SCHED_NR/nr_prach_procedures.c
index 1ea8dbdf3c4878dd40c4004880eda98523e3a1f3..b0f59d5f471781a92e85949bb32229f84ad96ee5 100644
--- a/openair1/SCHED_NR/nr_prach_procedures.c
+++ b/openair1/SCHED_NR/nr_prach_procedures.c
@@ -41,7 +41,6 @@
 
 
 #include "assertions.h"
-#include "msc.h"
 
 #include <time.h>
 
diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c
index 4d3174007a62d7895fbe92f32ceb4bc6c1ed6c34..b90f14a129d44de093a8109d0563326a6ce047b8 100644
--- a/openair1/SCHED_NR/nr_ru_procedures.c
+++ b/openair1/SCHED_NR/nr_ru_procedures.c
@@ -44,7 +44,6 @@
 #include "T.h"
 
 #include "assertions.h"
-#include "msc.h"
 
 #include <time.h>
 // RU OFDM Modulator gNodeB
diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
index 7e9f4d091a988f649f830ed3d9f507d8c997f826..41f395c09030614e39d792c02cc159b8b64cb95d 100644
--- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
@@ -39,7 +39,6 @@
 #include "executables/softmodem-common.h"
 
 #include "assertions.h"
-#include "msc.h"
 
 #include <time.h>
 
@@ -89,7 +88,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
   nr_generate_pss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
   nr_generate_sss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
 
-  if (cfg->carrier_config.num_tx_ant.value <= 4)
+  if (fp->Lmax == 4)
     nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
   else
     nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
@@ -190,7 +189,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
 
   //apply the OFDM symbol rotation here
   for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
-	  apply_nr_rotation(fp,(int16_t*) &gNB->common_vars.txdataF[aa][txdataF_offset],slot,0,fp->Ncp==EXTENDED?12:14,fp->ofdm_symbol_size);
+    apply_nr_rotation(fp,(int16_t*) &gNB->common_vars.txdataF[aa][txdataF_offset],slot,0,fp->Ncp==EXTENDED?12:14,fp->ofdm_symbol_size);
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
diff --git a/openair1/SCHED_NR/vars.h b/openair1/SCHED_NR/vars.h
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
index 4f4757ec5a43f6bb27822930a165f27866cd6e16..485d732c04be4e836e08a6c4fe28fd1d9105a594 100644
--- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
@@ -284,13 +284,14 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
             dlsch0_harq->dlDmrsSymbPos = dlsch_config_pdu->dlDmrsSymbPos;
             dlsch0_harq->dmrsConfigType = dlsch_config_pdu->dmrsConfigType;
             dlsch0_harq->n_dmrs_cdm_groups = dlsch_config_pdu->n_dmrs_cdm_groups;
+            dlsch0_harq->dmrs_ports = dlsch_config_pdu->dmrs_ports;
             dlsch0_harq->mcs = dlsch_config_pdu->mcs;
             dlsch0_harq->rvidx = dlsch_config_pdu->rv;
             dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
             //get nrOfLayers from DCI info
             uint8_t Nl = 0;
-            for (i = 0; i < 4; i++) {
-              if (dlsch_config_pdu->dmrs_ports[i] >= i) Nl += 1;
+            for (i = 0; i < 12; i++) { // max 12 ports
+              if ((dlsch_config_pdu->dmrs_ports>>i)&0x01) Nl += 1;
             }
             dlsch0_harq->Nl = Nl;
             dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
@@ -308,7 +309,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
             dlsch0_harq->nEpreRatioOfPDSCHToPTRS = dlsch_config_pdu->nEpreRatioOfPDSCHToPTRS;
             dlsch0_harq->PTRSReOffset = dlsch_config_pdu->PTRSReOffset;
             dlsch0_harq->pduBitmap = dlsch_config_pdu->pduBitmap;
-            LOG_D(MAC, ">>>> \tdlsch0->g_pucch = %d\tdlsch0_harq.mcs = %d\n", dlsch0->g_pucch, dlsch0_harq->mcs);
+            LOG_D(MAC, ">>>> \tdlsch0->g_pucch = %d\tdlsch0_harq.mcs = %d\n",
+                  dlsch0->g_pucch, dlsch0_harq->mcs);
           }
         }
       }
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 97a7e2e48996860b2815a2412bb42fc95f864709..996ee2538c833703c3ca2c8f774a7e112c78c4f3 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -561,23 +561,23 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
     uint16_t s1             = dlsch0_harq->nb_symbols;
     bool is_SI              = dlsch0->rnti_type == _SI_RNTI_;
 
-    LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",
-          ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos);
+    LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x, Nl %d\n",
+          ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos, dlsch0_harq->Nl);
 
     for (m = s0; m < (s0 +s1); m++) {
       if (dlsch0_harq->dlDmrsSymbPos & (1 << m)) {
         for (uint8_t aatx=0; aatx<dlsch0_harq->Nl; aatx++) {//for MIMO Config: it shall loop over no_layers
+          LOG_D(PHY,"PDSCH Channel estimation gNB id %d, PDSCH antenna port %d, slot %d, symbol %d\n",0,aatx,nr_slot_rx,m);
           nr_pdsch_channel_estimation(ue,
                                       proc,
                                       gNB_id,
                                       is_SI,
                                       nr_slot_rx,
-                                      aatx /*p*/,
+                                      get_dmrs_port(aatx,dlsch0_harq->dmrs_ports),
                                       m,
                                       BWPStart,
                                       ue->frame_parms.first_carrier_offset+(BWPStart + pdsch_start_rb)*12,
                                       pdsch_nb_rb);
-          LOG_D(PHY,"PDSCH Channel estimation gNB id %d, PDSCH antenna port %d, slot %d, symbol %d\n",0,aatx,nr_slot_rx,m);
 #if 0
           ///LOG_M: the channel estimation
           int nr_frame_rx = proc->frame_rx;
@@ -1528,7 +1528,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
   // do procedures for C-RNTI
   int ret_pdsch = 0;
   if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
-
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C, VCD_FUNCTION_IN);
     ret_pdsch = nr_ue_pdsch_procedures(ue,
                                        proc,
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 93368f4ab9b0be6a4bbc2ce190811c1529e59258..046f410bd49144c0866e3896fbab0fb931644463 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -175,7 +175,12 @@ gtpv1u_update_ngu_tunnel(
   return 0;
 }
 
-int ocp_gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+int gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+  return 0;
+}
+
+int gtpv1u_delete_ngu_tunnel( const instance_t instance,
+			      gtpv1u_gnb_delete_tunnel_req_t *req) {
   return 0;
 }
 
@@ -271,17 +276,13 @@ void nr_dlsim_preprocessor(module_id_t module_id,
 
   NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
 
-  ps->nrOfLayers = g_nrOfLayers;
-
-  int dci_format = sched_ctrl->search_space && sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats ?
-      NR_DL_DCI_FORMAT_1_1 : NR_DL_DCI_FORMAT_1_0;
-
   nr_set_pdsch_semi_static(scc,
                            UE_info->CellGroup[0],
                            sched_ctrl->active_bwp,
                            NULL,
                            /* tda = */ 2,
-                           dci_format,
+                           g_nrOfLayers,
+                           sched_ctrl,
                            ps);
 
   NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
@@ -777,7 +778,8 @@ int main(int argc, char **argv)
 
   prepare_scd(scd);
 
-  fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 6, 0, 0, 0, 0);
+  fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 6, 0, 0, 0);
+
 
   /* RRC parameter validation for secondaryCellGroup */
   fix_scd(scd);
@@ -1216,7 +1218,7 @@ int main(int argc, char **argv)
 
         nr_ue_dcireq(&dcireq); //to be replaced with function pointer later
         nr_ue_scheduled_response(&scheduled_response);
-        
+
         phy_procedures_nrUE_RX(UE,
                                &UE_proc,
                                0,
diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c
index fb0f37d7ac6665e3a1ab6d39f9fbf1bdb72b1b53..2d1ca3d25a2708695c128e934293021714b6fdc9 100644
--- a/openair1/SIMULATION/NR_PHY/prachsim.c
+++ b/openair1/SIMULATION/NR_PHY/prachsim.c
@@ -72,13 +72,11 @@ openair0_config_t openair0_cfg[MAX_CARDS];
 uint64_t downlink_frequency[MAX_NUM_CCs][4];
 int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
 uint16_t sl_ahead = 0;
-msc_interface_t msc_interface;
 uint32_t N_RB_DL = 106;
 
 //void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
 
 /* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
-msc_interface_t msc_interface;
 uint64_t get_softmodem_optmask(void) {return 0;}
 softmodem_params_t *get_softmodem_params(void) {return 0;}
 int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0);  }
@@ -143,7 +141,12 @@ gtpv1u_update_ngu_tunnel(
   return 0;
 }
 
-int ocp_gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+int gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+  return 0;
+}
+
+int gtpv1u_delete_ngu_tunnel( const instance_t instance,
+			      gtpv1u_gnb_delete_tunnel_req_t *req) {
   return 0;
 }
 
diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c
index d07469a4b79e87cc63f6c38c05ceaab3fdc953af..465fe71f60eebdd4d11fb61b42a4b4bf9b0faf81 100644
--- a/openair1/SIMULATION/NR_PHY/pucchsim.c
+++ b/openair1/SIMULATION/NR_PHY/pucchsim.c
@@ -688,8 +688,8 @@ int main(int argc, char **argv)
           ack_nack_errors+=((actual_payload^payload_received)&1) + (((actual_payload^payload_received)&2)>>1);
       }
       else if (format==2) {
-        nfapi_nr_uci_pucch_pdu_format_2_3_4_t uci_pdu;
-        nfapi_nr_pucch_pdu_t pucch_pdu;
+        nfapi_nr_uci_pucch_pdu_format_2_3_4_t uci_pdu={0};
+        nfapi_nr_pucch_pdu_t pucch_pdu={0};
         pucch_pdu.rnti = 0x1234;
         pucch_pdu.subcarrier_spacing    = 1;
         pucch_pdu.group_hop_flag        = PUCCH_GroupHopping&1;
diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c
index 1d312ad3d70960246eb5c7ba1465b8ca08253865..6e9b88593c7c2c3e88fea39752b800ea306b3c0c 100644
--- a/openair1/SIMULATION/NR_PHY/ulsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulsim.c
@@ -139,7 +139,12 @@ gtpv1u_create_s1u_tunnel(
   return 0;
 }
 
-int ocp_gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+int gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+  return 0;
+}
+
+int gtpv1u_delete_ngu_tunnel( const instance_t instance,
+			      gtpv1u_gnb_delete_tunnel_req_t *req) {
   return 0;
 }
 
@@ -720,7 +725,7 @@ int main(int argc, char **argv)
 
   prepare_scd(scd);
 
-  fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0, 0, 0, 0);
+  fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0, 0, 0);
 
   // xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
 
diff --git a/openair1/SIMULATION/TOOLS/random_channel.c b/openair1/SIMULATION/TOOLS/random_channel.c
index f09d1a7ce18727016cc8bb5d812e283b13c0f130..b00f6e31d5f3c1b83fd85c8cac1ea212236abf4a 100644
--- a/openair1/SIMULATION/TOOLS/random_channel.c
+++ b/openair1/SIMULATION/TOOLS/random_channel.c
@@ -125,7 +125,7 @@ void fill_channel_desc(channel_desc_t *chan_desc,
     chan_desc->ch[i] = (struct complexd *) malloc(channel_length * sizeof(struct complexd));
 
   for (i = 0; i<nb_tx*nb_rx; i++)
-    chan_desc->chF[i] = (struct complexd *) malloc(1200 * sizeof(struct complexd)); // allocate for up to 100 RBs, 12 samples per RB
+    chan_desc->chF[i] = (struct complexd *) malloc(12*257 * sizeof(struct complexd)); // allocate for up to 257 RBs, 12 samples per RB
 
   LOG_D(OCM,"[CHANNEL] Filling a (nb_taps %d)\n",nb_taps);
 
diff --git a/openair2/COMMON/gtpv1_u_messages_def.h b/openair2/COMMON/gtpv1_u_messages_def.h
index 2835d07e4ae9c523c17411e1842fe5792473fa3b..44e9d4fbdf2b2243e48c87b7c52dabaf2a13f72d 100644
--- a/openair2/COMMON/gtpv1_u_messages_def.h
+++ b/openair2/COMMON/gtpv1_u_messages_def.h
@@ -19,18 +19,12 @@
  *      contact@openairinterface.org
  */
 
-MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_REQ,   MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_req_t,  Gtpv1uUpdateTunnelReq)
-MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_RESP,  MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_resp_t, Gtpv1uUpdateTunnelResp)
-MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ,   MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_req_t,  Gtpv1uDeleteTunnelReq)
-MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_RESP,  MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_resp_t, Gtpv1uDeleteTunnelResp)
-MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_IND,     MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_ind_t,    Gtpv1uTunnelDataInd)
+
 MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_REQ,     MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_req_t,    Gtpv1uTunnelDataReq)
 MESSAGE_DEF(GTPV1U_ENB_DATA_FORWARDING_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_data_forwarding_req_t,Gtpv1uDataForwardingReq)
 MESSAGE_DEF(GTPV1U_ENB_DATA_FORWARDING_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_data_forwarding_ind_t,Gtpv1uDataForwardingInd)
 MESSAGE_DEF(GTPV1U_ENB_END_MARKER_REQ,      MESSAGE_PRIORITY_MED, gtpv1u_enb_end_marker_req_t,    Gtpv1uEndMarkerReq)
 MESSAGE_DEF(GTPV1U_ENB_END_MARKER_IND,      MESSAGE_PRIORITY_MED, gtpv1u_enb_end_marker_ind_t,    Gtpv1uEndMarkerInd)
-MESSAGE_DEF(GTPV1U_REQ,        MESSAGE_PRIORITY_MED, Gtpv1uReq,    gtpv1uReq)
+MESSAGE_DEF(GTPV1U_REQ,                     MESSAGE_PRIORITY_MED, Gtpv1uReq,    gtpv1uReq)
 
-MESSAGE_DEF(GTPV1U_GNB_DELETE_TUNNEL_REQ,   MESSAGE_PRIORITY_MED, gtpv1u_gnb_delete_tunnel_req_t,  NRGtpv1uDeleteTunnelReq)
-MESSAGE_DEF(GTPV1U_GNB_DELETE_TUNNEL_RESP,  MESSAGE_PRIORITY_MED, gtpv1u_gnb_delete_tunnel_resp_t, NRGtpv1uDeleteTunnelResp)
 MESSAGE_DEF(GTPV1U_GNB_TUNNEL_DATA_REQ,     MESSAGE_PRIORITY_MED, gtpv1u_gnb_tunnel_data_req_t,    NRGtpv1uTunnelDataReq)
diff --git a/openair2/COMMON/gtpv1_u_messages_types.h b/openair2/COMMON/gtpv1_u_messages_types.h
index 2dd476ab686c06a950294334c6e5bf90150154ed..096f0f4697276ac094d21f861785ffa0e07b5620 100644
--- a/openair2/COMMON/gtpv1_u_messages_types.h
+++ b/openair2/COMMON/gtpv1_u_messages_types.h
@@ -28,10 +28,6 @@
 #define GTPV1U_MAX_BEARERS_PER_UE max_val_LTE_DRB_Identity
 #define NR_GTPV1U_MAX_BEARERS_PER_UE max_val_NR_DRB_Identity
 
-#define GTPV1U_ENB_UPDATE_TUNNEL_REQ(mSGpTR)  (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelReq
-#define GTPV1U_ENB_UPDATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelResp
-#define GTPV1U_ENB_DELETE_TUNNEL_REQ(mSGpTR)  (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelReq
-#define GTPV1U_ENB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelResp
 #define GTPV1U_ENB_TUNNEL_DATA_IND(mSGpTR)    (mSGpTR)->ittiMsg.Gtpv1uTunnelDataInd
 #define GTPV1U_ENB_TUNNEL_DATA_REQ(mSGpTR)    (mSGpTR)->ittiMsg.Gtpv1uTunnelDataReq
 #define GTPV1U_ENB_DATA_FORWARDING_REQ(mSGpTR)    (mSGpTR)->ittiMsg.Gtpv1uDataForwardingReq
@@ -41,8 +37,6 @@
 
 #define GTPV1U_REQ(mSGpTR)    (mSGpTR)->ittiMsg.gtpv1uReq
 
-#define GTPV1U_GNB_DELETE_TUNNEL_REQ(mSGpTR)  (mSGpTR)->ittiMsg.NRGtpv1uDeleteTunnelReq
-#define GTPV1U_GNB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.NRGtpv1uDeleteTunnelResp
 #define GTPV1U_GNB_TUNNEL_DATA_REQ(mSGpTR)    (mSGpTR)->ittiMsg.NRGtpv1uTunnelDataReq
 
 #define GTPV1U_ALL_TUNNELS_TEID (teid_t)0xFFFFFFFF
@@ -200,7 +194,6 @@ typedef struct gtpv1u_gnb_create_tunnel_resp_s {
   pdusessionid_t         pdusession_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
   transport_layer_addr_t gnb_addr;
 } gtpv1u_gnb_create_tunnel_resp_t;
-
 typedef struct gtpv1u_gnb_delete_tunnel_req_s {
   rnti_t                 rnti;
   uint8_t                num_pdusession;
@@ -212,7 +205,6 @@ typedef struct gtpv1u_gnb_delete_tunnel_resp_s {
   uint8_t                status;               ///< Status of NGU endpoint deleteion (Failed = 0xFF or Success = 0x0)
   teid_t                 gnb_NGu_teid;         ///< local NGU Tunnel Endpoint Identifier to be deleted
 } gtpv1u_gnb_delete_tunnel_resp_t;
-
 typedef struct gtpv1u_gnb_tunnel_data_req_s {
   uint8_t               *buffer;
   uint32_t               length;
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index a08bcf4baf96e922a754a319362693329217ec03..f4550f63a15b3e067da94975db420b3c57d221af 100644
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -55,7 +55,6 @@
 #include "common/config/config_userapi.h"
 #include "RRC_config_tools.h"
 #include "enb_paramdef.h"
-#include "proto_agent.h"
 #include "executables/thread-common.h"
 #include <openair3/ocp-gtpu/gtp_itf.h>
 
@@ -2080,7 +2079,7 @@ int RCconfig_gtpu(void ) {
     GTPV1U_REQ(message).localPort = enb_port_for_S1U;
     strcpy(GTPV1U_REQ(message).localAddrStr,address);
     sprintf(GTPV1U_REQ(message).localPortStr,"%d", enb_port_for_S1U);
-    itti_send_msg_to_task (TASK_VARIABLE, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id)
+    itti_send_msg_to_task (TASK_GTPV1_U, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id)
   } else
     LOG_E(GTPU,"invalid address for S1U\n");
 
diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h
index a393930c8186c138086645a638b7d78ff79db17f..66451530a61194479ac98e5f23fb17e78c5cdb60 100644
--- a/openair2/F1AP/f1ap_common.h
+++ b/openair2/F1AP/f1ap_common.h
@@ -357,7 +357,6 @@
 #include <arpa/inet.h>
 #include "T.h"
 #include "common/ran_context.h"
-#include "msc.h"
 
 /* Checking version of ASN1C compiler */
 #if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c
index 13f08b9458846c5118190b3adac681fe51257846..b3c7363ca4ac0391e7f5b4f9b52eb96162ff863d 100644
--- a/openair2/F1AP/f1ap_cu_task.c
+++ b/openair2/F1AP/f1ap_cu_task.c
@@ -35,7 +35,6 @@
 #include "f1ap_cu_rrc_message_transfer.h"
 #include "f1ap_cu_ue_context_management.h"
 #include "f1ap_cu_task.h"
-#include "proto_agent.h"
 #include <openair3/ocp-gtpu/gtp_itf.h>
 
 //Fixme: Uniq dirty DU instance, by global var, datamodel need better management
@@ -47,7 +46,7 @@ static instance_t cu_task_create_gtpu_instance_to_du(eth_params_t *IPaddrs) {
   strncpy(tmp.destinationHost, IPaddrs->remote_addr, sizeof(tmp.destinationHost)-1);
   sprintf(tmp.originService, "%d",  IPaddrs->my_portd);
   sprintf(tmp.destinationService, "%d",  IPaddrs->remote_portd);
-  return ocp_gtpv1Init(tmp);
+  return gtpv1Init(tmp);
 }
 
 static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind,
diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c
index ce54e901919ea60b8e56a2016ae3fdff0dfa3c1b..6d4757be6f6ea0b365cb42b7f33bfbc76222fa3f 100644
--- a/openair2/F1AP/f1ap_du_interface_management.c
+++ b/openair2/F1AP/f1ap_du_interface_management.c
@@ -481,14 +481,6 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
   for (int i=0; i<num_cells_to_activate; i++)
     AssertFatal(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI > 0, "System Information %d is missing",i);
 
-  MSC_LOG_RX_MESSAGE(
-    MSC_F1AP_DU,
-    MSC_F1AP_CU,
-    0,
-    0,
-    MSC_AS_TIME_FMT" DU_handle_F1_SETUP_RESPONSE successfulOutcome assoc_id %d",
-    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-    assoc_id);
   LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n");
   itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
   return 0;
@@ -910,14 +902,6 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
   AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
   LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
   F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).num_cells_to_activate = num_cells_to_activate;
-  MSC_LOG_RX_MESSAGE(
-    MSC_F1AP_DU,
-    MSC_F1AP_CU,
-    0,
-    0,
-    MSC_AS_TIME_FMT" DU_handle_GNB_CU_CONFIGURATION_UPDATE initiatingMessage assoc_id %d",
-    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-    assoc_id);
   LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message \n");
   itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
   return 0;
diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c
index 537f0060aecb072e6789c85ae7b6eb18ce8dacad..c8cfadb99901b6117486da7353961b0ca8eeb78b 100644
--- a/openair2/F1AP/f1ap_du_task.c
+++ b/openair2/F1AP/f1ap_du_task.c
@@ -35,7 +35,6 @@
 #include "f1ap_du_ue_context_management.h"
 #include "f1ap_du_rrc_message_transfer.h"
 #include "f1ap_du_task.h"
-#include "proto_agent.h"
 #include <openair3/ocp-gtpu/gtp_itf.h>
 
 //Fixme: Uniq dirty DU instance, by global var, datamodel need better management
@@ -103,7 +102,7 @@ static instance_t du_create_gtpu_instance_to_cu(char *CUaddr, uint16_t CUport, c
   strncpy(tmp.destinationHost, CUaddr, sizeof(tmp.destinationHost)-1);
   sprintf(tmp.originService, "%d", DUport);
   sprintf(tmp.destinationService, "%d", CUport);
-  return ocp_gtpv1Init(tmp);
+  return gtpv1Init(tmp);
 }
 
 void *F1AP_DU_task(void *arg) {
diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c
index 7d51d95840635fe98dcfc104f07392797b74c106..821e2def84afca4c56a60feffaef75f987423c9c 100644
--- a/openair2/GNB_APP/gnb_app.c
+++ b/openair2/GNB_APP/gnb_app.c
@@ -31,8 +31,8 @@
 #include <stdio.h>
 #include <nr_pdcp/nr_pdcp.h>
 #include <softmodem-common.h>
+#include <nr-softmodem.h>
 #include <split_headers.h>
-#include <proto_agent.h>
 
 #include "gnb_app.h"
 #include "gnb_config.h"
@@ -135,34 +135,6 @@ static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end)
 
 /*------------------------------------------------------------------------------*/
 
-static void init_pdcp(void) {
-  if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
-    pdcp_layer_init();
-    uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
-                             (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
-    if (IS_SOFTMODEM_NOS1) {
-      LOG_I(PDCP, "IS_SOFTMODEM_NOS1 option enabled\n");
-      pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
-    }
-
-    nr_pdcp_module_init(pdcp_initmask, 0);
-
-    if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
-      LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
-      pdcp_set_rlc_data_req_func(proto_agent_send_rlc_data_req);
-    } else {
-      LOG_I(PDCP, "node is gNB \n");
-      pdcp_set_rlc_data_req_func(rlc_data_req);
-      pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
-    }
-  } else {
-    LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
-    pdcp_set_pdcp_data_ind_func(proto_agent_send_pdcp_data_ind);
-  }
-}
-
-/*------------------------------------------------------------------------------*/
-
 void *gNB_app_task(void *args_p)
 {
 
diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c
index d415d490d51ffc7fc732e18f0ef8f0f1144fdd33..2795c07ce7036d1505674d37b4a114cf09140b47 100644
--- a/openair2/GNB_APP/gnb_config.c
+++ b/openair2/GNB_APP/gnb_config.c
@@ -1227,7 +1227,7 @@ int RCconfig_nr_gtpu(void ) {
     GTPV1U_REQ(message).localPort = port;
     strcpy(GTPV1U_REQ(message).localAddrStr,address);
     sprintf(GTPV1U_REQ(message).localPortStr,"%d", port);
-    itti_send_msg_to_task (TASK_VARIABLE, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id)
+    itti_send_msg_to_task (TASK_GTPV1_U, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id)
   } else
     LOG_E(GTPU,"invalid address for NGU or S1U\n");
   
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
index e62978782c90f770056441b5f49d0d441c287780..e5b95a7f470db7fb9422a2543bb3b53a0c9396cf 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
@@ -34,7 +34,6 @@
 
 #include "assertions.h"
 #include "platform_types.h"
-#include "msc.h"
 
 #include "LAYER2/MAC/mac.h"
 #include "LAYER2/MAC/mac_extern.h"
@@ -1421,8 +1420,6 @@ cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
                rnti_t rnti) {
   unsigned char i;
   RA_t *ra = (RA_t *) & RC.mac[module_idP]->common_channels[CC_id].ra[0];
-  MSC_LOG_EVENT(MSC_PHY_ENB, "RA Cancelling procedure ue %" PRIx16 " ",
-                rnti);
   LOG_D(MAC,
         "[eNB %d][RAPROC] CC_id %d Frame %d Cancelling RA procedure for UE rnti %x\n",
         module_idP, CC_id, frameP, rnti);
diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c
index 4554b247f50fd43de9ba752961b551da9913d9f8..fa647454ba644df40df85a03dc76cbc768ecf1c6 100644
--- a/openair2/LAYER2/MAC/main.c
+++ b/openair2/LAYER2/MAC/main.c
@@ -216,7 +216,6 @@ void mac_init_cell_params(int Mod_idP, int CC_idP)
     int j;
     UE_TEMPLATE *UE_template;
 
-    LOG_D(MAC, "[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]\n", Mod_idP);
     //COMMON_channels_t *cc = &RC.mac[Mod_idP]->common_channels[CC_idP];
 
     memset(&RC.mac[Mod_idP]->eNB_stats, 0, sizeof(eNB_STATS));
diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c
index 1aa959e103450f7b759585523c7959bdb933cc1f..af68cebbe1ab8776dde2fb4b5bb29bdb081ffdec 100644
--- a/openair2/LAYER2/MAC/ra_procedures.c
+++ b/openair2/LAYER2/MAC/ra_procedures.c
@@ -348,7 +348,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
       Size16 = (uint16_t) Size;
       //  LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",module_idP,frameP,Size);
       LOG_I(RRC,
-            "[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- MAC_DATA_REQ (RRCConnectionRequest eNB %d) --->][MAC_UE][MOD %02d][]\n",
+            "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_DATA_REQ (RRCConnectionRequest eNB %d) --->][MAC_UE][MOD %02d][]\n",
             frameP, module_idP, eNB_indexP, module_idP);
       LOG_I(MAC,
             "[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
index 4aa47f493ae57896d04de8e5fbed592efb71995d..8c0cabb5cb8afdb780b264b9752adac6cd37ad5c 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
@@ -2328,11 +2328,6 @@ static inline uint8_t get_table_idx(uint8_t mcs_table, uint8_t dci_format, uint8
 }
 
 
-/* returns the total DMRS symbols in a slot*/
-uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, int mappingtype){
-  return get_num_dmrs(fill_dmrs_mask(pdsch_Config,dmrs_TypeA_Position,NrOfSymbols, startSymbol, mappingtype));
-}
-
 // Table 5.1.2.2.1-1 38.214
 uint8_t getRBGSize(uint16_t bwp_size, long rbg_size_config) {
   
@@ -3115,9 +3110,9 @@ int is_nr_UL_slot(NR_TDD_UL_DL_ConfigCommon_t	*tdd_UL_DL_ConfigurationCommon, sl
   else return(slot_in_period >= slots1+tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0);    
 }
 
-int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, int mappingtype_fromDCI) {
+int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, int mappingtype_fromDCI, int length) {
 
-  int l0;int dmrs_AdditionalPosition = 0;int maxLength = 0;
+  int l0;int dmrs_AdditionalPosition = 0;
   NR_DMRS_DownlinkConfig_t *dmrs_config = NULL;
 
   LOG_D(MAC, "NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d\n", NrOfSymbols, startSymbol, mappingtype_fromDCI, dmrs_TypeA_Position);
@@ -3129,7 +3124,6 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
   // in case of DCI FORMAT 1_0 or dedicated pdsch config not received additionposition = pos2, len1 should be used
   // referred to section 5.1.6.2 in 38.214
   dmrs_AdditionalPosition = 2;
-  maxLength = 1;
 
   if (pdsch_Config != NULL) {
     if (mappingtype_fromDCI == typeA) { // Type A
@@ -3144,8 +3138,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
 
     AssertFatal(dmrs_config != NULL," DMRS configs not present in PDSCH DMRS Downlink config\n");
 
-    // default values of maxlength = len2, additionalposition is pos2
-    if (dmrs_config->maxLength != NULL) maxLength = 2;
+    // default values of additionalposition is pos2
     if (dmrs_config->dmrs_AdditionalPosition != NULL) dmrs_AdditionalPosition = *dmrs_config->dmrs_AdditionalPosition;
   }
 
@@ -3160,11 +3153,6 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
   // For TypeB, ld is the duration of the scheduled PDSCH resources
   ld = (mappingtype_fromDCI == typeA) ? (NrOfSymbols + startSymbol) : NrOfSymbols;
 
-  // Section 7.4.1.1.2 in Spec 38.211
-  //For PDSCH Mapping typeB, if PDSCH duration ld <=4, only single symbol DMRS is supported
-  if (mappingtype_fromDCI == typeB && ld <= 4)
-    maxLength = 1;
-
   AssertFatal(ld > 2 && ld < 15,"Illegal NrOfSymbols according to Table 5.1.2.1-1 Spec 38.214 %d\n",ld);
   AssertFatal((NrOfSymbols + startSymbol) < 15,"Illegal S+L according to Table 5.1.2.1-1 Spec 38.214 S:%d L:%d\n",startSymbol, NrOfSymbols);
 
@@ -3181,7 +3169,8 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
 
   }
 
-  if (maxLength == 1) {
+  // number of front loaded symbols
+  if (length == 1) {
     row = ld - 2;
     l_prime = table_7_4_1_1_2_3_pdsch_dmrs_positions_l[row][column];
     l0 = 1 << l0;
@@ -3192,7 +3181,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
     l0 = 1<<l0 | 1<<(l0+1);
   }
 
-  LOG_D(MAC, "l0:%d, ld:%d,row:%d, column:%d, addpos:%d, maxlen:%d\n", l0, ld, row, column, dmrs_AdditionalPosition, maxLength);
+  LOG_D(MAC, "l0:%d, ld:%d,row:%d, column:%d, addpos:%d, maxlen:%d\n", l0, ld, row, column, dmrs_AdditionalPosition, length);
   AssertFatal(l_prime>=0,"ERROR in configuration.Check Time Domain allocation of this Grant. l_prime < 1. row:%d, column:%d\n", row, column);
 
   l_prime = (mappingtype_fromDCI == typeA) ? (l_prime | l0) : (l_prime << startSymbol);
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
index 91450fc7960539691bd8a824fce0f554db5fc96c..f96abb46e5178066b170aebc67dc51afeab57098 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
@@ -41,7 +41,7 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
 
 uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw);
 
-int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,int mappingtype_fromDCI);
+int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,int mappingtype_fromDCI,int length);
 
 int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slot_t slotP);
 
@@ -177,8 +177,6 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config,
                         uint8_t *reOffset, uint8_t *maxNumPorts, uint8_t *ulPower,
                         uint8_t NrOfSymbols);
 
-uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,int mappingtype);
-
 /* \brief Set the transform precoding according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16
 @param    *pusch_config,   pointer to pusch config
 @param    *ubwp            pointer to uplink bwp
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_extern.h b/openair2/LAYER2/NR_MAC_UE/mac_extern.h
index 7fd63666f07957912441dc6fdf4fe85e13f51686..ac837d7798e656164d3ffbceac22979239d5a610 100644
--- a/openair2/LAYER2/NR_MAC_UE/mac_extern.h
+++ b/openair2/LAYER2/NR_MAC_UE/mac_extern.h
@@ -57,12 +57,12 @@ extern const uint8_t table_7_3_1_1_2_21[19][4];
 extern const uint8_t table_7_3_1_1_2_22[6][5];
 extern const uint8_t table_7_3_1_1_2_23[5][6];
 extern const uint8_t table_7_3_2_3_3_1[12][5];
-extern const uint8_t table_7_3_2_3_3_2_oneCodeword[31][6];
+extern const uint8_t table_7_3_2_3_3_2_oneCodeword[31][10];
 extern const uint8_t table_7_3_2_3_3_2_twoCodeword[4][10];
-extern const uint8_t table_7_3_2_3_3_3_oneCodeword[24][5];
+extern const uint8_t table_7_3_2_3_3_3_oneCodeword[24][7];
 extern const uint8_t table_7_3_2_3_3_3_twoCodeword[2][7];
-extern const uint8_t table_7_3_2_3_3_4_oneCodeword[58][6];
-extern const uint8_t table_7_3_2_3_3_4_twoCodeword[6][10];
+extern const uint8_t table_7_3_2_3_3_4_oneCodeword[58][14];
+extern const uint8_t table_7_3_2_3_3_4_twoCodeword[6][14];
 
 extern const uint16_t table_7_2_1[16];
 
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_vars.c b/openair2/LAYER2/NR_MAC_UE/mac_vars.c
index 383267090f553b052db2ff2ced66f556edbb4cab..b435dd773f7435d0e46697d4b253cf0379182eaa 100644
--- a/openair2/LAYER2/NR_MAC_UE/mac_vars.c
+++ b/openair2/LAYER2/NR_MAC_UE/mac_vars.c
@@ -257,161 +257,161 @@ const uint8_t table_7_3_1_1_2_23[5][6] = {
 };
 
 const uint8_t table_7_3_2_3_3_1[12][5] = {
-  {1,0,0,0,0},
   {1,1,0,0,0},
   {1,0,1,0,0},
-  {2,0,0,0,0},
+  {1,1,1,0,0},
   {2,1,0,0,0},
-  {2,2,0,0,0},
-  {2,3,0,0,0},
   {2,0,1,0,0},
-  {2,2,3,0,0},
-  {2,0,1,2,0},
-  {2,0,1,2,3},
-  {2,0,2,0,0}
+  {2,0,0,1,0},
+  {2,0,0,0,1},
+  {2,1,1,0,0},
+  {2,0,0,1,1},
+  {2,1,1,1,0},
+  {2,1,1,1,1},
+  {2,1,0,1,0}
 };
 
-const uint8_t table_7_3_2_3_3_2_oneCodeword[31][6] = {
-  {1,0,0,0,0,1},
-  {1,1,0,0,0,1},
-  {1,0,1,0,0,1},
-  {2,0,0,0,0,1},
-  {2,1,0,0,0,1},
-  {2,2,0,0,0,1},
-  {2,3,0,0,0,1},
-  {2,0,1,0,0,1},
-  {2,2,3,0,0,1},
-  {2,0,1,2,0,1},
-  {2,0,1,2,3,1},
-  {2,0,2,0,0,1},
-  {2,0,0,0,0,2},
-  {2,1,0,0,0,2},
-  {2,2,0,0,0,2},
-  {2,3,0,0,0,2},
-  {2,4,0,0,0,2},
-  {2,5,0,0,0,2},
-  {2,6,0,0,0,2},
-  {2,7,0,0,0,2},
-  {2,0,1,0,0,2},
-  {2,2,3,0,0,2},
-  {2,4,5,0,0,2},
-  {2,6,7,0,0,2},
-  {2,0,4,0,0,2},
-  {2,2,6,0,0,2},
-  {2,0,1,4,0,2},
-  {2,2,3,6,0,2},
-  {2,0,1,4,5,2},
-  {2,2,3,6,7,2},
-  {2,0,2,4,6,2}
+const uint8_t table_7_3_2_3_3_2_oneCodeword[31][10] = {
+  {1,1,0,0,0,0,0,0,0,1},
+  {1,0,1,0,0,0,0,0,0,1},
+  {1,1,1,0,0,0,0,0,0,1},
+  {2,1,0,0,0,0,0,0,0,1},
+  {2,0,1,0,0,0,0,0,0,1},
+  {2,0,0,1,0,0,0,0,0,1},
+  {2,0,0,0,1,0,0,0,0,1},
+  {2,1,1,0,0,0,0,0,0,1},
+  {2,0,0,1,1,0,0,0,0,1},
+  {2,1,1,1,0,0,0,0,0,1},
+  {2,1,1,1,1,0,0,0,0,1},
+  {2,1,0,1,0,0,0,0,0,1},
+  {2,1,0,0,0,0,0,0,0,2},
+  {2,0,1,0,0,0,0,0,0,2},
+  {2,0,0,1,0,0,0,0,0,2},
+  {2,0,0,0,1,0,0,0,0,2},
+  {2,0,0,0,0,1,0,0,0,2},
+  {2,0,0,0,0,0,1,0,0,2},
+  {2,0,0,0,0,0,0,1,0,2},
+  {2,0,0,0,0,0,0,0,1,2},
+  {2,1,1,0,0,0,0,0,0,2},
+  {2,0,0,1,1,0,0,0,0,2},
+  {2,0,0,0,0,1,1,0,0,2},
+  {2,0,0,0,0,0,0,1,1,2},
+  {2,1,0,0,0,1,0,0,0,2},
+  {2,0,0,1,0,0,0,1,0,2},
+  {2,1,1,0,0,1,0,0,0,2},
+  {2,0,0,1,1,0,0,1,0,2},
+  {2,1,1,0,0,1,1,0,0,2},
+  {2,0,0,1,1,0,0,1,1,2},
+  {2,1,0,1,0,1,0,1,0,2}
 };
 
 const uint8_t table_7_3_2_3_3_2_twoCodeword[4][10] = {
-  {2,0,1,2,3,4,0,0,0,2},
-  {2,0,1,2,3,4,6,0,0,2},
-  {2,0,1,2,3,4,5,6,0,2},
-  {2,0,1,2,3,4,5,6,7,2}
+  {2,1,1,1,1,1,0,0,0,2},
+  {2,1,1,1,1,1,0,1,0,2},
+  {2,1,1,1,1,1,1,1,0,2},
+  {2,1,1,1,1,1,1,1,1,2}
 };
 
-const uint8_t table_7_3_2_3_3_3_oneCodeword[24][5] = {
-  {1,0,0,0,0},
-  {1,1,0,0,0},
-  {1,0,1,0,0},
-  {2,0,0,0,0},
-  {2,1,0,0,0},
-  {2,2,0,0,0},
-  {2,3,0,0,0},
-  {2,0,1,0,0},
-  {2,2,3,0,0},
-  {2,0,1,2,0},
-  {2,0,1,2,3},
-  {3,0,0,0,0},
-  {3,1,0,0,0},
-  {3,2,0,0,0},
-  {3,3,0,0,0},
-  {3,4,0,0,0},
-  {3,5,0,0,0},
-  {3,0,1,0,0},
-  {3,2,3,0,0},
-  {3,4,5,0,0},
-  {3,0,1,2,0},
-  {3,3,4,5,0},
-  {3,0,1,2,3},
-  {2,0,2,0,0}
+const uint8_t table_7_3_2_3_3_3_oneCodeword[24][7] = {
+  {1,1,0,0,0,0,0},
+  {1,0,1,0,0,0,0},
+  {1,1,1,0,0,0,0},
+  {2,1,0,0,0,0,0},
+  {2,0,1,0,0,0,0},
+  {2,0,0,1,0,0,0},
+  {2,0,0,0,1,0,0},
+  {2,1,1,0,0,0,0},
+  {2,0,0,1,1,0,0},
+  {2,1,1,1,0,0,0},
+  {2,1,1,1,1,0,0},
+  {3,1,0,0,0,0,0},
+  {3,0,1,0,0,0,0},
+  {3,0,0,1,0,0,0},
+  {3,0,0,0,1,0,0},
+  {3,0,0,0,0,1,0},
+  {3,0,0,0,0,0,1},
+  {3,1,1,0,0,0,0},
+  {3,0,0,1,1,0,0},
+  {3,0,0,0,0,1,1},
+  {3,1,1,1,0,0,0},
+  {3,0,0,0,1,1,1},
+  {3,1,1,1,1,0,0},
+  {3,1,0,1,0,0,0}
 };
 
 const uint8_t table_7_3_2_3_3_3_twoCodeword[2][7] = {
-  {3,0,1,2,3,4,0},
-  {3,0,1,2,3,4,5}
+  {3,1,1,1,1,1,0},
+  {3,1,1,1,1,1,1}
 };
 
-const uint8_t table_7_3_2_3_3_4_oneCodeword[58][6] = {
-  {1,0,0,0,0,1},
-  {1,1,0,0,0,1},
-  {1,0,1,0,0,1},
-  {2,0,0,0,0,1},
-  {2,1,0,0,0,1},
-  {2,2,0,0,0,1},
-  {2,3,0,0,0,1},
-  {2,0,1,0,0,1},
-  {2,2,3,0,0,1},
-  {2,0,1,2,0,1},
-  {2,0,1,2,3,1},
-  {3,0,0,0,0,1},
-  {3,1,0,0,0,1},
-  {3,2,0,0,0,1},
-  {3,3,0,0,0,1},
-  {3,4,0,0,0,1},
-  {3,5,0,0,0,1},
-  {3,0,1,0,0,1},
-  {3,2,3,0,0,1},
-  {3,4,5,0,0,1},
-  {3,0,1,2,0,1},
-  {3,3,4,5,0,1},
-  {3,0,1,2,3,1},
-  {2,0,2,0,0,1},
-  {3,0,0,0,0,2},
-  {3,1,0,0,0,2},
-  {3,2,0,0,0,2},
-  {3,3,0,0,0,2},
-  {3,4,0,0,0,2},
-  {3,5,0,0,0,2},
-  {3,6,0,0,0,2},
-  {3,7,0,0,0,2},
-  {3,8,0,0,0,2},
-  {3,9,0,0,0,2},
-  {3,10,0,0,0,2},
-  {3,11,0,0,0,2},
-  {3,0,1,0,0,2},
-  {3,2,3,0,0,2},
-  {3,4,5,0,0,2},
-  {3,6,7,0,0,2},
-  {3,8,9,0,0,2},
-  {3,10,11,0,0,2},
-  {3,0,1,6,0,2},
-  {3,2,3,8,0,2},
-  {3,4,5,10,0,2},
-  {3,0,1,6,7,2},
-  {3,2,3,8,9,2},
-  {3,4,5,10,11,2},
-  {1,0,0,0,0,2},
-  {1,1,0,0,0,2},
-  {1,6,0,0,0,2},
-  {1,7,0,0,0,2},
-  {1,0,1,0,0,2},
-  {1,6,7,0,0,2},
-  {2,0,1,0,0,2},
-  {2,2,3,0,0,2},
-  {2,6,7,0,0,2},
-  {2,8,9,0,0,2}
+const uint8_t table_7_3_2_3_3_4_oneCodeword[58][14] = {
+  {1,1,0,0,0,0,0,0,0,0,0,0,0,1},
+  {1,0,1,0,0,0,0,0,0,0,0,0,0,1},
+  {1,1,1,0,0,0,0,0,0,0,0,0,0,1},
+  {2,1,0,0,0,0,0,0,0,0,0,0,0,1},
+  {2,0,1,0,0,0,0,0,0,0,0,0,0,1},
+  {2,0,0,1,0,0,0,0,0,0,0,0,0,1},
+  {2,0,0,0,1,0,0,0,0,0,0,0,0,1},
+  {2,1,1,0,0,0,0,0,0,0,0,0,0,1},
+  {2,0,0,1,1,0,0,0,0,0,0,0,0,1},
+  {2,1,1,1,0,0,0,0,0,0,0,0,0,1},
+  {2,1,1,1,1,0,0,0,0,0,0,0,0,1},
+  {3,1,0,0,0,0,0,0,0,0,0,0,0,1},
+  {3,0,1,0,0,0,0,0,0,0,0,0,0,1},
+  {3,0,0,1,0,0,0,0,0,0,0,0,0,1},
+  {3,0,0,0,1,0,0,0,0,0,0,0,0,1},
+  {3,0,0,0,0,1,0,0,0,0,0,0,0,1},
+  {3,0,0,0,0,0,1,0,0,0,0,0,0,1},
+  {3,1,1,0,0,0,0,0,0,0,0,0,0,1},
+  {3,0,0,1,1,0,0,0,0,0,0,0,0,1},
+  {3,0,0,0,0,1,1,0,0,0,0,0,0,1},
+  {3,1,1,1,0,0,0,0,0,0,0,0,0,1},
+  {3,0,0,0,1,1,1,0,0,0,0,0,0,1},
+  {3,1,1,1,1,0,0,0,0,0,0,0,0,1},
+  {2,1,0,1,0,0,0,0,0,0,0,0,0,1},
+  {3,1,0,0,0,0,0,0,0,0,0,0,0,2},
+  {3,0,1,0,0,0,0,0,0,0,0,0,0,2},
+  {3,0,0,1,0,0,0,0,0,0,0,0,0,2},
+  {3,0,0,0,1,0,0,0,0,0,0,0,0,2},
+  {3,0,0,0,0,1,0,0,0,0,0,0,0,2},
+  {3,0,0,0,0,0,1,0,0,0,0,0,0,2},
+  {3,0,0,0,0,0,0,1,0,0,0,0,0,2},
+  {3,0,0,0,0,0,0,0,1,0,0,0,0,2},
+  {3,0,0,0,0,0,0,0,0,1,0,0,0,2},
+  {3,0,0,0,0,0,0,0,0,0,1,0,0,2},
+  {3,0,0,0,0,0,0,0,0,0,0,1,0,2},
+  {3,0,0,0,0,0,0,0,0,0,0,0,1,2},
+  {3,1,1,0,0,0,0,0,0,0,0,0,0,2},
+  {3,0,0,1,1,0,0,0,0,0,0,0,0,2},
+  {3,0,0,0,0,1,1,0,0,0,0,0,0,2},
+  {3,0,0,0,0,0,0,1,1,0,0,0,0,2},
+  {3,0,0,0,0,0,0,0,0,1,1,0,0,2},
+  {3,0,0,0,0,0,0,0,0,0,0,1,1,2},
+  {3,1,1,0,0,0,0,1,0,0,0,0,0,2},
+  {3,0,0,1,1,0,0,0,0,1,0,0,0,2},
+  {3,0,0,0,0,1,1,0,0,0,0,1,0,2},
+  {3,1,1,0,0,0,0,1,1,0,0,0,0,2},
+  {3,0,0,1,1,0,0,0,0,1,1,0,0,2},
+  {3,0,0,0,0,1,1,0,0,0,0,1,1,2},
+  {1,1,0,0,0,0,0,0,0,0,0,0,0,2},
+  {1,0,1,0,0,0,0,0,0,0,0,0,0,2},
+  {1,0,0,0,0,0,0,1,0,0,0,0,0,2},
+  {1,0,0,0,0,0,0,0,1,0,0,0,0,2},
+  {1,1,1,0,0,0,0,0,0,0,0,0,0,2},
+  {1,0,0,0,0,0,0,1,1,0,0,0,0,2},
+  {2,1,1,0,0,0,0,0,0,0,0,0,0,2},
+  {2,0,0,1,1,0,0,0,0,0,0,0,0,2},
+  {2,0,0,0,0,0,0,1,1,0,0,0,0,2},
+  {2,0,0,0,0,0,0,0,0,1,1,0,0,2}
 };
 
-const uint8_t table_7_3_2_3_3_4_twoCodeword[6][10] = {
-  {3,0,1,2,3,4,0,0,0,1},
-  {3,0,1,2,3,4,5,0,0,1},
-  {2,0,1,2,3,6,0,0,0,2},
-  {2,0,1,2,3,6,8,0,0,2},
-  {2,0,1,2,3,6,7,8,0,2},
-  {2,0,1,2,3,6,7,8,9,2}
+const uint8_t table_7_3_2_3_3_4_twoCodeword[6][14] = {
+  {3,1,1,1,1,1,0,0,0,0,0,0,0,1},
+  {3,1,1,1,1,1,1,0,0,0,0,0,0,1},
+  {2,1,1,1,1,0,0,1,0,0,0,0,0,2},
+  {2,1,1,1,1,0,0,1,0,1,0,0,0,2},
+  {2,1,1,1,1,0,0,1,1,1,0,0,0,2},
+  {2,1,1,1,1,0,0,1,1,1,1,0,0,2},
 };
 
 // table 7.2-1 TS 38.321
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 26cefbc9e1c359af0f1fe0170bc44e0647f38881..257e8824e50601b8814d2a07f13838f2558709fc 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -871,14 +871,16 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
                                                          (get_softmodem_params()->nsa) ? mac->scc->dmrs_TypeA_Position : mac->mib->dmrs_TypeA_Position,
                                                          dlsch_config_pdu_1_0->number_symbols,
                                                          dlsch_config_pdu_1_0->start_symbol,
-                                                         mappingtype);
+                                                         mappingtype, 1);
     dlsch_config_pdu_1_0->dmrsConfigType = (mac->DLbwp[0] != NULL) ?
                                            (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
+
     /* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
     if (dlsch_config_pdu_1_0->number_symbols == 2)
       dlsch_config_pdu_1_0->n_dmrs_cdm_groups = 1;
     else
       dlsch_config_pdu_1_0->n_dmrs_cdm_groups = 2;
+    dlsch_config_pdu_1_0->dmrs_ports = 1; // only port 0 in case of DCI 1_0
     /* VRB_TO_PRB_MAPPING */
     dlsch_config_pdu_1_0->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping.val == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved;
     /* MCS TABLE INDEX */
@@ -1062,13 +1064,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
 
     int mappingtype = pdsch_TimeDomainAllocationList ? pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType : ((dlsch_config_pdu_1_1->start_symbol <= 3)? typeA: typeB);
 
-    /* dmrs symbol positions*/
-    dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_Config,
-							 mac->scc? mac->scc->dmrs_TypeA_Position:mac->mib->dmrs_TypeA_Position,
-							 dlsch_config_pdu_1_1->number_symbols,
-                                                         dlsch_config_pdu_1_1->start_symbol,
-                                                         mappingtype);
-
     dlsch_config_pdu_1_1->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? NFAPI_NR_DMRS_TYPE1 : NFAPI_NR_DMRS_TYPE2;
 
     /* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214,
@@ -1132,6 +1127,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
     uint8_t n_codewords = 1; // FIXME!!!
     long *max_length = NULL;
     long *dmrs_type = NULL;
+    dlsch_config_pdu_1_1->n_front_load_symb = 1; // default value
     if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA) {
       max_length = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength;
       dmrs_type = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type;
@@ -1143,31 +1139,35 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
     if ((dmrs_type == NULL) && (max_length == NULL)){
       // Table 7.3.1.2.2-1: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=1
       dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_1[dci->antenna_ports.val][0];
-      dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_1[dci->antenna_ports.val][1];
-      dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_1[dci->antenna_ports.val][2];
-      dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_1[dci->antenna_ports.val][3];
-      dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_1[dci->antenna_ports.val][4];
+      dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_1[dci->antenna_ports.val][1] +
+                                          (table_7_3_2_3_3_1[dci->antenna_ports.val][2]<<1) +
+                                          (table_7_3_2_3_3_1[dci->antenna_ports.val][3]<<2) +
+                                          (table_7_3_2_3_3_1[dci->antenna_ports.val][4]<<3));
     }
     if ((dmrs_type == NULL) && (max_length != NULL)){
       // Table 7.3.1.2.2-2: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=2
       if (n_codewords == 1) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][0];
-	dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][1];
-	dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][2];
-	dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][3];
-	dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][4];
-	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][5];
+        dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][1] +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][2]<<1) +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][3]<<2) +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][4]<<3) +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][5]<<4) +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][6]<<5) +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][7]<<6) +
+                                            (table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][8]<<7));
+	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][9];
       }
       if (n_codewords == 2) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][0];
-	dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][1];
-	dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][2];
-	dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][3];
-	dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][4];
-	dlsch_config_pdu_1_1->dmrs_ports[4]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][5];
-	dlsch_config_pdu_1_1->dmrs_ports[5]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][6];
-	dlsch_config_pdu_1_1->dmrs_ports[6]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][7];
-	dlsch_config_pdu_1_1->dmrs_ports[7]     = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][8];
+        dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][1] +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][2]<<1) +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][3]<<2) +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][4]<<3) +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][5]<<4) +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][6]<<5) +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][7]<<6) +
+                                            (table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][8]<<7));
 	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][9];
       }
     }
@@ -1175,44 +1175,67 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
       // Table 7.3.1.2.2-3: Antenna port(s) (1000 + DMRS port), dmrs-Type=2, maxLength=1
       if (n_codewords == 1) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][0];
-	dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][1];
-	dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][2];
-	dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][3];
-	dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][4];
+        dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][1] +
+                                            (table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][2]<<1) +
+                                            (table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][3]<<2) +
+                                            (table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][4]<<3) +
+                                            (table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][5]<<4) +
+                                            (table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][6]<<5));
       }
       if (n_codewords == 2) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][0];
-	dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][1];
-	dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][2];
-	dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][3];
-	dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][4];
-	dlsch_config_pdu_1_1->dmrs_ports[4]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][5];
-	dlsch_config_pdu_1_1->dmrs_ports[5]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][6];
+        dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][1] +
+                                            (table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][2]<<1) +
+                                            (table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][3]<<2) +
+                                            (table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][4]<<3) +
+                                            (table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][5]<<4) +
+                                            (table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][6]<<5));
       }
     }
     if ((dmrs_type != NULL) && (max_length != NULL)){
       // Table 7.3.1.2.2-4: Antenna port(s) (1000 + DMRS port), dmrs-Type=2, maxLength=2
       if (n_codewords == 1) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][0];
-	dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][1];
-	dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][2];
-	dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][3];
-	dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][4];
-	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][5];
+        dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][1] +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][2]<<1) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][3]<<2) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][4]<<3) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][5]<<4) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][6]<<5) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][7]<<6) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][8]<<7) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][9]<<8) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][10]<<9) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][11]<<10) +
+                                            (table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][12]<<11));
+	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][13];
       }
       if (n_codewords == 2) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][0];
-	dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][1];
-	dlsch_config_pdu_1_1->dmrs_ports[1]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][2];
-	dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][3];
-	dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][4];
-	dlsch_config_pdu_1_1->dmrs_ports[4]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][5];
-	dlsch_config_pdu_1_1->dmrs_ports[5]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][6];
-	dlsch_config_pdu_1_1->dmrs_ports[6]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][7];
-	dlsch_config_pdu_1_1->dmrs_ports[7]     = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][8];
+        dlsch_config_pdu_1_1->dmrs_ports = (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][1] +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][2]<<1) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][3]<<2) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][4]<<3) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][5]<<4) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][6]<<5) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][7]<<6) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][8]<<7) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][9]<<8) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][10]<<9) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][11]<<10) +
+                                            (table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][12]<<11));
 	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][9];
       }
     }
+
+    /* dmrs symbol positions*/
+    dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_Config,
+							 mac->scc? mac->scc->dmrs_TypeA_Position:mac->mib->dmrs_TypeA_Position,
+							 dlsch_config_pdu_1_1->number_symbols,
+                                                         dlsch_config_pdu_1_1->start_symbol,
+                                                         mappingtype,
+                                                         dlsch_config_pdu_1_1->n_front_load_symb);
+
     /* TCI */
     if (mac->dl_config_request.dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.tci_present_in_dci == 1){
       // 0 bit if higher layer parameter tci-PresentInDCI is not enabled
diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c
index 70ab595f514d4c7ae000d3cfeab86a8528e46b90..19c82c71df2b148c90fb04e0ab1b91f90f445325 100644
--- a/openair2/LAYER2/NR_MAC_gNB/config.c
+++ b/openair2/LAYER2/NR_MAC_gNB/config.c
@@ -365,8 +365,9 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, int pdsch_AntennaPorts
   cfg->ssb_table.ssb_mask_list[1].ssb_mask.tl.tag = NFAPI_NR_CONFIG_SSB_MASK_TAG;
   cfg->num_tlv+=2;
 
+  // logical antenna ports
   cfg->carrier_config.num_tx_ant.value = pdsch_AntennaPorts;
-  AssertFatal(pdsch_AntennaPorts > 0 && pdsch_AntennaPorts < 13, "pdsch_AntennaPorts in 1...12\n");
+  AssertFatal(pdsch_AntennaPorts > 0 && pdsch_AntennaPorts < 33, "pdsch_AntennaPorts in 1...32\n");
   cfg->carrier_config.num_tx_ant.tl.tag = NFAPI_NR_CONFIG_NUM_TX_ANT_TAG;
 
   int num_ssb=0;
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
index 964ecd503f417af42059771039e8e478dda5bc21..a26bea0c92241d74b12a7b4de7f14f0126683024 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
@@ -1360,7 +1360,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
                                                     nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
                                                     nrOfSymbols,
                                                     startSymbolIndex,
-                                                    mappingtype);
+                                                    mappingtype, 1);
 
     int x_Overhead = 0;
     uint8_t tb_scaling = 0;
@@ -1609,7 +1609,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
                                             scc->dmrs_TypeA_Position,
                                             nrOfSymbols,
                                             startSymbolIndex,
-                                            mappingtype);
+                                            mappingtype, 1);
 
     uint16_t N_DMRS_SLOT = get_num_dmrs(dlDmrsSymbPos);
 
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
index ac08e18c1188b3c24c2252c8019fb65a0d817445..93ab672b631205270b54ef37fcf907c3bbcd8e6a 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
@@ -388,7 +388,6 @@ uint32_t schedule_control_sib1(module_id_t module_id,
   // Calculate number of PRB_DMRS
   uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 6;
   uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos);
-
   LOG_D(MAC,"dlDmrsSymbPos %x\n",dlDmrsSymbPos);
   int rbSize = 0;
   uint32_t TBS = 0;
@@ -621,8 +620,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
 
       // TODO: There are exceptions to this in table 5.1.2.1.1-4,5 (Default time domain allocation tables B, C)
       int mappingtype = (startSymbolIndex <= 3)? typeA: typeB;
-
-      uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype);
+      uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype, 1);
 
       // Configure sched_ctrlCommon for SIB1
       uint32_t TBS = schedule_control_sib1(module_idP, CC_id,
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
index cd34a543c7924be43130015806b0cdf2172d6883..92391ed1d5697e41c1d9fb6bc420c20aff70b19a 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
@@ -563,7 +563,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
   int rbStart = 0; // start wrt BWPstart
 
   NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
-  const long f = (sched_ctrl->active_bwp ||bwpd) ? sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats : 0;
+
   int rbSize = 0;
   const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Id : 0][slot];
   AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n");
@@ -587,26 +587,29 @@ bool allocate_dl_retransmission(module_id_t module_id,
     /* check whether we need to switch the TDA allocation since the last
      * (re-)transmission */
     if (ps->time_domain_allocation != tda)
-      nr_set_pdsch_semi_static(scc, cg, sched_ctrl->active_bwp, bwpd, tda, f, ps);
+      nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, ps->nrOfLayers, sched_ctrl, ps);
   } else {
     /* the retransmission will use a different time domain allocation, check
      * that we have enough resources */
-    NR_pdsch_semi_static_t temp_ps;
-    temp_ps.nrOfLayers = 1;
-    nr_set_pdsch_semi_static(scc, cg, sched_ctrl->active_bwp, bwpd, tda, f, &temp_ps);
+
+    NR_pdsch_semi_static_t temp_ps = *ps;
+    nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, ps->nrOfLayers, sched_ctrl, &temp_ps);
     while (rbStart < bwpSize &&
            !(rballoc_mask[rbStart]&SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols)))
       rbStart++;
     while (rbStart + rbSize < bwpSize &&
            (rballoc_mask[rbStart + rbSize]&SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols)))
       rbSize++;
+
     uint32_t new_tbs;
     uint16_t new_rbSize;
     bool success = nr_find_nb_rb(retInfo->Qm,
                                  retInfo->R,
+                                 temp_ps.nrOfLayers,
                                  temp_ps.nrOfSymbols,
                                  temp_ps.N_PRB_DMRS * temp_ps.N_DMRS_SLOT,
                                  retInfo->tb_size,
+                                 1, /* minimum of 1RB: need to find exact TBS, don't preclude any number */
                                  rbSize,
                                  &new_tbs,
                                  &new_rbSize);
@@ -702,6 +705,7 @@ void pf_dl(module_id_t module_id,
   float coeff_ue[MAX_MOBILES_PER_GNB];
   // UEs that could be scheduled
   int ue_array[MAX_MOBILES_PER_GNB];
+  int layers[MAX_MOBILES_PER_GNB];
   NR_list_t UE_sched = { .head = -1, .next = ue_array, .tail = -1, .len = MAX_MOBILES_PER_GNB };
 
   /* Loop UE_info->list to check retransmission */
@@ -714,6 +718,8 @@ void pf_dl(module_id_t module_id,
     /* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */
     sched_pdsch->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
 
+    layers[UE_id] = ps->nrOfLayers; // initialization of layers to the previous value in the strcuture
+
     /* Calculate Throughput */
     const float a = 0.0005f; // corresponds to 200ms window
     const uint32_t b = UE_info->mac_stats[UE_id].dlsch_current_bytes;
@@ -737,9 +743,19 @@ void pf_dl(module_id_t module_id,
         continue;
 
       /* Calculate coeff */
-      ps->nrOfLayers = 1;
+      set_dl_mcs(sched_pdsch,sched_ctrl,&mac->dl_max_mcs,ps->mcsTableIdx);
       sched_pdsch->mcs = get_mcs_from_bler(module_id, /* CC_id = */ 0, frame, slot, UE_id);
-      uint32_t tbs = pf_tbs[ps->mcsTableIdx][sched_pdsch->mcs];
+      layers[UE_id] = set_dl_nrOfLayers(sched_ctrl);
+      const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+      const uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+      uint32_t tbs = nr_compute_tbs(Qm,
+                                    R,
+                                    1, /* rbSize */
+                                    10, /* hypothetical number of slots */
+                                    0, /* N_PRB_DMRS * N_DMRS_SLOT */
+                                    0 /* N_PRB_oh, 0 for initialBWP */,
+                                    0 /* tb_scaling */,
+                                    layers[UE_id]) >> 3;
       coeff_ue[UE_id] = (float) tbs / thr_ue[UE_id];
       LOG_D(NR_MAC,"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
             b, UE_id, thr_ue[UE_id], tbs, UE_id, coeff_ue[UE_id]);
@@ -748,8 +764,9 @@ void pf_dl(module_id_t module_id,
     }
   }
 
+  const int min_rbSize = 5;
   /* Loop UE_sched to find max coeff and allocate transmission */
-  while (max_num_ue > 0 && n_rb_sched > 0 && UE_sched.head >= 0) {
+  while (max_num_ue > 0 && n_rb_sched >= min_rbSize && UE_sched.head >= 0) {
 
     /* Find max coeff from UE_sched*/
     int *max = &UE_sched.head; /* assume head is max */
@@ -809,9 +826,6 @@ void pf_dl(module_id_t module_id,
       LOG_D(NR_MAC, "%4d.%2d could not find CCE for DL DCI UE %d/RNTI %04x\n", frame, slot, UE_id, rnti);
       continue;
     }
-    /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
-    max_num_ue--;
-    if (max_num_ue < 0) return;
 
     /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
     * allocation after CCE alloc fail would be more complex) */
@@ -825,9 +839,14 @@ void pf_dl(module_id_t module_id,
             frame,
             slot);
       mac->pdcch_cand[cid]--;
-      return;
+      continue;
     }
 
+    /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE
+     * and PUCCH */
+    max_num_ue--;
+    AssertFatal(max_num_ue >= 0, "Illegal max_num_ue %d\n", max_num_ue);
+
     sched_ctrl->cce_index = CCEIndex;
 
     fill_pdcch_vrb_map(mac,
@@ -842,9 +861,10 @@ void pf_dl(module_id_t module_id,
     AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n");
     NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
     NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
-    const long f = (sched_ctrl->active_bwp || bwpd) ? sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats : 0;
-    if (ps->time_domain_allocation != tda)
-      nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, f, ps);
+
+    if (ps->nrOfLayers != layers[UE_id] ||
+        ps->time_domain_allocation != tda)
+      nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, bwpd, tda, layers[UE_id], sched_ctrl, ps);
 
     const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
     // Freq-demain allocation
@@ -865,9 +885,11 @@ void pf_dl(module_id_t module_id,
     const int oh = 3 + 2 * (frame == (sched_ctrl->ta_frame + 10) % 1024);
     nr_find_nb_rb(sched_pdsch->Qm,
                   sched_pdsch->R,
+                  ps->nrOfLayers,
                   ps->nrOfSymbols,
                   ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
                   sched_ctrl->num_total_bytes + oh,
+                  min_rbSize,
                   max_rbSize,
                   &TBS,
                   &rbSize);
@@ -1048,8 +1070,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
     harq->is_waiting = true;
     UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++;
 
-    LOG_D(NR_MAC,
-          "%4d.%2d [DLSCH/PDSCH/PUCCH] UE %d RNTI %04x DCI L %d start %3d RBs %3d startSymbol %2d nb_symbol %2d dmrspos %x MCS %2d TBS %4d HARQ PID %2d round %d RV %d NDI %d dl_data_to_ULACK %d (%d.%d) PUCCH allocation %d TPC %d\n",
+    LOG_D(NR_MAC,"%4d.%2d [DLSCH/PDSCH/PUCCH] UE %d RNTI %04x DCI L %d start %3d RBs %3d startSymbol %2d nb_symbol %2d dmrspos %x MCS %2d nrOfLayers %d TBS %4d HARQ PID %2d round %d RV %d NDI %d dl_data_to_ULACK %d (%d.%d) PUCCH allocation %d TPC %d\n",
           frame,
           slot,
           UE_id,
@@ -1061,6 +1082,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
           ps->nrOfSymbols,
           ps->dl_dmrs_symb_pos,
           sched_pdsch->mcs,
+          nrOfLayers,
           TBS,
           current_harq_pid,
           harq->round,
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
index accb347533ebaeb15152e161ce3fd6d7dadb8034..fddf084a388ef4fc7245dc82ef410044eb3ac117 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
@@ -165,7 +165,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t   module_idP,
                                                     scc->dmrs_TypeA_Position,
                                                     NrOfSymbols,
                                                     StartSymbolIndex,
-                                                    mappingtype);
+                                                    mappingtype, 1);
 
     /*
     AssertFatal(k0==0,"k0 is not zero for Initial DL BWP TimeDomain Alloc\n");
@@ -278,12 +278,11 @@ void nr_preprocessor_phytest(module_id_t module_id,
               UE_id);
   NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
   const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1;
-  const long f = sched_ctrl->active_bwp ? sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats : 0;
   NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
   ps->nrOfLayers = target_dl_Nl;
-  if (ps->time_domain_allocation != tda)
-    nr_set_pdsch_semi_static(
-        scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, NULL, tda, f, ps);
+
+  if (ps->time_domain_allocation != tda || ps->nrOfLayers != target_dl_Nl)
+    nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, NULL, tda, target_dl_Nl, sched_ctrl, ps);
 
   /* find largest unallocated chunk */
   const int bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
@@ -520,12 +519,14 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
                                       sched_ctrl->coreset,
                                       Y);
 
-  if (sched_ctrl->cce_index < 0) {
+  if (CCEIndex < 0) {
     LOG_E(MAC, "%s(): CCE list not empty, couldn't schedule PUSCH\n", __func__);
     nr_mac->pdcch_cand[cid]--;
     return false;
   }
 
+  sched_ctrl->cce_index = CCEIndex;
+
   const int mcs = target_ul_mcs;
   NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
   sched_pusch->mcs = mcs;
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
index d2e5164ee70024f8113fb6996d41e38877287dc6..721f67295b751795f0297014eba454612d1314dc 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
@@ -113,6 +113,20 @@ uint8_t nr_ss_first_symb_idx_scs_120_120_mux3[4] = {4,8,2,6};
 uint8_t nr_max_number_of_candidates_per_slot[4] = {44, 36, 22, 20};
 uint8_t nr_max_number_of_cces_per_slot[4] = {56, 56, 48, 32};
 
+// CQI TABLES
+// Table 1 (38.214 5.2.2.1-2)
+uint16_t cqi_table1[16][2] = {{0,0},{2,78},{2,120},{2,193},{2,308},{2,449},{2,602},{4,378},
+                              {4,490},{4,616},{6,466},{6,567},{6,666},{6,772},{6,873},{6,948}};
+
+// Table 2 (38.214 5.2.2.1-3)
+uint16_t cqi_table2[16][2] = {{0,0},{2,78},{2,193},{2,449},{4,378},{4,490},{4,616},{6,466},
+                              {6,567},{6,666},{6,772},{6,873},{8,711},{8,797},{8,885},{8,948}};
+
+// Table 2 (38.214 5.2.2.1-4)
+uint16_t cqi_table3[16][2] = {{0,0},{2,30},{2,50},{2,78},{2,120},{2,193},{2,308},{2,449},
+                              {2,602},{4,378},{4,490},{4,616},{6,466},{6,567},{6,666},{6,772}};
+
+
 static inline uint8_t get_max_candidates(uint8_t scs) {
   AssertFatal(scs<4, "Invalid PDCCH subcarrier spacing %d\n", scs);
   return (nr_max_number_of_candidates_per_slot[scs]);
@@ -123,6 +137,59 @@ static inline uint8_t get_max_cces(uint8_t scs) {
   return (nr_max_number_of_cces_per_slot[scs]);
 }
 
+uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl) {
+
+  // TODO check this but it should be enough for now
+  // if there is not csi report RI is 0 from initialization
+  return (sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.ri + 1);
+
+}
+
+void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
+                NR_UE_sched_ctrl_t *sched_ctrl,
+                uint8_t *target_mcs,
+                uint8_t mcs_table_idx) {
+
+  if (sched_ctrl->set_mcs) {
+    // TODO for wideband case and multiple TB
+    int cqi_idx = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb;
+    uint16_t target_coderate,target_qm;
+    if (cqi_idx>0) {
+      int cqi_table = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.cqi_table;
+      AssertFatal(cqi_table == mcs_table_idx, "Indices of MCS tables don't correspond\n");
+      switch (cqi_table) {
+        case 0:
+          target_qm = cqi_table1[cqi_idx][0];
+          target_coderate = cqi_table1[cqi_idx][1];
+          break;
+        case 1:
+          target_qm = cqi_table2[cqi_idx][0];
+          target_coderate = cqi_table2[cqi_idx][1];
+          break;
+        case 2:
+          target_qm = cqi_table3[cqi_idx][0];
+          target_coderate = cqi_table3[cqi_idx][1];
+          break;
+        default:
+          AssertFatal(1==0,"Invalid cqi table index %d\n",cqi_table);
+      }
+      int max_mcs = 28;
+      int R,Qm;
+      if (mcs_table_idx == 1)
+        max_mcs = 27;
+      for (int i=0; i<=max_mcs; i++) {
+        R = nr_get_code_rate_dl(i, mcs_table_idx);
+        Qm = nr_get_Qm_dl(i, mcs_table_idx);
+        if ((Qm == target_qm) && (target_coderate <= R)) {
+          *target_mcs = i;
+          break;
+        }
+      }
+    }
+    sched_ctrl->set_mcs = FALSE;
+  }
+}
+
 void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
 
   //TODO first basic implementation of dmrs port selection
@@ -130,23 +197,29 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
   //     for now it assumes a selection of Nl consecutive dmrs ports
   //     and a single front loaded symbol
   //     dmrs_ports_id is the index of Tables 7.3.1.2.2-1/2/3/4
+  //     number of front loaded symbols need to be consistent with maxLength
+  //     when a more complete implementation is done
 
   switch (ps->nrOfLayers) {
     case 1:
       ps->dmrs_ports_id = 0;
       ps->numDmrsCdmGrpsNoData = 1;
+      ps->frontloaded_symb = 1;
       break;
     case 2:
       ps->dmrs_ports_id = 2;
       ps->numDmrsCdmGrpsNoData = 1;
+      ps->frontloaded_symb = 1;
       break;
     case 3:
       ps->dmrs_ports_id = 9;
       ps->numDmrsCdmGrpsNoData = 2;
+      ps->frontloaded_symb = 1;
       break;
     case 4:
       ps->dmrs_ports_id = 10;
       ps->numDmrsCdmGrpsNoData = 2;
+      ps->frontloaded_symb = 1;
       break;
     default:
       AssertFatal(1==0,"Number of layers %d\n not supported or not valid\n",ps->nrOfLayers);
@@ -385,16 +458,18 @@ void fill_pdcch_vrb_map(gNB_MAC_INST *mac,
 
 bool nr_find_nb_rb(uint16_t Qm,
                    uint16_t R,
+                   uint8_t nrOfLayers,
                    uint16_t nb_symb_sch,
                    uint16_t nb_dmrs_prb,
                    uint32_t bytes,
+                   uint16_t nb_rb_min,
                    uint16_t nb_rb_max,
                    uint32_t *tbs,
                    uint16_t *nb_rb)
 {
   /* is the maximum (not even) enough? */
   *nb_rb = nb_rb_max;
-  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, nrOfLayers) >> 3;
   /* check whether it does not fit, or whether it exactly fits. Some algorithms
    * might depend on the return value! */
   if (bytes > *tbs)
@@ -403,17 +478,17 @@ bool nr_find_nb_rb(uint16_t Qm,
     return true;
 
   /* is the minimum enough? */
-  *nb_rb = 5;
-  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+  *nb_rb = nb_rb_min;
+  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, nrOfLayers) >> 3;
   if (bytes <= *tbs)
     return true;
 
   /* perform binary search to allocate all bytes within a TBS up to nb_rb_max
    * RBs */
   int hi = nb_rb_max;
-  int lo = 1;
+  int lo = nb_rb_min;
   for (int p = (hi + lo) / 2; lo + 1 < hi; p = (hi + lo) / 2) {
-    const uint32_t TBS = nr_compute_tbs(Qm, R, p, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+    const uint32_t TBS = nr_compute_tbs(Qm, R, p, nb_symb_sch, nb_dmrs_prb, 0, 0, nrOfLayers) >> 3;
     if (bytes == TBS) {
       hi = p;
       break;
@@ -424,7 +499,7 @@ bool nr_find_nb_rb(uint16_t Qm,
     }
   }
   *nb_rb = hi;
-  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, nrOfLayers) >> 3;
   /* return whether we could allocate all bytes and stay below nb_rb_max */
   return *tbs >= bytes && *nb_rb <= nb_rb_max;
 }
@@ -434,18 +509,12 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
                               const NR_BWP_Downlink_t *bwp,
                               const NR_BWP_DownlinkDedicated_t *bwpd0,
                               int tda,
-                              const long dci_format,
+                              uint8_t layers,
+                              NR_UE_sched_ctrl_t *sched_ctrl,
                               NR_pdsch_semi_static_t *ps)
 {
-  ps->time_domain_allocation = tda;
+  bool reset_dmrs = false;
 
-  const struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = bwp ?
-      bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList :
-      scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
-  AssertFatal(tda < tdaList->list.count, "time_domain_allocation %d>=%d\n", tda, tdaList->list.count);
-  const int mapping_type = tdaList->list.array[tda]->mappingType;
-  const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
-  SLIV2SL(startSymbolAndLength, &ps->startSymbolIndex, &ps->nrOfSymbols);
   NR_BWP_DownlinkDedicated_t *bwpd;
 
   if (bwp && bwp->bwp_Dedicated) {
@@ -454,7 +523,6 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
     bwpd = (NR_BWP_DownlinkDedicated_t*)bwpd0;
   }
 
-  ps->mcsTableIdx = 0;
   if (bwpd->pdsch_Config &&
       bwpd->pdsch_Config->choice.setup &&
       bwpd->pdsch_Config->choice.setup->mcs_Table) {
@@ -465,15 +533,67 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
   }
   else ps->mcsTableIdx = 0;
 
-  if(dci_format == 0) // format 1_0
-    ps->numDmrsCdmGrpsNoData = (ps->nrOfSymbols == 2 ? 1 : 2);
+  NR_PDSCH_Config_t *pdsch_Config;
+  if (bwp &&
+      bwp->bwp_Dedicated &&
+      bwp->bwp_Dedicated->pdsch_Config &&
+      bwp->bwp_Dedicated->pdsch_Config->choice.setup)
+    pdsch_Config = bwp->bwp_Dedicated->pdsch_Config->choice.setup;
   else
-    set_dl_dmrs_ports(ps);
-  ps->dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
+    pdsch_Config = NULL;
+
+  if (ps->time_domain_allocation != tda) {
+    reset_dmrs = true;
+    ps->time_domain_allocation = tda;
+    const struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = bwp ?
+      bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList :
+      scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
+    AssertFatal(tda < tdaList->list.count, "time_domain_allocation %d>=%d\n", tda, tdaList->list.count);
+    ps->mapping_type = tdaList->list.array[tda]->mappingType;
+    if (pdsch_Config) {
+      if (ps->mapping_type == NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB)
+        ps->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_Type == NULL ? 0 : 1;
+      else
+        ps->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1;
+    }
+    else
+      ps->dmrsConfigType = NFAPI_NR_DMRS_TYPE1;
+    const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
+    SLIV2SL(startSymbolAndLength, &ps->startSymbolIndex, &ps->nrOfSymbols);
+  }
+
+  const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
+  int dci_format;
+  if (sched_ctrl->search_space) {
+    dci_format = f ? NR_DL_DCI_FORMAT_1_1 : NR_DL_DCI_FORMAT_1_0;
+  }
+  else {
+    dci_format = NR_DL_DCI_FORMAT_1_0;
+  }
+  if (dci_format == NR_DL_DCI_FORMAT_1_0) {
+    if (ps->nrOfSymbols == 2)
+      ps->numDmrsCdmGrpsNoData = 1;
+    else
+      ps->numDmrsCdmGrpsNoData = 2;
+    ps->dmrs_ports_id = 0;
+    ps->frontloaded_symb = 1;
+    ps->nrOfLayers = 1;
+  }
+  else {
+    if (ps->nrOfLayers != layers ||
+        ps->numDmrsCdmGrpsNoData == 0) {
+      reset_dmrs = true;
+      ps->nrOfLayers = layers;
+      set_dl_dmrs_ports(ps);
+    }
+  }
 
   ps->N_PRB_DMRS = ps->numDmrsCdmGrpsNoData * (ps->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
-  ps->dl_dmrs_symb_pos = fill_dmrs_mask(bwpd ? bwpd->pdsch_Config->choice.setup : NULL, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex, mapping_type);
-  ps->N_DMRS_SLOT = get_num_dmrs(ps->dl_dmrs_symb_pos);
+
+  if (reset_dmrs) {
+    ps->dl_dmrs_symb_pos = fill_dmrs_mask(bwpd ? bwpd->pdsch_Config->choice.setup : NULL, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex, ps->mapping_type, ps->frontloaded_symb);
+    ps->N_DMRS_SLOT = get_num_dmrs(ps->dl_dmrs_symb_pos);
+  }
   LOG_D(NR_MAC,"bwpd0 %p, bwpd %p : Filling dmrs info, ps->N_PRB_DMRS %d, ps->dl_dmrs_symb_pos %x, ps->N_DMRS_SLOT %d\n",bwpd0,bwpd,ps->N_PRB_DMRS,ps->dl_dmrs_symb_pos,ps->N_DMRS_SLOT);
 }
 
@@ -2027,6 +2147,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
       compute_csi_bitlen (CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup, UE_info, UE_id, mod_idP);
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
     memset(sched_ctrl, 0, sizeof(*sched_ctrl));
+    sched_ctrl->set_mcs = TRUE;
     sched_ctrl->lcid_mask = 0;
     if (!get_softmodem_params()->phy_test && !get_softmodem_params()->do_ra && !get_softmodem_params()->sa) {
       sched_ctrl->lcid_mask = 1<<DL_SCH_LCID_DTCH;
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
index 66de60eef1135096ad13f68e4bd2122c3a316dc4..cfff41a6adf7fd758868fc2d12b6550a459794d8 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
@@ -161,7 +161,7 @@ void nr_schedule_pucch(int Mod_idP,
 
 
 //! Calculating number of bits set
-uint8_t number_of_bits_set (uint8_t buf,uint8_t * max_ri){
+uint8_t number_of_bits_set (uint8_t buf){
   uint8_t nb_of_bits_set = 0;
   uint8_t mask = 0xff;
   uint8_t index = 0;
@@ -172,14 +172,13 @@ uint8_t number_of_bits_set (uint8_t buf,uint8_t * max_ri){
 
     mask>>=1;
   }
-  *max_ri = 8-index;
   return nb_of_bits_set;
 }
 
 
 void compute_rsrp_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
                          uint8_t nb_resources,
-                         nr_csi_report_t *csi_report){
+                         nr_csi_report_t *csi_report) {
 
   if (NR_CSI_ReportConfig__groupBasedBeamReporting_PR_disabled == csi_reportconfig->groupBasedBeamReporting.present) {
     if (NULL != csi_reportconfig->groupBasedBeamReporting.choice.disabled->nrofReportedRS)
@@ -211,42 +210,24 @@ uint8_t compute_ri_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
                           nr_csi_report_t *csi_report){
 
   struct NR_CodebookConfig *codebookConfig = csi_reportconfig->codebookConfig;
-  uint8_t nb_allowed_ri, ri_restriction,ri_bitlen;
-  uint8_t  max_ri = 0;
+  uint8_t nb_allowed_ri, ri_bitlen;
+  uint8_t ri_restriction = 0;
 
   if (codebookConfig == NULL) {
     csi_report->csi_meas_bitlen.ri_bitlen=0;
-    return max_ri;
+    return ri_restriction;
   }
 
   // codebook type1 single panel
   if (NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel==codebookConfig->codebookType.choice.type1->subType.present){
     struct NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel *type1single = codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel;
     if (type1single->nrOfAntennaPorts.present == NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_two){
-      // two antenna ports case
-      /*  From Spec 38.212
-       *  If the higher layer parameter nrofCQIsPerReport=1, nRI in Table 6.3.1.1.2-3 is the number of allowed rank indicator
-       *  values in the 4 LSBs of the higher layer parameter typeI-SinglePanel-ri-Restriction according to Subclause 5.2.2.2.1 [6,
-       *  TS 38.214]; otherwise nRI in Table 6.3.1.1.2-3 is the number of allowed rank indicator values according to Subclause
-       *  5.2.2.2.1 [6, TS 38.214].
-       *
-       *  But from Current RRC ASN structures nrofCQIsPerReport is not present. Present a dummy variable is present so using it to
-       *  calculate RI for antennas equal or more than two.
-       * */
-      AssertFatal (NULL!=csi_reportconfig->dummy, "nrofCQIsPerReport is not present");
 
       ri_restriction = csi_reportconfig->codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->typeI_SinglePanel_ri_Restriction.buf[0];
 
-      /* Replace dummy with the nrofCQIsPerReport from the CSIreport
-         config when equalent ASN structure present */
-      if (0==*(csi_reportconfig->dummy)){
-        nb_allowed_ri = number_of_bits_set((ri_restriction & 0xf0), &max_ri);
-        ri_bitlen = ceil(log2(nb_allowed_ri));
-      }
-      else{
-        nb_allowed_ri = number_of_bits_set(ri_restriction, &max_ri);
-        ri_bitlen = ceil(log2(nb_allowed_ri));
-      }
+      nb_allowed_ri = number_of_bits_set(ri_restriction);
+      ri_bitlen = ceil(log2(nb_allowed_ri));
+
       ri_bitlen = ri_bitlen<1?ri_bitlen:1; //from the spec 38.212 and table  6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel
       csi_report->csi_meas_bitlen.ri_bitlen=ri_bitlen;
     }
@@ -254,43 +235,27 @@ uint8_t compute_ri_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
       if (type1single->nrOfAntennaPorts.choice.moreThanTwo->n1_n2.present ==
           NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction) {
         // 4 ports
-        AssertFatal (NULL!=csi_reportconfig->dummy, "nrofCQIsPerReport is not present");
 
         ri_restriction = csi_reportconfig->codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->typeI_SinglePanel_ri_Restriction.buf[0];
 
-        /* Replace dummy with the nrofCQIsPerReport from the CSIreport
-           config when equalent ASN structure present*/
-        if (0==*(csi_reportconfig->dummy)){
-          nb_allowed_ri = number_of_bits_set((ri_restriction & 0xf0), &max_ri);
-          ri_bitlen = ceil(log2(nb_allowed_ri));
-        }
-        else{
-          nb_allowed_ri = number_of_bits_set(ri_restriction,&max_ri);
-          ri_bitlen = ceil(log2(nb_allowed_ri));
-        }
+        nb_allowed_ri = number_of_bits_set(ri_restriction);
+        ri_bitlen = ceil(log2(nb_allowed_ri));
+
         ri_bitlen = ri_bitlen<2?ri_bitlen:2; //from the spec 38.212 and table  6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel
         csi_report->csi_meas_bitlen.ri_bitlen=ri_bitlen;
       }
       else {
         // more than 4 ports
-        AssertFatal (NULL!=csi_reportconfig->dummy, "nrofCQIsPerReport is not present");
 
         ri_restriction = csi_reportconfig->codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->typeI_SinglePanel_ri_Restriction.buf[0];
 
-        /* Replace dummy with the nrofCQIsPerReport from the CSIreport
-           config when equalent ASN structure present */
-        if (0==*(csi_reportconfig->dummy)){
-          nb_allowed_ri = number_of_bits_set((ri_restriction & 0xf0),&max_ri);
-          ri_bitlen = ceil(log2(nb_allowed_ri));
-        }
-        else{
-          nb_allowed_ri = number_of_bits_set(ri_restriction, &max_ri);
-          ri_bitlen = ceil(log2(nb_allowed_ri));
-        }
+        nb_allowed_ri = number_of_bits_set(ri_restriction);
+        ri_bitlen = ceil(log2(nb_allowed_ri));
+
         csi_report->csi_meas_bitlen.ri_bitlen=ri_bitlen;
       }
     }
-    return max_ri;
+    return ri_restriction;
   }
   else 
     AssertFatal(1==0,"Other configurations not yet implemented\n");
@@ -298,66 +263,295 @@ uint8_t compute_ri_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
 }
 
 void compute_li_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
-                       uint8_t max_ri,
+                       uint8_t ri_restriction,
                        nr_csi_report_t *csi_report){
 
   struct NR_CodebookConfig *codebookConfig = csi_reportconfig->codebookConfig;
-  if (codebookConfig == NULL) {
-    csi_report->csi_meas_bitlen.li_bitlen=0;
-    return;
+  for(int i=0; i<8; i++) {
+    if (codebookConfig == NULL || ((ri_restriction>>i)&0x01) == 0)
+      csi_report->csi_meas_bitlen.li_bitlen[i]=0;
+    else {
+      // codebook type1 single panel
+      if (NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel==codebookConfig->codebookType.choice.type1->subType.present)
+        csi_report->csi_meas_bitlen.li_bitlen[i]=ceil(log2(i+1))<2?ceil(log2(i+1)):2;
+      else
+        AssertFatal(1==0,"Other configurations not yet implemented\n");
+    }
   }
-  // codebook type1 single panel
-  if (NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel==codebookConfig->codebookType.choice.type1->subType.present){
-    /* From Spec 38.212
-     *  If the higher layer parameter nrofCQIsPerReport=1, nRI in Table 6.3.1.1.2-3 is the number of allowed rank indicator
-     *  values in the 4 LSBs of the higher layer parameter typeI-SinglePanel-ri-Restriction according to Subclause 5.2.2.2.1 [6,
-     *  TS 38.214]; otherwise nRI in Table 6.3.1.1.2-3 is the number of allowed rank indicator values according to Subclause
-     *  5.2.2.2.1 [6, TS 38.214].
-     *
-     *  But from Current RRC ASN structures nrofCQIsPerReport is not present. Present a dummy variable is present so using it to
-     *  calculate RI for antennas equal or more than two.
-     */
-     //! TODO: The bit length of LI is as follows LI = log2(RI), Need to confirm wheather we should consider maximum RI can be reported from ri_restricted
-     //        or we should consider reported RI. If we need to consider reported RI for calculating LI bit length then we need to modify the code.
-     csi_report->csi_meas_bitlen.li_bitlen=ceil(log2(max_ri))<2?ceil(log2(max_ri)):2;
+}
+
+
+void get_n1n2_o1o2_singlepanel(int *n1, int *n2, int *o1, int *o2,
+                               struct NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo *morethantwo) {
+
+  // Table 5.2.2.2.1-2 in 38.214 for supported configurations
+  switch(morethantwo->n1_n2.present){
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction):
+      *n1 = 2;
+      *n2 = 1;
+      *o1 = 4;
+      *o2 = 1;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_two_TypeI_SinglePanel_Restriction):
+      *n1 = 2;
+      *n2 = 2;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_one_TypeI_SinglePanel_Restriction):
+      *n1 = 4;
+      *n2 = 1;
+      *o1 = 4;
+      *o2 = 1;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_three_two_TypeI_SinglePanel_Restriction):
+      *n1 = 3;
+      *n2 = 2;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_one_TypeI_SinglePanel_Restriction):
+      *n1 = 6;
+      *n2 = 1;
+      *o1 = 4;
+      *o2 = 1;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_two_TypeI_SinglePanel_Restriction):
+      *n1 = 4;
+      *n2 = 2;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_eight_one_TypeI_SinglePanel_Restriction):
+      *n1 = 8;
+      *n2 = 1;
+      *o1 = 4;
+      *o2 = 1;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_three_TypeI_SinglePanel_Restriction):
+      *n1 = 4;
+      *n2 = 3;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_two_TypeI_SinglePanel_Restriction):
+      *n1 = 4;
+      *n2 = 2;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_twelve_one_TypeI_SinglePanel_Restriction):
+      *n1 = 12;
+      *n2 = 1;
+      *o1 = 4;
+      *o2 = 1;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_four_TypeI_SinglePanel_Restriction):
+      *n1 = 4;
+      *n2 = 4;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_eight_two_TypeI_SinglePanel_Restriction):
+      *n1 = 8;
+      *n2 = 2;
+      *o1 = 4;
+      *o2 = 4;
+      break;
+    case (NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_sixteen_one_TypeI_SinglePanel_Restriction):
+      *n1 = 16;
+      *n2 = 1;
+      *o1 = 4;
+      *o2 = 1;
+      break;
+  default:
+    AssertFatal(1==0,"Not supported configuration for n1_n2 in codebook configuration");
+  }
+}
+
+void get_x1x2_bitlen_singlepanel(int n1, int n2, int o1, int o2,
+                                 int *x1, int *x2, int rank, int codebook_mode) {
+
+  // Table 6.3.1.1.2-1 in 38.212
+  switch(rank){
+    case 1:
+      if(n2>1) {
+        if (codebook_mode == 1) {
+          *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+          *x2 = 2;
+        }
+        else {
+          *x1 = ceil(log2(n1*o1/2)) + ceil(log2(n2*o2/2));
+          *x2 = 4;
+        }
+      }
+      else{
+        if (codebook_mode == 1) {
+          *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+          *x2 = 2;
+        }
+        else {
+          *x1 = ceil(log2(n1*o1/2));
+          *x2 = 4;
+        }
+      }
+      break;
+    case 2:
+      if(n1*n2 == 2) {
+        if (codebook_mode == 1) {
+          *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+          *x2 = 1;
+        }
+        else {
+          *x1 = ceil(log2(n1*o1/2));
+          *x2 = 3;
+        }
+        *x1 += 1;
+      }
+      else {
+        if(n2>1) {
+          if (codebook_mode == 1) {
+            *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+            *x2 = 3;
+          }
+          else {
+            *x1 = ceil(log2(n1*o1/2)) + ceil(log2(n2*o2/2));
+            *x2 = 3;
+          }
+        }
+        else{
+          if (codebook_mode == 1) {
+            *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+            *x2 = 1;
+          }
+          else {
+            *x1 = ceil(log2(n1*o1/2));
+            *x2 = 3;
+          }
+        }
+        *x1 += 2;
+      }
+      break;
+    case 3:
+    case 4:
+      if(n1*n2 == 2) {
+        *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+        *x2 = 1;
+      }
+      else {
+        if(n1*n2 >= 8) {
+          *x1 = ceil(log2(n1*o1/2)) + ceil(log2(n2*o2)) + 2;
+          *x2 = 1;
+        }
+        else {
+          *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2)) + 2;
+          *x2 = 1;
+        }
+      }
+      break;
+    case 5:
+    case 6:
+      *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+      *x2 = 1;
+      break;
+    case 7:
+    case 8:
+      if(n1 == 4 && n2 == 1) {
+        *x1 = ceil(log2(n1*o1/2)) + ceil(log2(n2*o2));
+        *x2 = 1;
+      }
+      else {
+        if(n1 > 2 && n2 == 2) {
+          *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2/2));
+          *x2 = 1;
+        }
+        else {
+          *x1 = ceil(log2(n1*o1)) + ceil(log2(n2*o2));
+          *x2 = 1;
+        }
+      }
+      break;
+  default:
+    AssertFatal(1==0,"Invalid rank in x1 x2 bit length computation\n");
   }
-  else
-    AssertFatal(1==0,"Other configurations not yet implemented\n");
 }
 
 
+void compute_pmi_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
+                        uint8_t ri_restriction,
+                        nr_csi_report_t *csi_report){
+
+  struct NR_CodebookConfig *codebookConfig = csi_reportconfig->codebookConfig;
+  for(int i=0; i<8; i++) {
+    csi_report->csi_meas_bitlen.pmi_x1_bitlen[i]=0;
+    csi_report->csi_meas_bitlen.pmi_x2_bitlen[i]=0;
+    if (codebookConfig == NULL || ((ri_restriction>>i)&0x01) == 0)
+      return;
+    else {
+      if(codebookConfig->codebookType.present == NR_CodebookConfig__codebookType_PR_type1) {
+        if(codebookConfig->codebookType.choice.type1->subType.present == NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel) {
+          if(codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->nrOfAntennaPorts.present ==
+             NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_two) {
+            if (i==0)
+              csi_report->csi_meas_bitlen.pmi_x2_bitlen[i]=2;
+            if (i==1)
+              csi_report->csi_meas_bitlen.pmi_x2_bitlen[i]=1;
+          }
+          else {  // more than two
+            int n1,n2,o1,o2,x1,x2;
+            get_n1n2_o1o2_singlepanel(&n1,&n2,&o1,&o2,codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel->nrOfAntennaPorts.choice.moreThanTwo);
+            get_x1x2_bitlen_singlepanel(n1,n2,o1,o2,&x1,&x2,i+1,codebookConfig->codebookType.choice.type1->codebookMode);
+            csi_report->csi_meas_bitlen.pmi_x1_bitlen[i]=x1;
+            csi_report->csi_meas_bitlen.pmi_x2_bitlen[i]=x2;
+          }
+        }
+        else
+          AssertFatal(1==0,"Type1 Multi-panel Codebook Config not yet implemented\n");
+      }
+      else
+        AssertFatal(1==0,"Type2 Codebook Config not yet implemented\n");
+    }
+  }
+}
+
 void compute_cqi_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
-                        uint8_t max_ri,
+                        uint8_t ri_restriction,
                         nr_csi_report_t *csi_report){
 
   struct NR_CodebookConfig *codebookConfig = csi_reportconfig->codebookConfig;
   struct NR_CSI_ReportConfig__reportFreqConfiguration *freq_config = csi_reportconfig->reportFreqConfiguration;
 
   if (*freq_config->cqi_FormatIndicator == NR_CSI_ReportConfig__reportFreqConfiguration__cqi_FormatIndicator_widebandCQI) {
-    csi_report->csi_meas_bitlen.cqi_bitlen = 4;
-    if(codebookConfig != NULL) {
-      if (NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel == codebookConfig->codebookType.choice.type1->subType.present){
-        struct NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel *type1single = codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel;
-        if (type1single->nrOfAntennaPorts.present == NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_moreThanTwo) {
-          if (type1single->nrOfAntennaPorts.choice.moreThanTwo->n1_n2.present >
-              NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction) {
-            // more than 4 antenna ports
-            if (max_ri > 4)
-              csi_report->csi_meas_bitlen.cqi_bitlen += 4; // CQI for second TB
+    for(int i=0; i<8; i++) {
+      if ((ri_restriction>>i)&0x01) {
+        csi_report->csi_meas_bitlen.cqi_bitlen[i] = 4;
+        if(codebookConfig != NULL) {
+          if (NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel == codebookConfig->codebookType.choice.type1->subType.present){
+            struct NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel *type1single = codebookConfig->codebookType.choice.type1->subType.choice.typeI_SinglePanel;
+            if (type1single->nrOfAntennaPorts.present == NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_moreThanTwo) {
+              if (type1single->nrOfAntennaPorts.choice.moreThanTwo->n1_n2.present >
+                  NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction) {
+                // more than 4 antenna ports
+                if (i > 4)
+                  csi_report->csi_meas_bitlen.cqi_bitlen[i] += 4; // CQI for second TB
+              }
+            }
           }
         }
       }
+      else
+        csi_report->csi_meas_bitlen.cqi_bitlen[i] = 0;
     }
   }
   else
     AssertFatal(1==0,"Sub-band CQI reporting not yet supported");
 }
 
+
 //!TODO : same function can be written to handle csi_resources
 void compute_csi_bitlen(NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_info_t *UE_info, int UE_id, module_id_t Mod_idP){
   uint8_t csi_report_id = 0;
   uint8_t nb_resources = 0;
-  uint8_t max_ri = 0;
   NR_CSI_ReportConfig__reportQuantity_PR reportQuantity_type;
   NR_CSI_ResourceConfigId_t csi_ResourceConfigId;
   struct NR_CSI_ResourceConfig *csi_resourceconfig;
@@ -428,8 +622,21 @@ void compute_csi_bitlen(NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_info_t *UE_in
         break;
       case (NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI):
         csi_report->csi_meas_bitlen.cri_bitlen=ceil(log2(nb_resources));
-        max_ri = compute_ri_bitlen(csi_reportconfig, csi_report);
-        compute_cqi_bitlen(csi_reportconfig, max_ri, csi_report);
+        csi_report->csi_meas_bitlen.ri_restriction = compute_ri_bitlen(csi_reportconfig, csi_report);
+        compute_cqi_bitlen(csi_reportconfig, csi_report->csi_meas_bitlen.ri_restriction, csi_report);
+        break;
+      case (NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI):
+        csi_report->csi_meas_bitlen.cri_bitlen=ceil(log2(nb_resources));
+        csi_report->csi_meas_bitlen.ri_restriction = compute_ri_bitlen(csi_reportconfig, csi_report);
+        compute_cqi_bitlen(csi_reportconfig, csi_report->csi_meas_bitlen.ri_restriction, csi_report);
+        compute_pmi_bitlen(csi_reportconfig, csi_report->csi_meas_bitlen.ri_restriction, csi_report);
+        break;
+      case (NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_LI_PMI_CQI):
+        csi_report->csi_meas_bitlen.cri_bitlen=ceil(log2(nb_resources));
+        csi_report->csi_meas_bitlen.ri_restriction = compute_ri_bitlen(csi_reportconfig, csi_report);
+        compute_li_bitlen(csi_reportconfig, csi_report->csi_meas_bitlen.ri_restriction, csi_report);
+        compute_cqi_bitlen(csi_reportconfig, csi_report->csi_meas_bitlen.ri_restriction, csi_report);
+        compute_pmi_bitlen(csi_reportconfig, csi_report->csi_meas_bitlen.ri_restriction, csi_report);
         break;
     default:
       AssertFatal(1==0,"Not yet supported CSI report quantity type");
@@ -442,7 +649,8 @@ uint16_t nr_get_csi_bitlen(int Mod_idP,
                            int UE_id,
                            uint8_t csi_report_id) {
 
-  uint16_t csi_bitlen =0;
+  uint16_t csi_bitlen = 0;
+  uint16_t max_bitlen = 0;
   NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
   L1_RSRP_bitlen_t * CSI_report_bitlen = NULL;
   CSI_Meas_bitlen_t * csi_meas_bitlen = NULL;
@@ -455,7 +663,18 @@ uint16_t nr_get_csi_bitlen(int Mod_idP,
                   (CSI_report_bitlen->nb_ssbri_cri -1 )));
   } else{
    csi_meas_bitlen = &(UE_info->csi_report_template[UE_id][csi_report_id].csi_meas_bitlen); //This might need to be moodif for Aperiodic CSI-RS measurements
-   csi_bitlen+= (csi_meas_bitlen->cri_bitlen +csi_meas_bitlen->ri_bitlen+csi_meas_bitlen->li_bitlen+csi_meas_bitlen->cqi_bitlen+csi_meas_bitlen->pmi_x1_bitlen+csi_meas_bitlen->pmi_x2_bitlen);
+   uint16_t temp_bitlen;
+   for (int i=0; i<8; i++) {
+     temp_bitlen = (csi_meas_bitlen->cri_bitlen+
+                    csi_meas_bitlen->ri_bitlen+
+                    csi_meas_bitlen->li_bitlen[i]+
+                    csi_meas_bitlen->cqi_bitlen[i]+
+                    csi_meas_bitlen->pmi_x1_bitlen[i]+
+                    csi_meas_bitlen->pmi_x2_bitlen[i]);
+     if(temp_bitlen>max_bitlen)
+       max_bitlen = temp_bitlen;
+   }
+   csi_bitlen += max_bitlen;
  }
 
   return csi_bitlen;
@@ -718,37 +937,33 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
   idx: resource set index
   */
 
-  //for all reported SSB
-  for (idx = 0; idx < nb_of_csi_ssb_report; idx++) {
-    nr_ssbri_cri = sched_ctrl->CSI_report[idx].choice.ssb_cri_report.nr_ssbri_cri;
-      //extracting the ssb indexes
-      for (ssb_idx = 0; ssb_idx < nr_ssbri_cri; ssb_idx++) {
-        ssb_index[idx * nb_of_csi_ssb_report + ssb_idx] = sched_ctrl->CSI_report[idx].choice.ssb_cri_report.CRI_SSBRI[ssb_idx];
-      }
+  nr_ssbri_cri = sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri;
+  //extracting the ssb indexes
+  for (ssb_idx = 0; ssb_idx < nr_ssbri_cri; ssb_idx++) {
+    ssb_index[idx * nb_of_csi_ssb_report + ssb_idx] = sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[ssb_idx];
+  }
 
-      //if strongest measured RSRP is configured
-      strongest_ssb_rsrp = get_measured_rsrp(sched_ctrl->CSI_report[idx].choice.ssb_cri_report.RSRP);
-      ssb_rsrp[idx * nb_of_csi_ssb_report] = strongest_ssb_rsrp;
-      LOG_D(NR_MAC,"ssb_rsrp = %d\n",strongest_ssb_rsrp);
+  //if strongest measured RSRP is configured
+  strongest_ssb_rsrp = get_measured_rsrp(sched_ctrl->CSI_report.ssb_cri_report.RSRP);
+  ssb_rsrp[idx * nb_of_csi_ssb_report] = strongest_ssb_rsrp;
+  LOG_D(NR_MAC,"ssb_rsrp = %d\n",strongest_ssb_rsrp);
 
-      //if current ssb rsrp is greater than better rsrp
-      if(ssb_rsrp[idx * nb_of_csi_ssb_report] > better_rsrp_reported) {
-        better_rsrp_reported = ssb_rsrp[idx * nb_of_csi_ssb_report];
-        target_ssb_beam_index = idx * nb_of_csi_ssb_report;
-      }
+  //if current ssb rsrp is greater than better rsrp
+  if(ssb_rsrp[idx * nb_of_csi_ssb_report] > better_rsrp_reported) {
+    better_rsrp_reported = ssb_rsrp[idx * nb_of_csi_ssb_report];
+    target_ssb_beam_index = idx * nb_of_csi_ssb_report;
+  }
 
-      for(diff_rsrp_idx =1; diff_rsrp_idx < nr_ssbri_cri; diff_rsrp_idx++) {
-        ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] = get_diff_rsrp(sched_ctrl->CSI_report[idx].choice.ssb_cri_report.diff_RSRP[diff_rsrp_idx-1], strongest_ssb_rsrp);
+  for(diff_rsrp_idx =1; diff_rsrp_idx < nr_ssbri_cri; diff_rsrp_idx++) {
+    ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] = get_diff_rsrp(sched_ctrl->CSI_report.ssb_cri_report.diff_RSRP[diff_rsrp_idx-1], strongest_ssb_rsrp);
 
-        //if current reported rsrp is greater than better rsrp
-        if(ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] > better_rsrp_reported) {
-          better_rsrp_reported = ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx];
-          target_ssb_beam_index = idx * nb_of_csi_ssb_report + diff_rsrp_idx;
-        }
-      }
+    //if current reported rsrp is greater than better rsrp
+    if(ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx] > better_rsrp_reported) {
+      better_rsrp_reported = ssb_rsrp[idx * nb_of_csi_ssb_report + diff_rsrp_idx];
+      target_ssb_beam_index = idx * nb_of_csi_ssb_report + diff_rsrp_idx;
+    }
   }
 
-
   if(ssb_index[target_ssb_beam_index] != ssb_index[curr_ssb_beam_index] && ssb_rsrp[target_ssb_beam_index] > ssb_rsrp[curr_ssb_beam_index]) {
     if( ssb_rsrp[target_ssb_beam_index] - ssb_rsrp[curr_ssb_beam_index] > L1_RSRP_HYSTERIS) {
       is_triggering_ssb_beam_switch = 1;
@@ -876,7 +1091,8 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
                           int *cumul_bits,
                           NR_CSI_ReportConfig__reportQuantity_PR reportQuantity_type){
 
-  uint8_t cri_ssbri_bitlen = UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen.cri_ssbri_bitlen;
+  nr_csi_report_t *csi_report = &UE_info->csi_report_template[UE_id][csi_report_id];
+  uint8_t cri_ssbri_bitlen = csi_report->CSI_report_bitlen.cri_ssbri_bitlen;
   uint16_t curr_payload;
 
   /*! As per the spec 38.212 and table:  6.3.1.1.2-12 in a single UCI sequence we can have multiple CSI_report
@@ -897,44 +1113,43 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
     multiple simultaneous spatial domain receive filter
   */
 
-  int idx = 0; //Since for SSB RSRP reporting in RRC can configure only one ssb resource set per one report config
-  sched_ctrl->CSI_report[idx].choice.ssb_cri_report.nr_ssbri_cri = UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen.nb_ssbri_cri;
+  sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri = csi_report->CSI_report_bitlen.nb_ssbri_cri;
 
-  for (int csi_ssb_idx = 0; csi_ssb_idx < sched_ctrl->CSI_report[idx].choice.ssb_cri_report.nr_ssbri_cri ; csi_ssb_idx++) {
+  for (int csi_ssb_idx = 0; csi_ssb_idx < sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri ; csi_ssb_idx++) {
     curr_payload = pickandreverse_bits(payload, cri_ssbri_bitlen, *cumul_bits);
 
-    if (NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP == reportQuantity_type)
-      sched_ctrl->CSI_report[idx].choice.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] =
-        *(UE_info->csi_report_template[UE_id][csi_report_id].SSB_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]);
-    else
-      sched_ctrl->CSI_report[idx].choice.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] =
-        *(UE_info->csi_report_template[UE_id][csi_report_id].CSI_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]);
-
+    if (NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP == reportQuantity_type) {
+      sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] =
+        *(csi_report->SSB_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]);
+      LOG_D(MAC,"SSB_index = %d\n",sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]);
+    }
+    else {
+      sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx] =
+        *(csi_report->CSI_Index_list[cri_ssbri_bitlen>0?((curr_payload)&~(~1<<(cri_ssbri_bitlen-1))):cri_ssbri_bitlen]);
+      LOG_D(MAC,"CSI-RS Resource Indicator = %d\n",sched_ctrl->CSI_report.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]);
+    }
     *cumul_bits += cri_ssbri_bitlen;
-    if(UE_info->csi_report_template[UE_id][csi_report_id].reportQuantity_type == NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP)
-      LOG_D(MAC,"CSI-RS Resource Indicator = %d\n",sched_ctrl->CSI_report[idx].choice.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]);
-    else
-      LOG_D(MAC,"SSB Resource Indicator = %d\n",sched_ctrl->CSI_report[idx].choice.ssb_cri_report.CRI_SSBRI[csi_ssb_idx]);
+
   }
 
   curr_payload = pickandreverse_bits(payload, 7, *cumul_bits);
-  sched_ctrl->CSI_report[idx].choice.ssb_cri_report.RSRP = curr_payload & 0x7f;
+  sched_ctrl->CSI_report.ssb_cri_report.RSRP = curr_payload & 0x7f;
   *cumul_bits += 7;
 
-  for (int diff_rsrp_idx =0; diff_rsrp_idx < sched_ctrl->CSI_report[idx].choice.ssb_cri_report.nr_ssbri_cri - 1; diff_rsrp_idx++ ) {
+  for (int diff_rsrp_idx =0; diff_rsrp_idx < sched_ctrl->CSI_report.ssb_cri_report.nr_ssbri_cri - 1; diff_rsrp_idx++ ) {
     curr_payload = pickandreverse_bits(payload, 4, *cumul_bits);
-    sched_ctrl->CSI_report[idx].choice.ssb_cri_report.diff_RSRP[diff_rsrp_idx] = curr_payload & 0x0f;
+    sched_ctrl->CSI_report.ssb_cri_report.diff_RSRP[diff_rsrp_idx] = curr_payload & 0x0f;
     *cumul_bits += 4;
   }
-  UE_info->csi_report_template[UE_id][csi_report_id].nb_of_csi_ssb_report++;
-  int strongest_ssb_rsrp = get_measured_rsrp(sched_ctrl->CSI_report[idx].choice.ssb_cri_report.RSRP);
+  csi_report->nb_of_csi_ssb_report++;
+  int strongest_ssb_rsrp = get_measured_rsrp(sched_ctrl->CSI_report.ssb_cri_report.RSRP);
   NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id];
   // including ssb rsrp in mac stats
   stats->cumul_rsrp += strongest_ssb_rsrp;
   stats->num_rsrp_meas++;
   LOG_D(MAC,"rsrp_id = %d rsrp = %d\n",
-        sched_ctrl->CSI_report[idx].choice.ssb_cri_report.RSRP,
-        strongest_ssb_rsrp);
+        sched_ctrl->CSI_report.ssb_cri_report.RSRP,
+        get_measured_rsrp(sched_ctrl->CSI_report.ssb_cri_report.RSRP));
 }
 
 
@@ -943,39 +1158,122 @@ void evaluate_cri_report(uint8_t *payload,
                          int cumul_bits,
                          NR_UE_sched_ctrl_t *sched_ctrl){
 
-  int idx = 0; // FIXME not sure about this index. Should it be the same as csi_report_id?
-
   uint8_t temp_cri = pickandreverse_bits(payload, cri_bitlen, cumul_bits);
-  sched_ctrl->CSI_report[idx].choice.cri_ri_li_pmi_cqi_report.cri = temp_cri;
+  sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.cri = temp_cri;
 }
 
-void evaluate_ri_report(uint8_t *payload,
-                        uint8_t ri_bitlen,
-                        NR_UE_sched_ctrl_t *sched_ctrl){
-
-  AssertFatal(1==0,"Evaluation of RI report not yet implemented\n");
+int evaluate_ri_report(uint8_t *payload,
+                       uint8_t ri_bitlen,
+                       uint8_t ri_restriction,
+                       int cumul_bits,
+                       NR_UE_sched_ctrl_t *sched_ctrl){
+
+  uint8_t ri_index = pickandreverse_bits(payload, ri_bitlen, cumul_bits);
+  int count=0;
+  for (int i=0; i<8; i++) {
+     if ((ri_restriction>>i)&0x01) {
+       if(count == ri_index) {
+         sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.ri = i;
+         LOG_I(MAC,"CSI Reported Rank %d\n", i+1);
+         return i;
+       }
+       count++;
+     }
+  }
+  AssertFatal(1==0, "Decoded ri %d does not correspond to any valid value in ri_restriction %d\n",ri_index,ri_restriction);
 }
 
 
 void evaluate_cqi_report(uint8_t *payload,
-                         uint8_t cqi_bitlen,
-                         int *cumul_bits,
-                         NR_UE_sched_ctrl_t *sched_ctrl){
+                         nr_csi_report_t *csi_report,
+                         int cumul_bits,
+                         uint8_t ri,
+                         NR_UE_sched_ctrl_t *sched_ctrl,
+                         long *cqi_Table){
 
   //TODO sub-band CQI report not yet implemented
-  int idx = 0; // FIXME not sure about this index. Should it be the same as csi_report_id?
-  
-  uint8_t temp_cqi = pickandreverse_bits(payload, 4, *cumul_bits);
-  sched_ctrl->CSI_report[idx].choice.cri_ri_li_pmi_cqi_report.wb_cqi_1tb = temp_cqi;
-  *cumul_bits += 4;
+  int cqi_bitlen = csi_report->csi_meas_bitlen.cqi_bitlen[ri];
+
+  uint8_t temp_cqi = pickandreverse_bits(payload, 4, cumul_bits);
+
+  // NR_CSI_ReportConfig__cqi_Table_table1	= 0
+  // NR_CSI_ReportConfig__cqi_Table_table2	= 1
+  // NR_CSI_ReportConfig__cqi_Table_table3	= 2
+  if (cqi_Table)
+    sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.cqi_table = *cqi_Table;
+  else
+    AssertFatal(1==0,"CQI Table not present in RRC configuration\n");
+  sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb = temp_cqi;
   LOG_I(MAC,"Wide-band CQI for the first TB %d\n", temp_cqi);
   if (cqi_bitlen > 4) {
-    temp_cqi = pickandreverse_bits(payload, 4, *cumul_bits);
-    sched_ctrl->CSI_report[idx].choice.cri_ri_li_pmi_cqi_report.wb_cqi_2tb = temp_cqi;
+    temp_cqi = pickandreverse_bits(payload, 4, cumul_bits);
+    sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_2tb = temp_cqi;
     LOG_D(MAC,"Wide-band CQI for the second TB %d\n", temp_cqi);
   }
+  sched_ctrl->set_mcs = TRUE;
+}
+
+
+uint8_t evaluate_pmi_report(uint8_t *payload,
+                            nr_csi_report_t *csi_report,
+                            int cumul_bits,
+                            uint8_t ri,
+                            NR_UE_sched_ctrl_t *sched_ctrl){
+
+  int x1_bitlen = csi_report->csi_meas_bitlen.pmi_x1_bitlen[ri];
+  int x2_bitlen = csi_report->csi_meas_bitlen.pmi_x2_bitlen[ri];
+  int tot_bitlen = x1_bitlen + x2_bitlen;
+
+  //in case of 2 port CSI configuration x1 is empty and the information bits are in x2
+  int temp_pmi = pickandreverse_bits(payload, tot_bitlen, cumul_bits);
+
+  sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1 = temp_pmi&((1<<x1_bitlen)-1);
+  sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2 = (temp_pmi>>x1_bitlen)&((1<<x2_bitlen)-1);
+  LOG_I(MAC,"PMI Report: X1 %d X2 %d\n",
+        sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1,
+        sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2);
+
+  return tot_bitlen;
+
+}
+
+
+int evaluate_li_report(uint8_t *payload,
+                       nr_csi_report_t *csi_report,
+                       int cumul_bits,
+                       uint8_t ri,
+                       NR_UE_sched_ctrl_t *sched_ctrl){
+
+  int li_bitlen = csi_report->csi_meas_bitlen.li_bitlen[ri];
+
+  if (li_bitlen>0) {
+    int temp_li = pickandreverse_bits(payload, li_bitlen, cumul_bits);
+    LOG_I(MAC,"LI %d\n",temp_li);
+    sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.li = temp_li;
+  }
+  return li_bitlen;
+
 }
 
+void skip_zero_padding(int *cumul_bits,
+                       nr_csi_report_t *csi_report,
+                       uint8_t ri,
+                       uint16_t max_bitlen) {
+
+  // actual number of reported bits depends on the reported rank
+  // zero padding bits are added to have a predetermined max bit length to decode
+
+  uint16_t reported_bitlen = csi_report->csi_meas_bitlen.cri_bitlen+
+                             csi_report->csi_meas_bitlen.ri_bitlen+
+                             csi_report->csi_meas_bitlen.li_bitlen[ri]+
+                             csi_report->csi_meas_bitlen.cqi_bitlen[ri]+
+                             csi_report->csi_meas_bitlen.pmi_x1_bitlen[ri]+
+                             csi_report->csi_meas_bitlen.pmi_x2_bitlen[ri];
+
+  *cumul_bits+=(max_bitlen-reported_bitlen);
+}
+
+
 void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
                               const nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu,
                               frame_t frame,
@@ -988,21 +1286,25 @@ void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
       RC.nrmac[Mod_idP]->common_channels->ServingCellConfigCommon;
   const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
   uint8_t *payload = uci_pdu->csi_part1.csi_part1_payload;
+  uint16_t bitlen = uci_pdu->csi_part1.csi_part1_bit_len;
   NR_CSI_ReportConfig__reportQuantity_PR reportQuantity_type = NR_CSI_ReportConfig__reportQuantity_PR_NOTHING;
   NR_UE_info_t *UE_info = &(RC.nrmac[Mod_idP]->UE_info);
   NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
   int cumul_bits = 0;
+  int r_index = -1;
   for (int csi_report_id = 0; csi_report_id < csi_MeasConfig->csi_ReportConfigToAddModList->list.count; csi_report_id++ ) {
-    UE_info->csi_report_template[UE_id][csi_report_id].nb_of_csi_ssb_report = 0;
+    nr_csi_report_t *csi_report = &UE_info->csi_report_template[UE_id][csi_report_id];
+    csi_report->nb_of_csi_ssb_report = 0;
     uint8_t cri_bitlen = 0;
     uint8_t ri_bitlen = 0;
-    uint8_t cqi_bitlen = 0;
+    uint8_t li_bitlen = 0;
+    uint8_t pmi_bitlen = 0;
     NR_CSI_ReportConfig_t *csirep = csi_MeasConfig->csi_ReportConfigToAddModList->list.array[csi_report_id];
     int period, offset;
     csi_period_offset(csirep, NULL, &period, &offset);
     // verify if report with current id has been scheduled for this frame and slot
     if ((n_slots_frame*frame + slot - offset)%period == 0) {
-      reportQuantity_type = UE_info->csi_report_template[UE_id][csi_report_id].reportQuantity_type;
+      reportQuantity_type = csi_report->reportQuantity_type;
       LOG_D(MAC,"SFN/SF:%d/%d reportQuantity type = %d\n",frame,slot,reportQuantity_type);
       switch(reportQuantity_type){
         case NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP:
@@ -1012,18 +1314,49 @@ void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
           evaluate_rsrp_report(UE_info,sched_ctrl,UE_id,csi_report_id,payload,&cumul_bits,reportQuantity_type);
           break;
         case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI:
-          cri_bitlen = UE_info->csi_report_template[UE_id][csi_report_id].csi_meas_bitlen.cri_bitlen;
+          cri_bitlen = csi_report->csi_meas_bitlen.cri_bitlen;
+          if(cri_bitlen)
+            evaluate_cri_report(payload,cri_bitlen,cumul_bits,sched_ctrl);
+          cumul_bits += cri_bitlen;
+          ri_bitlen = csi_report->csi_meas_bitlen.ri_bitlen;
+          if(ri_bitlen)
+            r_index = evaluate_ri_report(payload,ri_bitlen,csi_report->csi_meas_bitlen.ri_restriction,cumul_bits,sched_ctrl);
+          cumul_bits += ri_bitlen;
+          if (r_index != -1)
+            skip_zero_padding(&cumul_bits,csi_report,r_index,bitlen);
+          evaluate_cqi_report(payload,csi_report,cumul_bits,r_index,sched_ctrl,csirep->cqi_Table);
+          break;
+        case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI:
+          cri_bitlen = csi_report->csi_meas_bitlen.cri_bitlen;
+          if(cri_bitlen)
+            evaluate_cri_report(payload,cri_bitlen,cumul_bits,sched_ctrl);
+          cumul_bits += cri_bitlen;
+          ri_bitlen = csi_report->csi_meas_bitlen.ri_bitlen;
+          if(ri_bitlen)
+            r_index = evaluate_ri_report(payload,ri_bitlen,csi_report->csi_meas_bitlen.ri_restriction,cumul_bits,sched_ctrl);
+          cumul_bits += ri_bitlen;
+          if (r_index != -1)
+            skip_zero_padding(&cumul_bits,csi_report,r_index,bitlen);
+          pmi_bitlen = evaluate_pmi_report(payload,csi_report,cumul_bits,r_index,sched_ctrl);
+          cumul_bits += pmi_bitlen;
+          evaluate_cqi_report(payload,csi_report,cumul_bits,r_index,sched_ctrl,csirep->cqi_Table);
+          break;
+        case NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_LI_PMI_CQI:
+          cri_bitlen = csi_report->csi_meas_bitlen.cri_bitlen;
           if(cri_bitlen)
             evaluate_cri_report(payload,cri_bitlen,cumul_bits,sched_ctrl);
           cumul_bits += cri_bitlen;
-          ri_bitlen = UE_info->csi_report_template[UE_id][csi_report_id].csi_meas_bitlen.ri_bitlen;
+          ri_bitlen = csi_report->csi_meas_bitlen.ri_bitlen;
           if(ri_bitlen)
-            evaluate_ri_report(payload,ri_bitlen,sched_ctrl);
+            r_index = evaluate_ri_report(payload,ri_bitlen,csi_report->csi_meas_bitlen.ri_restriction,cumul_bits,sched_ctrl);
           cumul_bits += ri_bitlen;
-          //TODO add zero padding bits when needed
-          cqi_bitlen = UE_info->csi_report_template[UE_id][csi_report_id].csi_meas_bitlen.cqi_bitlen;
-          if(cqi_bitlen)
-            evaluate_cqi_report(payload,cqi_bitlen,&cumul_bits,sched_ctrl);
+          li_bitlen = evaluate_li_report(payload,csi_report,cumul_bits,r_index,sched_ctrl);
+          cumul_bits += li_bitlen;
+          if (r_index != -1)
+            skip_zero_padding(&cumul_bits,csi_report,r_index,bitlen);
+          pmi_bitlen = evaluate_pmi_report(payload,csi_report,cumul_bits,r_index,sched_ctrl);
+          cumul_bits += pmi_bitlen;
+          evaluate_cqi_report(payload,csi_report,cumul_bits,r_index,sched_ctrl,csirep->cqi_Table);
           break;
         default:
           AssertFatal(1==0, "Invalid or not supported CSI measurement report\n");
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index b50cf59049356141b7cf3b74182b4f42ac1b1ba3..34d4496eeea3a11e4b1f2e92f541f7aefb73049c 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -720,7 +720,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
         UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt++;
         UE_info->mac_stats[UE_id].ulsch_DTX++;
       }
-      if (UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt >= pusch_failure_thres) {
+      if (!get_softmodem_params()->phy_test && UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt >= pusch_failure_thres) {
          LOG_W(NR_MAC,"Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n",
                UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt);
          UE_info->UE_sched_ctrl[UE_id].ul_failure = 1;
@@ -1010,9 +1010,11 @@ bool allocate_ul_retransmission(module_id_t module_id,
     uint16_t new_rbSize;
     bool success = nr_find_nb_rb(retInfo->Qm,
                                  retInfo->R,
+                                 1, // layers
                                  temp_ps.nrOfSymbols,
                                  temp_ps.N_PRB_DMRS * temp_ps.num_dmrs_symb,
                                  retInfo->tb_size,
+                                 1, /* minimum of 1RB: need to find exact TBS, don't preclude any number */
                                  rbSize,
                                  &new_tbs,
                                  &new_rbSize);
@@ -1265,8 +1267,9 @@ void pf_ul(module_id_t module_id,
   }
 
 
+  const int min_rbSize = 5;
   /* Loop UE_sched to find max coeff and allocate transmission */
-  while (UE_sched.head >= 0 && max_num_ue> 0 && n_rb_sched > 0) {
+  while (UE_sched.head >= 0 && max_num_ue> 0 && n_rb_sched >= min_rbSize) {
     /* Find max coeff */
     int *max = &UE_sched.head; /* Find max coeff: assume head is max */
     int *p = &UE_sched.next[*max];
@@ -1312,8 +1315,7 @@ void pf_ul(module_id_t module_id,
 
     /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
     max_num_ue--;
-    if (max_num_ue < 0)
-      return;
+    AssertFatal(max_num_ue >= 0, "Illegal max_num_ue %d\n", max_num_ue);
 
     NR_CellGroupConfig_t *cg = UE_info->CellGroup[UE_id];
     NR_BWP_UplinkDedicated_t *ubwpd= cg ? cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP:NULL;
@@ -1355,9 +1357,11 @@ void pf_ul(module_id_t module_id,
     uint32_t TBS = 0;
     nr_find_nb_rb(sched_pusch->Qm,
                   sched_pusch->R,
+                  1, // layers
                   ps->nrOfSymbols,
                   ps->N_PRB_DMRS * ps->num_dmrs_symb,
                   B,
+                  min_rbSize,
                   max_rbSize,
                   &TBS,
                   &rbSize);
diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
index fc2fb3fdbf1ea16d4ed8b4d64f5309c3f07fc174..55136b001523347ced1ed0be2d60ba318cba2bc7 100644
--- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
@@ -245,7 +245,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
                         uint16_t O_csi,
                         uint16_t O_ack,
                         uint8_t O_sr,
-			                  int r_pucch);
+                        int r_pucch);
 
 void find_search_space(int ss_type,
                        NR_BWP_Downlink_t *bwp,
@@ -310,7 +310,8 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
                               const NR_BWP_Downlink_t *bwp,
                               const NR_BWP_DownlinkDedicated_t *bwpd0,
                               int tda,
-                              const long dci_format,
+                              uint8_t layers,
+                              NR_UE_sched_ctrl_t *sched_ctrl,
                               NR_pdsch_semi_static_t *ps);
 
 void nr_set_pusch_semi_static(const NR_ServingCellConfigCommon_t *scc,
@@ -454,6 +455,13 @@ void find_SSB_and_RO_available(module_id_t module_idP);
 
 void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps);
 
+void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
+                NR_UE_sched_ctrl_t *sched_ctrl,
+                uint8_t *target_mcs,
+                uint8_t mcs_table_idx);
+
+uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl);
+
 void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *bwp);
 void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ubwp);
 
@@ -461,9 +469,11 @@ bool find_free_CCE(module_id_t module_id, sub_frame_t slot, int UE_id);
 
 bool nr_find_nb_rb(uint16_t Qm,
                    uint16_t R,
+                   uint8_t nrOfLayers,
                    uint16_t nb_symb_sch,
                    uint16_t nb_dmrs_prb,
                    uint32_t bytes,
+                   uint16_t nb_rb_min,
                    uint16_t nb_rb_max,
                    uint32_t *tbs,
                    uint16_t *nb_rb);
diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
index d33ca66f536291f019f472a9de0a82ea5411c551..22a0932c3fed8c83f75b7b44be274aca917c05cb 100644
--- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
@@ -391,7 +391,8 @@ typedef struct NR_sched_srs {
 typedef struct NR_pdsch_semi_static {
   int time_domain_allocation;
   uint8_t numDmrsCdmGrpsNoData;
-
+  uint8_t frontloaded_symb;
+  int mapping_type;
   int startSymbolIndex;
   int nrOfSymbols;
   uint8_t nrOfLayers;
@@ -477,6 +478,7 @@ struct CRI_RI_LI_PMI_CQI {
   uint8_t pmi_x2;
   uint8_t wb_cqi_1tb;
   uint8_t wb_cqi_2tb;
+  uint8_t cqi_table;
 };
 
 typedef struct CRI_SSB_RSRP {
@@ -487,11 +489,8 @@ typedef struct CRI_SSB_RSRP {
 } CRI_SSB_RSRP_t;
 
 struct CSI_Report {
-  NR_CSI_Report_Config_PR present;
-  union Config_CSI_Report {
-    struct CRI_RI_LI_PMI_CQI cri_ri_li_pmi_cqi_report;
-    struct CRI_SSB_RSRP ssb_cri_report;
-  } choice;
+  struct CRI_RI_LI_PMI_CQI cri_ri_li_pmi_cqi_report;
+  struct CRI_SSB_RSRP ssb_cri_report;
 };
 
 #define MAX_SR_BITLEN 8
@@ -504,12 +503,13 @@ typedef struct {
 }L1_RSRP_bitlen_t;
 
 typedef struct{
+  uint8_t ri_restriction;
   uint8_t cri_bitlen;
   uint8_t ri_bitlen;
-  uint8_t li_bitlen;
-  uint8_t pmi_x1_bitlen;
-  uint8_t pmi_x2_bitlen;
-  uint8_t cqi_bitlen;
+  uint8_t li_bitlen[8];
+  uint8_t pmi_x1_bitlen[8];
+  uint8_t pmi_x2_bitlen[8];
+  uint8_t cqi_bitlen[8];
 } CSI_Meas_bitlen_t;
 
 typedef struct nr_csi_report {
@@ -618,9 +618,9 @@ typedef struct {
   int pusch_consecutive_dtx_cnt;
   int pucch_consecutive_dtx_cnt;
   int ul_failure;
-  struct CSI_Report CSI_report[MAX_CSI_REPORTS];
+  struct CSI_Report CSI_report;
   bool SR;
-
+  bool set_mcs;
   /// information about every HARQ process
   NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
   /// HARQ processes that are free
@@ -673,7 +673,6 @@ typedef struct {
   NR_mac_stats_t mac_stats[MAX_MOBILES_PER_GNB];
   NR_list_t list;
   int num_UEs;
-
   bool active[MAX_MOBILES_PER_GNB];
   rnti_t rnti[MAX_MOBILES_PER_GNB];
   NR_CellGroupConfig_t *CellGroup[MAX_MOBILES_PER_GNB];
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
index 4d2e157728bb9595929924a819332f70bc038e8b..108a5dbe91435b6e1265360d2abc5c14df37e097 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
@@ -48,7 +48,6 @@
 #include "platform_constants.h"
 #include "nfapi/oai_integration/vendor_ext.h"
 #include "common/utils/LOG/vcd_signal_dumper.h"
-#include "msc.h"
 #include "common/ngran_types.h"
 #include "targets/COMMON/openairinterface5g_limits.h"
 #include "targets/RT/USER/lte-softmodem.h"
@@ -60,7 +59,6 @@
 #include <pthread.h>
 
 #  include "gtpv1u_eNB_task.h"
-#  include "gtpv1u.h"
 #include <openair3/ocp-gtpu/gtp_itf.h>
 
 #include "ENB_APP/enb_config.h"
@@ -229,7 +227,7 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
   LOG_D(PDCP, "%s() (drb %ld) sending message to gtp size %d\n",
 	__func__, rb_id, size);
   extern instance_t CUuniqInstance;
-  itti_send_msg_to_task(TASK_VARIABLE, CUuniqInstance, message_p);
+  itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
   return TRUE;
 }
 
@@ -1058,14 +1056,6 @@ pdcp_data_ind(
             ctxt_pP->rnti,
             rb_id + 4,
             sdu_buffer_sizeP - payload_offset );
-      MSC_LOG_TX_MESSAGE(
-        MSC_PDCP_ENB,
-        MSC_GTPU_ENB,
-        NULL,0,
-        "0 GTPV1U_ENB_TUNNEL_DATA_REQ  ue %x rab %u len %u",
-        ctxt_pP->rnti,
-        rb_id + 4,
-        sdu_buffer_sizeP - payload_offset);
       //LOG_T(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset);
       gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U,
                                   sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX);
@@ -1078,7 +1068,7 @@ pdcp_data_ind(
       GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).offset       = GTPU_HEADER_OVERHEAD_MAX;
       GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti         = ctxt_pP->rnti;
       GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id       = rb_id + 4;
-      itti_send_msg_to_task(TASK_VARIABLE, INSTANCE_DEFAULT, message_p);
+      itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
       packet_forwarded = TRUE;
     }
   } else {
@@ -2228,20 +2218,6 @@ pdcp_config_set_security(
     pdcp_pP->kUPenc  = kUPenc;
     /* Activate security */
     pdcp_pP->security_activated = 1;
-    MSC_LOG_EVENT(
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-      "0 Set security ciph %X integ %x UE %"PRIx16" ",
-      pdcp_pP->cipheringAlgorithm,
-      pdcp_pP->integrityProtAlgorithm,
-      ctxt_pP->rnti);
-  } else {
-    MSC_LOG_EVENT(
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-      "0 Set security failed UE %"PRIx16" ",
-      ctxt_pP->rnti);
-    LOG_E(PDCP,PROTOCOL_PDCP_CTXT_FMT"  bad security mode %d",
-          PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
-          security_modeP);
   }
 }
 
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
index b49b02042821d8d0c3071858703faa179dfce9bf..f6a61330d068c5366a55478f9dbe0fb0d51a4d1e 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
@@ -58,7 +58,6 @@ extern int otg_enabled;
 #include "nfapi/oai_integration/vendor_ext.h"
 #include "common/utils/LOG/vcd_signal_dumper.h"
 #include "platform_constants.h"
-#include "msc.h"
 #include "pdcp.h"
 
 #include "assertions.h"
@@ -85,8 +84,6 @@ extern struct msghdr nas_msg_rx;
 
 
 #  include "gtpv1u_eNB_task.h"
-#  include "gtpv1u_eNB_defs.h"
-
 
 extern int gtpv1u_new_data_req( uint8_t  enb_module_idP, rnti_t   ue_rntiP, uint8_t  rab_idP, uint8_t *buffer_pP, uint32_t buf_lenP, uint32_t buf_offsetP);
 uint16_t ue_id_g; // Global variable to identify the ID for each UE. It is updated in main() of lte-uesoftmodem.c
@@ -343,12 +340,6 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const  ctxt_p
       LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
             ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
             ctxt.rnti, rab_id);
-      MSC_LOG_RX_MESSAGE((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-                         (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
-                         NULL, 0,
-                         MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
-                         MSC_AS_TIME_ARGS(ctxt_pP),
-                         ctxt.instance, rab_id, rab_id, len);
       pdcp_data_req(
                 &ctxt,
                 SRB_FLAG_NO,
@@ -368,14 +359,6 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const  ctxt_p
       //              , NULL, NULL
       //             );
     } else {
-      MSC_LOG_RX_DISCARDED_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        ctxt.instance, rab_id, rab_id, len);
       LOG_D(PDCP,
             "[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
             ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
@@ -566,17 +549,6 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const  ctx
                   (NFAPI_MODE == NFAPI_UE_STUB_PNF || NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) ? NULL : &pdcp_read_header_g.destinationL2Id
                 );
               } else { /* else of h_rc == HASH_TABLE_OK */
-                MSC_LOG_RX_DISCARDED_MESSAGE(
-                  (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-                  (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
-                  NULL,
-                  0,
-                  MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
-                  MSC_AS_TIME_ARGS(ctxt_pP),
-                  pdcp_read_header_g.inst,
-                  pdcp_read_header_g.rb_id,
-                  rab_id,
-                  pdcp_read_header_g.data_size);
                 LOG_D(PDCP,
                       "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
                       ctxt.frame,
@@ -739,17 +711,6 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const  ctxt_pP)
                     ctxt.module_id,
                     ctxt.rnti,
                     rab_id);
-              MSC_LOG_RX_MESSAGE(
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
-                NULL,
-                0,
-                MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
-                MSC_AS_TIME_ARGS(ctxt_pP),
-                pc5s_header->inst,
-                pc5s_header->rb_id,
-                rab_id,
-                pc5s_header->data_size);
             /* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
              * Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
              * gcc, from v9,  now warns about it. fix these warnings by using  local variables
@@ -771,17 +732,6 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const  ctxt_pP)
               pc5s_header->sourceL2Id = sourceL2Id;
               pc5s_header->destinationL2Id=destinationL2Id;             
             } else { /* else of h_rc == HASH_TABLE_OK */
-              MSC_LOG_RX_DISCARDED_MESSAGE(
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
-                NULL,
-                0,
-                MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
-                MSC_AS_TIME_ARGS(ctxt_pP),
-                pc5s_header->inst,
-                pc5s_header->rb_id,
-                rab_id,
-                pc5s_header->data_size);
               LOG_D(PDCP,
                     "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
                     ctxt.frame,
@@ -803,16 +753,6 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const  ctxt_pP)
                   ctxt.module_id,
                   ctxt.rnti,
                   DEFAULT_RAB_ID);
-            MSC_LOG_RX_MESSAGE(
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
-              NULL,0,
-              MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u default rab %u size %u",
-              MSC_AS_TIME_ARGS(ctxt_pP),
-              pc5s_header->inst,
-              pc5s_header->rb_id,
-              DEFAULT_RAB_ID,
-              pc5s_header->data_size);
             /* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
              * Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
              * gcc, from v9,  now warns about it. fix these warnings by using  local variables
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
index 891c38209b5eda9637cc17fabb7c81c186d24eb0..0bd1b8fa8d277ba4803fd3936cda865cd6695bd3 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
@@ -60,7 +60,6 @@
 
 #include "pdcp.h"
 #include "pdcp_primitives.h"
-#include "msc.h"
 
 
 #define PDCP_QUEUE_NB_ELEMENTS 200
@@ -187,7 +186,6 @@ void *pdcp_netlink_thread_fct(void *arg)
   pdcp_thread_read_state = 0;
   memset(nl_rx_buf, 0, NL_MAX_PAYLOAD);
   LOG_I(PDCP, "[NETLINK_THREAD] binding to fd  %d\n",nas_sock_fd);
-  MSC_START_USE();
 
   while (1) {
     len = recvmsg(nas_sock_fd, &nas_msg_rx, 0);
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c
index cb108f5d260c9f0186d00f52ce7e78b54ef3dfad..6664dd2a33eb961e3aebd7f4bdd65fbb464c0c3f 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c
@@ -37,7 +37,6 @@
 #include "LAYER2/MAC/mac_extern.h"
 
 #include "pdcp.h"
-#include "msc.h"
 #include "pdcp_primitives.h"
 
 //-----------------------------------------------------------------------------
@@ -223,11 +222,6 @@ pdcp_validate_security(
       if (stream_check_integrity(pdcp_pP->integrityProtAlgorithm,
                                  &decrypt_params,
                                  &pdcp_pdu_buffer[sdu_buffer_size]) != 0) {
-        MSC_LOG_EVENT(
-    	    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-    	    " Security: failed MAC-I Algo %X UE %"PRIx16" ",
-    	    pdcp_pP->integrityProtAlgorithm,
-    	    ctxt_pP->rnti);
         LOG_E(PDCP, "[OSA][RB %ld] %s failed to validate MAC-I (key %llx) of incoming PDU\n",
               rb_id, (pdcp_pP->is_ue != 0) ? "UE" : "eNB",((long long unsigned int*)decrypt_params.key)[0]);
         VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, VCD_FUNCTION_OUT);
diff --git a/openair2/LAYER2/PROTO_AGENT/cu_test.c b/openair2/LAYER2/PROTO_AGENT/cu_test.c
deleted file mode 100644
index a26b06dd413299037cbd5fbf90d2cb849e23a189..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/cu_test.c
+++ /dev/null
@@ -1,172 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/time.h>
-
-#include "ENB_APP/enb_paramdef.h"
-#include "LAYER2/PROTO_AGENT/proto_agent.h"
-#define BUF_MAX 1400
-
-int recv_client = 0;
-FILE *output;
-
-void usage(char *prg_name) {
-  fprintf(stderr, "usage: %s <file or ->\n", prg_name);
-  fprintf(stderr, " - is stdin\n");
-  fprintf(stderr, " received packets are written to stdout\n");
-}
-
-long uelapsed(struct timeval *s, struct timeval *e) {
-  return e->tv_sec * 1000000 + e->tv_usec - (s->tv_sec * 1000000 + s->tv_usec);
-}
-
-boolean_t
-pdcp_data_ind(
-  const protocol_ctxt_t *const ctxt_pP,
-  const srb_flag_t   srb_flagP,
-  const MBMS_flag_t  MBMS_flagP,
-  const rb_id_t      rb_idP,
-  const sdu_size_t   sdu_buffer_sizeP,
-  mem_block_t *const sdu_buffer_pP
-) {
-  fwrite(sdu_buffer_pP->data, sdu_buffer_sizeP, 1, stdout);
-  fflush(stdout);
-  free_mem_block(sdu_buffer_pP, __func__);
-  /* cannot free because of const */
-  //free(ctxt_pP);
-  recv_client = 1;
-  return 0;
-}
-
-void close_proto_agent(void) {
-  proto_agent_stop(0);
-}
-
-int main(int argc, char *argv[]) {
-  const cudu_params_t params = {
-    .local_ipv4_address = "192.168.12.45",
-    .local_port = 6464,
-    .remote_ipv4_address = "192.168.12.45",
-    .remote_port = 6465
-  };
-  protocol_ctxt_t p;
-  memset(&p, 0, sizeof p);
-  mem_block_t mem;
-  char s[BUF_MAX];
-  size_t size, totsize = 0;
-  struct timeval t_start, t_end;
-  FILE *f;
-
-  if (argc != 2) {
-    usage(argv[0]);
-    return 1;
-  }
-
-  if (strcmp(argv[1], "-") == 0) {
-    f = stdin;
-  } else {
-    f = fopen(argv[1], "r");
-  }
-
-  if (!f) {
-    fprintf(stderr, "cannot open %s: %s\n", argv[1], strerror(errno));
-    return 2;
-  }
-
-  pool_buffer_init();
-
-  if (proto_agent_start(0, &params) != 0) {
-    fprintf(stderr, "error on proto_agent_start()\n");
-    fclose(f);
-    return 3;
-  }
-
-  atexit(close_proto_agent);
-
-  /* wait for first packet of client */
-  while (!recv_client) sleep(1);
-
-  fprintf(stderr, "reading file\n");
-  /* now send back at the same time */
-  gettimeofday(&t_start, NULL);
-
-  while ((size = fread(s, 1, BUF_MAX, f)) > 0) {
-    usleep(10);
-    totsize += size;
-    mem.data = &s[0];
-    proto_agent_send_rlc_data_req(&p, 0, 0, 0, 0, 0, size, &mem);
-  }
-
-  gettimeofday(&t_end, NULL);
-  fclose(f);
-  long us = uelapsed(&t_start, &t_end);
-  fprintf(stderr, "read %zu bytes in %ld ms -> %.3fMB/s, %.3fMbps\n",
-          totsize, us / 1000, ((float) totsize ) / us,
-          ((float) totsize) / us * 8);
-  fprintf(stderr, "check files using 'diff afile bfile'\n");
-  /* give some time in case the other direction is slower */
-  sleep(5);
-  return 0;
-}
-
-/*
- *********************************************************
- * arbitrary functions, needed for linking (used or not) *
- *********************************************************
- */
-
-rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
-                                  const srb_flag_t   srb_flagP,
-                                  const MBMS_flag_t  MBMS_flagP,
-                                  const rb_id_t      rb_idP,
-                                  const mui_t        muiP,
-                                  confirm_t    confirmP,
-                                  sdu_size_t   sdu_sizeP,
-                                  mem_block_t *sdu_pP,
-                                  const uint32_t *const sourceL2Id,
-                                  const uint32_t *const destinationL2Id
-                                 ) {
-  fprintf(stderr, "This should never be called on the CU\n");
-  exit(1);
-}
-
-pthread_t new_thread(void *(*f)(void *), void *b) {
-  pthread_t t;
-  pthread_attr_t att;
-
-  if (pthread_attr_init(&att)) {
-    fprintf(stderr, "pthread_attr_init err\n");
-    exit(1);
-  }
-
-  if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
-    fprintf(stderr, "pthread_attr_setdetachstate err\n");
-    exit(1);
-  }
-
-  if (pthread_create(&t, &att, f, b)) {
-    fprintf(stderr, "pthread_create err\n");
-    exit(1);
-  }
-
-  if (pthread_attr_destroy(&att)) {
-    fprintf(stderr, "pthread_attr_destroy err\n");
-    exit(1);
-  }
-
-  return t;
-}
-
-int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
-  return 0;
-}
-
-int config_get(paramdef_t *params,int numparams, char *prefix) {
-  return 0;
-}
-
-int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
-  return 0;
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/du_test.c b/openair2/LAYER2/PROTO_AGENT/du_test.c
deleted file mode 100644
index ee622984387d17eae2159680592d38649049dc66..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/du_test.c
+++ /dev/null
@@ -1,163 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/time.h>
-
-#include "ENB_APP/enb_paramdef.h"
-#include "LAYER2/PROTO_AGENT/proto_agent.h"
-
-#define BUF_MAX 1400
-
-void usage(char *prg_name) {
-  fprintf(stderr, "usage: %s <file or ->\n", prg_name);
-  fprintf(stderr, " - is stdin\n");
-  fprintf(stderr, " received packets are written to stdout\n");
-}
-
-long uelapsed(struct timeval *s, struct timeval *e) {
-  return e->tv_sec * 1000000 + e->tv_usec - (s->tv_sec * 1000000 + s->tv_usec);
-}
-
-
-rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
-                                  const srb_flag_t   srb_flagP,
-                                  const MBMS_flag_t  MBMS_flagP,
-                                  const rb_id_t      rb_idP,
-                                  const mui_t        muiP,
-                                  confirm_t    confirmP,
-                                  sdu_size_t   sdu_sizeP,
-                                  mem_block_t *sdu_pP,
-                                  const uint32_t *const sourceL2Id,
-                                  const uint32_t *const destinationL2Id
-                                 ) {
-  fwrite(sdu_pP->data, sdu_sizeP, 1, stdout);
-  fflush(stdout);
-  free_mem_block(sdu_pP, __func__);
-  //free(ctxt_pP);
-  return 0;
-}
-
-void close_proto_agent(void) {
-  proto_agent_stop(0);
-}
-
-int main(int argc, char *argv[]) {
-  const cudu_params_t params = {
-    .local_ipv4_address = "192.168.12.45",
-    .local_port = 6465,
-    .remote_ipv4_address = "192.168.12.45",
-    .remote_port = 6464
-  };
-  protocol_ctxt_t p;
-  memset(&p, 0, sizeof p);
-  mem_block_t mem;
-  char s[BUF_MAX];
-  size_t size, totsize = 0;
-  struct timeval t_start, t_end;
-  FILE *f;
-
-  if (argc != 2) {
-    usage(argv[0]);
-    return 1;
-  }
-
-  if (strcmp(argv[1], "-") == 0) {
-    f = stdin;
-  } else {
-    f = fopen(argv[1], "r");
-  }
-
-  if (!f) {
-    fprintf(stderr, "cannot open %s: %s\n", argv[1], strerror(errno));
-    return 2;
-  }
-
-  pool_buffer_init();
-
-  if (proto_agent_start(0, &params) != 0) {
-    fprintf(stderr, "error on proto_agent_start()\n");
-    fclose(f);
-    return 3;
-  }
-
-  atexit(close_proto_agent);
-  gettimeofday(&t_start, NULL);
-
-  while ((size = fread(s, 1, BUF_MAX, f)) > 0) {
-    usleep(10);
-    totsize += size;
-    mem.data = &s[0];
-    proto_agent_send_pdcp_data_ind(&p, 0, 0, 0, size, &mem);
-  }
-
-  gettimeofday(&t_end, NULL);
-  fclose(f);
-  long us = uelapsed(&t_start, &t_end);
-  fprintf(stderr, "read %zu bytes in %ld ms -> %.3fMB/s, %.3fMbps\n",
-          totsize, us / 1000, ((float) totsize ) / us,
-          ((float) totsize) / us * 8);
-  fprintf(stderr, "check files using 'diff afile bfile'\n");
-  /* wait, we are possibly receiving data */
-  sleep(5);
-  return 0;
-}
-
-/*
- *********************************************************
- * arbitrary functions, needed for linking (used or not) *
- *********************************************************
- */
-
-boolean_t
-pdcp_data_ind(
-  const protocol_ctxt_t *const ctxt_pP,
-  const srb_flag_t   srb_flagP,
-  const MBMS_flag_t  MBMS_flagP,
-  const rb_id_t      rb_idP,
-  const sdu_size_t   sdu_buffer_sizeP,
-  mem_block_t *const sdu_buffer_pP
-) {
-  fprintf(stderr, "This should never be called on the DU\n");
-  exit(1);
-}
-
-pthread_t new_thread(void *(*f)(void *), void *b) {
-  pthread_t t;
-  pthread_attr_t att;
-
-  if (pthread_attr_init(&att)) {
-    fprintf(stderr, "pthread_attr_init err\n");
-    exit(1);
-  }
-
-  if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
-    fprintf(stderr, "pthread_attr_setdetachstate err\n");
-    exit(1);
-  }
-
-  if (pthread_create(&t, &att, f, b)) {
-    fprintf(stderr, "pthread_create err\n");
-    exit(1);
-  }
-
-  if (pthread_attr_destroy(&att)) {
-    fprintf(stderr, "pthread_attr_destroy err\n");
-    exit(1);
-  }
-
-  return t;
-}
-
-int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
-  return 0;
-}
-
-int config_get(paramdef_t *params,int numparams, char *prefix) {
-  return 0;
-}
-
-int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
-  return 0;
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent.c b/openair2/LAYER2/PROTO_AGENT/proto_agent.c
deleted file mode 100644
index 5cf71b826db089bb177df20d5d67590582c2c5cc..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent.h
- * \brief top level enb agent receive thread and itti task
- * \author Navid Nikaein and Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-#define _GNU_SOURCE
-#include "proto_agent_common.h"
-#include "common/utils/LOG/log.h"
-#include "proto_agent.h"
-#include "assertions.h"
-#include "proto_agent_net_comm.h"
-#include "proto_agent_async.h"
-#include <common/utils/system.h>
-#include <pthread.h>
-
-#define  ENB_AGENT_MAX 9
-
-proto_agent_instance_t proto_agent[MAX_DU];
-
-//pthread_t new_thread(void *(*f)(void *), void *b);
-
-Protocol__FlexsplitMessage *proto_agent_timeout_fsp(void *args);
-
-#define TEST_MOD 0
-
-#define ECHO
-
-/*  Server side function; upon a new connection
-    reception, sends the hello packets
-*/
-int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p) {
-  int channel_id;
-  // RS: CUDU does not work!
-  //DevAssert(p->local_interface);
-  //DevAssert(p->local_ipv4_address);
-  //DevAssert(p->local_port > 1024); // "unprivileged" port
-  //DevAssert(p->remote_ipv4_address);
-  //DevAssert(p->remote_port > 1024); // "unprivileged" port
-  proto_agent[mod_id].mod_id = mod_id;
-  proto_agent[mod_id].exit = 0;
-  /* Initialize the channel container */
-  /* TODO only initialize the first time */
-  proto_agent_init_channel_container();
-  /*Create the async channel info*/
-  proto_agent_async_channel_t *channel_info;
-  channel_info = proto_agent_async_channel_info(mod_id, p->local_ipv4_address, p->local_port,
-                 p->remote_ipv4_address, p->remote_port);
-
-  if (!channel_info) goto error;
-
-  /* Create a channel using the async channel info */
-  channel_id = proto_agent_create_channel((void *) channel_info,
-                                          proto_agent_async_msg_send,
-                                          proto_agent_async_msg_recv,
-                                          proto_agent_async_release);
-
-  if (channel_id <= 0) goto error;
-
-  proto_agent_channel_t *channel = proto_agent_get_channel(channel_id);
-
-  if (!channel) goto error;
-
-  proto_agent[mod_id].channel = channel;
-  /* Register the channel for all underlying agents (use ENB_AGENT_MAX) */
-  proto_agent_register_channel(mod_id, channel, ENB_AGENT_MAX);
-  // Code for sending the HELLO/ECHO_REQ message once a connection is established
-  //uint8_t *msg = NULL;
-  //Protocol__FlexsplitMessage *init_msg=NULL;
-  //if (udp == 0)
-  //{
-  //  // If the comm is not UDP, allow the server to send the first packet over the channel
-  //  //printf( "Proto agent Server: Calling the echo_request packet constructor\n");
-  //  msg_flag = proto_agent_echo_request(mod_id, NULL, &init_msg);
-  //  if (msg_flag != 0)
-  //  goto error;
-  //
-  //  int msgsize = 0;
-  //  if (init_msg != NULL)
-  //    msg = proto_agent_pack_message(init_msg, &msgsize);
-  //  if (msg!= NULL)
-  //  {
-  //    LOG_D(PROTO_AGENT, "Server sending the message over the async channel\n");
-  //    proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, (void *) channel_info);
-  //  }
-  //  /* After sending the message, wait for any replies;
-  //    the server thread blocks until it reads any data
-  //    over the channel
-  //  */
-  //}
-  //proto_agent[mod_id].recv_thread = new_thread(proto_agent_receive, &proto_agent[mod_id]);
-  threadCreate(&proto_agent[mod_id].recv_thread, proto_agent_receive, &proto_agent[mod_id], "proto", -1, OAI_PRIORITY_RT_LOW);
-  fprintf(stderr, "[PROTO_AGENT] server started at port %s:%d\n", p->local_ipv4_address, p->local_port);
-  return 0;
-error:
-  LOG_E(PROTO_AGENT, "there was an error\n");
-  return 1;
-}
-
-void proto_agent_stop(mod_id_t mod_id) {
-  if (!proto_agent[mod_id].channel) return;
-
-  /* unlock the independent read thread proto_agent_receive() */
-  proto_agent[mod_id].exit = 1;
-  proto_agent_async_msg_recv_unlock(proto_agent[mod_id].channel->channel_info);
-  proto_agent_async_release(proto_agent[mod_id].channel);
-  proto_agent_destroy_channel(proto_agent[mod_id].channel->channel_id);
-  free(proto_agent[mod_id].channel);
-  proto_agent[mod_id].channel = NULL;
-  LOG_W(PROTO_AGENT, "server stopped\n");
-}
-
-//void
-//proto_agent_send_hello(void)
-//{
-//  uint8_t *msg = NULL;
-//  Protocol__FlexsplitMessage *init_msg=NULL;
-//  int msg_flag = 0;
-//
-//
-//  //printf( "PDCP agent: Calling the HELLO packet constructor\n");
-//  msg_flag = proto_agent_hello(proto_agent[TEST_MOD].mod_id, NULL, &init_msg);
-//
-//  int msgsize = 0;
-//  if (msg_flag == 0)
-//  {
-//    proto_agent_serialize_message(init_msg, &msg, &msgsize);
-//  }
-//
-//  LOG_D(PROTO_AGENT, "Agent sending the message over the async channel\n");
-//  proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, (void *) client_channel[TEST_MOD]);
-//}
-
-
-
-rlc_op_status_t  proto_agent_send_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
-    const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
-    const rb_id_t rb_idP, const mui_t muiP,
-    confirm_t confirmP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP,const uint32_t *const SrcID, const uint32_t *const DstID) {
-  uint8_t *msg = NULL;
-  Protocol__FlexsplitMessage *init_msg=NULL;
-  int msg_flag = 0;
-  int msgsize = 0;
-  mod_id_t mod_id = ctxt_pP->module_id;
-  data_req_args args;
-  DevAssert(proto_agent[mod_id].channel);
-  DevAssert(proto_agent[mod_id].channel->channel_info);
-  args.ctxt = ctxt_pP;
-  args.srb_flag = srb_flagP;
-  args.MBMS_flag = MBMS_flagP;
-  args.rb_id = rb_idP;
-  args.mui = muiP;
-  args.confirm = confirmP;
-  args.sdu_size = sdu_sizeP;
-  args.sdu_p = sdu_pP;
-  msg_flag = proto_agent_pdcp_data_req(mod_id, (void *) &args, &init_msg);
-
-  if (msg_flag != 0 || !init_msg) goto error;
-
-  msg = proto_agent_pack_message(init_msg, &msgsize);
-
-  if (!msg) goto error;
-
-  proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, proto_agent[mod_id].channel->channel_info);
-  free_mem_block(sdu_pP, __func__);
-  return RLC_OP_STATUS_OK;
-error:
-  LOG_E(PROTO_AGENT, "PROTO_AGENT there was an error\n");
-  return RLC_OP_STATUS_INTERNAL_ERROR;
-}
-
-
-boolean_t proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP, const srb_flag_t srb_flagP,
-					       const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP,
-					       sdu_size_t sdu_sizeP, mem_block_t *sdu_pP,
-					       const uint32_t *const SrcID, const uint32_t *const DstID) {
-  uint8_t *msg = NULL;
-  Protocol__FlexsplitMessage *init_msg = NULL;
-  int msg_flag = 0;
-  int msgsize = 0;
-  mod_id_t mod_id = ctxt_pP->module_id;
-  data_req_args args;
-  DevAssert(proto_agent[mod_id].channel);
-  DevAssert(proto_agent[mod_id].channel->channel_info);
-  args.ctxt = ctxt_pP;
-  args.srb_flag = srb_flagP;
-  args.MBMS_flag = MBMS_flagP;
-  args.rb_id = rb_idP;
-  args.sdu_size = sdu_sizeP;
-  args.sdu_p = sdu_pP;
-  msg_flag = proto_agent_pdcp_data_ind(mod_id, (void *) &args, &init_msg);
-
-  if (msg_flag != 0 || !init_msg) goto error;
-
-  msg = proto_agent_pack_message(init_msg, &msgsize);
-
-  if (!msg) goto error;
-
-  proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, proto_agent[mod_id].channel->channel_info);
-  free_mem_block(sdu_pP, __func__);
-  return TRUE;
-error:
-  LOG_E(PROTO_AGENT, "there was an error in %s\n", __func__);
-  return FALSE;
-}
-
-void *
-proto_agent_receive(void *args) {
-  proto_agent_instance_t *inst = args;
-  void                  *data = NULL;
-  int                   size;
-  int                   priority;
-  err_code_t             err_code;
-  pthread_setname_np(pthread_self(), "proto_rx");
-  Protocol__FlexsplitMessage *msg;
-  uint8_t *ser_msg;
-
-  while (1) {
-    msg = NULL;
-    ser_msg = NULL;
-
-    if ((size = proto_agent_async_msg_recv(&data, &priority, inst->channel->channel_info)) < 0) {
-      err_code = PROTOCOL__FLEXSPLIT_ERR__MSG_ENQUEUING;
-      goto error;
-    }
-
-    if (inst->exit) break;
-
-    LOG_D(PROTO_AGENT, "Server side Received message with size %d and priority %d, calling message handle\n", size, priority);
-    msg = proto_agent_handle_message(inst->mod_id, data, size);
-
-    if (!msg) {
-      LOG_D(PROTO_AGENT, "msg to send back is NULL\n");
-      continue;
-    }
-
-    ser_msg = proto_agent_pack_message(msg, &size);
-
-    if (!ser_msg) {
-      continue;
-    }
-
-    LOG_D(PROTO_AGENT, "Server sending the reply message over the async channel\n");
-
-    if (proto_agent_async_msg_send((void *)ser_msg, (int) size, 1, inst->channel->channel_info)) {
-      err_code = PROTOCOL__FLEXSPLIT_ERR__MSG_ENQUEUING;
-      goto error;
-    }
-
-    LOG_D(PROTO_AGENT, "sent message with size %d\n", size);
-  }
-
-  return NULL;
-error:
-  LOG_E(PROTO_AGENT, "proto_agent_receive(): error %d occured\n",err_code);
-  return NULL;
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent.h b/openair2/LAYER2/PROTO_AGENT/proto_agent.h
deleted file mode 100644
index 4badda43b7953ba80be008b02e1cfc39320c25e1..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file proto_agent.h
- * \brief top level protocol agent
- * \author Navid Nikaein and Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-
-#ifndef PROTO_AGENT_H_
-#define PROTO_AGENT_H_
-#include "ENB_APP/enb_config.h" // for enb properties
-#include "proto_agent_common.h"
-#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
-#include "RRC/NR/nr_rrc_defs.h"
-
-
-void *proto_agent_receive(void *args);
-
-int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p);
-void proto_agent_stop(mod_id_t mod_id);
-
-rlc_op_status_t proto_agent_send_rlc_data_req( const protocol_ctxt_t *const ctxt_pP,
-    const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
-    const rb_id_t rb_idP, const mui_t muiP, confirm_t confirmP,
-    sdu_size_t sdu_sizeP, mem_block_t *sdu_pP,const uint32_t *const SrcID, const uint32_t *const DstID);
-
-pdcp_data_ind_t proto_agent_send_pdcp_data_ind;
-
-#endif
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_async.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_async.c
deleted file mode 100644
index df3684ee275ab035f285132dccb3cc4d13e4a56d..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_async.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-#include "proto_agent_async.h"
-#include "proto_agent_defs.h"
-
-
-#include "common/utils/LOG/log.h"
-
-proto_agent_async_channel_t *
-proto_agent_async_channel_info(mod_id_t mod_id, const char *bind_ip, uint16_t bind_port,
-                               const char* peer_ip, uint16_t peer_port)
-{
-  proto_agent_async_channel_t *channel;
-  channel = malloc(sizeof(proto_agent_async_channel_t));
-  
-  if (channel == NULL)
-    goto error;
-
-  channel->enb_id = mod_id;
-  channel->link = new_link_udp_server(bind_ip, bind_port);
-  
-  if (channel->link == NULL) goto error;
-  
-  channel->send_queue = new_message_queue();
-  if (channel->send_queue == NULL) goto error;
-  channel->receive_queue = new_message_queue();
-  if (channel->receive_queue == NULL) goto error;
-
-  channel->manager = create_link_manager(channel->send_queue,
-                                         channel->receive_queue,
-                                         channel->link);
-  /* manually set remote IP&port for UDP server remote end */
-  channel->manager->peer_port = peer_port;
-  channel->manager->peer_addr = peer_ip;
-
-  if (channel->manager == NULL) goto error;
-  
-  return channel;
-
- error:
-  if (channel)
-    free(channel);
-  LOG_E(PROTO_AGENT, "error creating proto_agent_async_channel_t\n");
-  return NULL;
-}
-
-int proto_agent_async_msg_send(void *data, int size, int priority, void *channel_info)
-{
-  proto_agent_async_channel_t *channel = channel_info;
-  return message_put(channel->send_queue, data, size, priority);
-}
-
-int proto_agent_async_msg_recv(void **data, int *priority, void *channel_info)
-{
-  proto_agent_async_channel_t *channel = channel_info;
-  return message_get(channel->receive_queue, data, priority);
-}
-
-void proto_agent_async_msg_recv_unlock(proto_agent_async_channel_t *channel) {
-  message_get_unlock(channel->receive_queue);
-}
-
-void proto_agent_async_release(proto_agent_channel_t *channel)
-{
-  proto_agent_async_channel_t *channel_info = channel->channel_info;
-
-  destroy_link_manager(channel_info->manager);
-  
-  destroy_message_queue(channel_info->send_queue);
-  destroy_message_queue(channel_info->receive_queue);
-  
-  close_link(channel_info->link);
-  free(channel_info);
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_async.h b/openair2/LAYER2/PROTO_AGENT/proto_agent_async.h
deleted file mode 100644
index 6bc952e804de80a7aa42b1b6393776b80fbdd522..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_async.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent_async.h
- * \brief channel implementation for async interface
- * \author Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-
-#ifndef PROTO_AGENT_ASYNC_H_
-#define PROTO_AGENT_ASYNC_H_
-
-#include "proto_agent_net_comm.h"
-
-typedef struct proto_agent_async_channel_s {
-  mod_id_t         enb_id;
-  socket_link_t   *link;
-  message_queue_t *send_queue;
-  message_queue_t *receive_queue;
-  link_manager_t  *manager;
-} proto_agent_async_channel_t;
-
-proto_agent_async_channel_t *
-proto_agent_async_channel_info(mod_id_t mod_id, const char *bind_ip, uint16_t bind_port,
-                               const char *peer_ip, uint16_t peer_port);
-
-int proto_agent_async_msg_send(void *data, int size, int priority, void *channel_info);
-
-int proto_agent_async_msg_recv(void **data, int *priority, void *channel_info);
-
-/* unlocks a running proto_agent_async_msg_recv() */
-void proto_agent_async_msg_recv_unlock(proto_agent_async_channel_t *channel);
-
-void proto_agent_async_release(proto_agent_channel_t *channel);
-
-
-#endif /*PROTO_AGENT_ASYNC_H_*/
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
deleted file mode 100644
index d3d00d1adaa0abf95b17603a9d19f30704acb0b4..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
+++ /dev/null
@@ -1,719 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file proto_agent_common.c
- * \brief common primitives for all agents
- * \author Navid Nikaein and Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-
-#include<stdio.h>
-#include <dlfcn.h>
-#include <time.h>
-
-#include "PHY/phy_extern.h"
-#include "proto_agent_common.h"
-#include "common/utils/LOG/log.h"
-#include "common/ran_context.h"
-
-extern RAN_CONTEXT_t RC;
-
-/*
- * message primitives
- */
-
-// Function to fill in the dl_data header (32bits) with the appropriate fields (doing bitwise operations)
-void fill_dl_data_header(int pdu_type, int spare, int seq_no, uint32_t *header) {
-  uint32_t type = pdu_type;
-  uint32_t spare_ = spare;
-  uint32_t seq = seq_no;
-  type = type << 28;
-  spare_ = spare_ << 24;
-  *header = (type | spare_);
-  *header = (*header | seq);
-  return;
-}
-
-
-// Function to retrieve data from the dl_data header (32bits) (doing bitwise operations)
-void read_dl_data_header(int *pdu_type, int *spare, int *seqno, uint32_t header) {
-  *pdu_type = header;
-  *spare = header;
-  *seqno = header;
-  *pdu_type = *pdu_type >> 28;
-  *spare = *spare << 4;
-  *spare = *spare >> 28;
-  *seqno = *seqno << 8;
-  *seqno = *seqno >> 8;
-  return;
-}
-
-int f1u_serialize_message(Protocol__F1uMessage *msg, void **buf,int *size) {
-  *size = protocol__f1u_message__get_packed_size(msg);
-  *buf = malloc(*size);
-
-  if (!(*buf))
-    goto error;
-
-  protocol__f1u_message__pack(msg, *buf);
-  return 0;
-error:
-  LOG_E(F1U, "an error occured\n");
-  return -1;
-}
-
-int f1u_deserialize_message(void *data, int size, Protocol__F1uMessage **msg) {
-  *msg = protocol__f1u_message__unpack(NULL, size, data);
-
-  if (*msg == NULL)
-    goto error;
-
-  return 0;
-error:
-  LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int f1u_dl_data_create_header(uint32_t pdu_type, uint32_t f1u_sn, Protocol__DlDataHeader **header) {
-  *header = malloc(sizeof(Protocol__DlDataHeader));
-
-  if(*header == NULL)
-    goto error;
-
-  protocol__dl_data_header__init(*header);
-  LOG_D(F1U, "Initialized the DL Data User header\n");
-  fill_dl_data_header(pdu_type, 0, f1u_sn, &(*header)->fields);
-  return 0;
-error:
-  LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int f1u_dl_data(const void *params, Protocol__F1uMessage **msg) {
-  // Initialize the PDCP params
-  dl_data_args *args = (dl_data_args *)params;
-  Protocol__DlDataHeader *header;
-
-  if (f1u_dl_data_create_header(args->pdu_type, args->sn, &header) != 0)
-    goto error;
-
-  Protocol__DlUserData *dl_data = NULL;
-  *msg = malloc(sizeof(Protocol__DlUserData));
-
-  if(*msg == NULL)
-    goto error;
-
-  // FIXME: Is the following used? It seems to be overwritten by the function
-  // protocol__dl_user_data__init() anyway
-  //dl_data = *msg;
-  protocol__dl_user_data__init(dl_data);
-  // Copy data to the bytes structure
-  dl_data->pdu.data = malloc(args->sdu_size);
-  dl_data->pdu.len = args->sdu_size;
-  memcpy(dl_data->pdu.data, args->sdu_p, args->sdu_size);
-  dl_data->frame = args->frame;
-  dl_data->subframe = args->subframe;
-  dl_data->rnti = args->rnti;
-  dl_data->header = header;
-  return 0;
-error:
-
-  if(header != NULL)
-    free(header);
-
-  if(*msg != NULL)
-    free(*msg);
-
-  LOG_E(F1U, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, uint8_t **buf, int *size) {
-  *size = protocol__flexsplit_message__get_packed_size(msg);
-  *buf = malloc(*size);
-
-  if (!(*buf))
-    goto error;
-
-  protocol__flexsplit_message__pack(msg, *buf);
-  return 0;
-error:
-  LOG_E(MAC, "an error occured\n");
-  return -1;
-}
-
-/* We assume that the buffer size is equal to the message size.
-   Should be chekced durint Tx/Rx */
-int proto_agent_deserialize_message(void *data, int size, Protocol__FlexsplitMessage **msg) {
-  *msg = protocol__flexsplit_message__unpack(NULL, size, data);
-
-  if (*msg == NULL)
-    goto error;
-
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int fsp_create_header(xid_t xid, Protocol__FspType type,  Protocol__FspHeader **header) {
-  *header = malloc(sizeof(Protocol__FspHeader));
-
-  if(*header == NULL)
-    goto error;
-
-  protocol__fsp_header__init(*header);
-  LOG_D(PROTO_AGENT, "Initialized the PROTOBUF message header\n");
-  (*header)->version = FLEXSPLIT_VERSION;
-  LOG_D(PROTO_AGENT, "Set the vversion to FLEXSPLIT_VERSION\n");
-  (*header)->has_version = 1;
-  (*header)->type = type;
-  (*header)->has_type = 1;
-  (*header)->xid = xid;
-  (*header)->has_xid = 1;
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int just_print(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  return 1;
-}
-
-int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  Protocol__FspCtxt *ctxt = NULL;
-  Protocol__FspRlcPdu *pdu = NULL;
-  Protocol__FspRlcData *rlc_data = NULL;
-  Protocol__FspRlcDataReq *data_req = NULL;
-  // Initialize the PDCP params
-  data_req_args *args = (data_req_args *)params;
-  // Create the protobuf header
-  Protocol__FspHeader *header;
-  xid_t xid = mod_id;
-  LOG_D(PROTO_AGENT, "creating the data_req message\n");
-
-  if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_RLC_DATA_REQ, &header) != 0)
-    goto error;
-
-  /* Begin constructing the messages. They are defined as follows:
-  *  1) fspRlcPdu is storing the bytes of the packet
-  *  2) Message fspRlcData is packing the packet + the context of the PDCP (separate message)
-  *  3) Messge fspRlcDataReq is packing the header, enb_id and fspRlcData
-  */
-  ctxt = malloc(sizeof(Protocol__FspCtxt));
-  pdu = malloc(sizeof(Protocol__FspRlcPdu));
-  rlc_data = malloc(sizeof(Protocol__FspRlcData));
-  data_req = malloc(sizeof(Protocol__FspRlcDataReq));
-  protocol__fsp_ctxt__init(ctxt);
-  protocol__fsp_rlc_pdu__init(pdu);
-  protocol__fsp_rlc_data__init(rlc_data);
-  protocol__fsp_rlc_data_req__init(data_req);
-  // Copy data to the RlcPdu structure
-  pdu->fsp_pdu_data.data =  malloc(args->sdu_size);
-  pdu->fsp_pdu_data.len = args->sdu_size;
-  memcpy(pdu->fsp_pdu_data.data, args->sdu_p->data, args->sdu_size);
-  pdu->has_fsp_pdu_data = 1;
-  // Copy data to the ctxt structure
-  ctxt->fsp_mod_id = args->ctxt->module_id;
-  ctxt->fsp_enb_flag = args->ctxt->enb_flag;
-  ctxt->fsp_instance = args->ctxt->instance;
-  ctxt->fsp_rnti = args->ctxt->rnti;
-  ctxt->fsp_frame = args->ctxt->frame;
-  ctxt->fsp_subframe = args->ctxt->subframe;
-  ctxt->fsp_enb_index = args->ctxt->eNB_index;
-  ctxt->has_fsp_mod_id = 1;
-  ctxt->has_fsp_enb_flag = 1;
-  ctxt->has_fsp_instance = 1;
-  ctxt->has_fsp_rnti = 1;
-  ctxt->has_fsp_frame = 1;
-  ctxt->has_fsp_subframe = 1;
-  ctxt->has_fsp_enb_index = 1;
-  rlc_data->fsp_ctxt = ctxt;
-  rlc_data->fsp_srb_flag = args->srb_flag;
-  rlc_data->fsp_mbms_flag = args->MBMS_flag;
-  rlc_data->fsp_rb_id = args->rb_id;
-  rlc_data->fsp_muip = args->mui;
-  rlc_data->fsp_confirm = args->confirm;
-  rlc_data->fsp_sdu_buffer_size = args->sdu_size;
-  rlc_data->fsp_pdu = pdu;
-  rlc_data->has_fsp_srb_flag = 1;
-  rlc_data->has_fsp_mbms_flag = 1;
-  rlc_data->has_fsp_rb_id = 1;
-  rlc_data->has_fsp_muip = 1;
-  rlc_data->has_fsp_confirm = 1;
-  rlc_data->has_fsp_sdu_buffer_size = 1;
-  // Up to here, everything is a signle message that is packed inside another. The final data_req
-  // will be created later, after the setting of all variables
-  data_req->header = header;
-  data_req->enb_id = mod_id;
-  data_req->has_enb_id = 1;
-  data_req->pdcp_data = rlc_data;
-  *msg = malloc(sizeof(Protocol__FlexsplitMessage));
-
-  if(*msg == NULL)
-    goto error;
-
-  protocol__flexsplit_message__init(*msg);
-  (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_REQ_MSG;
-  (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE; //we will be waiting for the ACK
-  (*msg)->has_msg_dir = 1;
-  (*msg)->data_req_msg = data_req;
-  return 0;
-error:
-
-  if(header != NULL)
-    free(header);
-
-  if(pdu!=NULL)
-    free(pdu);
-
-  if(rlc_data!=NULL)
-    free(rlc_data);
-
-  if(data_req!= NULL)
-    free(data_req);
-
-  if(*msg != NULL)
-    free(*msg);
-
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
-  if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_REQ_MSG)
-    goto error;
-
-  free(msg->data_req_msg->header);
-  free(msg->data_req_msg->pdcp_data->fsp_pdu->fsp_pdu_data.data);
-  free(msg->data_req_msg->pdcp_data->fsp_pdu);
-  free(msg->data_req_msg->pdcp_data->fsp_ctxt);
-  free(msg->data_req_msg->pdcp_data);
-  free(msg->data_req_msg);
-  free(msg);
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-/* code useless in this status: return 0 anyways
-  rlc_op_status_t result = 0;
-  printf("PROTO_AGENT: handling the data_req_ack message\n");
-  Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
-  Protocol__FspRlcDataReqAck *data_ack = input->data_req_ack;
-  result = data_ack->result;
-  printf("PROTO_AGENT: ACK RESULT IS %u\n", result);
-  ack_result = result;
-*/
-  return 0;
-}
-
-
-int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  rlc_op_status_t result = 0;
-  Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
-  Protocol__FspRlcDataReq *data_req = input->data_req_msg;
-  Protocol__FspCtxt *ctxt = NULL;
-  Protocol__FspRlcData *rlc_data = NULL;
-  rlc_data = data_req->pdcp_data;
-  ctxt = rlc_data->fsp_ctxt;
-  protocol_ctxt_t  ctxt_pP;
-  srb_flag_t       srb_flagP = 0;
-  rb_id_t          rb_idP = 0;
-  mui_t            muiP = 0;
-  confirm_t        confirmP = 0;
-  MBMS_flag_t      flag_MBMS = 0;
-  sdu_size_t       pdcp_pdu_size = 0;
-  mem_block_t     *pdcp_pdu_p = NULL;
-  // Create a new protocol context for handling the packet
-  ctxt_pP.module_id = ctxt->fsp_mod_id;
-  ctxt_pP.enb_flag = ctxt->fsp_enb_flag;
-  ctxt_pP.instance = ctxt->fsp_instance;
-  ctxt_pP.rnti = ctxt->fsp_rnti;
-  ctxt_pP.frame = ctxt->fsp_frame;
-  ctxt_pP.subframe = ctxt->fsp_subframe;
-  ctxt_pP.eNB_index = ctxt->fsp_enb_index;
-  srb_flagP = rlc_data->fsp_srb_flag;
-  flag_MBMS = rlc_data->fsp_mbms_flag;
-  rb_idP = rlc_data->fsp_rb_id;
-  muiP = rlc_data->fsp_muip;
-  confirmP = rlc_data->fsp_confirm;
-  pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len;
-  pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
-
-  if (!pdcp_pdu_p) {
-    LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__);
-    return -1;
-  }
-
-  memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
-  if (RC.nrrrc) {
-    LOG_D(PROTO_AGENT, "proto_agent received pdcp_data_req \n");
-    // for (int i = 0; i < pdcp_pdu_size; i++)
-    //   printf(" %2.2x", (unsigned char)pdcp_pdu_p->data[i]);
-    // printf("\n");
-    du_rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p);
-    result = 1;
-  } else {
-    result = rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p, NULL, NULL);
-  }
-  return result;
-}
-
-int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) {
-  if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG)
-    goto error;
-
-  free(msg->data_ind_msg->header);
-  free(msg->data_ind_msg->rlc_data->fsp_pdu->fsp_pdu_data.data);
-  free(msg->data_ind_msg->rlc_data->fsp_pdu);
-  free(msg->data_ind_msg->rlc_data->fsp_ctxt);
-  free(msg->data_ind_msg->rlc_data);
-  free(msg->data_ind_msg);
-  free(msg);
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  Protocol__FspCtxt *ctxt = NULL;
-  Protocol__FspRlcPdu *pdu = NULL;
-  Protocol__FspRlcData *rlc_data = NULL;
-  Protocol__FspPdcpDataInd *data_ind = NULL;
-  // Initialize the PDCP params
-  data_req_args *args = (data_req_args *)params;
-  // Create the protobuf header
-  Protocol__FspHeader *header;
-  xid_t xid = mod_id;
-  LOG_D(PROTO_AGENT, "creating the data_ind message\n");
-
-  if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_PDCP_DATA_IND, &header) != 0)
-    goto error;
-
-  /* Begin constructing the messages. They are defined as follows:
-  *  1) fspRlcPdu is storing the bytes of the packet
-  *  2) Message fspRlcData is packing the packet + the context of the PDCP (separate message)
-  *  3) Messge fspRlcDataReq is packing the header, enb_id and fspRlcData
-  */
-  ctxt = malloc(sizeof(Protocol__FspCtxt));
-  pdu = malloc(sizeof(Protocol__FspRlcPdu));
-  rlc_data = malloc(sizeof(Protocol__FspRlcData));
-  data_ind = malloc(sizeof(Protocol__FspPdcpDataInd));
-  protocol__fsp_ctxt__init(ctxt);
-  protocol__fsp_rlc_pdu__init(pdu);
-  protocol__fsp_rlc_data__init(rlc_data);
-  protocol__fsp_pdcp_data_ind__init(data_ind);
-  // Copy data to the RlcPdu structure
-  pdu->fsp_pdu_data.data =  malloc(args->sdu_size);
-  pdu->fsp_pdu_data.len = args->sdu_size;
-  memcpy(pdu->fsp_pdu_data.data, args->sdu_p->data, args->sdu_size);
-  pdu->has_fsp_pdu_data = 1;
-  // Copy data to the ctxt structure
-  ctxt->fsp_mod_id = args->ctxt->module_id;
-  ctxt->fsp_enb_flag = args->ctxt->enb_flag;
-  ctxt->fsp_instance = args->ctxt->instance;
-  ctxt->fsp_rnti = args->ctxt->rnti;
-  ctxt->fsp_frame = args->ctxt->frame;
-  ctxt->fsp_subframe = args->ctxt->subframe;
-  ctxt->fsp_enb_index = args->ctxt->eNB_index;
-  ctxt->has_fsp_mod_id = 1;
-  ctxt->has_fsp_enb_flag = 1;
-  ctxt->has_fsp_instance = 1;
-  ctxt->has_fsp_rnti = 1;
-  ctxt->has_fsp_frame = 1;
-  ctxt->has_fsp_subframe = 1;
-  ctxt->has_fsp_enb_index = 1;
-  rlc_data->fsp_ctxt = ctxt;
-  rlc_data->fsp_srb_flag = args->srb_flag;
-  rlc_data->fsp_mbms_flag = args->MBMS_flag;
-  rlc_data->fsp_rb_id = args->rb_id;
-  rlc_data->fsp_sdu_buffer_size = args->sdu_size;
-  rlc_data->fsp_pdu = pdu;
-  rlc_data->has_fsp_srb_flag = 1;
-  rlc_data->has_fsp_mbms_flag = 1;
-  rlc_data->has_fsp_rb_id = 1;
-  rlc_data->has_fsp_sdu_buffer_size = 1;
-  // Up to here, everything is a signle message that is packed inside another. The final data_req
-  // will be created later, after the setting of all variables
-  data_ind->header = header;
-  data_ind->enb_id = mod_id;
-  data_ind->has_enb_id = 1;
-  data_ind->rlc_data = rlc_data;
-  *msg = malloc(sizeof(Protocol__FlexsplitMessage));
-
-  if(*msg == NULL)
-    goto error;
-
-  protocol__flexsplit_message__init(*msg);
-  LOG_D(PROTO_AGENT,"setting the message case to %d\n", PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG);
-  (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG;
-  (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE; //we will be waiting for the ACK
-  (*msg)->has_msg_dir = 1;
-  (*msg)->data_ind_msg = data_ind; //data_req;
-  return 0;
-error:
-
-  if(header != NULL)
-    free(header);
-
-  if(pdu!=NULL)
-    free(pdu);
-
-  if(rlc_data!=NULL)
-    free(rlc_data);
-
-  if(data_ind!= NULL)
-    free(data_ind);
-
-  if(*msg != NULL)
-    free(*msg);
-
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  boolean_t result = 0;
-  Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
-  Protocol__FspPdcpDataInd *data_ind = input->data_ind_msg;
-  Protocol__FspCtxt *ctxt = NULL;
-  Protocol__FspRlcData *rlc_data = NULL;
-  rlc_data = data_ind->rlc_data;
-  ctxt = rlc_data->fsp_ctxt;
-  protocol_ctxt_t  ctxt_pP;
-  srb_flag_t       srb_flagP = 0;
-  rb_id_t          rb_idP = 0;
-  sdu_size_t       pdcp_pdu_size = 0;
-  MBMS_flag_t      flag_MBMS = 0;
-  mem_block_t     *pdcp_pdu_p = NULL;
-  // Create a new protocol context for handling the packet
-  ctxt_pP.module_id = ctxt->fsp_mod_id;
-  ctxt_pP.enb_flag = ctxt->fsp_enb_flag;
-  ctxt_pP.instance = ctxt->fsp_instance;
-  ctxt_pP.rnti = ctxt->fsp_rnti;
-  ctxt_pP.frame = ctxt->fsp_frame;
-  ctxt_pP.subframe = ctxt->fsp_subframe;
-  ctxt_pP.brOption = 0;
-  ctxt_pP.eNB_index = ctxt->fsp_enb_index;
-  srb_flagP = rlc_data->fsp_srb_flag;
-  flag_MBMS = rlc_data->fsp_mbms_flag;
-  rb_idP = rlc_data->fsp_rb_id;
-  pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len;
-  pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
-
-  if (!pdcp_pdu_p) goto error;
-
-  memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size);
-  //   if (xid == 1)
-  //     pdcp_data_ind_wifi((const protocol_ctxt_t*) ctxt_pP, (const srb_flag_t) srb_flagP, (const MBMS_flag_t) flag_MBMS, (const rb_id_t) rb_idP, pdcp_pdu_size, pdcp_pdu_p);
-  //   else if (xid == 0)   // FIXME: USE a preprocessed definition
-  LOG_D(PROTO_AGENT, "[inst %ld] Received PDCP PDU with size %d for UE RNTI %x RB %ld, Calling pdcp_data_ind\n", ctxt_pP.instance, pdcp_pdu_size,ctxt_pP.rnti,rb_idP);
-  result = pdcp_data_ind(&ctxt_pP,
-                         srb_flagP,
-                         flag_MBMS,
-                         rb_idP,
-                         pdcp_pdu_size,
-                         pdcp_pdu_p, NULL, NULL);
-  return result;
-error:
-
-  if (pdcp_pdu_p)
-    free_mem_block(pdcp_pdu_p, __func__);
-
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  Protocol__FspHeader *header;
-  Protocol__FspHello *hello_msg = NULL;
-  /*TODO: Need to set random xid or xid from received hello message*/
-  xid_t xid = mod_id;
-
-  if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_HELLO, &header) != 0)
-    goto error;
-
-  LOG_D(PROTO_AGENT, "creating the HELLO message\n");
-  hello_msg = malloc(sizeof(Protocol__FspHello));
-
-  if(hello_msg == NULL)
-    goto error;
-
-  protocol__fsp_hello__init(hello_msg);
-  hello_msg->header = header;
-  *msg = malloc(sizeof(Protocol__FlexsplitMessage));
-
-  if(*msg == NULL)
-    goto error;
-
-  protocol__flexsplit_message__init(*msg);
-  (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_HELLO_MSG;
-  (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__SUCCESSFUL_OUTCOME;
-  (*msg)->has_msg_dir = 1;
-  (*msg)->hello_msg = hello_msg;
-  return 0;
-error:
-
-  if(header != NULL)
-    free(header);
-
-  if(hello_msg!=NULL)
-    free(hello_msg);
-
-  if(*msg != NULL)
-    free(*msg);
-
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-
-int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg) {
-  if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_HELLO_MSG)
-    goto error;
-
-  free(msg->hello_msg->header);
-  free(msg->hello_msg);
-  free(msg);
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_echo_request(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  Protocol__FspHeader *header;
-  Protocol__FspEchoRequest *echo_request_msg = NULL;
-  xid_t xid = mod_id;
-
-  if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_ECHO_REQUEST, &header) != 0)
-    goto error;
-
-  LOG_D(PROTO_AGENT, "creating the echo request message\n");
-  echo_request_msg = malloc(sizeof(Protocol__FspEchoRequest));
-
-  if(echo_request_msg == NULL)
-    goto error;
-
-  protocol__fsp_echo_request__init(echo_request_msg);
-  echo_request_msg->header = header;
-  *msg = malloc(sizeof(Protocol__FlexsplitMessage));
-
-  if(*msg == NULL)
-    goto error;
-
-  protocol__flexsplit_message__init(*msg);
-  LOG_D(PROTO_AGENT,"setting the message direction to %d\n", PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG);
-  (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG;
-  (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__INITIATING_MESSAGE;
-  (*msg)->has_msg_dir = 1;
-  (*msg)->echo_request_msg = echo_request_msg;
-  return 0;
-error:
-
-  if(header != NULL)
-    free(header);
-
-  if(echo_request_msg != NULL)
-    free(echo_request_msg);
-
-  if(*msg != NULL)
-    free(*msg);
-
-  return -1;
-}
-
-int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg) {
-  if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REQUEST_MSG)
-    goto error;
-
-  free(msg->echo_request_msg->header);
-  free(msg->echo_request_msg);
-  free(msg);
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_echo_reply(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
-  xid_t xid;
-  Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
-  Protocol__FspEchoRequest *echo_req = input->echo_request_msg;
-  Protocol__FspEchoReply *echo_reply_msg = NULL;
-  xid = (echo_req->header)->xid;
-  LOG_D(PROTO_AGENT, "creating the echo reply message\n");
-  Protocol__FspHeader *header;
-
-  if (fsp_create_header(xid, PROTOCOL__FSP_TYPE__FSPT_ECHO_REPLY, &header) != 0)
-    goto error;
-
-  echo_reply_msg = malloc(sizeof(Protocol__FspEchoReply));
-
-  if(echo_reply_msg == NULL)
-    goto error;
-
-  protocol__fsp_echo_reply__init(echo_reply_msg);
-  echo_reply_msg->header = header;
-  *msg = malloc(sizeof(Protocol__FlexsplitMessage));
-
-  if(*msg == NULL)
-    goto error;
-
-  protocol__flexsplit_message__init(*msg);
-  (*msg)->msg_case = PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REPLY_MSG;
-  (*msg)->msg_dir = PROTOCOL__FLEXSPLIT_DIRECTION__SUCCESSFUL_OUTCOME;
-  (*msg)->has_msg_dir = 1;
-  (*msg)->echo_reply_msg = echo_reply_msg;
-  return 0;
-error:
-
-  if(header != NULL)
-    free(header);
-
-  if(echo_reply_msg != NULL)
-    free(echo_reply_msg);
-
-  if(*msg != NULL)
-    free(*msg);
-
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
-
-int proto_agent_destroy_echo_reply(Protocol__FlexsplitMessage *msg) {
-  if(msg->msg_case != PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REPLY_MSG)
-    goto error;
-
-  free(msg->echo_reply_msg->header);
-  free(msg->echo_reply_msg);
-  free(msg);
-  return 0;
-error:
-  LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
-  return -1;
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.h b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.h
deleted file mode 100644
index 8f553e05e1db1401358c4fa0dc9dc5d5624b8d42..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent_common.h
- * \brief common message primitves and utilities 
- * \author Navid Nikaein and Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-
-
-
-#ifndef PROTO_AGENT_COMMON_H_
-#define PROTO_AGENT_COMMON_H_
-
-#include <time.h>
-
-#include "flexsplit.pb-c.h"
-
-// Do not need these
-//#include "stats_messages.pb-c.h"
-//#include "stats_common.pb-c.h"
-
-#include "proto_agent_defs.h"
-//#include "ENB_APP/enb_config.h"
-#include "UTIL/MEM/mem_block.h"
-
-//#include "LAYER2/MAC/extern.h"
-//#include "LAYER2/RLC/rlc.h"
-
-# include "tree.h"
-# include "intertask_interface.h"
-
-#define FLEXSPLIT_VERSION 0
-
-typedef int (*proto_agent_message_decoded_callback)(
-	mod_id_t mod_id,
-       	const void *params,
-	Protocol__FlexsplitMessage **msg
-);
-
-typedef int (*proto_agent_message_destruction_callback)(
-	Protocol__FlexsplitMessage *msg
-);
-
-
-
-/**********************************
- * progRAN protocol messages helper 
- * functions and generic handlers
- **********************************/
-
-int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, uint8_t **buf, int *size);
-int proto_agent_deserialize_message(void *data, int size, Protocol__FlexsplitMessage **msg);
-
-uint8_t *proto_agent_pack_message(Protocol__FlexsplitMessage *msg, int *size);
-
-err_code_t proto_agent_destroy_flexsplit_message(Protocol__FlexsplitMessage *msg);
-
-int fsp_create_header(xid_t xid, Protocol__FspType type, Protocol__FspHeader **header);
-
-int proto_agent_hello(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-int proto_agent_destroy_hello(Protocol__FlexsplitMessage *msg);
-int proto_agent_echo_request(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-int proto_agent_destroy_echo_request(Protocol__FlexsplitMessage *msg);
-int proto_agent_echo_reply(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-int proto_agent_destroy_echo_reply(Protocol__FlexsplitMessage *msg);
-
-int proto_agent_pdcp_data_req(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg);
-int proto_agent_pdcp_data_ind(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg);
-int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-
-int just_print(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-
-
-int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg);
-
-
-Protocol__FlexsplitMessage* proto_agent_handle_message (mod_id_t mod_id, 
-						    uint8_t *data, 
-						    int size);
-
-Protocol__FlexsplitMessage *proto_agent_handle_timed_task(void *args);
-
-typedef struct _data_req_args data_req_args;
-typedef struct _dl_data_args dl_data_args;
-
-struct _data_req_args{
-  const protocol_ctxt_t* ctxt;
-  srb_flag_t srb_flag;
-  MBMS_flag_t MBMS_flag;
-  rb_id_t rb_id; 
-  mui_t mui;
-  confirm_t confirm;
-  sdu_size_t sdu_size;
-  mem_block_t *sdu_p;
-};
-
-struct _dl_data_args{
-  uint8_t pdu_type;
-  uint32_t sn;
-  frame_t frame;
-  sub_frame_t subframe;
-  rnti_t rnti;
-  sdu_size_t sdu_size;
-  mem_block_t *sdu_p;
-};
-
-
-#endif
-
-
-
-
-
-
-
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_defs.h b/openair2/LAYER2/PROTO_AGENT/proto_agent_defs.h
deleted file mode 100644
index cd730a6de864f604c979f58021e806f505220c0d..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_defs.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent_defs.h
- * \brief enb agent common definitions 
- * \author Navid Nikaein and Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-#ifndef PROTO_AGENT_DEFS_H_
-#define PROTO_AGENT_DEFS_H_
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <string.h>
-
-#include "openairinterface5g_limits.h"
-#include "UTIL/ASYNC_IF/link_manager.h"
-
-#define DEFAULT_PROTO_AGENT_IPv4_ADDRESS "127.0.0.1"
-#define DEFAULT_PROTO_AGENT_PORT          2210
-#define DEFAULT_PROTO_AGENT_CACHE        "/mnt/oai_agent_cache"
-
-typedef enum {
-  
-  PROTO_AGENT_DEFAULT=0,
-  
-  ENB_AGENT_PHY=1,
-  ENB_AGENT_MAC=2,
-  ENB_AGENT_RLC=3,
-  ENB_AGENT_PDCP=4,
-  ENB_AGENT_RRC=5,
-  ENB_AGENT_S1AP=6,
-  ENB_AGENT_GTP=7,
-  ENB_AGENT_X2AP=8,
-
-  ENB_AGENT_MAX=9,
-    
-} proto_agent_id_t;
-
-/*
-typedef enum {
-  ENB_AGENT_ACTION_NONE = 0x0,
-
-  ENB_AGENT_ACTION_SEND = 0x1,
-
-  ENB_AGENT_ACTION_APPLY = 0x2,
-
-  ENB_AGENT_ACTION_CLEAR = 0x4,
-
-  ENB_AGENT_ACTION_WRITE = 0x8,
-
-  ENB_AGENT_ACTION_FILTER = 0x10,
-
-  ENB_AGENT_ACTION_PREPROCESS = 0x20,
-
-  ENB_AGENT_ACTION_METER = 0x40,
-  
-  ENB_AGENT_ACTION_MAX = 0x7f,
-} agent_action_t;
-*/
-/*
-typedef enum {
-  
-  RAN_LTE_OAI= 0,
-  
- RAN_NAME_MAX = 0x7f,
-} ran_name_t;
-*/
-typedef uint8_t xid_t;  
-typedef uint8_t mod_id_t;  // module or enb id 
-typedef uint8_t lcid_t;
-typedef int32_t err_code_t;
-
-typedef struct {
-  /* general info */ 
- 
-  /* stats */
-
-  uint32_t total_rx_msg;
-  uint32_t total_tx_msg;
-   
-  uint32_t rx_msg[NUMBER_OF_eNB_MAX];
-  uint32_t tx_msg[NUMBER_OF_eNB_MAX];
-
-} proto_agent_info_t;
-
-/* forward declaration */
-struct proto_agent_channel_s;
-
-typedef struct proto_agent_instance_s {
-  mod_id_t    mod_id;
-  proto_agent_info_t agent_info;
-  struct proto_agent_channel_s *channel;
-  pthread_t   recv_thread;
-  uint8_t     exit;
-} proto_agent_instance_t;
-
-#endif 
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_handler.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_handler.c
deleted file mode 100644
index 82f7849717fae519b81acc0071a6ca7dcf85e62b..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_handler.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent_handler.c
- * \brief enb agent tx and rx message handler 
- * \author Navid Nikaein and Xenofon Foukas 
- * \date 2016
- * \version 0.1
- */
-
-
-#include "proto_agent_common.h"
-#include "common/utils/LOG/log.h"
-#include "assertions.h"
-
-proto_agent_message_decoded_callback proto_agent_messages_callback[][3] = {
-  {proto_agent_hello, 0, 0},                 /* agent hello */
-  {proto_agent_echo_reply, 0, 0},            /* echo */
-  {0, just_print, 0},                        /* just print */
-  {proto_agent_pdcp_data_req_process, proto_agent_pdcp_data_req_process, 0}, /* PDCP data REQ */
-  {0, proto_agent_get_ack_result, 0},        /* get ACK result */
-  {proto_agent_pdcp_data_ind_process, proto_agent_pdcp_data_ind_process, 0}, /* PDCP data IND */
-  {0, just_print, 0},                        /* just print */
-};
-
-proto_agent_message_destruction_callback proto_message_destruction_callback[] = {
-  proto_agent_destroy_hello,
-  proto_agent_destroy_echo_request,
-  proto_agent_destroy_echo_reply,
-  proto_agent_destroy_pdcp_data_req,
-  0,
-  proto_agent_destroy_pdcp_data_ind,
-  0,
-};
-
-//static const char *proto_agent_direction2String[] = {
-//  "", /* not_set  */
-//  "originating message", /* originating message */
-//  "successfull outcome", /* successfull outcome */
-//  "unsuccessfull outcome", /* unsuccessfull outcome */
-//};
-
-
-Protocol__FlexsplitMessage* proto_agent_handle_message (mod_id_t mod_id,
-						    uint8_t *data, 
-						    int size){
-  
-  Protocol__FlexsplitMessage *decoded_message = NULL;
-  Protocol__FlexsplitMessage *reply_message = NULL;
-  err_code_t err_code;
-  DevAssert(data != NULL);
-
-  LOG_D(PROTO_AGENT, "Deserializing message with size %u \n", size);
-  if (proto_agent_deserialize_message(data, (int) size, &decoded_message) < 0) {
-    err_code= PROTOCOL__FLEXSPLIT_ERR__MSG_DECODING;
-    goto error; 
-  }
-  /* after deserialization, we don't need the original data memory anymore */
-  free(data);
-  Protocol__FspHeader *header = (Protocol__FspHeader*) decoded_message;
-  if (header->has_type)
-   {
-    LOG_D(PROTO_AGENT, "Deserialized MSG type is %d and %u\n", decoded_message->msg_case, decoded_message->msg_dir);
-   }
-
-  if ((decoded_message->msg_case > sizeof(proto_agent_messages_callback) / (3*sizeof(proto_agent_message_decoded_callback))) || 
-      (decoded_message->msg_dir > PROTOCOL__FLEXSPLIT_DIRECTION__UNSUCCESSFUL_OUTCOME))
-  {
-      err_code= PROTOCOL__FLEXSPLIT_ERR__MSG_NOT_HANDLED;
-      LOG_D(PROTO_AGENT,"Handling message: MSG NOT handled, going to error\n");
-      goto error;
-  }
-
-  
-  err_code = ((*proto_agent_messages_callback[decoded_message->msg_case-1][decoded_message->msg_dir-1])(mod_id, (void *) decoded_message, &reply_message));
-
-  if ( err_code < 0 )
-  {
-    LOG_I(PROTO_AGENT, "decoded_message case : %d, direction : %d \n", decoded_message->msg_case-1, decoded_message->msg_dir-1);
-    goto error;
-  }
-
-  protocol__flexsplit_message__free_unpacked(decoded_message, NULL);
-  LOG_D(PROTO_AGENT,"Returning REPLY message after the callback\n");
-  return reply_message;
-  
- error:
-  LOG_E(PROTO_AGENT,"errno %d occured\n",err_code);
-  return NULL;
-}
-
-
-
-uint8_t *proto_agent_pack_message(Protocol__FlexsplitMessage *msg, int *size)
-{
-  uint8_t *buffer;
-  err_code_t err_code = PROTOCOL__FLEXSPLIT_ERR__NO_ERR;
-  
-  if (proto_agent_serialize_message(msg, &buffer, size) < 0 ) {
-    err_code = PROTOCOL__FLEXSPLIT_ERR__MSG_ENCODING;
-    goto error;
-  }
-  
-  if (proto_message_destruction_callback[msg->msg_case-1])
-    err_code = ((*proto_message_destruction_callback[msg->msg_case-1])(msg));
-  
-  DevAssert(buffer !=NULL);
-  
-  LOG_D(PROTO_AGENT,"Serialized the enb mac stats reply (size %d)\n", *size);
-  return buffer;
-  
- error : 
-  LOG_E(PROTO_AGENT,"errno %d occured\n",err_code);
-  
-  return NULL;   
-}
-
-err_code_t proto_agent_destroy_flexsplit_message(Protocol__FlexsplitMessage *msg) {
-  return ((*proto_message_destruction_callback[msg->msg_case-1])(msg));
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
deleted file mode 100644
index 925c11c8f81907b4869f681f7d3ffe93fdbed9dc..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent_net_comm.c
- * \brief enb agent network interface abstraction 
- * \author Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-
-#include "proto_agent_net_comm.h"
-#include "common/utils/LOG/log.h"
-
-proto_agent_channel_t *proto_channel[NUMBER_OF_eNB_MAX][ENB_AGENT_MAX];
-static proto_agent_channel_instance_t channel_instance;
-int proto_agent_channel_id = 0;
-
-int proto_agent_register_channel(mod_id_t mod_id, proto_agent_channel_t *channel, proto_agent_id_t agent_id) {
-  int i;
-
-  if (channel == NULL) {
-    return -1;
-  }
-
-  if (agent_id == ENB_AGENT_MAX) {
-    for (i = 0; i < ENB_AGENT_MAX; i++) {
-      proto_channel[mod_id][i] = channel;
-    }
-  } else {
-    proto_channel[mod_id][agent_id] = channel;
-  }
-  return 0;
-}
-
-void proto_agent_unregister_channel(mod_id_t mod_id, proto_agent_id_t agent_id) {
-  int i;
-
-  if (agent_id == ENB_AGENT_MAX) {
-    for (i = 0; i < ENB_AGENT_MAX; i++) {
-      proto_channel[mod_id][i] = NULL;
-    }
-  } else {
-    proto_channel[mod_id][agent_id] = NULL;
-  }
-}
-
-int proto_agent_create_channel(void *channel_info,
-			       int (*msg_send)(void *data, int size, int priority, void *channel_info),
-			       int (*msg_recv)(void **data, int *priority, void *channel_info),
-			     void (*release)(proto_agent_channel_t *channel)) {
-  
-  int channel_id = ++proto_agent_channel_id;
-  proto_agent_channel_t *channel = (proto_agent_channel_t *) malloc(sizeof(proto_agent_channel_t));
-  channel->channel_id = channel_id;
-  channel->channel_info = channel_info;
-  channel->msg_send = msg_send;
-  channel->msg_recv = msg_recv;
-  channel->release = release;
-  
-  /*element should be a real pointer*/
-  RB_INSERT(proto_agent_channel_map, &channel_instance.proto_agent_head, channel); 
-  
-  LOG_D(PROTO_AGENT, "Created a new channel with id 0x%x\n", channel->channel_id);
- 
-  return channel_id; 
-}
-
-int proto_agent_destroy_channel(int channel_id) {
-  int i, j;
-
-  /*Check to see if channel exists*/
-  struct proto_agent_channel_s *e = NULL;
-  struct proto_agent_channel_s search;
-  memset(&search, 0, sizeof(struct proto_agent_channel_s));
-
-  e = RB_FIND(proto_agent_channel_map, &channel_instance.proto_agent_head, &search);
-
-  if (e == NULL) {
-    return -1;
-  }
-
-  /*Unregister the channel from all agents*/
-  for (i = 0; i < NUMBER_OF_eNB_MAX; i++) {
-    for (j = 0; j < ENB_AGENT_MAX; j++) {
-      if (proto_channel[i][j] != NULL) {
-	if (proto_channel[i][j]->channel_id == e->channel_id) {
-	  proto_channel[i][j] = NULL;
-	}
-      }
-    }
-  }
-
-  /*Remove the channel from the tree and free memory*/
-  RB_REMOVE(proto_agent_channel_map, &channel_instance.proto_agent_head, e);
-  e->release(e);
-  free(e);
-
-  return 0;
-}
-
-err_code_t proto_agent_init_channel_container(void) {
-  int i, j;
-  LOG_D(PROTO_AGENT, "init RB tree for channel container\n");
-
-  RB_INIT(&channel_instance.proto_agent_head);
-
-  for (i = 0; i < NUMBER_OF_eNB_MAX; i++) {
-    for (j = 0; j < ENB_AGENT_MAX; j++) {
-    proto_channel[i][j] = NULL;
-    }
-  }
-
-  return 0;
-}
-
-RB_GENERATE(proto_agent_channel_map,proto_agent_channel_s, entry, proto_agent_compare_channel);
-
-int proto_agent_compare_channel(struct proto_agent_channel_s *a, struct proto_agent_channel_s *b) {
-  if (a->channel_id < b->channel_id) return -1;
-  if (a->channel_id > b->channel_id) return 1;
-
-  // equal timers
-  return 0;
-}
-
-proto_agent_channel_t * proto_agent_get_channel(int channel_id) {
-  
-  struct proto_agent_channel_s search;
-  memset(&search, 0, sizeof(struct proto_agent_channel_s));
-  search.channel_id = channel_id;
-  
-  return  RB_FIND(proto_agent_channel_map, &channel_instance.proto_agent_head, &search);
-  
-}
diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h b/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h
deleted file mode 100644
index 55fca5a928eb4d52fefa4cd6e056e0e80c191ec9..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file enb_agent_net_comm.h
- * \brief enb agent network interface abstraction 
- * \autho Xenofon Foukas
- * \date 2016
- * \version 0.1
- */
-#ifndef PROTO_AGENT_NET_COMM_H_
-#define PROTO_AGENT_NET_COMM_H_
-
-#include "proto_agent_defs.h"
-
-#include "tree.h"
-#define ENB_AGENT_MAX 9
-
-/* forward declaration */
-struct proto_agent_async_channel_s;
-
-/*Channel related information used for Tx/Rx of protocol messages*/
-typedef struct proto_agent_channel_s {
-  RB_ENTRY(proto_agent_channel_s) entry;
-  int channel_id;
-  struct proto_agent_async_channel_s *channel_info;
-  /*Callbacks for channel message Tx and Rx*/
-  int (*msg_send)(void *data, int size, int priority, void *channel_info);
-  int (*msg_recv)(void **data, int *priority, void *channel_info);
-  void (*release)(struct proto_agent_channel_s *channel);
-} proto_agent_channel_t;
-
-typedef struct proto_agent_channel_instance_s{
-  RB_HEAD(proto_agent_channel_map, proto_agent_channel_s) proto_agent_head;
-} proto_agent_channel_instance_t;
-
-
-/*Register a channel to an agent. Use ENB_AGENT_MAX to register the
- *same channel to all agents*/
-int proto_agent_register_channel(mod_id_t mod_id, proto_agent_channel_t *channel, proto_agent_id_t agent_id);
-
-/*Unregister the current channel of an agent. Use ENB_AGENT_MAX to unregister all channels*/
-void proto_agent_unregister_channel(mod_id_t mod_id, proto_agent_id_t agent_id);
-
-/*Create a new channel. Returns the id of the new channel or negative number otherwise*/
-int proto_agent_create_channel(void *channel_info,
-			       int (*msg_send)(void *data, int size, int priority, void *channel_info),
-			       int (*msg_recv)(void **data, int *priority, void *channel_info),
-			     void (*release)(proto_agent_channel_t *channel));
-
-/*Unregister a channel from all agents and destroy it. Returns 0 in case of success*/
-int proto_agent_destroy_channel(int channel_id);
-
-/*Return an agent communication channel based on its id*/
-proto_agent_channel_t * proto_agent_get_channel(int channel_id);
-
-/*Should be called before performing any channel operations*/
-err_code_t proto_agent_init_channel_container(void);
-
-int proto_agent_compare_channel(struct proto_agent_channel_s *a, struct proto_agent_channel_s *b);
-
-/* RB_PROTOTYPE is for .h files */
-RB_PROTOTYPE(proto_agent_channel_map, proto_agent_channel_s, entry, proto_agent_compare_channel);
-
-#endif /*ENB_AGENT_COMM_H_*/
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
index de947225bbd4e03ed1fa4f32bd8ab384f8d98346..4eb0907046aef6ef7301878a26b24df22ec2a83a 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
@@ -27,7 +27,6 @@
 //-----------------------------------------------------------------------------
 
 #include "assertions.h"
-#include "msc.h"
 #include "hashtable.h"
 #include "rlc_am.h"
 #include "rlc_am_segment.h"
@@ -238,17 +237,6 @@ void config_req_rlc_am_asn1 (
         (config_am_pP->ul_AM_RLC.t_PollRetransmit<LTE_T_PollRetransmit_spare5) &&
         (config_am_pP->dl_AM_RLC.t_Reordering<32) &&
         (config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare2) ) {
-      MSC_LOG_RX_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_PollRetx %u t_Reord %u t_StatusPro %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-        PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
-        am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
-        t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
       LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n",
             PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
             maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
@@ -267,14 +255,6 @@ void config_req_rlc_am_asn1 (
                        am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
                        t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
     } else {
-      MSC_LOG_RX_DISCARDED_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p));
       LOG_D(RLC,
             PROTOCOL_RLC_AM_CTXT_FMT"ILLEGAL CONFIG_REQ (max_retx_threshold=%ld poll_pdu=%ld poll_byte=%ld t_poll_retransmit=%ld t_reord=%ld t_status_prohibit=%ld), RLC-AM NOT CONFIGURED\n",
             PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
@@ -537,27 +517,6 @@ rlc_am_mac_status_indication (
     }
   }
 
-  if (MESSAGE_CHART_GENERATOR) {
-    MSC_LOG_RX_MESSAGE(
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
-      NULL,0,
-      MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS-IND %u",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc));
-    MSC_LOG_TX_MESSAGE(
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
-      NULL,0,
-      MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS-RESP BO:%u/n%u(%u)  %s sdu remain %u",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc),
-      status_resp.buffer_occupancy_in_bytes,
-      status_resp.buffer_occupancy_in_pdus,rlc->nb_sdu,
-      (status_resp.head_sdu_is_segmented)?"sdu seg":"sdu not seg",
-      status_resp.head_sdu_remaining_size_to_send);
-  }
-
   if (LOG_DEBUGFLAG(DEBUG_RLC)) {
     LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) -> %d bytes\n",
            PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc),
@@ -610,7 +569,7 @@ rlc_am_mac_data_request (
 
   data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
 
-  if ( (MESSAGE_CHART_GENERATOR || LOG_DEBUGFLAG(DEBUG_RLC))&& data_req.data.nb_elements > 0) {
+  if ( (LOG_DEBUGFLAG(DEBUG_RLC))&& data_req.data.nb_elements > 0) {
     tb_p = data_req.data.head;
 
     while (tb_p != NULL) {
@@ -619,39 +578,6 @@ rlc_am_mac_data_request (
 
       if ((((struct mac_tb_req *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
         if (rlc_am_get_data_pdu_infos(ctxt_pP,l_rlc_p,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
-          if (MESSAGE_CHART_GENERATOR) {
-            message_string_size = 0;
-            message_string_size += sprintf(&message_string[message_string_size],
-                                           MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA SN %u size %u RF %u P %u FI %u",
-                                           MSC_AS_TIME_ARGS(ctxt_pP),
-                                           PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                           pdu_info.sn,
-                                           tb_size_in_bytes,
-                                           pdu_info.rf,
-                                           pdu_info.p,
-                                           pdu_info.fi);
-
-            if (pdu_info.rf) {
-              message_string_size += sprintf(&message_string[message_string_size], " LSF %u\n", pdu_info.lsf);
-              message_string_size += sprintf(&message_string[message_string_size], " SO %u\n", pdu_info.so);
-            }
-
-            if (pdu_info.e) {
-              message_string_size += sprintf(&message_string[message_string_size], "| HE:");
-
-              for (index=0; index < pdu_info.num_li; index++) {
-                message_string_size += sprintf(&message_string[message_string_size], " LI %u", pdu_info.li_list[index]);
-              }
-            }
-
-            MSC_LOG_TX_MESSAGE(
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-              (char *)rlc_am_pdu_sn_10_p,
-              tb_size_in_bytes,
-              message_string);
-          }
-
           if ( LOG_DEBUGFLAG(DEBUG_RLC)) {
             message_string_size = 0;
             message_string_size += sprintf(&message_string[message_string_size], "Bearer      : %ld\n", l_rlc_p->rb_id);
@@ -723,34 +649,6 @@ rlc_am_mac_data_request (
         if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &l_rlc_p->control_pdu_info) >= 0) {
           tb_size_in_bytes   = ((struct mac_tb_req *) (tb_p->data))->tb_size; //tb_size_in_bytes modified by rlc_am_get_control_pdu_infos!
 
-          if (MESSAGE_CHART_GENERATOR ) {
-            message_string_size = 0;
-            message_string_size += sprintf(&message_string[message_string_size],
-                                           MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS ACK_SN %u",
-                                           MSC_AS_TIME_ARGS(ctxt_pP),
-                                           PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                           l_rlc_p->control_pdu_info.ack_sn);
-
-            for (num_nack = 0; num_nack < l_rlc_p->control_pdu_info.num_nack; num_nack++) {
-              if (l_rlc_p->control_pdu_info.nack_list[num_nack].e2) {
-                message_string_size += sprintf(&message_string[message_string_size], "  NACK SN %u SO START %u SO END %u",
-                                               l_rlc_p->control_pdu_info.nack_list[num_nack].nack_sn,
-                                               l_rlc_p->control_pdu_info.nack_list[num_nack].so_start,
-                                               l_rlc_p->control_pdu_info.nack_list[num_nack].so_end);
-              } else {
-                message_string_size += sprintf(&message_string[message_string_size], "  NACK SN %u",
-                                               l_rlc_p->control_pdu_info.nack_list[num_nack].nack_sn);
-              }
-            }
-
-            MSC_LOG_TX_MESSAGE(
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-              (char *)rlc_am_pdu_sn_10_p,
-              tb_size_in_bytes,
-              message_string);
-          }
-
           if ( LOG_DEBUGFLAG(DEBUG_RLC)) {
             message_string_size = 0;
             message_string_size += sprintf(&message_string[message_string_size], "Bearer      : %ld\n", l_rlc_p->rb_id);
@@ -780,7 +678,7 @@ rlc_am_mac_data_request (
 
       tb_p = tb_p->next;
     } /* while */
-  } /* MESSAGE_CHART_GENERATOR && data_req.data.nb_elements > 0 */
+  } /* data_req.data.nb_elements > 0 */
 
   data_req.buffer_occupancy_in_pdus = 0;
   return data_req;
@@ -812,7 +710,7 @@ rlc_am_mac_data_indication (
   (void)index;
   (void)l_rlc_p; /* avoid gcc warning "unused variable" */
 
-  if ( LOG_DEBUGFLAG(DEBUG_RLC) || MESSAGE_CHART_GENERATOR ) {
+  if ( LOG_DEBUGFLAG(DEBUG_RLC)) {
     if (data_indP.data.nb_elements > 0) {
       tb_p = data_indP.data.head;
 
@@ -822,39 +720,6 @@ rlc_am_mac_data_indication (
 
         if ((((struct mac_tb_ind *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
           if (rlc_am_get_data_pdu_infos(ctxt_pP,l_rlc_p,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
-            if (MESSAGE_CHART_GENERATOR) {
-              message_string_size = 0;
-              message_string_size += sprintf(&message_string[message_string_size],
-                                             MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA SN %u size %u RF %u P %u FI %u",
-                                             MSC_AS_TIME_ARGS(ctxt_pP),
-                                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                             pdu_info.sn,
-                                             tb_size_in_bytes,
-                                             pdu_info.rf,
-                                             pdu_info.p,
-                                             pdu_info.fi);
-
-              if (pdu_info.rf) {
-                message_string_size += sprintf(&message_string[message_string_size], " LSF %u\n", pdu_info.lsf);
-                message_string_size += sprintf(&message_string[message_string_size], " SO %u\n", pdu_info.so);
-              }
-
-              if (pdu_info.e) {
-                message_string_size += sprintf(&message_string[message_string_size], "| HE:");
-
-                for (index=0; index < pdu_info.num_li; index++) {
-                  message_string_size += sprintf(&message_string[message_string_size], " LI %u", pdu_info.li_list[index]);
-                }
-              }
-
-              MSC_LOG_RX_MESSAGE(
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-                (char *)rlc_am_pdu_sn_10_p,
-                tb_size_in_bytes,
-                message_string);
-            }
-
             if ( LOG_DEBUGFLAG(DEBUG_RLC)) {
               message_string_size += sprintf(&message_string[message_string_size], "Bearer	: %ld\n", l_rlc_p->rb_id);
               message_string_size += sprintf(&message_string[message_string_size], "PDU size	: %u\n", tb_size_in_bytes);
@@ -923,34 +788,6 @@ rlc_am_mac_data_indication (
           }
         } else {
           if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &l_rlc_p->control_pdu_info) >= 0) {
-            if (MESSAGE_CHART_GENERATOR) {
-              message_string_size = 0;
-              message_string_size += sprintf(&message_string[message_string_size],
-                                             MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS size ACK_SN %u",
-                                             MSC_AS_TIME_ARGS(ctxt_pP),
-                                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                             l_rlc_p->control_pdu_info.ack_sn);
-
-              for (num_nack = 0; num_nack < l_rlc_p->control_pdu_info.num_nack; num_nack++) {
-                if (l_rlc_p->control_pdu_info.nack_list[num_nack].e2) {
-                  message_string_size += sprintf(&message_string[message_string_size], "  NACK SN %u SO START %u SO END %u",
-                                                 l_rlc_p->control_pdu_info.nack_list[num_nack].nack_sn,
-                                                 l_rlc_p->control_pdu_info.nack_list[num_nack].so_start,
-                                                 l_rlc_p->control_pdu_info.nack_list[num_nack].so_end);
-                } else {
-                  message_string_size += sprintf(&message_string[message_string_size], "  NACK SN %u",
-                                                 l_rlc_p->control_pdu_info.nack_list[num_nack].nack_sn);
-                }
-              }
-
-              MSC_LOG_RX_MESSAGE(
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-                (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-                (char *)rlc_am_pdu_sn_10_p,
-                tb_size_in_bytes,
-                message_string);
-            }
-
             if ( LOG_DEBUGFLAG(DEBUG_RLC)) {
               message_string_size = 0;
               message_string_size += sprintf(&message_string[message_string_size], "Bearer      : %ld\n", l_rlc_p->rb_id);
@@ -1009,16 +846,6 @@ rlc_am_data_req (
     mui         = ((struct rlc_am_data_req *) (sdu_pP->data))->mui;
     data_offset = ((struct rlc_am_data_req *) (sdu_pP->data))->data_offset;
     data_size   = ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
-    MSC_LOG_RX_MESSAGE(
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-      (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-      (const char *)(&sdu_pP->data[data_offset]),
-      data_size,
-      MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA-REQ size %u mui %u",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-      data_size,
-      mui);
 
     if (LOG_DEBUGFLAG(DEBUG_RLC)) {
       message_string_size += sprintf(&message_string[message_string_size], "Bearer      : %ld\n", l_rlc_p->rb_id);
@@ -1094,22 +921,6 @@ rlc_am_data_req (
             l_rlc_p->vt_s);
     }
   } else {
-    if( MESSAGE_CHART_GENERATOR) {
-      mui   = ((struct rlc_am_data_req *) (sdu_pP->data))->mui;
-      data_offset = ((struct rlc_am_data_req *) (sdu_pP->data))->data_offset;
-      data_size   = ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
-      MSC_LOG_RX_DISCARDED_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-        (const char *)(&sdu_pP->data[data_offset]),
-        data_size,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA-REQ size %u mui %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, l_rlc_p),
-        data_size,
-        mui);
-    }
-
     LOG_W(RLC, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_REQ BUFFER FULL, NB SDU %d current_sdu_index=%d next_sdu_index=%d size_input_sdus_buffer=%d vtA=%d vtS=%d\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
           l_rlc_p->nb_sdu,
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
index 3127f67eca85a575bba23d012267d5acb16f9ed6..b4073303dde992dd941eabc744369bb4a6d4d50b 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
@@ -78,16 +78,7 @@
       int pmtl_rc = pthread_mutex_trylock(mUTEX);\
 	  if (pmtl_rc != 0){\
         if (pmtl_rc == EBUSY) {\
-          MSC_LOG_EVENT((cTXT->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                       "0 " PROTOCOL_RLC_AM_MSC_FMT " Warning try lock %s busy",\
-                       PROTOCOL_RLC_AM_MSC_ARGS(cTXT,rLC),\
-                       #mUTEX);\
           pthread_mutex_lock(mUTEX);\
-        } else {\
-            MSC_LOG_EVENT((cTXT->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                    "0 " PROTOCOL_RLC_AM_MSC_FMT " Error try lock %s %d",\
-                    PROTOCOL_RLC_AM_MSC_ARGS(cTXT,rLC),\
-                    #mUTEX, pmtl_rc);\
         }\
       }\
 	} while (0);
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c
index 793d0057ac99a149fb27c1011c23aa27e24f62f5..0957c20bdfc2ba6ae64811edbfcf11fdd3369285 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c
@@ -30,7 +30,6 @@
 #include "list.h"
 //#include "LAYER2/MAC/extern.h"
 #include "common/utils/LOG/log.h"
-#include "msc.h"
 
 //-----------------------------------------------------------------------------
 inline void
@@ -152,16 +151,6 @@ rlc_am_send_sdu (
 #if !ENABLE_ITTI
       RLC_AM_MUTEX_UNLOCK(&rlc_pP->lock_input_sdus);
 #endif
-      MSC_LOG_TX_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-        (const char *)(rlc_pP->output_sdu_in_construction->data),
-        rlc_pP->output_sdu_size_to_write,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA-IND size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP),
-        rlc_pP->output_sdu_size_to_write
-      );
       rlc_data_ind (ctxt_pP,
                     BOOL_NOT(rlc_pP->is_data_plane),
                     MBMS_FLAG_NO,
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
index f9a4affb6b9d187ebefc585ae521a11877491f8f..916d1513b0f1f1f0c65ddac2c9bc64a89eb81169 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
@@ -24,7 +24,6 @@
 #include "platform_types.h"
 //-----------------------------------------------------------------------------
 #include "assertions.h"
-#include "msc.h"
 #include "rlc.h"
 #include "rlc_am.h"
 #include "list.h"
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
index 4d34338ea98097d1229d9ee26e79624ff17a951a..56b37e1e3953e1e4bcb6af5514ff111966b06b69 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
@@ -28,7 +28,6 @@
 #include "rlc.h"
 #include "LAYER2/MAC/mac_extern.h"
 #include "common/utils/LOG/log.h"
-#include "msc.h"
 //-----------------------------------------------------------------------------
 boolean_t rlc_am_nack_pdu (
   const protocol_ctxt_t* const  ctxt_pP,
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c
index dbe55c483da8322bb1e1e76a76faca01630ee795..ed81e119acb2eb4e72a4d53d1373c8d18565ed64 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c
@@ -26,7 +26,6 @@
 //-----------------------------------------------------------------------------
 #include "platform_types.h"
 //-----------------------------------------------------------------------------
-#include "msc.h"
 #include "list.h"
 #include "rlc_am.h"
 #include "LAYER2/MAC/mac_extern.h"
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c
index e421a36619f0024eebfaeb478800630bb0dcbf3b..969ed2d7a54815a085786c84c4aece717c5e087a 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c
@@ -29,7 +29,6 @@
 #include "rlc_am.h"
 #include "LAYER2/MAC/mac_extern.h"
 #include "common/utils/LOG/log.h"
-#include "msc.h"
 //-----------------------------------------------------------------------------
 void
 rlc_am_check_timer_poll_retransmit(
@@ -69,11 +68,6 @@ rlc_am_check_timer_poll_retransmit(
       rlc_pP->t_poll_retransmit.running   = 0;
       rlc_pP->t_poll_retransmit.timed_out = 1;
       rlc_pP->stat_timer_poll_retransmit_timed_out += 1;
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                             "0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit timed-out",\
-                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
-#endif
       LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] TIME-OUT\n",
             PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
 
@@ -144,11 +138,6 @@ rlc_am_stop_and_reset_timer_poll_retransmit(
   rlc_pP->t_poll_retransmit.ms_time_out     = 0;
   rlc_pP->t_poll_retransmit.ms_start        = 0;
   rlc_pP->t_poll_retransmit.timed_out       = 0;
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-    MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                  "0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit stopped & reseted",\
-                  PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
-#endif
 }
 //-----------------------------------------------------------------------------
 void
@@ -167,11 +156,6 @@ rlc_am_start_timer_poll_retransmit(
       LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STARTED (TIME-OUT = FRAME %05d)\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
           rlc_pP->t_poll_retransmit.ms_time_out);
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                             "0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit started (TO %u ms)",\
-                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
-#endif
     } else {
     LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] NOT STARTED, CAUSE CONFIGURED 0 ms\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c
index 262b8a8391fc931511d1770bb17f7616fcbe8858..d161d29a65db23457fad697b41cf400ed3717a3d 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c
@@ -28,7 +28,6 @@
 #include "rlc_am.h"
 # include "LAYER2/MAC/mac_extern.h"
 #include "common/utils//LOG/log.h"
-#include "msc.h"
 //-----------------------------------------------------------------------------
 void
 rlc_am_check_timer_reordering(
@@ -64,12 +63,6 @@ rlc_am_check_timer_reordering(
       //         - start t-Reordering;
       //         - set VR(X) to VR(H).
 
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                             "0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering timed out",\
-                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
-#endif
-
       //AssertFatal (rlc_pP->vr_x != RLC_SN_UNDEFINED, "RLC AM TReordering Expiry vrX not defined LcId=%d\n", rlc_pP->channel_id);
       if(rlc_pP->vr_x == RLC_SN_UNDEFINED){
       	LOG_E(RLC, "RLC AM TReordering Expiry vrX not defined LcId=%d\n", rlc_pP->channel_id);
@@ -153,11 +146,6 @@ rlc_am_stop_and_reset_timer_reordering(
   rlc_pP->t_reordering.ms_time_out     = 0;
   rlc_pP->t_reordering.ms_start        = 0;
   rlc_pP->t_reordering.timed_out       = 0;
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-    MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                  "0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering stopped & reseted",\
-                  PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
-#endif
 }
 //-----------------------------------------------------------------------------
 void
@@ -175,11 +163,6 @@ rlc_am_start_timer_reordering(
       LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STARTED (TIME-OUT = %5u ms)\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
           rlc_pP->t_reordering.ms_time_out);
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                             "0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering started (TO %u ms)",\
-                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_reordering.ms_time_out);
-#endif
     } else {
     LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] NOT STARTED, CAUSE CONFIGURED 0 ms\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c
index 5b0b0a70faa1ad1f33a0bce0d878f395495fbbbb..aae7465bcf1840f8d22de2d1b20a89b05bb56e5c 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c
@@ -28,7 +28,6 @@
 #include "rlc_am.h"
 #include "LAYER2/MAC/mac_extern.h"
 #include "common/utils/LOG/log.h"
-#include "msc.h"
 //-----------------------------------------------------------------------------
 void
 rlc_am_check_timer_status_prohibit(
@@ -60,12 +59,6 @@ rlc_am_check_timer_status_prohibit(
         rlc_pP->t_status_prohibit.running   = 0;
         rlc_pP->t_status_prohibit.timed_out = 1;
         rlc_pP->stat_timer_status_prohibit_timed_out += 1;
-
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                             "0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit timed out",\
-                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
-#endif
         LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-STATUS-PROHIBIT] TIME-OUT\n",
               PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
         //#warning         TO DO rlc_am_check_timer_status_prohibit
@@ -91,11 +84,6 @@ rlc_am_stop_and_reset_timer_status_prohibit(
     rlc_pP->t_status_prohibit.ms_time_out    = 0;
     rlc_pP->t_status_prohibit.ms_start       = 0;
     rlc_pP->t_status_prohibit.timed_out      = 0;
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-    MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                  "0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit stopped & reseted",\
-                  PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
-#endif
   }
 }
 //-----------------------------------------------------------------------------
@@ -117,11 +105,6 @@ rlc_am_start_timer_status_prohibit(
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
           rlc_pP->t_status_prohibit.ms_time_out);
       LOG_D(RLC, "TIME-OUT = FRAME %u\n",  rlc_pP->t_status_prohibit.ms_time_out);
-#if MESSAGE_CHART_GENERATOR_RLC_MAC
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                             "0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit started (TO %u ms)",\
-                             PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_status_prohibit.ms_time_out);
-#endif
     } else {
     LOG_T(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-STATUS-PROHIBIT] NOT STARTED, CAUSE CONFIGURED 0 ms\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
index 654ddb8da7e5d13c69a53cac2e045f086c8dbe61..1d40b12cc8ebc5c8e88b648560ec84b2f88fdf49 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
@@ -30,7 +30,6 @@
   #include "intertask_interface.h"
 #endif
 #include "assertions.h"
-#include "msc.h"
 #include "rlc_um.h"
 #include "list.h"
 #include "rlc_primitives.h"
@@ -166,7 +165,6 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind
   char  message_string[10000];
   mem_block_t        *tb_p;
   int16_t               tb_size_in_bytes;
-  size_t              message_string_size = 0;
   rlc_um_pdu_info_t   pdu_info;
   int index;
   int                 octet_index;
@@ -183,38 +181,15 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind
       LOG_I(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",
             PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p));
 
-      if (data_indP.data.nb_elements > 0 && MESSAGE_CHART_GENERATOR) {
+      if (data_indP.data.nb_elements > 0) {
         tb_p = data_indP.data.head;
 
         while (tb_p != NULL) {
           tb_size_in_bytes   = ((struct mac_tb_ind *) (tb_p->data))->size;
           rlc_um_get_pdu_infos(ctxt_pP,l_rlc_p,(rlc_um_pdu_sn_10_t *) ((struct mac_tb_ind *) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
-          message_string_size = 0;
-          message_string_size += sprintf(&message_string[message_string_size],
-                                         MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT"DATA SN %u size %u FI %u",
-                                         MSC_AS_TIME_ARGS(ctxt_pP),
-                                         PROTOCOL_RLC_UM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                         pdu_info.sn,
-                                         tb_size_in_bytes,
-                                         pdu_info.fi);
-
-          if (pdu_info.e) {
-            message_string_size += sprintf(&message_string[message_string_size], "| HE:");
-
-            for (index=0; index < pdu_info.num_li; index++) {
-              message_string_size += sprintf(&message_string[message_string_size], " LI %u", pdu_info.li_list[index]);
-            }
-          }
-
-          MSC_LOG_RX_DISCARDED_MESSAGE(
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-            (const char *)pdu_info.payload,
-            tb_size_in_bytes,
-            message_string);
           tb_p = tb_p->next;
         }
-      }/*MESSAGE_CHART_GENERATOR*/
+      }
 
       list_free (&data_indP.data);
       break;
@@ -237,7 +212,7 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind
       // - enters the LOCAL_SUSPEND state.
       data_indP.tb_size = data_indP.tb_size >> 3;
 
-      if (data_indP.data.nb_elements > 0 && (MESSAGE_CHART_GENERATOR || LOG_DEBUGFLAG(DEBUG_RLC))) {
+      if (data_indP.data.nb_elements > 0 && (LOG_DEBUGFLAG(DEBUG_RLC))) {
         LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_DATA_IND %d TBs\n",
               PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p),
               data_indP.data.nb_elements);
@@ -251,32 +226,6 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind
                                &pdu_info,
                                l_rlc_p->rx_sn_length);
 
-          if (MESSAGE_CHART_GENERATOR) {
-            message_string_size = 0;
-            message_string_size += sprintf(&message_string[message_string_size],
-                                           MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT"DATA SN %u size %u FI %u",
-                                           MSC_AS_TIME_ARGS(ctxt_pP),
-                                           PROTOCOL_RLC_UM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                           pdu_info.sn,
-                                           tb_size_in_bytes,
-                                           pdu_info.fi);
-
-            if (pdu_info.e) {
-              message_string_size += sprintf(&message_string[message_string_size], "| HE:");
-
-              for (index=0; index < pdu_info.num_li; index++) {
-                message_string_size += sprintf(&message_string[message_string_size], " LI  %u", pdu_info.li_list[index]);
-              }
-            }
-
-            MSC_LOG_RX_MESSAGE(
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-              (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-              (char *)pdu_info.payload,
-              tb_size_in_bytes,
-              message_string);
-          }
-
           if (LOG_DEBUGFLAG(DEBUG_RLC)) {
             message_string_size = 0;
             message_string_size += sprintf(&message_string[message_string_size], "Bearer      : %ld\n", l_rlc_p->rb_id);
@@ -483,89 +432,61 @@ rlc_um_mac_data_request (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP,cons
         continue;
       }
 
-      if (MESSAGE_CHART_GENERATOR || LOG_DEBUGFLAG(DEBUG_RLC) ) {
+      if (LOG_DEBUGFLAG(DEBUG_RLC) ) {
         rlc_um_get_pdu_infos(ctxt_pP, l_rlc_p,(rlc_um_pdu_sn_10_t *) ((struct mac_tb_req *) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
 
-        if(MESSAGE_CHART_GENERATOR) {
-          message_string_size = 0;
-          message_string_size += sprintf(&message_string[message_string_size],
-                                         MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT" DATA SN %u size %u FI %u",
-                                         MSC_AS_TIME_ARGS(ctxt_pP),
-                                         PROTOCOL_RLC_UM_MSC_ARGS(ctxt_pP, l_rlc_p),
-                                         pdu_info.sn,
-                                         tb_size_in_bytes,
-                                         pdu_info.fi);
-
-          if (pdu_info.e) {
-            message_string_size += sprintf(&message_string[message_string_size], "|HE:");
-
-            for (index=0; index < pdu_info.num_li; index++) {
-              message_string_size += sprintf(&message_string[message_string_size], " LI %u", pdu_info.li_list[index]);
-            }
+        message_string_size = 0;
+        message_string_size += sprintf(&message_string[message_string_size], "Bearer	  : %ld\n", l_rlc_p->rb_id);
+        message_string_size += sprintf(&message_string[message_string_size], "PDU size    : %u\n", tb_size_in_bytes);
+        message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
+        message_string_size += sprintf(&message_string[message_string_size], "Payload size: %u\n", pdu_info.payload_size);
+        message_string_size += sprintf(&message_string[message_string_size], "PDU type    : RLC UM DATA IND: UMD PDU\n\n");
+        message_string_size += sprintf(&message_string[message_string_size], "Header	  :\n");
+        message_string_size += sprintf(&message_string[message_string_size], "  FI	  : %u\n", pdu_info.fi);
+        message_string_size += sprintf(&message_string[message_string_size], "  E	  : %u\n", pdu_info.e);
+        message_string_size += sprintf(&message_string[message_string_size], "  SN	  : %u\n", pdu_info.sn);
+
+        if (pdu_info.e) {
+          message_string_size += sprintf(&message_string[message_string_size], "\nHeader extension  : \n");
+
+          for (index=0; index < pdu_info.num_li; index++) {
+            message_string_size += sprintf(&message_string[message_string_size], "  LI        : %u\n", pdu_info.li_list[index]);
           }
-
-          MSC_LOG_TX_MESSAGE(
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_UE:MSC_RLC_ENB,
-            (const char *)pdu_info.payload,
-            pdu_info.payload_size,
-            message_string);
         }
 
-        if(LOG_DEBUGFLAG(DEBUG_RLC)) {
-          message_string_size = 0;
-          message_string_size += sprintf(&message_string[message_string_size], "Bearer	  : %ld\n", l_rlc_p->rb_id);
-          message_string_size += sprintf(&message_string[message_string_size], "PDU size    : %u\n", tb_size_in_bytes);
-          message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
-          message_string_size += sprintf(&message_string[message_string_size], "Payload size: %u\n", pdu_info.payload_size);
-          message_string_size += sprintf(&message_string[message_string_size], "PDU type    : RLC UM DATA IND: UMD PDU\n\n");
-          message_string_size += sprintf(&message_string[message_string_size], "Header	  :\n");
-          message_string_size += sprintf(&message_string[message_string_size], "  FI	  : %u\n", pdu_info.fi);
-          message_string_size += sprintf(&message_string[message_string_size], "  E	  : %u\n", pdu_info.e);
-          message_string_size += sprintf(&message_string[message_string_size], "  SN	  : %u\n", pdu_info.sn);
-
-          if (pdu_info.e) {
-            message_string_size += sprintf(&message_string[message_string_size], "\nHeader extension  : \n");
-
-            for (index=0; index < pdu_info.num_li; index++) {
-              message_string_size += sprintf(&message_string[message_string_size], "  LI        : %u\n", pdu_info.li_list[index]);
-            }
-          }
-
-          message_string_size += sprintf(&message_string[message_string_size], "\nPayload  : \n");
-          message_string_size += sprintf(&message_string[message_string_size], "------+-------------------------------------------------|\n");
-          message_string_size += sprintf(&message_string[message_string_size], "      |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |\n");
-          message_string_size += sprintf(&message_string[message_string_size], "------+-------------------------------------------------|\n");
+        message_string_size += sprintf(&message_string[message_string_size], "\nPayload  : \n");
+        message_string_size += sprintf(&message_string[message_string_size], "------+-------------------------------------------------|\n");
+        message_string_size += sprintf(&message_string[message_string_size], "      |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |\n");
+        message_string_size += sprintf(&message_string[message_string_size], "------+-------------------------------------------------|\n");
 
-          for (octet_index = 0; octet_index < pdu_info.payload_size; octet_index++) {
-            if ((octet_index % 16) == 0) {
-              if (octet_index != 0) {
-                message_string_size += sprintf(&message_string[message_string_size], " |\n");
-              }
-
-              message_string_size += sprintf(&message_string[message_string_size], " %04d |", octet_index);
+        for (octet_index = 0; octet_index < pdu_info.payload_size; octet_index++) {
+          if ((octet_index % 16) == 0) {
+            if (octet_index != 0) {
+              message_string_size += sprintf(&message_string[message_string_size], " |\n");
             }
 
-            /*
-             * Print every single octet in hexadecimal form
-             */
-            message_string_size += sprintf(&message_string[message_string_size], " %02x", pdu_info.payload[octet_index]);
-            /*
-             * Align newline and pipes according to the octets in groups of 2
-             */
+            message_string_size += sprintf(&message_string[message_string_size], " %04d |", octet_index);
           }
 
           /*
-           * Append enough spaces and put final pipe
+           * Print every single octet in hexadecimal form
            */
-          for (index = octet_index; index < 16; ++index) {
-            message_string_size += sprintf(&message_string[message_string_size], "   ");
-          }
+          message_string_size += sprintf(&message_string[message_string_size], " %02x", pdu_info.payload[octet_index]);
+          /*
+           * Align newline and pipes according to the octets in groups of 2
+           */
+        }
 
-          message_string_size += sprintf(&message_string[message_string_size], " |\n");
-          LOG_UI(RLC, "%s\n", message_string);
-        } /*LOG_DEBUGFLAG(DEBUG_RLC) */
-      } /* MESSAGE_CHART_GENERATOR || LOG_DEBUGFLAG(DEBUG_RLC) */
+        /*
+         * Append enough spaces and put final pipe
+         */
+        for (index = octet_index; index < 16; ++index) {
+          message_string_size += sprintf(&message_string[message_string_size], "   ");
+        }
+
+        message_string_size += sprintf(&message_string[message_string_size], " |\n");
+        LOG_UI(RLC, "%s\n", message_string);
+      } /* LOG_DEBUGFLAG(DEBUG_RLC) */
 
       tb_p = tb_p->next;
     } /* while (tb_p != NULL) */
@@ -607,15 +528,6 @@ rlc_um_data_req (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, mem_block_t
   //rlc_p->next_sdu_index = (rlc_p->next_sdu_index + 1) % rlc_p->size_input_sdus_buffer;
   rlc_p->stat_tx_pdcp_sdu   += 1;
   rlc_p->stat_tx_pdcp_bytes += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
-  MSC_LOG_RX_MESSAGE(
-    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-    (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-    NULL,
-    0,
-    MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT" DATA-REQ size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    PROTOCOL_RLC_UM_MSC_ARGS(ctxt_pP, rlc_p),
-    ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size);
 
   if (LOG_DEBUGFLAG(DEBUG_RLC) ) {
     data_offset = sizeof (struct rlc_um_data_req_alloc);
@@ -660,14 +572,6 @@ rlc_um_data_req (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, mem_block_t
   list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
   RLC_UM_MUTEX_UNLOCK(&rlc_p->lock_input_sdus);
 
-  if (MESSAGE_CHART_GENERATOR) {
-    if (rlc_p->buffer_occupancy > 4096) {
-      MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                    "0 "PROTOCOL_RLC_AM_MSC_FMT" BO %u bytes",\
-                    PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_p), rlc_p->buffer_occupancy);
-    }
-  }
-
   LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT" BO %d , NB SDU %d\n",
         PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
         rlc_p->buffer_occupancy,
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h
index be06551dde7c7ee50ac1d91be3e707ad3f019c7d..bd04ff3ece65cb43c275a7cd79ee8b0ac4224b3e 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h
@@ -56,28 +56,13 @@
           rLC_Pp->rb_id,\
           __FUNCTION__
 
-#define PROTOCOL_RLC_UM_MSC_FMT "[RNTI %" PRIx16 " %s %02ld]"
-#define PROTOCOL_RLC_UM_MSC_ARGS(CTXT_Pp, rLC_Pp) \
-        CTXT_Pp->rnti,\
-          (rLC_Pp->is_data_plane) ? "DRB UM" : "SRB UM",\
-          rLC_Pp->rb_id
-
 #if defined(TRACE_RLC_MUTEX)
 #define RLC_UM_MUTEX_LOCK(mUTEX, cTXT, rLC) \
 	do {\
       int pmtl_rc = pthread_mutex_trylock(mUTEX);\
 	  if (pmtl_rc != 0){\
         if (pmtl_rc == EBUSY) {\
-          MSC_LOG_EVENT((cTXT->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                       "0 " PROTOCOL_RLC_UM_MSC_FMT " Warning try lock %s busy",\
-                       PROTOCOL_RLC_UM_MSC_ARGS(cTXT,rLC),\
-                       #mUTEX);\
           pthread_mutex_lock(mUTEX);\
-        } else {\
-            MSC_LOG_EVENT((cTXT->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
-                       "0 " PROTOCOL_RLC_UM_MSC_FMT " Error try lock %s %d",\
-                       PROTOCOL_RLC_UM_MSC_ARGS(cTXT,rLC),\
-                       #mUTEX, pmtl_rc);\
         }\
       }\
 	} while (0);
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
index 05c3423f76c36021710da06dd6931f8fe2897f59..bec815ac5da6a93d4c96daaeaae2a4a611e69282 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
@@ -32,7 +32,6 @@
 
 #include "rlc_um_control_primitives.h"
 #include "LTE_T-Reordering.h"
-#include "msc.h"
 
 //-----------------------------------------------------------------------------
 void config_req_rlc_um (
@@ -173,15 +172,6 @@ void config_req_rlc_um_asn1 (
                 PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
                 rlc_p->rb_id,
                 ul_rlc_pP->sn_FieldLength);
-          MSC_LOG_RX_DISCARDED_MESSAGE(
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-            NULL,
-            0,
-            MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ UL sn_FieldLength %u",
-            MSC_AS_TIME_ARGS(ctxt_pP),
-            PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-            ul_rlc_pP->sn_FieldLength);
           return;
       }
     }
@@ -201,15 +191,6 @@ void config_req_rlc_um_asn1 (
                 PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
                 rlc_p->rb_id,
                 dl_rlc_pP->sn_FieldLength);
-          MSC_LOG_RX_DISCARDED_MESSAGE(
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-            (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-            NULL,
-            0,
-            MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ DL sn_FieldLength %u",
-            MSC_AS_TIME_ARGS(ctxt_pP),
-            PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-            dl_rlc_pP->sn_FieldLength);
           return;
       }
 
@@ -220,15 +201,6 @@ void config_req_rlc_um_asn1 (
               PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
               rlc_p->rb_id,
               dl_rlc_pP->t_Reordering);
-        MSC_LOG_RX_DISCARDED_MESSAGE(
-          (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-          (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-          NULL,
-          0,
-          MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-          dl_rlc_pP->t_Reordering);
         return;
       }
     }
@@ -239,34 +211,12 @@ void config_req_rlc_um_asn1 (
                        ul_sn_FieldLength,
                        dl_sn_FieldLength,
                        mbms_flagP);
-      MSC_LOG_RX_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-        t_Reordering,
-        ul_sn_FieldLength,
-        dl_sn_FieldLength);
     } else {
       rlc_um_configure(ctxt_pP,rlc_p,
                        t_Reordering,
                        dl_sn_FieldLength,
                        ul_sn_FieldLength,
                        mbms_flagP);
-      MSC_LOG_RX_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RRC_ENB:MSC_RRC_UE,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" CONFIG-REQ t_Reord %u rx snfl %u tx snfl %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc_p),
-        t_Reordering,
-        dl_sn_FieldLength,
-        ul_sn_FieldLength);
     }
   }
 }
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
index c8faa083584d66e37200982a570e1812e398f6fb..6d2380d4ffe840ac52139375c2eeb7fd6b9636b3 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
@@ -24,7 +24,6 @@
 #include "platform_types.h"
 #include "assertions.h"
 //-----------------------------------------------------------------------------
-#include "msc.h"
 #include "rlc.h"
 #include "rlc_um.h"
 #include "rlc_primitives.h"
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c
index 2eba22380335e3c4af9fbde9f7352d968c94bbec..ca43dab667f4dfafbac196cfa433bedb6feaf256 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c
@@ -35,7 +35,6 @@
 #include "list.h"
 #include "LAYER2/MAC/mac_extern.h"
 #include "common/utils/LOG/log.h"
-#include "msc.h"
 
 //-----------------------------------------------------------------------------
 inline void
@@ -117,17 +116,6 @@ rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
       rlc_pP->stat_rx_pdcp_sdu += 1;
       rlc_pP->stat_rx_pdcp_bytes += rlc_pP->output_sdu_size_to_write;
 
-      MSC_LOG_TX_MESSAGE(
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
-        (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
-        (const char*)(rlc_pP->output_sdu_in_construction->data),
-        rlc_pP->output_sdu_size_to_write,
-        MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT" DATA-IND size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        PROTOCOL_RLC_UM_MSC_ARGS(ctxt_pP,rlc_pP),
-        rlc_pP->output_sdu_size_to_write
-      );
-
 #if TEST_RLC_UM
 #if TRACE_RLC_UM_DISPLAY_ASCII_DATA
       rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c
index 932bb1376e92593a488f6d4c12ffbb31d023afe3..4c047e3d92d762952bc94cbc7e4e43f218066fed 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c
@@ -27,7 +27,6 @@
 //-----------------------------------------------------------------------------
 #include <assert.h>
 #include "assertions.h"
-#include "msc.h"
 #include "list.h"
 #include "rlc_um.h"
 #include "rlc_primitives.h"
diff --git a/openair2/LAYER2/RLC/rlc_proto_agent_primitives.h b/openair2/LAYER2/RLC/rlc_proto_agent_primitives.h
deleted file mode 100644
index 75ccc9fcdd001cd20a8a83a26b10a7755d517be5..0000000000000000000000000000000000000000
--- a/openair2/LAYER2/RLC/rlc_proto_agent_primitives.h
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#ifndef __PROTO_AGENT_RLC_PRIMITIVES_H__
-#define __PROTO_AGENT_RLC_PRIMITIVES_H__
-
-#include "RRC/LTE/rrc_defs.h"
-#include "LAYER2/PROTO_AGENT/proto_agent.h"
-// PROTO AGENT
-pthread_t async_server_thread;
-int async_server_thread_finalize (void);
-void async_server_thread_init (void);
-
-pthread_mutex_t async_server_lock;
-pthread_cond_t async_server_notify;
-int async_server_shutdown;
-
-#endif
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
index ab8578a0e7e5ccce3f3907a92b26fa0856124679..a08c9d2c78a31b53d6a71fc36663e5de97add64d 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
@@ -674,7 +674,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
         sdap_gnb_ul_header_handler(buf[0]); // Handler for the UL gNB SDAP Header
       }
       LOG_D(PDCP, "%s() (drb %d) sending message to gtp size %d\n", __func__, rb_id, size-offset);
-      itti_send_msg_to_task(TASK_VARIABLE, INSTANCE_DEFAULT, message_p);
+      itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
    }
   }
 }
@@ -728,7 +728,7 @@ rb_found:
     LOG_D(PDCP, "%s() (drb %d) sending message to gtp size %d\n",
 	  __func__, rb_id, size);
     extern instance_t CUuniqInstance;
-    itti_send_msg_to_task(TASK_VARIABLE, CUuniqInstance, message_p);
+    itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
   } else {
     
     memblock = get_free_mem_block(size, __FUNCTION__);
@@ -1103,7 +1103,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
   if (kRRCint != NULL) {
     /* todo */
   }
-
+  
   if (drb2release_list != NULL) {
     // TODO
   }
diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
index 78e06d37e2914fde662a0ffe26471f59e108f122..baae1fa43647a778043e4aabdd15eb9f8bc90b41 100644
--- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
@@ -40,8 +40,6 @@
 
 #include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
 
-#include "openair2/LAYER2/PROTO_AGENT/proto_agent.h"
-
 extern RAN_CONTEXT_t RC;
 
 #include <stdint.h>
@@ -518,7 +516,7 @@ rb_found:
 	req->pdusession_id=rb_id;
 	LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size);
 	extern instance_t DUuniqInstance;
-	itti_send_msg_to_task(OCP_GTPV1_U, DUuniqInstance, msg);
+	itti_send_msg_to_task(TASK_GTPV1_U, DUuniqInstance, msg);
 	return;
       }
     }
diff --git a/openair2/LAYER2/rlc_v2/rlc_oai_api.c b/openair2/LAYER2/rlc_v2/rlc_oai_api.c
index 16c3db0cae3912a551bcff985123cf01a13cbc9d..2a6f00c13c49610de35312f286135352603411aa 100644
--- a/openair2/LAYER2/rlc_v2/rlc_oai_api.c
+++ b/openair2/LAYER2/rlc_v2/rlc_oai_api.c
@@ -440,7 +440,7 @@ rb_found:
 	req->rnti=ue->rnti;
 	req->rab_id=rb_id+4;
 	LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size);
-	itti_send_msg_to_task(OCP_GTPV1_U, DUuniqInstance, msg);      
+	itti_send_msg_to_task(TASK_GTPV1_U, DUuniqInstance, msg);      
 	return;
       }
     }
diff --git a/openair2/M2AP/m2ap_MCE_generate_messages.c b/openair2/M2AP/m2ap_MCE_generate_messages.c
index a28097cf1afe014dbc74681c0f5a1fa55b57a71b..969863b4459b29a3308aa5fb8b7fe6ecc5241e44 100644
--- a/openair2/M2AP/m2ap_MCE_generate_messages.c
+++ b/openair2/M2AP/m2ap_MCE_generate_messages.c
@@ -39,7 +39,6 @@
 
 #include "m2ap_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -174,8 +173,6 @@ int m2ap_MCE_generate_m2_setup_request(
     return -1;
   }
 
-  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 M2Setup/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-
   m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -311,8 +308,6 @@ int m2ap_MCE_generate_m2_setup_response(m2ap_MCE_instance_t *instance_p, m2ap_MC
 
   m2ap_MCE_data_p->state = M2AP_MCE_STATE_READY;
 
-  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 M2Setup/successfulOutcome assoc_id %u", m2ap_MCE_data_p->assoc_id);
-
   m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -367,11 +362,6 @@ int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
     return -1;
   }
 
-  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE,
-  //                    MSC_M2AP_TARGET_MCE, NULL, 0,
-  //                    "0 M2Setup/unsuccessfulOutcome  assoc_id %u cause %u value %u",
-  //                    assoc_id, cause_type, cause_value);
-
   m2ap_MCE_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
 
   return ret;
@@ -557,8 +547,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -650,8 +638,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -712,8 +698,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -796,8 +780,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
diff --git a/openair2/M2AP/m2ap_MCE_handler.c b/openair2/M2AP/m2ap_MCE_handler.c
index 5a0e303218bfc744a3b51e31ea8b948bb8ecf532..3f6d5ff64df3d1f235bde37a81a7de05d5372fa2 100644
--- a/openair2/M2AP/m2ap_MCE_handler.c
+++ b/openair2/M2AP/m2ap_MCE_handler.c
@@ -44,7 +44,6 @@
 #include "m2ap_MCE_interface_management.h"
 //#include "m2ap_eNB_interface_management.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
diff --git a/openair2/M2AP/m2ap_MCE_interface_management.c b/openair2/M2AP/m2ap_MCE_interface_management.c
index 3b12f41cbefc35f7ef25271be186bd3edfa4d4f4..28f5fccffa4916bb33bc5110bc72a430b093314f 100644
--- a/openair2/M2AP/m2ap_MCE_interface_management.c
+++ b/openair2/M2AP/m2ap_MCE_interface_management.c
@@ -210,16 +210,7 @@ int MCE_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
   AssertFatal(MCE_MBMS_M2AP_ID!=-1,"MCE_MBMS_M2AP_ID was not sent\n");
   AssertFatal(ENB_MBMS_M2AP_ID!=-1,"ENB_MBMS_M2AP_ID was not sent\n");
   //M2AP_SESSION_START_RESP(msg_p).
-//  MSC_LOG_RX_MESSAGE(
-//    MSC_M2AP_MCE,
-//    MSC_M2AP_ENB,
-	//return 0;
-//    0,
-//    0,
-//    MSC_AS_TIME_FMT" MCE_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
-//    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-//    assoc_id);
-//
+
    LOG_D(M2AP, "Sending M2AP_SESSION_START_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
          assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
    itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
@@ -348,14 +339,6 @@ int MCE_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
   AssertFatal(MCE_MBMS_M2AP_ID!=-1,"MCE_MBMS_M2AP_ID was not sent\n");
   AssertFatal(ENB_MBMS_M2AP_ID!=-1,"ENB_MBMS_M2AP_ID was not sent\n");
  // M2AP_SESSION_STOP_RESP(msg_p).
- // MSC_LOG_RX_MESSAGE(
- //   MSC_M2AP_MCE,
- //   MSC_M2AP_ENB,
- //   0,
- //   0,
- //   MSC_AS_TIME_FMT" MCE_handle_M2_SESSION_STOP_RESPONSE successfulOutcome assoc_id %d",
- //   0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- //   assoc_id);
 
  //  LOG_D(M2AP, "Sending M2AP_SESSION_START_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
  //        assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
@@ -645,14 +628,6 @@ int MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance,
 //  }
 //
 //  M2AP_SESSION_STOP_RESP(msg_p).
-//  MSC_LOG_RX_MESSAGE(
-//    MSC_M2AP_MCE,
-//    MSC_M2AP_ENB,
-//    0,
-//    0,
-//    MSC_AS_TIME_FMT" MCE_handle_M2_SCHEDULING_INFORMATION_RESPONSE successfulOutcome assoc_id %d",
-//    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-//    assoc_id);
 //
 //   LOG_D(M2AP, "Sending M2AP_SCHEDULING_INFO_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
 //         assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
@@ -836,15 +811,6 @@ int MCE_handle_M2_SETUP_REQUEST(instance_t instance,
   *m2ap_mce_data_from_enb = M2AP_SETUP_REQ(message_p);
   //printf("m2ap_mce_data_from_enb->assoc_id %d %d\n",m2ap_mce_data_from_enb->assoc_id,assoc_id);
 
-//  MSC_LOG_TX_MESSAGE(
-//  MSC_M2AP_MCE,
-//  MSC_RRC_ENB,
-//  0,
-//  0,
-//  MSC_AS_TIME_FMT" MCE_handle_M2_SETUP_REQUEST",
-//  0,0//MSC_AS_TIME_ARGS(ctxt_pP),
-//  );
-//
   if (num_mbms_available > 0) {
     itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
   } else {
@@ -1217,15 +1183,6 @@ int MCE_handle_MCE_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
    //for (int i=0;i<num_cells_to_activate;i++)
    //  AssertFatal(M2AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
 
-   //MSC_LOG_RX_MESSAGE(
-   // MSC_M2AP_eNB,
-   // MSC_M2AP_CU,
-   // 0,
-   // 0,
-   // MSC_AS_TIME_FMT" eNB_handle_M2_SETUP_RESPONSE successfulOutcome assoc_id %d",
-   // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-   // assoc_id);
-
    //LOG_D(M2AP, "Sending M2AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
    //      assoc_id,ENB_MOeNBLE_ID_TO_INSTANCE(assoc_id));
 
@@ -1430,16 +1387,7 @@ int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance,
   //AssertFatal(MCE_MBMS_M2AP_ID!=-1,"MCE_MBMS_M2AP_ID was not sent\n");
   //AssertFatal(ENB_MBMS_M2AP_ID!=-1,"ENB_MBMS_M2AP_ID was not sent\n");
   //M2AP_SESSION_START_RESP(msg_p).
-//  MSC_LOG_RX_MESSAGE(
-//    MSC_M2AP_MCE,
-//    MSC_M2AP_ENB,
-	//return 0;
-//    0,
-//    0,
-//    MSC_AS_TIME_FMT" MCE_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
-//    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-//    assoc_id);
-//
+
    //LOG_D(M2AP, "Sending  ITTI message to ENB_APP with assoc_id (%d->%d)\n",
          //assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
 
diff --git a/openair2/M2AP/m2ap_eNB_generate_messages.c b/openair2/M2AP/m2ap_eNB_generate_messages.c
index b6c821e1cee29b730894835219e06aef00bc8a61..6496d608b8bddcc91ffdf2d9ae5e3952b1e10eda 100644
--- a/openair2/M2AP/m2ap_eNB_generate_messages.c
+++ b/openair2/M2AP/m2ap_eNB_generate_messages.c
@@ -39,7 +39,6 @@
 
 #include "m2ap_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -169,15 +168,6 @@
 //
 // 
 //  LOG_W(M2AP,"pdu.present %d\n",pdu.present);
-// // MSC_LOG_TX_MESSAGE(
-// // MSC_M2AP_eNB,
-// // MSC_M2AP_MCE,
-// // (const char *)buffer,
-// // len,
-// // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
-// // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-// // m2ap_eNB_data_p->ENBname);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p, m2ap_eNB_data_p->assoc_id, buffer, len, 0);
 //
 //  return 0;
@@ -315,8 +305,6 @@
 //
 //  m2ap_eNB_data_p->state = M2AP_ENB_STATE_READY;
 //
-//  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 M2Setup/successfulOutcome assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 0);
 //
 //  return ret;
@@ -371,11 +359,6 @@
 //    return -1;
 //  }
 //
-//  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB,
-//  //                    MSC_M2AP_TARGET_ENB, NULL, 0,
-//  //                    "0 M2Setup/unsuccessfulOutcome  assoc_id %u cause %u value %u",
-//  //                    assoc_id, cause_type, cause_value);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
 //
 //  return ret;
@@ -561,8 +544,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -654,8 +635,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -716,8 +695,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -800,8 +777,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
diff --git a/openair2/M2AP/m2ap_eNB_handler.c b/openair2/M2AP/m2ap_eNB_handler.c
index 9abc3374086569a2c39f570ae4703c77fc494eff..7c4a9758dab9f57565263e76afc84d76b72769da 100644
--- a/openair2/M2AP/m2ap_eNB_handler.c
+++ b/openair2/M2AP/m2ap_eNB_handler.c
@@ -44,7 +44,6 @@
 //#include "m2ap_MCE_interface_management.h"
 #include "m2ap_eNB_interface_management.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
diff --git a/openair2/M2AP/m2ap_eNB_interface_management.c b/openair2/M2AP/m2ap_eNB_interface_management.c
index 486e382e6928dc4b15e29867ef2d9b86435aa103..9bab8005257f20edd92c8ce6f6fda9e89b07b20e 100644
--- a/openair2/M2AP/m2ap_eNB_interface_management.c
+++ b/openair2/M2AP/m2ap_eNB_interface_management.c
@@ -44,7 +44,6 @@
 
 #include "m2ap_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -255,15 +254,6 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms
 
 
   LOG_D(M2AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M2AP_eNB,
- // MSC_M2AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m2ap_eNB_data_p->ENBname);
-
   m2ap_eNB_itti_send_sctp_data_req(instance, m2ap_enb_data_g->assoc_id, buffer, len, 0);
   return 0;
 }
@@ -359,14 +349,6 @@ int eNB_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m2ap_session_start
 
 
   LOG_D(M2AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M2AP_eNB,
- // MSC_M2AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m2ap_eNB_data_p->ENBname);
 
   m2ap_eNB_itti_send_sctp_data_req(instance, m2ap_enb_data_g->assoc_id, buffer, len, 0);
   return 0;
@@ -531,14 +513,6 @@ int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_r
 
 
   LOG_D(M2AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M2AP_eNB,
- // MSC_M2AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m2ap_eNB_data_p->ENBname);
 
   m2ap_eNB_itti_send_sctp_data_req(instance, m2ap_enb_data_g->assoc_id, buffer, len, 0);
   return 0;
@@ -700,15 +674,6 @@ int eNB_send_M2_SETUP_REQUEST(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t*
 
 
   LOG_D(M2AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M2AP_eNB,
- // MSC_M2AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m2ap_eNB_data_p->ENBname);
-
 
 //  buffer = &bytes[0];
 //  len = 40;
@@ -826,15 +791,6 @@ int eNB_handle_M2_SETUP_RESPONSE(instance_t instance,
    //for (int i=0;i<num_cells_to_activate;i++)  
    //  AssertFatal(M2AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
 
-   //MSC_LOG_RX_MESSAGE(
-   // MSC_M2AP_eNB,
-   // MSC_M2AP_CU,
-   // 0,
-   // 0,
-   // MSC_AS_TIME_FMT" eNB_handle_M2_SETUP_RESPONSE successfulOutcome assoc_id %d",
-   // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-   // assoc_id);
- 
    //LOG_D(M2AP, "Sending M2AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
    //      assoc_id,ENB_MOeNBLE_ID_TO_INSTANCE(assoc_id));
    //itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p2);
@@ -880,15 +836,6 @@ int eNB_handle_M2_SETUP_FAILURE(instance_t instance,
    //for (int i=0;i<num_cells_to_activate;i++)  
    //  AssertFatal(M2AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
 
-   //MSC_LOG_RX_MESSAGE(
-   // MSC_M2AP_eNB,
-   // MSC_M2AP_CU,
-   // 0,
-   // 0,
-   // MSC_AS_TIME_FMT" eNB_handle_M2_SETUP_RESPONSE successfulOutcome assoc_id %d",
-   // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-   // assoc_id);
- 
    //LOG_D(M2AP, "Sending M2AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
    //      assoc_id,ENB_MOeNBLE_ID_TO_INSTANCE(assoc_id));
 
@@ -1025,15 +972,6 @@ int eNB_send_eNB_CONFIGURATION_UPDATE(instance_t instance, m2ap_enb_configuratio
 
 
   LOG_D(M2AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M2AP_eNB,
- // MSC_M2AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m2ap_eNB_data_p->ENBname);
-
 
 //  buffer = &bytes[0];
 //  len = 40;
@@ -1086,15 +1024,6 @@ int eNB_handle_eNB_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
    //for (int i=0;i<num_cells_to_activate;i++)  
    //  AssertFatal(M2AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
 
-   //MSC_LOG_RX_MESSAGE(
-   // MSC_M2AP_eNB,
-   // MSC_M2AP_CU,
-   // 0,
-   // 0,
-   // MSC_AS_TIME_FMT" eNB_handle_M2_SETUP_RESPONSE successfulOutcome assoc_id %d",
-   // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-   // assoc_id);
- 
    //LOG_D(M2AP, "Sending M2AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
    //      assoc_id,ENB_MOeNBLE_ID_TO_INSTANCE(assoc_id));
 
diff --git a/openair2/M2AP/m2ap_handler.c b/openair2/M2AP/m2ap_handler.c
index 1221bcedb5a07b5d54317092eec6986bbb875f94..6d8405db140503e876ae0f55daf69038b31bc369 100644
--- a/openair2/M2AP/m2ap_handler.c
+++ b/openair2/M2AP/m2ap_handler.c
@@ -44,7 +44,6 @@
 #include "m2ap_MCE_interface_management.h"
 #include "m2ap_eNB_interface_management.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
diff --git a/openair2/MCE_APP/mce_config.c b/openair2/MCE_APP/mce_config.c
index 439f2d2061c9a85b0daa7c8d52c3a97ca2f09fd0..9d9d9028e5c01d6a716571c12a4fcdf298f9f912 100644
--- a/openair2/MCE_APP/mce_config.c
+++ b/openair2/MCE_APP/mce_config.c
@@ -54,8 +54,6 @@
 #include "common/config/config_userapi.h"
 #include "RRC_config_tools.h"
 #include "enb_paramdef.h"
-#include "proto_agent.h"
-
 #include "m3ap_MCE.h"
 
 
diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
index c7b54950d7c66eb9cc16653fa1276953100a033c..08807e0202474f96ad4e9d8a56c634bd140a385b 100644
--- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
@@ -30,6 +30,10 @@
  * \warning
  */
 
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
 #include "PHY/defs_nr_UE.h"
 #include "NR_IF_Module.h"
 #include "NR_MAC_UE/mac_proto.h"
diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c
index 37595192281a06d39cd55d7839b6c73f7e0b8aab..0a63acc8fb8882ded746feaa3316a3b626859503 100644
--- a/openair2/RRC/LTE/L2_interface.c
+++ b/openair2/RRC/LTE/L2_interface.c
@@ -43,7 +43,6 @@
 #include "common/utils/LOG/log.h"
 #include "rrc_eNB_UE_context.h"
 #include "pdcp.h"
-#include "msc.h"
 #include "common/ran_context.h"
 
 #include "intertask_interface.h"
diff --git a/openair2/RRC/LTE/L2_interface_common.c b/openair2/RRC/LTE/L2_interface_common.c
index f70cc68550445263d677328bc2ac13279f786058..1993fe7de0973278c63cde20d1f247a174371f9b 100644
--- a/openair2/RRC/LTE/L2_interface_common.c
+++ b/openair2/RRC/LTE/L2_interface_common.c
@@ -34,7 +34,6 @@
 #include "common/utils/LOG/log.h"
 #include "rrc_eNB_UE_context.h"
 #include "pdcp.h"
-#include "msc.h"
 #include "common/ran_context.h"
 
 #include "intertask_interface.h"
@@ -62,16 +61,6 @@ rrc_data_req(
     return FALSE;
   }
 
-  MSC_LOG_TX_MESSAGE(
-    ctxt_pP->enb_flag ? MSC_RRC_ENB : MSC_RRC_UE,
-    ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE,
-    buffer_pP,
-    sdu_sizeP,
-    MSC_AS_TIME_FMT"RRC_DCCH_DATA_REQ UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ctxt_pP->rnti,
-    muiP,
-    sdu_sizeP);
   MessageDef *message_p;
   // Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
   uint8_t *message_buffer;
diff --git a/openair2/RRC/LTE/L2_interface_ue.c b/openair2/RRC/LTE/L2_interface_ue.c
index 5c1800cdd4dcfb3107db35726bf9527bafa368cb..534030864a295a2a59c95366ae448a0d66e5363f 100644
--- a/openair2/RRC/LTE/L2_interface_ue.c
+++ b/openair2/RRC/LTE/L2_interface_ue.c
@@ -44,7 +44,6 @@
 #include "common/utils/LOG/log.h"
 #include "rrc_eNB_UE_context.h"
 #include "pdcp.h"
-#include "msc.h"
 
 
 #include "intertask_interface.h"
@@ -274,16 +273,6 @@ rrc_data_req_ue(
 )
 //------------------------------------------------------------------------------
 {
-  MSC_LOG_TX_MESSAGE(
-    ctxt_pP->enb_flag ? MSC_RRC_ENB : MSC_RRC_UE,
-    ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE,
-    buffer_pP,
-    sdu_sizeP,
-    MSC_AS_TIME_FMT"RRC_DCCH_DATA_REQ UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ctxt_pP->rnti,
-    muiP,
-    sdu_sizeP);
   {
     MessageDef *message_p;
     // Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c
index d0b89abb51e316f7af0a3cf18f410011523d2e8d..b46bba249268ff8466f195a3afb7a972f3eedebe 100644
--- a/openair2/RRC/LTE/rrc_UE.c
+++ b/openair2/RRC/LTE/rrc_UE.c
@@ -71,7 +71,6 @@
 
 #include "pdcp.h"
 #include "plmn_data.h"
-#include "msc.h"
 #include <common/utils/system.h>
 
 #include "intertask_interface.h"
@@ -1390,16 +1389,6 @@ rrc_ue_process_radioResourceConfigDedicated(
     uint8_t *kUPenc = NULL;
     derive_key_up_enc(UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm,
                       UE_rrc_inst[ctxt_pP->module_id].kenb, &kUPenc);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_UE,
-      MSC_PDCP_UE,
-      NULL,
-      0,
-      MSC_AS_TIME_FMT" CONFIG_REQ UE %x DRB (security %X)",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ctxt_pP->rnti,
-      UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm |
-      (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4));
     // Refresh DRBs
     rrc_pdcp_config_asn1_req(ctxt_pP,
                              (LTE_SRB_ToAddModList_t *)NULL,
diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index 260b6fceaa69a4d4539a9518b8f077472fd3ba5f..ea98d3169d50f6dcebe186bce87546040a4d9fcd 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -58,7 +58,6 @@
 #include "rlc.h"
 #include "rrc_eNB_UE_context.h"
 #include "platform_types.h"
-#include "msc.h"
 #include "LTE_SL-CommConfig-r12.h"
 #include "LTE_PeriodicBSR-Timer-r12.h"
 #include "LTE_RetxBSR-Timer-r12.h"
@@ -1247,16 +1246,6 @@ rrc_eNB_generate_SecurityModeCommand(
         size,
         rrc_eNB_mui,
         DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" securityModeCommand UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
 
   if (!NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
     LOG_I(RRC,"calling rrc_data_req :securityModeCommand\n");
@@ -1301,16 +1290,6 @@ rrc_eNB_generate_UECapabilityEnquiry(
         size,
         rrc_eNB_mui,
         DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" rrcUECapabilityEnquiry UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   rrc_data_req(
     ctxt_pP,
     DCCH,
@@ -1352,16 +1331,6 @@ rrc_eNB_generate_NR_UECapabilityEnquiry(
         size,
         rrc_eNB_mui,
         DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" rrcNRUECapabilityEnquiry UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   rrc_data_req(
     ctxt_pP,
     DCCH,
@@ -1391,15 +1360,6 @@ rrc_eNB_generate_RRCConnectionReject(
               (char *)(ue_p->Srb0.Tx_buffer.Payload),
               ue_p->Srb0.Tx_buffer.payload_size,
               "[MSG] RRCConnectionReject\n");
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    ue_p->Srb0.Tx_buffer.Header,
-    ue_p->Srb0.Tx_buffer.payload_size,
-    MSC_AS_TIME_FMT" LTE_RRCConnectionReject UE %x size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP == NULL ? -1 : ue_context_pP->ue_context.rnti,
-    ue_p->Srb0.Tx_buffer.payload_size);
   LOG_I(RRC,
         PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReject (bytes %d)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -1509,14 +1469,6 @@ rrc_eNB_generate_RRCConnectionReestablishment(
     }  // for (int cnt = 0; cnt < (*SRB_configList)->list.count; cnt++)
   }  // if (*SRB_configList != NULL)
 
-  MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
-                     MSC_RRC_UE,
-                     ue_context->Srb0.Tx_buffer.Header,
-                     ue_context->Srb0.Tx_buffer.payload_size,
-                     MSC_AS_TIME_FMT" LTE_RRCConnectionReestablishment UE %x size %u",
-                     MSC_AS_TIME_ARGS(ctxt_pP),
-                     ue_context->rnti,
-                     ue_context->Srb0.Tx_buffer.payload_size);
   LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishment (bytes %d)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
         ue_context->Srb0.Tx_buffer.payload_size);
@@ -2058,16 +2010,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
     LOG_D(RRC,
           "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
           ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_eNB_mui, ctxt_pP->module_id, DCCH);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_RRC_UE,
-      buffer,
-      size,
-      MSC_AS_TIME_FMT" LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_context.rnti,
-      rrc_eNB_mui,
-      size);
     rrc_data_req(
       ctxt_pP,
       DCCH,
@@ -2154,15 +2096,6 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
               (char *)(ue_p->Srb0.Tx_buffer.Payload),
               ue_p->Srb0.Tx_buffer.payload_size,
               "[MSG] RRCConnectionReestablishmentReject\n");
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    ue_p->Srb0.Tx_buffer.Header,
-    ue_p->Srb0.Tx_buffer.payload_size,
-    MSC_AS_TIME_FMT" LTE_RRCConnectionReestablishmentReject UE %x size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP == NULL ? -1 : ue_context_pP->ue_context.rnti,
-    ue_p->Srb0.Tx_buffer.payload_size);
   LOG_I(RRC,
         PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishmentReject (bytes %d)\n",
         PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -2230,16 +2163,6 @@ rrc_eNB_generate_RRCConnectionRelease(
         size,
         rrc_eNB_mui,
         DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" LTE_RRCConnectionRelease UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   pthread_mutex_lock(&rrc_release_freelist);
 
   for (release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
@@ -2525,16 +2448,6 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *co
   LOG_D(RRC,
         "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_eNB_mui, ctxt_pP->module_id, DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" dedicated LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   rrc_data_req(
     ctxt_pP,
     DCCH,
@@ -2773,16 +2686,6 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *cons
   LOG_D(RRC,
         "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_eNB_mui, ctxt_pP->module_id, DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" dedicated LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   rrc_data_req(
     ctxt_pP,
     DCCH,
@@ -2883,16 +2786,6 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(  const protocol_
   LOG_D(RRC,
         "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_eNB_mui, ctxt_pP->module_id, DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" dedicated LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   rrc_data_req(
     ctxt_pP,
     DCCH,
@@ -3603,15 +3496,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
         rrc_eNB_mui,
         ctxt_pP->module_id,
         DCCH);
-  MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
-                     MSC_RRC_UE,
-                     buffer,
-                     size,
-                     MSC_AS_TIME_FMT" LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-                     MSC_AS_TIME_ARGS(ctxt_pP),
-                     ue_context_pP->ue_context.rnti,
-                     rrc_eNB_mui,
-                     size);
   rrc_data_req(ctxt_pP,
                DCCH,
                rrc_eNB_mui++,
@@ -4316,15 +4200,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
         rrc_eNB_mui,
         ctxt_pP->module_id,
         DCCH);
-  MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
-                     MSC_RRC_UE,
-                     buffer,
-                     size,
-                     MSC_AS_TIME_FMT" LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-                     MSC_AS_TIME_ARGS(ctxt_pP),
-                     ue_context_pP->ue_context.rnti,
-                     rrc_eNB_mui,
-                     size);
   rrc_data_req(ctxt_pP,
                DCCH,
                rrc_eNB_mui++,
@@ -4392,16 +4267,6 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
                                         );
   LOG_I(RRC,"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
         ctxt_pP->module_id,ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   rrc_data_req(
     ctxt_pP,
     DCCH,
@@ -4996,7 +4861,6 @@ void rrc_eNB_handover_ue_context_release(
   //msg_release_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE);
   //itti_send_msg_to_task(TASK_S1AP, ctxt_pP->module_id, msg_release_p);
   s1ap_ue_context_release(ctxt_pP->instance, ue_context_p->ue_context.eNB_ue_s1ap_id);
-  //MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_GTPU_ENB, NULL,0, "0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ", eNB_ue_s1ap_id);
   gtpv1u_enb_delete_tunnel_req_t delete_tunnels={0};
   delete_tunnels.rnti = ue_context_p->ue_context.rnti;
   delete_tunnels.from_gnb = 0;
@@ -6330,16 +6194,6 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   LOG_D(RRC,
         "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration handover to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_eNB_mui, ctxt_pP->module_id, DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" rrcConnectionReconfiguration handover UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_eNB_mui,
-    size);
   /* Refresh SRBs/DRBs */
   rrc_pdcp_config_asn1_req(ctxt_pP,
                            *SRB_configList2, // NULL,
@@ -6535,9 +6389,6 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
                      ue_context_pP->ue_context.kenb,
                      &kRRCint);
   /* Refresh SRBs/DRBs */
-  MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_PDCP_ENB, NULL, 0, MSC_AS_TIME_FMT" CONFIG_REQ UE %x DRB (security unchanged)",
-                     MSC_AS_TIME_ARGS(ctxt_pP),
-                     ue_context_pP->ue_context.rnti);
   rrc_pdcp_config_asn1_req(ctxt_pP,
                            SRB_configList, // NULL,
                            DRB_configList,
@@ -6906,15 +6757,6 @@ rrc_eNB_generate_RRCConnectionSetup(
         LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);
       }
 
-      MSC_LOG_TX_MESSAGE(
-        MSC_RRC_ENB,
-        MSC_RRC_UE,
-        ue_p->Srb0.Tx_buffer.Header, // LG WARNING
-        ue_p->Srb0.Tx_buffer.payload_size,
-        MSC_AS_TIME_FMT" RRCConnectionSetup UE %x size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_context_pP->ue_context.rnti,
-        ue_p->Srb0.Tx_buffer.payload_size);
       LOG_I(RRC,
             PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n",
             PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -7326,13 +7168,6 @@ rrc_eNB_decode_ccch(
           LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n",
                 PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
                 Idx);
-          MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
-                             MSC_PDCP_ENB,
-                             NULL,
-                             0,
-                             MSC_AS_TIME_FMT" CONFIG_REQ UE %x SRB",
-                             MSC_AS_TIME_ARGS(ctxt_pP),
-                             ue_context_p->ue_context.rnti);
           rrc_pdcp_config_asn1_req(ctxt_pP,
                                    ue_context_p->ue_context.SRB_configList,
                                    (LTE_DRB_ToAddModList_t *) NULL,
@@ -7373,15 +7208,6 @@ rrc_eNB_decode_ccch(
         if (ue_context_p != NULL) {
           // erase content
           rrc_eNB_free_mem_UE_context(ctxt_pP, ue_context_p);
-          MSC_LOG_RX_DISCARDED_MESSAGE(
-            MSC_RRC_ENB,
-            MSC_RRC_UE,
-            buffer,
-            dec_rval.consumed,
-            MSC_AS_TIME_FMT" LTE_RRCConnectionRequest UE %x size %u (UE already in context)",
-            MSC_AS_TIME_ARGS(ctxt_pP),
-            ue_context_p->ue_context.rnti,
-            dec_rval.consumed);
         } else {
           rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8;
           {
@@ -7467,18 +7293,6 @@ rrc_eNB_decode_ccch(
                 }
               }
 
-              MSC_LOG_RX_MESSAGE(
-                MSC_RRC_ENB,
-                MSC_RRC_UE,
-                buffer,
-                dec_rval.consumed,
-                MSC_AS_TIME_FMT" RRCConnectionRequest UE %x size %u (s-TMSI mmec %u m_TMSI %u random UE id (0x%" PRIx64 ")",
-                MSC_AS_TIME_ARGS(ctxt_pP),
-                ue_context_p->ue_context.rnti,
-                dec_rval.consumed,
-                ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code,
-                ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
-                ue_context_p->ue_context.random_ue_identity);
             } else {
               LOG_E(RRC,
                     PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionRequest without random UE identity or S-TMSI not supported, let's reject the UE\n",
@@ -7567,14 +7381,6 @@ rrc_eNB_decode_ccch(
         LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n",
               PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
               Idx);
-        MSC_LOG_TX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_PDCP_ENB,
-          NULL,
-          0,
-          MSC_AS_TIME_FMT" CONFIG_REQ UE %x SRB",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti);
         rrc_pdcp_config_asn1_req(ctxt_pP,
                                  ue_context_p->ue_context.SRB_configList,
                                  (LTE_DRB_ToAddModList_t *) NULL,
@@ -7949,15 +7755,6 @@ rrc_eNB_decode_dcch(
 
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Rx_sdu),sdu_sizeP,
                     "[MSG] RRC Connection Reconfiguration Complete\n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" LTE_RRCConnectionReconfigurationComplete UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
         LOG_D(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
               "(RRCConnectionReconfigurationComplete) ---> RRC_eNB]\n",
@@ -8169,15 +7966,6 @@ rrc_eNB_decode_dcch(
           T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC Connection Reestablishment Complete\n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" LTE_RRCConnectionReestablishmentComplete UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
         LOG_I(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
               "(rrcConnectionReestablishmentComplete) ---> RRC_eNB\n",
@@ -8254,15 +8042,6 @@ rrc_eNB_decode_dcch(
 
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC Connection SetupComplete\n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" LTE_RRCConnectionSetupComplete UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
         LOG_D(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
               "(RRCConnectionSetupComplete) ---> RRC_eNB\n",
@@ -8308,15 +8087,6 @@ rrc_eNB_decode_dcch(
 
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC Security Mode Complete\n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" securityModeComplete UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
         LOG_I(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT" received securityModeComplete on UL-DCCH %d from UE\n",
               PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -8345,15 +8115,6 @@ rrc_eNB_decode_dcch(
           T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC Security Mode Failure\n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" securityModeFailure UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
         LOG_W(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
               "(securityModeFailure) ---> RRC_eNB\n",
@@ -8383,15 +8144,6 @@ rrc_eNB_decode_dcch(
 
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC UECapablility Information\n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" ueCapabilityInformation UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
         LOG_I(RRC,
               PROTOCOL_RRC_CTXT_UE_FMT" received ueCapabilityInformation on UL-DCCH %d from UE\n",
               PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -8569,15 +8321,6 @@ rrc_eNB_decode_dcch(
         LOG_D(RRC,"[MSG] RRC UL Information Transfer \n");
         LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC UL Information Transfer \n");
-        MSC_LOG_RX_MESSAGE(
-          MSC_RRC_ENB,
-          MSC_RRC_UE,
-          Rx_sdu,
-          sdu_sizeP,
-          MSC_AS_TIME_FMT" ulInformationTransfer UE %x size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_p->ue_context.rnti,
-          sdu_sizeP);
 
         if (EPC_MODE_ENABLED == 1) {
           rrc_eNB_send_S1AP_UPLINK_NAS(ctxt_pP,
@@ -8668,15 +8411,6 @@ rrc_eNB_decode_dcch(
           LOG_I(RRC,"THINH [LTE_UL_DCCH_MessageType__messageClassExtension_PR_c2]\n");
           LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                       "[MSG] RRC SidelinkUEInformation \n");
-          MSC_LOG_RX_MESSAGE(
-            MSC_RRC_ENB,
-            MSC_RRC_UE,
-            Rx_sdu,
-            sdu_sizeP,
-            MSC_AS_TIME_FMT" SidelinkUEInformation UE %x size %u",
-            MSC_AS_TIME_ARGS(ctxt_pP),
-            ue_context_p->ue_context.rnti,
-            sdu_sizeP);
           LOG_I(RRC,
                 PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
                 "(SidelinkUEInformation) ---> RRC_eNB\n",
@@ -9572,20 +9306,6 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
       rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
       break;
 
-    case GTPV1U_ENB_DELETE_TUNNEL_RESP: {
-      rrc_eNB_ue_context_t *ue = rrc_eNB_get_ue_context(RC.rrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti);
-
-      if (ue != NULL
-          && ue->ue_context.ue_release_timer_rrc > 0
-          && (ue->ue_context.handover_info == NULL ||
-              (ue->ue_context.handover_info->state != HO_RELEASE &&
-               ue->ue_context.handover_info->state != HO_CANCEL))) {
-        ue->ue_context.ue_release_timer_rrc = ue->ue_context.ue_release_timer_thres_rrc;
-      }
-
-      break;
-    }
-
     case S1AP_PATH_SWITCH_REQ_ACK:
       LOG_I(RRC, "[eNB %ld] received path switch ack %s\n", instance, msg_name_p);
       rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK(msg_p, msg_name_p, instance);
diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
index 3fa17bcd6bdba76cee9054bd8af09e7c09eac88d..575a38ee3d9ddf56102f35fad5a74a3b96b0598f 100644
--- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
+++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
@@ -32,7 +32,6 @@
 # include "RRC/LTE/MESSAGES/asn1_msg.h"
 # include "rrc_eNB_GTPV1U.h"
 # include "rrc_eNB_UE_context.h"
-# include "msc.h"
 
 
 #include "asn1_conversions.h"
@@ -77,15 +76,6 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
 	    create_tunnel_resp_pP->enb_addr.length);
     }
 
-	MSC_LOG_RX_MESSAGE(
-			  MSC_RRC_ENB,
-			  MSC_GTPU_ENB,
-			  NULL,0,
-			  MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u ebid %u enb-s1u teid %u",
-			  0,0,rnti,
-			  create_tunnel_resp_pP->num_tunnels,
-			  ue_context_p->ue_context.enb_gtp_ebi[0],
-			  ue_context_p->ue_context.enb_gtp_teid[0]);
         (void)rnti; /* avoid gcc warning "set but not used" */
     return 0;
   } else {
@@ -210,7 +200,7 @@ boolean_t gtpv_data_req_new (
       GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
       LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe);
       itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg);
-      return NW_GTPV1U_OK;
+      return 0;
   }
   
   /* target enb */
@@ -225,7 +215,7 @@ boolean_t gtpv_data_req_new (
       gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
       memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
       delete_tunnel_req.rnti = ctxt->rnti;
-      gtpv1u_delete_x2u_tunnel(ctxt->module_id, &delete_tunnel_req, GTPV1U_TARGET_ENB);
+      gtpv1u_delete_x2u_tunnel(ctxt->module_id, &delete_tunnel_req);
       return true;
     } else {
       /* data packet */
diff --git a/openair2/RRC/LTE/rrc_eNB_M2AP.c b/openair2/RRC/LTE/rrc_eNB_M2AP.c
index a9c65eae1a12f0bd7dcade4b139413e3853b332a..5516308a1047a2563deb1f3434eebe9de73127f4 100644
--- a/openair2/RRC/LTE/rrc_eNB_M2AP.c
+++ b/openair2/RRC/LTE/rrc_eNB_M2AP.c
@@ -32,7 +32,6 @@
 # include "RRC/LTE/MESSAGES/asn1_msg.h"
 # include "rrc_eNB_M2AP.h"
 //# include "rrc_eNB_UE_context.h"
-# include "msc.h"
 #   include "asn1_conversions.h"
 #   include "intertask_interface.h"
 # include "common/ran_context.h"
diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c
index 1a5fe55c26feb2732bc731efedd1a468eb060551..9b9e267828552335e0754e90f097435b51c13cc4 100644
--- a/openair2/RRC/LTE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c
@@ -36,7 +36,6 @@
 #include "rrc_eNB_S1AP.h"
 #include "enb_config.h"
 #include "common/ran_context.h"
-#include "gtpv1u.h"
 
 #include "s1ap_eNB.h"
 #include "s1ap_eNB_defs.h"
@@ -48,7 +47,6 @@
 #include "pdcp_primitives.h"
 
 #include "UTIL/OSA/osa_defs.h"
-#include <common/utils/msc/msc.h>
 
 #include "LTE_UERadioAccessCapabilityInformation.h"
 
@@ -586,17 +584,6 @@ rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
       // TODO add cause when it will be integrated
     }
   }
-
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_ENB,
-    MSC_S1AP_ENB,
-    (const char *)&S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p),
-    sizeof(s1ap_initial_context_setup_resp_t),
-    MSC_AS_TIME_FMT" INITIAL_CONTEXT_SETUP_RESP UE %X eNB_ue_s1ap_id %u e_rabs:%u succ %u fail",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_id_rnti,
-    S1AP_INITIAL_CONTEXT_SETUP_RESP (msg_p).eNB_ue_s1ap_id,
-    e_rabs_done, e_rabs_failed);
 }
 
 //------------------------------------------------------------------------------
@@ -804,14 +791,6 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
         ue_context_pP->ue_context.ue_gummei.mnc_len = S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc_len;
         ue_context_pP->ue_context.ue_gummei.mme_code = S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mme_code;
         ue_context_pP->ue_context.ue_gummei.mme_group_id = S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mme_group_id;
-        MSC_LOG_TX_MESSAGE(MSC_S1AP_ENB,
-                           MSC_S1AP_MME,
-                           (const char *)&message_p->ittiMsg.s1ap_nas_first_req,
-                           sizeof(s1ap_nas_first_req_t),
-                           MSC_AS_TIME_FMT" S1AP_NAS_FIRST_REQ eNB %u UE %x",
-                           MSC_AS_TIME_ARGS(ctxt_pP),
-                           ctxt_pP->module_id,
-                           ctxt_pP->rnti);
         LOG_I(S1AP, "[eNB %d] Build S1AP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI mme_code %u mme_group_id %u ue %x\n",
               ctxt_pP->module_id,
               S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mme_code,
@@ -852,15 +831,6 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
         eNB_ue_s1ap_id);
 
   if (ue_context_p == NULL) {
-    MSC_LOG_RX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      NULL,
-      0,
-      MSC_AS_TIME_FMT" DOWNLINK-NAS UE initial id %u eNB_ue_s1ap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_initial_id,
-      eNB_ue_s1ap_id);
     /* Can not associate this message to an UE index, send a failure to S1AP and discard it! */
     MessageDef *msg_fail_p;
     LOG_W(RRC, "[eNB %ld] In S1AP_DOWNLINK_NAS: unknown UE from S1AP ids (%d, %d)\n", instance, ue_initial_id, eNB_ue_s1ap_id);
@@ -869,15 +839,6 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
     S1AP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.length = S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length;
     S1AP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.buffer = S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer;
     // TODO add failure cause when defined!
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      (const char *)NULL,
-      0,
-      MSC_AS_TIME_FMT" S1AP_NAS_NON_DELIVERY_IND UE initial id %u eNB_ue_s1ap_id %u (ue ctxt !found)",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_initial_id,
-      eNB_ue_s1ap_id);
     itti_send_msg_to_task (TASK_S1AP, instance, msg_fail_p);
     return (-1);
   } else {
@@ -889,15 +850,6 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
       ue_context_p->ue_context.eNB_ue_s1ap_id = S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id;
     }
 
-    MSC_LOG_RX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      (const char *)NULL,
-      0,
-      MSC_AS_TIME_FMT" DOWNLINK-NAS UE initial id %u eNB_ue_s1ap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_initial_id,
-      S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id);
     /* Create message for PDCP (DLInformationTransfer_t) */
     length = do_DLInformationTransfer (
                instance,
@@ -1195,12 +1147,6 @@ rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(
   if (ue_context_pP == NULL) {
     LOG_E(RRC, "[eNB] In S1AP_UE_CONTEXT_RELEASE_REQ: invalid UE\n");
   } else {
-    MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
-                       MSC_S1AP_ENB,
-                       NULL,
-                       0,
-                       "0 S1AP_UE_CONTEXT_RELEASE_REQ eNB_ue_s1ap_id 0x%06"PRIX32" ",
-                       ue_context_pP->ue_context.eNB_ue_s1ap_id);
     MessageDef *msg_context_release_req_p = NULL;
     msg_context_release_req_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_REQ);
     S1AP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
@@ -1214,9 +1160,6 @@ void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(
   module_id_t enb_mod_idP,
   uint32_t eNB_ue_s1ap_id
 ) {
-  MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_S1AP_ENB, NULL, 0,
-                     "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" ",
-                     eNB_ue_s1ap_id);
   MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
   S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
   itti_send_msg_to_task(TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_mod_idP), msg);
@@ -1247,14 +1190,6 @@ rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(
     LOG_W(RRC, "[eNB %ld] In S1AP_UE_CONTEXT_RELEASE_COMMAND: unknown UE from eNB_ue_s1ap_id (%d)\n",
           instance,
           eNB_ue_s1ap_id);
-    MSC_LOG_EVENT(MSC_RRC_ENB, "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" context not found",
-                  eNB_ue_s1ap_id);
-    MSC_LOG_TX_MESSAGE(MSC_RRC_ENB,
-                       MSC_S1AP_ENB,
-                       NULL,
-                       0,
-                       "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE eNB_ue_s1ap_id 0x%06"PRIX32" ",
-                       eNB_ue_s1ap_id);
     msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, 0, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
     S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
     itti_send_msg_to_task(TASK_S1AP, instance, msg_complete_p);
@@ -1432,16 +1367,6 @@ int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t *const ctxt_pP,
   if ((e_rabs_done > 0) ) {
     LOG_I(RRC,"S1AP_E_RAB_SETUP_RESP: sending the message: nb_of_erabs %d, total e_rabs %d, index %d\n",
           ue_context_pP->ue_context.nb_of_e_rabs, ue_context_pP->ue_context.setup_e_rabs, e_rab);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      (const char *)&S1AP_E_RAB_SETUP_RESP (msg_p),
-      sizeof(s1ap_e_rab_setup_resp_t),
-      MSC_AS_TIME_FMT" E_RAB_SETUP_RESP UE %X eNB_ue_s1ap_id %u e_rabs:%u succ %u fail",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_id_rnti,
-      S1AP_E_RAB_SETUP_RESP (msg_p).eNB_ue_s1ap_id,
-      e_rabs_done, e_rabs_failed);
     itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
   }
 
@@ -1667,16 +1592,6 @@ int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t *const ctxt_pP,
   if (e_rabs_done > 0 || e_rabs_failed > 0) {
     LOG_D(RRC,"S1AP_E_RAB_MODIFY_RESP: sending the message: nb_of_modify_e_rabs %d, total e_rabs %d, index %d\n",
           ue_context_pP->ue_context.nb_of_modify_e_rabs, ue_context_pP->ue_context.setup_e_rabs, e_rab);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      (const char *)&S1AP_E_RAB_SETUP_RESP (msg_p),
-      sizeof(s1ap_e_rab_setup_resp_t),
-      MSC_AS_TIME_FMT" E_RAB_MODIFY_RESP UE %X eNB_ue_s1ap_id %u e_rabs:%u succ %u fail",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_id_rnti,
-      S1AP_E_RAB_MODIFY_RESP (msg_p).eNB_ue_s1ap_id,
-      e_rabs_done, e_rabs_failed);
     itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
   } else {
     itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
@@ -2067,16 +1982,6 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
   if (e_rabs_done > 0) {
     LOG_I(RRC,"S1AP_PATH_SWITCH_REQ: sending the message: nb_of_erabstobeswitched %d, total e_rabs %d, index %d\n",
           S1AP_PATH_SWITCH_REQ (msg_p).nb_of_e_rabs, ue_context_pP->ue_context.setup_e_rabs, e_rab);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      (const char *)&S1AP_PATH_SWITCH_REQ (msg_p),
-      sizeof(s1ap_path_switch_req_t),
-      MSC_AS_TIME_FMT" PATH_SWITCH_REQ UE %X eNB_ue_s1ap_id %u e_rabs:%u succ",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_id_rnti,
-      S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
-      e_rabs_done);
     itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
   } else {
     itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
@@ -2355,16 +2260,6 @@ int rrc_eNB_send_E_RAB_Modification_Indication(const protocol_ctxt_t *const ctxt
   if (e_rab_modify_index > 0) {
     LOG_I(RRC,"S1AP_E_RAB_MODIFICATION_IND: sending the message: nb_of_erabstobemodified %d, total e_rabs %d, index %d\n",
     		S1AP_E_RAB_MODIFICATION_IND (msg_p).nb_of_e_rabs_tobemodified, ue_context_pP->ue_context.setup_e_rabs, e_rab);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_ENB,
-      MSC_S1AP_ENB,
-      (const char *)&S1AP_E_RAB_MODIFICATION_IND (msg_p),
-      sizeof(s1ap_e_rab_modification_ind_t),
-      MSC_AS_TIME_FMT" E RAB MODIFICATION IND UE %X eNB_ue_s1ap_id %u e_rabs:%u succ",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_id_rnti,
-      S1AP_E_RAB_MODIFICATION_IND (msg_p).eNB_ue_s1ap_id,
-      e_rab_modify_index);
     itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
   } else {
     itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
diff --git a/openair2/RRC/LTE/rrc_eNB_UE_context.c b/openair2/RRC/LTE/rrc_eNB_UE_context.c
index 2cc89adf1569553e2ba17b3e6c80f51ab819bfbe..0d262064b53b162eb57c432e173bca5d88733e09 100644
--- a/openair2/RRC/LTE/rrc_eNB_UE_context.c
+++ b/openair2/RRC/LTE/rrc_eNB_UE_context.c
@@ -35,7 +35,6 @@
 
 #include "common/utils/LOG/log.h"
 #include "rrc_eNB_UE_context.h"
-#include "msc.h"
 
 
 //------------------------------------------------------------------------------
@@ -210,10 +209,6 @@ void rrc_eNB_remove_ue_context(
   }
 
   RB_REMOVE(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
-  MSC_LOG_EVENT(
-    MSC_RRC_ENB,
-    "0 Removed UE %"PRIx16" ",
-    ue_context_pP->ue_context.rnti);
   rrc_eNB_free_mem_UE_context(ctxt_pP, ue_context_pP);
   uid_linear_allocator_free(rrc_instance_pP, ue_context_pP->local_uid);
   free(ue_context_pP);
diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c
index 4f54b9978d4d966aa0c2f5fe703aa18ce701ff68..1cf690ac0c064ac68e1d8b35f64ff77507a3ed97 100644
--- a/openair2/RRC/NR/L2_nr_interface.c
+++ b/openair2/RRC/NR/L2_nr_interface.c
@@ -34,7 +34,6 @@
 #include "nr_rrc_extern.h"
 #include "common/utils/LOG/log.h"
 #include "pdcp.h"
-#include "msc.h"
 #include "common/ran_context.h"
 #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
 #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
@@ -172,16 +171,6 @@ nr_rrc_data_req(
     return FALSE;
   }
 
-  MSC_LOG_TX_MESSAGE(
-    ctxt_pP->enb_flag ? MSC_RRC_GNB : MSC_RRC_UE,
-    ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE,
-    buffer_pP,
-    sdu_sizeP,
-    MSC_AS_TIME_FMT"RRC_DCCH_DATA_REQ UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ctxt_pP->rnti,
-    muiP,
-    sdu_sizeP);
   MessageDef *message_p;
   // Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
   uint8_t *message_buffer;
@@ -372,10 +361,10 @@ int8_t nr_mac_rrc_data_ind(const module_id_t     module_idP,
 }
 
 void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP,
-                            const int CC_idP,
-                            const frame_t frameP,
-                            const sub_frame_t subframeP,
-                            const rnti_t rntiP) {
+                               const int CC_idP,
+                               const frame_t frameP,
+                               const sub_frame_t subframeP,
+                               const rnti_t rntiP) {
   struct rrc_gNB_ue_context_s *ue_context_p = NULL;
   ue_context_p = rrc_gNB_get_ue_context(
                    RC.nrrrc[Mod_instP],
diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h
index 667b5ed24a1213fb57e55fbde6fa1e8fd88b9678..c2cf11e7d74c93162b07830c2cb1d1f0455ef23a 100644
--- a/openair2/RRC/NR/nr_rrc_defs.h
+++ b/openair2/RRC/NR/nr_rrc_defs.h
@@ -458,7 +458,6 @@ typedef struct {
   NR_CellGroupConfig_t                      *secondaryCellGroup[MAX_NR_RRC_UE_CONTEXTS];
   NR_SRB_INFO                               SI;
   NR_SRB_INFO                               Srb0;
-  int                                       initial_csi_index[MAX_NR_RRC_UE_CONTEXTS];
   int                                       p_gNB;
 
 } rrc_gNB_carrier_data_t;
diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h
index 40de13dfb03467fd5c341c19e4540c9fc0ce1bf4..30211b6a0b78e3440fc8484ac7405148a730619f 100644
--- a/openair2/RRC/NR/nr_rrc_proto.h
+++ b/openair2/RRC/NR/nr_rrc_proto.h
@@ -82,10 +82,13 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
                                      int minRXTXTIMEpdsch,
                                      int do_csirs,
                                      int do_srs,
-                                     int initial_csi_index,
                                      int uid);
 
-void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_CSI_MeasConfig_t *csi_MeasConfig, int dl_antenna_ports, int do_csirs);
+void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
+                  NR_CSI_MeasConfig_t *csi_MeasConfig,
+                  int dl_antenna_ports,
+                  int curr_bwp,
+                  int do_csirs);
 
 void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
                            NR_ServingCellConfig_t *servingcellconfigdedicated,
@@ -95,7 +98,6 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
                            int minRXTXTIMEpdsch,
                            int do_csirs,
                            int do_srs,
-                           int initial_csi_index,
                            int uid);
 
 void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig,
@@ -112,9 +114,6 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
                          rrc_gNB_ue_context_t         *const ue_context_pP,
                          const protocol_ctxt_t        *const ctxt_pP );
 
-void apply_pdcp_config(rrc_gNB_ue_context_t         *const ue_context_pP,
-                       const protocol_ctxt_t        *const ctxt_pP );
-
 void
 rrc_gNB_generate_RRCSetup(
     const protocol_ctxt_t        *const ctxt_pP,
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 7e19a5313cd4733e54408dd1cf3e38e29517f6cd..f49a0e24bc8b6aff91e2d33af2eb637ff4ace055 100755
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -30,6 +30,10 @@
 #define RRC_GNB_C
 #define RRC_GNB_C
 
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
 #include "nr_rrc_config.h"
 #include "nr_rrc_defs.h"
 #include "nr_rrc_extern.h"
@@ -66,7 +70,6 @@
 #include "rlc.h"
 #include "rrc_eNB_UE_context.h"
 #include "platform_types.h"
-#include "msc.h"
 #include "common/utils/LOG/vcd_signal_dumper.h"
 
 #include "T.h"
@@ -103,27 +106,6 @@
 
 extern RAN_CONTEXT_t RC;
 
-extern boolean_t nr_rrc_pdcp_config_asn1_req(
-    const protocol_ctxt_t *const  ctxt_pP,
-    NR_SRB_ToAddModList_t  *const srb2add_list,
-    NR_DRB_ToAddModList_t  *const drb2add_list,
-    NR_DRB_ToReleaseList_t *const drb2release_list,
-    const uint8_t                   security_modeP,
-    uint8_t                  *const kRRCenc,
-    uint8_t                  *const kRRCint,
-    uint8_t                  *const kUPenc,
-    uint8_t                  *const kUPint
-    ,LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9
-    ,rb_id_t                 *const defaultDRB,
-    struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
-
-extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP,
-                                                   const NR_SRB_ToAddModList_t   * const srb2add_listP,
-                                                   const NR_DRB_ToAddModList_t   * const drb2add_listP,
-                                                   const NR_DRB_ToReleaseList_t  * const drb2release_listP,
-                                                   const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
-                                                   struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
-
 static inline uint64_t bitStr_to_uint64(BIT_STRING_t *asn);
 
 mui_t                               rrc_gNB_mui = 0;
@@ -424,15 +406,6 @@ rrc_gNB_generate_RRCSetup(
       LOG_D(NR_RRC,
 	    PROTOCOL_NR_RRC_CTXT_UE_FMT" RRC_gNB --- MAC_CONFIG_REQ  (SRB1) ---> MAC_gNB\n",
 	    PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP));
-      MSC_LOG_TX_MESSAGE(
-			 MSC_RRC_GNB,
-			 MSC_RRC_UE,
-			 ue_p->Srb0.Tx_buffer.Header, // LG WARNING
-			 ue_p->Srb0.Tx_buffer.payload_size,
-			 MSC_AS_TIME_FMT" RRCSetup UE %x size %u",
-			 MSC_AS_TIME_ARGS(ctxt_pP),
-			 ue_context_pP->ue_context.rnti,
-			 ue_p->Srb0.Tx_buffer.payload_size);
       LOG_I(NR_RRC,
 	    PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n",
 	    PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -503,15 +476,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
                          (NR_CellGroupConfig_t *)NULL
 			 );
 
-  MSC_LOG_TX_MESSAGE(
-		     MSC_RRC_GNB,
-		     MSC_RRC_UE,
-		     ue_p->Srb0.Tx_buffer.Header, // LG WARNING
-		     ue_p->Srb0.Tx_buffer.payload_size,
-		     MSC_AS_TIME_FMT" RRCSetup UE %x size %u",
-		     MSC_AS_TIME_ARGS(ctxt_pP),
-		     ue_context_pP->ue_context.rnti,
-		     ue_p->Srb0.Tx_buffer.payload_size);
   LOG_I(NR_RRC,
         PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n",
         PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -553,14 +517,6 @@ rrc_gNB_generate_RRCReject(
               (char *)(ue_p->Srb0.Tx_buffer.Payload),
               ue_p->Srb0.Tx_buffer.payload_size,
               "[MSG] RRCReject \n");
-  MSC_LOG_TX_MESSAGE(MSC_RRC_GNB,
-                    MSC_RRC_UE,
-                    ue_p->Srb0.Tx_buffer.Header,
-                    ue_p->Srb0.Tx_buffer.payload_size,
-                    MSC_AS_TIME_FMT" NR_RRCReject UE %x size %u",
-                    MSC_AS_TIME_ARGS(ctxt_pP),
-                    ue_context_pP == NULL ? -1 : ue_context_pP->ue_context.rnti,
-                    ue_p->Srb0.Tx_buffer.payload_size);
   LOG_I(NR_RRC,
       PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating NR_RRCReject (bytes %d)\n",
       PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -821,15 +777,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
           rrc_gNB_mui,
           ctxt_pP->module_id,
           DCCH);
-      MSC_LOG_TX_MESSAGE(MSC_RRC_GNB,
-          MSC_RRC_UE,
-          buffer,
-          size,
-          MSC_AS_TIME_FMT" NR_RRCReconfiguration UE %x MUI %d size %u",
-          MSC_AS_TIME_ARGS(ctxt_pP),
-          ue_context_pP->ue_context.rnti,
-          rrc_gNB_mui,
-          size);
       nr_rrc_data_req(ctxt_pP,
           DCCH,
           rrc_gNB_mui++,
@@ -1051,16 +998,6 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
   LOG_D(NR_RRC,
         "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_GNB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" dedicated RRCReconfiguration UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_gNB_mui,
-    size);
 
 #ifdef ITTI_SIM
   MessageDef *message_p;
@@ -1159,16 +1096,6 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
   LOG_D(NR_RRC,
         "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
         ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_GNB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" dedicated NR_RRCReconfiguration UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_gNB_mui,
-    size);
 #ifdef ITTI_SIM
   MessageDef *message_p;
   uint8_t *message_buffer;
@@ -1233,9 +1160,6 @@ rrc_gNB_process_RRCReconfigurationComplete(
                         ue_context_pP->ue_context.kgnb,
                         &kRRCint);
   /* Refresh SRBs/DRBs */
-  MSC_LOG_TX_MESSAGE(MSC_RRC_GNB, MSC_PDCP_ENB, NULL, 0, MSC_AS_TIME_FMT" CONFIG_REQ UE %x DRB (security unchanged)",
-                   MSC_AS_TIME_ARGS(ctxt_pP),
-                   ue_context_pP->ue_context.rnti);
 
 #ifndef ITTI_SIM
   LOG_D(NR_RRC,"Configuring PDCP DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
@@ -1464,14 +1388,6 @@ rrc_gNB_generate_RRCReestablishment(
       }
     }  // if (*SRB_configList != NULL)
     
-    MSC_LOG_TX_MESSAGE(MSC_RRC_GNB,
-                       MSC_RRC_UE,
-                       ue_context->Srb0.Tx_buffer.Header,
-                       ue_context->Srb0.Tx_buffer.payload_size,
-                       MSC_AS_TIME_FMT" NR_RRCReestablishment UE %x size %u",
-                       MSC_AS_TIME_ARGS(ctxt_pP),
-                       ue_context->rnti,
-                       ue_context->Srb0.Tx_buffer.payload_size);
     LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-DCCH, Generating NR_RRCReestablishment (bytes %d)\n",
           PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
           ue_context->Srb0.Tx_buffer.payload_size);
@@ -1734,16 +1650,6 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
     LOG_D(NR_RRC,
           "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
           ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_GNB,
-      MSC_RRC_UE,
-      buffer,
-      size,
-      MSC_AS_TIME_FMT" LTE_RRCConnectionReconfiguration UE %x MUI %d size %u",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_context.rnti,
-      rrc_gNB_mui,
-      size);
 #ifdef ITTI_SIM
   MessageDef *message_p;
   uint8_t *message_buffer;
@@ -1814,15 +1720,6 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t    *const ctxt_pP,
         ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti);
         if (ue_context_p != NULL) {
           rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_p);
-          MSC_LOG_RX_DISCARDED_MESSAGE(
-              MSC_RRC_GNB,
-              MSC_RRC_UE,
-              buffer,
-              dec_rval.consumed,
-              MSC_AS_TIME_FMT" NR_RRCSetupRequest UE %x size %u (UE already in context)",
-              MSC_AS_TIME_ARGS(ctxt_pP),
-              ue_context_p->ue_context.rnti,
-              dec_rval.consumed);
         } else {
           rrcSetupRequest = &ul_ccch_msg->message.choice.c1->choice.rrcSetupRequest->rrcSetupRequest;
           if (NR_InitialUE_Identity_PR_randomValue == rrcSetupRequest->ue_Identity.present) {
@@ -2114,13 +2011,6 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t    *const ctxt_pP,
           LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n",
                 PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
                 Idx);
-          MSC_LOG_TX_MESSAGE(MSC_RRC_GNB,
-                            MSC_PDCP_GNB,
-                            NULL,
-                            0,
-                            MSC_AS_TIME_FMT" CONFIG_REQ UE %x SRB",
-                            MSC_AS_TIME_ARGS(ctxt_pP),
-                            ue_context_p->ue_context.rnti);
           // nr_rrc_pdcp_config_asn1_req(ctxt_pP,
           //                         ue_context_p->ue_context.SRB_configList,
           //                         NULL,
@@ -2195,7 +2085,6 @@ rrc_gNB_decode_dcch(
   asn_dec_rval_t                      dec_rval;
   NR_UL_DCCH_Message_t                *ul_dcch_msg  = NULL;
   struct rrc_gNB_ue_context_s         *ue_context_p = NULL;
-  MessageDef                         *msg_delete_tunnels_p = NULL;
   uint8_t                             xid;
 
   int i;
@@ -2264,15 +2153,6 @@ rrc_gNB_decode_dcch(
 
         LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)(Rx_sdu), sdu_sizeP,
                     "[MSG] RRC Connection Reconfiguration Complete\n");
-        MSC_LOG_RX_MESSAGE(
-        MSC_RRC_GNB,
-        MSC_RRC_UE,
-        Rx_sdu,
-        sdu_sizeP,
-        MSC_AS_TIME_FMT" NR_RRCReconfigurationComplete UE %x size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_context_p->ue_context.rnti,
-        sdu_sizeP);
         LOG_D(NR_RRC,
             PROTOCOL_NR_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
             "(RRCReconfigurationComplete) ---> RRC_gNB]\n",
@@ -2294,21 +2174,17 @@ rrc_gNB_decode_dcch(
             xid = ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier;
             ue_context_p->ue_context.pdu_session_release_command_flag = 0;
             //gtp tunnel delete
-            msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_GNB, 0, GTPV1U_GNB_DELETE_TUNNEL_REQ);
-            memset(&GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
-            GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
-
+	    gtpv1u_gnb_delete_tunnel_req_t req={0};
             for(i = 0; i < NB_RB_MAX; i++) {
               if(xid == ue_context_p->ue_context.pduSession[i].xid) {
-                GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).pdusession_id[GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_pdusession++] =
+                req.pdusession_id[req.num_pdusession++] =
                   ue_context_p->ue_context.gnb_gtp_psi[i];
                 ue_context_p->ue_context.gnb_gtp_teid[i] = 0;
                 memset(&ue_context_p->ue_context.gnb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.gnb_gtp_addrs[i]));
                 ue_context_p->ue_context.gnb_gtp_psi[i]  = 0;
               }
             }
-
-            itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p);
+	    gtpv1u_delete_ngu_tunnel(ctxt_pP->instance, &req);
             //NGAP_PDUSESSION_RELEASE_RESPONSE
             rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid);
           } else if (ue_context_p->ue_context.established_pdu_sessions_flag != 1) {
@@ -2334,15 +2210,6 @@ rrc_gNB_decode_dcch(
 
         LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                     "[MSG] RRC SetupComplete\n");
-        MSC_LOG_RX_MESSAGE(
-                MSC_RRC_GNB,
-                MSC_RRC_UE,
-                Rx_sdu,
-                sdu_sizeP,
-                MSC_AS_TIME_FMT" NR_RRCSetupComplete UE %x size %u",
-                MSC_AS_TIME_ARGS(ctxt_pP),
-                ue_context_p->ue_context.rnti,
-                sdu_sizeP);
         LOG_D(NR_RRC,
                 PROTOCOL_NR_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
                 "(RRCSetupComplete) ---> RRC_gNB\n",
@@ -2421,15 +2288,6 @@ rrc_gNB_decode_dcch(
             LOG_D(NR_RRC,"[MSG] RRC UL Information Transfer \n");
             LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                         "[MSG] RRC UL Information Transfer \n");
-            MSC_LOG_RX_MESSAGE(
-              MSC_RRC_GNB,
-              MSC_RRC_UE,
-              Rx_sdu,
-              sdu_sizeP,
-              MSC_AS_TIME_FMT" ulInformationTransfer UE %x size %u",
-              MSC_AS_TIME_ARGS(ctxt_pP),
-              ue_context_p->ue_context.rnti,
-              sdu_sizeP);
 
             if (AMF_MODE_ENABLED == 1) {
                 rrc_gNB_send_NGAP_UPLINK_NAS(ctxt_pP,
@@ -2469,15 +2327,6 @@ rrc_gNB_decode_dcch(
         case NR_UL_DCCH_MessageType__c1_PR_securityModeFailure:
             LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                        "[MSG] NR RRC Security Mode Failure\n");
-            MSC_LOG_RX_MESSAGE(
-                MSC_RRC_GNB,
-                MSC_RRC_UE,
-                Rx_sdu,
-                sdu_sizeP,
-                MSC_AS_TIME_FMT" securityModeFailure UE %x size %u",
-                MSC_AS_TIME_ARGS(ctxt_pP),
-                ue_context_p->ue_context.rnti,
-                sdu_sizeP);
             LOG_W(NR_RRC,
                   PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
                   "(securityModeFailure) ---> RRC_gNB\n",
@@ -2500,15 +2349,6 @@ rrc_gNB_decode_dcch(
 
         LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                 "[MSG] NR_RRC UECapablility Information\n");
-            MSC_LOG_RX_MESSAGE(
-            MSC_RRC_GNB,
-            MSC_RRC_UE,
-            Rx_sdu,
-            sdu_sizeP,
-            MSC_AS_TIME_FMT" ueCapabilityInformation UE %x size %u",
-            MSC_AS_TIME_ARGS(ctxt_pP),
-            ue_context_p->ue_context.rnti,
-            sdu_sizeP);
         LOG_I(NR_RRC,
             PROTOCOL_NR_RRC_CTXT_UE_FMT" received ueCapabilityInformation on UL-DCCH %d from UE\n",
             PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
@@ -2614,15 +2454,6 @@ rrc_gNB_decode_dcch(
             case NR_UL_DCCH_MessageType__c1_PR_rrcReestablishmentComplete:
               LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
                           "[MSG] NR_RRC Connection Reestablishment Complete\n");
-              MSC_LOG_RX_MESSAGE(
-                MSC_RRC_GNB,
-                MSC_RRC_UE,
-                Rx_sdu,
-                sdu_sizeP,
-                MSC_AS_TIME_FMT" NR_RRCConnectionReestablishmentComplete UE %x size %u",
-                MSC_AS_TIME_ARGS(ctxt_pP),
-                ue_context_p->ue_context.rnti,
-                sdu_sizeP);
               LOG_I(NR_RRC,
                     PROTOCOL_RRC_CTXT_UE_FMT" RLC RB %02d --- RLC_DATA_IND %d bytes "
                     "(rrcConnectionReestablishmentComplete) ---> RRC_gNB\n",
@@ -3426,20 +3257,20 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
   RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head)) {
     ctxt_pP->rnti = ue_context_p->ue_id_rnti;
 
-     if (fd) {
-        if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == TRUE) {
-          fprintf(fd,"NR RRC UE rnti %x: S-TMSI %x failure timer %d/8\n",
+    if (fd) {
+      if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == TRUE) {
+        fprintf(fd,"NR RRC UE rnti %x: S-TMSI %x failure timer %d/8\n",
                 ue_context_p->ue_id_rnti,
                 ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi,
                 ue_context_p->ue_context.ul_failure_timer);
-        } else {
-          fprintf(fd,"NR RRC UE rnti %x failure timer %d/8\n",
+      } else {
+        fprintf(fd,"NR RRC UE rnti %x failure timer %d/8\n",
                 ue_context_p->ue_id_rnti,
                 ue_context_p->ue_context.ul_failure_timer);
-        }
+      }
 
-        if (ue_context_p->ue_context.UE_Capability_nr) {
-          fprintf(fd,"NR RRC UE cap: BW DL %x. BW UL %x, 256 QAM DL %s, 256 QAM UL %s, DL MIMO Layers %d UL MIMO Layers (CB) %d UL MIMO Layers (nonCB) %d\n",
+      if (ue_context_p->ue_context.UE_Capability_nr) {
+        fprintf(fd,"NR RRC UE cap: BW DL %x. BW UL %x, 256 QAM DL %s, 256 QAM UL %s, DL MIMO Layers %d UL MIMO Layers (CB) %d UL MIMO Layers (nonCB) %d\n",
                 get_dl_bw_mask(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
                 get_ul_bw_mask(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
                 is_dl_256QAM_supported(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr) == 1 ? "yes" : "no",
@@ -3447,7 +3278,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
                 get_dl_mimo_layers(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
                 get_ul_mimo_layersCB(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr),
                 get_ul_mimo_layers(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr));
-        }
+      }
     }
     if (ue_context_p->ue_context.ul_failure_timer > 0) {
       ue_context_p->ue_context.ul_failure_timer++;
@@ -3508,6 +3339,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
 
   if (fd) fclose(fd);
 
+
   /* send a tick to x2ap */
   if (is_x2ap_enabled()){
     msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_SUBFRAME_PROCESS);
@@ -3641,9 +3473,6 @@ void *rrc_gnb_task(void *args_p) {
         rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(msg_p, msg_name_p, instance);
         break;
 
-      case GTPV1U_GNB_DELETE_TUNNEL_RESP:
-        break;
-
       /* Messages from gNB app */
       case NRRRC_CONFIGURATION_REQ:
         LOG_I(NR_RRC, "[gNB %ld] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p));
@@ -3693,11 +3522,6 @@ void *rrc_gnb_task(void *args_p) {
         rrc_gNB_process_dc_overall_timeout(GNB_INSTANCE_TO_MODULE_ID(instance), &X2AP_ENDC_DC_OVERALL_TIMEOUT(msg_p));
         break;
 
-      /* Messages from GTP */
-      case GTPV1U_ENB_DELETE_TUNNEL_RESP:
-        /* nothing to do? */
-        break;
-
       case NGAP_UE_CONTEXT_RELEASE_REQ:
         rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance);
         break;
@@ -3771,16 +3595,6 @@ rrc_gNB_generate_SecurityModeCommand(
         size,
         rrc_gNB_mui,
         DCCH);
-      MSC_LOG_TX_MESSAGE(
-        MSC_RRC_GNB,
-        MSC_RRC_UE,
-        buffer,
-        size,
-        MSC_AS_TIME_FMT" securityModeCommand UE %x MUI %d size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_context_pP->ue_context.rnti,
-        rrc_gNB_mui,
-        size);
 #ifdef ITTI_SIM
   MessageDef *message_p;
   uint8_t *message_buffer;
@@ -3853,16 +3667,6 @@ rrc_gNB_generate_UECapabilityEnquiry(
         size,
         rrc_gNB_mui,
         DCCH);
-      MSC_LOG_TX_MESSAGE(
-        MSC_RRC_GNB,
-        MSC_RRC_UE,
-        buffer,
-        size,
-        MSC_AS_TIME_FMT" rrcNRUECapabilityEnquiry UE %x MUI %d size %u",
-        MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_context_pP->ue_context.rnti,
-        rrc_gNB_mui,
-        size);
 #ifdef ITTI_SIM
   MessageDef *message_p;
   uint8_t *message_buffer;
@@ -3922,16 +3726,6 @@ rrc_gNB_generate_RRCRelease(
         size,
         rrc_gNB_mui,
         DCCH);
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_GNB,
-    MSC_RRC_UE,
-    buffer,
-    size,
-    MSC_AS_TIME_FMT" NR_RRCRelease UE %x MUI %d size %u",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_context.rnti,
-    rrc_gNB_mui,
-    size);
 
 #ifdef ITTI_SIM
     MessageDef *message_p;
diff --git a/openair2/RRC/NR/rrc_gNB_GTPV1U.c b/openair2/RRC/NR/rrc_gNB_GTPV1U.c
index 293f9e8b9fc787215bca85bca2452f98d7d07b14..f7b491af14f0364bf2e0726213d3984781bf7734 100644
--- a/openair2/RRC/NR/rrc_gNB_GTPV1U.c
+++ b/openair2/RRC/NR/rrc_gNB_GTPV1U.c
@@ -32,7 +32,6 @@
 # include "RRC/LTE/MESSAGES/asn1_msg.h"
 # include "rrc_eNB_GTPV1U.h"
 # include "rrc_eNB_UE_context.h"
-# include "msc.h"
 # include "openair2/RRC/NR/rrc_gNB_UE_context.h"
 
 //# if defined(ENABLE_ITTI)
@@ -77,15 +76,6 @@ rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
 	    create_tunnel_resp_pP->enb_addr.length);
     }
 
-	MSC_LOG_RX_MESSAGE(
-			  MSC_RRC_ENB,
-			  MSC_GTPU_ENB,
-			  NULL,0,
-			  MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u ebid %u enb-s1u teid %u",
-			  0,0,rnti,
-			  create_tunnel_resp_pP->num_tunnels,
-			  ue_context_p->ue_context.gnb_gtp_ebi[0],
-			  ue_context_p->ue_context.gnb_gtp_teid[0]);
         (void)rnti; /* avoid gcc warning "set but not used" */
     return 0;
   } else {
@@ -126,15 +116,6 @@ nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
             create_tunnel_resp_pP->gnb_addr.length);
     }
 
-  MSC_LOG_RX_MESSAGE(
-        MSC_RRC_GNB,
-        MSC_GTPU_GNB,
-        NULL,0,
-        MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u psid %u enb-s1u teid %u",
-        0,0,rnti,
-        create_tunnel_resp_pP->num_tunnels,
-        ue_context_p->ue_context.gnb_gtp_psi[0],
-        ue_context_p->ue_context.gnb_gtp_teid[0]);
         (void)rnti; /* avoid gcc warning "set but not used" */
     return 0;
   } else {
diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c
index 043d136604582415d6239ac67a54219a412a1e09..08f5a01986e50995440a2a502b0c0d99c1c2fffe 100644
--- a/openair2/RRC/NR/rrc_gNB_NGAP.c
+++ b/openair2/RRC/NR/rrc_gNB_NGAP.c
@@ -33,17 +33,15 @@
 #include "rrc_eNB_S1AP.h"
 #include "gnb_config.h"
 #include "common/ran_context.h"
-#include "gtpv1u.h"
 
 #include "asn1_conversions.h"
 #include "intertask_interface.h"
 #include "pdcp.h"
 #include "pdcp_primitives.h"
 
-#include "msc.h"
-
 #include "gtpv1u_eNB_task.h"
 #include "gtpv1u_gNB_task.h"
+#include <openair3/ocp-gtpu/gtp_itf.h>
 #include "RRC/LTE/rrc_eNB_GTPV1U.h"
 #include "RRC/NR/rrc_gNB_GTPV1U.h"
 
@@ -453,14 +451,6 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
       ue_context_pP->ue_context.ue_guami.amf_set_id = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_set_id;
       ue_context_pP->ue_context.ue_guami.amf_pointer = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_pointer;
 
-      MSC_LOG_TX_MESSAGE(MSC_NGAP_GNB,
-                          MSC_NGAP_AMF,
-                          (const char *)&message_p->ittiMsg.ngap_nas_first_req,
-                          sizeof(ngap_nas_first_req_t),
-                          MSC_AS_TIME_FMT" NGAP_NAS_FIRST_REQ gNB %u UE %x",
-                          MSC_AS_TIME_ARGS(ctxt_pP),
-                          ctxt_pP->module_id,
-                          ctxt_pP->rnti);
       LOG_I(NGAP, "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x\n",
             ctxt_pP->module_id,
             NGAP_NAS_FIRST_REQ (message_p).ue_identity.guami.amf_set_id,
@@ -636,16 +626,6 @@ rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(
     }
   }
 
-  MSC_LOG_TX_MESSAGE(
-    MSC_RRC_GNB,
-    MSC_S1AP_ENB,
-    (const char *)&NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p),
-    sizeof(ngap_initial_context_setup_resp_t),
-    MSC_AS_TIME_FMT" INITIAL_CONTEXT_SETUP_RESP UE %X eNB_ue_s1ap_id %u e_rabs:%u succ %u fail",
-    MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_pP->ue_id_rnti,
-    NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).gNB_ue_ngap_id,
-    pdu_sessions_done, pdu_sessions_failed);
   NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_pdusessions = pdu_sessions_done;
   NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_pdusessions_failed = pdu_sessions_failed;
   itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p);
@@ -794,15 +774,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
             gNB_ue_ngap_id);
 
     if (ue_context_p == NULL) {
-        MSC_LOG_RX_MESSAGE(
-            MSC_RRC_GNB,
-            MSC_NGAP_GNB,
-            NULL,
-            0,
-            MSC_AS_TIME_FMT" DOWNLINK-NAS UE initial id %u gNB_ue_ngap_id %u",
-            0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-            ue_initial_id,
-            gNB_ue_ngap_id);
         /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */
         MessageDef *msg_fail_p;
         LOG_W(NR_RRC, "[gNB %ld] In NGAP_DOWNLINK_NAS: unknown UE from NGAP ids (%d, %u)\n", instance, ue_initial_id, gNB_ue_ngap_id);
@@ -811,15 +782,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
         NGAP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.length = NGAP_DOWNLINK_NAS (msg_p).nas_pdu.length;
         NGAP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.buffer = NGAP_DOWNLINK_NAS (msg_p).nas_pdu.buffer;
         // TODO add failure cause when defined!
-        MSC_LOG_TX_MESSAGE(
-            MSC_RRC_ENB,
-            MSC_NGAP_GNB,
-            (const char *)NULL,
-            0,
-            MSC_AS_TIME_FMT" NGAP_NAS_NON_DELIVERY_IND UE initial id %u gNB_ue_ngap_id %u (ue ctxt !found)",
-            0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-            ue_initial_id,
-            gNB_ue_ngap_id);
         itti_send_msg_to_task (TASK_NGAP, instance, msg_fail_p);
         return (-1);
     } else {
@@ -830,15 +792,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
             ue_context_p->ue_context.gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id;
         }
 
-        MSC_LOG_RX_MESSAGE(
-            MSC_RRC_GNB,
-            MSC_NGAP_GNB,
-            (const char *)NULL,
-            0,
-            MSC_AS_TIME_FMT" DOWNLINK-NAS UE initial id %u gNB_ue_ngap_id %u",
-            0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-            ue_initial_id,
-            NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id);
         /* Create message for PDCP (DLInformationTransfer_t) */
         length = do_NR_DLInformationTransfer (
                 instance,
@@ -997,16 +950,6 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
   if ((pdu_sessions_done > 0) ) {
     LOG_I(NR_RRC,"NGAP_PDUSESSION_SETUP_RESP: sending the message: nb_of_pdusessions %d, total pdu_sessions %d, index %d\n",
           ue_context_pP->ue_context.nb_of_pdusessions, ue_context_pP->ue_context.setup_pdu_sessions, pdusession);
-    MSC_LOG_TX_MESSAGE(
-      MSC_RRC_GNB,
-      MSC_NGAP_GNB,
-      (const char *)&NGAP_PDUSESSION_SETUP_RESP (msg_p),
-      sizeof(ngap_pdusession_setup_resp_t),
-      MSC_AS_TIME_FMT" PDUSESSION_SETUP_RESP UE %X gNB_ue_ngap_id %u pdu_sessions:%u succ %u fail",
-      MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_pP->ue_id_rnti,
-      NGAP_PDUSESSION_SETUP_RESP (msg_p).gNB_ue_ngap_id,
-      pdu_sessions_done, pdu_sessions_failed);
     itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p);
   }
 
@@ -1126,12 +1069,6 @@ rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(
   if (ue_context_pP == NULL) {
     LOG_E(RRC, "[gNB] In NGAP_UE_CONTEXT_RELEASE_REQ: invalid UE\n");
   } else {
-    MSC_LOG_TX_MESSAGE(MSC_RRC_GNB,
-                       MSC_NGAP_GNB,
-                       NULL,
-                       0,
-                       "0 NGAP_UE_CONTEXT_RELEASE_REQ gNB_ue_ngap_id 0x%06"PRIX32" ",
-                       ue_context_pP->ue_context.gNB_ue_ngap_id);
     MessageDef *msg_context_release_req_p = NULL;
     msg_context_release_req_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_REQ);
     NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).gNB_ue_ngap_id    = ue_context_pP->ue_context.gNB_ue_ngap_id;
@@ -1204,14 +1141,6 @@ rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(
     LOG_W(NR_RRC, "[gNB %ld] In NGAP_UE_CONTEXT_RELEASE_COMMAND: unknown UE from gNB_ue_ngap_id (%u)\n",
           instance,
           gNB_ue_ngap_id);
-    MSC_LOG_EVENT(MSC_RRC_GNB, "0 NGAP_UE_CONTEXT_RELEASE_COMPLETE gNB_ue_ngap_id 0x%06"PRIX32" context not found",
-                  gNB_ue_ngap_id);
-    MSC_LOG_TX_MESSAGE(MSC_RRC_GNB,
-                       MSC_NGAP_GNB,
-                       NULL,
-                       0,
-                       "0 NGAP_UE_CONTEXT_RELEASE_COMPLETE gNB_ue_ngap_id 0x%06"PRIX32" ",
-                       gNB_ue_ngap_id);
     msg_complete_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE);
     NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).gNB_ue_ngap_id = gNB_ue_ngap_id;
     itti_send_msg_to_task(TASK_NGAP, instance, msg_complete_p);
@@ -1235,9 +1164,6 @@ rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(
 void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE(
   instance_t instance,
   uint32_t   gNB_ue_ngap_id) {
-  MSC_LOG_TX_MESSAGE(MSC_RRC_GNB, MSC_NGAP_GNB, NULL, 0,
-                     "0 NGAP_UE_CONTEXT_RELEASE_COMPLETE gNB_ue_ngap_id 0x%06"PRIX32" ",
-                     gNB_ue_ngap_id);
   MessageDef *msg = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE);
   NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg).gNB_ue_ngap_id = gNB_ue_ngap_id;
   itti_send_msg_to_task(TASK_NGAP, instance, msg);
@@ -1395,7 +1321,6 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(
   protocol_ctxt_t                 ctxt;
   pdusession_release_t            pdusession_release_params[NGAP_MAX_PDUSESSION];
   uint8_t                         nb_pdusessions_torelease;
-  MessageDef                     *msg_delete_tunnels_p = NULL;
   uint8_t xid;
   int i, pdusession;
   uint8_t b_existed,is_existed;
@@ -1473,20 +1398,18 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(
     } else {
       //gtp tunnel delete
       LOG_I(NR_RRC, "gtp tunnel delete \n");
-      msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_GNB, 0, GTPV1U_GNB_DELETE_TUNNEL_REQ);
-      memset(&GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
-      GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
+      gtpv1u_gnb_delete_tunnel_req_t req={0};
+      req.rnti = ue_context_p->ue_context.rnti;
 
       for(i = 0; i < NB_RB_MAX; i++) {
         if(xid == ue_context_p->ue_context.pduSession[i].xid) {
-          GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).pdusession_id[GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_pdusession++] = ue_context_p->ue_context.gnb_gtp_psi[i];
+          req.pdusession_id[req.num_pdusession++] = ue_context_p->ue_context.gnb_gtp_psi[i];
           ue_context_p->ue_context.gnb_gtp_teid[i] = 0;
           memset(&ue_context_p->ue_context.gnb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.gnb_gtp_addrs[i]));
           ue_context_p->ue_context.gnb_gtp_psi[i]  = 0;
         }
       }
-
-      itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p);
+      gtpv1u_delete_ngu_tunnel(instance, &req);
       //NGAP_PDUSESSION_RELEASE_RESPONSE
       rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid);
       LOG_I(NR_RRC, "Send PDU Session Release Response \n");
diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.c b/openair2/RRC/NR/rrc_gNB_UE_context.c
index ad8bd01470e31800da49f196b828197d28a07064..b8ff19b749e93e95428d72954b03d1ab58d93f87 100644
--- a/openair2/RRC/NR/rrc_gNB_UE_context.c
+++ b/openair2/RRC/NR/rrc_gNB_UE_context.c
@@ -35,7 +35,6 @@
 
 #include "common/utils/LOG/log.h"
 #include "rrc_gNB_UE_context.h"
-#include "msc.h"
 
 
 //------------------------------------------------------------------------------
@@ -208,10 +207,6 @@ void rrc_gNB_remove_ue_context(
   }
 
   RB_REMOVE(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
-  MSC_LOG_EVENT(
-    MSC_RRC_ENB,
-    "0 Removed UE %"PRIx16" ",
-    ue_context_pP->ue_context.rnti);
   rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_pP);
   nr_uid_linear_allocator_free(rrc_instance_pP, ue_context_pP->local_uid);
   free(ue_context_pP);
diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c
index ee8f5c7b3afbf79b2ebc5c07a75d8d43d1ddac2b..939b35f3f28246bdf3f7d968c8737f072ecf1ce8 100644
--- a/openair2/RRC/NR/rrc_gNB_nsa.c
+++ b/openair2/RRC/NR/rrc_gNB_nsa.c
@@ -177,7 +177,6 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
   ue_context_p->ue_context.reconfig->criticalExtensions.present = NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration;
   NR_RRCReconfiguration_IEs_t *reconfig_ies=calloc(1,sizeof(NR_RRCReconfiguration_IEs_t));
   ue_context_p->ue_context.reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies;
-  carrier->initial_csi_index[ue_context_p->local_uid + 1] = 0;
   ue_context_p->ue_context.rb_config = calloc(1,sizeof(NR_RRCReconfiguration_t));
   if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1 || get_softmodem_params()->sa == 1){
     fill_default_rbconfig(ue_context_p->ue_context.rb_config,
@@ -270,7 +269,6 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
                           carrier->minRXTXTIME,
                           carrier->do_CSIRS,
                           carrier->do_SRS,
-                          carrier->initial_csi_index[ue_context_p->local_uid + 1],
                           ue_context_p->local_uid);
   } else {
     fill_default_reconfig(carrier->servingcellconfigcommon,
@@ -281,7 +279,6 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
                           carrier->minRXTXTIME,
                           carrier->do_CSIRS,
                           carrier->do_SRS,
-                          carrier->initial_csi_index[ue_context_p->local_uid + 1],
                           ue_context_p->local_uid);
   }
   ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity;
diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c
index 3a28409aea6ddaa0681fdb9bf44e3e0abf817aaf..b4938404bd5b51853f3777907d33d51d85173d66 100644
--- a/openair2/RRC/NR/rrc_gNB_reconfig.c
+++ b/openair2/RRC/NR/rrc_gNB_reconfig.c
@@ -58,8 +58,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
                                      int minRXTXTIME,
                                      int do_csirs,
                                      int do_srs,
-                                     int initial_csi_index,
                                      int uid) {
+
   AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
   AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
 
@@ -560,7 +560,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
  }
  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dataScramblingIdentityPDSCH = NULL;
 
- if (dl_antenna_ports > 1)// for MIMO, we use DMRS Config Type 2
+ if ((get_softmodem_params()->do_ra ||
+     get_softmodem_params()->phy_test) &&
+     dl_antenna_ports > 1) // for MIMO, we use DMRS Config Type 2 but only with OAI UE
    bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type));
  else
    bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL;
@@ -1056,7 +1058,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
  pdsch_servingcellconfig->pucch_Cell= NULL;
  pdsch_servingcellconfig->ext1=calloc(1,sizeof(*pdsch_servingcellconfig->ext1));
  pdsch_servingcellconfig->ext1->maxMIMO_Layers = calloc(1,sizeof(*pdsch_servingcellconfig->ext1->maxMIMO_Layers));
- *pdsch_servingcellconfig->ext1->maxMIMO_Layers = 2;
+ *pdsch_servingcellconfig->ext1->maxMIMO_Layers = dl_antenna_ports;
  pdsch_servingcellconfig->ext1->processingType2Enabled = NULL;
  
  secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig=NULL;
@@ -1077,7 +1079,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
    imres0->csi_IM_ResourceElementPattern->choice.pattern1->symbolLocation_p1 = 6;
    imres0->freqBand = calloc(1,sizeof(*imres0->freqBand));
    imres0->freqBand->startingRB = 0;
-   imres0->freqBand->nrofRBs = 108;
+   imres0->freqBand->nrofRBs = ((curr_bwp>>2)+(curr_bwp%4>0))<<2;
    imres0->periodicityAndOffset = calloc(1,sizeof(*imres0->periodicityAndOffset));
    imres0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots320;
    imres0->periodicityAndOffset->choice.slots320 = 0;
@@ -1096,7 +1098,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
  }
 
  csi_MeasConfig->csi_IM_ResourceToReleaseList = NULL;
- csi_MeasConfig->csi_IM_ResourceSetToAddModList = NULL;
  csi_MeasConfig->csi_IM_ResourceSetToReleaseList = NULL;
 
  if (do_csirs) {
@@ -1116,7 +1117,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
 
  csi_MeasConfig->nzp_CSI_RS_ResourceSetToReleaseList = NULL;
 
- config_csirs(servingcellconfigcommon, csi_MeasConfig,dl_antenna_ports,do_csirs);
+ config_csirs(servingcellconfigcommon, csi_MeasConfig,dl_antenna_ports,curr_bwp,do_csirs);
 
  csi_MeasConfig->csi_SSB_ResourceSetToAddModList = calloc(1,sizeof(*csi_MeasConfig->csi_SSB_ResourceSetToAddModList));
  csi_MeasConfig->csi_SSB_ResourceSetToReleaseList = NULL;
@@ -1171,6 +1172,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
    NR_CSI_IM_ResourceSetId_t *csiim00 = calloc(1,sizeof(*csiim00));
    *csiim00 = 0;
    ASN_SEQUENCE_ADD(&csires2->csi_RS_ResourceSetList.choice.csi_IM_ResourceSetList->list,csiim00);
+   csires2->bwp_Id = 1;
+   csires2->resourceType = NR_CSI_ResourceConfig__resourceType_periodic;
    ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires2);
  }
 
@@ -1315,7 +1318,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
 }
 
 
-void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_CSI_MeasConfig_t *csi_MeasConfig, int dl_antenna_ports, int do_csirs) {
+void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
+                  NR_CSI_MeasConfig_t *csi_MeasConfig,
+                  int dl_antenna_ports,
+                  int curr_bwp,
+                  int do_csirs) {
 
  if (do_csirs) {
    csi_MeasConfig->nzp_CSI_RS_ResourceToAddModList = calloc(1,sizeof(*csi_MeasConfig->nzp_CSI_RS_ResourceToAddModList));
@@ -1350,7 +1357,7 @@ void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_CSI_
    resourceMapping.density.present = NR_CSI_RS_ResourceMapping__density_PR_one;
    resourceMapping.density.choice.one = (NULL_t)0;
    resourceMapping.freqBand.startingRB = 0;
-   resourceMapping.freqBand.nrofRBs = 108;
+   resourceMapping.freqBand.nrofRBs = ((curr_bwp>>2)+(curr_bwp%4>0))<<2;
    nzpcsi0->resourceMapping = resourceMapping;
    nzpcsi0->powerControlOffset = 0;
    nzpcsi0->powerControlOffsetSS=calloc(1,sizeof(*nzpcsi0->powerControlOffsetSS));
@@ -1375,7 +1382,6 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
                            int minRXTXTIME,
                            int do_csirs,
                            int do_srs,
-                           int initial_csi_index,
                            int uid) {
   AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
   AssertFatal(reconfig!=NULL,"reconfig is null\n");
@@ -1392,7 +1398,6 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
                                   minRXTXTIME,
                                   do_csirs,
                                   do_srs,
-                                  initial_csi_index,
                                   uid);
 
   xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c
index f910ff68d45fcfc1616ed31c92d408676baaa2ea..2fa058307492cb3782f4682e920a21e185a6e317 100644
--- a/openair2/RRC/NR_UE/rrc_UE.c
+++ b/openair2/RRC/NR_UE/rrc_UE.c
@@ -2164,17 +2164,6 @@ nr_rrc_ue_establish_srb2(
      nr_derive_key_up_int(NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm,
                           NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kUPint);
 
-     MSC_LOG_TX_MESSAGE(
-	 MSC_RRC_UE,
-	 MSC_PDCP_UE,
-	 NULL,
-	 0,
-	 MSC_AS_TIME_FMT" CONFIG_REQ UE %x DRB (security %X)",
-	 MSC_AS_TIME_ARGS(ctxt_pP),
-	 ctxt_pP->rnti,
-	 NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm |
-	 (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4));
-
        // Refresh DRBs
         nr_rrc_pdcp_config_asn1_req(ctxt_pP,
                                     NULL,
diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c
index 28de1ca3b83823a5b8f9e1da13e0fe9b808d10e6..a6ac444e45ba11bb458715aadcf6d69d8be60798 100644
--- a/openair2/SIMULATION/NR_RRC/itti_sim.c
+++ b/openair2/SIMULATION/NR_RRC/itti_sim.c
@@ -36,8 +36,6 @@
 #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
 #include <common/utils/assertions.h>
 
-#include "msc.h"
-
 #include "common/ran_context.h"
 
 #include "common/config/config_userapi.h"
@@ -572,9 +570,6 @@ int main( int argc, char **argv )
 
   cpuf=get_cpu_freq_GHz();
   itti_init(TASK_MAX, tasks_info);
-  // initialize mscgen log after ITTI
-  MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
-
 
   init_opt();
 
diff --git a/openair2/UTIL/MATH/crc_byte.c b/openair2/UTIL/MATH/crc_byte.c
deleted file mode 100644
index a3ff00fec19725498bc461270f3d20f6e03a2fff..0000000000000000000000000000000000000000
--- a/openair2/UTIL/MATH/crc_byte.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*
-  May 10, 2001
-  Modified in June, 2001, to include  the length non multiple of 8
-  crc_byte.c
-  Byte oriented implementation of CRC's
-
-  */
-#include "rtos_header.h"
-#include "platform_types.h"
-
-
-/*ref 25.222 v4.0.0 , p12 */
-/* the highest degree is set by default */
-unsigned int             poly24 = 0x80006100;    // 1000 0000 0000 0000 0110 0001  D^24 + D^23 + D^6 + D^5 + D + 1
-unsigned int             poly16 = 0x10210000;    // 0001 0000 0010 0001            D^16 + D^12 + D^5 + 1
-unsigned int             poly12 = 0x80F00000;    // 1000 0000 1111                 D^12 + D^11 + D^3 + D^2 + D + 1
-unsigned int             poly8 = 0x9B000000;     // 1001 1011                      D^8  + D^7  + D^4 + D^3 + D + 1
-/*********************************************************
-
-For initialization && verification purposes,
-   bit by bit implementation with any polynomial
-
-The first bit is in the MSB of each byte
-
-*********************************************************/
-static          unsigned int
-crcbit (unsigned char * inputptr, int octetlen, unsigned int poly)
-{
-  unsigned int             i, crc = 0, c;
-
-  while (octetlen-- > 0) {
-    c = (*inputptr++) << 24;
-
-    for (i = 8; i != 0; i--) {
-      if ((1 << 31) & (c ^ crc))
-        crc = (crc << 1) ^ poly;
-      else
-        crc <<= 1;
-
-      c <<= 1;
-    }
-  }
-
-  return crc;
-}
-
-/*********************************************************
-
-crc table initialization
-
-*********************************************************/
-static unsigned int      crc24Table[256];
-static unsigned short      crc16Table[256];
-static unsigned short      crc12Table[256];
-static unsigned char       crc8Table[256];
-void
-crcTableInit ()
-{
-  unsigned char              c = 0;
-
-  do {
-    crc24Table[c] = crcbit (&c, 1, poly24);
-    crc16Table[c] = (unsigned short) (crcbit (&c, 1, poly16) >> 16);
-    crc12Table[c] = (unsigned short) (crcbit (&c, 1, poly12) >> 16);
-    crc8Table[c] = (unsigned char) (crcbit (&c, 1, poly8) >> 24);
-  } while (++c);
-}
-
-/*********************************************************
-
-Byte by byte implementations,
-assuming initial byte is 0 padded (in MSB) if necessary
-
-*********************************************************/
-unsigned int
-crc24 (unsigned char * inptr, int bitlen)
-{
-
-  int             octetlen, resbit;
-  unsigned int             crc = 0;
-  octetlen = bitlen / 8;        /* Change in octets */
-  resbit = (bitlen % 8);
-
-  while (octetlen-- > 0) {
-    crc = (crc << 8) ^ crc24Table[(*inptr++) ^ (crc >> 24)];
-  }
-
-  if (resbit > 0)
-    crc = (crc << resbit) ^ crc24Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
-
-  return crc;
-}
-
-unsigned int
-crc16 (unsigned char * inptr, int bitlen)
-{
-  int             octetlen, resbit;
-  unsigned int             crc = 0;
-  octetlen = bitlen / 8;        /* Change in octets */
-  resbit = (bitlen % 8);
-
-  while (octetlen-- > 0) {
-    crc = (crc << 8) ^ (crc16Table[(*inptr++) ^ (crc >> 24)] << 16);
-  }
-
-  if (resbit > 0)
-    crc = (crc << resbit) ^ (crc16Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16);
-
-  return crc;
-}
-
-unsigned int
-crc12 (unsigned char * inptr, int bitlen)
-{
-  int             octetlen, resbit;
-  unsigned int             crc = 0;
-  octetlen = bitlen / 8;        /* Change in octets */
-  resbit = (bitlen % 8);
-
-  while (octetlen-- > 0) {
-    crc = (crc << 8) ^ (crc12Table[(*inptr++) ^ (crc >> 24)] << 16);
-  }
-
-  if (resbit > 0)
-    crc = (crc << resbit) ^ (crc12Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16);
-
-  return crc;
-}
-
-unsigned int
-crc8 (unsigned char * inptr, int bitlen)
-{
-  int             octetlen, resbit;
-  unsigned int             crc = 0;
-  octetlen = bitlen / 8;        /* Change in octets */
-  resbit = (bitlen % 8);
-
-  while (octetlen-- > 0) {
-    crc = crc8Table[(*inptr++) ^ (crc >> 24)] << 24;
-  }
-
-  if (resbit > 0)
-    crc = (crc << resbit) ^ (crc8Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 24);
-
-  return crc;
-}
-
-/*******************************************************************/
-/**
-   Test code
-********************************************************************/
-
-/* #ifdef MAIN
-   #include <stdio.h>
-   main()
-   {
-   unsigned char test[] = "Thebigredfox";
-   crcTableInit();
-   printf("%x\n", crcbit(test, sizeof(test) - 1, poly24));
-   printf("%x\n", crc24(test, (sizeof(test) - 1)*8));
-   printf("%x\n", crcbit(test, sizeof(test) - 1, poly8));
-   printf("%x\n", crc8(test, (sizeof(test) - 1)*8));
-   }
-   #endif */
diff --git a/openair2/UTIL/MATH/random_proto_extern.h b/openair2/UTIL/MATH/random_proto_extern.h
deleted file mode 100644
index 45db5652172af569ec6838651c653e4aabca9720..0000000000000000000000000000000000000000
--- a/openair2/UTIL/MATH/random_proto_extern.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*
-
-                             random_proto_extern.h
-                             -------------------
-  AUTHOR  : Lionel GAUTHIER
-  COMPANY : EURECOM
-  EMAIL   : Lionel.Gauthier@eurecom.fr
- ***************************************************************************/
-extern int      uniform (void);
diff --git a/openair2/UTIL/MATH/taus.c b/openair2/UTIL/MATH/taus.c
deleted file mode 100644
index 6b5e03588dd2fc7cdb51edb49b659cef2969bea1..0000000000000000000000000000000000000000
--- a/openair2/UTIL/MATH/taus.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file taus.c
-* \brief random number generator per OAI component
-* \author Navid Nikaein
-* \date 2011 - 2014
-* \version 0.1
-* \email navid.nikaein@eurecom.fr
-* \warning
-* @ingroup util
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <math.h>
-#include "oml.h"
-
-unsigned int s0[MAX_NUM_COMPS], s1[MAX_NUM_COMPS], s2[MAX_NUM_COMPS], b[MAX_NUM_COMPS], r[MAX_NUM_COMPS];
-
-
-
-
-inline unsigned int taus(unsigned int comp) {
-  b[comp] = (((s0[comp] << 13) ^ s0[comp]) >> 19);
-  s0[comp] = (((s0[comp] & 0xFFFFFFFE) << 12)^  b[comp]);
-  b[comp] = (((s1[comp] << 2) ^ s1[comp]) >> 25);
-  s1[comp] = (((s1[comp] & 0xFFFFFFF8) << 4)^  b[comp]);
-  b[comp] = (((s2[comp] << 3) ^ s2[comp]) >> 11);
-  s2[comp] = (((s2[comp] & 0xFFFFFFF0) << 17)^  b[comp]);
-  r[comp] = s0[comp] ^ s1[comp] ^ s2[comp];
-  return r[comp];
-}
-
-/*void set_taus_seed(unsigned int seed_type) {
-  unsigned int i; // i index of component
-
-  for (i=MIN_NUM_COMPS; i < MAX_NUM_COMPS  ; i ++)  {
-    switch (seed_type) {
-      case 0: // use rand func
-        if (i == 0) srand(time(NULL));
-
-        s0[i] = ((unsigned int)rand());
-        s1[i] = ((unsigned int)rand());
-        s2[i] = ((unsigned int)rand());
-        printf("Initial seeds use rand: s0[%u] = 0x%x, s1[%u] = 0x%x, s2[%u] = 0x%x\n", i, s0[i], i, s1[i], i, s2[i]);
-        break;
-
-      case 1: // use rand with seed
-        if (i == 0) srand(0x1e23d851);
-
-        s0[i] = ((unsigned int)rand());
-        s1[i] = ((unsigned int)rand());
-        s2[i] = ((unsigned int)rand());
-        printf("Initial seeds use rand with seed : s0[%u] = 0x%x, s1[%u] = 0x%x, s2[%u] = 0x%x\n", i, s0[i], i, s1[i], i, s2[i]);
-        break;
-
-      default:
-        break;
-    }
-  }
-}*/
-
-int get_rand (unsigned int comp) {
-  if ((comp > MIN_NUM_COMPS) && (comp < MAX_NUM_COMPS))
-    return r[comp];
-  else {
-    //LOG_E(RNG,"unknown component %d\n",comp);
-    return -1;
-  }
-}
-
-unsigned int dtaus(unsigned int comp, unsigned int a, unsigned b) {
-  return (int) (((double)taus(comp)/(double)0xffffffff)* (double)(b-a) + (double)a);
-}
-/*
-#ifdef STANDALONE
-main() {
-
-  unsigned int i,randomg, randphy;
-
-  set_taus_seed(0);
-  printf("dtaus %d \n",dtaus(PHY, 1000, 1000000));
-
-  do {//for (i=0;i<10;i++){
-    randphy = taus(PHY);
-    randomg = taus(OTG);
-    i++;
-    // printf("rand for OMG (%d,0x%x) PHY (%d,0x%x)\n",OMG, randomg, PHY, randphy);
-  } while (randphy != randomg);
-  printf("after %d run: get rand for (OMG 0x%x, PHY 0x%x)\n",i, get_rand(OTG), get_rand(PHY));
-
-}
-#endif
-
-*/
diff --git a/openair2/X2AP/x2ap_eNB_generate_messages.c b/openair2/X2AP/x2ap_eNB_generate_messages.c
index 9724e0cc381b0435256fb69f5fd3120631ee6640..be5ab82740566e3a73249df6fdafcb6607219318 100644
--- a/openair2/X2AP/x2ap_eNB_generate_messages.c
+++ b/openair2/X2AP/x2ap_eNB_generate_messages.c
@@ -40,7 +40,6 @@
 
 #include "x2ap_eNB_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -260,8 +259,6 @@ int x2ap_eNB_generate_x2_setup_request(
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -486,8 +483,6 @@ int x2ap_eNB_generate_x2_setup_response(x2ap_eNB_instance_t *instance_p, x2ap_eN
 
   x2ap_eNB_data_p->state = X2AP_ENB_STATE_READY;
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/successfulOutcome assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -542,11 +537,6 @@ int x2ap_eNB_generate_x2_setup_failure(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB,
-                      MSC_X2AP_TARGET_ENB, NULL, 0,
-                      "0 X2Setup/unsuccessfulOutcome  assoc_id %u cause %u value %u",
-                      assoc_id, cause_type, cause_value);
-
   x2ap_eNB_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
 
   return ret;
@@ -732,8 +722,6 @@ int x2ap_eNB_generate_x2_handover_request (x2ap_eNB_instance_t *instance_p, x2ap
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 1);
 
   return ret;
@@ -846,8 +834,6 @@ int x2ap_eNB_generate_x2_handover_request_ack (x2ap_eNB_instance_t *instance_p,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 1);
 
   return ret;
@@ -908,8 +894,6 @@ int x2ap_eNB_generate_x2_ue_context_release (x2ap_eNB_instance_t *instance_p, x2
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 1);
 
   return ret;
@@ -992,8 +976,6 @@ int x2ap_eNB_generate_x2_handover_cancel (x2ap_eNB_instance_t *instance_p, x2ap_
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 1);
 
   return ret;
@@ -1090,8 +1072,6 @@ int x2ap_eNB_generate_senb_addition_request (x2ap_eNB_instance_t *instance_p, x2
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2SeNBAdditionRequest/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 1);
 
   return ret;
@@ -1367,8 +1347,6 @@ MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -1578,8 +1556,6 @@ int x2ap_eNB_generate_ENDC_x2_setup_response(
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
   x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -1737,8 +1713,6 @@ int x2ap_eNB_generate_ENDC_x2_SgNB_addition_request(
     # if 0 // TODO: Sanitizer complains we are trying to access this after free.
 	free(ie->value.choice.MeNBtoSgNBContainer.buf);
     #endif
-    MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
     x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
 	return ret;
@@ -1844,8 +1818,6 @@ int x2ap_gNB_generate_ENDC_x2_SgNB_addition_request_ACK( x2ap_eNB_instance_t *in
 	        return -1;
 	    }
 
-	    MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id);
-
 	    x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
 		return ret;
diff --git a/openair2/X2AP/x2ap_eNB_handler.c b/openair2/X2AP/x2ap_eNB_handler.c
index f71229f066115a024958687ae61b455ca04f816d..f70cd632aa6532d97d755098c4f675d1e749fc04 100644
--- a/openair2/X2AP/x2ap_eNB_handler.c
+++ b/openair2/X2AP/x2ap_eNB_handler.c
@@ -41,7 +41,6 @@
 #include "x2ap_eNB_management_procedures.h"
 #include "x2ap_eNB_generate_messages.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 #include "X2AP_FreqBandNrItem.h"
diff --git a/openair3/GTPV1-U/Makefile.am b/openair3/GTPV1-U/Makefile.am
deleted file mode 100644
index 30ea61d6c17508e90f0fa7d9f49acc4988ef1c6f..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-#/*
-# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
-# * contributor license agreements.  See the NOTICE file distributed with
-# * this work for additional information regarding copyright ownership.
-# * The OpenAirInterface Software Alliance licenses this file to You under
-# * the OAI Public License, Version 1.1  (the "License"); you may not use this file
-# * except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# *      http://www.openairinterface.org/?page_id=698
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# *-------------------------------------------------------------------------------
-# * For more information about the OpenAirInterface (OAI) Software Alliance:
-# *      contact@openairinterface.org
-# */
-
-AM_CFLAGS = @ADD_CFLAGS@ 	\
-	-I$(top_srcdir)/COMMON	\
-	-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network		\
-	-I$(top_srcdir)/NAS/EURECOM-NAS/src/include			\
-	-I$(top_srcdir)/NAS/EURECOM-NAS/src/ies				\
-	-I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg			\
-	-I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg			\
-	-I$(top_srcdir)/NAS/EURECOM-NAS/src/util			\
-	-I$(top_srcdir)/INTERTASK_INTERFACE	\
-	-I$(top_srcdir)/GTPV1-U/nw-gtpv1u/include	\
-	-I$(top_srcdir)/GTPV1-U/nw-gtpv1u/shared	\
-    -I$(top_srcdir)/UTILS   \
-    -I$(top_srcdir)/UTILS/HASHTABLE   \
-	-I$(top_srcdir)/UTILS/TIMER
-
-noinst_LTLIBRARIES = libgtpv1u.la
-
-libgtpv1u_la_LDFLAGS = -all-static
-
-libgtpv1u_la_SOURCES = \
-	gtpv1u_task.c	gtpv1u.h	\
-	gtpv1u_teid_pool.c	\
-	nw-gtpv1u/shared/NwTypes.h	\
-	nw-gtpv1u/shared/NwUtils.h	\
-	nw-gtpv1u/shared/NwGtpv1uError.h	\
-	nw-gtpv1u/shared/NwLog.h		\
-	nw-gtpv1u/shared/NwGtpv1uIe.h	\
-	nw-gtpv1u/shared/NwGtpv1uMsg.h	\
-	nw-gtpv1u/shared/NwGtpv1u.h	\
-	nw-gtpv1u/include/NwGtpv1uPrivate.h	\
-	nw-gtpv1u/include/NwGtpv1uLog.h	\
-	nw-gtpv1u/include/NwGtpv1uTrxn.h	\
-	nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h	\
-	nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c	\
-	nw-gtpv1u/src/NwGtpv1uTrxn.c	\
-	nw-gtpv1u/src/NwGtpv1uMsg.c	\
-	nw-gtpv1u/src/NwGtpv1u.c
diff --git a/openair3/GTPV1-U/Makefile.eNB b/openair3/GTPV1-U/Makefile.eNB
deleted file mode 100644
index b469dc756d0d453c71fd13ebcfa59fdb5f6d3a81..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/Makefile.eNB
+++ /dev/null
@@ -1,67 +0,0 @@
-#/*
-# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
-# * contributor license agreements.  See the NOTICE file distributed with
-# * this work for additional information regarding copyright ownership.
-# * The OpenAirInterface Software Alliance licenses this file to You under
-# * the OAI Public License, Version 1.1  (the "License"); you may not use this file
-# * except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# *      http://www.openairinterface.org/?page_id=698
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# *-------------------------------------------------------------------------------
-# * For more information about the OpenAirInterface (OAI) Software Alliance:
-# *      contact@openairinterface.org
-# */
-
-OUTDIR = .
-
-libgtpv1u_OBJECTS = \
-	nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.o	\
-	nw-gtpv1u/src/NwGtpv1uTrxn.o 	\
-	nw-gtpv1u/src/NwGtpv1uMsg.o 	\
-	nw-gtpv1u/src/NwGtpv1u.o 	\
-	gtpv1u_eNB.o	\
-	gtpv1u_teid_pool.o
-
-# pull in dependency info for *existing* .o files
--include $(OUTDIR)/*.d
-
-CFLAGS = \
-	-Wall			\
-	$(GTPV1U_CFLAGS)		\
-	-DENB_MODE		\
-	-Werror=uninitialized	\
-	-Werror=implicit-function-declaration
-
-$(OUTDIR)/%.o : %.c
-	@echo "Compiling $<"
-	@if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
-	@$(CC) -c $(CFLAGS) -o $@ $<
-	@$(CC) -MM $(CFLAGS) $< > $(basename $@).d
-	@mv -f $(basename $@).d $(basename $@).d.tmp
-	@sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d
-	@sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \
-	sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d
-	@rm -f $(basename $@).d.tmp
-
-objsdir:
-	@if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi;
-
-$(OUTDIR)/libgtpv1u.a: $(addprefix $(OUTDIR)/,$(libgtpv1u_OBJECTS))
-	@echo Creating GTPV1U archive
-	@$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libgtpv1u_OBJECTS))
-
-clean:
-	@$(RM_F_V) $(OUTDIR)/nw-gtpv1u/src/*.o
-	@$(RM_F_V) $(OUTDIR)/nw-gtpv1u/src/*.d
-	@$(RM_F_V) $(OUTDIR)/*.o
-	@$(RM_F_V) $(OUTDIR)/*.d
-	@$(RM_F_V) $(OUTDIR)/libgtpv1u.a
-
-cleanall: clean
diff --git a/openair3/GTPV1-U/gtpv1u.h b/openair3/GTPV1-U/gtpv1u.h
deleted file mode 100644
index 9466f024bc0ce1c2131de57ae4a2e2282136d7bd..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file gtpv1u.h
-* \brief
-* \author Sebastien ROUX, Lionel Gauthier
-* \company Eurecom
-* \email: lionel.gauthier@eurecom.fr
-*/
-
-#ifndef GTPV1_U_H_
-#define GTPV1_U_H_
-
-#define GTPU_STACK_ENB 0
-#define GTPU_STACK_SGW 1
-
-/* When gtpv1u is compiled for eNB use MACRO from UTILS/log.h,
- * otherwise use standard fprintf as logger.
- */
-#if defined(ENB_MODE)
-# define GTPU_DEBUG(x, args...)   LOG_D(GTPU, x, ##args)
-# define GTPU_INFO(x, args...)    LOG_I(GTPU, x, ##args)
-# define GTPU_WARNING(x, args...) LOG_W(GTPU, x, ##args)
-# define GTPU_ERROR(x, args...)   LOG_E(GTPU, x, ##args)
-#else
-# define GTPU_DEBUG(x, args...)   fprintf(stdout, "[GTPU][D]"x, ##args)
-# define GTPU_INFO(x, args...)    fprintf(stdout, "[GTPU][I]"x, ##args)
-# define GTPU_WARNING(x, args...) fprintf(stdout, "[GTPU][W]"x, ##args)
-# define GTPU_ERROR(x, args...)   fprintf(stderr, "[GTPU][E]"x, ##args)
-#endif
-
-//#warning "TO BE REFINED"
-# define GTPU_HEADER_OVERHEAD_MAX 64
-
-uint32_t gtpv1u_new_teid(void);
-
-#endif /* GTPV1_U_H_ */
diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c
deleted file mode 100644
index 6f5ef004b5936d727afedb62635b392935044099..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u_eNB.c
+++ /dev/null
@@ -1,1600 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file gtpv1u_eNB.c
- * \brief
- * \author Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
- * \version 1.0
- * \company Eurecom
- * \email: lionel.gauthier@eurecom.fr
- */
-#include <stdio.h>
-#include <errno.h>
-
-#include "mme_config.h"
-
-#include "assertions.h"
-#include "intertask_interface.h"
-#include "msc.h"
-
-#include "gtpv1u.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uMsg.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwLog.h"
-#include "gtpv1u_eNB_defs.h"
-#include "gtpv1_u_messages_types.h"
-#include "udp_eNB_task.h"
-#include "common/utils/LOG/log.h"
-#include "COMMON/platform_types.h"
-#include "COMMON/platform_constants.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-#include "common/ran_context.h"
-#include "gtpv1u_eNB_defs.h"
-#include "gtpv1u_eNB_task.h"
-#include "rrc_eNB_GTPV1U.h"
-#include <common/utils/msc/msc.h>
-
-#undef GTP_DUMP_SOCKET
-
-extern unsigned char NB_eNB_INST;
-extern RAN_CONTEXT_t RC;
-
-extern struct rrc_eNB_ue_context_s *
-rrc_eNB_get_ue_context(
-  eNB_RRC_INST *rrc_instance_pP,
-  rnti_t rntiP);
-
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-#include <linux/if.h>
-static int           gtpv1u_dump_socket_g;
-
-//-----------------------------------------------------------------------------
-int gtpv1u_eNB_create_dump_socket(void) {
-  struct ifreq ifr;
-  int          hdrincl=1;
-
-  if ((gtpv1u_dump_socket_g = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0 ) {
-    LOG_E(GTPU, "Could not create dump socket %d:%s\n", errno, strerror(errno));
-    return -1;
-  }
-
-  if (setsockopt(gtpv1u_dump_socket_g,
-                 IPPROTO_IP,
-                 IP_HDRINCL,
-                 &hdrincl,
-                 sizeof(hdrincl))==-1) {
-    LOG_E(GTPU, "%s:%d set IP_HDRINCL %d:%s\n",
-          __FILE__, __LINE__, errno, strerror(errno));
-  }
-
-  memset(&ifr, 0, sizeof(ifr));
-  snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "lo");
-
-  if (setsockopt(gtpv1u_dump_socket_g, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)) < 0) {
-    LOG_E(GTPU, "%s:%d  setsockopt SO_BINDTODEVICE %d:%s\n",
-          __FILE__, __LINE__, errno, strerror(errno));
-    close(gtpv1u_dump_socket_g);
-    return -1;
-  }
-}
-
-//-----------------------------------------------------------------------------
-static void gtpv1u_eNB_write_dump_socket(uint8_t *buffer_pP, uint32_t buffer_lengthP) {
-  struct sockaddr_in sin;
-  memset(&sin, 0, sizeof(sin));
-  sin.sin_family = AF_INET;
-  sin.sin_addr.s_addr = INADDR_LOOPBACK;
-
-  if (sendto(gtpv1u_dump_socket_g, buffer_pP, (size_t)buffer_lengthP, 0, (struct sockaddr *)&sin, sizeof(struct sockaddr)) < 0)  {
-    LOG_E(GTPU, "%s:%s:%d  sendto %d:%s\n",
-          __FILE__, __FUNCTION__, __LINE__, errno, strerror(errno));
-  }
-}
-
-#endif
-
-//-----------------------------------------------------------------------------
-static int gtpv1u_eNB_get_msgsource(struct rrc_eNB_ue_context_s *ue_context_p, teid_t teid) {
-  int erab_index = 0;
-
-  /* source enb */
-  if(ue_context_p->ue_context.handover_info != NULL && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
-    return GTPV1U_MSG_FROM_SPGW;
-  }
-
-  /* target enb */
-  for (erab_index = 0; erab_index < ue_context_p->ue_context.nb_x2u_e_rabs; erab_index++) {
-    if(ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index] == teid) {
-      return GTPV1U_MSG_FROM_SOURCE_ENB;
-    }
-  }
-
-  return GTPV1U_MSG_FROM_SPGW;
-}
-
-//-----------------------------------------------------------------------------
-static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) {
-  // Create and alloc new message
-  MessageDef *message_p;
-  struct in_addr addr= {0};
-  message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT);
-
-  if (message_p == NULL) {
-    return -1;
-  }
-
-  UDP_INIT(message_p).port = req->enb_port_for_S1u_S12_S4_up;
-  addr.s_addr = req->enb_ip_address_for_S1u_S12_S4_up;
-  UDP_INIT(message_p).address = inet_ntoa(addr);
-  LOG_I(GTPU, "Tx UDP_INIT IP addr %s (%x)\n", UDP_INIT(message_p).address,UDP_INIT(message_p).port);
-  MSC_LOG_EVENT(
-    MSC_GTPU_ENB,
-    "0 UDP bind  %s:%u",
-    UDP_INIT(message_p).address,
-    UDP_INIT(message_p).port);
-  return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
-}
-
-static int gtpv1u_s1_req(
-  const instance_t                             instanceP,
-  const Gtpv1uS1Req *const req) {
-  memcpy(&RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up,
-         &req->enb_ip_address_for_S1u_S12_S4_up,
-         sizeof (req->enb_ip_address_for_S1u_S12_S4_up));
-  gtpv1u_eNB_send_init_udp(req);
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
-                                   uint32_t logLevel,
-                                   NwCharT *file,
-                                   uint32_t line,
-                                   NwCharT *logStr) {
-  LOG_D(GTPU, "%s\n", logStr);
-  return NW_GTPV1U_OK;
-}
-
-//-----------------------------------------------------------------------------
-NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
-  NwGtpv1uUdpHandleT udpHandle,
-  uint8_t *buffer,
-  uint32_t buffer_len,
-  uint32_t buffer_offset,
-  uint32_t peerIpAddr,
-  uint16_t peerPort) {
-  // Create and alloc new message
-  MessageDef     *message_p       = NULL;
-  udp_data_req_t *udp_data_req_p  = NULL;
-  message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_DATA_REQ);
-
-  if (message_p) {
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-    LOG_D(GTPU, "Sending UDP_DATA_REQ length %u offset %u", buffer_len, buffer_offset);
-#endif
-    udp_data_req_p = &message_p->ittiMsg.udp_data_req;
-    udp_data_req_p->peer_address  = peerIpAddr;
-    udp_data_req_p->peer_port     = peerPort;
-    udp_data_req_p->buffer        = buffer;
-    udp_data_req_p->buffer_length = buffer_len;
-    udp_data_req_p->buffer_offset = buffer_offset;
-    return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
-  } else {
-    return NW_GTPV1U_FAILURE;
-  }
-}
-
-
-//-----------------------------------------------------------------------------
-/* Callback called when a gtpv1u message arrived on UDP interface */
-NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
-  NwGtpv1uUlpHandleT hUlp,
-  NwGtpv1uUlpApiT   *pUlpApi) {
-  boolean_t           result             = FALSE;
-  teid_t              teid               = 0;
-  hashtable_rc_t      hash_rc            = HASH_TABLE_KEY_NOT_EXISTS;
-  gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
-  protocol_ctxt_t     ctxt;
-  NwGtpv1uRcT         rc;
-
-  switch(pUlpApi->apiType) {
-    /* Here there are two type of messages handled:
-     * - T-PDU
-     * - END-MARKER
-     */
-    case NW_GTPV1U_ULP_API_RECV_TPDU: {
-      uint8_t              buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
-      uint32_t             buffer_len;
-      struct rrc_eNB_ue_context_s        *ue_context_p;
-      uint16_t             msgType = NW_GTP_GPDU;
-      NwGtpv1uMsgT     *pMsg = NULL;
-      /* Nw-gptv1u stack has processed a PDU. we can schedule it to PDCP
-       * for transmission.
-       */
-      teid = pUlpApi->apiInfo.recvMsgInfo.teid;
-      pMsg = (NwGtpv1uMsgT *) pUlpApi->apiInfo.recvMsgInfo.hMsg;
-      msgType = pMsg->msgType;
-
-      if (NW_GTPV1U_OK != nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
-                                             buffer, &buffer_len)) {
-        LOG_E(GTPU, "Error while retrieving T-PDU");
-      }
-
-      itti_free(TASK_UDP, ((NwGtpv1uMsgT *)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBuf);
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-      gtpv1u_eNB_write_dump_socket(buffer,buffer_len);
-#endif
-      rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                             pUlpApi->apiInfo.recvMsgInfo.hMsg);
-
-      if (rc != NW_GTPV1U_OK) {
-        LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-      }
-
-      //-----------------------
-      // GTPV1U->PDCP mapping
-      //-----------------------
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, teid, (void **)&gtpv1u_teid_data_p);
-
-      if (hash_rc == HASH_TABLE_OK) {
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-        LOG_D(GTPU, "Received T-PDU from gtpv1u stack teid  %u size %d -> enb module id %u ue module id %u rab id %u\n",
-              teid,
-              buffer_len,
-              gtpv1u_teid_data_p->enb_id,
-              gtpv1u_teid_data_p->ue_id,
-              gtpv1u_teid_data_p->eps_bearer_id);
-#endif
-        //#warning "LG eps bearer mapping to DRB id to do (offset -4)"
-        PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES,  gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id);
-        MSC_LOG_TX_MESSAGE(
-          MSC_GTPU_ENB,
-          MSC_PDCP_ENB,
-          NULL,0,
-          MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
-          0,0,
-          (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-          buffer_len);
-        ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id], ctxt.rnti);
-
-        if((ue_context_p != NULL) &&
-            (ue_context_p->ue_context.handover_info != NULL) &&
-            (ue_context_p->ue_context.handover_info->state < HO_FORWARDING_COMPLETE)) {
-          if(msgType == NW_GTP_END_MARKER) {
-            /* in the source enb, UE in RRC_HO_EXECUTION mode */
-            if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
-              /* set handover state */
-              //ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
-              MessageDef *msg;
-              // Configure end marker
-              msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ);
-              GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
-              memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
-              GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len;
-              GTPV1U_ENB_END_MARKER_REQ(msg).rnti   = ctxt.rnti;
-              GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
-              GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
-              LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
-              itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
-              return NW_GTPV1U_OK;
-            }
-          }
-
-          if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION || ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
-            int msgsrc = gtpv1u_eNB_get_msgsource(ue_context_p, teid);
-            LOG_D(GTPU,"UE INFO.ueStatus %d, handover state %d, forwarding state %d, from %s. message type %s\n",
-                  ue_context_p->ue_context.StatusRrc,
-                  ue_context_p->ue_context.handover_info->state,
-                  ue_context_p->ue_context.handover_info->forwarding_state,
-                  msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB?"Source eNB":"EPC",
-                  msgsrc != GTPV1U_MSG_FROM_SOURCE_ENB? "UDP DATA" :
-                  msgType == NW_GTP_END_MARKER?"END MARKER":"DATA FORWARDING");
-
-	    /* target enb */
-            if(msgType == NW_GTP_END_MARKER) {
-              LOG_I(GTPU, "target end receive END MARKER\n");
-              ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
-              gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
-              memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
-              delete_tunnel_req.rnti = ctxt.rnti;
-              gtpv1u_delete_x2u_tunnel(ctxt.module_id, &delete_tunnel_req, GTPV1U_TARGET_ENB);
-              return NW_GTPV1U_OK;
-            }
-
-            /* form source eNB message */
-            if(msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB) {
-              LOG_I(GTPU, "Received a message data forwarding length %d\n", buffer_len);
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-              LOG_T(GTPU, "forwarding data info:\n", buffer_len);
-
-              for(int i=1; i<=buffer_len; i++) {
-                LOG_T(GTPU, "%02x ", buffer[i-1]);
-
-                if(i%20 == 0)LOG_T(GTPU, "\n");
-              }
-
-              LOG_T(GTPU, "\n");
-#endif
-              result = gtpv_data_req(
-                         &ctxt,
-                         (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-                         0, // mui
-                         SDU_CONFIRM_NO, // confirm
-                         buffer_len,
-                         buffer,
-                         PDCP_TRANSMISSION_MODE_DATA,
-                         TASK_DATA_FORWARDING
-                       );
-
-              if ( result == FALSE ) {
-                LOG_W(GTPU, "DATA FORWARDING message save failed\n");
-                return NW_GTPV1U_FAILURE;
-              }
-
-              ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_NO_EMPTY;
-              return NW_GTPV1U_OK;
-            }
-            /* from epc message */
-            else {
-              /* in the source enb, UE in RRC_HO_EXECUTION mode */
-              if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
-                MessageDef *msg;
-                // Configure target
-                msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_REQ);
-                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
-                memcpy(&GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
-                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len;
-                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti   = ctxt.rnti;
-                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
-                GTPV1U_ENB_DATA_FORWARDING_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-                LOG_T(GTPU, "Send data forwarding sdu_buffer to target enb. len %d info\n", buffer);
-
-                for(int i=1; i<=buffer_len; i++) {
-                  LOG_T(GTPU, "%02x ", buffer[i-1]);
-
-                  if(i%20 == 0)LOG_T(GTPU, "\n");
-                }
-
-                LOG_T(GTPU, "\n");
-#endif
-                LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
-                itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
-                return NW_GTPV1U_OK;
-              }
-
-              /* target eNB. x2ho forwarding is processing. spgw message save to TASK_END_MARKER */
-              if(ue_context_p->ue_context.handover_info->state != HO_COMPLETE &&
-                  ue_context_p->ue_context.handover_info->state != HO_END_MARKER ) {
-                LOG_I(GTPU, "x2ho forwarding is processing. Received a spgw message. length %d\n", buffer_len);
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-                LOG_T(GTPU, "spgw data info:\n", buffer_len);
-
-                for(int i=1; i<=buffer_len; i++) {
-                  LOG_T(GTPU, "%02x ", buffer[i-1]);
-
-                  if(i%20 == 0)LOG_T(GTPU, "\n");
-                }
-
-                LOG_T(GTPU, "\n");
-#endif
-                result = gtpv_data_req(
-                           &ctxt,
-                           (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-                           0, // mui
-                           SDU_CONFIRM_NO, // confirm
-                           buffer_len,
-                           buffer,
-                           PDCP_TRANSMISSION_MODE_DATA,
-                           TASK_END_MARKER
-                         );
-
-                if ( result == FALSE ) {
-                  LOG_W(GTPU, "DATA FORWARDING message save failed\n");
-                  return NW_GTPV1U_FAILURE;
-                }
-
-                ue_context_p->ue_context.handover_info->endmark_state = ENDMARK_NO_EMPTY;
-                return NW_GTPV1U_OK;
-              }
-            }
-          }
-        }
-
-        result = pdcp_data_req(
-                   &ctxt,
-                   SRB_FLAG_NO,
-                   (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-                   0, // mui
-                   SDU_CONFIRM_NO, // confirm
-                   buffer_len,
-                   buffer,
-                   PDCP_TRANSMISSION_MODE_DATA,NULL, NULL
-                 );
-
-        if ( result == FALSE ) {
-          LOG_W(GTPU, "PDCP data request failed\n");
-          return NW_GTPV1U_FAILURE;
-        }
-      } else {
-        LOG_W(GTPU, "Received T-PDU from gtpv1u stack teid %u unknown size %u", teid, buffer_len);
-      }
-    }
-    break;
-
-    default: {
-      LOG_E(GTPU, "Received undefined UlpApi (%02x) from gtpv1u stack!\n",
-            pUlpApi->apiType);
-    }
-  } // end of switch
-
-  return NW_GTPV1U_OK;
-}
-
-
-//-----------------------------------------------------------------------------
-int data_recv_callback(uint16_t  portP,
-                       uint32_t  address,
-                       uint8_t  *buffer,
-                       uint32_t  length,
-                       void     *arg_p) {
-  gtpv1u_data_t        *gtpv1u_data_p;
-
-  if (arg_p == NULL) {
-    return -1;
-  }
-
-  gtpv1u_data_p = (gtpv1u_data_t *)arg_p;
-  return nwGtpv1uProcessUdpReq(gtpv1u_data_p->gtpv1u_stack,
-                               buffer,
-                               length,
-                               portP,
-                               address);
-}
-
-//int
-//gtpv1u_create_tunnel_endpoint(
-//    gtpv1u_data_t *gtpv1u_data_pP,
-//    uint8_t        ue_idP,
-//    uint8_t        rab_idP,
-//    char          *sgw_ip_addr_pP,
-//    uint16_t       portP)
-//{
-//    uint32_t                     teid;
-//    uint8_t                      max_attempt = 100;
-//    NwGtpv1uRcT                  rc          = NW_GTPV1U_FAILURE;
-//    NwGtpv1uUlpApiT              ulp_req;
-//    struct gtpv1u_ue_data_s     *new_ue_p    = NULL;
-//    struct gtpv1u_bearer_s      *bearer_p    = NULL;
-//    hashtable_rc_t               hash_rc     = HASH_TABLE_KEY_NOT_EXISTS;;
-//
-//    if (rab_idP > GTPV1U_MAX_BEARERS_PER_UE) {
-//        LOG_E(GTPU, "Could not use rab_id %d > max %d\n",
-//              rab_idP, GTPV1U_MAX_BEARERS_PER_UE);
-//        return -1;
-//    }
-//
-//
-//    if ((hash_rc = hashtable_get(gtpv1u_data_pP->ue_mapping, (uint64_t)ue_idP, (void**)&new_ue_p)) == HASH_TABLE_OK) {
-//        /* A context for this UE already exist in the tree, use it */
-//        /* We check that the tunnel is not already configured */
-//        if (new_ue_p->bearers[rab_idP].state != BEARER_DOWN) {
-//            LOG_E(GTPU, "Cannot create new end-point over already existing tunnel\n");
-//            return -1;
-//        }
-//    } else {
-//        /* Context doesn't exist, create it */
-//        if (rab_idP != 0) {
-//            /* UE should first establish Default bearer before trying to setup
-//             * additional bearers.
-//             */
-//            LOG_E(GTPU, "UE context is not known and rab_id != 0\n");
-//            return -1;
-//        }
-//        new_ue_p = calloc(1, sizeof(struct gtpv1u_ue_data_s));
-//        new_ue_p->ue_id = ue_idP;
-//
-//        hash_rc = hashtable_insert(gtpv1u_data_pP->ue_mapping, (uint64_t)ue_idP, new_ue_p);
-//
-//        if ((hash_rc != HASH_TABLE_OK) && (hash_rc != HASH_TABLE_INSERT_OVERWRITTEN_DATA)) {
-//            LOG_E(GTPU, "Failed to insert new UE context\n");
-//            free(new_ue_p);
-//            return -1;
-//        }
-//    }
-//
-//    bearer_p = &new_ue_p->bearers[rab_idP];
-//
-//    /* Configure the bearer */
-//    bearer_p->state       = BEARER_IN_CONFIG;
-//    bearer_p->sgw_ip_addr = inet_addr(sgw_ip_addr_pP);
-//    bearer_p->port        = portP;
-//
-//    /* Create the new stack api request */
-//    memset(&ulp_req, 0, sizeof(NwGtpv1uUlpApiT));
-//    ulp_req.apiType = NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT;
-//
-//    /* Try to create new tunnel-endpoint.
-//     * If teid generated is already present in the stack, just peek another random
-//     * teid. This could be ok for small number of tunnel but more errors could be
-//     * thrown if we reached high number of tunnels.
-//     * TODO: find a solution for teid
-//     */
-//    do {
-//        /* Request for a new random TEID */
-//        teid = gtpv1u_new_teid();
-//        ulp_req.apiInfo.createTunnelEndPointInfo.teid = teid;
-//
-//        rc = nwGtpv1uProcessUlpReq(gtpv1u_data_pP->gtpv1u_stack, &ulp_req);
-//
-//        if (rc == NW_GTPV1U_OK) {
-////             LOG_D(GTPU, "Successfully created new tunnel endpoint for teid 0x%x\n",
-////                   teid);
-//            bearer_p->teid_eNB = teid;
-////             gtpv1u_initial_req(gtpv1u_data_pP, teid, GTPV1U_UDP_PORT,
-////                                inet_addr("192.168.56.101"));
-//            LOG_I(GTPU, "Created eNB tunnel endpoint %u for ue id %u, rab id %u\n", teid, ue_idP, rab_idP);
-//            return 0;
-//        } else {
-//            LOG_W(GTPU, "Teid %u already in use... %s\n",
-//                  teid, (max_attempt > 1) ? "Trying another one" : "Last chance");
-//        }
-//    } while(max_attempt-- && rc != NW_GTPV1U_OK);
-//
-//    bearer_p->state = BEARER_DOWN;
-//    LOG_I(GTPU, "Failed to created eNB tunnel endpoint %u for ue id %u, rab id %u, bearer down\n", teid, ue_idP, rab_idP);
-//
-//    return -1;
-//}
-
-
-//-----------------------------------------------------------------------------
-static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
-  NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-  uint32_t                  timeoutSec,
-  uint32_t                  timeoutUsec,
-  uint32_t                  tmrType,
-  void                   *timeoutArg,
-  NwGtpv1uTimerHandleT   *hTmr) {
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  long        timer_id;
-
-  if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) {
-    timer_setup(timeoutSec,
-                timeoutUsec,
-                TASK_GTPV1_U,
-                INSTANCE_DEFAULT,
-                TIMER_ONE_SHOT,
-                timeoutArg,
-                &timer_id);
-  } else {
-    timer_setup(timeoutSec,
-                timeoutUsec,
-                TASK_GTPV1_U,
-                INSTANCE_DEFAULT,
-                TIMER_PERIODIC,
-                timeoutArg,
-                &timer_id);
-  }
-
-  return rc;
-}
-
-
-//-----------------------------------------------------------------------------
-static NwGtpv1uRcT
-gtpv1u_stop_timer_wrapper(
-  NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-  NwGtpv1uTimerHandleT hTmr) {
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  return rc;
-}
-
-
-//-----------------------------------------------------------------------------
-int
-gtpv1u_initial_req(
-  gtpv1u_data_t *gtpv1u_data_pP,
-  teid_t         teidP,
-  tcp_udp_port_t portP,
-  uint32_t       address) {
-  NwGtpv1uUlpApiT ulp_req;
-  NwGtpv1uRcT     rc = NW_GTPV1U_FAILURE;
-  memset(&ulp_req, 0, sizeof(NwGtpv1uUlpApiT));
-  ulp_req.apiType = NW_GTPV1U_ULP_API_INITIAL_REQ;
-  ulp_req.apiInfo.initialReqInfo.teid     = teidP;
-  ulp_req.apiInfo.initialReqInfo.peerPort = portP;
-  ulp_req.apiInfo.initialReqInfo.peerIp   = address;
-  rc = nwGtpv1uProcessUlpReq(gtpv1u_data_pP->gtpv1u_stack, &ulp_req);
-
-  if (rc == NW_GTPV1U_OK) {
-    LOG_D(GTPU, "Successfully sent initial req for teid %u\n", teidP);
-  } else {
-    LOG_W(GTPU, "Could not send initial req for teid %u\n", teidP);
-  }
-
-  return (rc == NW_GTPV1U_OK) ? 0 : -1;
-}
-
-//-----------------------------------------------------------------------------
-int
-gtpv1u_new_data_req(
-  uint8_t  enb_module_idP,
-  rnti_t   ue_rntiP,
-  uint8_t  rab_idP,
-  uint8_t *buffer_pP,
-  uint32_t buf_lenP,
-  uint32_t buf_offsetP
-) {
-  NwGtpv1uUlpApiT          stack_req;
-  NwGtpv1uRcT              rc            = NW_GTPV1U_FAILURE;
-  struct gtpv1u_ue_data_s  ue;
-  struct gtpv1u_ue_data_s *ue_inst_p     = NULL;
-  struct gtpv1u_bearer_s  *bearer_p      = NULL;
-  hashtable_rc_t           hash_rc       = HASH_TABLE_KEY_NOT_EXISTS;;
-  gtpv1u_data_t           *gtpv1u_data_p = NULL;
-  memset(&ue, 0, sizeof(struct gtpv1u_ue_data_s));
-  ue.ue_id = ue_rntiP;
-  AssertFatal(enb_module_idP >=0, "Bad parameter enb module id %u\n", enb_module_idP);
-  AssertFatal((rab_idP - GTPV1U_BEARER_OFFSET)< GTPV1U_MAX_BEARERS_ID, "Bad parameter rab id %u\n", rab_idP);
-  AssertFatal((rab_idP - GTPV1U_BEARER_OFFSET) >= 0, "Bad parameter rab id %u\n", rab_idP);
-  gtpv1u_data_p = RC.gtpv1u_data_g;
-  /* Check that UE context is present in ue map. */
-  hash_rc = hashtable_get(gtpv1u_data_p->ue_mapping, (uint64_t)ue_rntiP, (void **)&ue_inst_p);
-
-  if (hash_rc ==  HASH_TABLE_KEY_NOT_EXISTS ) {
-    LOG_E(GTPU, "[UE %d] Trying to send data on non-existing UE context\n", ue_rntiP);
-    return -1;
-  }
-
-  bearer_p = &ue_inst_p->bearers[rab_idP - GTPV1U_BEARER_OFFSET];
-
-  /* Ensure the bearer in ready.
-   * TODO: handle the cases where the bearer is in HANDOVER state.
-   * In such case packets should be placed in FIFO.
-   */
-  if (bearer_p->state != BEARER_UP) {
-    LOG_W(GTPU, "Trying to send data over bearer with state(%u) != BEARER_UP\n",
-          bearer_p->state);
-    //#warning  LG: HACK WHILE WAITING FOR NAS, normally return -1
-
-    if (bearer_p->state != BEARER_IN_CONFIG)
-      return -1;
-  }
-
-  memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-  stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-  stack_req.apiInfo.sendtoInfo.teid   = bearer_p->teid_sgw;
-  stack_req.apiInfo.sendtoInfo.ipAddr = bearer_p->sgw_ip_addr;
-  LOG_D(GTPU, "TX TO TEID %u addr 0x%x\n",bearer_p->teid_sgw, bearer_p->sgw_ip_addr);
-  rc = nwGtpv1uGpduMsgNew(gtpv1u_data_p->gtpv1u_stack,
-                          bearer_p->teid_sgw,
-                          NW_FALSE,
-                          gtpv1u_data_p->seq_num++,
-                          buffer_pP,
-                          buf_lenP,
-                          buf_offsetP,
-                          &(stack_req.apiInfo.sendtoInfo.hMsg));
-
-  if (rc != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-    return -1;
-  }
-
-  rc = nwGtpv1uProcessUlpReq(gtpv1u_data_p->gtpv1u_stack,
-                             &stack_req);
-
-  if (rc != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
-    return -1;
-  }
-
-  rc = nwGtpv1uMsgDelete(gtpv1u_data_p->gtpv1u_stack,
-                         stack_req.apiInfo.sendtoInfo.hMsg);
-
-  if (rc != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-    return -1;
-  }
-
-  LOG_D(GTPU, "%s() return code OK\n", __FUNCTION__);
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-int
-gtpv1u_create_x2u_tunnel(
-  const instance_t                              instanceP,
-  const gtpv1u_enb_create_x2u_tunnel_req_t *const  create_tunnel_req_pP,
-  gtpv1u_enb_create_x2u_tunnel_resp_t *const create_tunnel_resp_pP
-) {
-  /* Create a new nw-gtpv1-u stack req using API */
-  NwGtpv1uUlpApiT          stack_req;
-  NwGtpv1uRcT              rc                   = NW_GTPV1U_FAILURE;
-  /* Local tunnel end-point identifier */
-  teid_t                   x2u_teid             = 0;
-  gtpv1u_teid_data_t      *gtpv1u_teid_data_p   = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  int                      i;
-  ebi_t                    eps_bearer_id        = 0;
-  MSC_LOG_RX_MESSAGE(
-    MSC_GTPU_ENB,
-    MSC_RRC_ENB,
-    NULL,0,
-    MSC_AS_TIME_FMT" CREATE_X2U_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u ebid %u enb-x2u teid %u",
-    0,0,create_tunnel_req_pP->rnti, instanceP,
-    create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
-    create_tunnel_req_pP->tenb_X2u_teid[0]);
-  create_tunnel_resp_pP->rnti        = create_tunnel_req_pP->rnti;
-  create_tunnel_resp_pP->status      = 0;
-  create_tunnel_resp_pP->num_tunnels = 0;
-
-  for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
-    eps_bearer_id = create_tunnel_req_pP->eps_bearer_id[i];
-    LOG_D(GTPU, "Rx GTPV1U_ENB_CREATE_X2U_TUNNEL_REQ ue rnti %x eps bearer id %u\n",
-          create_tunnel_req_pP->rnti, eps_bearer_id);
-    memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-    stack_req.apiType = NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT;
-
-    do {
-      x2u_teid = gtpv1u_new_teid();
-      LOG_D(GTPU, "gtpv1u_create_x2u_tunnel() 0x%x %u(dec)\n", x2u_teid, x2u_teid);
-      stack_req.apiInfo.createTunnelEndPointInfo.teid          = x2u_teid;
-      stack_req.apiInfo.createTunnelEndPointInfo.hUlpSession   = 0;
-      stack_req.apiInfo.createTunnelEndPointInfo.hStackSession = 0;
-      rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
-      LOG_D(GTPU, ".\n");
-    } while (rc != NW_GTPV1U_OK);
-
-    memcpy(&create_tunnel_resp_pP->enb_addr.buffer,
-           &RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up,
-           sizeof (in_addr_t));
-    LOG_D(GTPU, "gtpv1u_create_x2u_tunnel() end addr %d.%d.%d.%d\n",
-          create_tunnel_resp_pP->enb_addr.buffer[0],
-          create_tunnel_resp_pP->enb_addr.buffer[1],
-          create_tunnel_resp_pP->enb_addr.buffer[2],
-          create_tunnel_resp_pP->enb_addr.buffer[3]);
-    create_tunnel_resp_pP->enb_addr.length  = sizeof (in_addr_t);
-    create_tunnel_resp_pP->eps_bearer_id[i] = eps_bearer_id;
-    create_tunnel_resp_pP->num_tunnels      += 1;
-    //-----------------------
-    // GTPV1U->PDCP mapping
-    //-----------------------
-    create_tunnel_resp_pP->enb_X2u_teid[i] = x2u_teid;
-    hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, x2u_teid, (void **)&gtpv1u_teid_data_p);
-
-    if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-      gtpv1u_teid_data_p = calloc (1, sizeof(gtpv1u_teid_data_t));
-      gtpv1u_teid_data_p->enb_id        = 0; // TO DO
-      gtpv1u_teid_data_p->ue_id         = create_tunnel_req_pP->rnti;
-      gtpv1u_teid_data_p->eps_bearer_id = eps_bearer_id;
-      hash_rc = hashtable_insert(RC.gtpv1u_data_g->teid_mapping, x2u_teid, gtpv1u_teid_data_p);
-      AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting teid mapping in GTPV1U hashtable");
-    } else {
-      create_tunnel_resp_pP->enb_X2u_teid[i] = 0;
-      create_tunnel_resp_pP->status         = 0xFF;
-    }
-  }
-
-  MSC_LOG_TX_MESSAGE(
-    MSC_GTPU_ENB,
-    MSC_RRC_ENB,
-    NULL,0,
-    "0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
-    create_tunnel_resp_pP->rnti,
-    x2u_teid);
-  LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
-        create_tunnel_req_pP->rnti,
-        create_tunnel_resp_pP->status);
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-int gtpv1u_delete_x2u_tunnel(
-  const instance_t                             instanceP,
-  const gtpv1u_enb_delete_tunnel_req_t *const req_pP,
-  int                             enbflag) {
-  gtpv1u_ue_data_t        *gtpv1u_ue_data_p     = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  int                      erab_index           = 0;
-  ebi_t                    eps_bearer_id        = 0;
-  struct rrc_eNB_ue_context_s *ue_context_p     = NULL;
-  ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instanceP], req_pP->rnti);
-
-  if(ue_context_p != NULL) {
-    /* in the source enb */
-    if(enbflag == GTPV1U_SOURCE_ENB) {
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p);
-
-      if (hash_rc == HASH_TABLE_OK) {
-        for (erab_index = 0; erab_index < ue_context_p->ue_context.nb_x2u_e_rabs; erab_index++) {
-          eps_bearer_id = ue_context_p->ue_context.enb_gtp_x2u_ebi[erab_index];
-          LOG_I(GTPU, "gtpv1u_delete_x2u_tunnel user rnti %x teNB X2U teid %u eps bearer id %ld\n",
-                req_pP->rnti,
-                gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB,
-                ue_context_p->ue_context.enb_gtp_x2u_ebi[erab_index]);
-          gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB = 0;
-          gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr = 0;
-          //gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip6_addr = 0;
-        }
-
-        ue_context_p->ue_context.nb_x2u_e_rabs = 0;
-      }
-    }
-    /* in the target enb */
-    else {
-      for (erab_index = 0; erab_index < ue_context_p->ue_context.nb_x2u_e_rabs; erab_index++) {
-        //-----------------------
-        // GTPV1U->PDCP mapping
-        //-----------------------
-        hash_rc = hashtable_remove(RC.gtpv1u_data_g->teid_mapping, ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index]);
-        LOG_I(GTPU, "Removed user rnti %x , enb X2U teid %u\n", req_pP->rnti, ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index]);
-
-        if (hash_rc != HASH_TABLE_OK) {
-          LOG_D(GTPU, "Removed user rnti %x , enb X2U teid %u not found\n", req_pP->rnti, ue_context_p->ue_context.enb_gtp_x2u_teid[erab_index]);
-        }
-      }
-
-      ue_context_p->ue_context.nb_x2u_e_rabs = 0;
-    }
-  }
-
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-int
-gtpv1u_create_s1u_tunnel(
-  const instance_t                              instanceP,
-  const gtpv1u_enb_create_tunnel_req_t *const  create_tunnel_req_pP,
-  gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP
-) {
-  /* Create a new nw-gtpv1-u stack req using API */
-  NwGtpv1uUlpApiT          stack_req;
-  NwGtpv1uRcT              rc                   = NW_GTPV1U_FAILURE;
-  /* Local tunnel end-point identifier */
-  teid_t                   s1u_teid             = 0;
-  gtpv1u_teid_data_t      *gtpv1u_teid_data_p   = NULL;
-  gtpv1u_ue_data_t        *gtpv1u_ue_data_p     = NULL;
-  //MessageDef              *message_p            = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  int                      i;
-  ebi_t                    eps_bearer_id        = 0;
-  //    int                      ipv4_addr            = 0;
-  int                      ip_offset            = 0;
-  in_addr_t                in_addr;
-  int                      addrs_length_in_bytes= 0;
-  int                      loop_counter         = 0;
-  int                      ret                  = 0;
-  MSC_LOG_RX_MESSAGE(
-    MSC_GTPU_ENB,
-    MSC_RRC_ENB,
-    NULL,0,
-    MSC_AS_TIME_FMT" CREATE_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u ebid %u sgw-s1u teid %u",
-    0,0,create_tunnel_req_pP->rnti, instanceP,
-    create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
-    create_tunnel_req_pP->sgw_S1u_teid[0]);
-  create_tunnel_resp_pP->rnti        = create_tunnel_req_pP->rnti;
-  create_tunnel_resp_pP->status      = 0;
-  create_tunnel_resp_pP->num_tunnels = 0;
-
-  for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
-    ip_offset               = 0;
-    loop_counter            = 0;
-    eps_bearer_id = create_tunnel_req_pP->eps_bearer_id[i];
-    LOG_D(GTPU, "Rx GTPV1U_ENB_CREATE_TUNNEL_REQ ue rnti %x eps bearer id %u\n",
-          create_tunnel_req_pP->rnti, eps_bearer_id);
-    memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-    stack_req.apiType = NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT;
-
-    do {
-      s1u_teid = gtpv1u_new_teid();
-      LOG_I(GTPU, "gtpv1u_data_g %p\n", RC.gtpv1u_data_g);
-      LOG_I(GTPU, "gtpv1u_create_s1u_tunnel() 0x%x %u(dec)\n", s1u_teid, s1u_teid);
-      stack_req.apiInfo.createTunnelEndPointInfo.teid          = s1u_teid;
-      stack_req.apiInfo.createTunnelEndPointInfo.hUlpSession   = 0;
-      stack_req.apiInfo.createTunnelEndPointInfo.hStackSession = 0;
-      rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
-      LOG_D(GTPU, ".\n");
-      loop_counter++;
-    } while (rc != NW_GTPV1U_OK && loop_counter < 10);
-
-    if ( rc != NW_GTPV1U_OK && loop_counter == 10 ) {
-      LOG_E(GTPU,"NwGtpv1uCreateTunnelEndPoint failed 10 times,start next loop\n");
-      ret = -1;
-      continue;
-    }
-
-    //-----------------------
-    // PDCP->GTPV1U mapping
-    //-----------------------
-    hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, (void **)&gtpv1u_ue_data_p);
-
-    if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_OK)) {
-      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-        gtpv1u_ue_data_p = calloc (1, sizeof(gtpv1u_ue_data_t));
-        hash_rc = hashtable_insert(RC.gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, gtpv1u_ue_data_p);
-        AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
-      }
-
-      gtpv1u_ue_data_p->ue_id       = create_tunnel_req_pP->rnti;
-      gtpv1u_ue_data_p->instance_id = 0; // TO DO
-      memcpy(&create_tunnel_resp_pP->enb_addr.buffer,
-             &RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up,
-             sizeof (in_addr_t));
-     
-      LOG_I(GTPU,"Configured GTPu address : %x\n",RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up);
-      create_tunnel_resp_pP->enb_addr.length = sizeof (in_addr_t);
-      addrs_length_in_bytes = create_tunnel_req_pP->sgw_addr[i].length / 8;
-      AssertFatal((addrs_length_in_bytes == 4) ||
-                  (addrs_length_in_bytes == 16) ||
-                  (addrs_length_in_bytes == 20),
-                  "Bad transport layer address length %d (bits) %d (bytes)",
-                  create_tunnel_req_pP->sgw_addr[i].length, addrs_length_in_bytes);
-
-      if ((addrs_length_in_bytes == 4) ||
-          (addrs_length_in_bytes == 20)) {
-        in_addr = *((in_addr_t *)create_tunnel_req_pP->sgw_addr[i].buffer);
-        ip_offset = 4;
-        gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].sgw_ip_addr = in_addr;
-      }
-
-      if ((addrs_length_in_bytes == 16) ||
-          (addrs_length_in_bytes == 20)) {
-        memcpy(gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].sgw_ip6_addr.s6_addr,
-               &create_tunnel_req_pP->sgw_addr[i].buffer[ip_offset],
-               16);
-      }
-
-      gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state                  = BEARER_IN_CONFIG;
-      gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB               = s1u_teid;
-      gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB_stack_session = stack_req.apiInfo.createTunnelEndPointInfo.hStackSession;
-      gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw               = create_tunnel_req_pP->sgw_S1u_teid[i];
-      gtpv1u_ue_data_p->num_bearers++;
-      create_tunnel_resp_pP->enb_S1u_teid[i] = s1u_teid;
-
-      LOG_I(GTPU,"Copied to create_tunnel_resp tunnel: index %d target gNB ip %d.%d.%d.%d length %d gtp teid %u\n",
-    		  i,
-    		  create_tunnel_resp_pP->enb_addr.buffer[0],
-    		  create_tunnel_resp_pP->enb_addr.buffer[1],
-    		  create_tunnel_resp_pP->enb_addr.buffer[2],
-    		  create_tunnel_resp_pP->enb_addr.buffer[3],
-    		  create_tunnel_resp_pP->enb_addr.length,
-    		  create_tunnel_resp_pP->enb_S1u_teid[i]);
-    } else {
-      create_tunnel_resp_pP->enb_S1u_teid[i] = 0;
-      create_tunnel_resp_pP->status         = 0xFF;
-    }
-
-    create_tunnel_resp_pP->eps_bearer_id[i] = eps_bearer_id;
-    create_tunnel_resp_pP->num_tunnels      += 1;
-    //-----------------------
-    // GTPV1U->PDCP mapping
-    //-----------------------
-    hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, s1u_teid, (void **)&gtpv1u_teid_data_p);
-
-    if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-      gtpv1u_teid_data_p = calloc (1, sizeof(gtpv1u_teid_data_t));
-      gtpv1u_teid_data_p->enb_id        = 0; // TO DO
-      gtpv1u_teid_data_p->ue_id         = create_tunnel_req_pP->rnti;
-      gtpv1u_teid_data_p->eps_bearer_id = eps_bearer_id;
-      hash_rc = hashtable_insert(RC.gtpv1u_data_g->teid_mapping, s1u_teid, gtpv1u_teid_data_p);
-      AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting teid mapping in GTPV1U hashtable");
-    } else {
-      create_tunnel_resp_pP->enb_S1u_teid[i] = 0;
-      create_tunnel_resp_pP->status         = 0xFF;
-    }
-  }
-
-  MSC_LOG_TX_MESSAGE(
-    MSC_GTPU_ENB,
-    MSC_RRC_ENB,
-    NULL,0,
-    "0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
-    create_tunnel_resp_pP->rnti,
-    s1u_teid);
-  LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
-        create_tunnel_req_pP->rnti,
-        create_tunnel_resp_pP->status);
-  //return 0;
-  return ret;
-}
-
-int gtpv1u_update_s1u_tunnel(
-  const instance_t                              instanceP,
-  const gtpv1u_enb_create_tunnel_req_t *const  create_tunnel_req_pP,
-  const rnti_t                                  prior_rnti
-) {
-  /* Local tunnel end-point identifier */
-  teid_t                   s1u_teid             = 0;
-  gtpv1u_teid_data_t      *gtpv1u_teid_data_p   = NULL;
-  gtpv1u_ue_data_t        *gtpv1u_ue_data_p     = NULL;
-  gtpv1u_ue_data_t        *gtpv1u_ue_data_new_p     = NULL;
-  //MessageDef              *message_p            = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  int                      i,j;
-  uint8_t                  bearers_num = 0,bearers_total = 0;
-  //-----------------------
-  // PDCP->GTPV1U mapping
-  //-----------------------
-  hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, prior_rnti, (void **)&gtpv1u_ue_data_p);
-
-  if(hash_rc != HASH_TABLE_OK) {
-    LOG_E(GTPU,"Error get ue_mapping(rnti=%x) from GTPV1U hashtable error\n", prior_rnti);
-    return -1;
-  }
-
-  gtpv1u_ue_data_new_p = calloc (1, sizeof(gtpv1u_ue_data_t));
-  memcpy(gtpv1u_ue_data_new_p,gtpv1u_ue_data_p,sizeof(gtpv1u_ue_data_t));
-  gtpv1u_ue_data_new_p->ue_id       = create_tunnel_req_pP->rnti;
-  hash_rc = hashtable_insert(RC.gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, gtpv1u_ue_data_new_p);
-
-  //AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
-  if ( hash_rc != HASH_TABLE_OK ) {
-    LOG_E(GTPU,"Failed to insert ue_mapping(rnti=%x) in GTPV1U hashtable\n",create_tunnel_req_pP->rnti);
-    return -1;
-  } else {
-    LOG_I(GTPU, "inserting ue_mapping(rnti=%x) in GTPV1U hashtable\n",
-          create_tunnel_req_pP->rnti);
-  }
-
-  hash_rc = hashtable_remove(RC.gtpv1u_data_g->ue_mapping, prior_rnti);
-  LOG_I(GTPU, "hashtable_remove ue_mapping(rnti=%x) in GTPV1U hashtable\n",
-        prior_rnti);
-  //-----------------------
-  // GTPV1U->PDCP mapping
-  //-----------------------
-  bearers_total =gtpv1u_ue_data_new_p->num_bearers;
-
-  for(j = 0; j<GTPV1U_MAX_BEARERS_ID; j++) {
-    if(gtpv1u_ue_data_new_p->bearers[j].state != BEARER_IN_CONFIG)
-      continue;
-
-    bearers_num++;
-
-    for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
-      if(j == (create_tunnel_req_pP->eps_bearer_id[i]-GTPV1U_BEARER_OFFSET))
-        break;
-    }
-
-    if(i < create_tunnel_req_pP->num_tunnels) {
-      s1u_teid = gtpv1u_ue_data_new_p->bearers[j].teid_eNB;
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, s1u_teid, (void **)&gtpv1u_teid_data_p);
-
-      if (hash_rc == HASH_TABLE_OK) {
-        gtpv1u_teid_data_p->ue_id         = create_tunnel_req_pP->rnti;
-        gtpv1u_teid_data_p->eps_bearer_id = create_tunnel_req_pP->eps_bearer_id[i];
-        LOG_I(GTPU, "updata teid_mapping te_id %u (prior_rnti %x rnti %x) in GTPV1U hashtable\n",
-              s1u_teid,prior_rnti,create_tunnel_req_pP->rnti);
-      } else {
-        LOG_W(GTPU, "Error get teid mapping(s1u_teid=%u) from GTPV1U hashtable", s1u_teid);
-      }
-    } else {
-      s1u_teid = gtpv1u_ue_data_new_p->bearers[j].teid_eNB;
-      hash_rc = hashtable_remove(RC.gtpv1u_data_g->teid_mapping, s1u_teid);
-
-      if (hash_rc != HASH_TABLE_OK) {
-        LOG_D(GTPU, "Removed user rnti %x , enb S1U teid %u not found\n", prior_rnti, s1u_teid);
-      }
-
-      gtpv1u_ue_data_new_p->bearers[j].state = BEARER_DOWN;
-      gtpv1u_ue_data_new_p->num_bearers--;
-      LOG_I(GTPU, "delete teid_mapping te_id %u (rnti%x) bearer_id %d in GTPV1U hashtable\n",
-            s1u_teid,prior_rnti,j+GTPV1U_BEARER_OFFSET);;
-    }
-
-    if(bearers_num > bearers_total)
-      break;
-  }
-
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-int gtpv1u_delete_s1u_tunnel(
-  const instance_t                             instanceP,
-  const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
-  NwGtpv1uUlpApiT          stack_req;
-  NwGtpv1uRcT              rc                   = NW_GTPV1U_FAILURE;
-  MessageDef              *message_p = NULL;
-  gtpv1u_ue_data_t        *gtpv1u_ue_data_p     = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  teid_t                   teid_eNB             = 0;
-  int                      erab_index           = 0;
-  message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP);
-  GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti     = req_pP->rnti;
-  GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status       = 0;
-  hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p);
-
-  if (hash_rc == HASH_TABLE_OK) {
-    for (erab_index = 0; erab_index < req_pP->num_erab; erab_index++) {
-      teid_eNB = gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].teid_eNB;
-      LOG_D(GTPU, "Rx GTPV1U_ENB_DELETE_TUNNEL user rnti %x eNB S1U teid %u eps bearer id %u\n",
-            req_pP->rnti, teid_eNB, req_pP->eps_bearer_id[erab_index]);
-      {
-        memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-        stack_req.apiType = NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT;
-        LOG_D(GTPU, "gtpv1u_delete_s1u_tunnel erab %u  %u\n",
-              req_pP->eps_bearer_id[erab_index],
-              teid_eNB);
-        stack_req.apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle   = gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].teid_eNB_stack_session;
-        rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
-        LOG_D(GTPU, ".\n");
-      }
-
-      if (rc != NW_GTPV1U_OK) {
-        GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status       |= 0xFF;
-        LOG_E(GTPU, "NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT failed");
-      }
-
-      //-----------------------
-      // PDCP->GTPV1U mapping
-      //-----------------------
-      gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].state       = BEARER_DOWN;
-      gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].teid_eNB    = 0;
-      gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].teid_sgw    = 0;
-      gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].sgw_ip_addr = 0;
-      gtpv1u_ue_data_p->num_bearers -= 1;
-
-      if (gtpv1u_ue_data_p->num_bearers == 0) {
-        hash_rc = hashtable_remove(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti);
-        LOG_D(GTPU, "Removed user rnti %x,no more bearers configured\n", req_pP->rnti);
-      }
-
-      //-----------------------
-      // GTPV1U->PDCP mapping
-      //-----------------------
-      hash_rc = hashtable_remove(RC.gtpv1u_data_g->teid_mapping, teid_eNB);
-
-      if (hash_rc != HASH_TABLE_OK) {
-        LOG_D(GTPU, "Removed user rnti %x , enb S1U teid %u not found\n", req_pP->rnti, teid_eNB);
-      }
-    }
-  }// else silently do nothing
-
-  LOG_D(GTPU, "Tx GTPV1U_ENB_DELETE_TUNNEL_RESP user rnti %x eNB S1U teid %u status %u\n",
-        GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti,
-        GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).enb_S1u_teid,
-        GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status);
-  MSC_LOG_TX_MESSAGE(
-    MSC_GTPU_ENB,
-    MSC_RRC_ENB,
-    NULL,0,
-    "0 GTPV1U_ENB_DELETE_TUNNEL_RESP rnti %x teid %x",
-    GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti,
-    teid_eNB);
-  if (req_pP->from_gnb)
-    return itti_send_msg_to_task(TASK_RRC_GNB, instanceP, message_p);
-  else
-    return itti_send_msg_to_task(TASK_RRC_ENB, instanceP, message_p);
-}
-
-
-//-----------------------------------------------------------------------------
-int gtpv1u_eNB_init(void) {
-  NwGtpv1uRcT             rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uUlpEntityT      ulp;
-  NwGtpv1uUdpEntityT      udp;
-  NwGtpv1uLogMgrEntityT   log;
-  NwGtpv1uTimerMgrEntityT tmr;
-  //  enb_properties_p = enb_config_get()->properties[0];
-  RC.gtpv1u_data_g = (gtpv1u_data_t *)calloc(sizeof(gtpv1u_data_t),1);
-  LOG_I(GTPU, "Initializing GTPU stack %p\n",&RC.gtpv1u_data_g);
-  //gtpv1u_data_g.gtpv1u_stack;
-  /* Initialize UE hashtable */
-  RC.gtpv1u_data_g->ue_mapping      = hashtable_create (32, NULL, NULL);
-  AssertFatal(RC.gtpv1u_data_g->ue_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create returned %p\n", RC.gtpv1u_data_g->ue_mapping);
-  RC.gtpv1u_data_g->teid_mapping    = hashtable_create (256, NULL, NULL);
-  AssertFatal(RC.gtpv1u_data_g->teid_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create\n");
-  //  RC.gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up         = enb_properties_p->enb_ipv4_address_for_S1U;
-  //gtpv1u_data_g.udp_data;
-  RC.gtpv1u_data_g->seq_num         = 0;
-  RC.gtpv1u_data_g->restart_counter = 0;
-  RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up = 0;
-  /* Initializing GTPv1-U stack */
-  if ((rc = nwGtpv1uInitialize(&RC.gtpv1u_data_g->gtpv1u_stack, GTPU_STACK_ENB)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "Failed to setup nwGtpv1u stack %x\n", rc);
-    return -1;
-  }
-
-  if ((rc = nwGtpv1uSetLogLevel(RC.gtpv1u_data_g->gtpv1u_stack,
-                                NW_LOG_LEVEL_DEBG)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "Failed to setup loglevel for stack %x\n", rc);
-    return -1;
-  }
-
-  /* Set the ULP API callback. Called once message have been processed by the
-   * nw-gtpv1u stack.
-   */
-  ulp.ulpReqCallback = gtpv1u_eNB_process_stack_req;
-  memset((void *)&(ulp.hUlp), 0, sizeof(NwGtpv1uUlpHandleT));
-
-  if ((rc = nwGtpv1uSetUlpEntity(RC.gtpv1u_data_g->gtpv1u_stack, &ulp)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetUlpEntity: %x", rc);
-    return -1;
-  }
-
-  /* nw-gtpv1u stack requires an udp callback to send data over UDP.
-   * We provide a wrapper to UDP task.
-   */
-  udp.udpDataReqCallback = gtpv1u_eNB_send_udp_msg;
-  memset((void *)&(udp.hUdp), 0, sizeof(NwGtpv1uUdpHandleT));
-
-  if ((rc = nwGtpv1uSetUdpEntity(RC.gtpv1u_data_g->gtpv1u_stack, &udp)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetUdpEntity: %x", rc);
-    return -1;
-  }
-
-  log.logReqCallback = gtpv1u_eNB_log_request;
-  memset((void *)&(log.logMgrHandle), 0, sizeof(NwGtpv1uLogMgrHandleT));
-
-  if ((rc = nwGtpv1uSetLogMgrEntity(RC.gtpv1u_data_g->gtpv1u_stack, &log)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetLogMgrEntity: %x", rc);
-    return -1;
-  }
-
-  /* Timer interface is more complicated as both wrappers doesn't send a message
-   * to the timer task but call the timer API functions start/stop timer.
-   */
-  tmr.tmrMgrHandle     = 0;
-  tmr.tmrStartCallback = gtpv1u_start_timer_wrapper;
-  tmr.tmrStopCallback  = gtpv1u_stop_timer_wrapper;
-
-  if ((rc = nwGtpv1uSetTimerMgrEntity(RC.gtpv1u_data_g->gtpv1u_stack, &tmr)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetTimerMgrEntity: %x", rc);
-    return -1;
-  }
-
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-
-  if ((ret = gtpv1u_eNB_create_dump_socket()) < 0) {
-    return -1;
-  }
-
-#endif
-  LOG_D(GTPU, "Initializing GTPV1U interface for eNB: DONE\n");
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
-  /* Trying to fetch a message from the message queue.
-   * If the queue is empty, this function will block till a
-   * message is sent to the task.
-   */
-  instance_t  instance;
-  MessageDef *received_message_p = NULL;
-  int         rc = 0;
-  itti_receive_msg(TASK_GTPV1_U, &received_message_p);
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN);
-  DevAssert(received_message_p != NULL);
-  instance = ITTI_MSG_DESTINATION_INSTANCE(received_message_p);
-  //msg_name_p = ITTI_MSG_NAME(received_message_p);
-
-  switch (ITTI_MSG_ID(received_message_p)) {
-    case GTPV1U_ENB_S1_REQ:
-      gtpv1u_s1_req(instance, &received_message_p->ittiMsg.gtpv1uS1Req);
-
-    case GTPV1U_ENB_DELETE_TUNNEL_REQ: {
-      gtpv1u_delete_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uDeleteTunnelReq);
-    }
-    break;
-
-    // DATA COMING FROM UDP
-    case UDP_DATA_IND: {
-      udp_data_ind_t *udp_data_ind_p;
-      udp_data_ind_p = &received_message_p->ittiMsg.udp_data_ind;
-      nwGtpv1uProcessUdpReq(RC.gtpv1u_data_g->gtpv1u_stack,
-                            udp_data_ind_p->buffer,
-                            udp_data_ind_p->buffer_length,
-                            udp_data_ind_p->peer_port,
-                            udp_data_ind_p->peer_address);
-      //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_ind_p->buffer);
-    }
-    break;
-
-    // DATA TO BE SENT TO UDP
-    case GTPV1U_ENB_TUNNEL_DATA_REQ: {
-      gtpv1u_enb_tunnel_data_req_t *data_req_p           = NULL;
-      NwGtpv1uUlpApiT               stack_req;
-      NwGtpv1uRcT                   rc                   = NW_GTPV1U_FAILURE;
-      hashtable_rc_t                hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-      gtpv1u_ue_data_t             *gtpv1u_ue_data_p     = NULL;
-      teid_t                        enb_s1u_teid         = 0;
-      teid_t                        sgw_s1u_teid         = 0;
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
-      data_req_p = &GTPV1U_ENB_TUNNEL_DATA_REQ(received_message_p);
-      //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-      gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
-#endif
-      memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void **)&gtpv1u_ue_data_p);
-
-      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-        LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
-      } else {
-        if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id < max_val_LTE_DRB_Identity)) {
-          enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
-          sgw_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_sgw;
-          stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-          stack_req.apiInfo.sendtoInfo.teid   = sgw_s1u_teid;
-          stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].sgw_ip_addr;
-          rc = nwGtpv1uGpduMsgNew(
-                 RC.gtpv1u_data_g->gtpv1u_stack,
-                 sgw_s1u_teid,
-                 NW_FALSE,
-                 RC.gtpv1u_data_g->seq_num++,
-                 data_req_p->buffer,
-                 data_req_p->length,
-                 data_req_p->offset,
-                 &(stack_req.apiInfo.sendtoInfo.hMsg));
-
-          if (rc != NW_GTPV1U_OK) {
-            LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-            MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                          enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
-            (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
-          } else {
-            rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
-
-            if (rc != NW_GTPV1U_OK) {
-              LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
-              MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                            enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
-            } else {
-              MSC_LOG_TX_MESSAGE(
-                MSC_GTPU_ENB,
-                MSC_GTPU_SGW,
-                NULL,
-                0,
-                MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
-                0,0,
-                enb_s1u_teid,
-                sgw_s1u_teid,
-                data_req_p->length);
-            }
-
-            rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                                   stack_req.apiInfo.sendtoInfo.hMsg);
-
-            if (rc != NW_GTPV1U_OK) {
-              LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-            }
-          }
-        }
-      }
-
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
-      /* Buffer still needed, do not free it */
-      //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer);
-    }
-    break;
-
-    case GTPV1U_ENB_DATA_FORWARDING_REQ: {
-      gtpv1u_enb_data_forwarding_req_t *data_req_p           = NULL;
-      NwGtpv1uUlpApiT               stack_req;
-      NwGtpv1uRcT                   rc                   = NW_GTPV1U_FAILURE;
-      hashtable_rc_t                hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-      gtpv1u_ue_data_t             *gtpv1u_ue_data_p     = NULL;
-      teid_t                        enb_s1u_teid         = 0;
-      teid_t                        tenb_x2u_teid         = 0;
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
-      data_req_p = &GTPV1U_ENB_DATA_FORWARDING_REQ(received_message_p);
-      //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-      gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
-#endif
-      memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void **)&gtpv1u_ue_data_p);
-
-      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-        LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
-      } else {
-        if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id <= max_val_LTE_DRB_Identity)) {
-          enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
-          tenb_x2u_teid                       = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_teNB; // target enb teid
-          stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-          stack_req.apiInfo.sendtoInfo.teid   = tenb_x2u_teid;
-          stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr;// target enb ip
-          rc = nwGtpv1uGpduMsgNew(
-                 RC.gtpv1u_data_g->gtpv1u_stack,
-                 tenb_x2u_teid,
-                 NW_FALSE,
-                 RC.gtpv1u_data_g->seq_num++,
-                 data_req_p->buffer,
-                 data_req_p->length,
-                 data_req_p->offset,
-                 &(stack_req.apiInfo.sendtoInfo.hMsg));
-
-          if (rc != NW_GTPV1U_OK) {
-            LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-            MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                          enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
-            (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
-          } else {
-            rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
-
-            if (rc != NW_GTPV1U_OK) {
-              LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
-              MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                            enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
-            } else {
-              MSC_LOG_TX_MESSAGE(
-                MSC_GTPU_ENB,
-                MSC_GTPU_SGW,
-                NULL,
-                0,
-                MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
-                0,0,
-                enb_s1u_teid,
-                tenb_x2u_teid,
-                data_req_p->length);
-            }
-
-            rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                                   stack_req.apiInfo.sendtoInfo.hMsg);
-
-            if (rc != NW_GTPV1U_OK) {
-              LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-            }
-          }
-        }
-      }
-
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
-      /* Buffer still needed, do not free it */
-      //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer)
-    }
-    break;
-
-    case GTPV1U_ENB_END_MARKER_REQ: {
-      gtpv1u_enb_end_marker_req_t   *data_req_p           = NULL;
-      NwGtpv1uUlpApiT               stack_req;
-      NwGtpv1uRcT                   rc                    = NW_GTPV1U_FAILURE;
-      hashtable_rc_t                hash_rc               = HASH_TABLE_KEY_NOT_EXISTS;
-      gtpv1u_ue_data_t              *gtpv1u_ue_data_p     = NULL;
-      teid_t                        enb_s1u_teid          = 0;
-      teid_t                        tenb_x2u_teid         = 0;
-      NwGtpv1uMsgT      *pMsg                 = NULL;
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
-      data_req_p = &GTPV1U_ENB_END_MARKER_REQ(received_message_p);
-      //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-      gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
-#endif
-      memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void **)&gtpv1u_ue_data_p);
-
-      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-        LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
-      } else {
-        if ((data_req_p->rab_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->rab_id <= max_val_LTE_DRB_Identity)) {
-          enb_s1u_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_eNB;
-          tenb_x2u_teid                       = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].teid_teNB; // target enb teid
-          stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-          stack_req.apiInfo.sendtoInfo.teid   = tenb_x2u_teid;
-          stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->rab_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr;// target enb ip
-          rc = nwGtpv1uGpduMsgNew(
-				  RC.gtpv1u_data_g->gtpv1u_stack,
-				  tenb_x2u_teid,
-				  NW_FALSE,
-				  RC.gtpv1u_data_g->seq_num++,
-				  data_req_p->buffer,
-				  data_req_p->length,
-				  data_req_p->offset,
-				  &(stack_req.apiInfo.sendtoInfo.hMsg));
-	  
-          if (rc != NW_GTPV1U_OK) {
-            LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-            MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                          enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
-            (void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
-          } else {
-            pMsg = (NwGtpv1uMsgT *) stack_req.apiInfo.sendtoInfo.hMsg;
-            pMsg->msgType = NW_GTP_END_MARKER;
-            rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
-	    
-            if (rc != NW_GTPV1U_OK) {
-              LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
-              MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                            enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
-            } else {
-              MSC_LOG_TX_MESSAGE(
-                MSC_GTPU_ENB,
-                MSC_GTPU_SGW,
-                NULL,
-                0,
-                MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
-                0,0,
-                enb_s1u_teid,
-                tenb_x2u_teid,
-                data_req_p->length);
-            }
-
-            rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                                   stack_req.apiInfo.sendtoInfo.hMsg);
-	    
-            if (rc != NW_GTPV1U_OK) {
-              LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-            }
-	    
-            gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
-            memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
-            delete_tunnel_req.rnti = data_req_p->rnti;
-            gtpv1u_delete_x2u_tunnel(instance, &delete_tunnel_req, GTPV1U_SOURCE_ENB);
-          }
-        }
-      }
-      
-      VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
-    }
-    break;
-
-    case TERMINATE_MESSAGE: {
-      if (RC.gtpv1u_data_g->ue_mapping != NULL) {
-        hashtable_destroy (&(RC.gtpv1u_data_g->ue_mapping));
-      }
-
-      if (RC.gtpv1u_data_g->teid_mapping != NULL) {
-        hashtable_destroy (&(RC.gtpv1u_data_g->teid_mapping));
-      }
-
-      LOG_W(GTPU, " *** Exiting GTPU thread\n");
-      itti_exit_task();
-    }
-    break;
-
-    case TIMER_HAS_EXPIRED:
-      nwGtpv1uProcessTimeout(&received_message_p->ittiMsg.timer_has_expired.arg);
-      break;
-
-    default: {
-      LOG_E(GTPU, "Unkwnon message ID %d:%s\n",
-            ITTI_MSG_ID(received_message_p),
-            ITTI_MSG_NAME(received_message_p));
-    }
-    break;
-  }
-
-  rc = itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
-  AssertFatal(rc == EXIT_SUCCESS, "Failed to free memory (%d)!\n", rc);
-  received_message_p = NULL;
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_OUT);
-  return NULL;
-}
-
-//-----------------------------------------------------------------------------
-void *gtpv1u_eNB_task(void *args) {
-  int rc = 0;
-  rc = gtpv1u_eNB_init();
-  AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
-  itti_mark_task_ready(TASK_GTPV1_U);
-  MSC_START_USE();
-
-  while(1) {
-    (void) gtpv1u_eNB_process_itti_msg (NULL);
-  }
-
-  return NULL;
-}
-
diff --git a/openair3/GTPV1-U/gtpv1u_eNB_task.h b/openair3/GTPV1-U/gtpv1u_eNB_task.h
deleted file mode 100644
index a6e26259415bee26adf21407707cc01d3d46baf2..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u_eNB_task.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file gtpv1u_eNB_task.h
-* \brief
-* \author Lionel Gauthier
-* \company Eurecom
-* \email: lionel.gauthier@eurecom.fr
-*/
-
-#ifndef GTPV1U_ENB_TASK_H_
-#define GTPV1U_ENB_TASK_H_
-
-
-/*
-int
-gtpv1u_new_data_req(
-  uint8_t enb_id,
-  uint8_t ue_id,
-  uint8_t rab_id,
-  uint8_t *buffer,
-  uint32_t buf_len,
-  uint32_t buf_offset);*/
-
-int   gtpv1u_eNB_init(void);
-void *gtpv1u_eNB_process_itti_msg(void*);
-void *gtpv1u_eNB_task(void *args);
-
-int
-gtpv1u_create_x2u_tunnel(
-  const instance_t instanceP,
-  const gtpv1u_enb_create_x2u_tunnel_req_t *  const create_tunnel_req_pP,
-        gtpv1u_enb_create_x2u_tunnel_resp_t * const create_tunnel_resp_pP);
-
-int
-gtpv1u_create_s1u_tunnel(
-  const instance_t instanceP,
-  const gtpv1u_enb_create_tunnel_req_t *  const create_tunnel_req_pP,
-        gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP);
-
-int
-gtpv1u_update_s1u_tunnel(
-    const instance_t                              instanceP,
-    const gtpv1u_enb_create_tunnel_req_t * const  create_tunnel_req_pP,
-    const rnti_t                                  prior_rnti);
-
-int gtpv1u_delete_x2u_tunnel(
-  const instance_t                             instanceP,
-  const gtpv1u_enb_delete_tunnel_req_t * const req_pP,
-  int                             enbflag);
-#endif /* GTPV1U_ENB_TASK_H_ */
diff --git a/openair3/GTPV1-U/gtpv1u_gNB.c b/openair3/GTPV1-U/gtpv1u_gNB.c
deleted file mode 100644
index ff7c8c06042ada5c623c3090ac655e52d616012e..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u_gNB.c
+++ /dev/null
@@ -1,1012 +0,0 @@
-/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file gtpv1u_gNB.c
- * \brief
- * \author Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein, Panos MATZAKOS
- * \version 1.0
- * \company Eurecom
- * \email: lionel.gauthier@eurecom.fr
- */
-#include <stdio.h>
-#include <errno.h>
-
-#include "mme_config.h"
-#include "intertask_interface.h"
-#include "msc.h"
-
-#include "gtpv1u.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uMsg.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwLog.h"
-#include "gtpv1u_eNB_defs.h"
-#include "gtpv1u_gNB_defs.h"
-#include "gtpv1_u_messages_types.h"
-#include "udp_eNB_task.h"
-#include "common/utils/LOG/log.h"
-#include "COMMON/platform_types.h"
-#include "COMMON/platform_constants.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-#include "common/ran_context.h"
-#include "gtpv1u_eNB_task.h"
-#include "gtpv1u_gNB_task.h"
-#include "rrc_eNB_GTPV1U.h"
-
-#undef GTP_DUMP_SOCKET
-
-#undef GTPV1U_BEARER_OFFSET
-#define GTPV1U_BEARER_OFFSET 1
-
-extern unsigned char NB_eNB_INST;
-
-extern RAN_CONTEXT_t RC;
-
-extern NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
-		  NwGtpv1uUdpHandleT udpHandle,
-		  uint8_t *buffer,
-		  uint32_t buffer_len,
-		  uint32_t buffer_offset,
-		  uint32_t peerIpAddr,
-		  uint16_t peerPort);
-
-extern NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
-        uint32_t logLevel,
-        NwCharT *file,
-        uint32_t line,
-        NwCharT *logStr);
-
-static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
-  NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-  uint32_t                  timeoutSec,
-  uint32_t                  timeoutUsec,
-  uint32_t                  tmrType,
-  void                   *timeoutArg,
-  NwGtpv1uTimerHandleT   *hTmr) {
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  long        timer_id;
-
-  if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) {
-    timer_setup(timeoutSec,
-                timeoutUsec,
-                TASK_GTPV1_U,
-                INSTANCE_DEFAULT,
-                TIMER_ONE_SHOT,
-                timeoutArg,
-                &timer_id);
-  } else {
-    timer_setup(timeoutSec,
-                timeoutUsec,
-                TASK_GTPV1_U,
-                INSTANCE_DEFAULT,
-                TIMER_PERIODIC,
-                timeoutArg,
-                &timer_id);
-  }
-
-  return rc;
-}
-
-
-static NwGtpv1uRcT
-gtpv1u_stop_timer_wrapper(
-  NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-  NwGtpv1uTimerHandleT hTmr) {
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  return rc;
-}
-
-/* Callback called when a gtpv1u message arrived on UDP interface */
-NwGtpv1uRcT gtpv1u_gNB_process_stack_req(
-  NwGtpv1uUlpHandleT hUlp,
-  NwGtpv1uUlpApiT   *pUlpApi) {
-  boolean_t           result             = FALSE;
-  teid_t              teid               = 0;
-  hashtable_rc_t      hash_rc            = HASH_TABLE_KEY_NOT_EXISTS;
-  gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
-  protocol_ctxt_t     ctxt;
-  NwGtpv1uRcT         rc;
-
-  switch(pUlpApi->apiType) {
-    /* Here there are two type of messages handled:
-     * - T-PDU
-     * - END-MARKER
-     */
-    case NW_GTPV1U_ULP_API_RECV_TPDU: {
-      uint8_t              buffer[4096];
-      uint32_t             buffer_len;
-      //uint16_t             msgType = NW_GTP_GPDU;
-      //NwGtpv1uMsgT     *pMsg = NULL;
-      /* Nw-gptv1u stack has processed a PDU. we can schedule it to PDCP
-       * for transmission.
-       */
-      teid = pUlpApi->apiInfo.recvMsgInfo.teid;
-      //pMsg = (NwGtpv1uMsgT *) pUlpApi->apiInfo.recvMsgInfo.hMsg;
-      //msgType = pMsg->msgType;
-
-      if (NW_GTPV1U_OK != nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
-                                             buffer, &buffer_len)) {
-        LOG_E(GTPU, "Error while retrieving T-PDU");
-      }
-
-      itti_free(TASK_UDP, ((NwGtpv1uMsgT *)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBuf);
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-      gtpv1u_eNB_write_dump_socket(buffer,buffer_len);
-#endif
-      rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
-                             pUlpApi->apiInfo.recvMsgInfo.hMsg);
-
-      if (rc != NW_GTPV1U_OK) {
-        LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-      }
-
-      hash_rc = hashtable_get(RC.gtpv1u_data_g->teid_mapping, teid, (void **)&gtpv1u_teid_data_p);
-
-      if (hash_rc == HASH_TABLE_OK) {
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-        LOG_D(GTPU, "Received T-PDU from gtpv1u stack teid  %u size %d -> enb module id %u ue module id %u rab id %u\n",
-              teid,
-              buffer_len,
-              gtpv1u_teid_data_p->enb_id,
-              gtpv1u_teid_data_p->ue_id,
-              gtpv1u_teid_data_p->eps_bearer_id);
-#endif
-        //warning "LG eps bearer mapping to DRB id to do (offset -4)"
-        PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES,  gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id);
-        MSC_LOG_TX_MESSAGE(
-          MSC_GTPU_ENB,
-          MSC_PDCP_ENB,
-          NULL,0,
-          MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
-          0,0,
-          (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-          buffer_len);
-
-        result = pdcp_data_req(
-                   &ctxt,
-                   SRB_FLAG_NO,
-                   (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-                   0, // mui
-                   SDU_CONFIRM_NO, // confirm
-                   buffer_len,
-                   buffer,
-                   PDCP_TRANSMISSION_MODE_DATA,NULL, NULL
-                 );
-
-        if ( result == FALSE ) {
-            LOG_W(GTPU, "PDCP data request failed\n");
-
-          return NW_GTPV1U_FAILURE;
-        }
-      } else {
-        LOG_W(GTPU, "Received T-PDU from gtpv1u stack teid %u unknown size %u", teid, buffer_len);
-      }
-    }
-    break;
-
-    default: {
-      LOG_E(GTPU, "Received undefined UlpApi (%02x) from gtpv1u stack!\n",
-            pUlpApi->apiType);
-    }
-  } // end of switch
-
-  return NW_GTPV1U_OK;
-}
-
-int gtpv1u_gNB_init(void) {
-  NwGtpv1uRcT             rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uUlpEntityT      ulp;
-  NwGtpv1uUdpEntityT      udp;
-  NwGtpv1uLogMgrEntityT   log;
-  NwGtpv1uTimerMgrEntityT tmr;
-  //  enb_properties_p = enb_config_get()->properties[0];
-  RC.gtpv1u_data_g = (gtpv1u_data_t *)calloc(sizeof(gtpv1u_data_t),1);
-  LOG_I(GTPU, "Initializing GTPU stack %p\n",&RC.gtpv1u_data_g);
-  //gtpv1u_data_g.gtpv1u_stack;
-  /* Initialize UE hashtable */
-  RC.gtpv1u_data_g->ue_mapping      = hashtable_create (32, NULL, NULL);
-  AssertFatal(RC.gtpv1u_data_g->ue_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create returned %p\n", RC.gtpv1u_data_g->ue_mapping);
-  RC.gtpv1u_data_g->teid_mapping    = hashtable_create (256, NULL, NULL);
-  AssertFatal(RC.gtpv1u_data_g->teid_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create\n");
-  //  RC.gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up         = enb_properties_p->enb_ipv4_address_for_S1U;
-  //gtpv1u_data_g.udp_data;
-  RC.gtpv1u_data_g->seq_num         = 0;
-  RC.gtpv1u_data_g->restart_counter = 0;
-
-  /* Initializing GTPv1-U stack */
-  if ((rc = nwGtpv1uInitialize(&RC.gtpv1u_data_g->gtpv1u_stack, GTPU_STACK_ENB)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "Failed to setup nwGtpv1u stack %x\n", rc);
-    return -1;
-  }
-
-  if ((rc = nwGtpv1uSetLogLevel(RC.gtpv1u_data_g->gtpv1u_stack,
-                                NW_LOG_LEVEL_DEBG)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "Failed to setup loglevel for stack %x\n", rc);
-    return -1;
-  }
-
-  /* Set the ULP API callback. Called once message have been processed by the
-   * nw-gtpv1u stack.
-   */
-  ulp.ulpReqCallback = gtpv1u_gNB_process_stack_req;
-  memset((void *)&(ulp.hUlp), 0, sizeof(NwGtpv1uUlpHandleT));
-
-  if ((rc = nwGtpv1uSetUlpEntity(RC.gtpv1u_data_g->gtpv1u_stack, &ulp)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetUlpEntity: %x", rc);
-    return -1;
-  }
-
-  /* nw-gtpv1u stack requires an udp callback to send data over UDP.
-   * We provide a wrapper to UDP task.
-   */
-  udp.udpDataReqCallback = gtpv1u_eNB_send_udp_msg;
-  memset((void *)&(udp.hUdp), 0, sizeof(NwGtpv1uUdpHandleT));
-
-  if ((rc = nwGtpv1uSetUdpEntity(RC.gtpv1u_data_g->gtpv1u_stack, &udp)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetUdpEntity: %x", rc);
-    return -1;
-  }
-
-  log.logReqCallback = gtpv1u_eNB_log_request;
-  memset((void *)&(log.logMgrHandle), 0, sizeof(NwGtpv1uLogMgrHandleT));
-
-  if ((rc = nwGtpv1uSetLogMgrEntity(RC.gtpv1u_data_g->gtpv1u_stack, &log)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetLogMgrEntity: %x", rc);
-    return -1;
-  }
-
-  /* Timer interface is more complicated as both wrappers doesn't send a message
-   * to the timer task but call the timer API functions start/stop timer.
-   */
-  tmr.tmrMgrHandle     = 0;
-  tmr.tmrStartCallback = gtpv1u_start_timer_wrapper;
-  tmr.tmrStopCallback  = gtpv1u_stop_timer_wrapper;
-
-  if ((rc = nwGtpv1uSetTimerMgrEntity(RC.gtpv1u_data_g->gtpv1u_stack, &tmr)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetTimerMgrEntity: %x", rc);
-    return -1;
-  }
-
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-
-  if ((ret = gtpv1u_eNB_create_dump_socket()) < 0) {
-    return -1;
-  }
-
-#endif
-  LOG_D(GTPU, "Initializing GTPV1U interface for eNB: DONE\n");
-  return 0;
-}
-
-void *gtpv1u_gNB_task(void *args) {
-  int rc = 0;
-  rc = gtpv1u_gNB_init();
-  AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
-  itti_mark_task_ready(TASK_GTPV1_U);
-  MSC_START_USE();
-
-  while(1) {
-    (void) gtpv1u_eNB_process_itti_msg (NULL);
-  }
-
-  return NULL;
-}
-
-/* Callback called when a gtpv1u message arrived on UDP interface */
-NwGtpv1uRcT nr_gtpv1u_gNB_process_stack_req(
-  NwGtpv1uUlpHandleT hUlp,
-  NwGtpv1uUlpApiT   *pUlpApi) {
-  boolean_t              result             = FALSE;
-  teid_t                 teid               = 0;
-  hashtable_rc_t         hash_rc            = HASH_TABLE_KEY_NOT_EXISTS;
-  nr_gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
-  protocol_ctxt_t        ctxt;
-  NwGtpv1uRcT            rc;
-
-  switch(pUlpApi->apiType) {
-    /* Here there are two type of messages handled:
-     * - T-PDU
-     * - END-MARKER
-     */
-    case NW_GTPV1U_ULP_API_RECV_TPDU: {
-      uint8_t              buffer[4096];
-      uint32_t             buffer_len;
-      //uint16_t             msgType = NW_GTP_GPDU;
-      //NwGtpv1uMsgT     *pMsg = NULL;
-      /* Nw-gptv1u stack has processed a PDU. we can schedule it to PDCP
-       * for transmission.
-       */
-      teid = pUlpApi->apiInfo.recvMsgInfo.teid;
-      //pMsg = (NwGtpv1uMsgT *) pUlpApi->apiInfo.recvMsgInfo.hMsg;
-      //msgType = pMsg->msgType;
-
-      if (NW_GTPV1U_OK != nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
-                                             buffer, &buffer_len)) {
-        LOG_E(GTPU, "Error while retrieving T-PDU");
-      }
-
-      itti_free(TASK_UDP, ((NwGtpv1uMsgT *)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBuf);
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-      gtpv1u_eNB_write_dump_socket(buffer,buffer_len);
-#endif
-      rc = nwGtpv1uMsgDelete(RC.nr_gtpv1u_data_g->gtpv1u_stack,
-                             pUlpApi->apiInfo.recvMsgInfo.hMsg);
-
-      if (rc != NW_GTPV1U_OK) {
-        LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-      }
-
-      hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->teid_mapping, teid, (void **)&gtpv1u_teid_data_p);
-
-      if (hash_rc == HASH_TABLE_OK) {
-// #if defined(LOG_GTPU) && LOG_GTPU > 0
-        LOG_D(GTPU, "Received T-PDU from gtpv1u stack teid  %u size %d -> gnb module id %u ue module id %u pdu session id %u\n",
-              teid,
-              buffer_len,
-              gtpv1u_teid_data_p->gnb_id,
-              gtpv1u_teid_data_p->ue_id,
-              gtpv1u_teid_data_p->pdu_session_id);
-// #endif
-        //warning "LG eps bearer mapping to DRB id to do (offset -4)"
-        PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->gnb_id, GNB_FLAG_YES,  gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->gnb_id);
-        // MSC_LOG_TX_MESSAGE(
-        //   MSC_GTPU_ENB,
-        //   MSC_PDCP_ENB,
-        //   NULL,0,
-        //   MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
-        //   0,0,
-        //   (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
-        //   buffer_len);
-
-        result = pdcp_data_req(
-                   &ctxt,
-                   SRB_FLAG_NO,
-                   1,
-                   0, // mui
-                   SDU_CONFIRM_NO, // confirm
-                   buffer_len,
-                   buffer,
-                   PDCP_TRANSMISSION_MODE_DATA,NULL, NULL
-                 );
-
-        if ( result == FALSE ) {
-            LOG_W(GTPU, "PDCP data request failed\n");
-
-          return NW_GTPV1U_FAILURE;
-        }
-      } else {
-        LOG_W(GTPU, "Received T-PDU from gtpv1u stack teid %u unknown size %u", teid, buffer_len);
-      }
-    }
-    break;
-
-    default: {
-      LOG_E(GTPU, "Received undefined UlpApi (%02x) from gtpv1u stack!\n",
-            pUlpApi->apiType);
-    }
-  } // end of switch
-
-  return NW_GTPV1U_OK;
-}
-
-int nr_gtpv1u_gNB_init(void) {
-  NwGtpv1uRcT             rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uUlpEntityT      ulp;
-  NwGtpv1uUdpEntityT      udp;
-  NwGtpv1uLogMgrEntityT   log;
-  NwGtpv1uTimerMgrEntityT tmr;
-  //  enb_properties_p = enb_config_get()->properties[0];
-  RC.nr_gtpv1u_data_g = (nr_gtpv1u_data_t *)calloc(sizeof(nr_gtpv1u_data_t),1);
-  LOG_I(GTPU, "Initializing GTPU stack %p\n",&RC.nr_gtpv1u_data_g);
-
-  /* Initialize UE hashtable */
-  RC.nr_gtpv1u_data_g->ue_mapping      = hashtable_create (32, NULL, NULL);
-  AssertFatal(RC.nr_gtpv1u_data_g->ue_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create returned %p\n", RC.gtpv1u_data_g->ue_mapping);
-  RC.nr_gtpv1u_data_g->teid_mapping    = hashtable_create (256, NULL, NULL);
-  AssertFatal(RC.nr_gtpv1u_data_g->teid_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create\n");
-  //  RC.gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up         = enb_properties_p->enb_ipv4_address_for_S1U;
-  //gtpv1u_data_g.udp_data;
-  RC.nr_gtpv1u_data_g->seq_num         = 0;
-  RC.nr_gtpv1u_data_g->restart_counter = 0;
-
-  /* Initializing GTPv1-U stack */
-  if ((rc = nwGtpv1uInitialize(&RC.nr_gtpv1u_data_g->gtpv1u_stack, GTPU_STACK_ENB)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "Failed to setup nwGtpv1u stack %x\n", rc);
-    return -1;
-  }
-
-  if ((rc = nwGtpv1uSetLogLevel(RC.nr_gtpv1u_data_g->gtpv1u_stack,
-                                NW_LOG_LEVEL_DEBG)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "Failed to setup loglevel for stack %x\n", rc);
-    return -1;
-  }
-
-  /* Set the ULP API callback. Called once message have been processed by the
-   * nw-gtpv1u stack.
-   */
-  ulp.ulpReqCallback = nr_gtpv1u_gNB_process_stack_req;
-  memset((void *)&(ulp.hUlp), 0, sizeof(NwGtpv1uUlpHandleT));
-
-  if ((rc = nwGtpv1uSetUlpEntity(RC.nr_gtpv1u_data_g->gtpv1u_stack, &ulp)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetUlpEntity: %x", rc);
-    return -1;
-  }
-
-  /* nw-gtpv1u stack requires an udp callback to send data over UDP.
-   * We provide a wrapper to UDP task.
-   */
-  udp.udpDataReqCallback = gtpv1u_eNB_send_udp_msg;
-  memset((void *)&(udp.hUdp), 0, sizeof(NwGtpv1uUdpHandleT));
-
-  if ((rc = nwGtpv1uSetUdpEntity(RC.nr_gtpv1u_data_g->gtpv1u_stack, &udp)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetUdpEntity: %x", rc);
-    return -1;
-  }
-
-  log.logReqCallback = gtpv1u_eNB_log_request;
-  memset((void *)&(log.logMgrHandle), 0, sizeof(NwGtpv1uLogMgrHandleT));
-
-  if ((rc = nwGtpv1uSetLogMgrEntity(RC.nr_gtpv1u_data_g->gtpv1u_stack, &log)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetLogMgrEntity: %x", rc);
-    return -1;
-  }
-
-  /* Timer interface is more complicated as both wrappers doesn't send a message
-   * to the timer task but call the timer API functions start/stop timer.
-   */
-  tmr.tmrMgrHandle     = 0;
-  tmr.tmrStartCallback = gtpv1u_start_timer_wrapper;
-  tmr.tmrStopCallback  = gtpv1u_stop_timer_wrapper;
-
-  if ((rc = nwGtpv1uSetTimerMgrEntity(RC.nr_gtpv1u_data_g->gtpv1u_stack, &tmr)) != NW_GTPV1U_OK) {
-    LOG_E(GTPU, "nwGtpv1uSetTimerMgrEntity: %x", rc);
-    return -1;
-  }
-
-#if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
-
-  if ((ret = gtpv1u_eNB_create_dump_socket()) < 0) {
-    return -1;
-  }
-
-#endif
-  LOG_D(GTPU, "Initializing GTPV1U interface for eNB: DONE\n");
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-int
-gtpv1u_create_ngu_tunnel(
-  const instance_t                              instanceP,
-  const gtpv1u_gnb_create_tunnel_req_t *const  create_tunnel_req_pP,
-  gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_pP)
-{
-  /* Create a new nw-gtpv1-u stack req using API */
-  NwGtpv1uUlpApiT          stack_req;
-  NwGtpv1uRcT              rc                   = NW_GTPV1U_FAILURE;
-  /* Local tunnel end-point identifier */
-  teid_t                   ngu_teid             = 0;
-  nr_gtpv1u_teid_data_t   *gtpv1u_teid_data_p   = NULL;
-  nr_gtpv1u_ue_data_t     *gtpv1u_ue_data_p     = NULL;
-  //MessageDef              *message_p            = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  int                      i;
-  pdusessionid_t           pdusession_id        = 0;
-  //    int                      ipv4_addr            = 0;
-  int                      ip_offset            = 0;
-  in_addr_t                in_addr;
-  int                      addrs_length_in_bytes= 0;
-  int                      loop_counter         = 0;
-  int                      ret                  = 0;
-  MSC_LOG_RX_MESSAGE(
-    MSC_GTPU_GNB,
-    MSC_RRC_GNB,
-    NULL,0,
-    MSC_AS_TIME_FMT" CREATE_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u psid %u upf-ngu teid %u",
-    0,0,create_tunnel_req_pP->rnti, instanceP,
-    create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->pdusession_id[0],
-    create_tunnel_req_pP->outgoing_teid[0]);
-  create_tunnel_resp_pP->rnti        = create_tunnel_req_pP->rnti;
-  create_tunnel_resp_pP->status      = 0;
-  create_tunnel_resp_pP->num_tunnels = 0;
-
-  for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
-    ip_offset               = 0;
-    loop_counter            = 0;
-    pdusession_id = create_tunnel_req_pP->pdusession_id[i];
-    LOG_D(GTPU, "Rx GTPV1U_GNB_CREATE_TUNNEL_REQ ue rnti %x pdu session id %u\n",
-          create_tunnel_req_pP->rnti, pdusession_id);
-    memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-    stack_req.apiType = NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT;
-
-    do {
-      ngu_teid = gtpv1u_new_teid();
-      LOG_D(GTPU, "gtpv1u_create_ngu_tunnel() 0x%x %u(dec)\n", ngu_teid, ngu_teid);
-      stack_req.apiInfo.createTunnelEndPointInfo.teid          = ngu_teid;
-      stack_req.apiInfo.createTunnelEndPointInfo.hUlpSession   = 0;
-      stack_req.apiInfo.createTunnelEndPointInfo.hStackSession = 0;
-      rc = nwGtpv1uProcessUlpReq(RC.nr_gtpv1u_data_g->gtpv1u_stack, &stack_req);
-      LOG_D(GTPU, ".\n");
-      loop_counter++;
-    } while (rc != NW_GTPV1U_OK && loop_counter < 10);
-
-    if ( rc != NW_GTPV1U_OK && loop_counter == 10 ) {
-      LOG_E(GTPU,"NwGtpv1uCreateTunnelEndPoint failed 10 times,start next loop\n");
-      ret = -1;
-      continue;
-    }
-
-    //-----------------------
-    // PDCP->GTPV1U mapping
-    //-----------------------
-    hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, (void **)&gtpv1u_ue_data_p);
-
-    if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_OK)) {
-      if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-        gtpv1u_ue_data_p = calloc (1, sizeof(gtpv1u_ue_data_t));
-        hash_rc = hashtable_insert(RC.nr_gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, gtpv1u_ue_data_p);
-        AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
-      }
-
-      gtpv1u_ue_data_p->ue_id       = create_tunnel_req_pP->rnti;
-      gtpv1u_ue_data_p->instance_id = 0; // TO DO
-      memcpy(&create_tunnel_resp_pP->gnb_addr.buffer,
-             &RC.nr_gtpv1u_data_g->gnb_ip_address_for_NGu_up,
-             sizeof (in_addr_t));
-     
-      LOG_I(GTPU,"Configured GTPu address : %x\n",RC.nr_gtpv1u_data_g->gnb_ip_address_for_NGu_up);
-      create_tunnel_resp_pP->gnb_addr.length = sizeof (in_addr_t);
-      addrs_length_in_bytes = create_tunnel_req_pP->dst_addr[i].length / 8;
-      AssertFatal((addrs_length_in_bytes == 4) ||
-                  (addrs_length_in_bytes == 16) ||
-                  (addrs_length_in_bytes == 20),
-                  "Bad transport layer address length %d (bits) %d (bytes)",
-                  create_tunnel_req_pP->dst_addr[i].length, addrs_length_in_bytes);
-
-      if ((addrs_length_in_bytes == 4) ||
-          (addrs_length_in_bytes == 20)) {
-        in_addr = *((in_addr_t *)create_tunnel_req_pP->dst_addr[i].buffer);
-        ip_offset = 4;
-        gtpv1u_ue_data_p->bearers[pdusession_id - GTPV1U_BEARER_OFFSET].upf_ip_addr = in_addr;
-      }
-
-      if ((addrs_length_in_bytes == 16) ||
-          (addrs_length_in_bytes == 20)) {
-        memcpy(gtpv1u_ue_data_p->bearers[pdusession_id - GTPV1U_BEARER_OFFSET].upf_ip6_addr.s6_addr,
-               &create_tunnel_req_pP->dst_addr[i].buffer[ip_offset],
-               16);
-      }
-
-      gtpv1u_ue_data_p->bearers[pdusession_id - GTPV1U_BEARER_OFFSET].state                  = BEARER_IN_CONFIG;
-      gtpv1u_ue_data_p->bearers[pdusession_id - GTPV1U_BEARER_OFFSET].teid_gNB               = ngu_teid;
-      gtpv1u_ue_data_p->bearers[pdusession_id - GTPV1U_BEARER_OFFSET].teid_gNB_stack_session = stack_req.apiInfo.createTunnelEndPointInfo.hStackSession;
-      gtpv1u_ue_data_p->bearers[pdusession_id - GTPV1U_BEARER_OFFSET].teid_upf               = create_tunnel_req_pP->outgoing_teid[i];
-      gtpv1u_ue_data_p->num_bearers++;
-      create_tunnel_resp_pP->gnb_NGu_teid[i] = ngu_teid;
-
-      LOG_I(GTPU,"Copied to create_tunnel_resp tunnel: index %d target gNB ip %d.%d.%d.%d length %d gtp teid %u\n",
-        i,
-        create_tunnel_resp_pP->gnb_addr.buffer[0],
-        create_tunnel_resp_pP->gnb_addr.buffer[1],
-        create_tunnel_resp_pP->gnb_addr.buffer[2],
-        create_tunnel_resp_pP->gnb_addr.buffer[3],
-        create_tunnel_resp_pP->gnb_addr.length,
-        create_tunnel_resp_pP->gnb_NGu_teid[i]);
-    } else {
-      create_tunnel_resp_pP->gnb_NGu_teid[i] = 0;
-      create_tunnel_resp_pP->status         = 0xFF;
-    }
-
-    create_tunnel_resp_pP->pdusession_id[i] = pdusession_id;
-    create_tunnel_resp_pP->num_tunnels      += 1;
-    //-----------------------
-    // GTPV1U->PDCP mapping
-    //-----------------------
-    hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->teid_mapping, ngu_teid, (void **)&gtpv1u_teid_data_p);
-
-    if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-      gtpv1u_teid_data_p = calloc (1, sizeof(nr_gtpv1u_teid_data_t));
-      gtpv1u_teid_data_p->gnb_id        = 0; // TO DO
-      gtpv1u_teid_data_p->ue_id         = create_tunnel_req_pP->rnti;
-      gtpv1u_teid_data_p->pdu_session_id = pdusession_id;
-      hash_rc = hashtable_insert(RC.nr_gtpv1u_data_g->teid_mapping, ngu_teid, gtpv1u_teid_data_p);
-      AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting teid mapping in GTPV1U hashtable");
-    } else {
-      create_tunnel_resp_pP->gnb_NGu_teid[i] = 0;
-      create_tunnel_resp_pP->status         = 0xFF;
-    }
-  }
-
-  MSC_LOG_TX_MESSAGE(
-    MSC_GTPU_GNB,
-    MSC_RRC_GNB,
-    NULL,0,
-    "0 GTPV1U_GNB_CREATE_TUNNEL_RESP rnti %x teid %x",
-    create_tunnel_resp_pP->rnti,
-    ngu_teid);
-  LOG_D(GTPU, "Tx GTPV1U_GNB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
-        create_tunnel_req_pP->rnti,
-        create_tunnel_resp_pP->status);
-  //return 0;
-  return ret;
-}
-
-int gtpv1u_update_ngu_tunnel(
-  const instance_t                              instanceP,
-  const gtpv1u_gnb_create_tunnel_req_t *const  create_tunnel_req_pP,
-  const rnti_t                                  prior_rnti
-) {
-  /* Local tunnel end-point identifier */
-  teid_t                      ngu_teid             = 0;
-  nr_gtpv1u_teid_data_t      *gtpv1u_teid_data_p   = NULL;
-  nr_gtpv1u_ue_data_t        *gtpv1u_ue_data_p     = NULL;
-  nr_gtpv1u_ue_data_t        *gtpv1u_ue_data_new_p     = NULL;
-  //MessageDef              *message_p            = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  int                      i,j;
-  uint8_t                  bearers_num = 0,bearers_total = 0;
-  //-----------------------
-  // PDCP->GTPV1U mapping
-  //-----------------------
-  hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, prior_rnti, (void **)&gtpv1u_ue_data_p);
-
-  if(hash_rc != HASH_TABLE_OK) {
-    LOG_E(GTPU,"Error get ue_mapping(rnti=%x) from GTPV1U hashtable error\n", prior_rnti);
-    return -1;
-  }
-
-  gtpv1u_ue_data_new_p = calloc (1, sizeof(nr_gtpv1u_ue_data_t));
-  memcpy(gtpv1u_ue_data_new_p,gtpv1u_ue_data_p,sizeof(nr_gtpv1u_ue_data_t));
-  gtpv1u_ue_data_new_p->ue_id       = create_tunnel_req_pP->rnti;
-  hash_rc = hashtable_insert(RC.nr_gtpv1u_data_g->ue_mapping, create_tunnel_req_pP->rnti, gtpv1u_ue_data_new_p);
-
-  //AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
-  if ( hash_rc != HASH_TABLE_OK ) {
-    LOG_E(GTPU,"Failed to insert ue_mapping(rnti=%x) in GTPV1U hashtable\n",create_tunnel_req_pP->rnti);
-    return -1;
-  } else {
-    LOG_I(GTPU, "inserting ue_mapping(rnti=%x) in GTPV1U hashtable\n",
-          create_tunnel_req_pP->rnti);
-  }
-
-  hash_rc = hashtable_remove(RC.nr_gtpv1u_data_g->ue_mapping, prior_rnti);
-  LOG_I(GTPU, "hashtable_remove ue_mapping(rnti=%x) in GTPV1U hashtable\n",
-        prior_rnti);
-  //-----------------------
-  // GTPV1U->PDCP mapping
-  //-----------------------
-  bearers_total =gtpv1u_ue_data_new_p->num_bearers;
-
-  for(j = 0; j<GTPV1U_MAX_BEARERS_ID; j++) {
-    if(gtpv1u_ue_data_new_p->bearers[j].state != BEARER_IN_CONFIG)
-      continue;
-
-    bearers_num++;
-
-    for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
-      if(j == (create_tunnel_req_pP->pdusession_id[i]-GTPV1U_BEARER_OFFSET))
-        break;
-    }
-
-    if(i < create_tunnel_req_pP->num_tunnels) {
-      ngu_teid = gtpv1u_ue_data_new_p->bearers[j].teid_gNB;
-      hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->teid_mapping, ngu_teid, (void **)&gtpv1u_teid_data_p);
-
-      if (hash_rc == HASH_TABLE_OK) {
-        gtpv1u_teid_data_p->ue_id         = create_tunnel_req_pP->rnti;
-        gtpv1u_teid_data_p->pdu_session_id = create_tunnel_req_pP->pdusession_id[i];
-        LOG_I(GTPU, "updata teid_mapping te_id %u (prior_rnti %x rnti %x) in GTPV1U hashtable\n",
-                    ngu_teid,prior_rnti,create_tunnel_req_pP->rnti);
-      } else {
-        LOG_W(GTPU, "Error get teid mapping(s1u_teid=%u) from GTPV1U hashtable", ngu_teid);
-      }
-    } else {
-      ngu_teid = gtpv1u_ue_data_new_p->bearers[j].teid_gNB;
-      hash_rc = hashtable_remove(RC.nr_gtpv1u_data_g->teid_mapping, ngu_teid);
-
-      if (hash_rc != HASH_TABLE_OK) {
-        LOG_D(GTPU, "Removed user rnti %x , enb S1U teid %u not found\n", prior_rnti, ngu_teid);
-      }
-
-      gtpv1u_ue_data_new_p->bearers[j].state = BEARER_DOWN;
-      gtpv1u_ue_data_new_p->num_bearers--;
-      LOG_I(GTPU, "delete teid_mapping te_id %u (rnti%x) bearer_id %d in GTPV1U hashtable\n",
-            ngu_teid,prior_rnti,j+GTPV1U_BEARER_OFFSET);;
-    }
-
-    if(bearers_num > bearers_total)
-      break;
-  }
-
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-int gtpv1u_delete_ngu_tunnel(
-  const instance_t                             instanceP,
-  const gtpv1u_gnb_delete_tunnel_req_t *const req_pP) {
-  NwGtpv1uUlpApiT          stack_req;
-  NwGtpv1uRcT              rc                   = NW_GTPV1U_FAILURE;
-  MessageDef              *message_p = NULL;
-  nr_gtpv1u_ue_data_t     *gtpv1u_ue_data_p     = NULL;
-  hashtable_rc_t           hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  teid_t                   teid_gNB             = 0;
-  int                      pdusession_index     = 0;
-  message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP);
-  GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti     = req_pP->rnti;
-  GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status       = 0;
-  hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p);
-
-  if (hash_rc == HASH_TABLE_OK) {
-    for (pdusession_index = 0; pdusession_index < req_pP->num_pdusession; pdusession_index++) {
-      teid_gNB = gtpv1u_ue_data_p->bearers[req_pP->pdusession_id[pdusession_index] - GTPV1U_BEARER_OFFSET].teid_gNB;
-      LOG_D(GTPU, "Rx GTPV1U_ENB_DELETE_TUNNEL user rnti %x eNB S1U teid %u eps bearer id %u\n",
-            req_pP->rnti, teid_gNB, req_pP->pdusession_id[pdusession_index]);
-      {
-        memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-        stack_req.apiType = NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT;
-        LOG_D(GTPU, "gtpv1u_delete_ngu_tunnel pdusession %u  %u\n",
-              req_pP->pdusession_id[pdusession_index],
-              teid_gNB);
-        stack_req.apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle =
-            gtpv1u_ue_data_p->bearers[req_pP->pdusession_id[pdusession_index] - GTPV1U_BEARER_OFFSET].teid_gNB_stack_session;
-        rc = nwGtpv1uProcessUlpReq(RC.nr_gtpv1u_data_g->gtpv1u_stack, &stack_req);
-        LOG_D(GTPU, ".\n");
-      }
-
-      if (rc != NW_GTPV1U_OK) {
-        GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status       |= 0xFF;
-        LOG_E(GTPU, "NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT failed");
-      }
-
-      //-----------------------
-      // PDCP->GTPV1U mapping
-      //-----------------------
-      gtpv1u_ue_data_p->bearers[req_pP->pdusession_id[pdusession_index] - GTPV1U_BEARER_OFFSET].state       = BEARER_DOWN;
-      gtpv1u_ue_data_p->bearers[req_pP->pdusession_id[pdusession_index] - GTPV1U_BEARER_OFFSET].teid_gNB    = 0;
-      gtpv1u_ue_data_p->bearers[req_pP->pdusession_id[pdusession_index] - GTPV1U_BEARER_OFFSET].teid_upf    = 0;
-      gtpv1u_ue_data_p->bearers[req_pP->pdusession_id[pdusession_index] - GTPV1U_BEARER_OFFSET].upf_ip_addr = 0;
-      gtpv1u_ue_data_p->num_bearers -= 1;
-
-      if (gtpv1u_ue_data_p->num_bearers == 0) {
-        hash_rc = hashtable_remove(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti);
-        LOG_D(GTPU, "Removed user rnti %x,no more bearers configured\n", req_pP->rnti);
-      }
-
-      //-----------------------
-      // GTPV1U->PDCP mapping
-      //-----------------------
-      hash_rc = hashtable_remove(RC.nr_gtpv1u_data_g->teid_mapping, teid_gNB);
-
-      if (hash_rc != HASH_TABLE_OK) {
-        LOG_D(GTPU, "Removed user rnti %x , gNB NGU teid %u not found\n", req_pP->rnti, teid_gNB);
-      }
-    }
-  }// else silently do nothing
-
-  LOG_D(GTPU, "Tx GTPV1U_GNB_DELETE_TUNNEL_RESP user rnti %x gNB NGU teid %u status %u\n",
-        GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti,
-        GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).gnb_NGu_teid,
-        GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status);
-  MSC_LOG_TX_MESSAGE(
-    MSC_GTPU_GNB,
-    MSC_RRC_GNB,
-    NULL,0,
-    "0 GTPV1U_GNB_DELETE_TUNNEL_RESP rnti %x teid %x",
-    GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti,
-    teid_gNB);
-  return itti_send_msg_to_task(TASK_RRC_GNB, instanceP, message_p);
-}
-
-//-----------------------------------------------------------------------------
-static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) {
-  // Create and alloc new message
-  MessageDef *message_p;
-  struct in_addr addr= {0};
-  message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT);
-
-  if (message_p == NULL) {
-    return -1;
-  }
-
-  UDP_INIT(message_p).port = req->gnb_port_for_NGu_up;
-  addr.s_addr = req->gnb_ip_address_for_NGu_up;
-  UDP_INIT(message_p).address = inet_ntoa(addr);
-  LOG_I(GTPU, "Tx UDP_INIT IP addr %s (%x)\n", UDP_INIT(message_p).address,UDP_INIT(message_p).port);
-  MSC_LOG_EVENT(
-    MSC_GTPU_ENB,
-    "0 UDP bind  %s:%u",
-    UDP_INIT(message_p).address,
-    UDP_INIT(message_p).port);
-  return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
-}
-
-static int gtpv1u_ng_req(
-  const instance_t                             instanceP,
-  const Gtpv1uNGReq *const req) {
-  memcpy(&RC.nr_gtpv1u_data_g->gnb_ip_address_for_NGu_up,
-         &req->gnb_ip_address_for_NGu_up,
-         sizeof (req->gnb_ip_address_for_NGu_up));
-  gtpv1u_gNB_send_init_udp(req);
-  return 0;
-}
-
-static int gtpv1u_gnb_tunnel_data_req(gtpv1u_gnb_tunnel_data_req_t *gnb_tunnel_data_req) {
-  gtpv1u_gnb_tunnel_data_req_t *data_req_p           = NULL;
-  NwGtpv1uUlpApiT               stack_req;
-  NwGtpv1uRcT                   rc                   = NW_GTPV1U_FAILURE;
-  hashtable_rc_t                hash_rc              = HASH_TABLE_KEY_NOT_EXISTS;
-  nr_gtpv1u_ue_data_t          *gtpv1u_ue_data_p     = NULL;
-  teid_t                        gnb_ngu_teid         = 0;
-  teid_t                        outgoing_teid         = 0;
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_IN);
-  data_req_p = gnb_tunnel_data_req;
-
-  memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
-  hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, (uint64_t)data_req_p->rnti, (void **)&gtpv1u_ue_data_p);
-
-  if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
-    LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: while getting ue rnti %x in hashtable ue_mapping\n", data_req_p->rnti);
-  } else {
-    if ((data_req_p->pdusession_id >= GTPV1U_BEARER_OFFSET) && (data_req_p->pdusession_id < max_val_NR_DRB_Identity)) {
-      gnb_ngu_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->pdusession_id - GTPV1U_BEARER_OFFSET].teid_gNB;
-      outgoing_teid                        = gtpv1u_ue_data_p->bearers[data_req_p->pdusession_id - GTPV1U_BEARER_OFFSET].teid_upf;
-      stack_req.apiType                   = NW_GTPV1U_ULP_API_SEND_TPDU;
-      stack_req.apiInfo.sendtoInfo.teid   = outgoing_teid;
-      stack_req.apiInfo.sendtoInfo.ipAddr = gtpv1u_ue_data_p->bearers[data_req_p->pdusession_id - GTPV1U_BEARER_OFFSET].upf_ip_addr;
-      rc = nwGtpv1uGpduMsgNew(
-              RC.nr_gtpv1u_data_g->gtpv1u_stack,
-              outgoing_teid,
-              NW_FALSE,
-              RC.nr_gtpv1u_data_g->seq_num++,
-              data_req_p->buffer,
-              data_req_p->length,
-              data_req_p->offset,
-              &(stack_req.apiInfo.sendtoInfo.hMsg));
-
-      if (rc != NW_GTPV1U_OK) {
-        LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
-        MSC_LOG_EVENT(MSC_GTPU_GNB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                      gnb_ngu_teid,outgoing_teid,data_req_p->length);
-        (void)gnb_ngu_teid; /* avoid gcc warning "set but not used" */
-      } else {
-        rc = nwGtpv1uProcessUlpReq(RC.nr_gtpv1u_data_g->gtpv1u_stack, &stack_req);
-
-        if (rc != NW_GTPV1U_OK) {
-          LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
-          MSC_LOG_EVENT(MSC_GTPU_GNB,"0 Failed send G-PDU ltid %u rtid %u size %u",
-                        gnb_ngu_teid,outgoing_teid,data_req_p->length);
-        } else {
-          MSC_LOG_TX_MESSAGE(
-            MSC_GTPU_GNB,
-            MSC_GTPU_SGW,
-            NULL,
-            0,
-            MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
-            0,0,
-            gnb_ngu_teid,
-            outgoing_teid,
-            data_req_p->length);
-        }
-
-        rc = nwGtpv1uMsgDelete(RC.nr_gtpv1u_data_g->gtpv1u_stack,
-                                stack_req.apiInfo.sendtoInfo.hMsg);
-
-        if (rc != NW_GTPV1U_OK) {
-          LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
-        }
-      }
-    }
-  }
-
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
-  /* Buffer still needed, do not free it */
-  //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer);
-
-  return 0;
-}
-
-//-----------------------------------------------------------------------------
-void *gtpv1u_gNB_process_itti_msg(void *notUsed) {
-  /* Trying to fetch a message from the message queue.
-   * If the queue is empty, this function will block till a
-   * message is sent to the task.
-   */
-  instance_t  instance;
-  MessageDef *received_message_p = NULL;
-  int         rc = 0;
-  itti_receive_msg(TASK_GTPV1_U, &received_message_p);
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN);
-  DevAssert(received_message_p != NULL);
-  instance = received_message_p->ittiMsgHeader.originInstance;
-
-  switch (ITTI_MSG_ID(received_message_p)) {
-    case GTPV1U_GNB_NG_REQ:
-      gtpv1u_ng_req(instance, &received_message_p->ittiMsg.gtpv1uNGReq);
-      break;
-
-    case GTPV1U_GNB_DELETE_TUNNEL_REQ:
-      gtpv1u_delete_ngu_tunnel(instance, &received_message_p->ittiMsg.NRGtpv1uDeleteTunnelReq);
-      break;
-
-    // DATA COMING FROM UDP
-    case UDP_DATA_IND: {
-      udp_data_ind_t *udp_data_ind_p;
-      udp_data_ind_p = &received_message_p->ittiMsg.udp_data_ind;
-      nwGtpv1uProcessUdpReq(RC.nr_gtpv1u_data_g->gtpv1u_stack,
-                            udp_data_ind_p->buffer,
-                            udp_data_ind_p->buffer_length,
-                            udp_data_ind_p->peer_port,
-                            udp_data_ind_p->peer_address);
-    }
-    break;
-
-    // DATA TO BE SENT TO UDP
-    case GTPV1U_GNB_TUNNEL_DATA_REQ:
-      LOG_I(GTPU, "Received message %s\n", ITTI_MSG_NAME(received_message_p));
-      gtpv1u_gnb_tunnel_data_req(&GTPV1U_GNB_TUNNEL_DATA_REQ(received_message_p));
-      break;
-
-    case TERMINATE_MESSAGE: {
-      if (RC.nr_gtpv1u_data_g->ue_mapping != NULL) {
-        hashtable_destroy (&(RC.nr_gtpv1u_data_g->ue_mapping));
-      }
-
-      if (RC.nr_gtpv1u_data_g->teid_mapping != NULL) {
-        hashtable_destroy (&(RC.nr_gtpv1u_data_g->teid_mapping));
-      }
-
-      LOG_W(GTPU, " *** Exiting GTPU thread\n");
-      itti_exit_task();
-    }
-    break;
-
-    case TIMER_HAS_EXPIRED:
-      nwGtpv1uProcessTimeout(&received_message_p->ittiMsg.timer_has_expired.arg);
-      break;
-
-    default: {
-      LOG_E(GTPU, "Unkwnon message ID %d:%s\n",
-            ITTI_MSG_ID(received_message_p),
-            ITTI_MSG_NAME(received_message_p));
-    }
-    break;
-  }
-
-  rc = itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
-  AssertFatal(rc == EXIT_SUCCESS, "Failed to free memory (%d)!\n", rc);
-  received_message_p = NULL;
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_OUT);
-  return NULL;
-}
-
-void *nr_gtpv1u_gNB_task(void *args) {
-  int rc = 0;
-  rc = nr_gtpv1u_gNB_init();
-  AssertFatal(rc == 0, "gtpv1u_gNB_init Failed");
-  itti_mark_task_ready(TASK_GTPV1_U);
-  MSC_START_USE();
-
-  while(1) {
-    (void) gtpv1u_gNB_process_itti_msg (NULL);
-  }
-
-  return NULL;
-}
diff --git a/openair3/GTPV1-U/gtpv1u_gNB_defs.h b/openair3/GTPV1-U/gtpv1u_gNB_defs.h
deleted file mode 100644
index d4356aa3cf66ff5e2a24192c20c5fcc4256a21c8..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u_gNB_defs.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file gtpv1u_gNB_defs.h
- * \brief 
- * \author Yoshio INOUE, Masayuki HARADA
- * \date 2020
- * \version 0.1
- * \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com
- *         (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com) 
- */
-
-#include "hashtable.h"
-#include "NR_asn_constant.h"
-
-#ifndef GTPV1U_GNB_DEFS_H_
-#define GTPV1U_GNB_DEFS_H_
-
-#include "NwGtpv1u.h"
-
-#define GTPV1U_UDP_PORT (2152)
-
-#define NR_GTPV1U_MAX_BEARERS_ID     (max_val_NR_DRB_Identity - 3)
-
-#define GTPV1U_SOURCE_GNB (0)
-#define GTPV1U_TARGET_GNB (1)
-#define GTPV1U_MSG_FROM_SOURCE_GNB (0)
-#define GTPV1U_MSG_FROM_UPF (1)
-
-
-typedef struct nr_gtpv1u_teid_data_s {
-  /* UE identifier for oaisim stack */
-  module_id_t     gnb_id;
-  rnti_t          ue_id;
-  pdusessionid_t  pdu_session_id;
-} nr_gtpv1u_teid_data_t;
-
-
-typedef struct nr_gtpv1u_bearer_s {
-  /* TEID used in dl and ul */
-  teid_t          teid_gNB;                ///< gNB TEID
-  uintptr_t       teid_gNB_stack_session;  ///< gNB TEID
-  teid_t          teid_upf;                ///< Remote TEID
-  in_addr_t       upf_ip_addr;
-  struct in6_addr upf_ip6_addr;
-  teid_t          teid_tgNB;
-  in_addr_t       tgnb_ip_addr;				///< target gNB ipv4
-  struct in6_addr tgnb_ip6_addr;				///< target gNB ipv6
-  tcp_udp_port_t  port;
-  //NwGtpv1uStackSessionHandleT stack_session;
-  bearer_state_t state;
-} nr_gtpv1u_bearer_t;
-
-typedef struct nr_gtpv1u_ue_data_s {
-  /* UE identifier for oaisim stack */
-  rnti_t   ue_id;
-
-  /* Unique identifier used between PDCP and GTP-U to distinguish UEs */
-  uint32_t instance_id;
-  int      num_bearers;
-  /* Bearer related data.
-   * Note that the first LCID available for data is 3 and we fixed the maximum
-   * number of e-rab per UE to be (32 [id range]), max RB is 11. The real rb id will 3 + rab_id (3..32).
-   */
-  nr_gtpv1u_bearer_t bearers[NR_GTPV1U_MAX_BEARERS_ID];
-
-  //RB_ENTRY(gtpv1u_ue_data_s) gtpv1u_ue_node;
-} nr_gtpv1u_ue_data_t;
-
-typedef struct nr_gtpv1u_data_s {
-  /* nwgtpv1u stack internal data */
-  NwGtpv1uStackHandleT  gtpv1u_stack;
-
-  /* RB tree of UEs */
-  hash_table_t         *ue_mapping;   // PDCP->GTPV1U
-  hash_table_t         *teid_mapping; // GTPV1U -> PDCP
-
-  //RB_HEAD(gtpv1u_ue_map, gtpv1u_ue_data_s) gtpv1u_ue_map_head;
-  /* Local IP address to use */
-  in_addr_t             gnb_ip_address_for_NGu_up;
-  /* UDP internal data */
-  //udp_data_t            udp_data;
-
-  uint16_t              seq_num;
-  uint8_t               restart_counter;
-
-} nr_gtpv1u_data_t;
-
-
-#endif /* GTPV1U_GNB_DEFS_H_ */
diff --git a/openair3/GTPV1-U/gtpv1u_sgw_defs.h b/openair3/GTPV1-U/gtpv1u_sgw_defs.h
deleted file mode 100644
index 1d62c18bf62b1c2cdd140f1aac73cf0d7e30dec2..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u_sgw_defs.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-#ifndef GTPV1U_SGW_DEFS_H_
-#define GTPV1U_SGW_DEFS_H_
-
-#include "mme_config.h"
-#include "NwGtpv1u.h"
-#include "gtpv1u.h"
-#include "hashtable.h"
-#include "common_types.h"
-
-#define GTPV1U_UDP_PORT (2152)
-
-#define MAX_BEARERS_PER_UE (11)
-
-typedef enum {
-  BEARER_DOWN = 0,
-  BEARER_IN_CONFIG,
-  BEARER_UP,
-  BEARER_DL_HANDOVER,
-  BEARER_UL_HANDOVER,
-  BEARER_MAX,
-} bearer_state_t;
-
-#define BUFFER_TO_uint32_t(buf, x) \
-do {                            \
-    x = ((uint32_t)((buf)[0]) ) |      \
-        ((uint32_t)((buf)[1]) << 8) |      \
-        ((uint32_t)((buf)[2]) << 16)  |      \
-        ((uint32_t)((buf)[3]) << 24);             \
-} while(0)
-
-
-
-typedef struct gtpv1u_teid2enb_info_s {
-  /* TEID used in dl and ul */
-  uint32_t       teid_enb;         ///< Remote eNB TEID
-  ip_address_t   enb_ip_addr;
-  bearer_state_t state;
-  uint16_t       port; /// LG ???
-} gtpv1u_teid2enb_info_t;
-
-/*struct gtpv1u_ue_data_s {
-    // UE identifier for oaisim stack
-    uint8_t  ue_id;
-
-    // Unique identifier used between PDCP and GTP-U to distinguish UEs
-    uint32_t instance_id;
-
-    // Bearer related data.
-     // Note that the first LCID available for data is 3 and we fixed the maximum
-     // number of e-rab per UE to be 11. The real rb id will 3 + rab_id (0..10).
-     //
-    struct gtpv1u_bearer_s bearers[MAX_BEARERS_PER_UE];
-
-    RB_ENTRY(gtpv1u_ue_data_s) gtpv1u_ue_node;
-};*/
-
-typedef struct {
-  /* nwgtpv1u stack internal data */
-  NwGtpv1uStackHandleT  gtpv1u_stack;
-  /* RB tree of UEs */
-  //RB_HEAD(gtpv1u_ue_map, gtpv1u_ue_data_s) gtpv1u_ue_map_head;
-  /* Local IP address to use */
-  uint32_t  sgw_ip_address_for_S1u_S12_S4_up;
-  char                 *ip_addr;
-
-  uint16_t              seq_num;
-  uint8_t               restart_counter;
-  //gtpv1u_teid2enb_info_t* teid2enb_mapping[];
-  hash_table_t         *S1U_mapping;
-
-} gtpv1u_data_t;
-
-
-int gtpv1u_init(const mme_config_t *mme_config);
-
-#endif /* GTPV1U_SGW_DEFS_H_ */
diff --git a/openair3/GTPV1-U/gtpv1u_teid_pool.c b/openair3/GTPV1-U/gtpv1u_teid_pool.c
deleted file mode 100644
index ff0ac6f1839040f582ddbeaff7f91153b2a9a9e7..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/gtpv1u_teid_pool.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file gtpv1u_task.c
-* \brief
-* \author Lionel Gauthier
-* \company Eurecom
-* \email: lionel.gauthier@eurecom.fr
-*/
-#include <stdlib.h>
-#include <stdint.h>
-
-#include "gtpv1u.h"
-
-//#define GTPV1U_LINEAR_TEID_ALLOCATION 1
-
-#ifdef GTPV1U_LINEAR_TEID_ALLOCATION
-static uint32_t g_gtpv1u_teid = 0;
-#endif
-
-uint32_t gtpv1u_new_teid(void)
-{
-#ifdef GTPV1U_LINEAR_TEID_ALLOCATION
-  g_gtpv1u_teid = g_gtpv1u_teid + 1;
-  return g_gtpv1u_teid;
-#else
-  return random() + random() % (RAND_MAX - 1) + 1;
-#endif
-}
diff --git a/openair3/GTPV1-U/nw-gtpv1u/AUTHORS b/openair3/GTPV1-U/nw-gtpv1u/AUTHORS
deleted file mode 100644
index b068a40fddffeac00e275caa3b266878b6043b0a..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Amit Chawre
diff --git a/openair3/GTPV1-U/nw-gtpv1u/COPYING b/openair3/GTPV1-U/nw-gtpv1u/COPYING
deleted file mode 100644
index d27832d6c118e514fabc7c05adc32d64b63961a0..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/COPYING
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright (c) 2010-2011 Amit Chawre <http://www.amitchawre.net/contact.html>
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
-derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/ChangeLog b/openair3/GTPV1-U/nw-gtpv1u/ChangeLog
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/openair3/GTPV1-U/nw-gtpv1u/NEWS b/openair3/GTPV1-U/nw-gtpv1u/NEWS
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/openair3/GTPV1-U/nw-gtpv1u/README b/openair3/GTPV1-U/nw-gtpv1u/README
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h
deleted file mode 100644
index 3fb5c8dd052f12b446dacb201a73958f19bc2531..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 u    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#ifndef __NW_GTPV1U_LOG_H__
-#define __NW_GTPV1U_LOG_H__
-
-#include <stdio.h>
-#include "NwLog.h"
-
-/**
- * @file NwGtpv1uLog.h
- * @brief This header contains logging related definitions.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------
- * Log Macro Definition
- *--------------------------------------------------------------------------*/
-
-#define NW_LOG(_gtpv1uHandle, _logLevel, ...)                           \
-  do {                                                                  \
-    if(((NwGtpv1uStackT*)(_gtpv1uHandle))->logLevel >= _logLevel)       \
-    {                                                                   \
-      char _logBuf[1024];                                               \
-      snprintf(_logBuf, 1024, __VA_ARGS__);                             \
-      ((NwGtpv1uStackT*)(_gtpv1uHandle))->logMgr.logReqCallback(((NwGtpv1uStackT*)_gtpv1uHandle)->logMgr.logMgrHandle, _logLevel, __FILE__, __LINE__, _logBuf);\
-    }                                                                   \
-  } while(0)
-
-#define NW_ENTER(_gtpv1uHandle)                                       \
-  do {                                                                  \
-    NW_LOG(_gtpv1uHandle, NW_LOG_LEVEL_DEBG, "Entering '%s'", __func__);\
-  } while(0)
-
-#define NW_LEAVE(_gtpv1uHandle)                                       \
-  do {                                                                  \
-    NW_LOG(_gtpv1uHandle, NW_LOG_LEVEL_DEBG, "Leaving '%s'", __func__);\
-  } while(0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NW_TYPES_H__ */
-
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h
deleted file mode 100644
index 59ffb1e1746188e9e1f263e337f9e5c5b416933a..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *                             n w - g t p v 2 u                              *
- *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#ifndef __NW_GTPV1U_PRIVATE_H__
-#define __NW_GTPV1U_PRIVATE_H__
-
-#include "tree.h"
-#include "queue.h"
-
-#include "NwTypes.h"
-#include "NwGtpv1uError.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uMsg.h"
-
-
-/**
- * @file NwGtpv1uPrivate.h
- * @brief This header file contains nw-gtpv1u private definitions not to be
- * exposed to user application.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NW_GTPV1U_MALLOC(_stack, _size, _mem, _type)                    \
-  do {                                                                  \
-    if(((NwGtpv1uStackT*)(_stack))->memMgr.memAlloc && ((NwGtpv1uStackT*)(_stack))->memMgr.memFree )\
-    {                                                                   \
-      _mem = (_type) ((NwGtpv1uStackT*) (_stack))->memMgr.memAlloc(((NwGtpv1uStackT*) (_stack))->memMgr.hMemMgr, _size, __FILE__, __LINE__);\
-    }                                                                   \
-    else                                                                \
-    {                                                                   \
-      _mem = (_type) malloc (_size);                                    \
-    }                                                                   \
-  } while (0)
-
-/*--------------------------------------------------------------------------*
- *    G T P U   S T A C K   O B J E C T   T Y P E    D E F I N I T I O N    *
- *--------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------*
- * GRPS Tunneling Protocol Stack Class Definition
- *--------------------------------------------------------------------------*/
-
-/**
- * gtpv1u stack class definition
- */
-
-typedef struct NwGtpv1uStack {
-  uint32_t                        stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW   */
-  NwPtrT                        id;
-  uint32_t                        seq;
-  NwGtpv1uUlpEntityT            ulp;
-  NwGtpv1uUdpEntityT            udp;
-  NwGtpv1uMemMgrEntityT         memMgr;
-  NwGtpv1uTimerMgrEntityT       tmrMgr;
-  NwGtpv1uLogMgrEntityT         logMgr;
-  uint32_t                        logLevel;
-  RB_HEAD( NwGtpv1uOutstandingTxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingTxSeqNumMap;
-  RB_HEAD( NwGtpv1uOutstandingRxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingRxSeqNumMap;
-  RB_HEAD(NwGtpv1uTunnelEndPointTMap, NwGtpv1uTunnelEndPoint) sessionMap;
-  RB_HEAD(NwGtpv1uTunnelEndPointIdentifierMap, NwGtpv1uTunnelEndPoint) teidMap;
-} NwGtpv1uStackT;
-
-/**
- * GTP Tunnel End Point class definition
- */
-
-typedef struct NwGtpv1uTunnelEndPoint {
-  uint32_t                        teid;                                   /**< Gtpu Tunnel End Point Identifier   */
-  uint32_t                        peerAddr;                               /**< Peer IP address for the session    */
-  NwGtpv1uStackT*               pStack;                                 /**< Pointer to the parent stack        */
-  NwGtpv1uUlpSessionHandleT     hUlpSession;                            /**< ULP session handle for the session */
-  RB_ENTRY (NwGtpv1uTunnelEndPoint)    sessionMapRbtNode;               /**< RB Tree Data Structure Node        */
-  struct NwGtpv1uTunnelEndPoint *next;
-} NwGtpv1uTunnelEndPointT;
-
-
-/*--------------------------------------------------------------------------*
- * Timeout Info Type Definition
- *--------------------------------------------------------------------------*/
-
-/**
- * gtpv1u timeout info
- */
-
-typedef struct NwGtpv1uTimeoutInfo {
-  NwGtpv1uStackHandleT hStack;
-  void* timeoutArg;
-  NwGtpv1uRcT (*timeoutCallbackFunc)(void*);
-} NwGtpv1uTimeoutInfoT;
-
-/**
- * Start a transaction response timer
- *
- * @param[in] thiz Pointer to stack instance
- * @param[in] timeoutArg Arg to timeout function.
- * @param[out] phTmr Pointer to timer handle.
- * @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpStartTrxnPeerRspTimer(NwGtpv1uStackT* thiz, NwGtpv1uTimeoutInfoT* timeoutInfo, NwGtpv1uTimerHandleT* phTmr);
-
-/**
- * Stop a transaction response timer
- *
- * @param[in] thiz Pointer to stack instance
- * @param[out] phTmr Pointer to timer handle.
- * @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpStopTrxnPeerRspTimer(NwGtpv1uStackT* thiz, NwGtpv1uTimerHandleT* phTmr);
-
-
-#define NW_GTPV1U_MAX_MSG_LEN                                    (4096)  /**< Maximum supported gtpv1u packet length including header */
-
-/**
- * NwGtpv1uMsgT holds gtpv1u messages to/from the peer.
- */
-typedef struct NwGtpv1uMsg {
-  uint8_t         version;
-  uint8_t         protocolType;
-  uint8_t         extHdrFlag;
-  uint8_t         seqNumFlag;
-  uint16_t        npduNumFlag;
-  uint32_t        msgType;
-  uint16_t        msgLen;
-  uint32_t        teid;
-  uint16_t        seqNum;
-  uint8_t         npduNum;
-  uint8_t         nextExtHdrType;
-  uint8_t*        msgBuf;
-  uint32_t        msgBufLen;
-  uint32_t        msgBufOffset;
-  struct NwGtpv1uMsg* next;
-} NwGtpv1uMsgT;
-
-
-/*--------------------------------------------------------------------------*
- * R6/R4 Transaction Context Type Definition
- *--------------------------------------------------------------------------*/
-
-/**
- * Transaction structure
- */
-
-typedef struct NwGtpv1uTrxn {
-  uint32_t                        seqNum;
-  uint32_t                        peerIp;
-  uint32_t                        peerPort;
-  uint8_t                         maxRetries;
-  uint8_t                         t3Timer;
-  NwGtpv1uTimerHandleT          hRspTmr;
-  NwGtpv1uTimeoutInfoT          peerRspTimeoutInfo;
-  NwGtpv1uStackT*               pStack;
-  NwGtpv1uTunnelEndPointT*      pSession;
-  uint32_t                        hUlpTrxn;
-  NwGtpv1uMsgT*                 pMsg;
-  RB_ENTRY (NwGtpv1uTrxn)       outstandingTxSeqNumMapRbtNode;            /**< RB Tree Data Structure Node        */
-  RB_ENTRY (NwGtpv1uTrxn)       outstandingRxSeqNumMapRbtNode;            /**< RB Tree Data Structure Node        */
-  struct NwGtpv1uTrxn*          next;
-} NwGtpv1uTrxnT;
-
-
-/**
- * GTPv2 message header structure
- */
-
-#pragma pack(1)
-
-typedef struct NwGtpv1uMsgHeader {
-  uint8_t PN:1;
-  uint8_t S:1;
-  uint8_t E:1;
-  uint8_t spare:1;
-  uint8_t PT:1;
-  uint8_t version:3;
-  uint8_t msgType;
-  uint16_t msgLength;
-  uint32_t teid;
-} NwGtpv1uMsgHeaderT;
-
-#pragma pack()
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* __NW_GTPV1U_PRIVATE_H__ */
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h
deleted file mode 100644
index 76228416a96a1ee2cd72aeeaecb9c95b00fe13ca..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 u    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file NwGtpv1uTrxn.h
- * @author Amit Chawre
- * @brief
- *
- * This header file contains required definitions and functions
- * prototypes used by gtpv1u transactions.
- *
- **/
-
-
-#ifndef __NW_GTPV1U_TRXN_H__
-#define __NW_GTPV1U_TRXN_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NwGtpv1uRcT
-nwGtpv1uTrxnNew( NW_IN  NwGtpv1uStackT* thiz,
-                 NW_OUT NwGtpv1uTrxnT **ppTrxn);
-
-
-NwGtpv1uRcT
-nwGtpv1uTrxnWithSeqNew( NW_IN  NwGtpv1uStackT* thiz,
-                        NW_IN  uint32_t seqNum,
-                        NW_OUT NwGtpv1uTrxnT **ppTrxn);
-
-NwGtpv1uRcT
-nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **ppTrxn);
-
-NwGtpv1uRcT
-nwGtpv1uTrxnNew( NW_IN  NwGtpv1uStackT* thiz,
-                 NW_OUT NwGtpv1uTrxnT **ppTrxn);
-
-NwGtpv1uRcT
-nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz);
-
-NwGtpv1uRcT
-nwGtpv1uTrxnCreateAndSendMsg( NW_IN  NwGtpv1uStackT* thiz,
-                              NW_IN  NwGtpv1uTrxnT *pTrxn,
-                              NW_IN  uint32_t peerIp,
-                              NW_IN  uint32_t peerPort,
-                              NW_IN  NwGtpv1uMsgT *pMsg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NW_GTPV1U_TRXN_H__ */
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h
deleted file mode 100644
index dc4fbab26423043cada719fc3948f7b663c0272a..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "NwTypes.h"
-#include "NwUtils.h"
-#include "NwGtpv1uError.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwGtpv1uMsg.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uLog.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifndef __NW_GTPV1U_CONNECTION_H__
-#define __NW_GTPV1U_CONNECTION_H__
-
-/**
-  Constructor
-
-  @return Pointer to session on success, NULL n failure.
- */
-
-NwGtpv1uTunnelEndPointT*
-nwGtpTunnelEndPointNew(struct NwGtpv1uStack* pStack);
-
-/**
-  Destructor
-
-  @param[in] thiz: Pointer to session
-  @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpTunnelEndPointDestroy(struct NwGtpv1uStack* pStack, NwGtpv1uTunnelEndPointT* thiz);
-
-NwGtpv1uRcT
-nwGtpSessionSendMsgApiToUlpEntity(NwGtpv1uTunnelEndPointT* thiz,
-                                  NwGtpv1uMsgT *pMsg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h
deleted file mode 100644
index c6f7c3d6facc1de1197e81e0939f2be7326ce3c1..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h
+++ /dev/null
@@ -1,562 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#ifndef __NW_GTPV1U_H__
-#define __NW_GTPV1U_H__
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include "NwTypes.h"
-#include "NwGtpv1uError.h"
-
-
-/**
- * @file NwGtpv1u.h
- * @author Amit Chawre
- * @brief
- *
- * This header file contains all required definitions and functions
- * prototypes for using nw-gtpv1u library.
- *
- **/
-
-#define NW_GTPU_VERSION                                         (0x01)
-#define NW_GTP_PROTOCOL_TYPE_GTP                                (0x01)
-#define NW_GTP_PROTOCOL_TYPE_GTP_PRIME                          (0x00)
-
-/*--------------------------------------------------------------------------*
- *                   S H A R E D     A P I    M A C R O S                   *
- *--------------------------------------------------------------------------*/
-
-#define NW_GTP_ECHO_REQ                                         (1)
-#define NW_GTP_ECHO_RSP                                         (2)
-#define NW_GTP_ERROR_INDICATION                                 (26)
-#define NW_GTP_SUPPORTED_EXTENSION_HEADER_INDICATION            (31)
-#define NW_GTP_END_MARKER                                       (254)
-#define NW_GTP_GPDU                                             (255)
-
-/*---------------------------------------------------------------------------
- * Opaque Gtpv2 Stack Handles
- *--------------------------------------------------------------------------*/
-
-typedef NwPtrT  NwGtpv1uStackHandleT;                     /**< Gtpv2 Stack Handle               */
-typedef NwPtrT  NwGtpv1uUlpHandleT;                       /**< Gtpv2 Stack Ulp Entity Handle    */
-typedef NwPtrT  NwGtpv1uUdpHandleT;                       /**< Gtpv2 Stack Udp Entity Handle    */
-typedef NwPtrT  NwGtpv1uMemMgrHandleT;                    /**< Gtpv2 Stack Mem Manager Handle   */
-typedef NwPtrT  NwGtpv1uTimerMgrHandleT;                  /**< Gtpv2 Stack Timer Manager Handle */
-typedef NwPtrT  NwGtpv1uLogMgrHandleT;                    /**< Gtpv2 Stack Log Mnagaer Handle   */
-typedef NwPtrT  NwGtpv1uTimerHandleT;                     /**< Gtpv2 Stack Timer Handle         */
-typedef NwPtrT  NwGtpv1uMsgHandleT;                       /**< Gtpv2 Msg Handle                 */
-
-typedef struct NwGtpv1uStackConfig {
-  uint16_t udpSrcPort;
-} NwGtpv1uStackConfigT;
-
-/*--------------------------------------------------------------------------*
- *            S T A C K        A P I      D E F I N I T I O N S             *
- *--------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------
- * Gtpv2 Stack ULP API type definitions
- *--------------------------------------------------------------------------*/
-
-/**
- * APIs types between ULP and Stack
- */
-
-typedef enum {
-  /* APIs from ULP to stack */
-
-  NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT = 0x00000000,        /**< Create a local teid context on stack       */
-  NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT,                    /**< Delete a local teid context on stack       */
-  NW_GTPV1U_ULP_API_INITIAL_REQ,                                /**< Send a Initial Request over a session      */
-  NW_GTPV1U_ULP_API_TRIGGERED_REQ,                              /**< Send a Initial Request over a session      */
-  NW_GTPV1U_ULP_API_TRIGGERED_RSP,                              /**< Send a Trigger Response over a session     */
-  NW_GTPV1U_ULP_API_SEND_TPDU,                                  /**< Send a T-PDU message over teid context     */
-
-  /* APIs from stack to ULP */
-
-  NW_GTPV1U_ULP_API_RECV_TPDU,                                  /**< Receive a gtpv1u T-PDU from stack          */
-  NW_GTPV1U_ULP_API_RECV_MSG,                                   /**< Receive a gtpv1u message from stack        */
-  NW_GTPV1U_ULP_API_RSP_FAILURE,                                /**< Rsp failure for gtpv2 message from stack   */
-
-  /* Do not add below this */
-
-  NW_GTPV1U_ULP_API_END            = 0xFFFFFFFF,
-} NwGtpv1uUlpApiTypeT;
-
-/*---------------------------------------------------------------------------
- * Gtpv2 Stack API information elements definitions
- *--------------------------------------------------------------------------*/
-
-typedef NwPtrT  NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */
-typedef uint8_t   NwGtpv1uMsgTypeT;           /**< Gtpv2 Msg Type     */
-typedef NwPtrT  NwGtpv1uTrxnHandleT;        /**< Gtpv2 Transaction Handle */
-typedef NwPtrT  NwGtpv1uUlpTrxnHandleT;     /**< Gtpv2 Ulp Transaction Handle */
-typedef NwPtrT  NwGtpv1uUlpSessionHandleT;  /**< Gtpv2 Ulp session Handle */
-
-/**
- * API information elements between ULP and Stack for
- * creating a session.
- */
-
-typedef struct {
-  NW_IN    uint32_t                       teid;
-  NW_IN    NwGtpv1uUlpSessionHandleT    hUlpSession;
-  NW_OUT   NwGtpv1uStackSessionHandleT  hStackSession;
-} NwGtpv1uCreateTunnelEndPointT;
-
-/**
- * API information elements between ULP and Stack for
- * destroying a session.
- */
-
-typedef struct {
-  NW_IN   NwGtpv1uStackSessionHandleT   hStackSessionHandle;
-} NwGtpv1uDestroyTunnelEndPointT;
-
-/**
- * API information elements between ULP and Stack for
- * sending a Gtpv1u initial message.
- */
-
-typedef struct {
-  NW_IN    NwGtpv1uUlpTrxnHandleT        hUlpTrxn;
-  NW_IN    uint32_t                        peerIp;
-  NW_IN    uint32_t                        peerPort;
-  NW_IN    uint8_t                         flags;
-  NW_IN    uint32_t                        teid;
-} NwGtpv1uInitialReqInfoT;
-
-/**
- * API information elements between ULP and Stack for
- * sending a Gtpv1u triggered response message.
- */
-
-typedef struct {
-  NW_IN    NwGtpv1uUlpTrxnHandleT        hUlpTrxn;
-  NW_IN    uint32_t                        peerIp;
-  NW_IN    uint32_t                        peerPort;
-  NW_IN    uint8_t                         flags;
-  NW_IN    uint32_t                        teid;
-  NW_IN    uint32_t                        seqNum;
-  NW_IN    NwGtpv1uMsgHandleT            hMsg;
-} NwGtpv1uTriggeredRspInfoT;
-
-/**
- * API information elements between ULP and Stack for
- * sending a Gtpv1u triggered request message.
- */
-
-typedef struct {
-  NW_IN    NwGtpv1uUlpTrxnHandleT        hUlpTrxn;
-  NW_IN    uint32_t                        peerIp;
-  NW_IN    uint32_t                        peerPort;
-  NW_IN    uint8_t                         flags;
-  NW_IN    uint32_t                        teid;
-  NW_IN    uint32_t                        seqNum;
-  NW_IN    NwGtpv1uMsgHandleT            hMsg;
-} NwGtpv1uTriggeredReqInfoT;
-
-
-/**
- * API information elements between ULP and Stack for
- * sending a Gtpv2 message over a session.
- */
-
-typedef struct {
-  NW_IN    uint32_t                       teid;
-  NW_IN    uint32_t                       ipAddr;
-  NW_IN    uint8_t                        flags;
-  NW_IN    NwGtpv1uMsgHandleT           hMsg;
-} NwGtpv1uSendtoInfoT;
-
-
-/**
- * API information elements between ULP and Stack for
- * sending a Gtpv2 message over a session.
- */
-
-typedef struct {
-  NW_OUT   NwGtpv1uStackSessionHandleT  hStackSessionHandle;
-  NW_INOUT NwGtpv1uTrxnHandleT          hTrxn;
-  NW_IN    NwGtpv1uUlpTrxnHandleT       hUlpTrxn;
-  NW_IN    NwGtpv1uMsgTypeT            msgType;
-  NW_IN    uint8_t                        flags;
-  NW_IN    NwGtpv1uMsgHandleT           hMsg;
-} NwGtpv1uSendMsgInfoT;
-
-/**
- * API information elements between ULP and Stack for
- * receiving a Gtpv2 message over a session from stack.
- */
-
-typedef struct {
-  NW_IN    NwGtpv1uUlpSessionHandleT    hUlpSession;
-  NW_IN    NwGtpv1uUlpTrxnHandleT       hUlpTrxn;
-  NW_IN    uint32_t                       teid;
-  NW_IN    uint32_t                       peerIp;
-  NW_IN    uint32_t                       peerPort;
-  NW_IN    uint32_t                       msgType;      /**< Message type                       */
-  NW_IN    NwGtpv1uMsgHandleT           hMsg;         /**< Gtp Message handle                 */
-} NwGtpv1uRecvMsgInfoT;
-
-/**
- * API information elements between ULP and Stack for
- * receiving a Gtpv2 message over a session from stack.
- */
-
-typedef struct {
-  NW_IN    NwGtpv1uUlpSessionHandleT    hUlpSession;
-  NW_IN    NwGtpv1uTrxnHandleT          hTrxn;
-} NwGtpv1uNackInfoT;
-
-/*---------------------------------------------------------------------------
- * Gtpv2 Stack API structure definition
- *--------------------------------------------------------------------------*/
-
-/**
- * API structure between ULP and Stack
- */
-
-typedef struct {
-  NwGtpv1uUlpApiTypeT                   apiType;
-  NwGtpv1uMsgHandleT                    hMsg;
-  union {
-    NwGtpv1uCreateTunnelEndPointT       createTunnelEndPointInfo;
-    NwGtpv1uDestroyTunnelEndPointT      destroyTunnelEndPointInfo;
-    NwGtpv1uInitialReqInfoT             initialReqInfo;
-    NwGtpv1uTriggeredRspInfoT           triggeredRspInfo;
-    NwGtpv1uTriggeredReqInfoT           triggeredReqInfo;
-    NwGtpv1uSendtoInfoT                 sendtoInfo;
-    NwGtpv1uSendMsgInfoT                sendMsgInfo;
-    NwGtpv1uRecvMsgInfoT                recvMsgInfo;
-    NwGtpv1uNackInfoT                   nackMsgInfo;
-  } apiInfo;
-} NwGtpv1uUlpApiT;
-
-
-/*--------------------------------------------------------------------------*
- *           S T A C K    E N T I T I E S    D E F I N I T I O N S          *
- *--------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------
- * ULP Entity Definitions
- *--------------------------------------------------------------------------*/
-
-/**
- * Gtpv2 ULP entity definition
- */
-
-typedef struct {
-  NwGtpv1uUlpHandleT        hUlp;
-  NwGtpv1uRcT (*ulpReqCallback) ( NW_IN        NwGtpv1uUlpHandleT hUlp,
-                                  NW_IN        NwGtpv1uUlpApiT *pUlpApi);
-} NwGtpv1uUlpEntityT;
-
-
-/*---------------------------------------------------------------------------
- * UDP Entity Definitions
- *--------------------------------------------------------------------------*/
-
-/**
- * Gtpv2 UDP entity definition
- */
-
-typedef struct {
-  NwGtpv1uUdpHandleT        hUdp;
-  NwGtpv1uRcT (*udpDataReqCallback) ( NW_IN     NwGtpv1uUdpHandleT udpHandle,
-                                      NW_IN     uint8_t* dataBuf,
-                                      NW_IN     uint32_t dataSize,
-                                      NW_IN     uint32_t dataOffset,
-                                      NW_IN     uint32_t peerIP,
-                                      NW_IN     uint16_t peerPort);
-} NwGtpv1uUdpEntityT;
-
-/**
- * Gtpv1u Memory Manager entity definition
- */
-
-typedef struct {
-  NwGtpv1uMemMgrHandleT         hMemMgr;
-  void* (*memAlloc)( NW_IN      NwGtpv1uMemMgrHandleT hMemMgr,
-                     NW_IN      uint32_t memSize,
-                     NW_IN      NwCharT* fileName,
-                     NW_IN      uint32_t lineNumber);
-
-  void (*memFree) ( NW_IN       NwGtpv1uMemMgrHandleT hMemMgr,
-                    NW_IN       void* hMem,
-                    NW_IN       NwCharT* fileName,
-                    NW_IN       uint32_t lineNumber);
-} NwGtpv1uMemMgrEntityT;
-
-
-/*---------------------------------------------------------------------------
- * Timer Entity Definitions
- *--------------------------------------------------------------------------*/
-
-#define NW_GTPV1U_TMR_TYPE_ONE_SHOT                                  (0)
-#define NW_GTPV1U_TMR_TYPE_REPETITIVE                                (1)
-
-/**
- * Gtpv2 Timer Manager entity definition
- */
-
-typedef struct {
-  NwGtpv1uTimerMgrHandleT        tmrMgrHandle;
-  NwGtpv1uRcT (*tmrStartCallback)( NW_IN       NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-                                   NW_IN       uint32_t timeoutSecs,
-                                   NW_IN       uint32_t timeoutUsec,
-                                   NW_IN       uint32_t tmrType,
-                                   NW_IN       void* tmrArg,
-                                   NW_OUT      NwGtpv1uTimerHandleT* tmrHandle);
-
-  NwGtpv1uRcT (*tmrStopCallback) ( NW_IN       NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-                                   NW_IN       NwGtpv1uTimerHandleT tmrHandle);
-} NwGtpv1uTimerMgrEntityT;
-
-
-/*---------------------------------------------------------------------------
- * Log Entity Definitions
- *--------------------------------------------------------------------------*/
-
-/**
- * Gtpv2 Log manager entity definition
- */
-
-typedef struct {
-  NwGtpv1uLogMgrHandleT          logMgrHandle;
-  NwGtpv1uRcT (*logReqCallback) (NW_IN      NwGtpv1uLogMgrHandleT logMgrHandle,
-                                 NW_IN      uint32_t logLevel,
-                                 NW_IN      NwCharT* file,
-                                 NW_IN      uint32_t line,
-                                 NW_IN      NwCharT* logStr);
-} NwGtpv1uLogMgrEntityT;
-
-
-/*--------------------------------------------------------------------------*
- *                     P U B L I C   F U N C T I O N S                      *
- *--------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------
- *  Constructor
- *--------------------------------------------------------------------------*/
-
-/**
- Initialize the nw-gtpv1u stack.
-
- @param[in,out] phGtpv1uStackHandle : Pointer to stack handle
- @param[in]     stackType : GTPU_STACK_ENB or GTPU_STACK_SGW
- */
-
-NwGtpv1uRcT
-nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT* phGtpv1uStackHandle, uint32_t stackType);
-
-/*---------------------------------------------------------------------------
- * Destructor
- *--------------------------------------------------------------------------*/
-
-/**
- Destroy the nw-gtpv1u stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- */
-
-NwGtpv1uRcT
-nwGtpv1uFinalize( NW_IN  NwGtpv1uStackHandleT hGtpv1uStackHandle);
-
-/*---------------------------------------------------------------------------
- * Configuration Get/Set Operations
- *--------------------------------------------------------------------------*/
-
-/**
- Set Configuration for the nw-gtpv1u stack.
-
- @param[in,out] phGtpv1uStackHandle : Pointer to stack handle
- */
-
-NwGtpv1uRcT
-NwGtpv1uConfigSet( NW_IN NwGtpv1uStackHandleT* phGtpv1uStackHandle, NW_IN NwGtpv1uStackConfigT* pConfig);
-
-/**
- Get Configuration for the nw-gtpv1u stack.
-
- @param[in,out] phGtpv1uStackHandle : Pointer to stack handle
- */
-
-NwGtpv1uRcT
-NwGtpv1uConfigGet( NW_IN NwGtpv1uStackHandleT* phGtpv1uStackHandle, NW_OUT NwGtpv1uStackConfigT* pConfig);
-
-/**
- Set ULP entity for the stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] pUlpEntity : Pointer to ULP entity.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uSetUlpEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                      NW_IN NwGtpv1uUlpEntityT* pUlpEntity);
-
-/**
- Set UDP entity for the stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] pUdpEntity : Pointer to UDP entity.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uSetUdpEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                      NW_IN NwGtpv1uUdpEntityT* pUdpEntity);
-
-/**
- Set MemMgr entity for the stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] pMemMgr : Pointer to Memory Manager.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uSetMemMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                         NW_IN NwGtpv1uMemMgrEntityT* pMemMgr);
-
-
-/**
- Set TmrMgr entity for the stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] pTmrMgr : Pointer to Timer Manager.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uSetTimerMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                           NW_IN NwGtpv1uTimerMgrEntityT* pTmrMgr);
-
-/**
- Set LogMgr entity for the stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] pLogMgr : Pointer to Log Manager.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                         NW_IN NwGtpv1uLogMgrEntityT* pLogMgr);
-
-/**
- Set log level for the stack.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] logLevel : Log level.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                     NW_IN uint32_t logLevel);
-/*---------------------------------------------------------------------------
- * Process Request from Udp Layer
- *--------------------------------------------------------------------------*/
-
-/**
- Process Data Request from UDP entity.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] udpData : Pointer to received UDP data.
- @param[in] udpDataLen : Received data length.
- @param[in] dstPort : Received on port.
- @param[in] from : Received from peer information.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                       NW_IN uint8_t* udpData,
-                       NW_IN uint32_t udpDataLen,
-                       NW_IN uint16_t peerPort,
-                       NW_IN uint32_t peerIP);
-
-/*---------------------------------------------------------------------------
- * Process Request from Upper Layer
- *--------------------------------------------------------------------------*/
-
-/**
- Process Request from ULP entity.
-
- @param[in] hGtpv1uStackHandle : Stack handle
- @param[in] pLogMgr : Pointer to Ulp Req.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
-                       NW_IN NwGtpv1uUlpApiT *ulpReq);
-
-
-/*---------------------------------------------------------------------------
- * Process Timer timeout Request from Timer Manager
- *--------------------------------------------------------------------------*/
-
-/**
- Process Timer timeout Request from Timer Manager
-
- @param[in] pLogMgr : Pointer timeout arguments.
- @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpv1uProcessTimeout( NW_IN void* timeoutArg);
-
-NwGtpv1uRcT
-nwGtpv1uPeerRspTimeout(void* arg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* __NW_GTPV1U_H__ */
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h
deleted file mode 100644
index 6da3b80dfacbbde24fc532e4617040586f40e711..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                              n w - g t p v 2 c                             *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 c    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-
-#ifndef __NW_GTPV1U_ERROR_H__
-#define __NW_GTPV1U_ERROR_H__
-
-/**
- * @file NwGtpv1uError.h
- * @brief This header file contains return error code type definitions.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
-
-  NW_GTPV1U_OK                 = 0x00000000,
-  NW_GTPV1U_MANDATORY_IE_DUPLICATE,
-  NW_GTPV1U_MANDATORY_IE_MISSING,
-  NW_GTPV1U_MSG_MALFORMED,
-  NW_GTPV1U_FAILURE            = 0xFFFFFFFE
-}
-NwGtpv1uRcT;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NW_GTPV1U_ERROR_H__*/
-
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h
deleted file mode 100644
index 7bb51dcda0eafb186446899c3837071aeceef10f..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 u    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file NwGtpv1uIe.h
- * @brief This header file contains Information Element definitions for GTPv1u
- * as per 3GPP TS 29281-930.
-*/
-
-#ifndef __NW_GTPV1U_IE_H__
-#define __NW_GTPV1U_IE_H__
-
-/*--------------------------------------------------------------------------*
- *   G T P V 2 U    I E  T Y P E     M A C R O     D E F I N I T I O N S    *
- *--------------------------------------------------------------------------*/
-
-#define NW_GTPV1U_IE_RECOVERY                                           (14)
-#define NW_GTPV1U_IE_TEID_DATA_I                                        (15)
-#define NW_GTPV1U_IE_GSN_ADDRESS                                        (133)
-#define NW_GTPV1U_IE_EXT_HDR_TYPE_LIST                                  (141)
-#define NW_GTPV1U_IE_PRIVATE_EXTENSION                                  (255)
-
-
-/*--------------------------------------------------------------------------*
- *   G T P V 2 U      C A U S E      V A L U E     D E F I N I T I O N S    *
- *--------------------------------------------------------------------------*/
-
-#define NW_GTPV1U_CAUSE_REQUEST_ACCEPTED                                (16)
-#define NW_GTPV1U_CAUSE_MANDATORY_IE_MISSING                            (70)
-
-#endif  /* __NW_GTPV1U_IE_H__ */
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h
deleted file mode 100644
index f6bc0415f2aa7df3d313a5ebfab082cee7f4fde9..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 u    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#ifndef __NW_GTPV1U_MSG_H__
-#define __NW_GTPV1U_MSG_H__
-
-#include "NwTypes.h"
-#include "NwGtpv1u.h"
-
-/**
- * @file NwGtpv1uMsg.h
- * @brief This file defines APIs for to build new outgoing gtpv1u messages and to parse incoming messages.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------*
- *   G T P V 2 C     I E    D A T A - T Y P E      D E F I N I T I O N S    *
- *--------------------------------------------------------------------------*/
-
-#pragma pack(1)
-
-typedef struct NwGtpv1uIeTv1 {
-  uint8_t  t;
-  uint8_t  v;
-} NwGtpv1uIeTv1T;
-
-typedef struct NwGtpv1uIeTv2 {
-  uint8_t  t;
-  uint8_t  v;
-} NwGtpv1uIeTv2T;
-
-typedef struct NwGtpv1uIeTv4 {
-  uint8_t  t;
-  uint32_t  v;
-} NwGtpv1uIeTv4T;
-
-typedef struct NwGtpv1uIeTlv {
-  uint8_t  t;
-  uint16_t l;
-} NwGtpv1uIeTlvT;
-
-#pragma pack()
-
-
-/**
- * Allocate a GPDU gtpv1u message.
- *
- * @param[in] hGtpuStackHandle : gtpv1u stack handle.
- * @param[in] teidPresent : TEID is present flag.
- * @param[in] teid : TEID for this message.
- * @param[in] seqNum : Sequence number for this message.
- * @param[out] phMsg : Pointer to message handle.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                NW_IN uint8_t     seqNumFlag,
-                NW_IN uint8_t     npduNumFlag,
-                NW_IN uint8_t     extHdrFlag,
-                NW_IN uint8_t     msgType,
-                NW_IN uint8_t     teid,
-                NW_IN uint16_t    seqNum,
-                NW_IN uint8_t     npduNum,
-                NW_IN uint8_t     nextExtHeader,
-                NW_OUT NwGtpv1uMsgHandleT *phMsg);
-
-
-/**
- * Allocate a gtpv1u message.
- *
- * @param[in] hGtpuStackHandle : gtpv1u stack handle.
- * @param[in] teid : TEID for this message.
- * @param[in] seqNumFlag : Sequence number flag for this message.
- * @param[in] seqNum : Sequence number for this message.
- * @param[in] pTpdu: T-PDU for this message.
- * @param[in] tpduLength: T-PDU length for this message.
- * @param[out] phMsg : Pointer to message handle.
- */
-
-NwGtpv1uRcT
-nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                    NW_IN uint32_t    teid,
-                    NW_IN uint8_t     seqNumFlag,
-                    NW_IN uint16_t    seqNum,
-                    NW_IN uint8_t*    tpdu,
-                    NW_IN uint16_t    tpduLength,
-                    NW_IN uint32_t    tpduOffset,
-                    NW_OUT NwGtpv1uMsgHandleT *phMsg);
-
-/**
- * Allocate a gtpv1u message from another gtpv1u message.
- *
- * @param[in] hGtpuStackHandle : gtpv1u stack handle.
- * @param[out] hMsg : Handle to input message.
- * @param[out] phMsg : Pointer to message handle.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                       NW_IN NwGtpv1uMsgHandleT hMsg,
-                       NW_OUT NwGtpv1uMsgHandleT *phMsg);
-/**
- * Allocate a gtpv1u message from data buffer.
- *
- * @param[in] hGtpuStackHandle : gtpv1u stack handle.
- * @param[in] pBuf: Buffer to be copied in this message.
- * @param[in] bufLen: Buffer length to be copied in this message.
- * @param[out] phMsg : Pointer to message handle.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                          NW_IN uint8_t* pBuf,
-                          NW_IN uint32_t bufLen,
-                          NW_OUT NwGtpv1uMsgHandleT *phMsg);
-
-/**
- * Free a gtpv1u message.
- *
- * @param[in] hGtpuStackHandle : gtpv1u stack handle.
- * @param[in] hMsg : Message handle.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                   NW_IN NwGtpv1uMsgHandleT hMsg);
-
-/**
- * Set TEID for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- * @param[in] teid: TEID value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t teid);
-
-/**
- * Set TEID present flag for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- * @param[in] teidPesent: Flag boolean value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgSetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg, NwBoolT teidPresent);
-
-/**
- * Set sequence for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- * @param[in] seqNum: Flag boolean value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t seqNum);
-
-/**
- * Get TEID present for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-uint32_t
-nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg);
-
-/**
- * Get TEID present for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-NwBoolT
-nwGtpv1uMsgGetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg);
-
-/**
- * Get sequence number for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-uint32_t
-nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg);
-
-/**
- * Get tpdu for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- * @param[inout] pTpduBuf : Buffer to copy the T-PDU.
- * @param[out] hMsg : T-PDU length.
- */
-
-uint32_t
-nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, uint8_t* pTpduBuf, uint32_t* pTpduLength);
-
-uint8_t*
-nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg);
-
-uint32_t
-nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg);
-
-/**
- * Add a gtpv1u information element of length 1 to gtpv1u mesasge.
- *
- * @param[in] hMsg : Handle to gtpv1u message.
- * @param[in] type : IE type.
- * @param[in] value : IE value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
-                    NW_IN uint8_t       type,
-                    NW_IN uint8_t       value);
-
-
-/**
- * Add a gtpv1u information element of length 2 to gtpv1u mesasge.
- *
- * @param[in] hMsg : Handle to gtpv1u message.
- * @param[in] type : IE type.
- * @param[in] value : IE value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
-                    NW_IN uint8_t       type,
-                    NW_IN uint16_t      length,
-                    NW_IN uint16_t      value);
-
-
-/**
- * Add a gtpv1u information element of length 4 to gtpv1u mesasge.
- *
- * @param[in] hMsg : Handle to gtpv1u message.
- * @param[in] type : IE type.
- * @param[in] value : IE value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
-                    NW_IN uint8_t       type,
-                    NW_IN uint16_t      length,
-                    NW_IN uint32_t      value);
-
-
-/**
- * Add a gtpv1u information element of variable length to gtpv1u mesasge.
- *
- * @param[in] hMsg : Handle to gtpv1u message.
- * @param[in] type : IE type.
- * @param[in] length : IE length.
- * @param[in] value : IE value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
-                 NW_IN uint8_t       type,
-                 NW_IN uint16_t      length,
-                 NW_IN uint8_t*      pVal);
-
-/**
- * Dump the contents of gtpv1u mesasge.
- *
- * @param[in] hMsg : Handle to gtpv1u message.
- * @param[in] fp: Pointer to output file.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE* fp);
-
-uint32_t
-nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NW_TYPES_H__ */
-
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwLog.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwLog.h
deleted file mode 100644
index 7215216e68a19bc8ece8c3ca749eff962c8e3baa..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwLog.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                              n w - g t p v 2 c                             *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 c    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-
-#ifndef __NW_LOG_H__
-#define __NW_LOG_H__
-
-#include <libgen.h>
-
-#include "NwTypes.h"
-
-/**
- * @file NwLog.h
- * @brief This header file contains global shared logging definitions.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------
- * Log Level Definitions
- *--------------------------------------------------------------------------*/
-
-#define NW_LOG_LEVEL_EMER                       (0) /**< system is unusable              */
-#define NW_LOG_LEVEL_ALER                       (1) /**< action must be taken immediately*/
-#define NW_LOG_LEVEL_CRIT                       (2) /**< critical conditions             */
-#define NW_LOG_LEVEL_ERRO                       (3) /**< error conditions                */
-#define NW_LOG_LEVEL_WARN                       (4) /**< warning conditions              */
-#define NW_LOG_LEVEL_NOTI                       (5) /**< normal but signification condition */
-#define NW_LOG_LEVEL_INFO                       (6) /**< informational                   */
-#define NW_LOG_LEVEL_DEBG                       (7) /**< debug-level messages            */
-
-// static
-// NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT",  "ERRO", "WARN", "NOTI", "INFO", "DEBG"};
-
-/*---------------------------------------------------------------------------
- * IPv4 logging macros
- *--------------------------------------------------------------------------*/
-#define NW_IPV4_ADDR                            "%u.%u.%u.%u"
-#define NW_IPV4_ADDR_FORMAT(__addr)             (uint8_t)((__addr) & 0x000000ff),        \
-                                                (uint8_t)(((__addr) & 0x0000ff00) >> 8 ), \
-                                                (uint8_t)(((__addr) & 0x00ff0000) >> 16), \
-                                                (uint8_t)(((__addr) & 0xff000000) >> 24)
-
-#define NW_IPV4_ADDR_FORMATP(__paddr)           (uint8_t)(*((uint8_t*)(__paddr)) & 0x000000ff),     \
-                                                (uint8_t)(*((uint8_t*)(__paddr + 1)) & 0x000000ff), \
-                                                (uint8_t)(*((uint8_t*)(__paddr + 2)) & 0x000000ff), \
-                                                (uint8_t)(*((uint8_t*)(__paddr + 3)) & 0x000000ff)
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NW_LOG_H__ */
-
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwTypes.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwTypes.h
deleted file mode 100644
index aae5c8a95bf6d539ee95297fb386e023e01f3d81..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwTypes.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                              n w - g t p v 2 c                             *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 c    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-
-#include <stdlib.h>
-#include <stdint.h>
-
-#ifndef __NW_TYPES_H__
-#define __NW_TYPES_H__
-
-/**
- * @file NwTypes.h
- * @brief This header file contains basic type definitions.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NW_IN                                   /**< An input argument                  */
-#define NW_OUT                                  /**< An output argumnet                 */
-#define NW_INOUT                                /**< An input and output argument       */
-
-#define NW_TRUE                 (1)             /**< Truth value                        */
-#define NW_FALSE                (0)             /**< False value                        */
-
-typedef signed char             NwS8T;          /**< Signed 1 byte                      */
-typedef signed short            NwS16T;         /**< Signed 2 byte                      */
-typedef signed int              NwS32T;         /**< Signed 4 byte                      */
-typedef signed long long        NwS64T;         /**< Signed 8 byte                      */
-
-typedef uintptr_t               NwPtrT;         /**< Use this for generic pointers      */
-typedef unsigned int            NwHandleT;      /**< Use this for generic handles       */
-
-typedef char                    NwBoolT;        /**< Use this for booleans              */
-
-typedef char                    NwCharT;        /**< Use this for strings               */
-
-typedef signed int              NwFdT;          /**< Use this for file descriptor               */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NW_TYPES_H__ */
-
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/shared/NwUtils.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwUtils.h
deleted file mode 100644
index c197ab323e9272f765d05bd6ccae4742a2a2aab2..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/shared/NwUtils.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                              n w - g t p v 2 c                             *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 c    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#include <assert.h>
-
-#ifndef __NW_UTILS_H__
-#define __NW_UTILS_H__
-
-
-/**
- * @file NwUtils.h
- * @brief This header file contains utility macro and function definitions.
-*/
-
-#define NW_ASSERT                                       assert                  /**< Assertion */
-
-#define NW_CHK_NULL_PTR(_ptr)                           NW_ASSERT(_ptr != NULL) /**< Null pointer check */
-
-#define NW_HTONS(x)                                     ( ( ((x) & 0xff00) >> 8 ) | ( ((x) & 0x00ff) << 8 ) )
-
-#define NW_HTONL(x)                                     ( ( ((x) & 0xff000000) >> 24 ) | ( ( (x) & 0x00ff0000 ) >> 8 ) | \
-                                                        ( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) )
-
-#define NW_HTONLL(x)                                    (                                                         \
-    ( ( ((uint64_t)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((uint64_t)x) & 0x00ff000000000000ULL ) >> 40 ) |       \
-    ( ( ((uint64_t)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((uint64_t)x) & 0x000000ff00000000ULL ) >> 8  ) |       \
-    ( ( ((uint64_t)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((uint64_t)x) & 0x00000000000000ffULL ) << 56 ) |       \
-    ( ( ((uint64_t)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((uint64_t)x) & 0x00000000ff000000ULL ) << 8  )         \
-    )
-
-#define NW_NTOHS                NW_HTONS
-#define NW_NTOHL                NW_HTONL
-#define NW_NTOHLL               NW_HTONLL
-
-
-#endif /* __NW_UTILS_H__ */
-
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
deleted file mode 100644
index 0d962cad7d5d1b11450939a87a67d3c3391f5f1b..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
+++ /dev/null
@@ -1,1025 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "NwTypes.h"
-#include "NwUtils.h"
-#include "NwGtpv1uError.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwGtpv1uTunnelEndPoint.h"
-#include "NwGtpv1uTrxn.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uIe.h"
-#include "NwGtpv1uLog.h"
-
-#include "assertions.h"
-#include "intertask_interface.h"
-#include "msc.h"
-
-#include "gtpv1u.h"
-#if defined(ENB_MODE)
-#include "common/utils/LOG/log.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//#define LOG_GTPU 1
-/*--------------------------------------------------------------------------*
- *                    P R I V A T E    F U N C T I O N S                    *
- *--------------------------------------------------------------------------*/
-
-#define NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE                             (12)   /**< Size of GTPv1u EPC specific header */
-#define NW_GTPV1U_EPC_MIN_HEADER_SIZE                                  (8)
-
-
-void
-nwGtpv1uDisplayBanner(void)
-{
-  printf(" *----------------------------------------------------------------------------*\n");
-  printf(" *                                                                            *\n");
-  printf(" *                             n w - g t p v 2 u                              *\n");
-  printf(" *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *\n");
-  printf(" *                                                                            *\n");
-  printf(" *                                                                            *\n");
-  printf(" * Copyright (c) 2010-2011 Amit Chawre                                        *\n");
-  printf(" * All rights reserved.                                                       *\n");
-  printf(" *                                                                            *\n");
-  printf(" * Redistribution and use in source and binary forms, with or without         *\n");
-  printf(" * modification, are permitted provided that the following conditions         *\n");
-  printf(" * are met:                                                                   *\n");
-  printf(" *                                                                            *\n");
-  printf(" * 1. Redistributions of source code must retain the above copyright          *\n");
-  printf(" *    notice, this list of conditions and the following disclaimer.           *\n");
-  printf(" * 2. Redistributions in binary form must reproduce the above copyright       *\n");
-  printf(" *    notice, this list of conditions and the following disclaimer in the     *\n");
-  printf(" *    documentation and/or other materials provided with the distribution.    *\n");
-  printf(" * 3. The name of the author may not be used to endorse or promote products   *\n");
-  printf(" *    derived from this software without specific prior written permission.   *\n");
-  printf(" *                                                                            *\n");
-  printf(" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *\n");
-  printf(" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *\n");
-  printf(" * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *\n");
-  printf(" * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *\n");
-  printf(" * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *\n");
-  printf(" * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *\n");
-  printf(" * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *\n");
-  printf(" * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *\n");
-  printf(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *\n");
-  printf(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *\n");
-  printf(" *----------------------------------------------------------------------------*\n\n");
-
-}
-/*---------------------------------------------------------------------------
- * RBTree Search Functions
- *--------------------------------------------------------------------------*/
-
-static inline NwS32T
-nwGtpv1uCompareTeid(struct NwGtpv1uTunnelEndPoint *a,
-                    struct NwGtpv1uTunnelEndPoint *b);
-
-static inline NwS32T
-nwGtpv1uCompareSeqNum(struct NwGtpv1uTrxn *a, struct NwGtpv1uTrxn *b);
-
-RB_PROTOTYPE(NwGtpv1uOutstandingTxSeqNumTrxnMap, NwGtpv1uTrxn,
-             outstandingTxSeqNumMapRbtNode, nwGtpv1uCompareSeqNum)
-RB_PROTOTYPE(NwGtpv1uOutstandingRxSeqNumTrxnMap, NwGtpv1uTrxn,
-             outstandingRxSeqNumMapRbtNode, nwGtpv1uCompareSeqNum)
-RB_PROTOTYPE(NwGtpv1uTunnelEndPointTMap, NwGtpv1uTunnelEndPoint,
-             sessionMapRbtNode, nwGtpv1uCompareTeid)
-RB_PROTOTYPE(NwGtpv1uTunnelEndPointIdentifierMap, NwGtpv1uTunnelEndPoint,
-             sessionMapRbtNode, nwGtpv1uCompareTeid)
-
-RB_GENERATE(NwGtpv1uOutstandingTxSeqNumTrxnMap, NwGtpv1uTrxn,
-            outstandingTxSeqNumMapRbtNode, nwGtpv1uCompareSeqNum)
-RB_GENERATE(NwGtpv1uOutstandingRxSeqNumTrxnMap, NwGtpv1uTrxn,
-            outstandingRxSeqNumMapRbtNode, nwGtpv1uCompareSeqNum)
-RB_GENERATE(NwGtpv1uTunnelEndPointTMap, NwGtpv1uTunnelEndPoint,
-            sessionMapRbtNode, nwGtpv1uCompareTeid)
-RB_GENERATE(NwGtpv1uTunnelEndPointIdentifierMap, NwGtpv1uTunnelEndPoint,
-            sessionMapRbtNode, nwGtpv1uCompareTeid)
-
-/**
-  Comparator funtion for comparing two sessions.
-
-  @param[in] a: Pointer to session a.
-  @param[in] b: Pointer to session b.
-  @return  An integer greater than, equal to or less than zero according to whether the
-  object pointed to by a is greater than, equal to or less than the object pointed to by b.
- */
-
-static inline NwS32T
-nwGtpv1uCompareTeid(struct NwGtpv1uTunnelEndPoint *a,
-                    struct NwGtpv1uTunnelEndPoint *b)
-{
-  if(a->teid > b->teid) {
-    return 1;
-  }
-
-  if(a->teid < b->teid) {
-    return -1;
-  }
-
-  return 0;
-}
-
-/**
-  Comparator funtion for comparing two sequence number transactions.
-
-  @param[in] a: Pointer to session a.
-  @param[in] b: Pointer to session b.
-  @return  An integer greater than, equal to or less than zero according to whether the
-  object pointed to by a is greater than, equal to or less than the object pointed to by b.
- */
-
-static inline NwS32T
-nwGtpv1uCompareSeqNum(struct NwGtpv1uTrxn *a, struct NwGtpv1uTrxn *b)
-{
-  if(a->seqNum > b->seqNum) {
-    return 1;
-  }
-
-  if(a->seqNum < b->seqNum) {
-    return -1;
-  }
-
-  if(a->peerIp > b->peerIp) {
-    return 1;
-  }
-
-  if(a->peerIp < b->peerIp) {
-    return -1;
-  }
-
-  return 0;
-}
-
-/**
-  Create and Send GTPU message.
-
-  @param[in] thiz: Stack handle
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, uint32_t peerIp, uint16_t peerPort,
-                          NwGtpv1uMsgT *pMsg)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  uint8_t *msgHdr;
-
-  NW_ASSERT(thiz);
-  NW_ASSERT(pMsg);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-
-  msgHdr = &pMsg->msgBuf[pMsg->msgBufOffset];
-  NW_ASSERT(msgHdr != NULL);
-
-  *(msgHdr++)         = (pMsg->version << 5)            |
-                        (pMsg->protocolType << 4)       |
-                        (pMsg->extHdrFlag << 2)         |
-                        (pMsg->seqNumFlag << 1)         |
-                        (pMsg->npduNumFlag);
-
-  *(msgHdr++)         = (pMsg->msgType);
-  *((uint16_t *) msgHdr) = htons(pMsg->msgLen);
-  msgHdr += 2;
-
-  *((uint32_t *) msgHdr) = htonl(pMsg->teid);
-  msgHdr += 4;
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n",
-             pMsg->teid,
-             pMsg->msgLen,
-             pMsg->msgBufOffset);
-#endif
-
-  if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) {
-    *((uint16_t *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000);
-    msgHdr += 2;
-
-    *((uint8_t *) msgHdr) = (pMsg->npduNumFlag ? htons(pMsg->npduNum) : 0x00);
-    msgHdr++;
-
-    *((uint8_t *) msgHdr) = (pMsg->extHdrFlag ? htons(pMsg->nextExtHdrType) : 0x00);
-    msgHdr++;
-  }
-
-  rc = thiz->udp.udpDataReqCallback(thiz->udp.hUdp,
-                                    pMsg->msgBuf,
-                                    pMsg->msgBufLen,
-                                    pMsg->msgBufOffset,
-                                    peerIp,
-                                    peerPort);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-/**
- * Send GTPv1u Message Indication to ULP entity.
- *
- * @param[in] hGtpuStackHandle : Stack handle
- * @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz,
-                                  NW_IN uint32_t  hUlpTrxn,
-                                  NW_IN uint32_t  apiType,
-                                  NW_IN uint32_t  msgType,
-                                  NW_IN uint32_t  peerIp,
-                                  NW_IN uint16_t  peerPort,
-                                  NW_IN uint8_t  *pMsgBuf,
-                                  NW_IN uint16_t  msgLength)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uUlpApiT ulpApi;
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-
-  ulpApi.apiType                        = apiType;
-  ulpApi.apiInfo.recvMsgInfo.msgType    = msgType;
-  ulpApi.apiInfo.recvMsgInfo.hUlpTrxn   = hUlpTrxn;
-  ulpApi.apiInfo.recvMsgInfo.peerIp     = peerIp;
-  ulpApi.apiInfo.recvMsgInfo.peerPort   = peerPort;
-
-  if(pMsgBuf && msgLength) {
-    rc = nwGtpv1uMsgFromBufferNew((NwGtpv1uStackHandleT)thiz, pMsgBuf, msgLength,
-                                  &(ulpApi.apiInfo.recvMsgInfo.hMsg));
-    NW_ASSERT(rc == NW_GTPV1U_OK);
-  }
-
-  rc = thiz->ulp.ulpReqCallback(thiz->ulp.hUlp, &ulpApi);
-  NW_ASSERT(rc == NW_GTPV1U_OK);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-
-  return rc;
-}
-
-NwGtpv1uRcT
-nwGtpv1uPeerRspTimeout(void *arg)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uTrxnT *thiz;
-  NwGtpv1uTimeoutInfoT *timeoutInfo = arg;
-
-  GTPU_WARNING( "Retransmission timer expired\n");
-
-  thiz = ((NwGtpv1uTrxnT *)timeoutInfo->timeoutArg);
-  rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp,
-       thiz->pMsg->msgBuf,
-       thiz->pMsg->msgLen,
-       thiz->pMsg->msgBufOffset,
-       thiz->peerIp,
-       thiz->peerPort);
-
-  if(thiz->maxRetries) {
-    rc = thiz->pStack->tmrMgr.tmrStartCallback(thiz->pStack->tmrMgr.tmrMgrHandle,
-         5, 0, NW_GTPV1U_TMR_TYPE_ONE_SHOT, (void *)timeoutInfo, &thiz->hRspTmr);
-    thiz->maxRetries--;
-  } else {
-    /* Inform session layer about path fialure */
-    GTPU_WARNING("Max retries over!\n");
-  }
-
-  return rc;
-}
-
-/*---------------------------------------------------------------------------
- * ULP API Processing Functions
- *--------------------------------------------------------------------------*/
-
-/**
-  Process NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT Request from ULP entity.
-
-  @param[in] hGtpuStackHandle : Stack handle
-  @param[in] pUlpReq : Pointer to Ulp Req.
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-NwGtpv1uCreateTunnelEndPoint( NW_IN  NwGtpv1uStackT *thiz,
-                              NW_IN  uint32_t teid,
-                              NW_IN  NwGtpv1uUlpSessionHandleT hUlpSession,
-                              NW_OUT NwGtpv1uStackSessionHandleT *phStackSession )
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uTunnelEndPointT *pTunnelEndPoint;
-  NwGtpv1uTunnelEndPointT *pCollision;
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-  pTunnelEndPoint = nwGtpTunnelEndPointNew(thiz);
-
-  if(pTunnelEndPoint) {
-
-    pTunnelEndPoint->teid           = teid;
-    pTunnelEndPoint->pStack         = thiz;
-    pTunnelEndPoint->hUlpSession    = hUlpSession;
-
-    pCollision = RB_INSERT(NwGtpv1uTunnelEndPointIdentifierMap, &(thiz->teidMap),
-                           pTunnelEndPoint);
-
-    if(pCollision) {
-      GTPU_ERROR("Tunnel end-point cannot be created for teid 0x%x. "
-                 "Tunnel already exists", teid);
-      rc = nwGtpTunnelEndPointDestroy(thiz, pTunnelEndPoint);
-      NW_ASSERT(rc == NW_GTPV1U_OK);
-      *phStackSession = (NwGtpv1uStackSessionHandleT) NULL;
-      NW_ASSERT(0);
-      rc = NW_GTPV1U_FAILURE;
-    } else {
-      *phStackSession = (NwGtpv1uStackSessionHandleT) pTunnelEndPoint;
-      pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap,
-                                &(thiz->teidMap), pTunnelEndPoint);
-      //NW_ASSERT(pTunnelEndPoint);
-      if (!pTunnelEndPoint) {
-        GTPU_ERROR("Tunnel end-point cannot be NULL");
-        rc = NW_GTPV1U_FAILURE;
-      } else {
-        GTPU_DEBUG("Tunnel end-point 0x%p creation successful for teid 0x%x %u(dec)",
-                   pTunnelEndPoint, (unsigned int)teid, (unsigned int)teid);
-      }
-    }
-
-  } else {
-    *phStackSession = (NwGtpv1uStackSessionHandleT) NULL;
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-/**
-  Process NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT Request from ULP entity.
-
-  @param[in] hGtpuStackHandle : Stack handle
-  @param[in] pUlpReq : Pointer to Ulp Req.
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz,
-                               NW_IN NwGtpv1uUlpApiT *pUlpReq)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uTunnelEndPointT *pRemovedTeid;
-
-  if(pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle) {
-    GTPU_DEBUG(  "Destroying Tunnel end-point '%lx'",
-                 pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
-    pRemovedTeid = RB_REMOVE(NwGtpv1uTunnelEndPointIdentifierMap, &(thiz->teidMap),
-                             (NwGtpv1uTunnelEndPointT *)(
-                               pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle));
-
-    NW_ASSERT(pRemovedTeid == (NwGtpv1uTunnelEndPointT *)(
-                pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle));
-
-    rc = nwGtpTunnelEndPointDestroy(thiz,
-                                    (NwGtpv1uTunnelEndPointT *)
-                                    pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
-  } else {
-    GTPU_WARNING("Non-existent Tunnel end-point handle '%lx'",
-                 pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
-  }
-
-  return rc;
-}
-
-/**
-  Process NW_GTPV1U_ULP_API_INITIAL_REQ Request from ULP entity.
-
-  @param[in] hGtpuStackHandle : Stack handle
-  @param[in] pUlpReq : Pointer to Ulp Req.
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uInitialReq( NW_IN NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uTrxnT *pTrxn;
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-  /* Create New Transaction */
-  rc = nwGtpv1uTrxnNew(thiz, &pTrxn);
-
-  if(pTrxn) {
-    rc = nwGtpv1uTrxnCreateAndSendMsg(thiz,
-                                      pTrxn,
-                                      pUlpReq->apiInfo.initialReqInfo.peerIp,
-                                      pUlpReq->apiInfo.initialReqInfo.peerPort,
-                                      (NwGtpv1uMsgT *) pUlpReq->hMsg);
-
-    if(rc == NW_GTPV1U_OK) {
-      /* Insert into search tree */
-      RB_INSERT(NwGtpv1uOutstandingTxSeqNumTrxnMap, &(thiz->outstandingTxSeqNumMap),
-                pTrxn);
-    } else {
-      rc = nwGtpv1uTrxnDelete(&pTrxn);
-      NW_ASSERT(rc == NW_GTPV1U_OK);
-    }
-  }
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-/**
-  Process NW_GTPV1U_ULP_API_SEND_TPDU Request from ULP entity.
-
-  @param[in] thiz: Stack handle
-  @param[in] pUlpReq : Pointer to Ulp Req.
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uSendto( NwGtpv1uStackT *thiz,  NW_IN NwGtpv1uUlpApiT *pUlpReq)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-
-  NW_ASSERT(thiz);
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-
-  (void) nwGtpv1uMsgSetTeid(pUlpReq->apiInfo.sendtoInfo.hMsg,
-                            pUlpReq->apiInfo.sendtoInfo.teid);
-
-  rc = nwGtpv1uCreateAndSendMsg(thiz,
-                                pUlpReq->apiInfo.sendtoInfo.ipAddr,
-                                2152,
-                                (NwGtpv1uMsgT *) (NwGtpv1uMsgT *) pUlpReq->apiInfo.sendtoInfo.hMsg);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-/**
-  Process GPDU from UDP entity.
-
-  @param[in] thiz: Stack handle
-  @param[in] pUlpReq : Pointer to Ulp Req.
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
-                     NW_IN uint8_t *gpdu,
-                     NW_IN uint32_t gpduLen,
-                     NW_IN uint32_t peerIp)
-
-{
-  NwGtpv1uRcT              rc                = NW_GTPV1U_FAILURE;
-  NwGtpv1uMsgHeaderT      *msgHdr            = NULL;
-  NwGtpv1uTunnelEndPointT *pTunnelEndPoint   = NULL;
-  NwGtpv1uTunnelEndPointT  tunnelEndPointKey;
-  //    uint16_t                   hdr_len           = 0;
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-
-  // no buffer offset
-  msgHdr = (NwGtpv1uMsgHeaderT *) gpdu;
-
-  tunnelEndPointKey.teid = ntohl(msgHdr->teid);
-
-  pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap,
-                            &(thiz->teidMap), &tunnelEndPointKey);
-
-  if(pTunnelEndPoint) {
-    NwGtpv1uMsgHandleT hMsg;
-
-    rc = nwGtpv1uMsgFromBufferNew( (NwGtpv1uStackHandleT)thiz,
-                                   (uint8_t *)gpdu,
-                                   gpduLen,
-                                   &hMsg);
-
-    /*
-      uint8_t*        msgBuf;
-      uint32_t        msgBufLen;
-      uint32_t        msgBufOffset;
-     */
-    if(NW_GTPV1U_OK == rc) {
-      NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-      GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u (%u) (decapsulated %u)from "NW_IPV4_ADDR"\n",
-                 ntohl(msgHdr->teid), gpduLen, pMsg->msgLen, pMsg->msgBufLen, NW_IPV4_ADDR_FORMAT((peerIp)));
-#endif
-      MSC_LOG_RX_MESSAGE(
-        (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
-        (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
-        NULL,
-        0,
-        " G-PDU ltid %u size %u",
-        tunnelEndPointKey.teid,
-        gpduLen);
-
-      rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
-    }
-  } else {
-    MSC_LOG_RX_DISCARDED_MESSAGE(
-      (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
-      (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
-      NULL,
-      0,
-      " G-PDU ltid %u size %u",
-      tunnelEndPointKey.teid,
-      gpduLen);
-    GTPU_DEBUG("Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR"\n",
-               ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp)));
-  }
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-/**
-  Handle Echo Request from Peer Entity.
-
-  @param[in] thiz : Stack context
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
-                      NW_IN uint8_t *msgBuf,
-                      NW_IN uint32_t msgBufLen,
-                      NW_IN uint16_t peerPort,
-                      NW_IN uint32_t peerIp)
-{
-  NwGtpv1uRcT           rc     = NW_GTPV1U_FAILURE;
-  uint16_t                seqNum = 0;
-  NwGtpv1uMsgHandleT    hMsg   = 0;
-  int                   bufLen = 0;
-
-  seqNum = ntohs(*(uint16_t *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4)));
-
-  MSC_LOG_RX_MESSAGE(
-    (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
-    (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
-    NULL,
-    0,
-    MSC_AS_TIME_FMT" ECHO-REQ seq %u size %u",
-    0,0,seqNum, msgBufLen);
-  /* Send Echo Response */
-
-  rc = nwGtpv1uMsgNew( (NwGtpv1uStackHandleT)thiz,
-                       NW_TRUE,         /* SeqNum flag    */
-                       NW_FALSE,
-                       NW_FALSE,
-                       NW_GTP_ECHO_RSP,  /* Msg Type             */
-                       0x00000000U,      /* TEID                 */
-                       seqNum,           /* Seq Number           */
-                       0,
-                       0,
-                       (&hMsg));
-
-  bufLen = sizeof(NwGtpv1uIeTv1T)+ ((NwGtpv1uMsgT*)hMsg)->msgLen;
-
-//#warning CROUX DIRTY +16, TO BE FIXED!!!
-  /* the +16 is there because by analyzing memory allocation with some external
-   * tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg
-   * the value "16" has been chosen arbitrarily, just bigger than 6
-   */
-  ((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc(
-                                    TASK_GTPV1_U,
-                                    TASK_UDP,
-                                    bufLen + 16 /* CROUX - dirty +16, to be fixed! */);
-  ((NwGtpv1uMsgT*)hMsg)->msgBufLen    = bufLen;
-  NW_ASSERT(NW_GTPV1U_OK == rc);
-
-  /*
-   * The Restart Counter value in the Recovery information element shall
-   * not be used, i.e. it shall be set to zero by the sender and shall be
-   * ignored by the receiver.
-   */
-  rc = nwGtpv1uMsgAddIeTV1(hMsg, NW_GTPV1U_IE_RECOVERY, 0x00);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  GTPU_INFO("Sending NW_GTP_ECHO_RSP message to %x:%x with seq %u\n",
-            peerIp,
-            peerPort,
-            seqNum);
-#endif
-  MSC_LOG_TX_MESSAGE(
-    (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
-    (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
-    NULL,
-    0,
-    MSC_AS_TIME_FMT" ECHO-RSP seq %u",
-    0,0,seqNum);
-  rc = nwGtpv1uCreateAndSendMsg(
-         thiz,
-         peerIp,
-         peerPort,
-         (NwGtpv1uMsgT *) hMsg);
-
-  rc = nwGtpv1uMsgDelete((NwGtpv1uStackHandleT)thiz, hMsg);
-  NW_ASSERT(NW_GTPV1U_OK == rc);
-
-  return rc;
-}
-
-/*--------------------------------------------------------------------------*
- *                     P U B L I C   F U N C T I O N S                      *
- *--------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------
- * Constructor
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t stackType)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz;
-
-  thiz = (NwGtpv1uStackT *) malloc( sizeof(NwGtpv1uStackT));
-
-  if(thiz) {
-    memset(thiz, 0, sizeof(NwGtpv1uStackT));
-    thiz->id    = (NwPtrT)thiz;
-    thiz->stackType = stackType;
-    thiz->seq   = (uint16_t) ((uintptr_t)thiz) ; // FIXME interesting casts... don't know what this is good for...
-    RB_INIT(&(thiz->outstandingTxSeqNumMap));
-    RB_INIT(&(thiz->outstandingRxSeqNumMap));
-    RB_INIT(&(thiz->sessionMap));
-    RB_INIT(&(thiz->teidMap));
-
-    if (0 == 1) {
-      nwGtpv1uDisplayBanner();
-    }
-
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-
-  *hGtpuStackHandle = (NwGtpv1uStackHandleT) thiz;
-  return rc;
-}
-
-
-/*---------------------------------------------------------------------------
- * Destructor
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwGtpv1uFinalize( NW_IN  NwGtpv1uStackHandleT hGtpuStackHandle)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-
-  if(hGtpuStackHandle) {
-    free((void *)hGtpuStackHandle);
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  return rc;
-}
-
-
-/*---------------------------------------------------------------------------
- * Configuration Get/Set
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwGtpv1uSetUlpEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                      NW_IN NwGtpv1uUlpEntityT *pUlpEntity)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  if(pUlpEntity) {
-    thiz->ulp = *(pUlpEntity);
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  return rc;
-}
-
-
-NwGtpv1uRcT
-nwGtpv1uSetUdpEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                      NW_IN NwGtpv1uUdpEntityT *pUdpEntity)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  if(pUdpEntity) {
-    thiz->udp = *(pUdpEntity);
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  return rc;
-}
-
-NwGtpv1uRcT
-nwGtpv1uSetMemMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                         NW_IN NwGtpv1uMemMgrEntityT *pMemMgrEntity)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  if(pMemMgrEntity) {
-    thiz->memMgr = *(pMemMgrEntity);
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  return rc;
-}
-
-
-NwGtpv1uRcT
-nwGtpv1uSetTimerMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                           NW_IN NwGtpv1uTimerMgrEntityT *pTmrMgrEntity)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  if(pTmrMgrEntity) {
-    thiz->tmrMgr = *(pTmrMgrEntity);
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  return rc;
-}
-
-
-NwGtpv1uRcT
-nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                         NW_IN NwGtpv1uLogMgrEntityT *pLogMgrEntity)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  if(pLogMgrEntity) {
-    thiz->logMgr = *(pLogMgrEntity);
-    rc = NW_GTPV1U_OK;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  return rc;
-}
-
-NwGtpv1uRcT
-nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                     NW_IN uint32_t logLevel)
-{
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-  thiz->logLevel = logLevel;
-  return NW_GTPV1U_OK;
-}
-
-/*---------------------------------------------------------------------------
- * Process Request from Udp Layer
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                       NW_IN uint8_t *udpData,
-                       NW_IN uint32_t udpDataLen,
-                       NW_IN uint16_t peerPort,
-                       NW_IN uint32_t peerIp)
-{
-  NwGtpv1uRcT           ret = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT       *thiz;
-  uint16_t                msgType;
-
-#if defined(ENB_MODE)
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ, VCD_FUNCTION_IN);
-#endif
-  thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  NW_ASSERT(thiz);
-
-  msgType = *((uint8_t *)(udpData + 1));
-
-  switch(msgType) {
-  case NW_GTP_ECHO_REQ:
-    GTPU_DEBUG("NW_GTP_ECHO_REQ\n");
-    ret = nwGtpv1uHandleEchoReq( thiz, udpData, udpDataLen, peerPort, peerIp);
-    break;
-
-  case NW_GTP_ERROR_INDICATION:
-    GTPU_DEBUG("NW_GTP_ERROR_INDICATION\n");
-    ret = nwGtpv1uSendUlpMessageIndication( thiz,
-                                            0,
-                                            NW_GTPV1U_ULP_API_RECV_MSG,
-                                            msgType,
-                                            peerIp,
-                                            peerPort,
-                                            udpData,
-                                            udpDataLen);
-
-    NW_ASSERT(ret == NW_GTPV1U_OK);
-    break;
-
-  case NW_GTP_ECHO_RSP:
-    GTPU_DEBUG("NW_GTP_ECHO_RSP\n");
-    ret = NW_GTPV1U_OK;
-    break;
-
-  case NW_GTP_GPDU:
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-    GTPU_DEBUG("NW_GTP_GPDU: DATA COMING FROM UDP\n");
-#endif
-    ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp);
-    break;
-
-  case NW_GTP_END_MARKER:
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-    for(int i =1; i<= udpDataLen; i++){
-      printf("%02x ", (uint8_t)udpData[i-1]);
-      if(i % 20 == 0)printf("\n");
-    }
-#endif  	
-    GTPU_INFO("NW_GTP_END_MARKER\n");
-    ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp);
-    break;
-
-  default:
-    ret = NW_GTPV1U_FAILURE;
-    NW_ASSERT(0);
-    break;
-  }
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-#if defined(ENB_MODE)
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ, VCD_FUNCTION_OUT);
-#endif
-  return ret;
-}
-
-
-/*---------------------------------------------------------------------------
- * Process Request from Upper Layer
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                       NW_IN NwGtpv1uUlpApiT *pUlpReq)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
-
-  NW_ASSERT(thiz);
-  NW_ASSERT(pUlpReq != NULL);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-
-  switch(pUlpReq->apiType) {
-  case NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT: {
-    GTPU_DEBUG("Received NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT from ulp\n");
-    rc = NwGtpv1uCreateTunnelEndPoint(thiz,
-                                      pUlpReq->apiInfo.createTunnelEndPointInfo.teid,
-                                      pUlpReq->apiInfo.createTunnelEndPointInfo.hUlpSession,
-                                      &(pUlpReq->apiInfo.createTunnelEndPointInfo.hStackSession));
-  }
-  break;
-
-  case NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT: {
-    GTPU_DEBUG("Received destroy session req from ulp\n");
-    rc = nwGtpv1uDestroyTunnelEndPoint(thiz,  pUlpReq);
-  }
-  break;
-
-  case NW_GTPV1U_ULP_API_INITIAL_REQ: {
-    GTPU_DEBUG("Received initial req from ulp\n");
-    rc = nwGtpv1uInitialReq(thiz, pUlpReq);
-  }
-  break;
-
-  case NW_GTPV1U_ULP_API_SEND_TPDU: {
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-    GTPU_DEBUG("Received send tpdu req from ulp\n");
-#endif
-    rc = nwGtpv1uSendto(thiz,  pUlpReq);
-  }
-  break;
-
-  default:
-    GTPU_DEBUG("Unsupported API received from ulp\n");
-    rc = NW_GTPV1U_FAILURE;
-    break;
-  }
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-/*---------------------------------------------------------------------------
- * Process Timer timeout Request from Timer Manager
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwGtpv1uProcessTimeout(void *timeoutInfo)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
-  NwGtpv1uStackT *thiz;
-
-  NW_ASSERT(timeoutInfo != NULL);
-
-  thiz = (NwGtpv1uStackT *) (((NwGtpv1uTimeoutInfoT *) timeoutInfo)->hStack);
-
-  NW_ASSERT(thiz != NULL);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_ENTER(thiz);
-#endif
-  GTPU_DEBUG("Received timeout event from ULP with timeoutInfo 0x%p!\n",
-             timeoutInfo);
-
-  rc = (((NwGtpv1uTimeoutInfoT *) timeoutInfo)->timeoutCallbackFunc) (timeoutInfo);
-
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  NW_LEAVE(thiz);
-#endif
-  return rc;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c
deleted file mode 100644
index 365d6d23a5ff124b2ade204f940534c82aa7eb34..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c
+++ /dev/null
@@ -1,558 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 u    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "NwTypes.h"
-#include "NwLog.h"
-#include "NwUtils.h"
-#include "NwGtpv1uLog.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwGtpv1uMsg.h"
-#include "assertions.h"
-
-#include "gtpv1u.h"
-#if defined(ENB_MODE)
-#include "common/utils/LOG/log.h"
-#endif
-
-#define NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE                             (12)   /**< Size of GTPv1u EPC specific header */
-#define NW_GTPV1U_EPC_MIN_HEADER_SIZE                                  (8)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static NwGtpv1uMsgT *gpGtpv1uMsgPool = NULL;
-
-NwGtpv1uRcT
-nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                NW_IN uint8_t     seqNumFlag,
-                NW_IN uint8_t     npduNumFlag,
-                NW_IN uint8_t     extHdrFlag,
-                NW_IN uint8_t     msgType,
-                NW_IN uint8_t     teid,
-                NW_IN uint16_t    seqNum,
-                NW_IN uint8_t     npduNum,
-                NW_IN uint8_t     nextExtHeader,
-                NW_OUT NwGtpv1uMsgHandleT *phMsg)
-{
-  NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
-  NwGtpv1uMsgT *pMsg;
-
-  if(gpGtpv1uMsgPool) {
-    pMsg = gpGtpv1uMsgPool;
-    gpGtpv1uMsgPool = gpGtpv1uMsgPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(pStack, sizeof(NwGtpv1uMsgT), pMsg, NwGtpv1uMsgT *);
-  }
-
-
-  if(pMsg) {
-    pMsg->version       = NW_GTPU_VERSION;
-    pMsg->protocolType  = NW_GTP_PROTOCOL_TYPE_GTP;
-    pMsg->seqNumFlag    = seqNumFlag;
-    pMsg->npduNumFlag   = npduNumFlag;
-    pMsg->extHdrFlag    = extHdrFlag;
-    pMsg->msgType       = msgType;
-
-    if(seqNumFlag) {
-      pMsg->seqNum        = seqNum;
-    }
-
-    if(npduNumFlag) {
-      pMsg->npduNum       = npduNum;
-    }
-
-    if(extHdrFlag) {
-      pMsg->nextExtHdrType = nextExtHeader;
-    }
-
-    pMsg->msgLen        = ((pMsg->seqNumFlag || pMsg->npduNumFlag
-                            || pMsg->extHdrFlag) ?
-                           4 : 0);
-    //NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE : (NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - 4));
-
-    pMsg->msgBuf       = NULL;
-    pMsg->msgBufLen    = 0;
-    pMsg->msgBufOffset = 0;
-    *phMsg = (NwGtpv1uMsgHandleT) pMsg;
-    return NW_GTPV1U_OK;
-  }
-
-  return NW_GTPV1U_FAILURE;
-}
-
-NwGtpv1uRcT
-nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                    NW_IN uint32_t    teid,
-                    NW_IN uint8_t     seqNumFlag,
-                    NW_IN uint16_t    seqNum,
-                    NW_IN uint8_t    *tpdu,
-                    NW_IN uint16_t    tpduLength,
-                    NW_IN uint32_t    tpduOffset,
-                    NW_OUT NwGtpv1uMsgHandleT *phMsg)
-{
-  NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
-  NwGtpv1uMsgT   *pMsg;
-  //uint32_t          header_len  = 0;
-  uint32_t          msgExtraLen = 0;
-
-  if(gpGtpv1uMsgPool) {
-    pMsg = gpGtpv1uMsgPool;
-    gpGtpv1uMsgPool = gpGtpv1uMsgPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(pStack, sizeof(NwGtpv1uMsgT), pMsg, NwGtpv1uMsgT *);
-  }
-
-  if(pMsg) {
-    msgExtraLen        = (((seqNumFlag) || (NW_FALSE) || (NW_FALSE) ) ?
-                          (NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - NW_GTPV1U_EPC_MIN_HEADER_SIZE)  : 0);
-    AssertFatal((msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE) <= tpduOffset,
-                "Mismatch GTPU len, msgExtraLen %u tpduOffset %u",
-                msgExtraLen,
-                (uint32_t) tpduOffset);
-    pMsg->msgBuf       = tpdu;
-    pMsg->msgBufLen    = tpduLength + msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE;
-    pMsg->msgBufOffset = tpduOffset - (msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE);
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-    GTPU_DEBUG("MSG length %u, offset %u -> length %u offset %u\n",
-               tpduLength, tpduOffset,
-               pMsg->msgBufLen, pMsg->msgBufOffset);
-#endif
-
-    // Version field: This field is used to determine the version of the GTP-U protocol.
-    // The version number shall be set to '1'.
-    pMsg->version       = NW_GTPU_VERSION;
-    // Protocol Type (PT): This bit is used as a protocol discriminator between GTP (when PT is '1')
-    // and GTP' (when PT is '0'). GTP is described in this document and the GTP' protocol in 3GPP TS 32.295 [8].
-    // Note that the interpretation of the header fields may be different in GTP' than in GTP.
-    pMsg->protocolType  = NW_GTP_PROTOCOL_TYPE_GTP;
-    // Extension Header flag (E): This flag indicates the presence of a meaningful value of the Next Extension
-    // Header field. When it is set to '0', the Next Extension Header field either is not present or, if present,
-    // shall not be interpreted.
-    pMsg->extHdrFlag    = NW_FALSE;
-    // Sequence number flag (S): This flag indicates the presence of a meaningful value of the Sequence Number field.
-    // When it is set to '0', the Sequence Number field either is not present or, if present, shall not be interpreted.
-    // When it is set to '1', the Sequence Number field is present, and shall be interpreted, as described below in
-    // this section.
-    // For the Echo Request, Echo Response, Error Indication and Supported Extension Headers Notification
-    // messages, the S flag shall be set to '1'. Since the use of Sequence Numbers is optional for G-PDUs, the PGW,
-    // SGW, ePDG and eNodeB should set the flag to '0'. However, when a G-PDU (T-PDU+header) is being relayed
-    // by the Indirect Data Forwarding for Inter RAT HO procedure, then if the received G-PDU has the S flag set to
-    // '1', then the relaying entity shall set S flag to '1' and forward the G-PDU (T-PDU+header). In an End marker
-    // message the S flag shall be set to '0'.
-    pMsg->seqNumFlag    = (seqNumFlag? NW_TRUE : NW_FALSE);
-    pMsg->seqNum        = seqNum;
-    // N-PDU Number flag (PN): This flag indicates the presence of a meaningful value of the N-PDU Number field.
-    // When it is set to '0', the N-PDU Number field either is not present, or, if present, shall not be interpreted.
-    // When it is set to '1', the N-PDU Number field is present, and shall be interpreted.
-    pMsg->npduNumFlag   = NW_FALSE;
-    pMsg->npduNum       = 0x00;
-    // Message Type: This field indicates the type of GTP-U message.
-    pMsg->msgType       = NW_GTP_GPDU;
-    // Length: This field indicates the length in octets of the payload, i.e. the rest of the packet following the
-    // mandatory part of the GTP header (that is the first 8 octets).
-    // The Sequence Number, the N-PDU Number or any Extension headers shall be considered to be part of the payload,
-    // i.e. included in the length count.
-    //header_len          = ((pMsg->seqNumFlag || pMsg->npduNumFlag || pMsg->extHdrFlag ) ?
-    //                        NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE : NW_GTPV1U_EPC_MIN_HEADER_SIZE);
-    pMsg->msgLen        = msgExtraLen + tpduLength;
-
-    // Tunnel Endpoint Identifier (TEID): This field unambiguously identifies a tunnel endpoint in the receiving
-    // GTP-U protocol entity. The receiving end side of a GTP tunnel locally assigns the TEID value the transmitting
-    // side has to use. The TEID shall be used by the receiving entity to find the PDP context, except for the
-    // following cases:
-    // - The Echo Request/Response and Supported Extension Headers notification messages, where the Tunnel
-    //      Endpoint Identifier shall be set to all zeroes.
-    // - The Error Indication message where the Tunnel Endpoint Identifier shall be set to all zeros.
-    pMsg->teid          = teid;
-    pMsg->nextExtHdrType= 0x00;
-
-    //memcpy(pMsg->msgBuf + header_len, tpdu, tpduLength);
-    *phMsg = (NwGtpv1uMsgHandleT) pMsg;
-    return NW_GTPV1U_OK;
-  }
-
-  return NW_GTPV1U_FAILURE;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                       NW_IN NwGtpv1uMsgHandleT hMsg,
-                       NW_OUT NwGtpv1uMsgHandleT *phMsg)
-{
-  NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
-  NwGtpv1uMsgT *pMsg;
-
-  if(gpGtpv1uMsgPool) {
-    pMsg = gpGtpv1uMsgPool;
-    gpGtpv1uMsgPool = gpGtpv1uMsgPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(pStack, sizeof(NwGtpv1uMsgT), pMsg, NwGtpv1uMsgT *);
-  }
-
-
-  if(pMsg) {
-    memcpy(pMsg, (NwGtpv1uMsgT *)hMsg, sizeof(NwGtpv1uMsgT));
-    *phMsg = (NwGtpv1uMsgHandleT) pMsg;
-    return NW_GTPV1U_OK;
-  }
-
-  return NW_GTPV1U_FAILURE;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                          NW_IN uint8_t *pBuf,
-                          NW_IN uint32_t bufLen,
-                          NW_OUT NwGtpv1uMsgHandleT *phMsg)
-{
-  NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
-  NwGtpv1uMsgT *pMsg;
-
-  if(gpGtpv1uMsgPool) {
-    pMsg = gpGtpv1uMsgPool;
-    gpGtpv1uMsgPool = gpGtpv1uMsgPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(pStack, sizeof(NwGtpv1uMsgT), pMsg, NwGtpv1uMsgT *);
-  }
-
-
-  if(pMsg) {
-    pMsg->msgBuf    =  pBuf;
-
-    pMsg->version       = ((*pBuf) & 0xE0) >> 5;
-    pMsg->protocolType  = ((*pBuf) & 0x10) >> 4;
-    pMsg->extHdrFlag    = ((*pBuf) & 0x04) >> 2;
-    pMsg->seqNumFlag    = ((*pBuf) & 0x02) >> 1;
-    pMsg->npduNumFlag   = ((*pBuf) & 0x01);
-    pBuf++;
-
-    pMsg->msgType       = *(pBuf);
-    pBuf++;
-
-    pBuf += 2;
-
-    pMsg->teid          = ntohl(*((uint32_t *)pBuf));
-    pBuf += 4;
-
-    if(pMsg->extHdrFlag || pMsg->seqNumFlag || pMsg->npduNumFlag) {
-      pMsg->seqNum              = ntohs(*(((uint16_t *)pBuf)));
-      pBuf += 2;
-      pMsg->npduNum             = *(pBuf++);
-      pMsg->nextExtHdrType      = *(pBuf++);
-    }
-
-    pMsg->msgBufOffset = (uint32_t)(pBuf - pMsg->msgBuf);
-    pMsg->msgBufLen = bufLen - pMsg->msgBufOffset;
-    pMsg->msgLen    = bufLen;
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-    GTPU_DEBUG("nwGtpv1uMsgFromBufferNew() msgLen %u msgBufLen %u msgBufOffset %u ",
-               pMsg->msgLen, pMsg->msgBufLen, pMsg->msgBufOffset);
-#endif
-    *phMsg = (NwGtpv1uMsgHandleT) pMsg;
-    return NW_GTPV1U_OK;
-  }
-
-  return NW_GTPV1U_FAILURE;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
-                   NW_IN NwGtpv1uMsgHandleT hMsg)
-{
-  ((NwGtpv1uMsgT *)hMsg)->next = gpGtpv1uMsgPool;
-  gpGtpv1uMsgPool = (NwGtpv1uMsgT *) hMsg;
-  return NW_GTPV1U_OK;
-}
-
-/**
- * Set TEID for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- * @param[in] teid: TEID value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t teid)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  thiz->teid = teid;
-#if defined(LOG_GTPU) && LOG_GTPU > 0
-  GTPU_DEBUG("nwGtpv1uMsgSetTeid() teid %u", teid);
-#endif
-  return NW_GTPV1U_OK;
-}
-
-/**
- * Set sequence for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- * @param[in] seqNum: Flag boolean value.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t seqNum)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  thiz->seqNum = seqNum;
-  return NW_GTPV1U_OK;
-}
-
-/**
- * Get TEID present for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-uint32_t
-nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  return (thiz->teid);
-}
-
-
-/**
- * Get sequence number for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-uint32_t
-nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  return (thiz->seqNum);
-}
-
-/**
- * Get msg type for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-uint32_t
-nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  return (thiz->msgType);
-}
-
-/**
- * Get tpdu for gtpv1u message.
- *
- * @param[in] hMsg : Message handle.
- */
-
-NwGtpv1uRcT
-nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, uint8_t *pTpduBuf,
-                   uint32_t *pTpduLength)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  uint8_t headerLength = ((thiz->seqNumFlag || thiz->extHdrFlag
-                         || thiz->npduNumFlag) ? 12 : 8);
-
-  *pTpduLength = thiz->msgLen - headerLength;
-  memcpy(pTpduBuf, thiz->msgBuf + headerLength, *pTpduLength);
-  return NW_GTPV1U_OK;
-}
-
-uint8_t *
-nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  return (thiz->msgBuf + ((thiz->seqNumFlag || thiz->extHdrFlag
-                           || thiz->npduNumFlag) ? 12 : 8));
-}
-
-uint32_t
-nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg)
-{
-  NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
-  return (thiz->msgLen - ((thiz->seqNumFlag || thiz->extHdrFlag
-                           || thiz->npduNumFlag) ? 12 : 8));
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
-                    NW_IN uint8_t       type,
-                    NW_IN uint8_t       value)
-{
-  NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
-  NwGtpv1uIeTv1T *pIe;
-
-  pIe = (NwGtpv1uIeTv1T *) (pMsg->msgBuf + pMsg->msgLen);
-
-  pIe->t        = type;
-  pIe->v        = value;
-
-  pMsg->msgLen += sizeof(NwGtpv1uIeTv1T);
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
-                    NW_IN uint8_t       type,
-                    NW_IN uint16_t      length,
-                    NW_IN uint16_t      value)
-{
-  NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
-  NwGtpv1uIeTv2T *pIe;
-
-  pIe = (NwGtpv1uIeTv2T *) (pMsg->msgBuf + pMsg->msgLen);
-
-  pIe->t        = type;
-  pIe->v        = htons(value);
-
-  pMsg->msgLen += sizeof(NwGtpv1uIeTv2T);
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
-                    NW_IN uint8_t       type,
-                    NW_IN uint16_t      length,
-                    NW_IN uint32_t      value)
-{
-  NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
-  NwGtpv1uIeTv4T *pIe;
-
-  pIe = (NwGtpv1uIeTv4T *) (pMsg->msgBuf + pMsg->msgLen);
-
-  pIe->t        = type;
-  pIe->v        = htonl(value);
-
-  pMsg->msgLen += sizeof(NwGtpv1uIeTv4T);
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
-                 NW_IN uint8_t       type,
-                 NW_IN uint16_t      length,
-                 NW_IN uint8_t      *pVal)
-{
-  NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
-  NwGtpv1uIeTlvT *pIe;
-
-  pIe = (NwGtpv1uIeTlvT *) (pMsg->msgBuf + pMsg->msgLen);
-
-  pIe->t        = type;
-  pIe->l        = htons(length);
-
-  memcpy(pIe + 4, pVal, length);
-  pMsg->msgLen += (4 + length);
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE *fp)
-{
-
-  NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
-  uint8_t *data = pMsg->msgBuf;
-  uint32_t size = pMsg->msgLen;
-
-  unsigned char *p = (unsigned char *)data;
-  unsigned char c;
-  int n;
-  char bytestr[4] = {0};
-  char addrstr[10] = {0};
-  char hexstr[ 16*3 + 5] = {0};
-  char charstr[16*1 + 5] = {0};
-  fprintf((FILE *)fp, "\n");
-
-  for(n=1; n<=size; n++) {
-    if (n%16 == 1) {
-      /* store address for this line */
-      snprintf(addrstr, sizeof(addrstr), "%.4lx",
-               (p-data) );
-    }
-
-    c = *p;
-
-    if (isalnum(c) == 0) {
-      c = '.';
-    }
-
-    /* store hex str (for left side) */
-    snprintf(bytestr, sizeof(bytestr), "%02X ", *p);
-    strncat(hexstr, bytestr, sizeof(hexstr)-strlen(hexstr)-1);
-
-    /* store char str (for right side) */
-    snprintf(bytestr, sizeof(bytestr), "%c", c);
-    strncat(charstr, bytestr, sizeof(charstr)-strlen(charstr)-1);
-
-    if(n%16 == 0) {
-      /* line completed */
-      fprintf((FILE *)fp, "[%4.4s]   %-50.50s  %s\n", addrstr, hexstr, charstr);
-      hexstr[0] = 0;
-      charstr[0] = 0;
-    } else if(n%8 == 0) {
-      /* half line: add whitespaces */
-      strncat(hexstr, "  ", sizeof(hexstr)-strlen(hexstr)-1);
-      strncat(charstr, " ", sizeof(charstr)-strlen(charstr)-1);
-    }
-
-    p++; /* next byte */
-  }
-
-  if (strlen(hexstr) > 0) {
-    /* print rest of buffer if not empty */
-    fprintf((FILE *)fp, "[%4.4s]   %-50.50s  %s\n", addrstr, hexstr, charstr);
-
-  }
-
-  fprintf((FILE *)fp, "\n");
-
-  return NW_GTPV1U_OK;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-/*--------------------------------------------------------------------------*
- *                          E N D   O F   F I L E                           *
- *--------------------------------------------------------------------------*/
diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c
deleted file mode 100644
index 27cb59050f9f4084f369d5c3f16d40cd5bb81fb7..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c
+++ /dev/null
@@ -1,399 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S   T u n n e l i n g    P r o t o c o l   v 2 u    S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "NwTypes.h"
-#include "NwLog.h"
-#include "NwUtils.h"
-#include "NwGtpv1uLog.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwGtpv1uTrxn.h"
-
-/*--------------------------------------------------------------------------*
- *                 P R I V A T E  D E C L A R A T I O N S                   *
- *--------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static NwGtpv1uTrxnT *gpGtpv1uTrxnPool = NULL;
-
-/*--------------------------------------------------------------------------*
- *                   P R I V A T E      F U N C T I O N S                   *
- *--------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------
- * Send msg retransmission to peer via data request to UDP Entity
- *--------------------------------------------------------------------------*/
-
-static NwGtpv1uRcT
-nwGtpv1uTrxnSendMsgRetransmission(NwGtpv1uTrxnT *thiz)
-{
-  NwGtpv1uRcT rc;
-
-  NW_ASSERT(thiz);
-  NW_ASSERT(thiz->pMsg);
-
-  rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp,
-       thiz->pMsg->msgBuf,
-       thiz->pMsg->msgLen,
-       thiz->pMsg->msgBufOffset,
-       thiz->peerIp,
-       thiz->peerPort);
-
-  return rc;
-}
-
-static NwGtpv1uRcT
-nwGtpv1uTrxnPeerRspTimeout(void *arg)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uTrxnT *thiz;
-  NwGtpv1uStackT *pStack;
-  NwGtpv1uTimeoutInfoT *timeoutInfo = arg;
-
-  thiz = ((NwGtpv1uTrxnT *)timeoutInfo->timeoutArg);
-  pStack = thiz->pStack;
-
-  NW_ASSERT(pStack);
-
-  NW_LOG(pStack, NW_LOG_LEVEL_WARN, "T3 timer expired for transaction 0x%p",
-         thiz);
-
-  rc = nwGtpv1uTrxnSendMsgRetransmission(thiz);
-
-  if(thiz->maxRetries) {
-    rc = pStack->tmrMgr.tmrStartCallback(pStack->tmrMgr.tmrMgrHandle,
-                                         thiz->t3Timer, 0, NW_GTPV1U_TMR_TYPE_ONE_SHOT, (void *)timeoutInfo,
-                                         &thiz->hRspTmr);
-    thiz->maxRetries--;
-  } else {
-    NwGtpv1uUlpApiT ulpApi;
-    ulpApi.apiType                      = NW_GTPV1U_ULP_API_RSP_FAILURE;
-    ulpApi.apiInfo.recvMsgInfo.msgType  = nwGtpv1uMsgGetMsgType((
-                                            NwGtpv1uMsgHandleT)thiz->pMsg);
-    ulpApi.apiInfo.recvMsgInfo.hUlpTrxn = thiz->hUlpTrxn;
-    ulpApi.apiInfo.recvMsgInfo.peerIp   = thiz->peerIp;
-    ulpApi.apiInfo.recvMsgInfo.peerPort = thiz->peerPort;
-    thiz->hRspTmr = 0;
-
-    rc = nwGtpv1uTrxnDelete(&thiz);
-    NW_ASSERT(rc == NW_GTPV1U_OK);
-
-    rc = pStack->ulp.ulpReqCallback(pStack->ulp.hUlp, &ulpApi);
-    NW_ASSERT(rc == NW_GTPV1U_OK);
-  }
-
-  return rc;
-}
-
-/**
-  Send timer start request to TmrMgr Entity.
-
-  @param[in] thiz : Pointer to transaction
-  @param[in] timeoutCallbackFunc : Timeout handler callback function.
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uTrxnStartPeerRspTimer(NwGtpv1uTrxnT *thiz,
-                              NwGtpv1uRcT (*timeoutCallbackFunc)(void *))
-{
-  NwGtpv1uRcT rc;
-  NwGtpv1uTimeoutInfoT *timeoutInfo;
-
-  NW_ASSERT(thiz->pStack->tmrMgr.tmrStartCallback != NULL);
-
-  timeoutInfo                           = &thiz->peerRspTimeoutInfo;
-  timeoutInfo->timeoutArg               = thiz;
-  timeoutInfo->timeoutCallbackFunc      = timeoutCallbackFunc;
-  timeoutInfo->hStack                   = (NwGtpv1uStackHandleT)thiz->pStack;
-
-  rc = thiz->pStack->tmrMgr.tmrStartCallback(thiz->pStack->tmrMgr.tmrMgrHandle,
-       thiz->t3Timer, 0, NW_GTPV1U_TMR_TYPE_ONE_SHOT, (void *)timeoutInfo,
-       &thiz->hRspTmr);
-
-  return rc;
-}
-
-/**
-  Send timer stop request to TmrMgr Entity.
-
-  @param[in] thiz : Pointer to transaction
-  @return NW_GTPV1U_OK on success.
- */
-
-static NwGtpv1uRcT
-nwGtpv1uTrxnStopPeerRspTimer(NwGtpv1uTrxnT *thiz)
-{
-  NwGtpv1uRcT rc;
-
-  NW_ASSERT(thiz->pStack->tmrMgr.tmrStopCallback != NULL);
-
-  rc = thiz->pStack->tmrMgr.tmrStopCallback(thiz->pStack->tmrMgr.tmrMgrHandle,
-       thiz->hRspTmr);
-
-  thiz->hRspTmr = 0;
-
-  return rc;
-}
-
-/*--------------------------------------------------------------------------*
- *                      P U B L I C    F U N C T I O N S                    *
- *--------------------------------------------------------------------------*/
-
-/**
- * Constructor
- *
- * @param[in] thiz : Pointer to stack
- * @param[out] ppTrxn : Pointer to pointer to Trxn object.
- * @return NW_GTPV1U_OK on success.
- */
-NwGtpv1uRcT
-nwGtpv1uTrxnNew( NW_IN  NwGtpv1uStackT *thiz,
-                 NW_OUT NwGtpv1uTrxnT **ppTrxn)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uTrxnT *pTrxn;
-
-  if(gpGtpv1uTrxnPool) {
-    pTrxn = gpGtpv1uTrxnPool;
-    gpGtpv1uTrxnPool = gpGtpv1uTrxnPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(thiz, sizeof(NwGtpv1uTrxnT), pTrxn, NwGtpv1uTrxnT *);
-  }
-
-  if (pTrxn) {
-    pTrxn->maxRetries   = 2;
-    pTrxn->pStack       = thiz;
-    pTrxn->t3Timer      = 2;
-    pTrxn->seqNum       = thiz->seq;
-
-    /* Increment sequence number */
-    thiz->seq++;
-
-    if(thiz->seq == 0x800000) {
-      thiz->seq = 0;
-    }
-
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Created transaction 0x%p", pTrxn);
-
-  *ppTrxn = pTrxn;
-
-  return rc;
-}
-
-/**
- * Overloaded Constructor
- *
- * @param[in] thiz : Pointer to stack.
- * @param[in] seqNum : Sequence number for this transaction.
- * @param[out] ppTrxn : Pointer to pointer to Trxn object.
- * @return NW_GTPV1U_OK on success.
- */
-NwGtpv1uRcT
-nwGtpv1uTrxnWithSeqNew( NW_IN  NwGtpv1uStackT *thiz,
-                        NW_IN  uint32_t seqNum,
-                        NW_OUT NwGtpv1uTrxnT **ppTrxn)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uTrxnT *pTrxn;
-
-  if(gpGtpv1uTrxnPool) {
-    pTrxn = gpGtpv1uTrxnPool;
-    gpGtpv1uTrxnPool = gpGtpv1uTrxnPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(thiz, sizeof(NwGtpv1uTrxnT), pTrxn, NwGtpv1uTrxnT *);
-  }
-
-
-  if (pTrxn) {
-    pTrxn->maxRetries   = 2;
-    pTrxn->pStack       = thiz;
-    pTrxn->t3Timer      = 2;
-    pTrxn->seqNum       = seqNum;
-    pTrxn->pMsg         = NULL;
-  } else {
-    rc = NW_GTPV1U_FAILURE;
-  }
-
-  NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Created transaction 0x%p", pTrxn);
-
-  *ppTrxn = pTrxn;
-
-  return rc;
-}
-
-/**
- * Destructor
- *
- * @param[out] pthiz : Pointer to pointer to Trxn object.
- * @return NW_GTPV1U_OK on success.
- */
-NwGtpv1uRcT
-nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uStackT *pStack;
-  NwGtpv1uTrxnT *thiz = *pthiz;
-
-  pStack = thiz->pStack;
-
-  if(thiz->hRspTmr) {
-    rc = nwGtpv1uTrxnStopPeerRspTimer(thiz);
-    NW_ASSERT(rc == NW_GTPV1U_OK);
-  }
-
-  if(thiz->pMsg) {
-    rc = nwGtpv1uMsgDelete((NwGtpv1uStackHandleT)pStack,
-                           (NwGtpv1uMsgHandleT)thiz->pMsg);
-    NW_ASSERT(rc == NW_GTPV1U_OK);
-  }
-
-  thiz->next = gpGtpv1uTrxnPool;
-  gpGtpv1uTrxnPool = thiz;
-
-  NW_LOG(pStack, NW_LOG_LEVEL_DEBG, "Purged transaction 0x%p", thiz);
-
-  *pthiz = NULL;
-  return rc;
-}
-
-
-#if 1
-/**
- * Send msg to peer via data request to UDP Entity
- *
- * @param[in] thiz : Pointer to stack.
- * @param[in] pTrxn : Pointer to Trxn object.
- * @param[in] peerIp : Peer Ip address.
- * @param[in] peerPort : Peer Ip port.
- * @param[in] pMsg : Message to be sent.
- * @return NW_GTPV1U_OK on success.
- */
-NwGtpv1uRcT
-nwGtpv1uTrxnCreateAndSendMsg( NW_IN  NwGtpv1uStackT *thiz,
-                              NW_IN  NwGtpv1uTrxnT *pTrxn,
-                              NW_IN  uint32_t peerIp,
-                              NW_IN  uint32_t peerPort,
-                              NW_IN  NwGtpv1uMsgT *pMsg)
-{
-  NwGtpv1uRcT rc;
-  uint8_t *msgHdr;
-
-  NW_ASSERT(thiz);
-  NW_ASSERT(pMsg);
-
-  msgHdr = &pMsg->msgBuf[pMsg->msgBufOffset];
-
-  NW_ASSERT(msgHdr != NULL);
-
-  *(msgHdr++)         = (pMsg->version << 5)            |
-                        (pMsg->protocolType << 4)       |
-                        (pMsg->extHdrFlag << 2)         |
-                        (pMsg->seqNumFlag << 1)         |
-                        (pMsg->npduNumFlag);
-
-  *(msgHdr++)         = (pMsg->msgType);
-  *((uint16_t *) msgHdr) = htons(pMsg->msgLen);
-  msgHdr += 2;
-
-  *((uint32_t *) msgHdr) = htonl(pMsg->teid);
-  msgHdr += 4;
-
-  if(pMsg->seqNumFlag | pMsg->extHdrFlag | pMsg->npduNumFlag) {
-    if(pMsg->seqNumFlag) {
-      *((uint16_t *) msgHdr) = htons((pTrxn ? pTrxn->seqNum : pMsg->seqNum));
-    } else {
-      *((uint16_t *) msgHdr) = 0x0000;
-    }
-
-    msgHdr += 2;
-
-    if(pMsg->npduNumFlag) {
-      *((uint8_t *) msgHdr) = pMsg->npduNumFlag;
-    } else {
-      *((uint8_t *) msgHdr) = 0x00;
-    }
-
-    msgHdr++;
-
-    if(pMsg->extHdrFlag) {
-      *((uint8_t *) msgHdr) = pMsg->extHdrFlag;
-    } else {
-      *((uint8_t *) msgHdr) = 0x00;
-    }
-
-    msgHdr++;
-  }
-
-  NW_ASSERT(thiz->udp.udpDataReqCallback != NULL);
-
-  rc = thiz->udp.udpDataReqCallback(thiz->udp.hUdp,
-                                    pMsg->msgBuf,
-                                    pMsg->msgLen,
-                                    pMsg->msgBufOffset,
-                                    peerIp,
-                                    peerPort);
-
-  /* Save the message for retransmission */
-  if(rc == NW_GTPV1U_OK && pTrxn) {
-    pTrxn->pMsg         = pMsg;
-    pTrxn->peerIp       = peerIp;
-    pTrxn->peerPort     = peerPort;
-
-    rc = nwGtpv1uTrxnStartPeerRspTimer(pTrxn, nwGtpv1uTrxnPeerRspTimeout);
-    NW_ASSERT(rc == NW_GTPV1U_OK);
-  }
-
-  return rc;
-}
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-/*--------------------------------------------------------------------------*
- *                          E N D   O F   F I L E                           *
- *--------------------------------------------------------------------------*/
diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
deleted file mode 100644
index c62f60edc29725de705589767f4027d617b5fe03..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *
- *                                                                            *
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "NwTypes.h"
-#include "NwUtils.h"
-#include "NwGtpv1uError.h"
-#include "NwGtpv1uPrivate.h"
-#include "NwGtpv1uMsg.h"
-#include "NwGtpv1uTunnelEndPoint.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uLog.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------*
- *                  P R I V A T E   D E C L A R A T I O N S                 *
- *--------------------------------------------------------------------------*/
-
-static NwGtpv1uTunnelEndPointT *gpTunnelEndPointPool = NULL;
-
-/*--------------------------------------------------------------------------*
- *                     P U B L I C   F U N C T I O N S                      *
- *--------------------------------------------------------------------------*/
-
-/**
-  Constructor
-
-  @param[in] msid: MSID
-  @param[in] peerAddr: Address of the peer.
-  @return Pointer to Session on success, NULL on failure.
- */
-
-
-NwGtpv1uTunnelEndPointT *
-nwGtpTunnelEndPointNew(struct NwGtpv1uStack *pStack)
-{
-  NwGtpv1uTunnelEndPointT *thiz;
-
-  if(gpTunnelEndPointPool) {
-    thiz = gpTunnelEndPointPool;
-    gpTunnelEndPointPool = gpTunnelEndPointPool->next;
-  } else {
-    NW_GTPV1U_MALLOC(pStack, sizeof(NwGtpv1uTunnelEndPointT), thiz,
-                     NwGtpv1uTunnelEndPointT *);
-  }
-
-  return thiz;
-}
-
-/**
-  Destructor
-
-  @param[in] thiz: Pointer to session
-  @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpTunnelEndPointDestroy(struct NwGtpv1uStack *pStack,
-                           NwGtpv1uTunnelEndPointT *thiz)
-{
-  thiz->next = gpTunnelEndPointPool;
-  gpTunnelEndPointPool = thiz;
-  return NW_GTPV1U_OK;
-}
-
-/**
-  Purge a Transaction for a Session.
-
-  @param[in] thiz: Pointer to session
-  @param[in,out] pTrxn: Pointer to the trxn.
-  @return NW_GTPV1U_OK on success.
- */
-
-NwGtpv1uRcT
-nwGtpSessionSendMsgApiToUlpEntity(NwGtpv1uTunnelEndPointT *thiz,
-                                  NwGtpv1uMsgT *pMsg)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwGtpv1uUlpApiT api;
-
-  api.apiType                         = NW_GTPV1U_ULP_API_RECV_TPDU;
-  api.apiInfo.recvMsgInfo.hUlpSession = thiz->hUlpSession;
-  api.apiInfo.recvMsgInfo.teid        = thiz->teid;
-  api.apiInfo.recvMsgInfo.hMsg        = (NwGtpv1uMsgHandleT)pMsg;
-
-  NW_ASSERT(thiz->pStack->ulp.ulpReqCallback != NULL);
-
-  thiz->pStack->ulp.ulpReqCallback(thiz->pStack->ulp.hUlp, &api);
-
-  return rc;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-/*--------------------------------------------------------------------------*
- *                      E N D     O F    F I L E                            *
- *--------------------------------------------------------------------------*/
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.am b/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.am
deleted file mode 100644
index 69b8e698e9aeef64a8ddd4fcf6913984a95613b3..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-# this is example-file: Makefile.am
-
-# the subdirectories of the project to go into
-SUBDIRS =   \
-           nw-helloworld
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.in b/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.in
deleted file mode 100644
index 46928b9e3cf392488358170b3015da0574502cd5..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.in
+++ /dev/null
@@ -1,461 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# this is example-file: Makefile.am
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = nw-gtpv1u/test-app
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_LDFLAGS = @AM_LDFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# the subdirectories of the project to go into
-SUBDIRS = \
-           nw-helloworld
-
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  nw-gtpv1u/test-app/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  nw-gtpv1u/test-app/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-info: install-info-recursive
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-ps: install-ps-recursive
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-	install-strip
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic ctags \
-	ctags-recursive distclean distclean-generic distclean-tags \
-	distdir dvi dvi-am html html-am info info-am install \
-	install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
-	tags-recursive uninstall uninstall-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am
deleted file mode 100644
index f60cd93f555f2fd4a96562e2a5fcbba9c5b20b06..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-bin_PROGRAMS = helloworld
-
-AM_CFLAGS = -D__WITH_LIBEVENT__ -I../../shared -I../../include -I../../test-app/nw-udp -I../../test-app/nw-log @AM_CFLAGS@
-
-helloworld_SOURCES =    \
-			NwEvt.h\
-			NwMiniLogMgrEntity.h\
-			NwMiniTmrMgrEntity.h\
-			NwMiniUlpEntity.h\
-			NwMiniUdpEntity.h\
-			NwMiniLogMgrEntity.c\
-			NwMiniTmrMgrEntity.c\
-			NwMiniUlpEntity.c\
-			NwMiniUdpEntity.c\
-                        helloworld.c
-
-helloworld_LDADD =  ../../src/libNwGtpv1u.a -levent $(AM_LDFLAGS)
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in
deleted file mode 100644
index 769d75c16bfccfbfebf77881d4e2fec91b576586..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in
+++ /dev/null
@@ -1,433 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-bin_PROGRAMS = helloworld$(EXEEXT)
-subdir = nw-gtpv1u/test-app/nw-helloworld
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am_helloworld_OBJECTS = NwMiniLogMgrEntity.$(OBJEXT) \
-	NwMiniTmrMgrEntity.$(OBJEXT) NwMiniUlpEntity.$(OBJEXT) \
-	NwMiniUdpEntity.$(OBJEXT) helloworld.$(OBJEXT)
-helloworld_OBJECTS = $(am_helloworld_OBJECTS)
-am__DEPENDENCIES_1 =
-helloworld_DEPENDENCIES = ../../src/libNwGtpv1u.a \
-	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(helloworld_SOURCES)
-DIST_SOURCES = $(helloworld_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_CFLAGS = -D__WITH_LIBEVENT__ -I../../shared -I../../include -I../../test-app/nw-udp -I../../test-app/nw-log @AM_CFLAGS@
-AM_LDFLAGS = @AM_LDFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-helloworld_SOURCES = \
-			NwEvt.h\
-			NwMiniLogMgrEntity.h\
-			NwMiniTmrMgrEntity.h\
-			NwMiniUlpEntity.h\
-			NwMiniUdpEntity.h\
-			NwMiniLogMgrEntity.c\
-			NwMiniTmrMgrEntity.c\
-			NwMiniUlpEntity.c\
-			NwMiniUdpEntity.c\
-                        helloworld.c
-
-helloworld_LDADD = ../../src/libNwGtpv1u.a -levent $(AM_LDFLAGS)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  nw-gtpv1u/test-app/nw-helloworld/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  nw-gtpv1u/test-app/nw-helloworld/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
-
-clean-binPROGRAMS:
-	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-helloworld$(EXEEXT): $(helloworld_OBJECTS) $(helloworld_DEPENDENCIES) 
-	@rm -f helloworld$(EXEEXT)
-	$(LINK) $(helloworld_OBJECTS) $(helloworld_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NwMiniLogMgrEntity.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NwMiniTmrMgrEntity.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NwMiniUdpEntity.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NwMiniUlpEntity.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helloworld.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-info: install-info-am
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-ps: install-ps-am
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic ctags distclean distclean-compile \
-	distclean-generic distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-binPROGRAMS
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h
deleted file mode 100644
index 6df5794a5ffff32f98f87b78cd9408ee2887835d..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- * Copyright (c) 2010-2011 Amit Chawre                                        *
- * All rights reserved.                                                       *
- *                                                                            *
- * Redistribution and use in source and binary forms, with or without         *
- * modification, are permitted provided that the following conditions         *
- * are met:                                                                   *
- *                                                                            *
- * 1. Redistributions of source code must retain the above copyright          *
- *    notice, this list of conditions and the following disclaimer.           *
- * 2. Redistributions in binary form must reproduce the above copyright       *
- *    notice, this list of conditions and the following disclaimer in the     *
- *    documentation and/or other materials provided with the distribution.    *
- * 3. The name of the author may not be used to endorse or promote products   *
- *    derived from this software without specific prior written permission.   *
- *                                                                            *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR       *
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  *
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.    *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,           *
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT   *
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  *
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY      *
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        *
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   *
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          *
- *----------------------------------------------------------------------------*/
-
-#ifndef __NW_EVT_H__
-#define __NW_EVT_H__
-/**
- * @file NwEvt.h
- * @brief
-*/
-
-#ifdef __WITH_LIBEVENT__
-
-#include <event.h>
-
-typedef struct event                    NwEventT;
-
-#define NW_EVT_READ                     (EV_READ)
-#define NW_EVT_PERSIST                  (EV_PERSIST)
-#define NW_EVT_CALLBACK(__cbFunc)       __cbFunc(int fd, short event, void *arg)
-#define NW_TMR_CALLBACK(__cbFunc)       __cbFunc(int fd, short event, void *arg)
-
-#define NW_EVT_INIT                     event_init
-#define NW_EVT_LOOP                     event_dispatch
-
-#define NW_EVENT_ADD(__ev, __evSelObj, __evCallback, __evCallbackArg, __evFlags)        \
-  do {                                                                                  \
-    event_set(&(__ev), __evSelObj, __evFlags, __evCallback, __evCallbackArg);           \
-    event_add(&(__ev), NULL);                                                           \
-  } while(0)
-
-#else
-
-#warning "Event library not defined!"
-
-/* HACK : Defining dummy values for compilation!*/
-
-typedef struct {
-  int __tbd;
-} NwEventT;
-
-#define NW_EVT_READ                     (0)
-#define NW_EVT_PERSIST                  (1)
-#define NW_EVT_CALLBACK(__cbFunc)       __cbFunc(void *arg)
-#define NW_TMR_CALLBACK(__cbFunc)       __cbFunc(void *arg)
-
-
-#define NW_EVT_INIT()                   do { printf("error: Event library not defined!\n"); exit (0); } while(0)
-#define NW_EVT_LOOP()                   do { printf("error: Event library not defined!\n"); exit (0); } while(0)
-#define NW_EVENT_ADD(...)               do { printf("error: Event library not defined!\n"); exit (0); } while(0)
-
-
-#endif
-
-#endif /* __NW_EVT_H__ */
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c
deleted file mode 100644
index c50e6a17db46813029faf6d062cf9daa87bb2e61..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *         M I N I M A L I S T I C    L O G M G R     E N T I T Y             *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file hello-world.c
- * @brief This file contains example of a minimalistic log manager entity.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwLog.h"
-#include "NwEvt.h"
-#include "NwGtpv1u.h"
-
-#include "NwMiniLogMgrEntity.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-uint32_t g_log_level = NW_LOG_LEVEL_INFO;
-
-/*---------------------------------------------------------------------------
- * Public functions
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT nwMiniLogMgrInit(NwMiniLogMgrT *thiz, uint32_t logLevel )
-{
-  thiz->logLevel = logLevel;
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT *thiz, uint32_t logLevel)
-{
-  thiz->logLevel = logLevel;
-}
-
-NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT hLogMgr,
-                                    uint32_t logLevel,
-                                    NwCharT *file,
-                                    uint32_t line,
-                                    NwCharT *logStr)
-{
-  NwMiniLogMgrT *thiz = (NwMiniLogMgrT *) hLogMgr;
-
-  if(thiz->logLevel >= logLevel) {
-    printf("NWGTPv2U-STK  %s - %s <%s,%u>\n", gLogLevelStr[logLevel], logStr,
-           basename(file), line);
-  }
-
-  return NW_GTPV1U_OK;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h
deleted file mode 100644
index 18b60aa611721c54e5652f2602503e6c184f2964..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *         M I N I M A L I S T I C    L O G M G R     E N T I T Y             *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file hello-world.c
- * @brief This file contains example of a minimalistic log manager entity.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwLog.h"
-
-#ifndef __NW_MINI_LOG_MGR_H__
-#define __NW_MINI_LOG_MGR_H__
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-extern uint32_t g_log_level;
-
-
-#define NW_LOG( _logLevel, ...)                                         \
-  do {                                                                  \
-    if(g_log_level >= _logLevel)                                        \
-    {                                                                   \
-      char _logStr[1024];                                               \
-      snprintf(_logStr, 1024, __VA_ARGS__);                             \
-      printf("NWGTPv2U-APP  %s - %s <%s,%d>\n", gLogLevelStr[_logLevel], _logStr, basename(__FILE__), __LINE__);\
-    }                                                                   \
-  } while(0)
-
-typedef struct {
-  uint8_t  logLevel;
-} NwMiniLogMgrT;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT logMgrHandle,
-                                    uint32_t logLevel,
-                                    NwCharT* file,
-                                    uint32_t line,
-                                    NwCharT* logStr);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c
deleted file mode 100644
index 63ad59b23f82b5cd731305a8c1258b48efe5cd37..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *         M I N I M A L I S T I C    T M R M G R     E N T I T Y             *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file NwMiniTmrMgrEntity.c
- * @brief This file ontains example of a minimalistic timer manager entity.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwGtpv1u.h"
-#include "NwMiniLogMgrEntity.h"
-#include "NwMiniTmrMgrEntity.h"
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------
- * Private functions
- *--------------------------------------------------------------------------*/
-
-static void
-NW_TMR_CALLBACK(nwMiniTmrMgrHandleTimeout)
-{
-  NwGtpv1uRcT rc;
-  NwMiniTmrMgrEntityT *pTmr = (NwMiniTmrMgrEntityT *) arg;
-
-  /*---------------------------------------------------------------------------
-   *  Send Timeout Request to GTPv1u Stack Instance
-   *--------------------------------------------------------------------------*/
-
-  rc = nwGtpv1uProcessTimeout(pTmr->timeoutArg);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  free(pTmr);
-
-  return;
-}
-
-/*---------------------------------------------------------------------------
- * Public functions
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-                          uint32_t timeoutSec,
-                          uint32_t timeoutUsec,
-                          uint32_t tmrType,
-                          void  *timeoutArg,
-                          NwGtpv1uTimerHandleT *hTmr)
-{
-  NwGtpv1uRcT rc = NW_GTPV1U_OK;
-  NwMiniTmrMgrEntityT *pTmr;
-  struct timeval tv;
-
-  NW_LOG(NW_LOG_LEVEL_INFO,
-         "Received start timer request from stack with timer type %d , arg %x, for %d sec and %d usec",
-         tmrType, (unsigned int)timeoutArg, timeoutSec, timeoutUsec);
-
-  pTmr = (NwMiniTmrMgrEntityT *) malloc (sizeof(NwMiniTmrMgrEntityT));
-
-  /* set the timevalues*/
-  timerclear(&tv);
-  tv.tv_sec     = timeoutSec;
-  tv.tv_usec    = timeoutUsec;
-
-  pTmr->timeoutArg = timeoutArg;
-  evtimer_set(&pTmr->ev, nwMiniTmrMgrHandleTimeout, pTmr);
-
-  /*add event*/
-
-  event_add(&(pTmr->ev), &tv);
-
-  *hTmr = (NwGtpv1uTimerHandleT)pTmr;
-
-  return rc;
-}
-
-NwGtpv1uRcT nwTimerStop( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-                         NwGtpv1uTimerHandleT hTmr)
-{
-  NW_LOG(NW_LOG_LEVEL_INFO,
-         "Received stop timer request from stack for timer handle %d", hTmr);
-  evtimer_del(&(((NwMiniTmrMgrEntityT *)hTmr)->ev));
-  free((void *)hTmr);
-  return NW_GTPV1U_OK;
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h
deleted file mode 100644
index a1f16ff89b9010ddd59fa38d563599c76427989a..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *         M I N I M A L I S T I C    T M R M G R     E N T I T Y             *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-
-/**
- * @file NwMiniTmrMgrEntity.c
- * @brief This file ontains example of a minimalistic timer manager entity.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwLog.h"
-
-#ifndef __NW_MINI_TMR_MGR_H__
-#define __NW_MINI_TMR_MGR_H__
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-typedef struct {
-  NwEventT      ev;
-  void*         timeoutArg;
-} NwMiniTmrMgrEntityT;
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-                          uint32_t timeoutSec,
-                          uint32_t timeoutUsec,
-                          uint32_t tmrType,
-                          void*  timeoutArg,
-                          NwGtpv1uTimerHandleT* hTmr);
-
-
-NwGtpv1uRcT nwTimerStop( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
-                         NwGtpv1uTimerHandleT hTmr);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c
deleted file mode 100644
index a63b02985c51335e328226e18c2bb2d42874659f..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *            M I N I M A L I S T I C     U D P     E N T I T Y               *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-
-/**
- * @file NwMiniUdpEntity.c
- * @brief This file contains example of a minimalistic ULP entity.
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#include "NwEvt.h"
-#include "NwGtpv1u.h"
-#include "NwMiniLogMgrEntity.h"
-#include "NwMiniUdpEntity.h"
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-#define MAX_UDP_PAYLOAD_LEN             (4096)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------
- * Private functions
- *--------------------------------------------------------------------------*/
-
-static
-void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData)
-{
-  NwGtpv1uRcT         rc;
-  uint8_t         udpBuf[MAX_UDP_PAYLOAD_LEN];
-  NwS32T        bytesRead;
-  uint32_t        peerLen;
-  struct sockaddr_in peer;
-  NwMiniUdpEntityT *thiz = (NwMiniUdpEntityT *) arg;
-
-  peerLen = sizeof(peer);
-
-  bytesRead = recvfrom(thiz->hSocket, udpBuf, MAX_UDP_PAYLOAD_LEN , 0,
-                       (struct sockaddr *) &peer,(socklen_t *) &peerLen);
-
-  if(bytesRead) {
-    NW_LOG(NW_LOG_LEVEL_DEBG, "Received UDP message of length %u from %X:%u",
-           bytesRead, ntohl(peer.sin_addr.s_addr), ntohs(peer.sin_port));
-    rc = nwGtpv1uProcessUdpReq(thiz->hGtpv1uStack, udpBuf, bytesRead,
-                               peer.sin_port, peer.sin_addr.s_addr);
-  } else {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-  }
-}
-
-
-/*---------------------------------------------------------------------------
- * Public functions
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT *thiz,
-                          NwGtpv1uStackHandleT hGtpv1uStack, uint8_t *ipAddr)
-{
-  int sd;
-  struct sockaddr_in addr;
-
-  sd = socket(AF_INET, SOCK_DGRAM, 0);
-
-  if (sd < 0) {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-    NW_ASSERT(0);
-  }
-
-  addr.sin_family       = AF_INET;
-  addr.sin_port         = htons(2152);
-  addr.sin_addr.s_addr  = inet_addr(ipAddr);
-  memset(addr.sin_zero, '\0', sizeof (addr.sin_zero));
-
-  if(bind(sd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-    NW_ASSERT(0);
-  }
-
-  event_set(&(thiz->ev), sd, EV_READ|EV_PERSIST, nwUdpDataIndicationCallbackData,
-            thiz);
-  event_add(&(thiz->ev), NULL);
-
-  thiz->hSocket = sd;
-  thiz->hGtpv1uStack = hGtpv1uStack;
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT *thiz)
-{
-  close(thiz->hSocket);
-}
-
-NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle,
-                             uint8_t *dataBuf,
-                             uint32_t dataSize,
-                             uint32_t peerIpAddr,
-                             uint32_t peerPort)
-{
-  struct sockaddr_in peerAddr;
-  NwS32T bytesSent;
-  NwMiniUdpEntityT *thiz = (NwMiniUdpEntityT *) udpHandle;
-
-  peerAddr.sin_family       = AF_INET;
-  peerAddr.sin_port         = htons(peerPort);
-  peerAddr.sin_addr.s_addr  = (peerIpAddr);
-  memset(peerAddr.sin_zero, '\0', sizeof (peerAddr.sin_zero));
-
-  NW_LOG(NW_LOG_LEVEL_DEBG,
-         "Sending %u bytes on handle 0x%x to peer %u.%u.%u.%u:%u", dataSize, udpHandle,
-         (peerIpAddr & 0x000000ff),
-         (peerIpAddr & 0x0000ff00) >> 8,
-         (peerIpAddr & 0x00ff0000) >> 16,
-         (peerIpAddr & 0xff000000) >> 24,
-         peerPort);
-
-  bytesSent = sendto (thiz->hSocket, dataBuf, dataSize, 0,
-                      (struct sockaddr *) &peerAddr, sizeof(peerAddr));
-
-  if(bytesSent < 0) {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-  } else {
-    NW_LOG(NW_LOG_LEVEL_DEBG, "Sent %u bytes on handle 0x%x to peer %u.%u.%u.%u",
-           dataSize, udpHandle,
-           (peerIpAddr & 0x000000ff),
-           (peerIpAddr & 0x0000ff00) >> 8,
-           (peerIpAddr & 0x00ff0000) >> 16,
-           (peerIpAddr & 0xff000000) >> 24);
-
-  }
-
-  return NW_GTPV1U_OK;
-}
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h
deleted file mode 100644
index 568c5b07969d596460ead54753b4386201bcbd10..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *            M I N I M A L I S T I C     U D P     E N T I T Y               *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-
-/**
- * @file NwMiniUdpEntity.h
- * @brief This file contains example of a minimalistic ULP entity.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwLog.h"
-
-#ifndef __NW_MINI_UDP_ENTITY_H__
-#define __NW_MINI_UDP_ENTITY_H__
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-typedef struct {
-  uint32_t        hSocket;
-  NwEventT      ev;
-  NwGtpv1uStackHandleT hGtpv1uStack;
-} NwMiniUdpEntityT;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT* thiz, NwGtpv1uStackHandleT hGtpv1uStack, uint8_t* ipAddr);
-
-NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT* thiz);
-
-NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle,
-                             uint8_t* dataBuf,
-                             uint32_t dataSize,
-                             uint32_t peerAddr,
-                             uint32_t peerPort);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c
deleted file mode 100644
index e2f505b4eb22ac655a9028d54646a106fbf2238b..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *            M I N I M A L I S T I C     U L P     E N T I T Y               *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file NwMiniUlpEntity.c
- * @brief This file contains example of a minimalistic ULP entity.
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwGtpv1u.h"
-#include "NwGtpv1uIe.h"
-#include "NwMiniLogMgrEntity.h"
-#include "NwMiniUlpEntity.h"
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*---------------------------------------------------------------------------
- * Private Functions
- *--------------------------------------------------------------------------*/
-
-#define MAX_UDP_PAYLOAD_LEN                     (4096)
-
-NwGtpv1uRcT
-nwMiniUlpSendEchoRequestToPeer(NwMiniUlpEntityT *thiz, uint32_t peerIp)
-{
-  NwGtpv1uRcT rc;
-  NwGtpv1uUlpApiT           ulpReq;
-
-  /*
-   *  Send Message Request to Gtpv1u Stack Instance
-   */
-
-  ulpReq.apiType = NW_GTPV1U_ULP_API_INITIAL_REQ;
-
-  ulpReq.apiInfo.initialReqInfo.hUlpTrxn        = (NwGtpv1uUlpTrxnHandleT)thiz;
-  ulpReq.apiInfo.initialReqInfo.teid            = 0x00;
-  ulpReq.apiInfo.initialReqInfo.peerIp          = (peerIp);
-  ulpReq.apiInfo.initialReqInfo.peerPort        = 2152;
-
-  /* Send Echo Request*/
-
-  rc = nwGtpv1uMsgNew( thiz->hGtpv1uStack,
-                       NW_TRUE,          /* SeqNum flag    */
-                       NW_FALSE,
-                       NW_FALSE,
-                       NW_GTP_ECHO_REQ,  /* Msg Type             */
-                       0x00000000UL,     /* TEID                 */
-                       0x5678,           /* Seq Number           */
-                       0,
-                       0,
-                       (&ulpReq.hMsg));
-
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  rc = nwGtpv1uMsgAddIeTV1((ulpReq.hMsg), NW_GTPV1U_IE_RECOVERY,
-                           thiz->restartCounter);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  rc = nwGtpv1uProcessUlpReq(thiz->hGtpv1uStack, &ulpReq);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  return NW_GTPV1U_OK;
-}
-
-static
-void NW_EVT_CALLBACK(nwMiniUlpDataIndicationCallbackData)
-{
-  NwMiniUlpEntityT *thiz = (NwMiniUlpEntityT *) arg;
-  NwGtpv1uRcT         rc;
-  uint8_t         udpBuf[MAX_UDP_PAYLOAD_LEN];
-  NwS32T        bytesRead;
-  uint32_t        peerLen;
-  struct sockaddr_in peer;
-
-  peerLen = sizeof(peer);
-
-  bytesRead = recvfrom(thiz->hSocket, udpBuf, MAX_UDP_PAYLOAD_LEN , 0,
-                       (struct sockaddr *) &peer,(socklen_t *) &peerLen);
-
-  if(bytesRead) {
-    NW_LOG(NW_LOG_LEVEL_DEBG, "Received UDP message of length %u from %X:%u",
-           bytesRead, ntohl(peer.sin_addr.s_addr), ntohs(peer.sin_port));
-    rc = nwMiniUlpTpduSend(thiz, udpBuf, bytesRead, thiz->localPort[fd]);
-  } else {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-  }
-}
-
-/*---------------------------------------------------------------------------
- * Public Functions
- *--------------------------------------------------------------------------*/
-
-NwGtpv1uRcT
-nwMiniUlpInit(NwMiniUlpEntityT *thiz, NwGtpv1uStackHandleT hGtpv1uStack)
-{
-  NwGtpv1uRcT rc;
-  thiz->hGtpv1uStack = hGtpv1uStack;
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwMiniUlpDestroy(NwMiniUlpEntityT *thiz)
-{
-  NW_ASSERT(thiz);
-  memset(thiz, 0, sizeof(NwMiniUlpEntityT));
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwMiniUlpCreateConn(NwMiniUlpEntityT *thiz, char *localIpStr, uint16_t localport,
-                    char *peerIpStr)
-{
-  NwGtpv1uRcT rc;
-  int sd;
-  struct sockaddr_in addr;
-  NwGtpv1uUlpApiT           ulpReq;
-
-  strcpy(thiz->peerIpStr, peerIpStr);
-
-  /*
-   * Create local tunnel endpoint
-   */
-
-  NW_LOG(NW_LOG_LEVEL_NOTI, "Creating tunnel endpoint with teid %d", localport);
-  ulpReq.apiType                                        =
-    NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT;
-  ulpReq.apiInfo.createTunnelEndPointInfo.teid          = localport;
-  ulpReq.apiInfo.createTunnelEndPointInfo.hUlpSession   =
-    (NwGtpv1uUlpSessionHandleT)thiz;
-
-  rc = nwGtpv1uProcessUlpReq(thiz->hGtpv1uStack, &ulpReq);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  thiz->hGtpv1uConn = ulpReq.apiInfo.createTunnelEndPointInfo.hStackSession;
-
-  /*
-   * Create local udp listening endpoint
-   */
-
-  sd = socket(AF_INET, SOCK_DGRAM, 0);
-
-  if (sd < 0) {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-    NW_ASSERT(0);
-  }
-
-  addr.sin_family       = AF_INET;
-  addr.sin_port         = htons(localport);
-  addr.sin_addr.s_addr  = inet_addr(localIpStr);
-  memset(addr.sin_zero, '\0', sizeof (addr.sin_zero));
-
-  if(bind(sd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-    NW_ASSERT(0);
-  }
-
-  event_set(&(thiz->ev[sd]), sd, EV_READ|EV_PERSIST,
-            nwMiniUlpDataIndicationCallbackData, thiz);
-  event_add(&(thiz->ev[sd]), NULL);
-
-  thiz->localPort[sd] = localport;
-
-  /*
-   * Create local udp for sendign data
-   */
-
-  sd = socket(AF_INET, SOCK_DGRAM, 0);
-
-  if (sd < 0) {
-    NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-    NW_ASSERT(0);
-  }
-
-
-  thiz->hSocket = sd;
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwMiniUlpDestroyConn(NwMiniUlpEntityT *thiz)
-{
-  NwGtpv1uRcT rc;
-  NwGtpv1uUlpApiT           ulpReq;
-  /*---------------------------------------------------------------------------
-   *  Send Destroy Session Request to GTPv1u Stack Instance
-   *--------------------------------------------------------------------------*/
-
-  ulpReq.apiType = NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT;
-  ulpReq.apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle = thiz->hGtpv1uConn;
-
-  rc = nwGtpv1uProcessUlpReq(thiz->hGtpv1uStack, &ulpReq);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  thiz->hGtpv1uConn = 0;
-
-  return NW_GTPV1U_OK;
-}
-
-
-NwGtpv1uRcT
-nwMiniUlpTpduSend(NwMiniUlpEntityT *thiz, uint8_t *tpduBuf, uint32_t tpduLen ,
-                  uint16_t fromPort)
-{
-  NwGtpv1uRcT rc;
-  NwGtpv1uUlpApiT           ulpReq;
-
-  /*
-   *  Send Message Request to GTPv1u Stack Instance
-   */
-
-  ulpReq.apiType                        = NW_GTPV1U_ULP_API_SEND_TPDU;
-  ulpReq.apiInfo.sendtoInfo.teid        = fromPort;
-  ulpReq.apiInfo.sendtoInfo.ipAddr      = inet_addr(thiz->peerIpStr);
-
-  rc = nwGtpv1uGpduMsgNew( thiz->hGtpv1uStack,
-                           fromPort,
-                           NW_FALSE,
-                           thiz->seqNum++,
-                           tpduBuf,
-                           tpduLen,
-                           &(ulpReq.apiInfo.sendtoInfo.hMsg));
-
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  rc = nwGtpv1uProcessUlpReq(thiz->hGtpv1uStack, &ulpReq);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  rc = nwGtpv1uMsgDelete(thiz->hGtpv1uStack, (ulpReq.apiInfo.sendtoInfo.hMsg));
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  return NW_GTPV1U_OK;
-}
-
-NwGtpv1uRcT
-nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp,
-                                  NwGtpv1uUlpApiT *pUlpApi)
-{
-  NwMiniUlpEntityT *thiz;
-  NW_ASSERT(pUlpApi != NULL);
-
-  thiz = (NwMiniUlpEntityT *) hUlp;
-
-  switch(pUlpApi->apiType) {
-  case NW_GTPV1U_ULP_API_RECV_TPDU: {
-    struct sockaddr_in peerAddr;
-    NwS32T bytesSent;
-    uint8_t dataBuf[4096];
-    uint32_t dataSize;
-    uint32_t peerIpAddr = (inet_addr(thiz->peerIpStr));
-
-    NW_ASSERT( NW_GTPV1U_OK == nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
-               dataBuf, &dataSize) );
-
-    NW_LOG(NW_LOG_LEVEL_DEBG, "Received TPDU from gtpv1u stack %u!",
-           pUlpApi->apiInfo.recvMsgInfo.teid);
-
-    peerAddr.sin_family       = AF_INET;
-    peerAddr.sin_port         = htons(pUlpApi->apiInfo.recvMsgInfo.teid);
-    peerAddr.sin_addr.s_addr  = (peerIpAddr);
-    memset(peerAddr.sin_zero, '\0', sizeof (peerAddr.sin_zero));
-
-    bytesSent = sendto (thiz->hSocket, dataBuf, dataSize, 0,
-                        (struct sockaddr *) &peerAddr, sizeof(peerAddr));
-
-    if(bytesSent < 0) {
-      NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno));
-      NW_ASSERT(0);
-    } else {
-      NW_LOG(NW_LOG_LEVEL_DEBG, "Sent %u bytes to peer %u.%u.%u.%u", dataSize,
-             (peerIpAddr & 0x000000ff),
-             (peerIpAddr & 0x0000ff00) >> 8,
-             (peerIpAddr & 0x00ff0000) >> 16,
-             (peerIpAddr & 0xff000000) >> 24);
-    }
-
-    NW_ASSERT(nwGtpv1uMsgDelete(thiz->hGtpv1uStack,
-                                (pUlpApi->apiInfo.recvMsgInfo.hMsg)) == NW_GTPV1U_OK);
-
-  }
-  break;
-
-  default:
-    NW_LOG(NW_LOG_LEVEL_WARN, "Received undefined UlpApi (%d) from gtpv1u stack!",
-           pUlpApi->apiType);
-  }
-
-  return NW_GTPV1U_OK;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h
deleted file mode 100644
index dd55e8ed7c86b23db27e0c4cf42bf49ed089b0ac..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *            M I N I M A L I S T I C     U L P     E N T I T Y               *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-/**
- * @file NwMiniUlpEntity.h
- * @brief This file contains example of a minimalistic ULP entity.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwLog.h"
-
-#ifndef __NW_MINI_ULP_H__
-#define __NW_MINI_ULP_H__
-
-typedef struct {
-  int                           hSocket;
-  uint16_t                        seqNum;
-  uint8_t                         restartCounter;
-  uint8_t                         localIpStr[16];
-  uint8_t                         peerIpStr[16];
-  uint32_t                        localPort[1025];
-  NwEventT                      ev[1025];
-  NwGtpv1uStackHandleT          hGtpv1uStack;
-  NwGtpv1uStackSessionHandleT   hGtpv1uConn;
-} NwMiniUlpEntityT;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NwGtpv1uRcT
-nwMiniUlpInit(NwMiniUlpEntityT* thiz, NwGtpv1uStackHandleT hGtpv1uStack);
-
-NwGtpv1uRcT
-nwMiniUlpDestroy(NwMiniUlpEntityT* thiz);
-
-NwGtpv1uRcT
-nwMiniUlpCreateConn(NwMiniUlpEntityT* thiz, char* localIpStr, uint16_t localPort, char* peerIpStr);
-
-NwGtpv1uRcT
-nwMiniUlpDestroyConn(NwMiniUlpEntityT* thiz);
-
-NwGtpv1uRcT
-nwMiniUlpSendMsg(NwMiniUlpEntityT* thiz);
-
-NwGtpv1uRcT
-nwMiniUlpTpduSend(NwMiniUlpEntityT* thiz, uint8_t* tpduBuf, uint32_t tpduLen , uint16_t fromPort);
-
-NwGtpv1uRcT
-nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp,
-                                  NwGtpv1uUlpApiT *pUlpApi);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c
deleted file mode 100644
index 2f618ad64237240333fbebb900ab27c6278e316d..0000000000000000000000000000000000000000
--- a/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*----------------------------------------------------------------------------*
- *                                                                            *
- *                             n w - g t p v 2 u                              *
- *    G P R S    T u n n e l i n g    P r o t o c o l   v 2 u   S t a c k     *
- *                                                                            *
- *           M I N I M A L I S T I C     D E M O N S T R A T I O N            *
- *                                                                            *
- *                    Copyright (C) 2010 Amit Chawre.                         *
- *                                                                            *
- *----------------------------------------------------------------------------*/
-
-
-/**
- * @file hello-world.c
- * @brief This is a test program demostrating usage of nw-gtpv2 library.
-*/
-
-#include <stdio.h>
-#include <assert.h>
-#include "NwEvt.h"
-#include "NwGtpv1u.h"
-
-#include "NwMiniLogMgrEntity.h"
-#include "NwMiniTmrMgrEntity.h"
-#include "NwMiniUdpEntity.h"
-#include "NwMiniUlpEntity.h"
-
-#ifndef NW_ASSERT
-#define NW_ASSERT assert
-#endif
-
-/*---------------------------------------------------------------------------
- *                T H E      M A I N      F U N C T I O N
- *--------------------------------------------------------------------------*/
-
-int main(int argc, char *argv[])
-{
-  NwGtpv1uRcT rc;
-  char                         *logLevelStr;
-  uint32_t                        logLevel;
-  uint32_t                        num_of_connections;
-
-  NwGtpv1uStackHandleT          hGtpv1uStack = 0;
-  NwMiniUlpEntityT              ulpObj;
-  NwMiniUdpEntityT              udpObj;
-  NwMiniLogMgrT                 logObj;
-  NwGtpv1uUlpEntityT            ulp;
-  NwGtpv1uUdpEntityT            udp;
-  NwGtpv1uTimerMgrEntityT       tmrMgr;
-  NwGtpv1uLogMgrEntityT         logMgr;
-
-  if(argc != 4) {
-    printf("Usage: %s <num-of-connections> <local-ip> <peer-ip>\n", argv[0]);
-    exit(0);
-  }
-
-
-  logLevelStr = getenv ("NW_LOG_LEVEL");
-
-  if(logLevelStr == NULL) {
-    logLevel = NW_LOG_LEVEL_INFO;
-  } else {
-    if(strncmp(logLevelStr, "EMER",4) == 0) {
-      logLevel = NW_LOG_LEVEL_EMER;
-    } else if(strncmp(logLevelStr, "ALER",4) == 0) {
-      logLevel = NW_LOG_LEVEL_ALER;
-    } else if(strncmp(logLevelStr, "CRIT",4) == 0) {
-      logLevel = NW_LOG_LEVEL_CRIT;
-    } else if(strncmp(logLevelStr, "ERRO",4) == 0) {
-      logLevel = NW_LOG_LEVEL_ERRO ;
-    } else if(strncmp(logLevelStr, "WARN",4) == 0) {
-      logLevel = NW_LOG_LEVEL_WARN;
-    } else if(strncmp(logLevelStr, "NOTI",4) == 0) {
-      logLevel = NW_LOG_LEVEL_NOTI;
-    } else if(strncmp(logLevelStr, "INFO",4) == 0) {
-      logLevel = NW_LOG_LEVEL_INFO;
-    } else if(strncmp(logLevelStr, "DEBG",4) == 0) {
-      logLevel = NW_LOG_LEVEL_DEBG;
-    }
-  }
-
-  /*---------------------------------------------------------------------------
-   *  Initialize event library
-   *--------------------------------------------------------------------------*/
-
-  NW_EVT_INIT();
-
-  /*---------------------------------------------------------------------------
-   *  Initialize Log Manager
-   *--------------------------------------------------------------------------*/
-
-  nwMiniLogMgrInit(&logObj, logLevel);
-
-  /*---------------------------------------------------------------------------
-   *  Create GTPv1u Stack Instance
-   *--------------------------------------------------------------------------*/
-
-  rc = nwGtpv1uInitialize(&hGtpv1uStack, GTPU_STACK_ENB);
-
-  if(rc != NW_GTPV1U_OK) {
-    NW_LOG(NW_LOG_LEVEL_ERRO,
-           "Failed to create gtpv1u stack instance. Error '%u' occured", rc);
-    exit(1);
-  }
-
-  NW_LOG(NW_LOG_LEVEL_INFO, "Gtpv1u Stack Handle '%X' Creation Successful!",
-         hGtpv1uStack);
-
-  /*---------------------------------------------------------------------------
-   * Set up Ulp Entity
-   *--------------------------------------------------------------------------*/
-
-  rc = nwMiniUlpInit(&ulpObj, hGtpv1uStack);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  ulp.hUlp = (NwGtpv1uUlpHandleT) &ulpObj;
-  ulp.ulpReqCallback = nwMiniUlpProcessStackReqCallback;
-
-  rc = nwGtpv1uSetUlpEntity(hGtpv1uStack, &ulp);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-
-  /*---------------------------------------------------------------------------
-   * Set up Udp Entity
-   *--------------------------------------------------------------------------*/
-
-  rc = nwMiniUdpInit(&udpObj, hGtpv1uStack, (argv[2]));
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  udp.hUdp = (NwGtpv1uUdpHandleT) &udpObj;
-  udp.udpDataReqCallback = nwMiniUdpDataReq;
-
-  rc = nwGtpv1uSetUdpEntity(hGtpv1uStack, &udp);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  /*---------------------------------------------------------------------------
-   * Set up Log Entity
-   *--------------------------------------------------------------------------*/
-
-  tmrMgr.tmrMgrHandle = 0;
-  tmrMgr.tmrStartCallback = nwTimerStart;
-  tmrMgr.tmrStopCallback = nwTimerStop;
-
-  rc = nwGtpv1uSetTimerMgrEntity(hGtpv1uStack, &tmrMgr);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  /*---------------------------------------------------------------------------
-   * Set up Log Entity
-   *--------------------------------------------------------------------------*/
-
-  logMgr.logMgrHandle   = (NwGtpv1uLogMgrHandleT) &logObj;
-  logMgr.logReqCallback  = nwMiniLogMgrLogRequest;
-
-  rc = nwGtpv1uSetLogMgrEntity(hGtpv1uStack, &logMgr);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-  /*---------------------------------------------------------------------------
-   * Set GTPv1u log level
-   *--------------------------------------------------------------------------*/
-
-  rc = nwGtpv1uSetLogLevel(hGtpv1uStack, logLevel);
-
-  /*---------------------------------------------------------------------------
-   *  Send Create Session Request to GTPv1u Stack Instance
-   *--------------------------------------------------------------------------*/
-
-  num_of_connections = atoi(argv[1]);
-
-  while ( num_of_connections-- ) {
-    //rc = nwMiniUlpCreateConn(&ulpObj, argv[2], 1234 + num_of_connections, argv[3]);
-    rc = nwMiniUlpSendEchoRequestToPeer(&ulpObj, inet_addr(argv[3]));
-    NW_ASSERT( rc == NW_GTPV1U_OK );
-  }
-
-  /*---------------------------------------------------------------------------
-   * Event loop
-   *--------------------------------------------------------------------------*/
-
-  NW_EVT_LOOP();
-
-  NW_LOG(NW_LOG_LEVEL_ERRO, "Exit from eventloop, no events to process!");
-
-  /*---------------------------------------------------------------------------
-   *  Send Destroy Session Request to GTPv1u Stack Instance
-   *--------------------------------------------------------------------------*/
-
-  rc = nwMiniUlpDestroyConn(&ulpObj);
-  NW_ASSERT( rc == NW_GTPV1U_OK );
-
-
-  /*---------------------------------------------------------------------------
-   *  Destroy GTPv1u Stack Instance
-   *--------------------------------------------------------------------------*/
-
-  rc = nwGtpv1uFinalize(hGtpv1uStack);
-
-  if(rc != NW_GTPV1U_OK) {
-    NW_LOG(NW_LOG_LEVEL_ERRO,
-           "Failed to finalize gtpv1u stack instance. Error '%u' occured", rc);
-  } else {
-    NW_LOG(NW_LOG_LEVEL_INFO, "Gtpv1u Stack Handle '%X' Finalize Successful!",
-           hGtpv1uStack);
-  }
-
-
-  return rc;
-}
diff --git a/openair3/M3AP/m3ap_MCE_generate_messsages.c b/openair3/M3AP/m3ap_MCE_generate_messsages.c
index 8d8c7f385340b82e12416632ee1640d89004a167..4822a09db92891f7d6d5143803b85ab75a1e14a3 100644
--- a/openair3/M3AP/m3ap_MCE_generate_messsages.c
+++ b/openair3/M3AP/m3ap_MCE_generate_messsages.c
@@ -39,7 +39,6 @@
 
 #include "m2ap_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -169,14 +168,6 @@ int m2ap_eNB_generate_m2_setup_request(
 
  
   LOG_W(M2AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M2AP_eNB,
- // MSC_M2AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m2ap_eNB_data_p->ENBname);
 
   m2ap_eNB_itti_send_sctp_data_req(instance_p, m2ap_eNB_data_p->assoc_id, buffer, len, 0);
 
@@ -315,8 +306,6 @@ int m2ap_eNB_generate_m2_setup_request(
 //
 //  m2ap_eNB_data_p->state = M2AP_ENB_STATE_READY;
 //
-//  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 M2Setup/successfulOutcome assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 0);
 //
 //  return ret;
@@ -371,11 +360,6 @@ int m2ap_eNB_generate_m2_setup_request(
 //    return -1;
 //  }
 //
-//  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB,
-//  //                    MSC_M2AP_TARGET_ENB, NULL, 0,
-//  //                    "0 M2Setup/unsuccessfulOutcome  assoc_id %u cause %u value %u",
-//  //                    assoc_id, cause_type, cause_value);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
 //
 //  return ret;
@@ -561,8 +545,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -654,8 +636,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -716,8 +696,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -800,8 +778,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
-//
 //  m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
diff --git a/openair3/M3AP/m3ap_MCE_handler.c b/openair3/M3AP/m3ap_MCE_handler.c
index 21d10d1b040cbd1b171dfa668bff65e8f8f9ddb8..3da0c00145e65c5cf5eec49a0b70dabdbabf9584 100644
--- a/openair3/M3AP/m3ap_MCE_handler.c
+++ b/openair3/M3AP/m3ap_MCE_handler.c
@@ -44,7 +44,6 @@
 //#include "m3ap_MME_interface_management.h"
 #include "m3ap_MCE_interface_management.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
diff --git a/openair3/M3AP/m3ap_MCE_interface_management.c b/openair3/M3AP/m3ap_MCE_interface_management.c
index fb5457925838c9f03f80d3ce5b90b798efb95de1..ef26312245b048f1c6ff63ae4949c79b81048230 100644
--- a/openair3/M3AP/m3ap_MCE_interface_management.c
+++ b/openair3/M3AP/m3ap_MCE_interface_management.c
@@ -44,7 +44,6 @@
 
 #include "m3ap_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -149,15 +148,7 @@ int MCE_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m3ap_session_start
 //
 //
 //  LOG_W(M3AP,"pdu.present %d\n",pdu.present);
-// // MSC_LOG_TX_MESSAGE(
-// // MSC_M3AP_MCE,
-// // MSC_M3AP_MCE,
-// // (const char *)buffer,
-// // len,
-// // MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
-// // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-// // m3ap_MCE_data_p->MCEname);
-//
+
    m3ap_MCE_itti_send_sctp_data_req(instance, m3ap_mce_data_g->assoc_id, buffer, len, 0);
   return 0;
 }
@@ -318,14 +309,6 @@ int MCE_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m3ap_session_start_
 
 
   LOG_D(M3AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M3AP_MCE,
- // MSC_M3AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m3ap_MCE_data_p->MCEname);
 
   m3ap_MCE_itti_send_sctp_data_req(instance, m3ap_mce_data_g->assoc_id, buffer, len, 0);
   return 0;
@@ -425,14 +408,6 @@ int MCE_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m3ap_mbms_session
 
 
   LOG_D(M3AP,"pdu.present %d\n",pdu.present);
- // MSC_LOG_TX_MESSAGE(
- // MSC_M3AP_MCE,
- // MSC_M3AP_MCE,
- // (const char *)buffer,
- // len,
- // MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
- // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- // m3ap_MCE_data_p->MCEname);
 
   m3ap_MCE_itti_send_sctp_data_req(instance, m3ap_mce_data_g->assoc_id, buffer, len, 0);
   return 0;
@@ -646,14 +621,6 @@ int MCE_send_M3_SETUP_REQUEST(m3ap_MCE_instance_t *instance_p, m3ap_MCE_data_t *
 //
 //
 //  LOG_W(M3AP,"pdu.present %d\n",pdu.present);
-// // MSC_LOG_TX_MESSAGE(
-// // MSC_M3AP_MCE,
-// // MSC_M3AP_MCE,
-// // (const char *)buffer,
-// // len,
-// // MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
-// // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-// // m3ap_MCE_data_p->MCEname);
 //
 //
 ////  buffer = &bytes[0];
@@ -725,15 +692,6 @@ int MCE_handle_M3_SETUP_RESPONSE(instance_t instance,
    //for (int i=0;i<num_cells_to_activate;i++)  
    //  AssertFatal(M3AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
 
-   //MSC_LOG_RX_MESSAGE(
-   // MSC_M3AP_MCE,
-   // MSC_M3AP_CU,
-   // 0,
-   // 0,
-   // MSC_AS_TIME_FMT" MCE_handle_M3_SETUP_RESPONSE successfulOutcome assoc_id %d",
-   // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-   // assoc_id);
- 
    //LOG_D(M3AP, "Sending M3AP_SETUP_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
    //      assoc_id,MCE_MOMCELE_ID_TO_INSTANCE(assoc_id));
    itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
diff --git a/openair3/M3AP/m3ap_MME_generate_messages.c b/openair3/M3AP/m3ap_MME_generate_messages.c
index a28097cf1afe014dbc74681c0f5a1fa55b57a71b..969863b4459b29a3308aa5fb8b7fe6ecc5241e44 100644
--- a/openair3/M3AP/m3ap_MME_generate_messages.c
+++ b/openair3/M3AP/m3ap_MME_generate_messages.c
@@ -39,7 +39,6 @@
 
 #include "m2ap_itti_messaging.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
@@ -174,8 +173,6 @@ int m2ap_MCE_generate_m2_setup_request(
     return -1;
   }
 
-  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 M2Setup/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-
   m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -311,8 +308,6 @@ int m2ap_MCE_generate_m2_setup_response(m2ap_MCE_instance_t *instance_p, m2ap_MC
 
   m2ap_MCE_data_p->state = M2AP_MCE_STATE_READY;
 
-  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 M2Setup/successfulOutcome assoc_id %u", m2ap_MCE_data_p->assoc_id);
-
   m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 0);
 
   return ret;
@@ -367,11 +362,6 @@ int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
     return -1;
   }
 
-  //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE,
-  //                    MSC_M2AP_TARGET_MCE, NULL, 0,
-  //                    "0 M2Setup/unsuccessfulOutcome  assoc_id %u cause %u value %u",
-  //                    assoc_id, cause_type, cause_value);
-
   m2ap_MCE_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
 
   return ret;
@@ -557,8 +547,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -650,8 +638,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -712,8 +698,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
@@ -796,8 +780,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
 //    return -1;
 //  }
 //
-//  MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
-//
 //  m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
 //
 //  return ret;
diff --git a/openair3/M3AP/m3ap_MME_handler.c b/openair3/M3AP/m3ap_MME_handler.c
index 688e3937e110c4df20dc51cb96843fc9a4e1f607..eaba0e8ef15c69fccf0695220bb15197325cd3f9 100644
--- a/openair3/M3AP/m3ap_MME_handler.c
+++ b/openair3/M3AP/m3ap_MME_handler.c
@@ -43,7 +43,6 @@
 
 #include "m3ap_MME_interface_management.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
diff --git a/openair3/M3AP/m3ap_MME_interface_management.c b/openair3/M3AP/m3ap_MME_interface_management.c
index ccdfa4fc5e73dffbfed5b8cfc781a2533ad03343..fd50e80618285a102173a249deab5a9914a905b9 100644
--- a/openair3/M3AP/m3ap_MME_interface_management.c
+++ b/openair3/M3AP/m3ap_MME_interface_management.c
@@ -296,16 +296,6 @@ int MME_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
   //AssertFatal(MME_MBMS_M3AP_ID!=-1,"MME_MBMS_M3AP_ID was not sent\n");
   //AssertFatal(MCE_MBMS_M3AP_ID!=-1,"MCE_MBMS_M3AP_ID was not sent\n");
   ////M3AP_SESSION_START_RESP(msg_p).
-////  MSC_LOG_RX_MESSAGE(
-////    MSC_M3AP_MME,
-////    MSC_M3AP_MCE,
-  //      //return 0;
-////    0,
-////    0,
-////    MSC_AS_TIME_FMT" MME_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
-////    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-////    assoc_id);
-////
   // LOG_W(M3AP, "Sending M3AP_SESSION_START_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
   //       assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
   itti_send_msg_to_task(TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
@@ -434,14 +424,6 @@ int MME_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
   //AssertFatal(MME_MBMS_M3AP_ID!=-1,"MME_MBMS_M3AP_ID was not sent\n");
   //AssertFatal(MCE_MBMS_M3AP_ID!=-1,"MCE_MBMS_M3AP_ID was not sent\n");
  // M3AP_SESSION_STOP_RESP(msg_p).
- // MSC_LOG_RX_MESSAGE(
- //   MSC_M3AP_MME,
- //   MSC_M3AP_MCE,
- //   0,
- //   0,
- //   MSC_AS_TIME_FMT" MME_handle_M2_SESSION_STOP_RESPONSE successfulOutcome assoc_id %d",
- //   0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
- //   assoc_id);
 
  //  LOG_D(M3AP, "Sending M3AP_SESSION_START_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
  //        assoc_id,MCE_MODULE_ID_TO_INSTANCE(assoc_id));
@@ -628,15 +610,6 @@ int MME_handle_M3_SETUP_REQUEST(instance_t instance,
     *m3ap_mme_data_from_mce = M3AP_SETUP_REQ(message_p);
     //printf("m3ap_mme_data_from_mce->assoc_id %d %d\n",m3ap_mme_data_from_mce->assoc_id,assoc_id);
 //
-////  MSC_LOG_TX_MESSAGE(
-////  MSC_M3AP_MME,
-////  MSC_RRC_MCE,
-////  0,
-////  0,
-////  MSC_AS_TIME_FMT" MME_handle_M3_SETUP_REQUEST",
-////  0,0//MSC_AS_TIME_ARGS(ctxt_pP),
-////  );
-////
     itti_send_msg_to_task(TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
 //  if (num_mbms_available > 0) {
 //    itti_send_msg_to_task(TASK_MME_APP, MCE_MODULE_ID_TO_INSTANCE(instance), message_p);
@@ -1086,16 +1059,6 @@ int MME_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance,
   //AssertFatal(MME_MBMS_M3AP_ID!=-1,"MME_MBMS_M3AP_ID was not sent\n");
   //AssertFatal(MCE_MBMS_M3AP_ID!=-1,"MCE_MBMS_M3AP_ID was not sent\n");
   ////M3AP_SESSION_START_RESP(msg_p).
-////  MSC_LOG_RX_MESSAGE(
-////    MSC_M3AP_MME,
-////    MSC_M3AP_MCE,
-  //      //return 0;
-////    0,
-////    0,
-////    MSC_AS_TIME_FMT" MME_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
-////    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-////    assoc_id);
-////
   // LOG_W(M3AP, "Sending M3AP_SESSION_START_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
   //       assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
   itti_send_msg_to_task(TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
diff --git a/openair3/M3AP/m3ap_handler.c b/openair3/M3AP/m3ap_handler.c
index 832aa0dbacc55b9385eb47a00685257b8af2c5ea..583552528bdc2eae85d1d80e3d74b0f73d777ceb 100644
--- a/openair3/M3AP/m3ap_handler.c
+++ b/openair3/M3AP/m3ap_handler.c
@@ -44,7 +44,6 @@
 #include "m3ap_MME_interface_management.h"
 #include "m3ap_MCE_interface_management.h"
 
-#include "msc.h"
 #include "assertions.h"
 #include "conversions.h"
 
diff --git a/openair3/MME_APP/mme_config.c b/openair3/MME_APP/mme_config.c
index 3b4074f5535def13e3e59f224b5d53fadeb779d9..8005b85fd48553ca55452c33d26a04da1d8cc286 100644
--- a/openair3/MME_APP/mme_config.c
+++ b/openair3/MME_APP/mme_config.c
@@ -54,7 +54,6 @@
 #include "common/config/config_userapi.h"
 #include "RRC_config_tools.h"
 #include "enb_paramdef.h"
-#include "proto_agent.h"
 
 int RCconfig_MME(void ) {
   //int               num_enbs                      = 0;
diff --git a/openair3/NAS/COMMON/UTIL/nas_timer.c b/openair3/NAS/COMMON/UTIL/nas_timer.c
index 9ccca12520f3c6101ea9b978bb543cf02d4bde5a..8448d9a78cce62155edfc34ab35c266b5bfe6d48 100644
--- a/openair3/NAS/COMMON/UTIL/nas_timer.c
+++ b/openair3/NAS/COMMON/UTIL/nas_timer.c
@@ -46,7 +46,6 @@ Description Timer utilities
 #include "intertask_interface.h"
 #include "nas_timer.h"
 #include "commonDef.h"
-#include "msc.h"
 
 /****************************************************************************/
 /****************  E X T E R N A L    D E F I N I T I O N S  ****************/
diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c
index 7cf1378d8b96773baef3b30fba8554e6a6ce1509..283f3b7311d123d13bd18a3c02222574f8a07b85 100644
--- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c
+++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c
@@ -812,7 +812,6 @@ void *nas_nrue_task(void *args_p)
 
   ue_security_key=(ue_sa_security_key_t **)calloc(1,sizeof(ue_sa_security_key_t*)*NB_UE_INST);
   itti_mark_task_ready (TASK_NAS_NRUE);
-  MSC_START_USE();
   
   while(1) {
     // Wait for a message or an event
diff --git a/openair3/NAS/TEST/AS_SIMULATOR/as_data.h b/openair3/NAS/TEST/AS_SIMULATOR/as_data.h
index 24c64737302d4c843c1c202181f1f8026a4c6d96..9888db69ac604a4c7e3eaa9c6297c4fd1375cfcf 100644
--- a/openair3/NAS/TEST/AS_SIMULATOR/as_data.h
+++ b/openair3/NAS/TEST/AS_SIMULATOR/as_data.h
@@ -47,14 +47,6 @@ Description Defines constants and functions used by the AS simulator
 /*********************  G L O B A L    C O N S T A N T S  *******************/
 /****************************************************************************/
 
-/*
- * Constansts used for MSCGEN (Message Sequence Chart Generator)
- */
-#define MSCGEN(args...) fprintf(stderr, ##args);
-#define _ue_id    "UE"
-#define _mme_id   "MME"
-#define _as_id    "AS"
-
 /****************************************************************************/
 /************************  G L O B A L    T Y P E S  ************************/
 /****************************************************************************/
diff --git a/openair3/NAS/TEST/AS_SIMULATOR/as_process.c b/openair3/NAS/TEST/AS_SIMULATOR/as_process.c
index 21e484e40adbe7c1db70429f678f1f734107c56d..9a9b4da5bb61b261f4c5581d6cdbbc4fdddb8b0f 100644
--- a/openair3/NAS/TEST/AS_SIMULATOR/as_process.c
+++ b/openair3/NAS/TEST/AS_SIMULATOR/as_process.c
@@ -102,7 +102,7 @@ int process_cell_info_req(int msg_id, const cell_info_req_t* req,
   index += _process_plmn(_mscgen_buffer, &req->plmnID, MSCGEN_BUFFER_SIZE);
   snprintf(_mscgen_buffer + index, MSCGEN_BUFFER_SIZE - index,
            ", rat = 0x%x%c", req->rat, '\0');
-  MSCGEN("[MSC_MSG][%s][%s][--- Cell Information Request (0x%.4x)\\n%s --->][%s]\n",
+  printf("[%s][%s][--- Cell Information Request (0x%.4x)\\n%s --->][%s]\n",
          getTime(), _ue_id, msg_id, _mscgen_buffer, _as_id);
 
   /* Setup cell information confirm message */
@@ -116,7 +116,7 @@ int process_cell_info_req(int msg_id, const cell_info_req_t* req,
   snprintf(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
            "tac = 0x%.4x, cellID = 0x%.8x, rat = 0x%x, RSRQ = %u, RSRP = %u%c",
            cnf->tac, cnf->cellID, cnf->rat, cnf->rsrq, cnf->rsrp, '\0');
-  MSCGEN("[MSC_MSG][%s][%s][--- Cell Information Confirm (0x%.4x)\\n%s --->][%s]\n",
+  printf("[%s][%s][--- Cell Information Confirm (0x%.4x)\\n%s --->][%s]\n",
          getTime(), _as_id, AS_CELL_INFO_CNF, _mscgen_buffer, _ue_id);
 
   printf("INFO\t: %s - Send cell informtion confirm\n", __FUNCTION__);
@@ -146,13 +146,13 @@ int process_nas_establish_req(int msg_id, const nas_establish_req_t* req,
            "cause = %s, type = %s, tmsi = {MMEcode = %d, m_tmsi = %u}%c",
            rrcCause(req->cause), rrcType(req->type),
            req->s_tmsi.MMEcode, req->s_tmsi.m_tmsi, '\0');
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Establishment Request "
+  printf("[%s][%s][--- NAS Signalling Connection Establishment Request "
          "(0x%.4x)\\n%s --->][%s]\n",
          getTime(), _ue_id, msg_id, _mscgen_buffer, _as_id);
 
   _process_dump(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
                 (char*)req->initialNasMsg.data, req->initialNasMsg.length);
-  MSCGEN("[MSC_RBOX][%s][%s][%s]\n", _ue_id, _as_id, _mscgen_buffer);
+  printf("[%s][%s][%s]\n", _ue_id, _as_id, _mscgen_buffer);
 
   /* Process initial NAS message */
   bytes = nas_process(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
@@ -160,7 +160,7 @@ int process_nas_establish_req(int msg_id, const nas_establish_req_t* req,
                       req->initialNasMsg.length);
 
   if (bytes < 0) {
-    MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Establishment "
+    printf("[%s][%s][--- NAS Signalling Connection Establishment "
            "Indication (0x%.4x)\\ntac = 0x%.4x\\n%s ---x][%s]\n", getTime(),
            _as_id, AS_NAS_ESTABLISH_IND, ind->tac, _mscgen_buffer, _mme_id);
     /* Setup NAS signalling connection establishment confirmation message */
@@ -190,7 +190,7 @@ int process_nas_establish_req(int msg_id, const nas_establish_req_t* req,
   // Transmission failure of Attach Request message
   //cnf->errCode = AS_FAILURE; // UE DEBUG
 
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Establishment Indication "
+  printf("[%s][%s][--- NAS Signalling Connection Establishment Indication "
          "(0x%.4x)\\nUEid = %u, tac = 0x%.4x\\n%s --->][%s]\n", getTime(),
          _as_id, AS_NAS_ESTABLISH_IND, ind->UEid, ind->tac, _mscgen_buffer, _mme_id);
 
@@ -224,13 +224,13 @@ int process_ul_info_transfer_req(int msg_id, const ul_info_transfer_req_t* req,
   snprintf(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
            "tmsi = {MMEcode = %d, m_tmsi = %u}%c",
            req->s_tmsi.MMEcode, req->s_tmsi.m_tmsi, '\0');
-  MSCGEN("[MSC_MSG][%s][%s][--- Uplink Information Request "
+  printf("[%s][%s][--- Uplink Information Request "
          "(0x%.4x)\\n%s --->][%s]\n",
          getTime(), _ue_id, msg_id, _mscgen_buffer, _as_id);
 
   _process_dump(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
                 (char*)req->nasMsg.data, req->nasMsg.length);
-  MSCGEN("[MSC_RBOX][%s][%s][%s]\n", _ue_id, _as_id, _mscgen_buffer);
+  printf("[%s][%s][%s]\n", _ue_id, _as_id, _mscgen_buffer);
 
   /* Process NAS message */
   bytes = nas_process(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
@@ -238,7 +238,7 @@ int process_ul_info_transfer_req(int msg_id, const ul_info_transfer_req_t* req,
                       req->nasMsg.length);
 
   if (bytes < 0) {
-    MSCGEN("[MSC_MSG][%s][%s][--- Uplink Information Indication "
+    printf("[%s][%s][--- Uplink Information Indication "
            "(0x%.4x)\\n%s ---x][%s]\n", getTime(),
            _as_id, AS_UL_INFO_TRANSFER_IND, _mscgen_buffer, _mme_id);
     /* Setup uplink information confirmation message */
@@ -279,7 +279,7 @@ int process_ul_info_transfer_req(int msg_id, const ul_info_transfer_req_t* req,
   //  cnf->errCode = AS_FAILURE; // UE DEBUG
   //}
 
-  MSCGEN("[MSC_MSG][%s][%s][--- Uplink Information Indication "
+  printf("[%s][%s][--- Uplink Information Indication "
          "(0x%.4x), UEid = %u\\n%s --->][%s]\n", getTime(),
          _as_id, AS_UL_INFO_TRANSFER_IND, ind->UEid, _mscgen_buffer, _mme_id);
 
@@ -297,7 +297,7 @@ int process_nas_release_req(int msg_id, const nas_release_req_t* req)
   printf("INFO\t: %s - Process NAS signalling connection release request\n",
          __FUNCTION__);
 
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Release Request "
+  printf("[%s][%s][--- NAS Signalling Release Request "
          "(0x%.4x), tmsi = {MMEcode = %d, m_tmsi = %u}, "
          "cause = %s (%u) --->][%s]\n", getTime(), _ue_id, msg_id,
          req->s_tmsi.MMEcode, req->s_tmsi.m_tmsi,
@@ -332,14 +332,14 @@ int process_nas_establish_rsp(int msg_id, const nas_establish_rsp_t* rsp,
   //rsp->nasMsg.data[21] = 0xc4; // MME DEBUG (Send ESM status)
   //}
 
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Establishment "
+  printf("[%s][%s][--- NAS Signalling Connection Establishment "
          "Response (0x%.4x)\\nerrCode = %s, UEid = %u --->][%s]\n",
          getTime(), _mme_id, msg_id,
          rrcErrCode(rsp->errCode), rsp->UEid, _as_id);
 
   _process_dump(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
                 (char*)rsp->nasMsg.data, rsp->nasMsg.length);
-  MSCGEN("[MSC_RBOX][%s][%s][%s]\n", _mme_id, _as_id, _mscgen_buffer);
+  printf("[%s][%s][%s]\n", _mme_id, _as_id, _mscgen_buffer);
 
   // Discard Attach Accept message
   //return (0); // UE DEBUG
@@ -350,7 +350,7 @@ int process_nas_establish_rsp(int msg_id, const nas_establish_rsp_t* rsp,
                       rsp->nasMsg.length);
 
   if (bytes < 0) {
-    MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Establishment "
+    printf("[%s][%s][--- NAS Signalling Connection Establishment "
            "Confirm (0x%.4x)\\n%s ---x][%s]\n", getTime(),
            _as_id, AS_NAS_ESTABLISH_CNF, _mscgen_buffer, _ue_id);
     return (0);
@@ -369,7 +369,7 @@ int process_nas_establish_rsp(int msg_id, const nas_establish_rsp_t* rsp,
     }
   }
 
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Establishment "
+  printf("[%s][%s][--- NAS Signalling Connection Establishment "
          "Confirm (0x%.4x)\\n%s --->][%s]\n", getTime(),
          _as_id, AS_NAS_ESTABLISH_CNF, _mscgen_buffer, _ue_id);
 
@@ -401,13 +401,13 @@ int process_dl_info_transfer_req(int msg_id, const dl_info_transfer_req_t* req,
   //  req->nasMsg.data[6] = 0x02; // UE DEBUG
   //}
 
-  MSCGEN("[MSC_MSG][%s][%s][--- Downlink Information Request "
+  printf("[%s][%s][--- Downlink Information Request "
          "(0x%.4x), UEid = %u --->][%s]\n",
          getTime(), _mme_id, msg_id, req->UEid, _as_id);
 
   _process_dump(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
                 (char*)req->nasMsg.data, req->nasMsg.length);
-  MSCGEN("[MSC_RBOX][%s][%s][%s]\n", _mme_id, _as_id, _mscgen_buffer);
+  printf("[%s][%s][%s]\n", _mme_id, _as_id, _mscgen_buffer);
 
   /* Process NAS message */
   bytes = nas_process(_mscgen_buffer, MSCGEN_BUFFER_SIZE,
@@ -415,7 +415,7 @@ int process_dl_info_transfer_req(int msg_id, const dl_info_transfer_req_t* req,
                       req->nasMsg.length);
 
   if (bytes < 0) {
-    MSCGEN("[MSC_MSG][%s][%s][--- Downlink Information Indication "
+    printf("[%s][%s][--- Downlink Information Indication "
            "(0x%.4x)\\n%s ---x][%s]\n", getTime(),
            _as_id, AS_DL_INFO_TRANSFER_IND, _mscgen_buffer, _ue_id);
     /* Setup downlink information confirmation message */
@@ -445,7 +445,7 @@ int process_dl_info_transfer_req(int msg_id, const dl_info_transfer_req_t* req,
   //  return (0); // MME DEBUG
   //}
 
-  MSCGEN("[MSC_MSG][%s][%s][--- Downlink Information Indication "
+  printf("[%s][%s][--- Downlink Information Indication "
          "(0x%.4x)\\n%s --->][%s]\n", getTime(),
          _as_id, AS_DL_INFO_TRANSFER_IND, _mscgen_buffer, _ue_id);
 
@@ -464,14 +464,14 @@ int process_nas_release_ind(int msg_id, const nas_release_req_t* req,
   printf("INFO\t: %s - Process NAS signalling connection release request\n",
          __FUNCTION__);
 
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Release Request "
+  printf("[%s][%s][--- NAS Signalling Connection Release Request "
          "(0x%.4x), UEid = %u, cause = %s (%u) --->][%s]\n",
          getTime(), _mme_id, msg_id, req->UEid,
          rrcReleaseCause(req->cause), req->cause, _as_id);
 
   /* Forward NAS release indication to the UE */
   ind->cause = req->cause;
-  MSCGEN("[MSC_MSG][%s][%s][--- NAS Signalling Connection Release Indication "
+  printf("[%s][%s][--- NAS Signalling Connection Release Indication "
          "(0x%.4x), cause = %s (%u) --->][%s]\n",
          getTime(), _as_id, msg_id, rrcReleaseCause(req->cause),
          ind->cause, _ue_id);
diff --git a/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c
index efe2c1af72b567b0e84508f13711fe8065c71126..bbc37d18a3caaa3380a32c081f6afa3a0a10bd6a 100644
--- a/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c
+++ b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c
@@ -193,7 +193,7 @@ int main (int argc, const char* argv[])
   printf("INFO\t: %s - The RRC Simulator is now connected to %s/%s (%d)\n",
          __FUNCTION__, mhost, mport, socket_get_fd(_as_simulator_mme_sid));
 
-  MSCGEN("[MSC_NEW][%s][AS=%s]\n", getTime(), _as_id);
+  printf("[%s][AS=%s]\n", getTime(), _as_id);
 
   /*
    * Set up signal handler
@@ -325,7 +325,7 @@ static void* _as_simulator_ue_mngr(void* args)
 
   printf("INFO\t: %s - UE connection manager started\n", __FUNCTION__);
 
-  MSCGEN("[MSC_NEW][%s][NAS-UE=%s]\n", getTime(), _ue_id);
+  printf("[%s][NAS-UE=%s]\n", getTime(), _ue_id);
 
   /* Receiving loop */
   while (_as_simulator_ue_is_running) {
@@ -407,7 +407,7 @@ static void* _as_simulator_mme_mngr(void* args)
 
   printf("INFO\t: %s - MME connection manager started\n", __FUNCTION__);
 
-  MSCGEN("[MSC_NEW][%s][NAS-MME=%s]\n", getTime(), _mme_id);
+  printf("[%s][NAS-MME=%s]\n", getTime(), _mme_id);
 
   /* Receiving loop */
   while (_as_simulator_mme_is_running) {
diff --git a/openair3/NAS/TEST/MSC/ActivatePDN.png b/openair3/NAS/TEST/MSC/ActivatePDN.png
deleted file mode 100644
index 7bdfb63d699e306fd53e495fc0b4cc7d13cd98e6..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/ActivatePDN.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/AuthenticationReject.png b/openair3/NAS/TEST/MSC/AuthenticationReject.png
deleted file mode 100644
index de5d3ead9db8457be75a1d26a9eb8d73c3d0655b..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/AuthenticationReject.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/DeactivatePDN.png b/openair3/NAS/TEST/MSC/DeactivatePDN.png
deleted file mode 100644
index 28401eadea1b6b9de9b311d0bc7d6822272b158d..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/DeactivatePDN.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/InitialAttach.png b/openair3/NAS/TEST/MSC/InitialAttach.png
deleted file mode 100644
index 35723a48fe2593974950dcfaee36faffed9518ac..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/InitialAttach.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/InitialAttachReject.png b/openair3/NAS/TEST/MSC/InitialAttachReject.png
deleted file mode 100644
index efe658694f10fa535f9ab36d749cdd2594eb66fe..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/InitialAttachReject.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/NomalDetach.png b/openair3/NAS/TEST/MSC/NomalDetach.png
deleted file mode 100644
index e5ca319adaa40233cc3e0ac570d547f6ebfa7093..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/NomalDetach.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/README b/openair3/NAS/TEST/MSC/README
deleted file mode 100644
index b78a7b3e747a5e24d0072b09aa15c66faf55c680..0000000000000000000000000000000000000000
--- a/openair3/NAS/TEST/MSC/README
+++ /dev/null
@@ -1,34 +0,0 @@
-================================================================================
-			Message Sequence Chart generation
-================================================================================
-
-Message Sequence Charts (MSCs) are a way of representing entities and
-interactions to demonstrate how protocols operate between network elements.
-
-The Access Stratum simulator generates MSC description file that can be
-processed by the Python script msc_gen.py to generate a PNG (Portable
-Network Graphic) file.
-
-msc_gen.py use mscgen utility that is fully discribed at
-http://www.mcternan.me.uk/mscgen/
-
---------------------------------------------------------------------------------
-			How to generate MSC description file ?
---------------------------------------------------------------------------------
-
-Redirect stderr stream to a file that will be used as input by the Python
-script msc_gen.py:
-
-ASprocess 2> ASprocess.msc
-
---------------------------------------------------------------------------------
-			    How to generate PNG file ?
---------------------------------------------------------------------------------
-
-Parse the MSC description file using the Python script msc_gen.py:
-
-./msc_gen.py ASprocess.msc
-
-Warning: msc_gen.py needs mscgen utility to be installed. mscgen is a C
-program that uses the GD graphics library for PNG output.
-
diff --git a/openair3/NAS/TEST/MSC/SwitchOffDetach.png b/openair3/NAS/TEST/MSC/SwitchOffDetach.png
deleted file mode 100644
index 77b28c11a52b7f5b8b6af762c6ea7bc3c77c6c93..0000000000000000000000000000000000000000
Binary files a/openair3/NAS/TEST/MSC/SwitchOffDetach.png and /dev/null differ
diff --git a/openair3/NAS/TEST/MSC/msc_gen.py b/openair3/NAS/TEST/MSC/msc_gen.py
deleted file mode 100755
index 2857cddc331d49cbe396e0f41321695c2d4800f2..0000000000000000000000000000000000000000
--- a/openair3/NAS/TEST/MSC/msc_gen.py
+++ /dev/null
@@ -1,354 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-# Lionel GAUTHIER
-# This script is a downgrade of a python script written for the openair stack, generating sequence diagrams charts, displaying
-# messages exchanged between LTE access stratum protocol entities.
-# This script needs mscgen tool (http://www.mcternan.me.uk/mscgen/).
-#  
-# The aim of this script is to collect some traces from oaisim stack and generate a mscgen script, then generate a sequence diagram 
-# image (png or jpeg) based on the scripts generated.
-# An example of how it can be invoqued: msc_gen.py /tmp/msc_log.txt /tmp/msc_log2.txt  msc_logx.txt are input text files,
-# They/It are/is generated by the execution of executables in linux user space. May be it is better to operate on log files 'grepped' with MSC:
-#  ./my_exe.exe | grep \[MSC > /tmp/msc_log1.txt 
-
-
-# Now, examples of how to generate a mscgen trace in a C executable:
-#  -First you have to declare the instance(s) of the protocol(s) that will send or receive messages.
-#    This is done with the following line:
-#       [MSC_NEW][system time][protocol_name=instance_name] 
-#       examples:
-#           printf("[MSC_NEW][%s][MIH-F=%s]\n", getTimeStamp4Log(), g_mihf_id); for declaring a new instance of a protocol entity of type MIH-F
-#                                                                           with an instance name g_mihf_id (of type char*)
-#           printf("[MSC_NEW][%s][NAS=%s]\n", getTimeStamp4Log(), "nas");  other example.
-#    This declaration of instances of protocols is mandatory to for this script to work.
-#
-#  -Then for tracing a message you have to log a line following this format:
-#       [MSC_MSG][system time][source instance_name][--- message_name --->][destination instance_name]
-#       Note:
-#          ---> means a message that has been received correctly by destination
-#          ---x means a message lost by destination
-#       example
-#       NOTICE("[MSC_MSG][%s][%s][--- Link_Register.indication\\n%s ---x][%s]\n",getTimeStamp4Log(),g_link_id,g_msc_gen_buf,g_mihf_id);
-#
-
-
-
-
-import sys
-import subprocess
-import re
-import socket
-import datetime
-import os.path
-from datetime import date
-
-MSCGEN_OUTPUT_TYPE       = "png"
-MAX_MESSAGES_PER_PAGE    = 36
-
-SYSTEM_FRAME_NUMBER_STR  = 'FRAME'
-MODULE_STR               = 'MOD'
-RADIO_BEARER_STR         = 'RB'
-MSC_NEW_STR              = '[MSC_NEW]'
-MSC_MSG_STR              = '[MSC_MSG]'
-MSC_NBOX_STR             = '[MSC_NBOX]'
-MSC_BOX_STR              = '[MSC_BOX]'
-MSC_ABOX_STR             = '[MSC_ABOX]'
-MSC_RBOX_STR             = '[MSC_RBOX]'
-
-# This dic is filled as follow : g_entities_dic[protocol_instance_name].append(protocol_name)
-# where protocol_name can be any of the following MI-USER, MIH-F, RAL, LINK-SAP
-g_entities_dic = {}
-g_reverse_entities_dic = {}
-
-
-# g_messages is filled with dictionnaries:
-# message_dic['entity_src'] = protocol_entity_src
-# message_dic['entity_dst'] = protocol_entity_dest
-# message_dic['msg']        = message
-# message_dic['line_color'] = g_display_color[entity_name]
-# message_dic['text_color'] = g_display_color[entity_name]
-# message_dic['time']       = system_frame_number
-# message_dic['seq_no']     = sequence_number_generator()
-# g_messages.append(message_dic)
-g_messages = []
-g_messages_dic = {}
-
-
-# g_display_order_dic is a dictionnary where the order of the display of entities sharing the same module identifier is hardcoded
-#MAC and PHY valus have to be above num max radio bearer value
-#g_display_order_dic  = {'MIH-USER': 0, 'MIH-F': 1, 'RAL': 3, 'NAS': 4}
-g_display_order_dic  = {'NAS-UE': 0, 'AS': 1, 'NAS-MME': 3}
-
-# Display color of messages of sending entities
-g_display_color  = {'IP':	'\"teal\"',
-                    'RRC_UE':	'\"red\"',
-                    'MIH-USER':	'\"black\"',
-                    'MIH-F':	'\"black\"',
-                    'RAL':	'\"black\"',
-                    'RAL_M':	'\"black\"',
-                    'RLC_UM':	'\"navy\"',
-                    'RLC_TM':	'\"navy\"',
-                    'NAS':	'\"black\"',
-                    'MAC_eNB':	'\"indigo\"',
-                    'PHY':	'\"purple\"',
-                    'NAS-UE':	'\"black\"',
-                    'NAS-MME':	'\"black\"',
-                    'AS':	'\"black\"'}
-
-
-g_final_display_order_list = []
-g_sequence_generator = 0
-
-def sequence_number_generator():
-    global g_sequence_generator
-    l_seq = g_sequence_generator
-    g_sequence_generator = g_sequence_generator + 1
-    return l_seq
-
-def parse_log_file_for_discovering_protocol_entities(filename):
-    global g_entities_dic
-    global g_entities
-    global g_messages
-    global g_final_display_order_list
-    #open TXT file that contain OAI filtered traces for mscgen
-
-    fhandle  = open(filename, 'r')
-    fcontent = fhandle.read()
-    fhandle.close()
-
-    # split file content in lines
-    lines = fcontent.splitlines()
-    for line in lines:
-        system_time = 'unknown'
-
-        # if line is a trace of the creation of a new protocol instance
-        if MSC_NEW_STR in line:
-            partition = line.rpartition(MSC_NEW_STR)
-            msc_log_string = partition[2]
-            #print (" %s " % msc_log_string)
-            partition = msc_log_string.split('[')
-            print ("\n\n %s \n" % partition)
-            #if len(partition) == 2:
-
-            item = partition[1]
-            item = item.strip()
-            item = item.strip(']')
-            system_time = item.split(' ')[-1]
-            print ("NEW system_time  %s " % system_time)
-
-            item = partition[2]
-            item = item.strip()
-            item = item.strip(']')
-            protocol_entity_type = item.split('=')[0]
-            protocol_entity_name = item.split('=')[-1]
-            print ("NEW protocol_entity_type  %s " % protocol_entity_type)
-            print ("NEW protocol_entity_name  %s " % protocol_entity_name)
-
-            if protocol_entity_name not in g_entities_dic:
-                g_entities_dic[protocol_entity_name] = protocol_entity_type
-
-            if protocol_entity_type not in g_reverse_entities_dic:
-                g_reverse_entities_dic[protocol_entity_type] = protocol_entity_name
-            else:
-                entity_name_list = g_reverse_entities_dic[protocol_entity_type]
-                entity_name_list.append(protocol_entity_name)
-                g_reverse_entities_dic[protocol_entity_type] = entity_name_list
-            #print (" g_entities_dic[%d][%d].append(%s)" % (module_id_int, radio_bearer_id_int, entity_name_src))
-            print (" g_entities_dic= %s\n\n" % (g_entities_dic))
-            print (" g_reverse_entities_dic= %s\n\n" % (g_reverse_entities_dic))
-
-            #g_entities.append(protocol_entity_type)
-            #print (" %s \n" % protocol_entity)
-
-
-
-
-
-def parse_log_file(filename):
-    global g_entities_dic
-    global g_entities
-    global g_messages
-    global g_final_display_order_list
-    #open TXT file that contain OAI filtered traces for mscgen
-    fhandle  = open(filename, 'r')
-    fcontent = fhandle.read()
-    fhandle.close()
-
-    # split file content in lines
-    lines = fcontent.splitlines()
-    for line in lines:
-        system_time           = 'unknown'
-        message               = 'unknown'
-        entity_name_src       = 'unknown'
-        entity_name_dest      = 'unknown'
-
-
-        # if line is a trace of the creation of a new protocol instance
-        if MSC_MSG_STR in line:
-            partition = line.strip().rpartition(MSC_MSG_STR)
-            msc_log_string = partition[2].strip()
-            print (" ++++ %s " % msc_log_string)
-            partition = msc_log_string.split('[')
-            print (" ++++ %s " % partition)
-
-            #if len(partition) == 9:
-            message_dic = {}
-
-            system_time  = partition[1].strip().split(' ')[-1].strip(']')
-            message_dic['display_time']    = system_time
-            seconds_int       = int(system_time.split(':')[0])
-            micro_seconds_int = int(system_time.split(':')[-1])
-            system_time_int = seconds_int*1000000 + micro_seconds_int
-            system_time=str(system_time_int)
-            print ('system_time %s' % system_time)
-
-            entity_name_src      = partition[2].strip().split(' ')[-1].strip(']')
-            print ('entity_name_src %s' % entity_name_src)
-
-            message              = partition[3].strip().strip(']').strip()
-            if (message[-1] == 'x') or (message[-1] == 'X'):
-                message_dic['arc']  = '-x'
-            elif message[-1] == '>':
-                message_dic['arc']  = '=>'
-            message = message.strip('<').strip('>').strip('x').strip('X').strip('-').strip('=').strip()
-            print ('message %s' % message)
-
-            entity_name_dest      = partition[4].strip().split(' ')[-1].strip(']')
-            print ('entity_name_dest %s' % entity_name_dest)
-            message_dic['entity_src']      = entity_name_src
-            message_dic['entity_dst']      = entity_name_dest
-            message_dic['msg']             = message
-            message_dic['line_color']      = g_display_color[g_entities_dic[entity_name_src]]
-            message_dic['text_color']      = g_display_color[g_entities_dic[entity_name_src]]
-            message_dic['time']            = system_time
-            #message_dic['seq_no']          = sequence_number_generator()
-            print ('%s\n\n' % message_dic)
-            g_messages_dic[system_time_int] = message_dic
-            #g_messages.append(message_dic)
-
-#TODO !!!
-        if MSC_RBOX_STR in line:
-            partition = line.strip().rpartition(MSC_RBOX_STR)
-            msc_log_string = partition[2].strip()
-            print (" ==== %s " % msc_log_string)
-            partition = msc_log_string.split('[')
-            print (" ==== %s " % partition)
-#TODO !!!
-
-def generate_sorted_message_list():
-    first_time_stamp = 0
-    for system_time_int in sorted(g_messages_dic.iterkeys()):
-        if first_time_stamp == 0:
-            first_time_stamp = system_time_int
-        message_dic = g_messages_dic[system_time_int]
-        message_dic['seq_no'] = sequence_number_generator()
-        message_dic['display_time'] = str(system_time_int - first_time_stamp)
-        g_messages.append(message_dic)
-
-def generate_sorted_entity_display_list():
-    module_display_order_dic = {}
-    for entity_name in sorted(g_entities_dic.iterkeys()):
-        module_display_order_dic[g_display_order_dic[g_entities_dic[entity_name]]] = entity_name
-
-
-    print("------------------------------------")
-    print("  %s " % (module_display_order_dic))
-
-    for display_priority in sorted(module_display_order_dic.iterkeys()):
-        g_final_display_order_list.append(module_display_order_dic[display_priority])
-
-def msc_chart_write_header(fileP):
-    global g_final_display_order_list
-    fileP.write("msc {\n")
-    fileP.write("width = \"2048\";\n")
-
-    entity_line_list_str = ''
-    for entity in g_final_display_order_list:
-        entity_line_list_str = entity_line_list_str + ' ' + entity + ','
-
-    entity_line_list_str = entity_line_list_str.rstrip().strip(',')
-    fileP.write("  %s;" % (entity_line_list_str))
-
-
-def msc_chart_write_footer(fileP):
-    fileP.write("\n}\n")
-
-def msc_chart_generate(file_nameP):
-    global  MSCGEN_OUTPUT_TYPE
-    command_line = "mscgen -T " + MSCGEN_OUTPUT_TYPE + " -i " + file_nameP + "; chmod 777 " +file_nameP + ";"
-
-    print("Command Line:  %s " % (command_line))
-    fi,fo,fe=os.popen3(command_line)
-    for i in fe.readlines():
-        print "error:",i
-
-def get_nem_file_descriptor():
-    global g_base_file_name
-    global g_page_index
-    l_file_name = g_base_file_name + str(g_page_index)+'.txt'
-    l_file = open(l_file_name, "w", 0777)
-    return l_file
-
-
-###### MAIN START HERE #################
-num_args = len(sys.argv)
-if num_args < 2:  # the program name and the arguments
-  # stop the program and print an error message
-  sys.exit("Must provide at least one file to parse")
-
-for i in range(1,num_args):
-     print sys.argv[i]
-
-for i in range(1,num_args):
-    parse_log_file_for_discovering_protocol_entities(sys.argv[i])
-
-for i in range(1,num_args):
-    parse_log_file(sys.argv[i])
-
-generate_sorted_message_list()
-generate_sorted_entity_display_list()
-
-g_page_index    = 0
-g_message_index = 0
-g_message_index_in_current_page = 0
-g_now = datetime.datetime.now()
-g_now_formated = g_now.strftime("%Y-%m-%d_%H.%M.%S")
-g_currentdir = os.curdir
-g_resultdir = os.path.join(g_currentdir, g_now_formated)
-os.mkdir(g_resultdir, 0777)
-os.chdir(g_resultdir)
-
-g_base_file_name = 'mih_mscgen_page_'
-
-g_file = get_nem_file_descriptor()
-msc_chart_write_header(g_file)
-
-for message in g_messages:
-
-    if 'msg' in message:
-        print ('message %s' % message)
-        g_file.write("  %s%s%s [ label = \"(%d) T%s %s\", linecolour=%s , textcolour=%s ] ;\n" % (message['entity_src'], message['arc'], message['entity_dst'], message['seq_no'], message['display_time'], message['msg'], message['line_color'], message['text_color']))
-    elif 'box' in message:
-        g_file.write("  %s %s %s [ label = \"%s\", textbgcolour=%s , textcolour=%s ] ;\n" % (message['entity_src'], message['box_type'], message['entity_dst'], message['box'], message['textbg_color'], message['text_color']))
-
-    g_message_index                  = g_message_index + 1
-    g_message_index_in_current_page  = g_message_index_in_current_page + 1
-
-    if (g_message_index_in_current_page == MAX_MESSAGES_PER_PAGE):
-        msc_chart_write_footer(g_file)
-        g_file.close()
-        msc_chart_generate(g_file.name)
-        g_page_index = g_page_index + 1
-        g_message_index_in_current_page = 0
-
-        g_file = get_nem_file_descriptor()
-        msc_chart_write_header(g_file)
-
-
-msc_chart_write_footer(g_file)
-g_file.close()
-if g_message_index_in_current_page >= 1:
-    msc_chart_generate(g_file.name)
-else:
-    print("Removing empty seq diagram file:  %s " % (g_file.name))
-    os.remove(g_file.name)
diff --git a/openair3/NAS/UE/EMM/Detach.c b/openair3/NAS/UE/EMM/Detach.c
index 719e18dd05ba86ba6815c48647357ef8c54c4ef5..b61bcdc14dc7e7ea1d04ff61896ca4db7137d01e 100644
--- a/openair3/NAS/UE/EMM/Detach.c
+++ b/openair3/NAS/UE/EMM/Detach.c
@@ -53,7 +53,6 @@ Description Defines the detach related EMM procedure executed by the
 
 #include "emm_sap.h"
 #include "esm_sap.h"
-#include "msc.h"
 
 #include <stdlib.h> // free
 
diff --git a/openair3/NAS/UE/EMM/Identification.c b/openair3/NAS/UE/EMM/Identification.c
index b5807973a25624f9808c10c12c1ca3e19a4fd306..0364c6d22f2c79797a345aa2596c61e6b67ed1a2 100644
--- a/openair3/NAS/UE/EMM/Identification.c
+++ b/openair3/NAS/UE/EMM/Identification.c
@@ -48,7 +48,6 @@ Description Defines the identification EMM procedure executed by the
 #include "emmData.h"
 
 #include "emm_sap.h"
-#include "msc.h"
 #include "user_defs.h"
 
 #include <stdlib.h> // malloc, free
diff --git a/openair3/NAS/UE/EMM/SAP/emm_as.c b/openair3/NAS/UE/EMM/SAP/emm_as.c
index 6b226be38061696a5ff4434c91ebcbc50b958497..ea4eefadeba8ffecb1097686de6e984d5f48889f 100644
--- a/openair3/NAS/UE/EMM/SAP/emm_as.c
+++ b/openair3/NAS/UE/EMM/SAP/emm_as.c
@@ -61,7 +61,6 @@ Description Defines the EMMAS Service Access Point that provides
 #if  defined(NAS_BUILT_IN_UE)
 # include "nas_itti_messaging.h"
 #endif
-#include "msc.h"
 
 /****************************************************************************/
 /****************  E X T E R N A L    D E F I N I T I O N S  ****************/
diff --git a/openair3/NAS/UE/EMM/SecurityModeControl.c b/openair3/NAS/UE/EMM/SecurityModeControl.c
index b27270fadc43fd89ed7d59d1742b792a30ca953a..f9a02b1a7055a2e502d8fe758c16b101b474d31c 100644
--- a/openair3/NAS/UE/EMM/SecurityModeControl.c
+++ b/openair3/NAS/UE/EMM/SecurityModeControl.c
@@ -63,7 +63,6 @@ Description Defines the security mode control EMM procedure executed by the
 
 # include "assertions.h"
 #include "secu_defs.h"
-#include "msc.h"
 #include "SecurityModeControl.h"
 
 #if  defined(NAS_BUILT_IN_UE)
diff --git a/openair3/NAS/UE/nas_itti_messaging.c b/openair3/NAS/UE/nas_itti_messaging.c
index 8016e0d791757ad2af5555ebaaf92ed540162d5b..c6762a712812dc3cdeb247d08694c3e741920106 100644
--- a/openair3/NAS/UE/nas_itti_messaging.c
+++ b/openair3/NAS/UE/nas_itti_messaging.c
@@ -23,7 +23,6 @@
 
 #include "intertask_interface.h"
 #include "nas_itti_messaging.h"
-#include "msc.h"
 
 #   define TASK_ORIGIN  TASK_NAS_UE
 
@@ -104,27 +103,6 @@ int nas_itti_kenb_refresh_req(const Byte_t kenb[32], int user_id) {
   MessageDef *message_p;
   message_p = itti_alloc_new_message(TASK_NAS_UE, 0, NAS_KENB_REFRESH_REQ);
   memcpy(NAS_KENB_REFRESH_REQ(message_p).kenb, kenb, sizeof(NAS_KENB_REFRESH_REQ(message_p).kenb));
-  MSC_LOG_TX_MESSAGE(
-    MSC_NAS_UE,
-    MSC_RRC_UE,
-    NULL,0,
-    "0 NAS_KENB_REFRESH_REQ KeNB "
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x"
-    "%02x%02x%02x%02x",
-    kenb[0],  kenb[1],  kenb[2],  kenb[3],
-    kenb[4],  kenb[5],  kenb[6],  kenb[7],
-    kenb[8],  kenb[9],  kenb[10], kenb[11],
-    kenb[12], kenb[13], kenb[14], kenb[15],
-    kenb[16], kenb[17], kenb[18], kenb[19],
-    kenb[20], kenb[21], kenb[22], kenb[23],
-    kenb[24], kenb[25], kenb[26], kenb[27],
-    kenb[28], kenb[29], kenb[30], kenb[31]);
   return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
 }
 
@@ -133,13 +111,6 @@ int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat, int user_id) {
   message_p = itti_alloc_new_message(TASK_NAS_UE, 0, NAS_CELL_SELECTION_REQ);
   NAS_CELL_SELECTION_REQ(message_p).plmnID    = plmnID;
   NAS_CELL_SELECTION_REQ(message_p).rat       = rat;
-  MSC_LOG_TX_MESSAGE(
-    MSC_NAS_UE,
-    MSC_RRC_UE,
-    NULL,0,
-    "0 NAS_CELL_SELECTION_REQ PLMN %X%X%X.%X%X%X",
-    plmnID.MCCdigit1, plmnID.MCCdigit2, plmnID.MCCdigit3,
-    plmnID.MNCdigit1, plmnID.MNCdigit2, plmnID.MNCdigit3);
   return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
 }
 
@@ -152,14 +123,6 @@ int nas_itti_nas_establish_req(as_cause_t cause, as_call_type_t type, as_stmsi_t
   NAS_CONN_ESTABLI_REQ(message_p).plmnID                      = plmnID;
   NAS_CONN_ESTABLI_REQ(message_p).initialNasMsg.data          = data;
   NAS_CONN_ESTABLI_REQ(message_p).initialNasMsg.length        = length;
-  MSC_LOG_TX_MESSAGE(
-    MSC_NAS_UE,
-    MSC_RRC_UE,
-    NULL,0,
-    "0 NAS_CONN_ESTABLI_REQ MME code %u m-TMSI %u PLMN %X%X%X.%X%X%X",
-    s_tmsi.MMEcode, s_tmsi.m_tmsi,
-    plmnID.MCCdigit1, plmnID.MCCdigit2, plmnID.MCCdigit3,
-    plmnID.MNCdigit1, plmnID.MNCdigit2, plmnID.MNCdigit3);
   return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
 }
 
@@ -178,11 +141,5 @@ int nas_itti_rab_establish_rsp(const as_stmsi_t s_tmsi, const as_rab_id_t rabID,
   NAS_RAB_ESTABLI_RSP(message_p).s_tmsi       = s_tmsi;
   NAS_RAB_ESTABLI_RSP(message_p).rabID        = rabID;
   NAS_RAB_ESTABLI_RSP(message_p).errCode      = errCode;
-  MSC_LOG_TX_MESSAGE(
-    MSC_NAS_UE,
-    MSC_RRC_UE,
-    NULL,0,
-    "0 NAS_RAB_ESTABLI_RSP MME code %u m-TMSI %u rb id %u status %u",
-    s_tmsi.MMEcode, s_tmsi.m_tmsi,rabID, errCode );
   return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
 }
diff --git a/openair3/NAS/UE/nas_itti_messaging.h b/openair3/NAS/UE/nas_itti_messaging.h
index 967bbb30596d9aa200ea96b2e72791659f15049b..79b70394f0e57318070016e2b8806e3360620013 100644
--- a/openair3/NAS/UE/nas_itti_messaging.h
+++ b/openair3/NAS/UE/nas_itti_messaging.h
@@ -26,7 +26,6 @@
 #include "assertions.h"
 #include "intertask_interface.h"
 #include "esm_proc.h"
-#include "msc.h"
 
 #ifndef NAS_ITTI_MESSAGING_H_
 #define NAS_ITTI_MESSAGING_H_
diff --git a/openair3/NAS/UE/nas_proc.c b/openair3/NAS/UE/nas_proc.c
index 6312a7dc97225278ca01cd809f16b6186959b74e..9350590788a738a88a11763697e34c15ed44a433 100644
--- a/openair3/NAS/UE/nas_proc.c
+++ b/openair3/NAS/UE/nas_proc.c
@@ -46,7 +46,6 @@ Description NAS procedure call manager
 
 #include "esm_main.h"
 #include "esm_sap.h"
-#include "msc.h"
 
 #include <stdio.h>  // sprintf
 
diff --git a/openair3/NAS/UE/nas_ue_task.c b/openair3/NAS/UE/nas_ue_task.c
index 88938c3c376e0aea7614192395e77c794114eebe..a94445349cf648597c913cc44d82583cd7300a8b 100644
--- a/openair3/NAS/UE/nas_ue_task.c
+++ b/openair3/NAS/UE/nas_ue_task.c
@@ -29,12 +29,9 @@
 # include "user_api.h"
 # include "nas_parser.h"
 # include "nas_proc.h"
-# include "msc.h"
 # include "memory.h"
 
 #include "nas_user.h"
-#include <common/utils/msc/msc.h>
-
 // FIXME make command line option for NAS_UE_AUTOSTART
 # define NAS_UE_AUTOSTART 1
 
@@ -97,7 +94,6 @@ void *nas_ue_task(void *args_p)
   nas_user_container_t *users=args_p;
 
   itti_mark_task_ready (TASK_NAS_UE);
-  MSC_START_USE();
   LOG_I(NAS, "ue_idx_standalone val:: %u\n", ue_idx_standalone);
   /* Initialize UE NAS (EURECOM-NAS) */
   // Intead of for loop for standalone mode
diff --git a/openair3/NGAP/ngap_gNB.c b/openair3/NGAP/ngap_gNB.c
index a5dfc88b35c4a6f6a5991a97f2d12f5785b1386c..9d6bd7f07f31f334fcf59b5c34865d90aced2795 100644
--- a/openair3/NGAP/ngap_gNB.c
+++ b/openair3/NGAP/ngap_gNB.c
@@ -57,7 +57,6 @@
 #include "ngap_gNB_itti_messaging.h"
 
 #include "ngap_gNB_ue_context.h" // test, to be removed
-#include "msc.h"
 
 #include "assertions.h"
 #include "conversions.h"
@@ -273,7 +272,6 @@ void ngap_gNB_init(void) {
   NGAP_DEBUG("Starting NGAP layer\n");
   ngap_gNB_prepare_internal_data();
   itti_mark_task_ready(TASK_NGAP);
-  MSC_START_USE();
 }
 
 void *ngap_gNB_process_itti_msg(void *notUsed) {
diff --git a/openair3/NGAP/ngap_gNB_context_management_procedures.c b/openair3/NGAP/ngap_gNB_context_management_procedures.c
index 73e4498f195d145ac85dd9f599f3a200eb6ecf99..ea22c91bc2a06e67dbc10e87a12d72776a5b65e1 100644
--- a/openair3/NGAP/ngap_gNB_context_management_procedures.c
+++ b/openair3/NGAP/ngap_gNB_context_management_procedures.c
@@ -50,7 +50,6 @@
 #include "ngap_gNB_management_procedures.h"
 #include "ngap_gNB_context_management_procedures.h"
 #include "NGAP_PDUSessionResourceItemCxtRelReq.h"
-#include "msc.h"
 
 
 int ngap_ue_context_release_complete(instance_t instance,
@@ -116,16 +115,6 @@ int ngap_ue_context_release_complete(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-    MSC_NGAP_GNB,
-    MSC_NGAP_AMF,
-    buffer,
-    length,
-    MSC_AS_TIME_FMT" UEContextRelease successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
-    0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_release_complete_p->gNB_ue_ngap_id,
-    ue_context_p->amf_ue_ngap_id);
-
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
@@ -267,16 +256,6 @@ int ngap_ue_context_release_req(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-    MSC_NGAP_GNB,
-    MSC_NGAP_AMF,
-    buffer,
-    length,
-    MSC_AS_TIME_FMT" UEContextReleaseRequest initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
-    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_release_req_p->gNB_ue_ngap_id,
-    ue_context_p->amf_ue_ngap_id);
-
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
diff --git a/openair3/NGAP/ngap_gNB_handlers.c b/openair3/NGAP/ngap_gNB_handlers.c
index 2b0e8aab7c1251b1a6d069b7d866cf8699612a99..4692d2cd32b1717c77a44d992c3f15ff733497e7 100644
--- a/openair3/NGAP/ngap_gNB_handlers.c
+++ b/openair3/NGAP/ngap_gNB_handlers.c
@@ -48,7 +48,6 @@
 
 #include "assertions.h"
 #include "conversions.h"
-#include "msc.h"
 #include "NGAP_NonDynamic5QIDescriptor.h"
 
 static
@@ -1208,14 +1207,6 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t   assoc_id,
       case NGAP_UE_NGAP_IDs_PR_uE_NGAP_ID_pair:
         gnb_ue_ngap_id = ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->rAN_UE_NGAP_ID;
         asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->aMF_UE_NGAP_ID), &amf_ue_ngap_id);
-        MSC_LOG_RX_MESSAGE(
-          MSC_NGAP_GNB,
-          MSC_NGAP_AMF,
-          NULL,0,
-          "0 UEContextRelease/%s gNB_ue_ngap_id "NGAP_UE_ID_FMT" amf_ue_ngap_id "NGAP_UE_ID_FMT" len %u",
-          ngap_direction2String(pdu->present - 1),
-          gnb_ue_ngap_id,
-          amf_ue_ngap_id);
 
         if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance,
                          gnb_ue_ngap_id)) == NULL) {
@@ -1225,12 +1216,6 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t   assoc_id,
                      gnb_ue_ngap_id);
           return -1;
         } else {
-          MSC_LOG_TX_MESSAGE(
-            MSC_NGAP_GNB,
-            MSC_RRC_GNB,
-            NULL,0,
-            "0 NGAP_UE_CONTEXT_RELEASE_COMMAND/%d gNB_ue_ngap_id "NGAP_UE_ID_FMT" ",
-            gnb_ue_ngap_id);
           message_p    = itti_alloc_new_message(TASK_NGAP, 0, NGAP_UE_CONTEXT_RELEASE_COMMAND);
 
           if (ue_desc_p->amf_ue_ngap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode
diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c
index 6686f8c19e0ae5d0584b8dc7698318e3be8015b3..a40e8328da401338ba88a1663cb07d89d38e5d02 100644
--- a/openair3/NGAP/ngap_gNB_nas_procedures.c
+++ b/openair3/NGAP/ngap_gNB_nas_procedures.c
@@ -48,7 +48,6 @@
 #include "ngap_gNB_ue_context.h"
 #include "ngap_gNB_nas_procedures.h"
 #include "ngap_gNB_management_procedures.h"
-#include "msc.h"
 
 //------------------------------------------------------------------------------
 int ngap_gNB_handle_nas_first_req(
@@ -312,14 +311,6 @@ int ngap_gNB_handle_nas_first_req(
   }
 
   ue_desc_p->tx_stream = amf_desc_p->nextstream;
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)NULL,
-      0,
-      MSC_AS_TIME_FMT" initialUEMessage initiatingMessage gNB_ue_ngap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_desc_p->gNB_ue_ngap_id);
   /* Send encoded message over sctp */
   ngap_gNB_itti_send_sctp_data_req(instance_p->instance, amf_desc_p->assoc_id,
                                    buffer, length, ue_desc_p->tx_stream);
@@ -371,14 +362,6 @@ int ngap_gNB_handle_nas_downlink(uint32_t         assoc_id,
 
   if ((ue_desc_p = ngap_gNB_get_ue_context(ngap_gNB_instance,
                    gnb_ue_ngap_id)) == NULL) {
-    MSC_LOG_RX_DISCARDED_MESSAGE(
-        MSC_NGAP_GNB,
-        MSC_NGAP_AMF,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" downlinkNASTransport  gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-        gnb_ue_ngap_id,
-        amf_ue_ngap_id);
     NGAP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context gNB_UE_NGAP_ID: 0x%lx\n",
                assoc_id,
                gnb_ue_ngap_id);
@@ -410,15 +393,6 @@ int ngap_gNB_handle_nas_downlink(uint32_t         assoc_id,
     }
   }
 
-  MSC_LOG_RX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      NULL,
-      0,
-      MSC_AS_TIME_FMT" downlinkNASTransport  gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-      assoc_id,
-      amf_ue_ngap_id);
-
   NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNASTransport_IEs_t, ie, container,
                              NGAP_ProtocolIE_ID_id_NAS_PDU, true);
   /* Forward the NAS PDU to NR-RRC */
@@ -532,15 +506,6 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)NULL,
-      0,
-      MSC_AS_TIME_FMT" uplinkNASTransport initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_p->gNB_ue_ngap_id,
-      ue_context_p->amf_ue_ngap_id);
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
@@ -571,10 +536,6 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance,
     /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */
     NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %08x\n",
               ngap_nas_non_delivery_ind->gNB_ue_ngap_id);
-    MSC_LOG_EVENT(
-        MSC_NGAP_GNB,
-        MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to AMF failed, no context for gNB_ue_ngap_id %08x",
-        ngap_nas_non_delivery_ind->gNB_ue_ngap_id);
     return -1;
   }
 
@@ -621,21 +582,9 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance,
   if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) {
     NGAP_ERROR("Failed to encode NAS NON delivery indication\n");
     /* Encode procedure has failed... */
-    MSC_LOG_EVENT(
-        MSC_NGAP_GNB,
-        MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to AMF failed (encoding)");
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)buffer,
-      length,
-      MSC_AS_TIME_FMT" NASNonDeliveryIndication initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_context_p->gNB_ue_ngap_id,
-      ue_context_p->amf_ue_ngap_id);
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
@@ -868,15 +817,6 @@ int ngap_gNB_initial_ctxt_resp(
     return -1;
   }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_NGAP_GNB,
-        MSC_NGAP_AMF,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" InitialContextSetup successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        initial_ctxt_resp_p->gNB_ue_ngap_id,
-        ue_context_p->amf_ue_ngap_id);
     /* UE associated signalling -> use the allocated stream */
     LOG_I(NR_RRC,"Send message to sctp: NGAP_InitialContextSetupResponse\n");
     ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
@@ -961,15 +901,6 @@ int ngap_gNB_ue_capabilities(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)buffer,
-      length,
-      MSC_AS_TIME_FMT" UECapabilityInfoIndication initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      ue_cap_info_ind_p->gNB_ue_ngap_id,
-      ue_context_p->amf_ue_ngap_id);
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
@@ -1179,15 +1110,6 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
       return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)buffer,
-      length,
-      MSC_AS_TIME_FMT" PduSession Setup successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      pdusession_setup_resp_p->gNB_ue_ngap_id,
-      ue_context_p->amf_ue_ngap_id);
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
@@ -1353,15 +1275,6 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)buffer,
-      length,
-      MSC_AS_TIME_FMT" E_RAN Modify successful Outcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      pdusession_modify_resp_p->gNB_ue_ngap_id,
-      ue_context_p->amf_ue_ngap_id);
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
@@ -1464,15 +1377,6 @@ int ngap_gNB_pdusession_release_resp(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-      MSC_NGAP_GNB,
-      MSC_NGAP_AMF,
-      (const char *)buffer,
-      length,
-      MSC_AS_TIME_FMT" E_RAN Release successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
-      0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-      pdusession_release_resp_p->gNB_ue_ngap_id,
-      (uint64_t)ue_context_p->amf_ue_ngap_id);
   /* UE associated signalling -> use the allocated stream */
   ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
                                    ue_context_p->amf_ref->assoc_id, buffer,
diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c
index e528c9e53eb4e87ca439deb2217a87d2a51710b4..5f30386bb335253532d2a143f982cd6f59c645d4 100644
--- a/openair3/S1AP/s1ap_eNB.c
+++ b/openair3/S1AP/s1ap_eNB.c
@@ -56,7 +56,6 @@
 #include "s1ap_eNB_itti_messaging.h"
 
 #include "s1ap_eNB_ue_context.h" // test, to be removed
-#include "msc.h"
 
 #include "assertions.h"
 #include "conversions.h"
@@ -507,7 +506,6 @@ void s1ap_eNB_init(void) {
   S1AP_DEBUG("Starting S1AP layer\n");
   s1ap_eNB_prepare_internal_data();
   itti_mark_task_ready(TASK_S1AP);
-  MSC_START_USE();
 }
 
 void *s1ap_eNB_process_itti_msg(void *notUsed) {
diff --git a/openair3/S1AP/s1ap_eNB_context_management_procedures.c b/openair3/S1AP/s1ap_eNB_context_management_procedures.c
index 374da7272fda4a43a770eb43b8587de6f01ef584..6255abb14d6d3b0525ae9a13c07a7197d36f9071 100644
--- a/openair3/S1AP/s1ap_eNB_context_management_procedures.c
+++ b/openair3/S1AP/s1ap_eNB_context_management_procedures.c
@@ -47,7 +47,6 @@
 #include "s1ap_eNB_nas_procedures.h"
 #include "s1ap_eNB_management_procedures.h"
 #include "s1ap_eNB_context_management_procedures.h"
-#include "msc.h"
 
 
 int s1ap_ue_context_release_complete(instance_t instance,
@@ -111,16 +110,6 @@ int s1ap_ue_context_release_complete(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-    MSC_S1AP_ENB,
-    MSC_S1AP_MME,
-    buffer,
-    length,
-    MSC_AS_TIME_FMT" UEContextRelease successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-    0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_release_complete_p->eNB_ue_s1ap_id,
-    ue_context_p->mme_ue_s1ap_id);
-
   /* UE associated signalling -> use the allocated stream */
   s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                    ue_context_p->mme_ref->assoc_id, buffer,
@@ -246,16 +235,6 @@ int s1ap_ue_context_release_req(instance_t instance,
     return -1;
   }
 
-  MSC_LOG_TX_MESSAGE(
-    MSC_S1AP_ENB,
-    MSC_S1AP_MME,
-    buffer,
-    length,
-    MSC_AS_TIME_FMT" UEContextReleaseRequest initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_release_req_p->eNB_ue_s1ap_id,
-    ue_context_p->mme_ue_s1ap_id);
-
   /* UE associated signalling -> use the allocated stream */
   s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                    ue_context_p->mme_ref->assoc_id, buffer,
diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c
index 9ee3287b94f3b43a236b0d41ae85a79270682c00..b3b38e7017a55c99d7af8a66e5bec8d51dfdac08 100644
--- a/openair3/S1AP/s1ap_eNB_handlers.c
+++ b/openair3/S1AP/s1ap_eNB_handlers.c
@@ -51,7 +51,6 @@
 
 #include "assertions.h"
 #include "conversions.h"
-#include "msc.h"
 
 static
 int s1ap_eNB_handle_s1_setup_response(uint32_t               assoc_id,
@@ -1025,14 +1024,6 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t   assoc_id,
       case S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair:
         enb_ue_s1ap_id = ie->value.choice.UE_S1AP_IDs.choice.uE_S1AP_ID_pair.eNB_UE_S1AP_ID;
         mme_ue_s1ap_id = ie->value.choice.UE_S1AP_IDs.choice.uE_S1AP_ID_pair.mME_UE_S1AP_ID;
-        MSC_LOG_RX_MESSAGE(
-          MSC_S1AP_ENB,
-          MSC_S1AP_MME,
-          NULL,0,
-          "0 UEContextRelease/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u",
-          s1ap_direction2String(pdu->present - 1),
-          enb_ue_s1ap_id,
-          mme_ue_s1ap_id);
 
         if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
                          enb_ue_s1ap_id)) == NULL) {
@@ -1042,12 +1033,6 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t   assoc_id,
                      enb_ue_s1ap_id);
           return -1;
         } else {
-          MSC_LOG_TX_MESSAGE(
-            MSC_S1AP_ENB,
-            MSC_RRC_ENB,
-            NULL,0,
-            "0 S1AP_UE_CONTEXT_RELEASE_COMMAND/%d eNB_ue_s1ap_id "S1AP_UE_ID_FMT" ",
-            enb_ue_s1ap_id);
           message_p    = itti_alloc_new_message(TASK_S1AP, 0, S1AP_UE_CONTEXT_RELEASE_COMMAND);
 
           if (ue_desc_p->mme_ue_s1ap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode
diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c
index b55bc06e11a4842a4d607023cb85f05f75ac8e95..0b56d312114a4ab8ea7d42ae43d2f1cbb8e4dbdb 100644
--- a/openair3/S1AP/s1ap_eNB_nas_procedures.c
+++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c
@@ -46,7 +46,6 @@
 #include "s1ap_eNB_ue_context.h"
 #include "s1ap_eNB_nas_procedures.h"
 #include "s1ap_eNB_management_procedures.h"
-#include "msc.h"
 
 //------------------------------------------------------------------------------
 int s1ap_eNB_handle_nas_first_req(
@@ -310,14 +309,6 @@ int s1ap_eNB_handle_nas_first_req(
     }
 
     ue_desc_p->tx_stream = mme_desc_p->nextstream;
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)NULL,
-        0,
-        MSC_AS_TIME_FMT" initialUEMessage initiatingMessage eNB_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_desc_p->eNB_ue_s1ap_id);
     /* Send encoded message over sctp */
     s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, mme_desc_p->assoc_id,
                                      buffer, length, ue_desc_p->tx_stream);
@@ -374,14 +365,6 @@ int s1ap_eNB_handle_nas_downlink(uint32_t         assoc_id,
 
     if ((ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance,
                      enb_ue_s1ap_id)) == NULL) {
-        MSC_LOG_RX_DISCARDED_MESSAGE(
-            MSC_S1AP_ENB,
-            MSC_S1AP_MME,
-            NULL,
-            0,
-            MSC_AS_TIME_FMT" downlinkNASTransport  eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-            enb_ue_s1ap_id,
-            mme_ue_s1ap_id);
         S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%lx\n",
                    assoc_id,
                    enb_ue_s1ap_id);
@@ -413,15 +396,6 @@ int s1ap_eNB_handle_nas_downlink(uint32_t         assoc_id,
         }
     }
 
-    MSC_LOG_RX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        NULL,
-        0,
-        MSC_AS_TIME_FMT" downlinkNASTransport  eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        assoc_id,
-        mme_ue_s1ap_id);
-
     S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_DownlinkNASTransport_IEs_t, ie, container,
                                S1AP_ProtocolIE_ID_id_NAS_PDU, true);
     if(ie == NULL)
@@ -536,15 +510,6 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)NULL,
-        0,
-        MSC_AS_TIME_FMT" uplinkNASTransport initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_context_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -574,10 +539,6 @@ int s1ap_eNB_nas_non_delivery_ind(instance_t instance,
         /* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
         S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %06x\n",
                   s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id);
-        MSC_LOG_EVENT(
-            MSC_S1AP_ENB,
-            MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to MME failed, no context for eNB_ue_s1ap_id %06x",
-            s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id);
         return -1;
     }
 
@@ -623,21 +584,9 @@ int s1ap_eNB_nas_non_delivery_ind(instance_t instance,
     if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
         S1AP_ERROR("Failed to encode NAS NON delivery indication\n");
         /* Encode procedure has failed... */
-        MSC_LOG_EVENT(
-            MSC_S1AP_ENB,
-            MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to MME failed (encoding)");
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" NASNonDeliveryIndication initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_context_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -802,15 +751,6 @@ int s1ap_eNB_initial_ctxt_resp(
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" InitialContextSetup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        initial_ctxt_resp_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -891,15 +831,6 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" UECapabilityInfoIndication initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        ue_cap_info_ind_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -1075,15 +1006,6 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance,
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" E_RAN Setup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        e_rab_setup_resp_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -1238,15 +1160,6 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance,
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" E_RAN Modify successful Outcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        e_rab_modify_resp_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -1378,15 +1291,6 @@ int s1ap_eNB_e_rab_release_resp(instance_t instance,
         return -1;
     }
 
-    MSC_LOG_TX_MESSAGE(
-        MSC_S1AP_ENB,
-        MSC_S1AP_MME,
-        (const char *)buffer,
-        length,
-        MSC_AS_TIME_FMT" E_RAN Release successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-        0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-        e_rab_release_resp_p->eNB_ue_s1ap_id,
-        ue_context_p->mme_ue_s1ap_id);
     /* UE associated signalling -> use the allocated stream */
     s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                      ue_context_p->mme_ref->assoc_id, buffer,
@@ -1615,16 +1519,6 @@ int s1ap_eNB_path_switch_req(instance_t instance,
 
   ue_context_p->tx_stream = mme_desc_p->nextstream;
 
-  MSC_LOG_TX_MESSAGE(
-    MSC_S1AP_ENB,
-    MSC_S1AP_MME,
-    (const char *)buffer,
-    length,
-    MSC_AS_TIME_FMT" E_RAN Setup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
-    0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
-    ue_context_p->eNB_ue_s1ap_id,
-    path_switch_req_p->mme_ue_s1ap_id);
-
   /* UE associated signalling -> use the allocated stream */
   s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
                                    mme_desc_p->assoc_id, buffer,
diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c
index 8d0166f80534436b6017cb415a284d7fd7b86848..ab49125856c5abe1a3967242badf1015e74eeaa1 100644
--- a/openair3/SCTP/sctp_eNB_task.c
+++ b/openair3/SCTP/sctp_eNB_task.c
@@ -48,7 +48,6 @@
 #include "sctp_default_values.h"
 #include "sctp_common.h"
 #include "sctp_eNB_itti_messaging.h"
-#include "msc.h"
 
 /* Used to format an uint32_t containing an ipv4 address */
 #define IPV4_ADDR    "%u.%u.%u.%u"
@@ -1097,8 +1096,6 @@ void sctp_eNB_init(void)
     STAILQ_INIT(&sctp_cnx_list);
 
     itti_mark_task_ready(TASK_SCTP);
-    MSC_START_USE();
-
 }
 
 //------------------------------------------------------------------------------
diff --git a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf
index 85cee4dda0685d20afa6b3e6604a45881974d7f1..ad6c81f56b4ce972f78f31b0bd0f7e8a52701f6e 100644
--- a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf
+++ b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf
@@ -148,23 +148,14 @@ eNBs =
     log_config :
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
       gtpu_log_level                        ="info";
-      gtpu_log_verbosity                    ="medium";
       udp_log_level                         ="info";
-      udp_log_verbosity                     ="medium";
    };
 
   }
diff --git a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf
index df06231e4a54706a8725faf4fc760cb1bc04753d..9ffed9c5fec0acf3224dbe38b7616bc0abfda54a 100644
--- a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf
+++ b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf
@@ -148,19 +148,11 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
-      mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/openair3/TEST/EPC_TEST/play_scenario_s1ap.c b/openair3/TEST/EPC_TEST/play_scenario_s1ap.c
index c4674e89011b2da8c6cf0c186aedc640fe85509f..fe132fd2f5d270adf407956cc2836d0a8e398e1f 100644
--- a/openair3/TEST/EPC_TEST/play_scenario_s1ap.c
+++ b/openair3/TEST/EPC_TEST/play_scenario_s1ap.c
@@ -44,7 +44,6 @@
 #include "s1ap_common.h"
 #include "play_scenario_s1ap_eNB_defs.h"
 #include "play_scenario.h"
-#include "msc.h"
 //------------------------------------------------------------------------------
 s1ap_eNB_internal_data_t s1ap_eNB_internal_data;
 RB_GENERATE(s1ap_mme_map, s1ap_eNB_mme_data_s, entry, et_s1ap_eNB_compare_assoc_id);
@@ -1084,7 +1083,6 @@ void *et_s1ap_eNB_task(void *arg)
   et_s1ap_eNB_prepare_internal_data();
 
   itti_mark_task_ready(TASK_S1AP);
-  MSC_START_USE();
 
   while (1) {
     itti_receive_msg(TASK_S1AP, &received_msg);
diff --git a/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c b/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
index bc7ca6afbd0d1e3cd4a95b28ad8b58c221a4d651..40654fc77159b32e5773d52112057da45217b2a9 100644
--- a/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
+++ b/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
@@ -49,7 +49,6 @@
 #include "s1ap_common.h"
 #include "play_scenario_s1ap_eNB_defs.h"
 #include "play_scenario.h"
-#include "msc.h"
 //------------------------------------------------------------------------------
 extern et_scenario_t  *g_scenario;
 extern uint32_t        g_constraints;
diff --git a/openair3/UDP/udp_eNB_task.c b/openair3/UDP/udp_eNB_task.c
deleted file mode 100644
index 8b9fc77bb14ebcff3ce765504113a385a2d408bf..0000000000000000000000000000000000000000
--- a/openair3/UDP/udp_eNB_task.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file udp_eNB_task.c
-* \brief
-* \author Sebastien ROUX, Lionel Gauthier
-* \company Eurecom
-* \email: lionel.gauthier@eurecom.fr
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <pthread.h>
-
-#include "queue.h"
-#include "intertask_interface.h"
-#include "assertions.h"
-#include "udp_eNB_task.h"
-
-#include "common/utils/LOG/log.h"
-#include "common/utils/LOG/vcd_signal_dumper.h"
-#include "msc.h"
-
-
-#define IPV4_ADDR    "%u.%u.%u.%u"
-#define IPV4_ADDR_FORMAT(aDDRESS)               \
-    (uint8_t)((aDDRESS)  & 0x000000ff),         \
-    (uint8_t)(((aDDRESS) & 0x0000ff00) >> 8 ),  \
-    (uint8_t)(((aDDRESS) & 0x00ff0000) >> 16),  \
-    (uint8_t)(((aDDRESS) & 0xff000000) >> 24)
-
-
-struct udp_socket_desc_s {
-  int       sd;              /* Socket descriptor to use */
-
-  pthread_t listener_thread; /* Thread affected to recv */
-
-  char     *local_address;   /* Local ipv4 address to use */
-  uint16_t  local_port;      /* Local port to use */
-
-  task_id_t task_id;         /* Task who has requested the new endpoint */
-
-  STAILQ_ENTRY(udp_socket_desc_s) entries;
-};
-
-static STAILQ_HEAD(udp_socket_list_s, udp_socket_desc_s) udp_socket_list;
-static pthread_mutex_t udp_socket_list_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-
-static
-struct udp_socket_desc_s *
-udp_eNB_get_socket_desc(task_id_t task_id);
-
-void udp_eNB_process_file_descriptors(
-  struct epoll_event *events,
-  int nb_events);
-
-static
-int
-udp_eNB_create_socket(
-  int port,
-  char *ip_addr,
-  task_id_t task_id);
-
-int
-udp_eNB_send_to(
-  int sd,
-  uint16_t port,
-  uint32_t address,
-  const uint8_t *buffer,
-  uint32_t length);
-
-void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP);
-
-void *udp_eNB_task(void *args_p);
-
-int udp_enb_init(void);
-/* @brief Retrieve the descriptor associated with the task_id
- */
-static
-struct udp_socket_desc_s *udp_eNB_get_socket_desc(task_id_t task_id)
-{
-  struct udp_socket_desc_s *udp_sock_p = NULL;
-
-#if defined(LOG_UDP) && LOG_UDP > 0
-  LOG_T(UDP_, "Looking for task %d\n", task_id);
-#endif
-
-  STAILQ_FOREACH(udp_sock_p, &udp_socket_list, entries) {
-    if (udp_sock_p->task_id == task_id) {
-#if defined(LOG_UDP) && LOG_UDP > 0
-      LOG_T(UDP_, "Found matching task desc\n");
-#endif
-      break;
-    }
-  }
-  return udp_sock_p;
-}
-
-void udp_eNB_process_file_descriptors(struct epoll_event *events, int nb_events)
-{
-  int                       i;
-  struct udp_socket_desc_s *udp_sock_p = NULL;
-
-  if (events == NULL) {
-    return;
-  }
-
-  for (i = 0; i < nb_events; i++) {
-    STAILQ_FOREACH(udp_sock_p, &udp_socket_list, entries) {
-      if (udp_sock_p->sd == events[i].data.fd) {
-#if defined(LOG_UDP) && LOG_UDP > 0
-        LOG_D(UDP_, "Found matching task desc\n");
-#endif
-        udp_eNB_receiver(udp_sock_p);
-        break;
-      }
-    }
-  }
-}
-
-static
-int udp_eNB_create_socket(int port, char *ip_addr, task_id_t task_id)
-{
-
-  struct udp_socket_desc_s  *udp_socket_desc_p = NULL;
-  int                       sd, rc;
-  struct sockaddr_in        sin;
-
-  LOG_I(UDP_, "Initializing UDP for local address %s with port %d\n", ip_addr, port);
-
-  sd = socket(AF_INET, SOCK_DGRAM, 0);
-  AssertFatal(sd > 0, "UDP: Failed to create new socket: (%s:%d)\n", strerror(errno), errno);
-
-  memset(&sin, 0, sizeof(struct sockaddr_in));
-  sin.sin_family      = AF_INET;
-  sin.sin_port        = htons(port);
-
-  if (ip_addr == NULL) {
-    sin.sin_addr.s_addr = inet_addr(INADDR_ANY);
-  } else {
-    sin.sin_addr.s_addr = inet_addr(ip_addr);
-  }
-
-  if ((rc = bind(sd, (struct sockaddr *)&sin, sizeof(struct sockaddr_in))) < 0) {
-    close(sd);
-    LOG_E(UDP_, "Failed to bind socket: (%s:%d) address %s port %d\n", strerror(errno), errno, ip_addr, port);
-    return -1;
-  }
-
-  /* Create a new descriptor for this connection */
-  udp_socket_desc_p = calloc(1, sizeof(struct udp_socket_desc_s));
-
-  DevAssert(udp_socket_desc_p != NULL);
-
-  udp_socket_desc_p->sd            = sd;
-  udp_socket_desc_p->local_address = ip_addr;
-  udp_socket_desc_p->local_port    = port;
-  udp_socket_desc_p->task_id       = task_id;
-
-  LOG_I(UDP_, "Inserting new descriptor for task %d, sd %d\n", udp_socket_desc_p->task_id, udp_socket_desc_p->sd);
-  pthread_mutex_lock(&udp_socket_list_mutex);
-  STAILQ_INSERT_TAIL(&udp_socket_list, udp_socket_desc_p, entries);
-  pthread_mutex_unlock(&udp_socket_list_mutex);
-
-  itti_subscribe_event_fd(TASK_UDP, sd);
-  LOG_I(UDP_, "Initializing UDP for local address %s with port %d: DONE\n", ip_addr, port);
-  return sd;
-}
-
-int
-udp_eNB_send_to(
-  int sd,
-  uint16_t port,
-  uint32_t address,
-  const uint8_t *buffer,
-  uint32_t length)
-{
-  struct sockaddr_in to;
-  socklen_t          to_length;
-
-  if (sd <= 0 || ((buffer == NULL) && (length > 0))) {
-    LOG_E(UDP_, "udp_send_to: bad param\n");
-    return -1;
-  }
-
-  memset(&to, 0, sizeof(struct sockaddr_in));
-  to_length = sizeof(to);
-
-  to.sin_family      = AF_INET;
-  to.sin_port        = htons(port);
-  to.sin_addr.s_addr = address;
-
-  if (sendto(sd, (void *)buffer, (size_t)length, 0, (struct sockaddr *)&to,
-             to_length) < 0) {
-    LOG_E(UDP_,
-          "[SD %d] Failed to send data to "IPV4_ADDR" on port %d, buffer size %u\n",
-          sd, IPV4_ADDR_FORMAT(address), port, length);
-    return -1;
-  }
-
-#if defined(LOG_UDP) && LOG_UDP > 0
-  LOG_I(UDP_, "[SD %d] Successfully sent to "IPV4_ADDR
-        " on port %d, buffer size %u, buffer address %x\n",
-        sd, IPV4_ADDR_FORMAT(address), port, length, buffer);
-#endif
-  return 0;
-}
-
-
-void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP)
-{
-  uint8_t                   l_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
-  int                n;
-  socklen_t          from_len;
-  struct sockaddr_in addr;
-  MessageDef               *message_p        = NULL;
-  udp_data_ind_t           *udp_data_ind_p   = NULL;
-  uint8_t                  *forwarded_buffer = NULL;
-
-  if (1) {
-    from_len = (socklen_t)sizeof(struct sockaddr_in);
-
-    if ((n = recvfrom(udp_sock_pP->sd, l_buffer, sizeof(l_buffer), MSG_TRUNC,
-                      (struct sockaddr *)&addr, &from_len)) < 0) {
-      LOG_E(UDP_, "Recvfrom failed %s\n", strerror(errno));
-      return;
-    } else if (n > sizeof(l_buffer)) {
-      LOG_E(UDP_, "%s(%d). Message truncated. %d\n", __FUNCTION__, __LINE__, n);
-      return;
-    } else if (n == 0) {
-      LOG_W(UDP_, "Recvfrom returned 0\n");
-      return;
-    } else {
-      forwarded_buffer = itti_malloc(TASK_UDP, udp_sock_pP->task_id, n*sizeof(uint8_t));
-      DevAssert(forwarded_buffer != NULL);
-      memcpy(forwarded_buffer, l_buffer, n);
-      message_p = itti_alloc_new_message(TASK_UDP, 0, UDP_DATA_IND);
-      DevAssert(message_p != NULL);
-      udp_data_ind_p = &message_p->ittiMsg.udp_data_ind;
-      udp_data_ind_p->buffer        = forwarded_buffer;
-      udp_data_ind_p->buffer_length = n;
-      udp_data_ind_p->peer_port     = htons(addr.sin_port);
-      udp_data_ind_p->peer_address  = addr.sin_addr.s_addr;
-
-#if defined(LOG_UDP) && LOG_UDP > 0
-      LOG_I(UDP_, "Msg of length %d received from %s:%u\n",
-            n, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
-#endif
-
-      /* TODO: this is a hack. Let's accept failures and do nothing when
-       * it happens. Since itti_send_msg_to_task crashes when the message
-       * queue is full we wrote itti_try_send_msg_to_task that returns -1
-       * if the queue is full.
-       */
-      /* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */
-      if (itti_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) {
-        LOG_E(UDP_, "Failed to send message %d to task %d\n",
-              UDP_DATA_IND,
-              udp_sock_pP->task_id);
-        itti_free(TASK_UDP, message_p);
-        itti_free(TASK_UDP, forwarded_buffer);
-        return;
-      }
-    }
-  }
-
-  //close(udp_sock_p->sd);
-  //udp_sock_p->sd = -1;
-
-  //pthread_mutex_lock(&udp_socket_list_mutex);
-  //STAILQ_REMOVE(&udp_socket_list, udp_sock_p, udp_socket_desc_s, entries);
-  //pthread_mutex_unlock(&udp_socket_list_mutex);
-}
-
-
-void *udp_eNB_task(void *args_p)
-{
-  int                 nb_events;
-  struct epoll_event *events;
-  MessageDef         *received_message_p    = NULL;
-  //const char         *msg_name = NULL;
-  //instance_t          instance  = 0;
-  udp_enb_init();
-
-  itti_mark_task_ready(TASK_UDP);
-  MSC_START_USE();
-
-  while(1) {
-    itti_receive_msg(TASK_UDP, &received_message_p);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UDP_ENB_TASK, VCD_FUNCTION_IN);
-#if defined(LOG_UDP) && LOG_UDP > 0
-    LOG_D(UDP_, "Got message %p\n", &received_message_p);
-#endif
-
-    if (received_message_p != NULL) {
-
-      //msg_name = ITTI_MSG_NAME (received_message_p);
-      //instance = ITTI_MSG_DESTINATION_INSTANCE (received_message_p);
-
-      switch (ITTI_MSG_ID(received_message_p)) {
-      case UDP_INIT: {
-        LOG_D(UDP_, "Received UDP_INIT\n");
-        udp_init_t *udp_init_p;
-        udp_init_p = &received_message_p->ittiMsg.udp_init;
-        udp_eNB_create_socket(
-          udp_init_p->port,
-          udp_init_p->address,
-          ITTI_MSG_ORIGIN_ID(received_message_p));
-      }
-      break;
-
-      case UDP_DATA_REQ: {
-#if defined(LOG_UDP) && LOG_UDP > 0
-        LOG_D(UDP_, "Received UDP_DATA_REQ\n");
-#endif
-        int     udp_sd = -1;
-        ssize_t bytes_written;
-
-        struct udp_socket_desc_s *udp_sock_p = NULL;
-        udp_data_req_t           *udp_data_req_p;
-        struct sockaddr_in        peer_addr;
-
-        udp_data_req_p = &received_message_p->ittiMsg.udp_data_req;
-
-        memset(&peer_addr, 0, sizeof(struct sockaddr_in));
-
-        peer_addr.sin_family       = AF_INET;
-        peer_addr.sin_port         = htons(udp_data_req_p->peer_port);
-        peer_addr.sin_addr.s_addr  = udp_data_req_p->peer_address;
-
-        pthread_mutex_lock(&udp_socket_list_mutex);
-        udp_sock_p = udp_eNB_get_socket_desc(ITTI_MSG_ORIGIN_ID(received_message_p));
-
-        if (udp_sock_p == NULL) {
-          LOG_E(UDP_,
-                "Failed to retrieve the udp socket descriptor "
-                "associated with task %d\n",
-                ITTI_MSG_ORIGIN_ID(received_message_p));
-          pthread_mutex_unlock(&udp_socket_list_mutex);
-
-          if (udp_data_req_p->buffer) {
-            itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_req_p->buffer);
-          }
-
-          goto on_error;
-        }
-
-        udp_sd = udp_sock_p->sd;
-        pthread_mutex_unlock(&udp_socket_list_mutex);
-
-//#if defined(LOG_UDP) && LOG_UDP > 0
-        LOG_D(UDP_, "[%d] Sending message of size %u to "IPV4_ADDR" and port %u\n",
-              udp_sd,
-              udp_data_req_p->buffer_length,
-              IPV4_ADDR_FORMAT(udp_data_req_p->peer_address),
-              udp_data_req_p->peer_port);
-//#endif
-        bytes_written = sendto(
-                          udp_sd,
-                          &udp_data_req_p->buffer[udp_data_req_p->buffer_offset],
-                          udp_data_req_p->buffer_length,
-                          0,
-                          (struct sockaddr *)&peer_addr,
-                          sizeof(struct sockaddr_in));
-
-        if (bytes_written != udp_data_req_p->buffer_length) {
-          LOG_E(UDP_, "There was an error while writing to socket %d rc %zd"
-                "(%d:%s) May be normal if GTPU kernel module loaded on same host (may NF_DROP IP packet)\n",
-                udp_sd, bytes_written, errno, strerror(errno));
-        }
-
-        itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_req_p->buffer);
-      }
-      break;
-
-      case TERMINATE_MESSAGE: {
-        LOG_W(UDP_, " *** Exiting UDP thread\n");
-        itti_exit_task();
-      }
-      break;
-
-      case MESSAGE_TEST: {
-      } break;
-
-      default: {
-        LOG_W(UDP_, "Unkwnon message ID %d:%s\n",
-              ITTI_MSG_ID(received_message_p),
-              ITTI_MSG_NAME(received_message_p));
-      }
-      break;
-      }
-
-on_error:
-      itti_free (ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
-      received_message_p = NULL;
-    }
-
-    nb_events = itti_get_events(TASK_UDP, &events);
-
-    /* Now handle notifications for other sockets */
-    if (nb_events > 0) {
-#if defined(LOG_UDP) && LOG_UDP > 0
-      LOG_D(UDP_, "UDP task Process %d events\n",nb_events);
-#endif
-      udp_eNB_process_file_descriptors(events, nb_events);
-    }
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UDP_ENB_TASK, VCD_FUNCTION_OUT);
-  }
-
-  LOG_I(UDP_, "Task UDP eNB exiting\n");
-  return NULL;
-}
-
-int udp_enb_init(void)
-{
-  LOG_I(UDP_, "Initializing UDP task interface\n");
-  STAILQ_INIT(&udp_socket_list);
-  LOG_I(UDP_, "Initializing UDP task interface: DONE\n");
-  return 0;
-}
diff --git a/openair3/UDP/udp_eNB_task.h b/openair3/UDP/udp_eNB_task.h
deleted file mode 100644
index 8b783f7455c08f6aec5a0d80788b51746a9feb51..0000000000000000000000000000000000000000
--- a/openair3/UDP/udp_eNB_task.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-/*! \file udp_eNB_task.h
-* \brief
-* \author Sebastien ROUX, Lionel Gauthier
-* \company Eurecom
-* \email: lionel.gauthier@eurecom.fr
-*/
-#include <pthread.h>
-#include <stdint.h>
-
-#ifndef UDP_ENB_TASK_H_
-#define UDP_ENB_TASK_H_
-#include "enb_config.h"
-
-
-/** \brief UDP recv callback prototype. Will be called every time a payload is
- *  received on socket.
- *  \param port Port on which data had been received
- *  \param address Sender Ipv4 address
- *  \param buffer Pointer to data (should be freed by user)
- *  \param length Length of message received
- *  \param arg_p User provided argument (transparent for wrappers)
- *  @returns Execution result
- */
-typedef int (*udp_recv_callback)(uint16_t  port,
-                                 uint32_t  address,
-                                 uint8_t  *buffer,
-                                 uint32_t  length,
-                                 void     *arg_p);
-
-typedef struct {
-  int       sd;              /* Socket descriptor to use */
-  pthread_t listener_thread; /* Thread affected to recv */
-  char     *local_address;   /* Local ipv4 address to use */
-  uint16_t  local_port;      /* Local port to use */
-  task_id_t task_id;         /* Task who has requested the new endpoint */
-} udp_data_t;
-
-/** \brief Create new datagram connection-less socket and create new thread
- *  for data in downstream.
- *  \param ip_addr Local IPv4 address to use
- *  \param port Local port to use
- *  \param udp_data_p
- *  \param recv_callback Pointer to data (should be freed by user)
- *  \param arg_p Optionnal argument to pass to recv_callback
- *  @returns < 0 on failure or socket descriptor on success
- */
-int udp_create_connection(char *ip_addr, uint16_t port,
-                          udp_data_t *udp_data_p,
-                          udp_recv_callback recv_callback,
-                          void *arg_p);
-
-/** \brief Send buffer to remote peer.
- *  \param sd socket descriptor to use
- *  \param port remote port
- *  \param address remote address
- *  \param buffer Data buffer to send
- *  \param length Buffer length
- *  @returns < 0 on failure or socket descriptor on success
- */
-int udp_send_to(int sd, uint16_t port, uint32_t address,
-                const uint8_t *buffer, uint32_t length);
-
-
-/** \brief UDP ITTI task on eNB.
- *  \param args_p
- *  @returns always NULL
- */
-void *udp_eNB_task(void *args_p);
-
-/** \brief init UDP layer.
- *  \param enb_config_p configuration of eNB
- *  @returns always 0
- */
-int udp_enb_init(void);
-
-#endif /* UDP_ENB_TASK_H_ */
diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp
index 64146bc7cac61caaf12b19a46629288f12ba16e2..cc41de3550bb701e3b04cf09733aab6fb96dc347 100644
--- a/openair3/ocp-gtpu/gtp_itf.cpp
+++ b/openair3/ocp-gtpu/gtp_itf.cpp
@@ -46,7 +46,7 @@ typedef struct Gtpv1uMsgHeader {
 #define GTP_GPDU                                             (255)
 
 
-typedef struct ocp_gtpv1u_bearer_s {
+typedef struct gtpv1u_bearer_s {
   /* TEID used in dl and ul */
   teid_t          teid_incoming;                ///< eNB TEID
   teid_t          teid_outgoing;                ///< Remote TEID
@@ -55,10 +55,10 @@ typedef struct ocp_gtpv1u_bearer_s {
   tcp_udp_port_t  outgoing_port;
   uint16_t        seqNum;
   uint8_t         npduNum;
-} ocp_gtpv1u_bearer_t;
+} gtpv1u_bearer_t;
 
 typedef struct {
-  map<int, ocp_gtpv1u_bearer_t> bearers;
+  map<int, gtpv1u_bearer_t> bearers;
 } teidData_t;
 
 typedef struct {
@@ -79,7 +79,7 @@ class gtpEndPoint {
   // this allow using non standard gtp port number (different from 2152)
   // and so, for example tu run 4G and 5G cores on one system
   tcp_udp_port_t get_dstport() {
-	  return (tcp_udp_port_t)atol(addr.destinationService);
+    return (tcp_udp_port_t)atol(addr.destinationService);
   }
 };
 
@@ -106,10 +106,10 @@ instance_t legacyInstanceMapping=0;
 #define compatInst(a) ((a)==0 || (a)==INSTANCE_DEFAULT?legacyInstanceMapping:a)
 
 #define GTPV1U_HEADER_SIZE                                  (8)
-  
-  
-  static int gtpv1uCreateAndSendMsg(int h, uint32_t peerIp, uint16_t peerPort, int msgType, teid_t teid, uint8_t *Msg,int msgLen,
-                                   bool seqNumFlag, bool  npduNumFlag, bool extHdrFlag, int seqNum, int npduNum, int extHdrType) {
+
+
+static int gtpv1uCreateAndSendMsg(int h, uint32_t peerIp, uint16_t peerPort, int msgType, teid_t teid, uint8_t *Msg,int msgLen,
+                                  bool seqNumFlag, bool  npduNumFlag, bool extHdrFlag, int seqNum, int npduNum, int extHdrType) {
   AssertFatal(extHdrFlag==false,"Not developped");
   int headerAdditional=0;
 
@@ -149,6 +149,7 @@ instance_t legacyInstanceMapping=0;
   to.sin_addr.s_addr = peerIp ;
   LOG_D(GTPU,"sending packet size: %d to %s\n",fullSize, inet_ntoa(to.sin_addr) );
   int ret;
+
   if ((ret=sendto(h, (void *)buffer, (size_t)fullSize, 0,(struct sockaddr *)&to, sizeof(to) )) != fullSize ) {
     LOG_E(GTPU, "[SD %d] Failed to send data to " IPV4_ADDR " on port %d, buffer size %u, ret: %d, errno: %d\n",
           h, IPV4_ADDR_FORMAT(peerIp), peerPort, fullSize, ret, errno);
@@ -173,7 +174,7 @@ static void gtpv1uSend(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req, b
     return;
   }
 
-  map<int, ocp_gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(rab_id);
+  map<int, gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(rab_id);
 
   if ( ptr2 == ptrRnti->second.bearers.end() ) {
     LOG_E(GTPU,"[%ld] GTP-U instance: sending a packet to a non existant RNTI:RAB: %x/%x\n", instance, rnti, rab_id);
@@ -191,12 +192,12 @@ static void gtpv1uSend(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req, b
     ptr2->second.npduNum++;
 
   // copy to release the mutex
-  ocp_gtpv1u_bearer_t tmp=ptr2->second;
+  gtpv1u_bearer_t tmp=ptr2->second;
   pthread_mutex_unlock(&globGtp.gtp_lock);
   gtpv1uCreateAndSendMsg(compatInst(instance),
                          tmp.outgoing_ip_addr,
                          tmp.outgoing_port,
-			 GTP_GPDU,
+                         GTP_GPDU,
                          tmp.teid_outgoing,
                          buffer, length, seqNumFlag, npduNumFlag, false, tmp.seqNum, tmp.npduNum, 0) ;
 }
@@ -216,7 +217,7 @@ static void gtpv1uSend2(instance_t instance, gtpv1u_gnb_tunnel_data_req_t *req,
     return;
   }
 
-  map<int, ocp_gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(rab_id);
+  map<int, gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(rab_id);
 
   if ( ptr2 == ptrRnti->second.bearers.end() ) {
     LOG_D(GTPU,"GTP-U instance: %ld sending a packet to a non existant RNTI:RAB: %x/%x\n", instance, rnti, rab_id);
@@ -234,12 +235,12 @@ static void gtpv1uSend2(instance_t instance, gtpv1u_gnb_tunnel_data_req_t *req,
     ptr2->second.npduNum++;
 
   // copy to release the mutex
-  ocp_gtpv1u_bearer_t tmp=ptr2->second;
+  gtpv1u_bearer_t tmp=ptr2->second;
   pthread_mutex_unlock(&globGtp.gtp_lock);
   gtpv1uCreateAndSendMsg(compatInst(instance),
                          tmp.outgoing_ip_addr,
                          tmp.outgoing_port,
-			 GTP_GPDU,
+                         GTP_GPDU,
                          tmp.teid_outgoing,
                          buffer, length, seqNumFlag, npduNumFlag, false, tmp.seqNum, tmp.npduNum, 0) ;
 }
@@ -257,7 +258,7 @@ static void gtpv1uEndTunnel(instance_t instance, gtpv1u_enb_tunnel_data_req_t *r
     return;
   }
 
-  map<int, ocp_gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(rab_id);
+  map<int, gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(rab_id);
 
   if ( ptr2 == ptrRnti->second.bearers.end() ) {
     LOG_E(GTPU,"[%ld] GTP-U sending a packet to a non existant RNTI:RAB: %x/%x\n", instance, rnti, rab_id);
@@ -267,7 +268,7 @@ static void gtpv1uEndTunnel(instance_t instance, gtpv1u_enb_tunnel_data_req_t *r
 
   LOG_D(GTPU,"[%ld] sending a end packet packet to RNTI:RAB:teid %x/%x/%x\n",
         instance, rnti, rab_id,ptr2->second.teid_outgoing);
-  ocp_gtpv1u_bearer_t tmp=ptr2->second;
+  gtpv1u_bearer_t tmp=ptr2->second;
   pthread_mutex_unlock(&globGtp.gtp_lock);
   Gtpv1uMsgHeaderT  msgHdr;
   // N should be 0 for us (it was used only in 2G and 3G)
@@ -309,6 +310,7 @@ static  int udpServerSocket(openAddr_s addr) {
     LOG_E(GTPU,"getaddrinfo error: %s\n", gai_strerror(status));
     return -1;
   }
+
   int sockfd=-1;
 
   // loop through all the results and bind to the first we can
@@ -383,12 +385,12 @@ static  int udpServerSocket(openAddr_s addr) {
   return sockfd;
 }
 
-instance_t ocp_gtpv1Init(openAddr_t context) {
+instance_t gtpv1Init(openAddr_t context) {
   pthread_mutex_lock(&globGtp.gtp_lock);
   int id=udpServerSocket(context);
 
   if (id>=0) {
-    itti_subscribe_event_fd(OCP_GTPV1_U, id);
+    itti_subscribe_event_fd(TASK_GTPV1_U, id);
   } else
     LOG_E(GTPU,"can't create GTP-U instance\n");
 
@@ -408,7 +410,7 @@ void GtpuUpdateTunnelOutgoingTeid(instance_t instance, rnti_t rnti, ebi_t bearer
     return;
   }
 
-  map<int, ocp_gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(bearer_id);
+  map<int, gtpv1u_bearer_t>::iterator ptr2=ptrRnti->second.bearers.find(bearer_id);
 
   if ( ptr2 == ptrRnti->second.bearers.end() ) {
     LOG_E(GTPU,"[%ld] Update tunnel for a existing rnti %x, but wrong bearer_id %u\n", instance, rnti, bearer_id);
@@ -447,7 +449,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
 
   inst->te2ue_mapping[incoming_teid].callBack=callBack;
 
-  ocp_gtpv1u_bearer_t *tmp=&inst->ue2te_mapping[rnti].bearers[outgoing_bearer_id];
+  gtpv1u_bearer_t *tmp=&inst->ue2te_mapping[rnti].bearers[outgoing_bearer_id];
 
   int addrs_length_in_bytes = remoteAddr.length / 8;
 
@@ -487,21 +489,21 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
   return incoming_teid;
 }
 
-int ocp_gtpv1u_create_s1u_tunnel(instance_t instance,
-                                 const gtpv1u_enb_create_tunnel_req_t  *create_tunnel_req,
-                                 gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp) {
+int gtpv1u_create_s1u_tunnel(instance_t instance,
+                             const gtpv1u_enb_create_tunnel_req_t  *create_tunnel_req,
+                             gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp) {
   LOG_D(GTPU, "[%ld] Start create tunnels for RNTI %x, num_tunnels %d, sgw_S1u_teid %x\n",
         instance,
         create_tunnel_req->rnti,
         create_tunnel_req->num_tunnels,
         create_tunnel_req->sgw_S1u_teid[0]);
   tcp_udp_port_t dstport=globGtp.instances[compatInst(instance)].get_dstport();
+
   for (int i = 0; i < create_tunnel_req->num_tunnels; i++) {
     AssertFatal(create_tunnel_req->eps_bearer_id[i] > 4,
                 "From legacy code not clear, seems impossible (bearer=%d)\n",
                 create_tunnel_req->eps_bearer_id[i]);
     int incoming_rb_id=create_tunnel_req->eps_bearer_id[i]-4;
-
     teid_t teid=newGtpuCreateTunnel(compatInst(instance), create_tunnel_req->rnti,
                                     incoming_rb_id,
                                     create_tunnel_req->eps_bearer_id[i],
@@ -521,7 +523,7 @@ int ocp_gtpv1u_create_s1u_tunnel(instance_t instance,
   return !GTPNOK;
 }
 
-int ocp_gtpv1u_update_s1u_tunnel(
+int gtpv1u_update_s1u_tunnel(
   const instance_t                              instance,
   const gtpv1u_enb_create_tunnel_req_t *const  create_tunnel_req,
   const rnti_t                                  prior_rnti
@@ -546,7 +548,7 @@ int ocp_gtpv1u_update_s1u_tunnel(
     LOG_W(GTPU,"[%ld] Update a not existing tunnel, start create the new one (new rnti %x, old rnti %x)\n", instance, create_tunnel_req->rnti, prior_rnti);
     pthread_mutex_unlock(&globGtp.gtp_lock);
     gtpv1u_enb_create_tunnel_resp_t tmp;
-    (void)ocp_gtpv1u_create_s1u_tunnel(instance, create_tunnel_req, &tmp);
+    (void)gtpv1u_create_s1u_tunnel(instance, create_tunnel_req, &tmp);
     return 0;
   }
 
@@ -565,11 +567,12 @@ int gtpv1u_create_ngu_tunnel(  const instance_t instance,
         create_tunnel_req->num_tunnels,
         create_tunnel_req->outgoing_teid[0]);
   tcp_udp_port_t dstport=globGtp.instances[compatInst(instance)].get_dstport();
+
   for (int i = 0; i < create_tunnel_req->num_tunnels; i++) {
     teid_t teid=newGtpuCreateTunnel(instance, create_tunnel_req->rnti,
                                     create_tunnel_req->incoming_rb_id[i],
                                     create_tunnel_req->pdusession_id[i],
-				    create_tunnel_req->outgoing_teid[i],
+                                    create_tunnel_req->outgoing_teid[i],
                                     create_tunnel_req->dst_addr[i], dstport,
                                     sdap_gnb_data_req);
     create_tunnel_resp->status=0;
@@ -593,14 +596,14 @@ int gtpv1u_update_ngu_tunnel(
   return GTPNOK;
 }
 
-int ocp_gtpv1u_create_x2u_tunnel(
+int gtpv1u_create_x2u_tunnel(
   const instance_t instanceP,
   const gtpv1u_enb_create_x2u_tunnel_req_t   *const create_tunnel_req_pP,
   gtpv1u_enb_create_x2u_tunnel_resp_t *const create_tunnel_resp_pP) {
   AssertFatal( false, "to be developped\n");
 }
 
-int newGtpuDeleteTunnel(instance_t instance, rnti_t rnti) {
+int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
   LOG_D(GTPU, "[%ld] Start delete tunnels for RNTI %x\n",
         instance, rnti);
   pthread_mutex_lock(&globGtp.gtp_lock);
@@ -630,24 +633,64 @@ int newGtpuDeleteTunnel(instance_t instance, rnti_t rnti) {
 
 // Legacy delete tunnel finish by deleting all the rnti
 // so the list of bearer provided is only a design bug
-int ocp_gtpv1u_delete_s1u_tunnel( const instance_t instance,
-                                  const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
-  return  newGtpuDeleteTunnel(instance, req_pP->rnti);
+int gtpv1u_delete_s1u_tunnel( const instance_t instance,
+                              const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+  return  newGtpuDeleteAllTunnels(instance, req_pP->rnti);
+}
+
+int newGtpuDeleteTunnels(instance_t instance, rnti_t rnti, int nbTunnels, pdusessionid_t *pdusession_id) {
+  LOG_D(GTPU, "[%ld] Start delete tunnels for RNTI %x\n",
+        instance, rnti);
+  pthread_mutex_lock(&globGtp.gtp_lock);
+  auto inst=&globGtp.instances[compatInst(instance)];
+  auto ptrRNTI=inst->ue2te_mapping.find(rnti);
+
+  if ( ptrRNTI == inst->ue2te_mapping.end() ) {
+    LOG_W(GTPU,"[%ld] Delete GTP tunnels for rnti: %x, but no tunnel exits\n", instance, rnti);
+    pthread_mutex_unlock(&globGtp.gtp_lock);
+    return -1;
+  }
+
+  int nb=0;
+
+  for (int i=0; i<nbTunnels; i++) {
+    auto ptr2=ptrRNTI->second.bearers.find(pdusession_id[i]);
+
+    if ( ptr2 == ptrRNTI->second.bearers.end() ) {
+      LOG_E(GTPU,"[%ld] GTP-U instance: delete of not existing tunnel RNTI:RAB: %x/%x\n", instance, rnti,pdusession_id[i]);
+    } else {
+      inst->te2ue_mapping.erase(ptr2->second.teid_incoming);
+      nb++;
+    }
+  }
+
+  if (ptrRNTI->second.bearers.size() == 0 )
+    // no tunnels on this rnti, erase the ue entry
+    inst->ue2te_mapping.erase(ptrRNTI);
+
+  pthread_mutex_unlock(&globGtp.gtp_lock);
+  LOG_I(GTPU, "[%ld] Deleted all tunnels for RNTI %x (%d tunnels deleted)\n", instance, rnti, nb);
+  return !GTPNOK;
 }
 
 int gtpv1u_delete_x2u_tunnel( const instance_t instanceP,
-                              const gtpv1u_enb_delete_tunnel_req_t *const req_pP,
-                              int enbflag) {
+                              const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
+  LOG_E(GTPU,"x2 tunnel not implemented\n");
   return 0;
 }
 
+int gtpv1u_delete_ngu_tunnel( const instance_t instance,
+                              gtpv1u_gnb_delete_tunnel_req_t *req) {
+  return  newGtpuDeleteTunnels(instance, req->rnti, req->num_pdusession, req->pdusession_id);
+}
+
 static int Gtpv1uHandleEchoReq(int h,
                                uint8_t *msgBuf,
                                uint32_t msgBufLen,
                                uint16_t peerPort,
                                uint32_t peerIp) {
   Gtpv1uMsgHeaderT      *msgHdr = (Gtpv1uMsgHeaderT *) msgBuf;
-   
+
   if ( msgHdr->version != 1 ||  msgHdr->PT != 1 ) {
     LOG_E(GTPU, "[%d] Received a packet that is not GTP header\n", h);
     return GTPNOK;
@@ -658,14 +701,12 @@ static int Gtpv1uHandleEchoReq(int h,
     return GTPNOK;
   }
 
-  uint16_t seq=ntohs(*(uint16_t*)(msgHdr+1));
+  uint16_t seq=ntohs(*(uint16_t *)(msgHdr+1));
   LOG_D(GTPU, "[%d] Received a echo request, TEID: %d, seq: %hu\n", h, msgHdr->teid, seq);
-  uint8_t recovery[2]={14,0};
-  
+  uint8_t recovery[2]= {14,0};
   return gtpv1uCreateAndSendMsg(h, peerIp, peerPort, GTP_ECHO_RSP, ntohl(msgHdr->teid),
-			 recovery, sizeof recovery,
-			 1, 0, 0, seq, 0, 0);
-
+                                recovery, sizeof recovery,
+                                1, 0, 0, seq, 0, 0);
 }
 
 static int Gtpv1uHandleError(int h,
@@ -871,14 +912,14 @@ void gtpv1uReceiver(int h) {
 
 #include <openair2/ENB_APP/enb_paramdef.h>
 
-void *ocp_gtpv1uTask(void *args)  {
+void *gtpv1uTask(void *args)  {
   while(1) {
     /* Trying to fetch a message from the message queue.
        If the queue is empty, this function will block till a
        message is sent to the task.
     */
     MessageDef *message_p = NULL;
-    itti_receive_msg(OCP_GTPV1_U, &message_p);
+    itti_receive_msg(TASK_GTPV1_U, &message_p);
 
     if (message_p != NULL ) {
       openAddr_t addr= {0};
@@ -888,7 +929,7 @@ void *ocp_gtpv1uTask(void *args)  {
         case GTPV1U_ENB_TUNNEL_DATA_REQ: {
           gtpv1uSend(compatInst(ITTI_MSG_DESTINATION_INSTANCE(message_p)),
                      &GTPV1U_ENB_TUNNEL_DATA_REQ(message_p), false, false);
-          itti_free(OCP_GTPV1_U, GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer);
+          itti_free(TASK_GTPV1_U, GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer);
         }
         break;
 
@@ -908,7 +949,7 @@ void *ocp_gtpv1uTask(void *args)  {
         case GTPV1U_ENB_END_MARKER_REQ:
           gtpv1uEndTunnel(compatInst(ITTI_MSG_DESTINATION_INSTANCE(message_p)),
                           &GTPV1U_ENB_TUNNEL_DATA_REQ(message_p));
-          itti_free(OCP_GTPV1_U, GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer);
+          itti_free(TASK_GTPV1_U, GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer);
           break;
 
         case GTPV1U_ENB_DATA_FORWARDING_REQ:
@@ -923,7 +964,7 @@ void *ocp_gtpv1uTask(void *args)  {
           strcpy(addr.originHost, GTPV1U_REQ(message_p).localAddrStr);
           strcpy(addr.originService, GTPV1U_REQ(message_p).localPortStr);
           strcpy(addr.destinationService,addr.originService);
-          AssertFatal((legacyInstanceMapping=ocp_gtpv1Init(addr))!=0,"Instance 0 reserved for legacy\n");
+          AssertFatal((legacyInstanceMapping=gtpv1Init(addr))!=0,"Instance 0 reserved for legacy\n");
           break;
 
         default:
@@ -932,12 +973,12 @@ void *ocp_gtpv1uTask(void *args)  {
           break;
       }
 
-      AssertFatal(EXIT_SUCCESS==itti_free(OCP_GTPV1_U, message_p), "Failed to free memory!\n");
+      AssertFatal(EXIT_SUCCESS==itti_free(TASK_GTPV1_U, message_p), "Failed to free memory!\n");
     }
 
     struct epoll_event *events;
 
-    int nb_events = itti_get_events(OCP_GTPV1_U, &events);
+    int nb_events = itti_get_events(TASK_GTPV1_U, &events);
 
     for (int i = 0; i < nb_events; i++)
       if ((events[i].events&EPOLLIN))
diff --git a/openair3/ocp-gtpu/gtp_itf.h b/openair3/ocp-gtpu/gtp_itf.h
index 3893acf40f0416b98b153b70e9b6153d79d49b09..ba6cf0f8bb98e3da99af0e7c4162c5fe2ffb731d 100644
--- a/openair3/ocp-gtpu/gtp_itf.h
+++ b/openair3/ocp-gtpu/gtp_itf.h
@@ -8,19 +8,6 @@
 extern "C" {
 #endif
 
-#include <openair3/GTPV1-U/gtpv1u_eNB_defs.h>
-#if defined(NEW_GTPU)
-#define gtpv1u_create_s1u_tunnel ocp_gtpv1u_create_s1u_tunnel
-#define gtpv1u_update_s1u_tunnel ocp_gtpv1u_update_s1u_tunnel
-#define gtpv1u_delete_s1u_tunnel ocp_gtpv1u_delete_s1u_tunnel
-#define gtpv1u_create_x2u_tunnel ocp_gtpv1u_create_x2u_tunnel
-#define gtpv1u_eNB_task          ocp_gtpv1uTask
-#define nr_gtpv1u_gNB_task       ocp_gtpv1uTask
-#define TASK_VARIABLE            OCP_GTPV1_U
-#else
-#define TASK_VARIABLE            TASK_GTPV1_U
-#endif
-
 typedef boolean_t (*gtpCallback)(
   protocol_ctxt_t  *ctxt_pP,
   const srb_flag_t     srb_flagP,
@@ -32,7 +19,7 @@ typedef boolean_t (*gtpCallback)(
   const pdcp_transmission_mode_t modeP,
   const uint32_t *sourceL2Id,
   const uint32_t *destinationL2Id);
-  
+
 typedef struct openAddr_s {
   char originHost[HOST_NAME_MAX];
   char originService[HOST_NAME_MAX];
@@ -43,18 +30,18 @@ typedef struct openAddr_s {
 
 // the init function create a gtp instance and return the gtp instance id
 // the parameter originInstance will be sent back in each message from gtp to the creator
-void ocp_gtpv1uReceiver(int h);
-void ocp_gtpv1uProcessTimeout(int handle,void *arg);
-int ocp_gtpv1u_create_s1u_tunnel(const instance_t instance, const gtpv1u_enb_create_tunnel_req_t  *create_tunnel_req,
-                                 gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp);
-int ocp_gtpv1u_update_s1u_tunnel(const instance_t instanceP,
-                                 const gtpv1u_enb_create_tunnel_req_t   *create_tunnel_req_pP,
-                                 const rnti_t prior_rnti
-                                );
-int ocp_gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
+void gtpv1uReceiver(int h);
+void gtpv1uProcessTimeout(int handle,void *arg);
+int gtpv1u_create_s1u_tunnel(const instance_t instance, const gtpv1u_enb_create_tunnel_req_t  *create_tunnel_req,
+                             gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp);
+int gtpv1u_update_s1u_tunnel(const instance_t instanceP,
+                             const gtpv1u_enb_create_tunnel_req_t   *create_tunnel_req_pP,
+                             const rnti_t prior_rnti
+                            );
+int gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
 int gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
 
-int ocp_gtpv1u_create_x2u_tunnel(
+int gtpv1u_create_x2u_tunnel(
   const instance_t instanceP,
   const gtpv1u_enb_create_x2u_tunnel_req_t   *const create_tunnel_req_pP,
   gtpv1u_enb_create_x2u_tunnel_resp_t *const create_tunnel_resp_pP);
@@ -64,8 +51,10 @@ int ocp_gtpv1u_create_x2u_tunnel(
 teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer_id, int outgoing_rb_id, teid_t teid,
                            transport_layer_addr_t remoteAddr, int port, gtpCallback callBack);
 void GtpuUpdateTunnelOutgoingTeid(instance_t instance, rnti_t rnti, ebi_t bearer_id, teid_t newOutgoingTeid);
-instance_t ocp_gtpv1Init(openAddr_t context);
-void *ocp_gtpv1uTask(void *args);
+int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti);
+int newGtpuDeleteTunnels(instance_t instance, rnti_t rnti, int nbTunnels, pdusessionid_t *pdusession_id);
+instance_t gtpv1Init(openAddr_t context);
+void *gtpv1uTask(void *args);
 
 #ifdef __cplusplus
 }
diff --git a/openair3/GTPV1-U/gtpv1u_eNB_defs.h b/openair3/ocp-gtpu/gtpv1u_eNB_task.h
similarity index 59%
rename from openair3/GTPV1-U/gtpv1u_eNB_defs.h
rename to openair3/ocp-gtpu/gtpv1u_eNB_task.h
index fb317e4ca6ff8bc7b8e9b4fa28a243d6b6bf6ceb..e764eb143b141b70c00f5b6ab5a32ae80fb84f8b 100644
--- a/openair3/GTPV1-U/gtpv1u_eNB_defs.h
+++ b/openair3/ocp-gtpu/gtpv1u_eNB_task.h
@@ -19,32 +19,23 @@
  *      contact@openairinterface.org
  */
 
-/*! \file gtpv1u_eNB_defs.h
- * \brief
- * \author Sebastien ROUX, Lionel GAUTHIER
- * \version 1.0
- * \company Eurecom
- * \email: lionel.gauthier@eurecom.fr
- */
-
-#include "hashtable.h"
-#include "LTE_asn_constant.h"
+/*! \file gtpv1u_eNB_task.h
+* \brief
+* \author Lionel Gauthier
+* \company Eurecom
+* \email: lionel.gauthier@eurecom.fr
+*/
 
-#ifndef GTPV1U_ENB_DEFS_H_
-#define GTPV1U_ENB_DEFS_H_
+#ifndef GTPV1U_ENB_TASK_H_
+#define GTPV1U_ENB_TASK_H_
 
-#include "NwGtpv1u.h"
+typedef struct gtpv1u_data_s {
+  /* RB tree of UEs */
+  hash_table_t         *ue_mapping;
+} gtpv1u_data_t;
 
-#define GTPV1U_UDP_PORT (2152)
 #define GTPV1U_BEARER_OFFSET 3
-
 #define GTPV1U_MAX_BEARERS_ID     (max_val_LTE_DRB_Identity - GTPV1U_BEARER_OFFSET)
-
-#define GTPV1U_SOURCE_ENB (0)
-#define GTPV1U_TARGET_ENB (1)
-#define GTPV1U_MSG_FROM_SOURCE_ENB (0)
-#define GTPV1U_MSG_FROM_SPGW (1)
-
 typedef enum {
   BEARER_DOWN = 0,
   BEARER_IN_CONFIG,
@@ -54,16 +45,7 @@ typedef enum {
   BEARER_MAX,
 } bearer_state_t;
 
-
-typedef struct gtpv1u_teid_data_s {
-  /* UE identifier for oaisim stack */
-  module_id_t  enb_id;
-  rnti_t       ue_id;
-  ebi_t        eps_bearer_id;
-} gtpv1u_teid_data_t;
-
-
-typedef struct gtpv1u_bearer_s {
+typedef struct fixMe_gtpv1u_bearer_s {
   /* TEID used in dl and ul */
   teid_t          teid_eNB;                ///< eNB TEID
   uintptr_t       teid_eNB_stack_session;  ///< eNB TEID
@@ -71,12 +53,12 @@ typedef struct gtpv1u_bearer_s {
   in_addr_t       sgw_ip_addr;
   struct in6_addr sgw_ip6_addr;
   teid_t          teid_teNB;
-  in_addr_t       tenb_ip_addr;				///< target eNB ipv4
-  struct in6_addr tenb_ip6_addr;				///< target eNB ipv6
+  in_addr_t       tenb_ip_addr;       ///< target eNB ipv4
+  struct in6_addr tenb_ip6_addr;        ///< target eNB ipv6
   tcp_udp_port_t  port;
   //NwGtpv1uStackSessionHandleT stack_session;
   bearer_state_t state;
-} gtpv1u_bearer_t;
+} fixMe_gtpv1u_bearer_t;
 
 typedef struct gtpv1u_ue_data_s {
   /* UE identifier for oaisim stack */
@@ -89,45 +71,43 @@ typedef struct gtpv1u_ue_data_s {
    * Note that the first LCID available for data is 3 and we fixed the maximum
    * number of e-rab per UE to be (32 [id range]), max RB is 11. The real rb id will 3 + rab_id (3..32).
    */
-  gtpv1u_bearer_t bearers[GTPV1U_MAX_BEARERS_ID];
+  fixMe_gtpv1u_bearer_t bearers[GTPV1U_MAX_BEARERS_ID];
 
   //RB_ENTRY(gtpv1u_ue_data_s) gtpv1u_ue_node;
 } gtpv1u_ue_data_t;
+/*
+int
+gtpv1u_new_data_req(
+  uint8_t enb_id,
+  uint8_t ue_id,
+  uint8_t rab_id,
+  uint8_t *buffer,
+  uint32_t buf_len,
+  uint32_t buf_offset);*/
 
-typedef struct gtpv1u_data_s {
-  /* nwgtpv1u stack internal data */
-  NwGtpv1uStackHandleT  gtpv1u_stack;
-
-  /* RB tree of UEs */
-  hash_table_t         *ue_mapping;   // PDCP->GTPV1U
-  hash_table_t         *teid_mapping; // GTPV1U -> PDCP
-
-  //RB_HEAD(gtpv1u_ue_map, gtpv1u_ue_data_s) gtpv1u_ue_map_head;
-  /* Local IP address to use */
-  in_addr_t             enb_ip_address_for_S1u_S12_S4_up;
-  /* UDP internal data */
-  //udp_data_t            udp_data;
-
-  uint16_t              seq_num;
-  uint8_t               restart_counter;
-
-} gtpv1u_data_t;
+int   gtpv1u_eNB_init(void);
+void *gtpv1u_eNB_process_itti_msg(void *);
+void *gtpv1u_eNB_task(void *args);
 
 int
-gtpv1u_new_data_req(
-  uint8_t  enb_module_idP,
-  rnti_t   ue_rntiP,
-  uint8_t  rab_idP,
-  uint8_t *buffer_pP,
-  uint32_t buf_lenP,
-  uint32_t buf_offsetP
-);
+gtpv1u_create_x2u_tunnel(
+  const instance_t instanceP,
+  const gtpv1u_enb_create_x2u_tunnel_req_t   *const create_tunnel_req_pP,
+  gtpv1u_enb_create_x2u_tunnel_resp_t *const create_tunnel_resp_pP);
 
 int
-gtpv1u_initial_req(
-  gtpv1u_data_t *gtpv1u_data_p,
-  uint32_t teid,
-  uint16_t port,
-  uint32_t address);
+gtpv1u_create_s1u_tunnel(
+  const instance_t instanceP,
+  const gtpv1u_enb_create_tunnel_req_t   *const create_tunnel_req_pP,
+  gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP);
 
-#endif /* GTPV1U_ENB_DEFS_H_ */
+int
+gtpv1u_update_s1u_tunnel(
+  const instance_t                              instanceP,
+  const gtpv1u_enb_create_tunnel_req_t *const  create_tunnel_req_pP,
+  const rnti_t                                  prior_rnti);
+
+int gtpv1u_delete_x2u_tunnel(
+  const instance_t                             instanceP,
+  const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
+#endif /* GTPV1U_ENB_TASK_H_ */
diff --git a/openair3/GTPV1-U/gtpv1u_gNB_task.h b/openair3/ocp-gtpu/gtpv1u_gNB_task.h
similarity index 86%
rename from openair3/GTPV1-U/gtpv1u_gNB_task.h
rename to openair3/ocp-gtpu/gtpv1u_gNB_task.h
index fcfaa90304fae93b8094f15af132d81033d86c41..817d0109ba6d7ebc399d7b27060a3f71be45810f 100644
--- a/openair3/GTPV1-U/gtpv1u_gNB_task.h
+++ b/openair3/ocp-gtpu/gtpv1u_gNB_task.h
@@ -37,8 +37,8 @@ void *nr_gtpv1u_gNB_task(void *args);
 int
 gtpv1u_create_ngu_tunnel(
   const instance_t instanceP,
-  const gtpv1u_gnb_create_tunnel_req_t *  const create_tunnel_req_pP,
-        gtpv1u_gnb_create_tunnel_resp_t * const create_tunnel_resp_pP);
+  const gtpv1u_gnb_create_tunnel_req_t   *const create_tunnel_req_pP,
+  gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_pP);
 
 int
 gtpv1u_update_ngu_tunnel(
@@ -47,5 +47,8 @@ gtpv1u_update_ngu_tunnel(
   const rnti_t                                  prior_rnti
 );
 
+int gtpv1u_delete_ngu_tunnel( const instance_t instance,
+                              gtpv1u_gnb_delete_tunnel_req_t *req);
+
 #endif /* GTPV1U_GNB_TASK_H_ */
 
diff --git a/targets/ARCH/COMMON/record_player.c b/targets/ARCH/COMMON/record_player.c
index 522f6b6d166e7aa7a60f28f2e92cd0f28c1772ef..37f985b6b29c4320f7ca417e29df9f71c04c0be9 100644
--- a/targets/ARCH/COMMON/record_player.c
+++ b/targets/ARCH/COMMON/record_player.c
@@ -58,10 +58,9 @@ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_
     // Use mmap for IQ files for systems with less than 6GB total RAM
     sysinfo(&systeminfo);
 
-    if (systeminfo.totalram < 6144000000) {
-      (*recplay_state)->use_mmap = 0;
-    } else {
-      (*recplay_state)->use_mmap = 1;
+    if (systeminfo.totalram < 6144000000 && ((*recplay_conf)->use_mmap == 1)) {
+	  LOG_W(HW,"System with %f GB of mem (<6GB), mmap usage disabled\n",systeminfo.totalram/10E9);
+      (*recplay_conf)->use_mmap = 0;
     }
   } else { /* record player enabled */
     free(*recplay_conf);
diff --git a/targets/ARCH/COMMON/record_player.h b/targets/ARCH/COMMON/record_player.h
index d91da6832308eb8db2dfa949feb39f44a0eaf030..9310355e5b0c4fea9b037ad1b6f16c8a632e1064 100644
--- a/targets/ARCH/COMMON/record_player.h
+++ b/targets/ARCH/COMMON/record_player.h
@@ -78,7 +78,7 @@ typedef struct {
 #define CONFIG_HLP_SF_LOOPS     "Number of loops to replay of the entire subframes file"
 #define CONFIG_HLP_SF_RDELAY    "Delay in microseconds to read a subframe in replay mode"
 #define CONFIG_HLP_SF_WDELAY    "Delay in microseconds to write a subframe in replay mode"
-
+#define CONFIG_HLP_USE_MMAP     "In replay mode, map iq file in memory before replaying"
 /* keyword strings for config options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
 #define CONFIG_OPT_SF_FILE      "subframes-file"
 #define CONFIG_OPT_SF_REC       "subframes-record"
@@ -87,7 +87,7 @@ typedef struct {
 #define CONFIG_OPT_SF_LOOPS     "subframes-loops"
 #define CONFIG_OPT_SF_RDELAY    "subframes-read-delay"
 #define CONFIG_OPT_SF_WDELAY    "subframes-write-delay"
-
+#define CONFIG_OPT_USE_MMAP     "use-mmap"
 #define DEVICE_RECPLAY_SECTION "device.recplay"
 /* For information only - the macro is not usable in C++ */
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
@@ -95,13 +95,14 @@ typedef struct {
 /*   optname                     helpstr                paramflags                      XXXptr                           defXXXval                            type           numelt   */
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define DEVICE_RECPLAY_PARAMS_DESC {  \
-    {CONFIG_OPT_SF_FILE,      CONFIG_HLP_SF_FILE, 0,              strptr:(char **)((*recplay_conf)->u_sf_filename),       defstrval:DEF_SF_FILE,            TYPE_STRING,   1024}, \
-    {CONFIG_OPT_SF_REC,       CONFIG_HLP_SF_REC,  PARAMFLAG_BOOL,   uptr:&(u_sf_record),                                  defuintval:0,                TYPE_UINT,   0}, \
-    {CONFIG_OPT_SF_REP,       CONFIG_HLP_SF_REP,  PARAMFLAG_BOOL,   uptr:&(u_sf_replay),                                  defuintval:0,                TYPE_UINT,   0}, \
+    {CONFIG_OPT_SF_FILE,      CONFIG_HLP_SF_FILE,   0,                strptr:(char **)((*recplay_conf)->u_sf_filename),   defstrval:DEF_SF_FILE,           TYPE_STRING,   1024}, \
+    {CONFIG_OPT_SF_REC,       CONFIG_HLP_SF_REC,    PARAMFLAG_BOOL,   uptr:&(u_sf_record),                                defuintval:0,                    TYPE_UINT,   0}, \
+    {CONFIG_OPT_SF_REP,       CONFIG_HLP_SF_REP,    PARAMFLAG_BOOL,   uptr:&(u_sf_replay),                                defuintval:0,                    TYPE_UINT,   0}, \
     {CONFIG_OPT_SF_MAX,       CONFIG_HLP_SF_MAX,    0,                uptr:&((*recplay_conf)->u_sf_max),                  defintval:DEF_NB_SF,             TYPE_UINT,   0}, \
     {CONFIG_OPT_SF_LOOPS,     CONFIG_HLP_SF_LOOPS,  0,                uptr:&((*recplay_conf)->u_sf_loops),                defintval:DEF_SF_NB_LOOP,        TYPE_UINT,   0}, \
     {CONFIG_OPT_SF_RDELAY,    CONFIG_HLP_SF_RDELAY, 0,                uptr:&((*recplay_conf)->u_sf_read_delay),           defintval:DEF_SF_DELAY_READ,     TYPE_UINT,   0}, \
     {CONFIG_OPT_SF_WDELAY,    CONFIG_HLP_SF_WDELAY, 0,                uptr:&((*recplay_conf)->u_sf_write_delay),          defintval:DEF_SF_DELAY_WRITE,    TYPE_UINT,   0}, \
+    {CONFIG_OPT_USE_MMAP,     CONFIG_HLP_USE_MMAP,  PARAMFLAG_BOOL,   uptr:&((*recplay_conf)->use_mmap),                  defuintval:1,                    TYPE_UINT,   0}, \
   }/*! \brief Record Player Configuration and state */
 typedef struct {
   char            u_sf_filename[1024];              // subframes file path
@@ -109,10 +110,10 @@ typedef struct {
   unsigned int    u_sf_loops ;           // number of loops in replay mode
   unsigned int    u_sf_read_delay;   // read delay in replay mode
   unsigned int    u_sf_write_delay ; // write delay in replay mode
+  unsigned int    use_mmap; // default is to use mmap
 } recplay_conf_t;
 
 typedef struct {
-  int             use_mmap; // default is to use mmap
   size_t          mapsize;
   FILE            *pFile;
   int             fd;
diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
index d268855566715b99636341b7cc666fcce96a162f..e3b06a6438fad53764ca1d519264413d740b6cd6 100644
--- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
@@ -648,57 +648,56 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
        AssertFatal(1==0,"Shouldn't be here\n");
   }
 
-    samples_received=0;
-    while (samples_received != nsamps) {
+  samples_received=0;
+  while (samples_received != nsamps) {
 
-      if (cc>1) {
+    if (cc>1) {
       // receive multiple channels (e.g. RF A and RF B)
-        std::vector<void *> buff_ptrs;
-
-        for (int i=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received);
+      std::vector<void *> buff_ptrs;
 
-        samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md);
-      } else {
+      for (int i=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received);
+      samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md);
+    } else {
       // receive a single channel (e.g. from connector RF A)
 
-        samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),
-                                               nsamps-samples_received, s->rx_md);
-      }
-      if  ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
-        break;
+      samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),
+                                             nsamps-samples_received, s->rx_md);
+    }
+    if  ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
+      break;
 
-      if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {
-        printf("sleep...\n"); //usleep(100);
-      }
+    if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {
+      printf("sleep...\n"); //usleep(100);
     }
-    if (samples_received == nsamps) s->wait_for_first_pps=0;
+  }
+  if (samples_received == nsamps) s->wait_for_first_pps=0;
 
-    // bring RX data into 12 LSBs for softmodem RX
-    for (int i=0; i<cc; i++) {
-      for (int j=0; j<nsamps2; j++) {
+  // bring RX data into 12 LSBs for softmodem RX
+  for (int i=0; i<cc; i++) {
+    for (int j=0; j<nsamps2; j++) {
 #if defined(__x86_64__) || defined(__i386__)
 #ifdef __AVX2__
-        // FK: in some cases the buffer might not be 32 byte aligned, so we cannot use avx2
+      // FK: in some cases the buffer might not be 32 byte aligned, so we cannot use avx2
 
-        if ((((uintptr_t) buff[i])&0x1F)==0) {
-          ((__m256i *)buff[i])[j] = _mm256_srai_epi16(buff_tmp[i][j],rxshift);
-        } else {
-          ((__m128i *)buff[i])[2*j] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j],rxshift);
-          ((__m128i *)buff[i])[2*j+1] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j+1],rxshift);
-        }
+      if ((((uintptr_t) buff[i])&0x1F)==0) {
+        ((__m256i *)buff[i])[j] = _mm256_srai_epi16(buff_tmp[i][j],rxshift);
+      } else {
+        ((__m128i *)buff[i])[2*j] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j],rxshift);
+        ((__m128i *)buff[i])[2*j+1] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j+1],rxshift);
+      }
 
 #else
-        ((__m128i *)buff[i])[j] = _mm_srai_epi16(buff_tmp[i][j],rxshift);
+      ((__m128i *)buff[i])[j] = _mm_srai_epi16(buff_tmp[i][j],rxshift);
 #endif
 #elif defined(__arm__)
-        ((int16x8_t *)buff[i])[j] = vshrq_n_s16(buff_tmp[i][j],rxshift);
+      ((int16x8_t *)buff[i])[j] = vshrq_n_s16(buff_tmp[i][j],rxshift);
 #endif
-      }
     }
+  }
 
-    if (samples_received < nsamps) {
-      LOG_E(HW,"[recv] received %d samples out of %d\n",samples_received,nsamps);
-    }
+  if (samples_received < nsamps) {
+    LOG_E(HW,"[recv] received %d samples out of %d\n",samples_received,nsamps);
+  }
 
   if ( s->rx_md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE)
     LOG_E(HW, "%s\n", s->rx_md.to_pp_string(true).c_str());
diff --git a/targets/ARCH/iqplayer/DOC/iqrecordplayer_usage.md b/targets/ARCH/iqplayer/DOC/iqrecordplayer_usage.md
index a6e4138e8ebf8102b56e4acabcbe39dc39308e58..6ccdca3bfa5bfcb2a6ed40b898d31e19a1a70950 100644
--- a/targets/ARCH/iqplayer/DOC/iqrecordplayer_usage.md
+++ b/targets/ARCH/iqplayer/DOC/iqrecordplayer_usage.md
@@ -1,7 +1,7 @@
 # I/Q record-playback
 ## using the iq recorder or iq player
 
-This feature provides I/Q record-playback as presented in the 4th OAI workshop. Tests have only been performed with a eNB, but the implementation should allow any softmodem executable to use the iq's record/player.
+This feature provides I/Q record-playback as presented in the 4th OAI workshop. The implementation allows any softmodem executable to use the iq's record/player.
 The I/Q record/playback feature is briefly described hereafter, it allows you to:
 * record subframes received by the USRP board in a file while the system is operating (for example you can record a full UE connection/traffic/ disconnection sequence). Today the oai USRP device is the only one supporting the recording feature. 
 * replay subframes from a file to operate the system (possibly in multiple loops if the recorded sequence is convenient from the logical point of view). 
@@ -75,7 +75,7 @@ U[HW]I ru thread Writing file header to /tmp/iqfile
 ```
 
 ### Playback/replay mode
-The option works only for 5MHz bandwidth because the information stored in the iq's file header regarding bandwidth is not yet properly processed. 
+When replaying iq's received by eNB or gNB The option works only for 5MHz bandwidth because the information stored in the iq's file header regarding bandwidth is not yet properly processed.  
  In this version,  mismatch between file content and run time parameters might lead to unpredictable results. In addition a file recorded on a AVX2-capable processor cannot be replayed on a non-AVX2-capable processor (this is to be further investigated).
 options for replay mode are:
 * `subframes-replay` Activate replay mode
@@ -83,6 +83,7 @@ options for replay mode are:
 * `subframes-loops` Number of iterations to replay the entire subframes file (default is 5)
 * `subframes-read-delay` Delay in microseconds to read a subframe in replay mode (default 200)
 * `subframes-write-delay` Delay in milliseconds to write a subframe in replay mode (default 15)
+* `use-mmap` Boolean, set to 1 (true) by default, iq file is map to memory if true, otherwise iq's are read from file. 
 
 >iq player session example:
 ```bash
diff --git a/targets/ARCH/iqplayer/iqplayer_lib.c b/targets/ARCH/iqplayer/iqplayer_lib.c
index 8b6844f9d3f5bfaa2df87ae236cf997ae874ac48..b62c1935d36967c88da984536846a60b9a9f7ca0 100644
--- a/targets/ARCH/iqplayer/iqplayer_lib.c
+++ b/targets/ARCH/iqplayer/iqplayer_lib.c
@@ -68,19 +68,18 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair
     exit(-1);
   }
   
-  if (s->use_mmap) {
+  if (c->use_mmap) {
     // use mmap
       s->mapsize=sb.st_size;
       LOG_I(HW,"Loading subframes using mmap() from %s size=%lu bytes ...\n",c->u_sf_filename, (uint64_t)sb.st_size );
       void *mptr = mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->fd, 0) ;
-      s->ms_sample = (iqrec_t *) ( mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->fd, 0) + sizeof(iqfile_header_t));
-
       if (mptr != MAP_FAILED) {
+        s->ms_sample = (iqrec_t *) ( mptr + sizeof(iqfile_header_t));      
         parse_iqfile_header(device, (iqfile_header_t *)mptr);
         s->ms_sample = (iqrec_t *)((char *)mptr + sizeof(iqfile_header_t));
         LOG_I(HW,"Loaded %u subframes.\n",s->nbSamplesBlocks );
       } else {
-        LOG_E(HW,"Cannot mmap file, exiting.\n");
+        LOG_E(HW,"Cannot mmap file, exiting, errnor %s\n",strerror(errno));
         close(s->fd);
         exit(-1);
       }
@@ -108,7 +107,7 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair
         if (lseek(s->fd,sizeof(iqfile_header_t), SEEK_SET) == 0) {
           LOG_I(HW,"Initial seek at beginning of the file\n" );
         } else {
-          LOG_I(HW,"Problem initial seek at beginning of the file\n");
+          LOG_I(HW,"Problem initial seek at beginning of the file, %s\n",strerror(errno));
         }
       } else {
         LOG_E(HW,"Cannot read header in %s exiting.\n",c->u_sf_filename );
@@ -134,11 +133,10 @@ static int trx_iqplayer_start(openair0_device *device) {
 static void trx_iqplayer_end(openair0_device *device) {
   if (device == NULL)
     return;
-
   if (device->recplay_state == NULL)
     return;
   
-  if (device->recplay_state->use_mmap) {
+  if (device->openair0_cfg->recplay_conf->use_mmap) {
     if (device->recplay_state->ms_sample != MAP_FAILED) {
       munmap(device->recplay_state->ms_sample, device->recplay_state->mapsize);
       }
@@ -201,21 +199,22 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
     LOG_I(HW,"go back at the beginning of IQ file");
     device->recplay_state->currentPtr=(uint8_t *)device->recplay_state->ms_sample;
 
-    if (!s->use_mmap) {
-      if (lseek(device->recplay_state->fd, 0, SEEK_SET) != 0) {
-        LOG_E(HW, "Problem seeking at the beginning of IQ file");
-      }
+    if (!(device->openair0_cfg->recplay_conf->use_mmap) ) {
+      close(device->recplay_state->fd);
+      iqplayer_loadfile(device, device->openair0_cfg);
+ //       LOG_E(HW, "Problem seeking at the beginning of IQ file %s\n",strerror(errno));
+      
     }
   }
 
-  if (!s->use_mmap) {
+  if (!(device->openair0_cfg->recplay_conf->use_mmap)) {
     // read sample from file
     if (read(s->fd, s->ms_sample, sizeof(iqrec_t)) != sizeof(iqrec_t)) {
-      LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*s->curSamplesBlock );
+      LOG_E(HW,"pb reading iqfile at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) );
       exit(-1);
     } else {
       if (read(s->fd, s->ms_sample+1, s->ms_sample->nbBytes) !=  s->ms_sample->nbBytes) {
-        LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*s->curSamplesBlock );
+        LOG_E(HW,"pb reading iqfile at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) );
         exit(-1);
       }
     }
@@ -225,7 +224,9 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
   AssertFatal(curHeader->header==BELL_LABS_IQ_HEADER,"" );
   // the current timestamp is the stored timestamp until we wrap on input
   // USRP shifts 1 sample time to time
-  AssertFatal(s->wrap_count !=0 || abs(curHeader->ts-s->currentTs) < 5 ,"");
+  if (s->wrap_count !=0 && device->openair0_cfg->recplay_conf->use_mmap)
+    AssertFatal( abs(curHeader->ts-s->currentTs) < 5 ,
+              "wrap_count=%li, ts %lu %lu",s->wrap_count,curHeader->ts,s->currentTs);
   AssertFatal(nsamps*4==curHeader->nbBytes,"");
   *ptimestamp = s->currentTs;
   memcpy(buff[0], curHeader+1, nsamps*4);
@@ -233,7 +234,7 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
   // Prepare for next read
   s->currentTs+=nsamps;
 
-  if (s->use_mmap)
+  if (device->openair0_cfg->recplay_conf->use_mmap)
     s->currentPtr+=sizeof(iqrec_t)+s->ms_sample->nbBytes;
 
   struct timespec req;
diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c
index 4463228dc7386d850d4af8b044966c998d270c8f..a6ae906d9d950fdbf9f20e1551e78408704454e7 100644
--- a/targets/COMMON/create_tasks.c
+++ b/targets/COMMON/create_tasks.c
@@ -28,7 +28,6 @@
   #include "sctp_eNB_task.h"
   #include "x2ap_eNB.h"
   #include "s1ap_eNB.h"
-  #include "udp_eNB_task.h"
   #include "gtpv1u_eNB_task.h"
   #if ENABLE_RAL
     #include "lteRALue.h"
@@ -67,11 +66,7 @@ int create_tasks(uint32_t enb_nb) {
   if (EPC_MODE_ENABLED && !NODE_IS_DU(type) && ! ( split73==SPLIT73_DU ) ) {
     rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
     AssertFatal(rc >= 0, "Create task for S1AP failed\n");
-    if (!(get_softmodem_params()->emulate_rf)){
-      rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
-      AssertFatal(rc >= 0, "Create task for UDP failed\n");
-    }
-    rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
+    rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
     AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
   }
 
@@ -91,7 +86,7 @@ int create_tasks(uint32_t enb_nb) {
     rc = itti_create_task(TASK_DU_F1, F1AP_DU_task, NULL);
     AssertFatal(rc >= 0, "Create task for DU F1AP failed\n");
     // DU is now GTP-U instead of protobuf
-    rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
+    rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
     AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
   }
 
diff --git a/targets/COMMON/create_tasks_mbms.c b/targets/COMMON/create_tasks_mbms.c
index 1cd3bb2f3a75747ca4adfd9a58c3cd8eba0ef370..b82b4f158b18a4b1cf499a30018b91e203c2d68d 100644
--- a/targets/COMMON/create_tasks_mbms.c
+++ b/targets/COMMON/create_tasks_mbms.c
@@ -28,7 +28,6 @@
     #include "sctp_eNB_task.h"
     #include "x2ap_eNB.h"
     #include "s1ap_eNB.h"
-    #include "udp_eNB_task.h"
     #include "gtpv1u_eNB_task.h"
     #include "m2ap_eNB.h"
     #include "m2ap_MCE.h"
@@ -75,46 +74,10 @@ int create_tasks_mbms(uint32_t enb_nb) {
   rc = itti_create_task (TASK_MCE_APP, MCE_app_task, NULL);
   AssertFatal(rc >= 0, "Create task for MCE APP failed\n");
 
-  
-//  LOG_I(ENB_APP, "Creating ENB_APP eNB Task\n");
-//  rc = itti_create_task (TASK_ENB_APP, eNB_app_task, NULL);
-//  AssertFatal(rc >= 0, "Create task for eNB APP failed\n");
-//
-//  LOG_I(RRC,"Creating RRC eNB Task\n");
-//  rc = itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL);
-//  AssertFatal(rc >= 0, "Create task for RRC eNB failed\n");
-//
-//  if (EPC_MODE_ENABLED) {
-//    rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
-//    AssertFatal(rc >= 0, "Create task for SCTP failed\n");
-//  }
-// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
-//    AssertFatal(rc >= 0, "Create task for SCTP failed\n");
-//
-//
-//  if (EPC_MODE_ENABLED && !NODE_IS_DU(type)) {
-//    rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
-//    AssertFatal(rc >= 0, "Create task for S1AP failed\n");
-//    if (!(get_softmodem_params()->emulate_rf)){
-//      rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
-//      AssertFatal(rc >= 0, "Create task for UDP failed\n");
-//    }
-//    rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
-//    AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
-//    if (is_x2ap_enabled()) {
-//      rc = itti_create_task(TASK_X2AP, x2ap_task, NULL);
-//      AssertFatal(rc >= 0, "Create task for X2AP failed\n");
-//    } else {
-//      LOG_I(X2AP, "X2AP is disabled.\n");
-//    }
-//  }
-////
     if(!EPC_MODE_ENABLED){
    // rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
    // AssertFatal(rc >= 0, "Create task for SCTP failed\n");
-    rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
-      AssertFatal(rc >= 0, "Create task for UDP failed\n");
-    rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
+    rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
     AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
     }
 ///
diff --git a/targets/COMMON/create_tasks_ue.c b/targets/COMMON/create_tasks_ue.c
index 9341107af9bd53bb68132e1080a6103fc5054e49..cdca62c39900a2eb63f13f3d3a9b1649f841c17a 100644
--- a/targets/COMMON/create_tasks_ue.c
+++ b/targets/COMMON/create_tasks_ue.c
@@ -27,7 +27,6 @@
   #include "sctp_eNB_task.h"
   #include "s1ap_eNB.h"
   #include "openair3/NAS/UE/nas_ue_task.h"
-  #include "udp_eNB_task.h"
   #include "gtpv1u_eNB_task.h"
   #if ENABLE_RAL
     #include "lteRALue.h"
diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf
index 84c669571c2526b5456bec3288213d021ae7986a..0e88f490218dd748c0c04cf41d2ae3ada2b45766 100644
--- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf
+++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf
@@ -70,23 +70,15 @@ eNBs =
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 # available options for level:   error, warn, notice, info, debug, trace
-# available options for verbosity: none, low, medium, high, full
     log_config : 
     {
 	global_log_level                      ="debug"; 
-    	global_log_verbosity                  ="medium";
 	hw_log_level                          ="debug"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="debug"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="info"; 
-    	rlc_log_verbosity                     ="medium";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="medium";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
 
   }
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf
index aab3876d96355f60c890815876e06132544b4809..0561c563ddb70e769791d3a3f780ee1dfd5dd590 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-4g.conf
@@ -269,17 +269,10 @@ NETWORK_CONTROLLER :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
index 575fddda2b11614a23957930f4da58f1c73f0248..f13f20efbab0eba909eac48ade4f9fb2e773fad9 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
@@ -263,18 +263,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf
index 38d3f5eac94756b771e33575de9969b9ce42c55b..0e1080043a0ed8d1113be91c9fdffef575d660c9 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/cu.lte.conf
@@ -200,15 +200,10 @@ eNBs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   pdcp_log_level              = "info";
-  pdcp_log_verbosity          = "high";
   rrc_log_level               = "info";
-  rrc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
   gtp_log_level               = "info";
-  gtp_log_verbosity           = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf
index 8e786be5e9427af6de083dec009e3371f8e43e7a..0485957a8acc2f2f725c10859b8742ef6c9ff8a4 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/du.lte.band7.10MHz.if4p5.conf
@@ -96,17 +96,11 @@ RUs = (
 
 log_config = {
   global_log_level            = "info";
-  global_log_verbosity        = "medium";
   hw_log_level                = "info";
-  hw_log_verbosity            = "medium";
   phy_log_level               = "info";
-  phy_log_verbosity           = "medium";
   mac_log_level               = "info";
-  mac_log_verbosity           = "high";
   rlc_log_level               = "info";
-  rlc_log_verbosity           = "medium";
   flexran_agent_log_level     = "info";
-  flexran_agent_log_verbosity = "medium";
 };
 
 NETWORK_CONTROLLER : {
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf
index 67044f38d91d5010d033bd00191d687eb8b578fc..cc8df8185a2680c470d67e26302db298e551a715 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.emtc.conf
@@ -382,24 +382,6 @@ eNBs =
         ENB_IPV4_ADDRESS_FOR_X2C                 = "127.0.0.2/24";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
-
-    log_config :
-    {
-      global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
-      hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
-      phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
-      mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
-      rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
-      pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
-      rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
-   };
   }
 );
 
@@ -438,17 +420,10 @@ RUs = (
 log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf
index e044c186b9af31ed26a5f471dffc5faea596313f..4723fd3cba3a401d4c70f687e0e0685ffb9cab09 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf
@@ -176,19 +176,12 @@ THREAD_STRUCT = (
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf
index 5a547622abed393793b64034f17d4b2b699bc3f8..d811fb068e017d21ec742e63c56262d654d36045 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.25PRB.iris030.conf
@@ -256,17 +256,10 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf
index 27826e5ce2cf42f3130cf6a917feccbdeda648e3..6669cef9a6944dee14083474f3a9591d44154c85 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf
@@ -176,19 +176,12 @@ THREAD_STRUCT = (
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf
index 5df0f107ea6a7e5b5f4c928ad61cd8427eb64076..1b4224da08d0d63c03722d0e7ed0f9edaf4899d9 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band42.tm1.25PRB.iris030.conf
@@ -256,17 +256,10 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf
index cb50cccf2b9370147d165c449a6f3a4dbe35723d..ad95557bb970efd4e86ed3911b1d576931773746 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.master.conf
@@ -284,17 +284,10 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf
index 245e4ecf94a6568989aa620a45ab8b824833c3de..8c0f57c65dc2beb2cf76a234dbc5ee77772ff65e 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf
@@ -212,18 +212,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="medium";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf
index 86b481f9d855f530ab56f821b65bb45cb2354a8e..506966d167da1797066e2f1845b939685925a49a 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.iris030.conf
@@ -256,17 +256,10 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf
index 1eb5da6a1810d315b2dea379976934a043514364..177cddec12bd3cb2375a17fb14d0c4ab5f34a889 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf
@@ -251,41 +251,15 @@ THREAD_STRUCT = (
     worker_config      = "WORKER_ENABLE";
   }
 );
-/*
-     log_config :
-     {
-       global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
-       hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
-       phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
-       mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
-       rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
-       pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
-       rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
-    };
-*/
 
      log_config :
      {
        global_log_level                      ="crit";
-       global_log_verbosity                  ="crit";
        hw_log_level                          ="crit";
-       hw_log_verbosity                      ="crit";
        phy_log_level                         ="crit";
-       phy_log_verbosity                     ="crit";
        mac_log_level                         ="crit";
-       mac_log_verbosity                     ="crit";
        rlc_log_level                         ="crit";
-       rlc_log_verbosity                     ="crit";
        pdcp_log_level                        ="crit";
-       pdcp_log_verbosity                    ="crit";
        rrc_log_level                         ="crit";
-       rrc_log_verbosity                     ="crit";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf
index a929c439be5799e1e173165fc021cd1dfdda0158..aac2ec5f5e0932c0132ef806861bd8a7e7f1354e 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf
@@ -244,18 +244,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
index 43288ba3241e6a163c5d543d94bb74a29c4eb776..07cebbe75b1e7d579bcc540b6c58f6e05e04baa7 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
@@ -298,18 +298,11 @@ rfsimulator :
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf
index 92f2d4e6f145f01bea7e786c98dc503a81ef5ea7..222b203f71dc524331855d88f4b5e947083b3c0a 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf
@@ -211,18 +211,11 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf
index c3faa198ddac89ec1d406ee77d623124cc7a01fb..483aac6deb9a45c8e936c233054945009c4ed73a 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf
@@ -265,18 +265,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf
index 8fa8fcf99244344760c147d6730aaa8a85f2a813..9a91640a080d2b2ab14ed402759a35f0ba42fdd4 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf
@@ -251,18 +251,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf
index c2e364b75edba6e139f5e378abb0c64c169a81f9..05c81b5c512f4e6aa62e2f8ebaa237334cb931a8 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf
@@ -245,18 +245,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf
index 813a0e58e303b6f8fb33c22e8e8f91939a05dd9a..fbae1136b0b786c3abcdbff49ad683943e2a7a45 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf
@@ -265,18 +265,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
index d81655e5d5a8db2aa74f2102d38b6b19118d8a9a..e5685d00a4af4575bebdd277d403e236465d174e 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
@@ -257,18 +257,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
index b063989fd257f3f98ba0f2f1ecfc2ae98d9ce897..b0126589cd81461716074401e5bd1494c24908c7 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
@@ -257,18 +257,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf
index a171f2aae0ee2e014c6c066c1e58c2b9565222a5..683cdaeb2c40885393fc285eeddff5e5e34f1631 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf
@@ -258,18 +258,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf
index 856eed4fc2c877b87d08697b404467cc60c66a55..2d85f446d7b319c79f300f85c92dd27fdc6899f4 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf
@@ -262,17 +262,10 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf
index 012f46401ed53b11105aaa90fc33c54e6957224d..e1c9e9e167814760fc4dd204a2c17c8d0b8ae4db 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf
@@ -260,17 +260,10 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf
index 2e4dc540f3aa2b1503d37d28100dfda15e87c395..367ced1c8a936c55fd7b8e8c49910b284c118327 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf
@@ -303,17 +303,10 @@ security = {
 log_config :
 {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="high";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="medium";
 };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
index a454af7b21ffd9d02b3658cc4106522013c95c0e..e7d671e6a438f031d5acd08c4d546325039a8cd2 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
@@ -254,18 +254,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
index af26091260466439ce424de8d5ec9d0075ece7fe..c9363da7f8e9658b03d2c39aa1108e95b17f7831 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
@@ -253,18 +253,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
index 928c70113f576a1f8682ac8edabcfc7d75b3bbd9..0e5ee33950fa5a5a269c9a1c3dfd71666e4cb4fc 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
@@ -253,18 +253,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf
index 76bc5bf99231784ee30833efce4d765b381392df..019a0f0a363664d43f2059018e740e3ce05bbb5f 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf
@@ -270,18 +270,11 @@ security = {
 log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
index 7ff9d0ea770b8a63e9b8cc9fef2b5447fbf9344e..35e742900ad5d65cd4af11ceb0bc15c6ea3021fe 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
@@ -245,18 +245,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf
index 5c0434b57ef4f4f30cae38986e341dc3ccd49fb4..37cde2feb1d1217615ddae9bc591e48ce12d35ee 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf
@@ -255,18 +255,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf
index 4b1476a76d8f296421467286c4e5604999086062..f3922404010f4d0cbb13ce684c83cea580d8a863 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf
@@ -253,18 +253,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf
index 50169f4bce955887a224d7e0186c2d1a4c750c3e..59af2a9187fbc74c0ed21f68f72a69f330fa5a7d 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf
@@ -253,18 +253,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf
index e217f39b94323ae3305dccde96694d5421862b3c..9358c3370f5fa522554f64e96d72c38a556f8311 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf
@@ -246,18 +246,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
index b13962aee90335a968e72b594dc5b02b20edbaf6..a52841158cda36b418b2bbf26acba365b39c678a 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="debug";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="debug";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="debug";
-  rrc_log_verbosity                     ="full";
 };
 
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf
index 0b384958ae4b2b239d2a0a5884cd073ab660fe57..9a0f1cb036c0420cecfd5e515e8861ade4fccee4 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf
@@ -1,18 +1,11 @@
 log_config = {
   global_log_level                      ="debug";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="debug";
-  mac_log_verbosity                     ="medium";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="debug";
-  rrc_log_verbosity                     ="full";
 };
 
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf
index e05c64b4e83c4ed52e875f6b13a1ffdb98dc3039..4554a32a18ff232353a48ae5ba5647187dce1115 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf
@@ -217,17 +217,10 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf
index 1ef71bedc2880f9cdaa837102ba84e403e501fa6..c8bca91ccd2af438aed623b55311c104cae8d005 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf
@@ -200,19 +200,12 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="debug";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="debug";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="debug";
-       rlc_log_verbosity                     ="high";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="high";
     };
 
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf
index 9ce9f28cc254b3a82fcbc08ce29e7425ca46c8ba..1f72077ba3d73033d991595d4cd93b5e71369522 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf
@@ -239,17 +239,10 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
index 30cb852a284010d87fad21b4cbc53bd43db7d1e3..401c42e503669cbdd0cec2c95e5552b0515b6761 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
@@ -217,17 +217,10 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
index 519305b68d8f78b4e893905998a94f4542051cf7..22da6735a2cdd95df210ff896496cd8ae5dd4a1f 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
@@ -218,17 +218,10 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="debug";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="debug";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf
index 1583e07ca1179d2b828acac83ea28f5d343108c2..004ad4db78ce18775dafe89b569f09c482143d01 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf
@@ -235,18 +235,11 @@ THREAD_STRUCT = (
 log_config =
     {
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
                                     
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf
index 9b611b3f07816e9107d316d335b77fbb406671a1..6a76028d25aa3b412d38b0e8918cdbe9b3d7167b 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc_b38_if5_ENDC.conf
@@ -168,19 +168,12 @@ eNBs =
     log_config :
     {
       global_log_level                      ="debug";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
    };
 
   }
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
index 3dc8e7dd32dcabc206737f718a4aa64b9efdc3d3..c14cc9589a26205608dbf14aa5c328ccd63b4100 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
@@ -29,18 +29,11 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf
index 494086defdc827df902b90f7b5446bd38753f451..4f1a7fee309302a31433bc17e802f3b577a528c7 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf
@@ -29,18 +29,11 @@ THREAD_STRUCT = (
 
 log_config = { 
       global_log_level                      ="info";
-      global_log_verbosity                  ="medium";
       hw_log_level                          ="info";
-      hw_log_verbosity                      ="medium";
       phy_log_level                         ="info";
-      phy_log_verbosity                     ="medium";
       mac_log_level                         ="info";
-      mac_log_verbosity                     ="high";
       rlc_log_level                         ="info";
-      rlc_log_verbosity                     ="medium";
       pdcp_log_level                        ="info";
-      pdcp_log_verbosity                    ="medium";
       rrc_log_level                         ="info";
-      rrc_log_verbosity                     ="medium";
 };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf
index 1d8f61e442ba23af6a67ee6a21edbcea4c93fcc2..d2ef01392bc819b833c9c011c7753544a209bab8 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf
@@ -204,25 +204,6 @@ eNBs =
         ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.18.199/24";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
-    
-    log_config : 
-    {
-	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
-	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
-	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
-	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
-	rlc_log_level                         ="debug"; 
-    	rlc_log_verbosity                     ="high";
-	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
-	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
-   };	
-   
   }
 );
 
@@ -269,17 +250,10 @@ RUs = (
     log_config : 
     {
 	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
 	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="info"; 
-    	rlc_log_verbosity                     ="high";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf
index 6df25273c83e506c8d286c3bacb8b8f7ad703896..d493f2990667def07d7dd1f3fc705cc6dbeabcbe 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf
@@ -205,25 +205,6 @@ eNBs =
         ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.18.199/24";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
-    
-    log_config : 
-    {
-	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
-	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
-	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
-	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
-	rlc_log_level                         ="debug"; 
-    	rlc_log_verbosity                     ="high";
-	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
-	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
-   };	
-   
   }
 );
 
@@ -270,17 +251,10 @@ RUs = (
     log_config : 
     {
 	global_log_level                      ="info"; 
-    	global_log_verbosity                  ="high";
 	hw_log_level                          ="info"; 
-    	hw_log_verbosity                      ="medium";
 	phy_log_level                         ="info"; 
-    	phy_log_verbosity                     ="medium";
 	mac_log_level                         ="info"; 
-    	mac_log_verbosity                     ="high";
 	rlc_log_level                         ="info"; 
-    	rlc_log_verbosity                     ="high";
 	pdcp_log_level                        ="info"; 
-    	pdcp_log_verbosity                    ="high";
 	rrc_log_level                         ="info"; 
-    	rrc_log_verbosity                     ="medium";
    };	
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
index 5591ed082dcecc81b959d44502fd5c5cab00acfa..4ec53064f11c2400c3c0ab53cd069c7cd717c08f 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
@@ -263,18 +263,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf
index dd8113e059020007251e9c152c2b2ee4cd2dc61d..7c0fa96adbb12b2ed16fcee3bcc23181e69d6165 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf
@@ -272,18 +272,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf
index 198ad8471ccbf29c2275dd1c688204caa21f0063..57aa459d49e7b00c33eafe565b1f52caa68af29e 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf
@@ -261,18 +261,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf
index 96335f23caf5f2a0ea673476487de6ac3bee4e1b..89dca2a75c4892f999aa0df87a81875e7199bc46 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf
@@ -258,18 +258,11 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
index 680a6cb4ae66fda61ffd70241fe9011909c6bc3b..43c2ab20ad6be972e36f7c906e46ee58f96fd6be 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
@@ -78,22 +78,13 @@ gNBs =
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="debug";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
index 215a57b95c5ab25322d3bc5808049db6b0af233d..0b6d7cd7c85bdab7411cb5c6ee93b64e4322ceab 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
@@ -254,22 +254,13 @@ THREAD_STRUCT = (
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="debug";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        f1ap_log_level                         ="debug";
-       f1ap_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf
index ab4713f8b5693914c0455e33b96b4b67492f76c2..b0e02ff2bc340a24667934a8a706cfc9c1f19144 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.tm1.106PRB.usrpn300.gtp-itti.conf
@@ -265,20 +265,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        ngap_log_level                         ="info";												
-       ngap_log_verbosity                    ="medium";												
     };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
index 2777035fddb45380d3f948c913108419d7522ab3..9bf20b54aba8c63e71dcb7ddae9aefee8d54ec63 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
@@ -282,22 +282,13 @@ security = {
 log_config :
 {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="high";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="medium";
   ngap_log_level                        ="debug";
-  ngap_log_verbosity                    ="medium";
   f1ap_log_level                        ="debug";
-  f1ap_log_verbosity                    ="medium";
 };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf
index 9e69bb6f4efe46900eebe1d5cb78e9ac1d95e564..cab801525b9ed5639ef7a36b424e8d646e05b5af 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.106PRB.usrpn300.conf
@@ -280,20 +280,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        ngap_log_level                        ="debug";
-       ngap_log_verbosity                    ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
index 27a1b6ad62c0258eeb0e5a9dd2a639db9dba3941..9452f00eed10a9e21117a6522df566b9811c47cb 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
@@ -282,21 +282,12 @@ security = {
 log_config :
 {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="high";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="medium";
   ngap_log_level                        ="debug";
-  ngap_log_verbosity                    ="medium";
   f1ap_log_level                        ="debug";
-  f1ap_log_verbosity                    ="medium";
 };
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
index f340d6116bcbb6f90fec59a26e7214fcc70a3d42..09cf892b917b009d9dc2729a5744330f9f242868 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
@@ -281,22 +281,13 @@ security = {
 log_config :
 {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="high";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="medium";
   ngap_log_level                        ="debug";
-  ngap_log_verbosity                    ="medium";
   f1ap_log_level                        ="debug";
-  f1ap_log_verbosity                    ="medium";
 };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf
index c8a0bace37b79f7bd99f1d2cacebfe5e265a6777..280461d2abf9be9d65343625afbbe7a5e601081e 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.sabox.conf
@@ -287,20 +287,12 @@ security = {
      log_config :
      {
        global_log_level                      ="info";
-       global_log_verbosity                  ="medium";
        hw_log_level                          ="info";
-       hw_log_verbosity                      ="medium";
        phy_log_level                         ="info";
-       phy_log_verbosity                     ="medium";
        mac_log_level                         ="info";
-       mac_log_verbosity                     ="high";
        rlc_log_level                         ="info";
-       rlc_log_verbosity                     ="medium";
        pdcp_log_level                        ="info";
-       pdcp_log_verbosity                    ="medium";
        rrc_log_level                         ="info";
-       rrc_log_verbosity                     ="medium";
        ngap_log_level                         ="debug";
-       ngap_log_verbosity                     ="medium";
     };
 
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
index befceae6952fb739cbe4c47032f23ce8c92fbb37..fac54a298b7cf9901c6673efcb97cad30951af6b 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
@@ -310,21 +310,12 @@ security = {
 log_config :
 {
   global_log_level                      ="info";
-  global_log_verbosity                  ="medium";
   hw_log_level                          ="info";
-  hw_log_verbosity                      ="medium";
   phy_log_level                         ="info";
-  phy_log_verbosity                     ="medium";
   mac_log_level                         ="info";
-  mac_log_verbosity                     ="high";
   rlc_log_level                         ="info";
-  rlc_log_verbosity                     ="medium";
   pdcp_log_level                        ="info";
-  pdcp_log_verbosity                    ="medium";
   rrc_log_level                         ="info";
-  rrc_log_verbosity                     ="medium";
   ngap_log_level                        ="debug";
-  ngap_log_verbosity                    ="medium";
   f1ap_log_level                        ="debug";
-  f1ap_log_verbosity                    ="medium";
 };
diff --git a/targets/RT/USER/TOOLS/thread_ipc.h b/targets/RT/USER/TOOLS/thread_ipc.h
deleted file mode 100644
index ec008c30df21efb6f633d30ed9359c25c000232e..0000000000000000000000000000000000000000
--- a/targets/RT/USER/TOOLS/thread_ipc.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-#ifndef __THREAD_IPC_H__
-#define __THREAD_IPC_H__
-
-
-#define SUB_FRAME_LENGTH 7680
-#define FRAME_LENGTH 76800
-
-#define UE_UL_DELAY 6       /*设置上行组帧在同步时钟基础上的延时(子帧个数)*/
-#define UE_UL_SEND_DELAY 6      /*上行发送子帧号在接收子帧时间戳上的延时(子帧个数)*/
-
-#define BUFFERMAX 5         /*环形缓冲区个数*/
-#define LOWBUFFER 3                 /*环形缓冲区下限, 不能为0*/
-#define HIGHBUFFER 4                /*环形缓冲区上限*/
-
-typedef struct {
-  long long subframe_num;     /*子帧编号*/
-  int buffer[SUB_FRAME_LENGTH * 2]; /*一子帧数据*/
-} buffer_t;
-
-typedef struct {
-  int packet_num;         /*环形缓冲区数据包计数器,表示环形缓冲区有效数据包个数*/
-  int isfull;           /*标记环形缓冲区有效数据包是否达到上限标志*/
-  int isempty;          /*标记环形缓冲区有效数据包是否达到下限标志*/
-
-  pthread_mutex_t buffer_mutex; /*环形缓冲区操作保护锁*/
-  pthread_cond_t full_cond;   /*环形缓冲区上限条件变量,配合isfull使用 */
-  pthread_cond_t empty_cond;    /*环形缓冲区下限条件变量,配合isempty使用*/
-
-  buffer_t loop_buf[BUFFERMAX]; /*环形缓冲区*/
-} loop_buffer_op_t;
-
-typedef struct {
-  int decoding_subframe_num;    /*待解码子帧的编号*/
-  pthread_mutex_t buffer_mutex; /*对sync_buffer临界区的保护锁*/
-  int sync_buffer[SUB_FRAME_LENGTH * 10];  /*同步线程与下行解码线程数据共享缓冲区*/
-} sync_buffer_t;
-
-typedef struct {
-  unsigned int rx_timestamp;    /*接收数据包第一个sample时间戳*/
-  unsigned int tx_timestamp;    /*待发送数据包的时间戳*/
-  unsigned long long current_subframe;  /*当前子帧编号*/
-
-  int ue_sync_state;        /*表示UE是否在同步状态,0表示失同步,1表示同步*/
-  pthread_mutex_t sync_mutex;   /*根据ue_sync_state标志,唤醒组帧线程*/
-
-  pthread_mutex_t ul_send_mutex;  /*用于sync线程唤醒发送线程发送数据*/
-  pthread_mutex_t dl_decode_mutex;/*下行解码保护锁,用于sync线程唤醒解码线程解码*/
-
-  loop_buffer_op_t loop_buffer;
-  sync_buffer_t sync_buffer;
-} g_thread_ipc_t;
-
-void loop_buffer_reset(buffer_t *loop_buf);
-int thread_ipc_init(void);
-int thread_ipc_deinit(void);
-int set_thread_attr(pthread_attr_t *attr, int policy, int priority, int cpuid);
-int find_subframe_num(unsigned long long current_subframe_num, buffer_t *buf, int *flag);
-int ue_unsync_thread_ipc_reset(void);
-
-extern g_thread_ipc_t thread_ipc;
-
-#endif
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 8ad610f1af7f8911a27e2f17b45f0e3fc4fdea9b..15b43192604765ddb47b25241cb2d72a7357948e 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -48,7 +48,6 @@
 #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
 
 #include "assertions.h"
-#include "msc.h"
 #include "PHY/defs_common.h"
 #include "PHY/types.h"
 #include "PHY/INIT/phy_init.h"
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 85e493f19485493bbe14cbe517337d22bbba0b1a..61e298262610e769c4f7c5c5c70681eb07639076 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -34,13 +34,9 @@
 #define _GNU_SOURCE             /* See feature_test_macros(7) */
 #include <sched.h>
 
-#include <common/utils/msc/msc.h>
-
-
 #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
 
 #include "assertions.h"
-#include "msc.h"
 
 #include "PHY/types.h"
 
@@ -499,8 +495,6 @@ static void init_pdcp(void) {
       pdcp_set_rlc_data_req_func(rlc_data_req);
       pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
     }
-  } else {
-    pdcp_set_pdcp_data_ind_func(proto_agent_send_pdcp_data_ind);
   }
 }
 
@@ -555,13 +549,7 @@ int main ( int argc, char **argv )
   cpuf=get_cpu_freq_GHz();
   printf("ITTI init, useMME: %i\n",EPC_MODE_ENABLED);
   itti_init(TASK_MAX, tasks_info);
-  // allows to forward in wireshark L2 protocol for decoding
-  // initialize mscgen log after ITTI
-  if (get_softmodem_params()->start_msc) {
-    load_module_shlib("msc",NULL,0,&msc_interface);
-  }
 
-  MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
   init_opt();
   // to make a graceful exit when ctrl-c is pressed
   set_softmodem_sighandler();
diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h
index cf35a13fe907d851156ded04b32c9847123a9163..0267ad8ce0ab32d0a15c9304a1025b5437dd74bb 100644
--- a/targets/RT/USER/lte-softmodem.h
+++ b/targets/RT/USER/lte-softmodem.h
@@ -23,14 +23,12 @@
 #include "../../ARCH/COMMON/common_lib.h"
 //#undef MALLOC
 #include "assertions.h"
-#include "msc.h"
 #include "PHY/types.h"
 #include "PHY/defs_eNB.h"
 #include "PHY/defs_UE.h"
 #include "flexran_agent.h"
 #include "s1ap_eNB.h"
 #include "SIMULATION/ETH_TRANSPORT/proto.h"
-#include "proto_agent.h"
 #include "executables/softmodem-common.h"
 
 
diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c
index 4395694bf40823415794a57a8ca4d7d01fbc7b0c..2b39bd3f0fca94c7bef3f55d6f421b093b2a5254 100644
--- a/targets/RT/USER/lte-uesoftmodem.c
+++ b/targets/RT/USER/lte-uesoftmodem.c
@@ -37,7 +37,6 @@
 #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
 
 #include "assertions.h"
-#include "msc.h"
 
 #include "PHY/types.h"
 
@@ -596,12 +595,6 @@ int main( int argc, char **argv ) {
   printf("ITTI init\n");
   itti_init(TASK_MAX, tasks_info);
 
-  // initialize mscgen log after ITTI
-  if (get_softmodem_params()->start_msc) {
-    load_module_shlib("msc",NULL,0,&msc_interface);
-  }
-
-  MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
   init_opt();
   ue_id_g = (node_number == 0) ? 0 : node_number-2; //ue_id_g = 0, 1, ...,
   if(node_number == 0)
diff --git a/targets/RT/USER/ru_control.c b/targets/RT/USER/ru_control.c
index 7280c785232af9346402aa07e37ca6861ed16a1e..083b5f91ef2e2b968a3af535db5defab49884594 100644
--- a/targets/RT/USER/ru_control.c
+++ b/targets/RT/USER/ru_control.c
@@ -46,7 +46,6 @@
 #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
 
 #include "assertions.h"
-#include "msc.h"
 
 #include "PHY/types.h"
 
diff --git a/targets/SCRIPTS/msc_gen.py b/targets/SCRIPTS/msc_gen.py
deleted file mode 100755
index ed5d337fc2dc009a4f48cb75ec2c421db1254006..0000000000000000000000000000000000000000
--- a/targets/SCRIPTS/msc_gen.py
+++ /dev/null
@@ -1,329 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-# The aim of this script is to collect some traces from oai stack and generate a sequence diagram image (png or jpeg).
-#
-# It is supposed that a protocol name (MSC_NEW_STR) starts with...its name (RRC, MAC, NAS, S1AP, etc) then is followed by an underscore and whatever (RRC_UE,  RRC_eNB)
-#   Like this it is possible to distinguish between PDUS, SDUs or other messages only by reading source ans destination
-
-import sys
-import subprocess
-import re
-import socket
-import datetime
-from datetime import date
-import os, errno
-import argparse
-
-
-
-
-parser = argparse.ArgumentParser()
-parser.add_argument("--diag_rlc_um", "-u", type=str,help="Try to find RLC protocol diagnostics", default="no")
-parser.add_argument("--dir", "-d", type=str,help="Directory where msc logs can be found", default="/tmp")
-parser.add_argument("--profile", "-p", type=str,help="E_UTRAN, EPC", default="EPC")
-parser.add_argument("--no_message", "-M", type=str,help="Trace PDUs, not messages, SDUs", default="no")
-parser.add_argument("--no_pdu", "-P", type=str,help="Trace messages, SDUs, not PDUs", default="no")
-parser.add_argument("--no_event", "-E", type=str,help="Do not trace events", default="no")
-args = parser.parse_args()
-
-MSCGEN_OUTPUT_TYPE       = "png"
-MAX_MESSAGES_PER_PAGE    = 36
-
-MSC_NEW_STR              = '[PROTO]'
-MSC_MSG_STR              = '[MESSAGE]'
-MSC_BOX_STR              = '[EVENT]'
-
-
-# This list is filled as follow : g_proto_names[module_id_int] = (proto_name), example RRC_UE
-g_proto_names = []
-# This list is filled as follow : g_proto_names[module_id_int] = (basename proto_name) example: RRC
-g_proto_types = []
-
-
-
-# list of messages
-g_messages         = {}
-
-
-# Display color of messages of sending entities
-g_display_color  = ['\"teal\"',   # To check in msc.h: MSC_NAS_UE
-                    '\"red\"',    # To check in msc.h: MSC_RRC_UE
-                    '\"red\"',    # To check in msc.h: MSC_NAS_UE
-                    '\"red\"',    # To check in msc.h: MSC_PDCP_UE
-                    '\"red\"',    # To check in msc.h: MSC_RLC_UE
-                    '\"red\"',    # To check in msc.h: MSC_MAC_UE
-                    '\"red\"',    # To check in msc.h: MSC_PHY_UE
-                    '\"indigo\"', # To check in msc.h: MSC_PHY_ENB
-                    '\"indigo\"', # To check in msc.h: MSC_MAC_ENB
-                    '\"indigo\"', # To check in msc.h: MSC_RLC_ENB
-                    '\"indigo\"', # To check in msc.h: MSC_PDCP_ENB
-                    '\"orange\"', # To check in msc.h: MSC_RRC_ENB
-                    '\"black\"',  # To check in msc.h: MSC_IP_ENB
-                    '\"black\"',  # To check in msc.h: MSC_S1AP_ENB
-                    '\"black\"',  # To check in msc.h: MSC_GTPU_ENB
-                    '\"black\"',  # To check in msc.h: MSC_GTPU_SGW
-                    '\"black\"',  # To check in msc.h: MSC_S1AP_MME
-                    '\"black\"',  # To check in msc.h: MSC_MMEAPP_MME
-                    '\"black\"',  # To check in msc.h: MSC_NAS_MME
-                    '\"black\"',  # To check in msc.h: MSC_NAS_EMM_MME
-                    '\"black\"',  # To check in msc.h: MSC_NAS_ESM_MME
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"',  
-                    '\"black\"'] 
-
-
-# helper for diagnostic of RLC
-g_diag_rlc_sn = {}
-
-g_sequence_generator = 0
-
-
-g_filenames = []
-if "E_UTRAN" == args.profile.strip():
-    g_filenames = [    
-        args.dir+'/openair.msc.0.log',
-        args.dir+'/openair.msc.1.log']
-elif "EPC" == args.profile.strip():
-    g_filenames = [        
-        args.dir+'/openair.msc.2.log',
-        args.dir+'/openair.msc.3.log',
-        args.dir+'/openair.msc.4.log']
-
-def sequence_number_generator():
-    global g_sequence_generator
-    l_seq = g_sequence_generator
-    g_sequence_generator = g_sequence_generator + 1
-    return l_seq
-
-def file_is_empty(fpath):  
-    return False if os.path.isfile(fpath) and os.path.getsize(fpath) > 0 else True
-
-def parse_oai_log_files():
-    global g_entities_dic
-    global g_entities
-    global g_messages
-    global g_final_display_order_list
-    #open TXT file that contain OAI filtered traces for mscgen
-
-    # we may insert diagnostic events
-    event_id_offset = 0
-    for filename in g_filenames:
-        if file_is_empty(filename):
-            continue
-        try:
-            fhandle  = open(filename, 'r')
-            fcontent = fhandle.read()
-            fhandle.close()
-
-            # split file content in lines
-            lines = fcontent.splitlines()
-            for line in lines:
-                print ("INPUT LINE:  %s " % line)
-                if line.strip() != ""  and not line.strip().startswith('#'):
-                    partition = line.split(' ',3)
-                    event_id = int(partition[0]) + event_id_offset
-                    event_type = partition[1]
-                    entity_id = int(partition[2])
-                    if MSC_NEW_STR == event_type:
-                        entity_name = partition[3]
-                        if len(g_proto_names) <= entity_id:
-                            for i in range(len(g_proto_names),(entity_id +1)):
-                                g_proto_names.append("NotDeclared")
-                                g_proto_types.append("NotDeclared")
-                        g_proto_names[entity_id] = entity_name
-                        partition_name1 = entity_name.split('_',1);
-                        partition_name2 = partition_name1[0].split('-',1);
-                        partition_name3 = partition_name2[0].split();
-                        g_proto_types[entity_id] = partition_name3
-                        print ("entity name %s , entity type %s" % (g_proto_names[entity_id],g_proto_types[entity_id]) )
-                    # if line is a trace of a message between 2 protocol entities or layers
-                    elif MSC_MSG_STR == event_type:
-                        #print ("partition[3]:%s" % partition[3])
-                        sub_partition = partition[3].split(' ',4)
-                        arrow   = sub_partition[0]
-                        entity2_id = int(sub_partition[1])
-                        mac     = int(sub_partition[2])
-                        time    = sub_partition[3]
-                        message = sub_partition[4]
-                        Message = {}
-                        Message['mac'] = mac
-                        Message['time'] = time
-                        Message['message'] = message
-                        Message['line_color'] = g_display_color[entity_id]
-                        Message['text_color'] = g_display_color[entity_id]
-                        if arrow == '<-':
-                            if "yes" == args.diag_rlc_um.strip() and "DATA SN " in message and "RB UM " in message:
-                                rlc_key = re.match(r"[^[]*\[([^]]*)\]", message).groups()[0]
-                                sn_info = message.partition("SN")[2]
-                                if sn_info.strip() != "":
-                                    sn_str = sn_info.strip().partition(" ")[0]                                
-                                    sn = int(sn_str)
-                                    if rlc_key in g_diag_rlc_sn:
-                                        previous_sn = g_diag_rlc_sn[rlc_key]
-                                        if (previous_sn + 1) % 1024 != sn:
-                                            print ("DIAG missing SN:  %s " % line)  
-                                            MessageDiag = {}
-                                            MessageDiag['type'] = "box"
-                                            MessageDiag['tx'] = entity_id
-                                            MessageDiag['rx'] = entity_id
-                                            MessageDiag['discarded'] = False
-                                            MessageDiag['time'] = time
-                                            MessageDiag['message'] = "Missing SN "+ sn_str + " detected"
-                                            MessageDiag['line_color'] = '\"red\"'
-                                            MessageDiag['text_color'] = '\"red\"'
-                                            g_messages[event_id + event_id_offset] = MessageDiag
-                                            event_id_offset = event_id_offset + 1                       
-                                    g_diag_rlc_sn[rlc_key] = int(sn)
-                            Message['type'] = "rx"
-                            Message['tx'] = entity2_id
-                            Message['rx'] = entity_id
-                            Message['discarded'] = False
-                            g_messages[event_id + event_id_offset] = Message
-
-                        elif arrow == '->':
-                            Message['type'] = "tx"
-                            Message['tx'] = entity_id
-                            Message['rx'] = entity2_id
-                            Message['discarded'] = False
-                            g_messages[event_id + event_id_offset] = Message
-                        elif arrow == 'x-':
-                            Message['type'] = "rx"
-                            Message['tx'] = entity2_id
-                            Message['rx'] = entity_id
-                            Message['discarded'] = True
-                            g_messages[event_id + event_id_offset] = Message
-                        elif arrow == '-x':
-                            Message['type'] = "tx"
-                            Message['tx'] = entity_id
-                            Message['rx'] = entity2_id
-                            Message['discarded'] = True
-                            g_messages[event_id + event_id_offset] = Message
-
-                    elif MSC_BOX_STR == event_type:
-                        sub_partition = partition[3].split(' ',1)
-                        time    = sub_partition[0]
-                        message = sub_partition[1]
-                        Message = {}
-                        Message['type'] = "box"
-                        Message['tx'] = entity_id
-                        Message['rx'] = entity_id
-                        Message['discarded'] = False
-                        Message['time'] = time
-                        Message['message'] = message
-                        Message['line_color'] = g_display_color[entity_id]
-                        Message['text_color'] = g_display_color[entity_id]
-                        g_messages[event_id + event_id_offset] = Message
-
-        except IOError, e:  
-            print ("File %s INPUT LINE:  %s " % (filename, line))
-            print 'err message'
-
-    #print("------------------------------------")
-    #print ("  %s " % ( g_messages ) )
-
-#    for event_id_int in sorted(g_messages.iterkeys()):
-
-
-
-def msc_chart_write_header(fileP):
-    global g_final_display_order_list
-    fileP.write("msc {\n")
-    fileP.write("width = \"2048\";\n")
-
-    entity_line_list_str = ''
-    #print ("  %s " % ( g_proto_names ) )
-    for entity in g_proto_names:
-        if entity != 'NotDeclared':
-            entity_line_list_str = entity_line_list_str + ' ' + entity + ','
-
-    entity_line_list_str = entity_line_list_str.rstrip().strip(',')
-    fileP.write("  %s;\n" % (entity_line_list_str))
-
-
-def msc_chart_write_footer(fileP):
-    fileP.write("\n}\n")
-
-def msc_chart_generate(file_nameP):
-    global  MSCGEN_OUTPUT_TYPE
-    print "Generating sequence diagram for ",file_nameP
-    command_line = "mscgen -T " + MSCGEN_OUTPUT_TYPE + " -i " + file_nameP
-    fi,fo,fe=os.popen3(command_line)
-    for i in fe.readlines():
-        print "error:",i
-
-def get_new_file_descriptor():
-    global g_base_file_name
-    global g_page_index
-    l_file_name = g_base_file_name + str(g_page_index)+'.txt'
-    l_file = open(l_file_name, "wb")
-    print "Generating mscgen input file ",l_file_name;
-    return l_file
-
-
-###### MAIN STAR HERE #################
-parse_oai_log_files()
-
-g_page_index    = 0
-g_message_index = 0
-g_now = datetime.datetime.now()
-g_now_formated = 'mscgen_' + args.profile.strip() + '_'+ g_now.strftime("%Y-%m-%d_%H.%M.%S")
-#g_currentdir = os.curdir
-g_resultdir = os.path.join(args.dir, g_now_formated)
-os.mkdir(g_resultdir)
-os.chdir(g_resultdir)
-
-g_base_file_name = args.profile.strip() + '_mscgen_page_'
-
-g_file = get_new_file_descriptor()
-msc_chart_write_header(g_file)
-
-for event_id_int in sorted(g_messages.iterkeys()):
-    message = g_messages[event_id_int]
-    if 'tx' in message['type']:
-        if "yes" == args.no_message.strip():
-            if g_proto_types[message['tx']] != g_proto_types[message['rx']]:
-                continue
-        if "yes" == args.no_pdu.strip():
-            if g_proto_types[message['tx']] == g_proto_types[message['rx']]:
-                continue   
-        g_file.write("  %s=>%s [ label = \"(%d|%s) %s\", linecolour=%s , textcolour=%s ] ;\n" % (g_proto_names[message['tx']], g_proto_names[message['rx']], event_id_int, message['time'], message['message'], message['line_color'], message['text_color']))
-
-    elif 'rx' in message['type']:
-        if "yes" == args.no_message.strip():
-            if g_proto_types[message['tx']] != g_proto_types[message['rx']]:
-                continue
-        if "yes" == args.no_pdu.strip():
-            if g_proto_types[message['tx']] == g_proto_types[message['rx']]:
-                continue   
-        g_file.write("  %s<=%s [ label = \"(%d|%s) %s\", linecolour=%s , textcolour=%s ] ;\n" % (g_proto_names[message['rx']], g_proto_names[message['tx']], event_id_int, message['time'], message['message'], message['line_color'], message['text_color']))
-
-    elif 'box' in message['type']:
-        if "yes" == args.no_event.strip():
-            continue  
-        g_file.write("  %s note %s [ label = \"%s\", textcolour=%s ] ;\n" % (g_proto_names[message['tx']], g_proto_names[message['rx']], message['message'], message['text_color']))
-
-    g_message_index = g_message_index + 1
-
-    if ((g_message_index % MAX_MESSAGES_PER_PAGE) == 0):
-        msc_chart_write_footer(g_file)
-        g_file.close()
-        msc_chart_generate(g_file.name)
-        g_page_index = g_page_index + 1
-
-        g_file = get_new_file_descriptor()
-        msc_chart_write_header(g_file)
-
-
-msc_chart_write_footer(g_file)
-g_file.close()
-msc_chart_generate(g_file.name)