[ndnSIM] How to put some information to an Interest?

Alex Afanasyev alexander.afanasyev at ucla.edu
Sun Dec 1 12:12:26 PST 2013


Hi Dex,

The only reason for the Set/GetPayload in Interest is to provide a mechanism to set so called PacketTags (these tags can be associated only with Packet class).

These PacketTags, I think, should help you in your case.  What you need is to create a class, similar to https://github.com/NDN-Routing/ndnSIM/blob/master/utils/ndn-fw-hop-count-tag.h and then Add this tag to the Interest's "payload" before sending out and Remove (=read) the tag after receiving.

---
Alex

On Nov 27, 2013, at 6:25 AM, 丁锟 <dex0268 at gmail.com> wrote:

> Hi, Alex
> 
> I want to put some parameters into an Interest for the purpose that a downlink node may convey some control information that designed by myself to a uplink node. Then I found that Interest class has a function named SetPayload(). Could I use SetPayload()? Should I design a new application?  Could you please present a simple example file?
> 
> 
> ----------
> Dex 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20131201/407bee85/attachment.html>


More information about the ndnSIM mailing list