[ndnSIM] [EXT] Addaing a flag

Junxiao Shi shijunxiao at email.arizona.edu
Mon Mar 15 05:53:28 PDT 2021

Hi Eme

NDN packet format uses TLV structure:
A bit flag is indicated by the presence or absence of an TLV element.
The CanBePrefix flag in the Interest is an example: if the flag is set,
it's encoded as {0x21,0x00}; if the flag is cleared, it's encoded as

You can certainly declare multiple fields using the method of
Make sure they have district tag number and TLV-TYPE number assignments.

Yours, Junxiao

On Mon, Mar 15, 2021, 08:38 Reasearch Associate <ra.vanets2019 at gmail.com>

> *External Email*
> Got it, thank you  Junxiao
> I have to add it in a hop-by-hop scenario. is it possible to add a single
> bit flag by using the method in the link. Two more things I want to clarify
> 1) can i use more than one tags.additional fields by using the
> prescribe method.
> 2) Where to set the flag either at the producer app/strategy or in the
> forwarder file Onoutgoingdata method.
> plz guide me if I am going out of track.
> Best regards
> Eme
> On Mon, 15 Mar 2021 at 17:19, Junxiao Shi <shijunxiao at email.arizona.edu>
> wrote:
>> Hi Eme
>> You didn't describe the semantics of these fields.
>> If they are end-to-end and don't change in the network, it's easiest to
>> include them as either a name component or in the Content payload.
>> If they may change hop-by-hop, see:
>> https://lo.calho.st/posts/ndnsim-custom-fields/
>> Yours, Junxiao
>> On Mon, Mar 15, 2021, 06:32 Reasearch Associate via ndnSIM <
>> ndnsim at lists.cs.ucla.edu> wrote:
>>> *External Email*
>>> Hi
>>> Dear experts, I need your help,
>>> I want to add an additional two bit flag at the end of the data packet.
>>> Is it possible to add an additional flag to the data packet if yes then
>>> how can I do so??
>>> your contribution will be highly appreciated.
>>> Best regards
>>> Eme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210315/a4665f95/attachment.html>

More information about the ndnSIM mailing list