From 7aed1c665a4b89f63ceca9c33bc1e6ac374afc05 Mon Sep 17 00:00:00 2001 From: Manuel Requena Date: Fri, 14 Dec 2012 16:50:39 +0100 Subject: [PATCH] Remove X2-related sockets from EpcHelper --- src/lte/helper/epc-helper.cc | 26 ++++++-------------------- src/lte/helper/epc-helper.h | 5 ----- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/lte/helper/epc-helper.cc b/src/lte/helper/epc-helper.cc index aac0e43dc..e86218e63 100644 --- a/src/lte/helper/epc-helper.cc +++ b/src/lte/helper/epc-helper.cc @@ -46,8 +46,7 @@ NS_OBJECT_ENSURE_REGISTERED (EpcHelper); EpcHelper::EpcHelper () - : m_gtpuUdpPort (2152), // fixed by the standard - m_x2cUdpPort (4444) // fixed by the standard TODO + : m_gtpuUdpPort (2152) // fixed by the standard { NS_LOG_FUNCTION (this); @@ -249,35 +248,22 @@ EpcHelper::AddX2Interface (Ptr enb1, Ptr enb2) NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1 after assigning Ipv4 addr to X2 dev: " << enb1->GetObject ()->GetNInterfaces ()); NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #2 after assigning Ipv4 addr to X2 dev: " << enb2->GetObject ()->GetNInterfaces ()); - Ipv4Address enb1Address = enbIpIfaces.GetAddress (0); - Ipv4Address enb2Address = enbIpIfaces.GetAddress (1); + Ipv4Address enb1X2Address = enbIpIfaces.GetAddress (0); + Ipv4Address enb2X2Address = enbIpIfaces.GetAddress (1); - // Create X2-C socket for the eNB1 - Ptr enb1X2cSocket = Socket::CreateSocket (enb1, TypeId::LookupByName ("ns3::UdpSocketFactory")); - int retval = enb1X2cSocket->Bind (InetSocketAddress (enb1Address, m_x2cUdpPort)); - NS_ASSERT (retval == 0); - - // Create X2-C socket for the eNB2 - Ptr enb2X2cSocket = Socket::CreateSocket (enb2, TypeId::LookupByName ("ns3::UdpSocketFactory")); - retval = enb2X2cSocket->Bind (InetSocketAddress (enb2Address, m_x2cUdpPort)); - NS_ASSERT (retval == 0); - - - // Add X2 interface to the eNB1's X2 entity + // Add X2 interface to both eNBs' X2 entities Ptr enb1X2 = enb1->GetObject (); Ptr enb1LteDev = enb1->GetDevice (0)->GetObject (); uint16_t enb1CellId = enb1LteDev->GetCellId (); NS_LOG_LOGIC ("LteEnbNetDevice #1 = " << enb1LteDev << " - CellId = " << enb1CellId); - // Add X2 interface to the eNB2's X2 entity Ptr enb2X2 = enb2->GetObject (); Ptr enb2LteDev = enb2->GetDevice (0)->GetObject (); uint16_t enb2CellId = enb2LteDev->GetCellId (); NS_LOG_LOGIC ("LteEnbNetDevice #2 = " << enb2LteDev << " - CellId = " << enb2CellId); - enb1X2->AddX2Interface (enb1CellId, enb1X2cSocket, enb2CellId, enb2X2cSocket); - enb2X2->AddX2Interface (enb2CellId, enb2X2cSocket, enb1CellId, enb1X2cSocket); - + enb1X2->AddX2Interface (enb1CellId, enb1X2Address, enb2CellId, enb2X2Address); + enb2X2->AddX2Interface (enb2CellId, enb2X2Address, enb1CellId, enb1X2Address); } diff --git a/src/lte/helper/epc-helper.h b/src/lte/helper/epc-helper.h index d91147c46..de5310b37 100644 --- a/src/lte/helper/epc-helper.h +++ b/src/lte/helper/epc-helper.h @@ -182,11 +182,6 @@ private: Time m_x2LinkDelay; uint16_t m_x2LinkMtu; - /** - * UDP port where the GTP-U Socket is bound, fixed by the standard as 2152 TODO Check value in the spec - */ - uint16_t m_x2cUdpPort; - };