[ndnSIM] Questions Regarding the Retransmission

Marzieh Babaeianjelodar babaeim at clarkson.edu
Tue Sep 26 09:16:05 PDT 2017

Hi All,

I have a 3 node, wireless scenario which one is the consumer the other is the producer and the middle one is the relay node, and I am using CosnumerBatches. I am trying to send the Interest packet from node 0 to node 1 and then node 2 and get the data back to node 1 and node 0.

Based on my previous problem, which was the fact that my logs are showing that all of the nodes are getting the data back for the first Interest packet, but for the next Interest Packets they don't work well and node 0 is not getting the data back, I tried to focus and understand the retransmission structure and I logged all of the functions inside the Consumer.cpp, and Consumerbatches.cpp and apps.cpp file, I used the ns3 logging system to do that. 

There are some questions that I have and by reading the ndnSIM documentation and NS3 documentation I couldn't find out. The first one is that from the logs

1. How is GetTypeId is getting called? who is calling it? it is getting called even before the constructor or even before any simulator is running.

2. How is SetRetxTimer getting called? I know it is inside the consumer function but who is calling it?

3. Inside the Simulator::Schedule I found out that CheckRetxTimer is getting called 50ms in the future but then inside CheckRetxTimeout again CheckRetxTimeOut is getting called 50ms in the future, so an infinite loop is getting created which calls CheckRetxTimeout every 50 mseconds. Is that how it is working?

This is the first part of my logs when I logged all the functions:

0s -1 ndn.App:App()
0s -1 ndn.Consumer:Consumer()
0s -1 ndn.ConsumerBatches:ConsumerBatches(): [DEBUG] m_initial: 1
0s -1 ndn.Consumer:SetRetxTimer(): [DEBUG] m_retxTimer: 0s, m_retxEvent.IsRunning(): 0
0s -1 ndn.Consumer:SetRetxTimer(): [DEBUG] m_retxTimer: 0.05s, m_retxEvent.IsRunning(): 1
0s -1 ndn.App:App()
0s -1 ndn.Producer:Producer()
Could not load icon applets-screenshooter due to missing gnomedesktop Python module
Could not load icon gnome-terminal due to missing gnomedesktop Python module
scanning topology: [0, 3) nodes...
0s 0 ndn.App:DoInitialize(): [DEBUG] m_appId: 0
0s 2 ndn.App:DoInitialize(): [DEBUG] m_appId: 0
0s 0 ndn.ConsumerBatches:StartApplication()
0s 0 ndn.Consumer:StartApplication()
0s 0 ndn.App:StartApplication()
0s 0 ndn.ConsumerBatches:ScheduleNextPacket(): [DEBUG] before: m_sendEvent.IsRunning(): 0, m_rtt->RetransmissionTimeout is: 1s, Delay is: 0s, m_initial: 1
0s 0 ndn.ConsumerBatches:ScheduleNextPacket(): [DEBUG] after: m_sendEvent.IsRunning(): 1, m_rtt->RetransmissionTimeout is: 1s, Delay is: 0s, m_initial: 0
0s 0 ndn.ConsumerBatches:StartApplication(): [DEBUG] inside for loop.
0s 2 ndn.Producer:StartApplication()
0s 2 ndn.App:StartApplication()
0s 0 ndn.Consumer:SendPacket(): [DEBUG] Sequence number is: 0, m_seqMax: 0, so it returns!!!
0.05s -1 ndn.Consumer:CheckRetxTimeout(): [DEBUG] Time now: 0.05s, Current RTO is 1s, m_retxTimer:0.05s
0.05s -1 ndn.Consumer:CheckRetxTimeout(): [DEBUG] m_seqTimeouts.empty():1
0.1s -1 ndn.Consumer:CheckRetxTimeout(): [DEBUG] Time now: 0.1s, Current RTO is 1s, m_retxTimer:0.05s
0.1s -1 ndn.Consumer:CheckRetxTimeout(): [DEBUG] m_seqTimeouts.empty():1
0.15s -1 ndn.Consumer:CheckRetxTimeout(): [DEBUG] Time now: 0.15s, Current RTO is 1s, m_retxTimer:0.05s
0.15s -1 ndn.Consumer:CheckRetxTimeout(): [DEBUG] m_seqTimeouts.empty():1

Thanks in advance,


More information about the ndnSIM mailing list