[ndnSIM] forwarding-strategy.cc

Alex Afanasyev alexander.afanasyev at ucla.edu
Sun Mar 17 18:35:39 PDT 2013


Hi Yakun,

If you want to create and send out a slightly modified Interest inside the forwarding strategy, you can do something similar to what is done in nacks.cc: you create a new Interest, based on the existing interest that you have and then "replace" necessary parts (name).  For example,

...
Ptr<Interest> newInterest = Create<Interest> (*header);
newInterest->SetName (Create<Name> ("/some/new/name"));

Ptr<Packet> packet = Create<Packet> ();
nonNackInterest->AddHeader (*nonNackHeader);
...


---
Alex

On Mar 17, 2013, at 7:13 AM, "徐雅琨" <11111015 at bjtu.edu.cn> wrote:

> Hi Alex,
> I add few new bits in the name prefix as you suppose and these new bits in the prefix should not be handlled as the header name. So I wanna add a new header similiar to Ptr<const InterestHeader> header in forwarding-strategy.cc except for the name. In other words, I wanna reset the name in Ptr<const InterestHeader> header.
> I guess the router can only read NDN package without any modification.
> Confusing~~~~
>  
>  
> 祝您工作顺利,身体健康!
> 2013-03-17
> 徐雅琨
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130317/820aa894/attachment.html>


More information about the ndnSIM mailing list