[Nfd-dev] Modify data packet

Alex Afanasyev aa at CS.UCLA.EDU
Mon Feb 8 17:09:47 PST 2016

> On Feb 7, 2016, at 8:19 PM, Junxiao Shi <shijunxiao at email.arizona.edu> wrote:
> ---------- Forwarded message ----------
> From: "Klaus Schneider" <klaus at cs.arizona.edu <mailto:klaus at cs.arizona.edu>>
> Date: Feb 7, 2016 21:11
> Subject: Modify data packet
> To: "Junxiao Shi" <shijunxiao at email.arizona.edu <mailto:shijunxiao at email.arizona.edu>>
> Cc:
> Hi Junxiao,
> is it possible to modify the data packet inside the call beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry, const Face& inFace, const Data& data) ?
> Can I for example set a new type like this:
> data.getMetaInfo().setType(XY);
> I tried it, but it doesn't seem to work for me.
> Best regards,
> Klaus

Data packet is marked const in the method interface and it is incorrect to modify the data packet from NDN semantical view.  In other words, modification of the data packet will violate immutability of data and invalidated signatures.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20160208/cc81fabb/attachment.html>
-------------- 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/nfd-dev/attachments/20160208/cc81fabb/attachment.bin>

More information about the Nfd-dev mailing list