[ndnSIM] Fwd: How to add a path count in data packet?

qhsong ndn at sqh.me
Sat Apr 9 06:43:36 PDT 2016


Hello,
Recently I want to accomplish a Path coordination Content Store policy on
ndnSIM, and I want to a node receive a data and see the data can be or not
stored in it.
So I add a int attribute named hop in Data class, and then decrease it in
Forward::onOutgoingData, When I find this hop is 0, then I add it.

But I found some problem, First, It seems onOutgoingData function will call
not one times in same face, and also called by may threads.So hop count
number seem so wired,just like following ,Count is the hop attribute:

Face ID: 256 data=/prefix/%FE%1E Count:5
Face ID: 257 data=/prefix/%FE%1E Count:4
Face ID: 256 data=/prefix/%FE%1E Count:4
Face ID: 256 data=/prefix/%FE%1E Count:-1
Face ID: 256 data=/prefix/%FE%1E Count:160658872
Face ID: 256 data=/prefix/%FE%1E Count:160680288
Face ID: 256 data=/prefix/%FE%1E Count:161002048
Face ID: 257 data=/prefix/%FE%1E Count:160788463
Face ID: 256 data=/prefix/%FE%1E Count:160579534
Face ID: 258 data=/prefix/%FE%1E Count:160429366
Face ID: 256 data=/prefix/%FE%1E Count:5
Face ID: 257 data=/prefix/%FE%1E Count:161011245
Face ID: 256 data=/prefix/%FE%1E Count:161011240
Face ID: 256 data=/prefix/%FE%1E Count:161011235
Face ID: 256 data=/prefix/%FE%1E Count:160825346
Face ID: 256 data=/prefix/%FE%1E Count:160825342
Face ID: 256 data=/prefix/%FE%1E Count:160825338
Face ID: 256 data=/prefix/%FE%1E Count:160825334
Face ID: 256 data=/prefix/%FE%1E Count:160825330
Face ID: 257 data=/prefix/%FE%1E Count:160825327
Face ID: 258 data=/prefix/%FE%1E Count:160825325
​
I have no idea about this, could your gives me some clue on this, and how
to avoid this?

thanks for your help.

qhsong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160409/36b045a7/attachment.html>


More information about the ndnSIM mailing list