I've been filling with the tcp-variants-comparison.cc code such that I can have different different flow with different access delays as follow:
(Sources) (Sinks)
15ms 15ms
n1--------------------------( )--------------------------------n3
gw1
n2--------------------------( )--------------------------------n4
25ms 25ms
Connections are set up such that n1 is sending to n3 and n2 is sending to n4. I was able to used the tracing function to trace the rtt on n1 with no problem. However, I'm also trying to do the same with n2.
The code in the program is:
static void
RttTracer (Time oldval, Time newval)
{
if (firstRtt)
{
*rttStream->GetStream () << "0.0 " << oldval.GetSeconds () << std::endl;
firstRtt = false;
}
*rttStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval.GetSeconds () << std::endl;
NS_LOG_INFO ("In CallBack Function: RttTracer!");
}
static void
TraceRtt (std::string rtt_tr_file_name)
{
AsciiTraceHelper ascii;
rttStream = ascii.CreateFileStream (rtt_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/RTT", MakeCallback (&RttTracer));
}
I am aware that in "/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/RTT", the 1 corresponds with n1 and that the node list index is based on the order in which the node is generated. In my case n2 has the NodeList index of 2. However, changing the 1 => 3 does not yield any traces.
Any input on this matter is appreciated!