EpcHelper --> GtpuTunnelHelper
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "ns3/csma-helper.h"
|
||||
#include "ns3/applications-module.h"
|
||||
#include "ns3/ipv4-global-routing-helper.h"
|
||||
#include "ns3/epc-helper.h"
|
||||
#include "ns3/gtpu-tunnel-helper.h"
|
||||
//#include "ns3/gtk-config-store.h"
|
||||
|
||||
using namespace ns3;
|
||||
@@ -73,7 +73,7 @@ main (int argc, char *argv[])
|
||||
csma.EnableAsciiAll (ascii.CreateFileStream ("epc-gtp.tr"));
|
||||
csma.EnablePcapAll ("epc-gtp");
|
||||
|
||||
EpcHelper epcHelper;
|
||||
GtpuTunnerHelper epcHelper;
|
||||
|
||||
epcHelper.InstallGtpu (c.Get (0));
|
||||
epcHelper.InstallGtpu (c.Get (1));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Author: Jaume Nin <jnin@cttc.es>
|
||||
*/
|
||||
|
||||
#include <ns3/epc-helper.h>
|
||||
#include <ns3/gtpu-tunnel-helper.h>
|
||||
#include <ns3/log.h>
|
||||
#include "ns3/inet-socket-address.h"
|
||||
#include "ns3/mac48-address.h"
|
||||
@@ -27,40 +27,40 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("EpcHelper");
|
||||
NS_LOG_COMPONENT_DEFINE ("GtpuTunnerHelper");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (EpcHelper);
|
||||
NS_OBJECT_ENSURE_REGISTERED (GtpuTunnerHelper);
|
||||
|
||||
EpcHelper::EpcHelper () : m_udpPort (2152)
|
||||
GtpuTunnerHelper::GtpuTunnerHelper () : m_udpPort (2152)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_mask = "255.255.255.0";
|
||||
m_ipv4.SetBase ( "100.0.0.0", m_mask);
|
||||
}
|
||||
|
||||
EpcHelper::~EpcHelper ()
|
||||
GtpuTunnerHelper::~GtpuTunnerHelper ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
TypeId
|
||||
EpcHelper::GetTypeId (void)
|
||||
GtpuTunnerHelper::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::EpcHelper")
|
||||
static TypeId tid = TypeId ("ns3::GtpuTunnerHelper")
|
||||
.SetParent<Object> ()
|
||||
.AddConstructor<EpcHelper> ()
|
||||
.AddConstructor<GtpuTunnerHelper> ()
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
EpcHelper::InstallGtpu (Ptr<Node> n)
|
||||
GtpuTunnerHelper::InstallGtpu (Ptr<Node> n)
|
||||
{
|
||||
InstallGtpu (n, m_ipv4.NewAddress ());
|
||||
}
|
||||
|
||||
void
|
||||
EpcHelper::InstallGtpu (Ptr<Node> n, Ipv4Address addr)
|
||||
GtpuTunnerHelper::InstallGtpu (Ptr<Node> n, Ipv4Address addr)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
// UDP socket creation and configuration
|
||||
@@ -81,7 +81,7 @@ EpcHelper::InstallGtpu (Ptr<Node> n, Ipv4Address addr)
|
||||
}
|
||||
|
||||
void
|
||||
EpcHelper::CreateGtpuTunnel (Ptr<Node> n, Ipv4Address nAddr, Ptr<Node> m, Ipv4Address mAddr)
|
||||
GtpuTunnerHelper::CreateGtpuTunnel (Ptr<Node> n, Ipv4Address nAddr, Ptr<Node> m, Ipv4Address mAddr)
|
||||
{
|
||||
uint32_t teid = m_gtpuEndpoint[n]->CreateGtpuTunnel (mAddr);
|
||||
m_gtpuEndpoint[m]->CreateGtpuTunnel (nAddr, teid);
|
||||
@@ -18,8 +18,8 @@
|
||||
* Author: Jaume Nin <jnin@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef EPC_HELPER_H_
|
||||
#define EPC_HELPER_H_
|
||||
#ifndef GTPU_TUNNEL_HELPER_H_
|
||||
#define GTPU_TUNNEL_HELPER_H_
|
||||
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/ipv4-address.h"
|
||||
@@ -35,18 +35,18 @@ class GtpuTunnelEndpoint;
|
||||
/**
|
||||
* Helper class to handle the creation of the EPC entities and protocols
|
||||
*/
|
||||
class EpcHelper : public Object
|
||||
class GtpuTunnerHelper : public Object
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
EpcHelper ();
|
||||
GtpuTunnerHelper ();
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~EpcHelper ();
|
||||
virtual ~GtpuTunnerHelper ();
|
||||
|
||||
/**
|
||||
* Inherited from ns3::Object
|
||||
@@ -84,4 +84,4 @@ private:
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* EPC_HELPER_H_ */
|
||||
#endif /* GTPU_TUNNEL_HELPER_H_ */
|
||||
@@ -32,7 +32,7 @@ def build(bld):
|
||||
'model/lte-ue-net-device.cc',
|
||||
'model/ideal-control-messages.cc',
|
||||
'helper/lena-helper.cc',
|
||||
'helper/epc-helper.cc',
|
||||
'helper/gtpu-tunnel-helper.cc',
|
||||
'helper/rlc-stats-calculator.cc',
|
||||
'helper/mac-stats-calculator.cc',
|
||||
'model/ff-mac-csched-sap.cc',
|
||||
@@ -106,7 +106,7 @@ def build(bld):
|
||||
'model/lte-ue-net-device.h',
|
||||
'model/ideal-control-messages.h',
|
||||
'helper/lena-helper.h',
|
||||
'helper/epc-helper.h',
|
||||
'helper/gtpu-tunnel-helper.h',
|
||||
'helper/mac-stats-calculator.h',
|
||||
'helper/rlc-stats-calculator.h',
|
||||
'model/ff-mac-common.h',
|
||||
|
||||
Reference in New Issue
Block a user