[Ndn-interest] [EXT] Can I use "nfdc" outside the command line?

Davide Pesavento davidepesa at gmail.com
Wed Oct 4 11:45:06 PDT 2023


Hi Otávio,

On Tue, Oct 3, 2023 at 4:00 PM Otávio Augusto via Ndn-interest
<ndn-interest at lists.cs.ucla.edu> wrote:
>
> Hello, Junxiao. Thanks a lot for the quick response.
>
> More specifically, I need to list, create, and destroy operations for faces and routes at runtime. My use case requires these operations autonomously and based on some network states, which is why using the command line (nfdc) does not satisfy me.
>
> I believe that NFD Management Protocol is a viable solution to my problem, perhaps with a greater workload than I would like. If I understand correctly, I have to use ndn-cxx together with the rules defined by the protocol to perform the operations I need. For example, to request the creation of a face, I could use as described in https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Create-a-face
>

That's correct, but please note that you don't have to reimplement the
management protocol from scratch with Interest and Data. ndn-cxx
already provides a higher level API that you can use to manage
(certain aspects of) NFD directly from your application. See for
instance ndn::nfd::Controller
(https://docs.named-data.net/ndn-cxx/current/doxygen/classndn_1_1nfd_1_1Controller.html)
and other classes in the ndn::nfd namespace. The documentation isn't
great, but as Junxiao said, this is exactly the same API used by nfdc,
so you can take a look at nfdc's code for inspiration.

Best,
Davide


More information about the Ndn-interest mailing list