[Mini-NDN] Fwd: Re: [Nfd-dev] Why the tags are 64 bit? What is packet overhead?

Lan Wang (lanwang) lanwang at memphis.edu
Sun Nov 18 10:39:05 PST 2018



From: Alex Afanasyev <cawka1 at gmail.com<mailto:cawka1 at gmail.com>>
Subject: Re: [Nfd-dev] Why the tags are 64 bit? What is packet overhead?
Date: November 18, 2018 at 2:42:33 AM CST
To: Aman Maldar <amanmaldar at gmail.com<mailto:amanmaldar at gmail.com>>
Cc: mini-ndn at lists.cs.ucla.edu<mailto:mini-ndn at lists.cs.ucla.edu>, "nfd-dev at lists.cs.ucla.edu<mailto:nfd-dev at lists.cs.ucla.edu>" <nfd-dev at lists.cs.ucla.edu<mailto:nfd-dev at lists.cs.ucla.edu>>


Hi Aman,

The tags are just in-memory annotation of the packet and have no direct impact on the size of the actual packet.  To encode any value of the tag, you will need to provision it as part of, for example, NDNLP encoding process.   Therefore, if you just added a custom tag on the packet and didn't change any encoding, you will not see any changes in packet size, nor see anything when dissecting the packet.

The code has a few examples for tag encoding, look in face.cpp and detail/face-impl.hpp.

--
Alex

On Nov 17, 2018, at 7:26 PM, Aman Maldar <amanmaldar at gmail.com<mailto:amanmaldar at gmail.com>> wrote:

Hello All,
 I have 2 questions.
First,
I have added hopCount tag to the packet. But my questions is why these tags have to be 64 bit log? I tried to use 16/32 bit long tags. I got compilation issues.
I see the following tags are also defined as 64 bit long. ref - https://github.com/named-data/ndn-cxx/blob/master/src/lp/tags.hpp

typedef SimpleTag<uint64_t, 10> IncomingFaceIdTag;
typedef SimpleTag<uint64_t, 11> NextHopFaceIdTag;

Second,
Also, is there a way I can calculate the interest packet overhead after adding a new tag?
If I do following before and after adding the tags, would I get correct result?
auto intSize = interest.wireEncode().size();

Ndn-dissect didn't work very well, I didn't get what I was looking for. Some fields were missing.

--
Regards,
Mr. Maldar Aman M.
University of Massachusetts, Lowell
_______________________________________________
Nfd-dev mailing list
Nfd-dev at lists.cs.ucla.edu<mailto:Nfd-dev at lists.cs.ucla.edu>
http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20181118/3c2ff067/attachment.html>


More information about the Mini-NDN mailing list