[ndnSIM] ndnSIM: Modifying Interest Packet

Pratyush Agnihotri pratyushagnihotri03 at gmail.com
Fri Aug 12 08:32:07 PDT 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160812/13f55204/attachment.html>


More information about the ndnSIM mailing list