Helper class to handle the creation of the EPC entities and protocols. More...
#include <epc-helper.h>
Public Member Functions | |
EpcHelper () | |
virtual | ~EpcHelper () |
void | ActivateEpsBearer (Ptr< NetDevice > ueLteDevice, Ptr< NetDevice > enbLteDevice, Ptr< EpcTft > tft, uint16_t rnti, uint8_t lcid) |
void | AddEnb (Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice) |
Ipv4InterfaceContainer | AssignUeIpv4Address (NetDeviceContainer ueDevices) |
virtual void | DoDispose () |
Ptr< Node > | GetPgwNode () |
Ipv4Address | GetUeDefaultGatewayAddress () |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Start (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~ObjectBase () |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::EpcHelper. |
Private Attributes | |
uint16_t | m_gtpuUdpPort |
Ipv4AddressHelper | m_s1uIpv4AddressHelper |
DataRate | m_s1uLinkDataRate |
Time | m_s1uLinkDelay |
uint16_t | m_s1uLinkMtu |
Ptr< Node > | m_sgwPgw |
Ptr< EpcSgwPgwApplication > | m_sgwPgwApp |
Ptr< VirtualNetDevice > | m_tunDevice |
Ipv4AddressHelper | m_ueAddressHelper |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoStart (void) |
virtual void | NotifyNewAggregate (void) |
Helper class to handle the creation of the EPC entities and protocols.
This Helper will create an EPC network topology comprising of a single node that implements both the SGW and PGW functionality, and is connected to all the eNBs in the simulation by means of the S1-U interface.
Definition at line 46 of file epc-helper.h.
ns3::EpcHelper::EpcHelper | ( | ) |
Constructor
Definition at line 42 of file epc-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddApplication(), ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), ns3::Socket::CreateSocket(), ns3::Ipv4Address::GetAny(), ns3::InternetStackHelper::Install(), ns3::TypeId::LookupByName(), m_gtpuUdpPort, m_s1uIpv4AddressHelper, m_sgwPgw, m_sgwPgwApp, m_tunDevice, m_ueAddressHelper, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, ns3::EpcSgwPgwApplication::RecvFromTunDevice(), ns3::VirtualNetDevice::SetAddress(), ns3::ObjectBase::SetAttribute(), and ns3::Ipv4AddressHelper::SetBase().
|
virtual |
void ns3::EpcHelper::ActivateEpsBearer | ( | Ptr< NetDevice > | ueLteDevice, |
Ptr< NetDevice > | enbLteDevice, | ||
Ptr< EpcTft > | tft, | ||
uint16_t | rnti, | ||
uint8_t | lcid | ||
) |
Activate an EPS bearer, setting up the corresponding S1-U tunnel.
ueLteDevice | the Ipv4-enabled device of the UE, normally connected via the LTE radio interface |
enbLteDevice | the non-Ipv4-enabled device of the eNB |
tft | the Traffic Flow Template of the new bearer |
rnti | the Radio Network Temporary Identifier that identifies the UE |
lcid | the Logical Channel IDentifier of the corresponding RadioBearer |
Definition at line 199 of file epc-helper.cc.
References ns3::EpcSgwPgwApplication::ActivateS1Bearer(), ns3::Ipv4::GetAddress(), ns3::Node::GetApplication(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4::GetNAddresses(), ns3::Node::GetNApplications(), ns3::Ipv4::GetNInterfaces(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), m_sgwPgwApp, NS_ASSERT, and NS_LOG_LOGIC.
Referenced by ns3::LteHelper::ActivateEpsBearer(), ns3::EpcS1uDlTestCase::DoRun(), and ns3::EpcS1uUlTestCase::DoRun().
Add an eNB to the EPC
enbNode | the previosuly created eNB node which is to be added to the EPC |
lteEnbNetDevice | the LteEnbNetDevice of the eNB node |
Definition at line 132 of file epc-helper.cc.
References ns3::NodeContainer::Add(), ns3::Node::AddApplication(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), ns3::Socket::Connect(), ns3::Socket::CreateSocket(), ns3::NetDeviceContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Node::GetApplication(), ns3::Mac48Address::GetBroadcast(), ns3::NetDevice::GetIfIndex(), ns3::Node::GetNApplications(), ns3::Ipv4::GetNInterfaces(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), ns3::PointToPointHelper::Install(), ns3::InternetStackHelper::Install(), ns3::TypeId::LookupByName(), m_gtpuUdpPort, m_s1uIpv4AddressHelper, m_s1uLinkDataRate, m_s1uLinkDelay, m_s1uLinkMtu, m_sgwPgw, ns3::Ipv4AddressHelper::NewNetwork(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::Ipv4L3Protocol::PROT_NUMBER, ns3::PointToPointHelper::SetChannelAttribute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().
Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and ns3::LteHelper::InstallSingleEnbDevice().
Ipv4InterfaceContainer ns3::EpcHelper::AssignUeIpv4Address | ( | NetDeviceContainer | ueDevices | ) |
Assign IPv4 addresses to UE devices
ueDevices | the set of UE devices |
Definition at line 248 of file epc-helper.cc.
References ns3::Ipv4AddressHelper::Assign(), and m_ueAddressHelper.
Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
Definition at line 122 of file epc-helper.cc.
References ns3::Object::Dispose(), m_sgwPgw, m_sgwPgwApp, m_tunDevice, ns3::MakeNullCallback(), and ns3::VirtualNetDevice::SetSendCallback().
Definition at line 241 of file epc-helper.cc.
References m_sgwPgw.
Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().
|
static |
This method returns the TypeId associated to ns3::EpcHelper.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Definition at line 97 of file epc-helper.cc.
References m_s1uLinkDataRate, m_s1uLinkDelay, m_s1uLinkMtu, ns3::Seconds(), and ns3::TypeId::SetParent().
Ipv4Address ns3::EpcHelper::GetUeDefaultGatewayAddress | ( | ) |
Definition at line 256 of file epc-helper.cc.
References ns3::Object::GetObject(), and m_sgwPgw.
Referenced by ns3::EpcS1uUlTestCase::DoRun(), and main().
|
private |
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152
Definition at line 142 of file epc-helper.h.
Referenced by AddEnb(), and EpcHelper().
|
private |
helper to assign addresses to S1-U NetDevices
Definition at line 123 of file epc-helper.h.
Referenced by AddEnb(), and EpcHelper().
|
private |
Definition at line 134 of file epc-helper.h.
Referenced by AddEnb(), and GetTypeId().
|
private |
Definition at line 135 of file epc-helper.h.
Referenced by AddEnb(), and GetTypeId().
|
private |
Definition at line 136 of file epc-helper.h.
Referenced by AddEnb(), and GetTypeId().
Definition at line 130 of file epc-helper.h.
Referenced by AddEnb(), DoDispose(), EpcHelper(), GetPgwNode(), and GetUeDefaultGatewayAddress().
|
private |
Definition at line 131 of file epc-helper.h.
Referenced by ActivateEpsBearer(), DoDispose(), and EpcHelper().
|
private |
Definition at line 132 of file epc-helper.h.
Referenced by DoDispose(), and EpcHelper().
|
private |
helper to assign addresses to UE devices as well as to the TUN device of the SGW/PGW
Definition at line 128 of file epc-helper.h.
Referenced by AssignUeIpv4Address(), and EpcHelper().