[ndnSIM] Additional info to Data and Interest

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Tue Jul 25 20:04:54 PDT 2017


yes, you can modify the Data and Interest classes to add the attributes that you want, but please make sure that you modify the wireEncode and wireDecode methods properly so that  the newly added fields are encoded and decoded to/from wire format.

You can also take a look here on how to add custom Tags to packets:

https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/ <https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/>

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

> On Jul 25, 2017, at 2:38 AM, Surnin Oleg <o.surnin at innopolis.ru> wrote:
> Dear all,
> I want to add and then check  some additional info when receive Interest or Data(and update  info if necessary). 
> What is the best way to add this info to  Interests and Data?
> I'm thinking about modify the Data and Interest classes(add a string variable), but I'm not sure it's OK? Or maybe it's possible to add some tag or change header of the packet?
> Best regards,
> Oleg .

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170725/5c762022/attachment.html>

More information about the ndnSIM mailing list