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

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Mon Apr 11 11:05:52 PDT 2016


Hi,

I do not know what exactly you have changed in the ndnSIM codebase, but I will try to make a guess on what might be going on.

When you retrieve a data packet from a cache, a hop count tag is added to the data packet (with a value of 0). Probably you tried to print out the value of the hop count before this is set to 0 after you retrieve a data packet from a cache. In this way, you are printing out the value of a variable that has not been initialized yet.

Hope that this helps.

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA


> On Apr 9, 2016, at 6:43 AM, qhsong <ndn at sqh.me> wrote:
> 
> 
> 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/20160411/d0d80177/attachment.html>


More information about the ndnSIM mailing list