<div dir="ltr"><span style="font-size:12.8px">Hi Alex,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Is my understanding correct? Or, is there some way to write to buffer while the packet is in network?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">For e.g., <span style="font-size:12.8px">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:-</span></div><span class="im" style="font-size:12.8px"><div style="font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-size:12.8px"><div style="font-size:12.8px"><div>FwHopCountTag hopCount;</div><div><span style="white-space:pre-wrap">       </span>bool tagExists = packet->RemovePacketTag (hopCount);</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if (tagExists)</div><div><span style="white-space:pre-wrap">   </span>{</div><div><span style="white-space:pre-wrap">        </span>    hopCount.Increment ();</div><div><span style="white-space:pre-wrap">            </span>packet->AddPacketTag (hopCount);</div></div><div style="font-size:12.8px">        }</div></div><div style="font-size:12.8px"><br></div></span><div style="font-size:12.8px">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.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Please let me know.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Kind Regards,<div>Pratyush Agnihotri</div></div></div>
</div>