<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Alex,<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I can make a copy of Interest and modify it. How can I get it Forwarder::startProcessInterest to make it pass forwarding pipeline again? I mean, what about the incoming face? Any suggestion?<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks,<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Sabet<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br></div></div></div>
<br><div class="gmail_quote">On Thu, Aug 18, 2016 at 12:15 PM, Muhammad Hosain Abdollahi Sabet <span dir="ltr"><<a href="mailto:mhasabet@gmail.com" target="_blank">mhasabet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif">Alex,<br><br></div><div style="font-family:tahoma,sans-serif">How about setDelegation for LINKS? In ndnSIM 2.1 Interest packet is modified(using setSelectedDelegation) under circumstances and a LOGIC log is generated. How is that happening? buffe::reset()(which I couldn't find it in doxygen) copies an interest and replace it with the first one?<br><br></div><div style="font-family:tahoma,sans-serif">Thanks,<br></div><div style="font-family:tahoma,sans-serif">Sabet<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-5512074544042844764gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="rtl"><font face="tahoma, sans-serif">خندان باشید</font></div><div dir="rtl"><font face="tahoma, sans-serif">با تشکر</font></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Fri, Aug 12, 2016 at 9:15 PM, Alex Afanasyev <span dir="ltr"><<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pratyush,<br>
<br>
You're correct.  I would only restate is a little bit more general and say that NS3's Packet data structure cannot be modified by the routers.  What you can do is to make a copy of the packet and modify the copy.<br>
<br>
I think the same applies to the tags with some exceptions that I cannot remember right now.<br>
<br>
--<br>
Alex<br>
<div><div class="m_-5512074544042844764h5"><br>
> On Aug 12, 2016, at 8:32 AM, Pratyush Agnihotri <<a href="mailto:pratyushagnihotri03@gmail.com" target="_blank">pratyushagnihotri03@gmail.com</a><wbr>> wrote:<br>
><br>
> Hi Alex,<br>
><br>
> I am trying to modify Interest packet for my custom forwarding strategy in ndnSIM 1.0. I observed that once the Interest packet (header + payload) is serialized to the network, it cannot be modified by intermediate nodes (e.g., in the forwarding strategy). The packet is only deserialized by relay (or intermediate) nodes and cannot be written (or modified) by them. I checked the source file ndnSIM/model/wire/ndnsim.cc, Serialize() and Deserialize() functions for the same.<br>
><br>
> Is my understanding correct? Or, is there some way to write to buffer while the packet is in network?<br>
><br>
> For e.g., FwHopCountTag is the by given as example how to add information in payload. If one want to increment the hop count and re-write to payload as follows:-<br>
><br>
> FwHopCountTag hopCount;<br>
>       bool tagExists = packet->RemovePacketTag (hopCount);<br>
><br>
>       if (tagExists)<br>
>       {<br>
>           hopCount.Increment ();<br>
>               packet->AddPacketTag (hopCount);<br>
>         }<br>
><br>
> This tries to increment the hopCount, but it doesn't actually increment if I print the value. This means even though I re-write to the payload, it doesn't update the packet.<br>
><br>
> Please let me know.<br>
><br>
> --<br>
> Kind Regards,<br>
> Pratyush Agnihotri<br>
</div></div>> ______________________________<wbr>_________________<br>
> ndnSIM mailing list<br>
> <a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
<br>
<br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>