[ndnSIM] cannot change data attributes in onOutgoingData

Alex Afanasyev aa at CS.UCLA.EDU
Mon Mar 7 14:53:33 PST 2016


Data in NDN is immutable.  You cannot modify en route, i.e., all security properties associated with the data will be gone.

If you need to add something alongside to help with forwarding, you should use tags instead.

---
Alex

> On Mar 7, 2016, at 2:23 PM, Carl Zu <carlzu8 at gmail.com> wrote:
> 
> Hi,
> 
> I had added some attributes to data.hpp. Then I tried to change their value in onOutgoingData. But received following error:
> 
> ../src/ndnSIM/NFD/daemon/fw/forwarder.cpp:526:54: error: passing ‘const ndn::Data’ as ‘this’ argument of ‘void ndn::Data::setCarlComponents(ns3::Ptr<CarlComp>)’ discards qualifiers [-fpermissive]
>                data.setCarlComponents (cPointer);
> 
> Changing my attributes to mutable also did not help, i.e. only the same error appeared later.
> 
> Thanks for guidance in advance.
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160307/0f5fb3bb/attachment.bin>


More information about the ndnSIM mailing list