blob: 752b15acd617560d9eac9a6b0bb0318de411c9f1 [file] [log] [blame]
akmhoque3d06e792014-05-27 16:23:20 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Nick Gordonfeae5572017-01-13 12:06:26 -06003 * Copyright (c) 2014-2017, The University of Memphis,
Nick Gordonf8b5bcd2016-08-11 15:06:50 -05004 * Regents of the University of California
akmhoque3d06e792014-05-27 16:23:20 -05005 *
6 * This file is part of NLSR (Named-data Link State Routing).
7 * See AUTHORS.md for complete list of NLSR authors and contributors.
8 *
9 * NLSR is free software: you can redistribute it and/or modify it under the terms
10 * of the GNU General Public License as published by the Free Software Foundation,
11 * either version 3 of the License, or (at your option) any later version.
12 *
13 * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
14 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
akmhoque3d06e792014-05-27 16:23:20 -050019 **/
Nick Gordonb7168472016-09-21 13:57:17 -050020
akmhoquefdbddb12014-05-02 18:35:19 -050021#include "fib.hpp"
Muktadir Chowdhury3be64662015-05-01 14:50:53 -050022#include "adjacency-list.hpp"
23#include "conf-parameter.hpp"
akmhoque674b0b12014-05-20 14:33:28 -050024#include "logger.hpp"
Muktadir Chowdhury3be64662015-05-01 14:50:53 -050025#include "nexthop-list.hpp"
26
27#include <map>
28#include <cmath>
laqinfancd7ca052017-06-02 04:57:18 -050029#include <algorithm>
30#include <iterator>
akmhoquec8a10f72014-04-25 18:42:55 -050031
akmhoque53353462014-04-22 08:43:45 -050032namespace nlsr {
33
akmhoque674b0b12014-05-20 14:33:28 -050034INIT_LOGGER("Fib");
35
akmhoque393d4ff2014-07-16 14:27:03 -050036const uint64_t Fib::GRACE_PERIOD = 10;
37
akmhoque53353462014-04-22 08:43:45 -050038void
akmhoque31d1d4b2014-05-05 22:08:14 -050039Fib::remove(const ndn::Name& name)
akmhoque53353462014-04-22 08:43:45 -050040{
akmhoque674b0b12014-05-20 14:33:28 -050041 _LOG_DEBUG("Fib::remove called");
Nick Gordonb7168472016-09-21 13:57:17 -050042 std::map<ndn::Name, FibEntry>::iterator it = m_table.find(name);
akmhoque157b0a42014-05-13 00:26:37 -050043 if (it != m_table.end()) {
Vince Lehmanef21d8e2015-04-01 15:59:39 -050044 for (std::set<NextHop, NextHopComparator>::iterator nhit =
Nick Gordonb7168472016-09-21 13:57:17 -050045 (it->second).getNexthopList().getNextHops().begin();
46 nhit != (it->second).getNexthopList().getNextHops().end(); nhit++) {
akmhoque53353462014-04-22 08:43:45 -050047 //remove entry from NDN-FIB
Nick Gordond0a7df32017-05-30 16:44:34 -050048 // Only unregister the prefix if it ISN'T a neighbor.
Nick Gordonb7168472016-09-21 13:57:17 -050049 if (isPrefixUpdatable((it->second).getName())) {
50 unregisterPrefix((it->second).getName(), nhit->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -050051 }
akmhoque53353462014-04-22 08:43:45 -050052 }
Muktadir Chowdhury3be64662015-05-01 14:50:53 -050053 cancelEntryRefresh(it->second);
akmhoque53353462014-04-22 08:43:45 -050054 m_table.erase(it);
55 }
56}
57
Vince Lehman18841082014-08-19 17:15:24 -050058void
Vince Lehman942eb7b2014-10-02 10:09:27 -050059Fib::addNextHopsToFibEntryAndNfd(FibEntry& entry, NexthopList& hopsToAdd)
Vince Lehman18841082014-08-19 17:15:24 -050060{
61 const ndn::Name& name = entry.getName();
62
Vince Lehman942eb7b2014-10-02 10:09:27 -050063 for (NexthopList::iterator it = hopsToAdd.begin(); it != hopsToAdd.end(); ++it)
Vince Lehman18841082014-08-19 17:15:24 -050064 {
65 // Add nexthop to FIB entry
Vince Lehman942eb7b2014-10-02 10:09:27 -050066 entry.getNexthopList().addNextHop(*it);
Vince Lehman18841082014-08-19 17:15:24 -050067
68 if (isPrefixUpdatable(name)) {
69 // Add nexthop to NDN-FIB
Ashlesh Gawande793e8702017-08-01 15:59:26 -050070 registerPrefix(name, ndn::util::FaceUri(it->getConnectingFaceUri()),
Vince Lehman942eb7b2014-10-02 10:09:27 -050071 it->getRouteCostAsAdjustedInteger(),
Vince Lehman18841082014-08-19 17:15:24 -050072 ndn::time::seconds(m_refreshTime + GRACE_PERIOD),
73 ndn::nfd::ROUTE_FLAG_CAPTURE, 0);
74 }
75 }
Vince Lehman942eb7b2014-10-02 10:09:27 -050076}
77
78void
Vince Lehman942eb7b2014-10-02 10:09:27 -050079Fib::update(const ndn::Name& name, NexthopList& allHops)
Vince Lehman18841082014-08-19 17:15:24 -050080{
Vince Lehman942eb7b2014-10-02 10:09:27 -050081 _LOG_DEBUG("Fib::update called");
Vince Lehman18841082014-08-19 17:15:24 -050082
Vince Lehman942eb7b2014-10-02 10:09:27 -050083 // Get the max possible faces which is the minumum of the configuration setting and
84 // the length of the list of all next hops.
85 unsigned int maxFaces = getNumberOfFacesForName(allHops);
Vince Lehman18841082014-08-19 17:15:24 -050086
Vince Lehman942eb7b2014-10-02 10:09:27 -050087 NexthopList hopsToAdd;
88 unsigned int nFaces = 0;
Vince Lehman18841082014-08-19 17:15:24 -050089
Vince Lehman942eb7b2014-10-02 10:09:27 -050090 // Create a list of next hops to be installed with length == maxFaces
91 for (NexthopList::iterator it = allHops.begin(); it != allHops.end() && nFaces < maxFaces;
Muktadir Chowdhury3be64662015-05-01 14:50:53 -050092 ++it, ++nFaces) {
Vince Lehman942eb7b2014-10-02 10:09:27 -050093 hopsToAdd.addNextHop(*it);
94 }
Vince Lehman18841082014-08-19 17:15:24 -050095
Nick Gordonb7168472016-09-21 13:57:17 -050096 std::map<ndn::Name, FibEntry>::iterator entryIt = m_table.find(name);
Vince Lehman942eb7b2014-10-02 10:09:27 -050097
Muktadir Chowdhury3be64662015-05-01 14:50:53 -050098 // New FIB entry that has nextHops
Nick Gordonff9a6272017-10-12 13:38:29 -050099 if (entryIt == m_table.end() && hopsToAdd.size() != 0) {
Vince Lehman18841082014-08-19 17:15:24 -0500100 _LOG_DEBUG("New FIB Entry");
101
Vince Lehman18841082014-08-19 17:15:24 -0500102 FibEntry entry(name);
103
Vince Lehman942eb7b2014-10-02 10:09:27 -0500104 addNextHopsToFibEntryAndNfd(entry, hopsToAdd);
Vince Lehman18841082014-08-19 17:15:24 -0500105
Nick Gordonb7168472016-09-21 13:57:17 -0500106 m_table.emplace(name, entry);
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500107
Nick Gordon5867b522017-09-06 17:41:37 -0500108 entryIt = m_table.find(name);
akmhoque53353462014-04-22 08:43:45 -0500109 }
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500110 // Existing FIB entry that may or may not have nextHops
akmhoque157b0a42014-05-13 00:26:37 -0500111 else {
Vince Lehman18841082014-08-19 17:15:24 -0500112 // Existing FIB entry
113 _LOG_DEBUG("Existing FIB Entry");
Vince Lehman18841082014-08-19 17:15:24 -0500114
115 // Remove empty FIB entry
Nick Gordonff9a6272017-10-12 13:38:29 -0500116 if (hopsToAdd.size() == 0) {
akmhoque31d1d4b2014-05-05 22:08:14 -0500117 remove(name);
Nick Gordon5867b522017-09-06 17:41:37 -0500118 return;
akmhoque53353462014-04-22 08:43:45 -0500119 }
Vince Lehman18841082014-08-19 17:15:24 -0500120
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500121 FibEntry& entry = (entryIt->second);
Vince Lehman942eb7b2014-10-02 10:09:27 -0500122 addNextHopsToFibEntryAndNfd(entry, hopsToAdd);
Vince Lehman18841082014-08-19 17:15:24 -0500123
laqinfancd7ca052017-06-02 04:57:18 -0500124 std::set<NextHop, NextHopComparator> hopsToRemove;
125 std::set_difference(entry.getNexthopList().begin(), entry.getNexthopList().end(),
126 hopsToAdd.begin(), hopsToAdd.end(),
127 std::inserter(hopsToRemove, hopsToRemove.end()), NextHopComparator());
128
129 bool isUpdatable = isPrefixUpdatable(entry.getName());
130 // Remove the uninstalled next hops from NFD and FIB entry
131 for (const auto& hop: hopsToRemove){
132 if (isUpdatable) {
133 unregisterPrefix(entry.getName(), hop.getConnectingFaceUri());
134 }
135 _LOG_DEBUG("Removing " << hop.getConnectingFaceUri() << " from " << entry.getName());
136 entry.getNexthopList().removeNextHop(hop);
137 }
Vince Lehman18841082014-08-19 17:15:24 -0500138
Vince Lehman18841082014-08-19 17:15:24 -0500139 // Increment sequence number
140 entry.setSeqNo(entry.getSeqNo() + 1);
141
Nick Gordon5867b522017-09-06 17:41:37 -0500142 entryIt = m_table.find(name);
143
144 }
145 if (entryIt != m_table.end() && !entryIt->second.getRefreshEventId()) {
146 scheduleEntryRefresh(entryIt->second,
147 [this] (FibEntry& entry) {
148 scheduleLoop(entry);
149 });
akmhoque53353462014-04-22 08:43:45 -0500150 }
151}
152
akmhoque53353462014-04-22 08:43:45 -0500153void
akmhoque31d1d4b2014-05-05 22:08:14 -0500154Fib::clean()
akmhoque53353462014-04-22 08:43:45 -0500155{
akmhoque674b0b12014-05-20 14:33:28 -0500156 _LOG_DEBUG("Fib::clean called");
Nick Gordonb7168472016-09-21 13:57:17 -0500157 for (std::map<ndn::Name, FibEntry>::iterator it = m_table.begin();
158 it != m_table.end();
akmhoque157b0a42014-05-13 00:26:37 -0500159 ++it) {
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500160 _LOG_DEBUG("Cancelling Scheduled event. Name: " << it->second.getName());
161 cancelEntryRefresh(it->second);
Vince Lehmanef21d8e2015-04-01 15:59:39 -0500162 for (std::set<NextHop, NextHopComparator>::iterator nhit =
Nick Gordonb7168472016-09-21 13:57:17 -0500163 (it->second).getNexthopList().getNextHops().begin();
164 nhit != (it->second).getNexthopList().getNextHops().end(); nhit++) {
akmhoque53353462014-04-22 08:43:45 -0500165 //Remove entry from NDN-FIB
Nick Gordonb7168472016-09-21 13:57:17 -0500166 unregisterPrefix((it->second).getName(), nhit->getConnectingFaceUri());
akmhoque53353462014-04-22 08:43:45 -0500167 }
168 }
akmhoque157b0a42014-05-13 00:26:37 -0500169 if (m_table.size() > 0) {
akmhoque53353462014-04-22 08:43:45 -0500170 m_table.clear();
171 }
172}
173
Vince Lehman942eb7b2014-10-02 10:09:27 -0500174unsigned int
175Fib::getNumberOfFacesForName(NexthopList& nextHopList)
akmhoque53353462014-04-22 08:43:45 -0500176{
Vince Lehman942eb7b2014-10-02 10:09:27 -0500177 uint32_t nNextHops = static_cast<uint32_t>(nextHopList.getNextHops().size());
178 uint32_t nMaxFaces = m_confParameter.getMaxFacesPerPrefix();
179
180 // Allow all faces
181 if (nMaxFaces == 0) {
182 return nNextHops;
akmhoque53353462014-04-22 08:43:45 -0500183 }
akmhoque157b0a42014-05-13 00:26:37 -0500184 else {
Vince Lehman942eb7b2014-10-02 10:09:27 -0500185 return std::min(nNextHops, nMaxFaces);
akmhoque53353462014-04-22 08:43:45 -0500186 }
akmhoque53353462014-04-22 08:43:45 -0500187}
188
akmhoque393d4ff2014-07-16 14:27:03 -0500189bool
190Fib::isPrefixUpdatable(const ndn::Name& name) {
Vince Lehman942eb7b2014-10-02 10:09:27 -0500191 if (!m_adjacencyList.isNeighbor(name)) {
akmhoque393d4ff2014-07-16 14:27:03 -0500192 return true;
193 }
194
195 return false;
196}
197
akmhoque53353462014-04-22 08:43:45 -0500198void
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500199Fib::registerPrefix(const ndn::Name& namePrefix, const ndn::util::FaceUri& faceUri,
200 uint64_t faceCost,
201 const ndn::time::milliseconds& timeout,
akmhoque060d3022014-08-12 13:35:06 -0500202 uint64_t flags, uint8_t times)
akmhoquec04e7272014-07-02 11:00:14 -0500203{
Nick Gordone9733ed2017-04-26 10:48:39 -0500204 uint64_t faceId = m_adjacencyList.getFaceId(ndn::util::FaceUri(faceUri));
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500205
akmhoque102aea42014-08-04 10:22:12 -0500206 if (faceId != 0) {
akmhoque060d3022014-08-12 13:35:06 -0500207 ndn::nfd::ControlParameters faceParameters;
208 faceParameters
209 .setName(namePrefix)
210 .setFaceId(faceId)
211 .setFlags(flags)
212 .setCost(faceCost)
213 .setExpirationPeriod(timeout)
Davide Pesavento87911da2017-02-21 22:10:55 -0500214 .setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR);
akmhoque060d3022014-08-12 13:35:06 -0500215
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500216 _LOG_DEBUG("Registering prefix: " << faceParameters.getName() << " faceUri: " << faceUri);
217 m_controller.start<ndn::nfd::RibRegisterCommand>(faceParameters,
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500218 std::bind(&Fib::onRegistrationSuccess, this, _1,
akmhoque157b0a42014-05-13 00:26:37 -0500219 "Successful in name registration",
akmhoqueb5b3b4f2014-07-23 16:36:51 -0500220 faceUri),
dmcoomes9f936662017-03-02 10:33:09 -0600221 std::bind(&Fib::onRegistrationFailure,
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500222 this, _1,
akmhoque102aea42014-08-04 10:22:12 -0500223 "Failed in name registration",
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500224 faceParameters,
akmhoque060d3022014-08-12 13:35:06 -0500225 faceUri, times));
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500226 }
227 else {
228 _LOG_WARN("Error: No Face Id for face uri: " << faceUri);
229 }
230}
231
232void
233Fib::onRegistrationSuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
234 const std::string& message, const ndn::util::FaceUri& faceUri)
235{
236 _LOG_DEBUG(message << ": " << commandSuccessResult.getName() <<
237 " Face Uri: " << faceUri << " faceId: " << commandSuccessResult.getFaceId());
238
239 AdjacencyList::iterator adjacent = m_adjacencyList.findAdjacent(faceUri);
240 if (adjacent != m_adjacencyList.end()) {
241 adjacent->setFaceId(commandSuccessResult.getFaceId());
242 }
243
244 // Update the fast-access FaceMap with the new Face ID, too
245 m_faceMap.update(faceUri.toString(), commandSuccessResult.getFaceId());
246 m_faceMap.writeLog();
247}
248
249void
250Fib::onRegistrationFailure(const ndn::nfd::ControlResponse& response,
251 const std::string& message,
252 const ndn::nfd::ControlParameters& parameters,
253 const ndn::util::FaceUri& faceUri,
254 uint8_t times)
255{
256 _LOG_DEBUG(message << ": " << response.getText() << " (code: " << response.getCode() << ")");
257 _LOG_DEBUG("Prefix: " << parameters.getName() << " failed for: " << times);
258 if (times < 3) {
259 _LOG_DEBUG("Trying to register again...");
260 registerPrefix(parameters.getName(), faceUri,
261 parameters.getCost(),
262 parameters.getExpirationPeriod(),
263 parameters.getFlags(), times+1);
264 }
265 else {
266 _LOG_DEBUG("Registration trial given up");
267 }
akmhoquefdbddb12014-05-02 18:35:19 -0500268}
akmhoque31d1d4b2014-05-05 22:08:14 -0500269
akmhoquefdbddb12014-05-02 18:35:19 -0500270void
akmhoque157b0a42014-05-13 00:26:37 -0500271Fib::unregisterPrefix(const ndn::Name& namePrefix, const std::string& faceUri)
akmhoquefdbddb12014-05-02 18:35:19 -0500272{
akmhoque157b0a42014-05-13 00:26:37 -0500273 uint32_t faceId = m_faceMap.getFaceId(faceUri);
akmhoqueb5b3b4f2014-07-23 16:36:51 -0500274 _LOG_DEBUG("Unregister prefix: " << namePrefix << " Face Uri: " << faceUri);
akmhoque157b0a42014-05-13 00:26:37 -0500275 if (faceId > 0) {
276 ndn::nfd::ControlParameters controlParameters;
277 controlParameters
278 .setName(namePrefix)
279 .setFaceId(faceId)
Davide Pesavento87911da2017-02-21 22:10:55 -0500280 .setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR);
akmhoque157b0a42014-05-13 00:26:37 -0500281 m_controller.start<ndn::nfd::RibUnregisterCommand>(controlParameters,
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500282 std::bind(&Fib::onUnregistrationSuccess, this, _1,
283 "Successful in unregistering name"),
284 std::bind(&Fib::onUnregistrationFailure,
285 this, _1,
286 "Failed in unregistering name"));
akmhoque157b0a42014-05-13 00:26:37 -0500287 }
akmhoquefdbddb12014-05-02 18:35:19 -0500288}
289
290void
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500291Fib::onUnregistrationSuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
292 const std::string& message)
293{
294 _LOG_DEBUG("Unregister successful Prefix: " << commandSuccessResult.getName() <<
295 " Face Id: " << commandSuccessResult.getFaceId());
296}
297
298void
299Fib::onUnregistrationFailure(const ndn::nfd::ControlResponse& response,
300 const std::string& message)
301{
302 _LOG_DEBUG(message << ": " << response.getText() << " (code: " << response.getCode() << ")");
303}
304
305void
akmhoque393d4ff2014-07-16 14:27:03 -0500306Fib::setStrategy(const ndn::Name& name, const std::string& strategy, uint32_t count)
akmhoque157b0a42014-05-13 00:26:37 -0500307{
308 ndn::nfd::ControlParameters parameters;
309 parameters
310 .setName(name)
311 .setStrategy(strategy);
312
313 m_controller.start<ndn::nfd::StrategyChoiceSetCommand>(parameters,
dmcoomes9f936662017-03-02 10:33:09 -0600314 std::bind(&Fib::onSetStrategySuccess, this, _1,
akmhoque157b0a42014-05-13 00:26:37 -0500315 "Successfully set strategy choice"),
dmcoomes9f936662017-03-02 10:33:09 -0600316 std::bind(&Fib::onSetStrategyFailure, this, _1,
akmhoque393d4ff2014-07-16 14:27:03 -0500317 parameters,
318 count,
akmhoque157b0a42014-05-13 00:26:37 -0500319 "Failed to set strategy choice"));
320}
321
322void
akmhoque393d4ff2014-07-16 14:27:03 -0500323Fib::onSetStrategySuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
324 const std::string& message)
325{
326 _LOG_DEBUG(message << ": " << commandSuccessResult.getStrategy() << " "
327 << "for name: " << commandSuccessResult.getName());
328}
329
330void
Junxiao Shi63bd0342016-08-17 16:57:14 +0000331Fib::onSetStrategyFailure(const ndn::nfd::ControlResponse& response,
332 const ndn::nfd::ControlParameters& parameters,
333 uint32_t count,
334 const std::string& message)
akmhoque393d4ff2014-07-16 14:27:03 -0500335{
336 _LOG_DEBUG(message << ": " << parameters.getStrategy() << " "
337 << "for name: " << parameters.getName());
338 if (count < 3) {
339 setStrategy(parameters.getName(), parameters.getStrategy().toUri(),count+1);
340 }
341}
342
343void
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500344Fib::scheduleEntryRefresh(FibEntry& entry, const afterRefreshCallback& refreshCallback)
345{
346 _LOG_DEBUG("Scheduling refresh for " << entry.getName()
347 << " Seq Num: " << entry.getSeqNo()
348 << " in " << m_refreshTime << " seconds");
349
350 entry.setRefreshEventId(m_scheduler.scheduleEvent(ndn::time::seconds(m_refreshTime),
351 std::bind(&Fib::refreshEntry, this,
352 entry.getName(), refreshCallback)));
353}
354
355void
356Fib::scheduleLoop(FibEntry& entry)
357{
358 scheduleEntryRefresh(entry,
359 std::bind(&Fib::scheduleLoop, this, _1));
360}
361
362void
363Fib::cancelEntryRefresh(const FibEntry& entry)
364{
365 _LOG_DEBUG("Cancelling refresh for " << entry.getName() << " Seq Num: " << entry.getSeqNo());
366
367 m_scheduler.cancelEvent(entry.getRefreshEventId());
368 entry.getRefreshEventId().reset();
369}
370
371void
372Fib::refreshEntry(const ndn::Name& name, afterRefreshCallback refreshCb)
373{
374 std::map<ndn::Name, FibEntry>::iterator it = m_table.find(name);
375
376 if (it == m_table.end()) {
377 return;
378 }
379
380 FibEntry& entry = it->second;
381 _LOG_DEBUG("Refreshing " << entry.getName() << " Seq Num: " << entry.getSeqNo());
382
383 // Increment sequence number
384 entry.setSeqNo(entry.getSeqNo() + 1);
385
386 for (const NextHop& hop : entry) {
387 registerPrefix(entry.getName(),
Ashlesh Gawande793e8702017-08-01 15:59:26 -0500388 ndn::util::FaceUri(hop.getConnectingFaceUri()),
389 hop.getRouteCostAsAdjustedInteger(),
390 ndn::time::seconds(m_refreshTime + GRACE_PERIOD),
391 ndn::nfd::ROUTE_FLAG_CAPTURE, 0);
Muktadir Chowdhury3be64662015-05-01 14:50:53 -0500392 }
393
394 refreshCb(entry);
395}
396
397void
akmhoque674b0b12014-05-20 14:33:28 -0500398Fib::writeLog()
399{
400 _LOG_DEBUG("-------------------FIB-----------------------------");
Nick Gordonb7168472016-09-21 13:57:17 -0500401 for (std::map<ndn::Name, FibEntry>::iterator it = m_table.begin();
402 it != m_table.end();
akmhoque674b0b12014-05-20 14:33:28 -0500403 ++it) {
Nick Gordonb7168472016-09-21 13:57:17 -0500404 (it->second).writeLog();
akmhoque674b0b12014-05-20 14:33:28 -0500405 }
406}
akmhoquefdbddb12014-05-02 18:35:19 -0500407
Nick Gordonfad8e252016-08-11 14:21:38 -0500408} // namespace nlsr