51 : m_keyChain(keyChain)
61 m_configFile = configFile;
67 m_configSection = config;
80 m_faceTable = make_unique<FaceTable>();
84 m_faceSystem = make_unique<face::FaceSystem>(*m_faceTable, m_netmon);
85 m_forwarder = make_unique<Forwarder>(*m_faceTable);
87 initializeManagement();
91 m_netmon->onNetworkStateChanged.connect([
this] {
94 m_reloadConfigEvent =
getScheduler().schedule(5_s, [
this] {
95 NFD_LOG_INFO(
"Network change detected, reloading face section of the config file...");
96 reloadConfigFileFaceSection();
102 Nfd::configureLogging()
107 if (!m_configFile.empty()) {
108 config.parse(m_configFile,
true);
109 config.parse(m_configFile,
false);
123 if (sectionName ==
"rib" || sectionName ==
"log") {
133 Nfd::initializeManagement()
138 m_dispatcher = make_unique<ndn::mgmt::Dispatcher>(*m_internalClientFace, m_keyChain);
141 m_forwarderStatusManager = make_unique<ForwarderStatusManager>(*m_forwarder, *m_dispatcher);
142 m_faceManager = make_unique<FaceManager>(*m_faceSystem, *m_dispatcher, *m_authenticator);
143 m_fibManager = make_unique<FibManager>(m_forwarder->getFib(), *m_faceTable,
144 *m_dispatcher, *m_authenticator);
145 m_csManager = make_unique<CsManager>(m_forwarder->getCs(), m_forwarder->getCounters(),
146 *m_dispatcher, *m_authenticator);
147 m_strategyChoiceManager = make_unique<StrategyChoiceManager>(m_forwarder->getStrategyChoice(),
148 *m_dispatcher, *m_authenticator);
153 TablesConfigSection tablesConfig(*m_forwarder);
154 tablesConfig.setConfigFile(config);
156 m_authenticator->setConfigFile(config);
157 m_faceSystem->setConfigFile(config);
160 if (!m_configFile.empty()) {
161 config.parse(m_configFile,
true);
162 config.parse(m_configFile,
false);
169 tablesConfig.ensureConfigured();
172 Name topPrefix(
"/localhost/nfd");
173 fib::Entry* entry = m_forwarder->getFib().insert(topPrefix).first;
174 m_forwarder->getFib().addOrUpdateNextHop(*entry, *m_internalFace, 0);
175 m_dispatcher->addTopPrefix(topPrefix,
false);
189 m_authenticator->setConfigFile(config);
190 m_faceSystem->setConfigFile(config);
192 if (!m_configFile.empty()) {
193 config.
parse(m_configFile,
false);
201 Nfd::reloadConfigFileFaceSection()
205 m_faceSystem->setConfigFile(config);
207 if (!m_configFile.empty()) {
208 config.parse(m_configFile,
false);