management: Implementing nrd::Controller and introducing new secret
environment option to enable NRD Prefix management protocol
Usage for the secret NFD and NRD environment variables
export NFD=1
export NRD=1
<run app>
or
NFD=1 NRD=1 <run app>
Change-Id: I874acbdcf7038f4d0fa05c59b34cd46d6ae627b0
diff --git a/src/face.cpp b/src/face.cpp
index bc6d877..919ea5d 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -17,6 +17,7 @@
#include "management/ndnd-controller.hpp"
#include "management/nfd-controller.hpp"
+#include "management/nrd-controller.hpp"
namespace ndn {
@@ -62,7 +63,12 @@
m_processEventsTimeoutTimer = make_shared<boost::asio::deadline_timer>(boost::ref(*m_ioService));
if (std::getenv("NFD") != 0)
- m_fwController = make_shared<nfd::Controller>(boost::ref(*this));
+ {
+ if (std::getenv("NRD") != 0)
+ m_fwController = make_shared<nrd::Controller>(boost::ref(*this));
+ else
+ m_fwController = make_shared<nfd::Controller>(boost::ref(*this));
+ }
else
m_fwController = make_shared<ndnd::Controller>(boost::ref(*this));
}