[Nfd-dev] General NFD status - reusing the functions to calculate CS PIT FIB entries

Alex Afanasyev aa at cs.fiu.edu
Sun Feb 11 17:46:58 PST 2018



> On Feb 11, 2018, at 8:04 PM, Aman Maldar <amanmaldar at gmail.com <mailto:amanmaldar at gmail.com>> wrote:
> 
> Hello,
> 
> I want reuse some results of "a nfdc status show" command.
> 
> I undestand, the above command executes the code to calculate number of entries in FIB, CS, PIT.

nfdc doesn't calculate anything, rather just requesting stats from NFD and then reporting it to you.

> 
> The file which call the command above is present in "/mini-ndn/NFD/nfdc/tools/main.cpp" (I hope this is correct, or guide me to correct one please)
> 
> However, I am trying to dig deep into this to find out which is the single function that I can reuse  to calculate CS entries only or FIB entries only or PIT entries only.

Depending on how much time you want to spend on this, you could either use some unix pipe'ing to extract the line/number you need or write a tool that requests General Status Dataset from NFD (https://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus <https://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus>) and prints the number you are looking for.

> 
> Can someone guide me on how to get the desired functions so that I can reuse it?

Things are made modular, so actual code is "a bit" burried.  You can take a look here https://github.com/named-data/NFD/blob/master/tools/nfdc/forwarder-general-module.cpp <https://github.com/named-data/NFD/blob/master/tools/nfdc/forwarder-general-module.cpp>

> 
> Thank you in advance.
> 
> --
> 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

______________
Alex Afanasyev
Assistant Professor, SCIS, Florida International University
11200 SW 8th Street, ECS Room 261B, Miami, FL 33199
phone: +1.305.348.4960 (office); email: aa at cs.fiu.edu <mailto:aa at cs.fiu.edu>
web: https://users.cs.fiu.edu/~afanasyev/ <https://users.cs.fiu.edu/~afanasyev/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20180211/21776c80/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 873 bytes
Desc: Message signed with OpenPGP
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20180211/21776c80/attachment.sig>


More information about the Nfd-dev mailing list