[ndnSIM] ndnSIM: Modifying Interest Packet

Muhammad Hosain Abdollahi Sabet mhasabet at gmail.com
Thu Aug 18 00:45:36 PDT 2016


Alex,

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?

Thanks,
Sabet

خندان باشید
با تشکر

On Fri, Aug 12, 2016 at 9:15 PM, Alex Afanasyev <aa at cs.ucla.edu> wrote:

> Hi Pratyush,
>
> 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.
>
> I think the same applies to the tags with some exceptions that I cannot
> remember right now.
>
> --
> Alex
>
> > On Aug 12, 2016, at 8:32 AM, Pratyush Agnihotri <
> pratyushagnihotri03 at gmail.com> wrote:
> >
> > Hi Alex,
> >
> > 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.
> >
> > Is my understanding correct? Or, is there some way to write to buffer
> while the packet is in network?
> >
> > 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:-
> >
> > FwHopCountTag hopCount;
> >       bool tagExists = packet->RemovePacketTag (hopCount);
> >
> >       if (tagExists)
> >       {
> >           hopCount.Increment ();
> >               packet->AddPacketTag (hopCount);
> >         }
> >
> > 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.
> >
> > Please let me know.
> >
> > --
> > Kind Regards,
> > Pratyush Agnihotri
> > _______________________________________________
> > ndnSIM mailing list
> > ndnSIM at lists.cs.ucla.edu
> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160818/6be4bbeb/attachment.html>


More information about the ndnSIM mailing list