lte: (fixes 2107) Enable PCAP tracing for X2 and S1U links
This commit is contained in:
@@ -37,6 +37,7 @@ New user-visible features
|
||||
Bugs fixed
|
||||
----------
|
||||
- Bug 1745 - There can be only one Ipv6AddressHelper in a script
|
||||
- Bug 2107 - Enable PCAP for S1 and X2 point-to-point links
|
||||
- Bug 2277 - lte: EpcTftClassifier::Classify blindly assumes that a packet has a L4 header
|
||||
- Bug 2505 - network: Avoid asserts in Header/Trailer deserialization
|
||||
- Bug 2656 - wifi: Minstrel and MinstrelHt provide different results for 802.11a/b/g
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/inet-socket-address.h>
|
||||
#include <ns3/mac48-address.h>
|
||||
#include <ns3/string.h>
|
||||
#include <ns3/boolean.h>
|
||||
#include <ns3/eps-bearer.h>
|
||||
#include <ns3/ipv4-address.h>
|
||||
#include <ns3/ipv4-address.h>
|
||||
@@ -174,6 +176,26 @@ PointToPointEpcHelper::GetTypeId (void)
|
||||
UintegerValue (3000),
|
||||
MakeUintegerAccessor (&PointToPointEpcHelper::m_x2LinkMtu),
|
||||
MakeUintegerChecker<uint16_t> ())
|
||||
.AddAttribute ("S1uLinkPcapPrefix",
|
||||
"Prefix for Pcap generated by S1-U link",
|
||||
StringValue ("s1-u"),
|
||||
MakeStringAccessor (&PointToPointEpcHelper::m_s1uLinkPcapPrefix),
|
||||
MakeStringChecker ())
|
||||
.AddAttribute ("X2LinkPcapPrefix",
|
||||
"Prefix for Pcap generated by X2 link",
|
||||
StringValue ("x2"),
|
||||
MakeStringAccessor (&PointToPointEpcHelper::m_x2LinkPcapPrefix),
|
||||
MakeStringChecker ())
|
||||
.AddAttribute ("X2LinkEnablePcap",
|
||||
"Enable Pcap for X2 link",
|
||||
BooleanValue (false),
|
||||
MakeBooleanAccessor (&PointToPointEpcHelper::m_enablePcapOverX2),
|
||||
MakeBooleanChecker ())
|
||||
.AddAttribute ("S1uLinkEnablePcap",
|
||||
"Enable Pcap for X2 link",
|
||||
BooleanValue (false),
|
||||
MakeBooleanAccessor (&PointToPointEpcHelper::m_enablePcapOverS1U),
|
||||
MakeBooleanChecker ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
@@ -215,11 +237,17 @@ PointToPointEpcHelper::AddEnb (Ptr<Node> enb, Ptr<NetDevice> lteEnbNetDevice, ui
|
||||
PointToPointHelper p2ph;
|
||||
p2ph.SetDeviceAttribute ("DataRate", DataRateValue (m_s1uLinkDataRate));
|
||||
p2ph.SetDeviceAttribute ("Mtu", UintegerValue (m_s1uLinkMtu));
|
||||
p2ph.SetChannelAttribute ("Delay", TimeValue (m_s1uLinkDelay));
|
||||
p2ph.SetChannelAttribute ("Delay", TimeValue (m_s1uLinkDelay));
|
||||
NetDeviceContainer enbSgwDevices = p2ph.Install (enb, m_sgwPgw);
|
||||
NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after installing p2p dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
|
||||
Ptr<NetDevice> enbDev = enbSgwDevices.Get (0);
|
||||
Ptr<NetDevice> sgwDev = enbSgwDevices.Get (1);
|
||||
|
||||
if (m_enablePcapOverS1U)
|
||||
{
|
||||
p2ph.EnablePcapAll(m_s1uLinkPcapPrefix);
|
||||
}
|
||||
|
||||
m_s1uIpv4AddressHelper.NewNetwork ();
|
||||
Ipv4InterfaceContainer enbSgwIpIfaces = m_s1uIpv4AddressHelper.Assign (enbSgwDevices);
|
||||
NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after assigning Ipv4 addr to S1 dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
|
||||
@@ -299,6 +327,11 @@ PointToPointEpcHelper::AddX2Interface (Ptr<Node> enb1, Ptr<Node> enb2)
|
||||
Ptr<NetDevice> enb1Dev = enbDevices.Get (0);
|
||||
Ptr<NetDevice> enb2Dev = enbDevices.Get (1);
|
||||
|
||||
if (m_enablePcapOverX2)
|
||||
{
|
||||
p2ph.EnablePcapAll(m_x2LinkPcapPrefix);
|
||||
}
|
||||
|
||||
m_x2Ipv4AddressHelper.NewNetwork ();
|
||||
Ipv4InterfaceContainer enbIpIfaces = m_x2Ipv4AddressHelper.Assign (enbDevices);
|
||||
NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1 after assigning Ipv4 addr to X2 dev: " << enb1->GetObject<Ipv4> ()->GetNInterfaces ());
|
||||
|
||||
@@ -151,11 +151,11 @@ private:
|
||||
* Map storing for each IMSI the corresponding eNB NetDevice
|
||||
*/
|
||||
std::map<uint64_t, Ptr<NetDevice> > m_imsiEnbDeviceMap;
|
||||
|
||||
/**
|
||||
* helper to assign addresses to X2 NetDevices
|
||||
|
||||
/**
|
||||
* helper to assign addresses to X2 NetDevices
|
||||
*/
|
||||
Ipv4AddressHelper m_x2Ipv4AddressHelper;
|
||||
Ipv4AddressHelper m_x2Ipv4AddressHelper;
|
||||
|
||||
/**
|
||||
* The data rate to be used for the next X2 link to be created
|
||||
@@ -172,6 +172,25 @@ private:
|
||||
* because of some big X2 messages, you need a big MTU.
|
||||
*/
|
||||
uint16_t m_x2LinkMtu;
|
||||
|
||||
/**
|
||||
* Enable PCAP generation for X2 link
|
||||
*/
|
||||
bool m_enablePcapOverX2;
|
||||
/**
|
||||
* Prefix for the PCAP file for the X2 link
|
||||
*/
|
||||
std::string m_x2LinkPcapPrefix;
|
||||
|
||||
/**
|
||||
* Enable PCAP generation for S1U link
|
||||
*/
|
||||
bool m_enablePcapOverS1U;
|
||||
|
||||
/**
|
||||
* Prefix for the PCAP file for the S1 link
|
||||
*/
|
||||
std::string m_s1uLinkPcapPrefix;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user