[ndnSIM] How to use ndnSIM helpers to specify custom field in interest packet.
Ygor Amaral
ygor.amaral at gmail.com
Wed Apr 7 16:58:23 PDT 2021
Hi Prajjwal,
I do not know if I fully understood your question.
ndnSIM has no helpers for creating new interest packet fields.
You need to change the Interest class (ndn-cxx library) to add new fields.
Path:
- ndnSIM/ns-3/src/ndnSIM/ndn-cxx/ndn-cxx/interest.cpp
- ndnSIM/ns-3/src/ndnSIM/ndn-cxx/ndn-cxx/interest.hpp
When creating a new interest packet, you will set the value of the new
field, similar to how it is done with the other fields. For example:
...
shared_ptr<Interest> interest = make_shared<Interest>();
interest->setOldField(value1);
interest->setNewField(value2);
...
send(*interest);
...
Regards,
Ygor Amaral
On Tue, Apr 6, 2021 at 3:26 AM Prajjwal Singh <csb17053 at tezu.ac.in> wrote:
> Hello all,
> After adding a custom field, say Priority, to the interest packet, how can
> I make use of ndnSIM helpers to specify this Priority field in the interest
> packets, while installing and specifying prefix to consumer nodes in the
> simulating examples?
>
> Thanks in advance,
> 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/20210407/82bfeb15/attachment.html>
More information about the ndnSIM
mailing list