Thank you Johannes, Sabastian,
I tried both of your approaches. I believe both lead me to the same thing. Here is a simple script I wrote to return whenever there is an activity that happens w.r.t IBR-DTN bundles:
*def GetPortActivity():* * '''Get the activity of the current localhost either sending or listening'''* * retList = RunCommand('netstat --tcp -n | grep %s | grep %s'%(Params.get_myIP(),':4556'), False)*
* # Get information from data[1] and data[2]* * if (retList[1]):* * all_lines = retList[1].rstrip().split('\n')* * for line in all_lines:* * data = line.split()* * # Check if something is happening..Data format => [TCP, Recv, Send, Bytes, Local_IP:Port, Remote_IP:Port, Status] * * if (toInt(data[1]) > 0 or toInt(data[2]) > 0):* * # Just log the data* * Task.LogData(line)* * return True* * return False*
--- netstat -c -n, did the trick for me, its fast and reliable. This logic will be used to give the knowledge to the drone for any to-fro data transactions. This was an important step for me.
I also want to appreciate the stability of the later versions and the source is C++ source is well written. Thank you and long live IBR-DTN :)))))
Best Regards, Shyam