[ndnSIM] How to add a new TLV filed to the Data packet

Ru Jia rujia721 at gmail.com
Mon May 8 07:48:04 PDT 2017

I basically add a tag mimic how HopCountTag was coded, but I am not sure
the increment operation of that tag value should be add to which method.

Ru Jia

On Mon, May 8, 2017 at 9:22 PM, Ru Jia <rujia721 at gmail.com> wrote:

> Hi,
> I have seen that blog before I ask the question, but it still don't  make
> everything clear. For instance, in the first segment "First Steps", he
> gives several lines of codes, but which files should I add those line in or
> should I create a new file contains all of those codes? Is it too much
> effort for just adding a new tag?
> Yours,
> Ru Jia
> Spyridon (Spyros) Mastorakis <mastorakis at cs.ucla.edu>于2017年5月8日
> 周一上午2:50写道:
>> Hi,
>> Junxiao pointed you to a link with specific steps on how to add a custom
>> TLV to NDN packets in ndnSIM.
>> Please read through the steps described there and follow them.
>> Thanks,
>> Spyridon (Spyros) Mastorakis
>> Personal Website: http://cs.ucla.edu/~mastorakis/
>> Internet Research Laboratory
>> Computer Science Department
>> On May 7, 2017, at 9:26 AM, Ru Jia <rujia721 at gmail.com> wrote:
>> Dear Junxiao,
>> I am sorry I didn't make myself more clear, I dipected it more specific
>> last time and I thought it would be the same gay reply to me. The thing is
>> I want to determine whether the routers should cache the data based on the
>> number of times the data was requested, so I only need to count the number
>> of the first several times when data packet is still fetched from the
>> provider.
>> Last time, Spyridon Mastorakis replied my email and told me I could add
>> a new TLV field to the Data packet and increment it every time that this
>> data packet is requested. But i am still a little confused about how to
>> realize that.
>> Ru Jia
>> On Sun, May 7, 2017 at 3:39 AM, Junxiao Shi <shijunxiao at email.arizona.edu
>> > wrote:
>>> Hi Ru
>>> Before talking about code, we need to understand the protocol.
>>> NDN network is a distributed system, c and forwarding is hop-by-hop.
>>> Every NDN node has a ContentStore which is an opportunistic cache of Data
>>> packets.
>>> A Data is "requested" if a consumer expresses an Interest that can be
>>> satisfied by the Data. The Data can be served from a producer, or from a
>>> cache anywhere in the network.
>>> While a node can count how many times a Data is "requested" by an
>>> Interest reaching this node, it would not be possible to count how many
>>> times a Data is requested globally without using additional control
>>> messages.
>>> Regarding code: see https://lo.calho.st/networ
>>> ks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-
>>> without-forking-the-entire-repository/
>>> Yours, Junxiao
>>> On May 6, 2017 12:06, "Ru Jia" <rujia721 at gmail.com> wrote:
>>> Hello,
>>> If I want to record the number of times the data was requested, how to
>>> add a new TLV filed to the Data packet? Is there any material or codes that
>>> I can refer to?
>>> Thanks advanced for your response.
>>> Ru Jia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170508/37f3a2c8/attachment.html>

More information about the ndnSIM mailing list