[ndnSIM] [EXT] How to add a new field in Interest Packet.

Junxiao Shi shijunxiao at email.arizona.edu
Mon May 3 10:42:12 PDT 2021


Hi Prajjwal

If forwarder cannot modify this field:
Put it as part of the Name or ApplicationParameters.

If forwarder can modify this field:
It should be added to the hop-by-hop header.
See
https://lo.calho.st/posts/ndnsim-custom-fields/ for specific steps.
Note that InterestLifetime, Nonce, and HopLimit are modifiable by the
forwarder so they technically belong to the hop-by-hop header; they are in
Interest due to historic reason.

Yours, Junxiao

On Mon, May 3, 2021 at 12:37 Prajjwal Singh <csb17053 at tezu.ac.in> wrote:

> *External Email*
> Hello all,
> I am trying to add a new field, Priority, to interest Packets.
>
> Till now I have followed this:
>
>    1.  Add field in tlv.hpp
>    2.  Add member and its getter and setter functions in interest.hpp
>    3.  Implement the functions in interest.cpp
>    4. Modify the encoding function wireEncode() and decoding function
>    wireDecode() in interest.cpp
>
> Then I added some code to set the Priority field for interest packets by
> SetAttribute features of the ndnHelpers.
>
> But now My problem is that the Priority field gets set to default after
> the first hop.
> Please help me make this work.
>
> Thank you,
> Prajjwal Singh
>
> _______________________________________________
> 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/20210503/b4f1138b/attachment.html>


More information about the ndnSIM mailing list