blob: 633eaa82e1dfd87bd5bcec63da7ac771a8a125a9 [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#include <list>
akmhoquefdbddb12014-05-02 18:35:19 -05002#include <cmath>
akmhoque157b0a42014-05-13 00:26:37 -05003#include <ndn-cxx/common.hpp>
akmhoquec8a10f72014-04-25 18:42:55 -05004
5#include "nlsr.hpp"
akmhoquec8a10f72014-04-25 18:42:55 -05006#include "nexthop-list.hpp"
akmhoque157b0a42014-05-13 00:26:37 -05007#include "face-map.hpp"
akmhoquefdbddb12014-05-02 18:35:19 -05008#include "fib.hpp"
akmhoque674b0b12014-05-20 14:33:28 -05009#include "logger.hpp"
akmhoquec8a10f72014-04-25 18:42:55 -050010
akmhoque53353462014-04-22 08:43:45 -050011
12
13namespace nlsr {
14
akmhoque674b0b12014-05-20 14:33:28 -050015INIT_LOGGER("Fib");
16
akmhoque53353462014-04-22 08:43:45 -050017using namespace std;
18using namespace ndn;
19
20static bool
akmhoque31d1d4b2014-05-05 22:08:14 -050021fibEntryNameCompare(const FibEntry& fibEntry, const ndn::Name& name)
akmhoque53353462014-04-22 08:43:45 -050022{
akmhoquefdbddb12014-05-02 18:35:19 -050023 return fibEntry.getName() == name ;
akmhoque53353462014-04-22 08:43:45 -050024}
25
26void
akmhoque31d1d4b2014-05-05 22:08:14 -050027Fib::cancelScheduledExpiringEvent(EventId eid)
akmhoque53353462014-04-22 08:43:45 -050028{
akmhoque31d1d4b2014-05-05 22:08:14 -050029 m_nlsr.getScheduler().cancelEvent(eid);
akmhoque53353462014-04-22 08:43:45 -050030}
31
32
33ndn::EventId
akmhoque31d1d4b2014-05-05 22:08:14 -050034Fib::scheduleEntryRefreshing(const ndn::Name& name, int32_t feSeqNum,
akmhoquec7a79b22014-05-26 08:06:19 -050035 const ndn::time::seconds& expTime)
akmhoque53353462014-04-22 08:43:45 -050036{
akmhoquefdbddb12014-05-02 18:35:19 -050037 std::cout << "Fib::scheduleEntryRefreshing Called" << std::endl;
38 std::cout << "Name: " << name << " Seq Num: " << feSeqNum << std::endl;
akmhoque674b0b12014-05-20 14:33:28 -050039 _LOG_DEBUG("Fib::scheduleEntryRefreshing Called");
40 _LOG_DEBUG("Name: " << name << " Seq Num: " << feSeqNum);
akmhoquec7a79b22014-05-26 08:06:19 -050041 return m_nlsr.getScheduler().scheduleEvent(expTime,
akmhoque31d1d4b2014-05-05 22:08:14 -050042 ndn::bind(&Fib::refreshEntry, this,
43 name, feSeqNum));
akmhoque53353462014-04-22 08:43:45 -050044}
45
46void
akmhoque31d1d4b2014-05-05 22:08:14 -050047Fib::refreshEntry(const ndn::Name& name, int32_t feSeqNum)
akmhoque53353462014-04-22 08:43:45 -050048{
akmhoquefdbddb12014-05-02 18:35:19 -050049 std::cout << "Fib::refreshEntry Called" << std::endl;
50 std::cout << "Name: " << name << " Seq Num: " << feSeqNum << std::endl;
51 std::list<FibEntry>::iterator it = std::find_if(m_table.begin(),
52 m_table.end(),
53 bind(&fibEntryNameCompare, _1, name));
akmhoque157b0a42014-05-13 00:26:37 -050054 if (it != m_table.end()) {
akmhoquefdbddb12014-05-02 18:35:19 -050055 std::cout << "Entry found with Seq Num: " << feSeqNum << std::endl;
akmhoque157b0a42014-05-13 00:26:37 -050056 if (it->getSeqNo() == feSeqNum) {
akmhoquefdbddb12014-05-02 18:35:19 -050057 std::cout << "Refreshing the FIB entry" << std::endl;
akmhoque674b0b12014-05-20 14:33:28 -050058 _LOG_DEBUG("Refreshing the FIB entry. Name: " << name);
akmhoquefdbddb12014-05-02 18:35:19 -050059 for (std::list<NextHop>::iterator nhit =
akmhoque31d1d4b2014-05-05 22:08:14 -050060 (*it).getNexthopList().getNextHops().begin();
akmhoque157b0a42014-05-13 00:26:37 -050061 nhit != (*it).getNexthopList().getNextHops().end(); nhit++) {
akmhoquefdbddb12014-05-02 18:35:19 -050062 // add entry to NDN-FIB
akmhoque157b0a42014-05-13 00:26:37 -050063 registerPrefix(it->getName(), nhit->getConnectingFaceUri(),
64 std::ceil(nhit->getRouteCost()), m_refreshTime);
akmhoquefdbddb12014-05-02 18:35:19 -050065 }
akmhoquefdbddb12014-05-02 18:35:19 -050066 // increase sequence number and schedule refresh again
67 it->setSeqNo(feSeqNum + 1);
akmhoque31d1d4b2014-05-05 22:08:14 -050068 it->setExpiringEventId(scheduleEntryRefreshing(it->getName() ,
69 it->getSeqNo(),
akmhoquec7a79b22014-05-26 08:06:19 -050070 ndn::time::seconds(m_refreshTime)));
akmhoquefdbddb12014-05-02 18:35:19 -050071 }
72 }
akmhoque53353462014-04-22 08:43:45 -050073}
74
75void
akmhoque31d1d4b2014-05-05 22:08:14 -050076Fib::remove(const ndn::Name& name)
akmhoque53353462014-04-22 08:43:45 -050077{
akmhoque674b0b12014-05-20 14:33:28 -050078 _LOG_DEBUG("Fib::remove called");
akmhoque53353462014-04-22 08:43:45 -050079 std::list<FibEntry>::iterator it = std::find_if(m_table.begin(),
akmhoquefdbddb12014-05-02 18:35:19 -050080 m_table.end(),
akmhoquec8a10f72014-04-25 18:42:55 -050081 bind(&fibEntryNameCompare, _1, name));
akmhoque157b0a42014-05-13 00:26:37 -050082 if (it != m_table.end()) {
akmhoque53353462014-04-22 08:43:45 -050083 for (std::list<NextHop>::iterator nhit =
akmhoquefdbddb12014-05-02 18:35:19 -050084 (*it).getNexthopList().getNextHops().begin();
akmhoque157b0a42014-05-13 00:26:37 -050085 nhit != (*it).getNexthopList().getNextHops().end(); nhit++) {
akmhoque53353462014-04-22 08:43:45 -050086 //remove entry from NDN-FIB
akmhoque157b0a42014-05-13 00:26:37 -050087 if (!m_nlsr.getAdjacencyList().isNeighbor(it->getName())) {
88 unregisterPrefix(it->getName(), nhit->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -050089 }
90 else
91 {
akmhoque157b0a42014-05-13 00:26:37 -050092 if (m_nlsr.getAdjacencyList().getAdjacent(it->getName()).getConnectingFaceUri() !=
93 nhit->getConnectingFaceUri()) {
94 unregisterPrefix(it->getName(), nhit->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -050095 }
96 }
akmhoque53353462014-04-22 08:43:45 -050097 }
akmhoquefdbddb12014-05-02 18:35:19 -050098 std::cout << "Cancellling Scheduled event" << std::endl;
99 std::cout << "Name: " << name << "Seq num: " << it->getSeqNo() << std::endl;
akmhoque674b0b12014-05-20 14:33:28 -0500100 _LOG_DEBUG("Cancelling Scheduled event. Name: " << name);
akmhoque31d1d4b2014-05-05 22:08:14 -0500101 cancelScheduledExpiringEvent((*it).getExpiringEventId());
akmhoque53353462014-04-22 08:43:45 -0500102 m_table.erase(it);
103 }
104}
105
106
107void
akmhoque31d1d4b2014-05-05 22:08:14 -0500108Fib::update(const ndn::Name& name, NexthopList& nextHopList)
akmhoque53353462014-04-22 08:43:45 -0500109{
110 std::cout << "Fib::updateFib Called" << std::endl;
akmhoque674b0b12014-05-20 14:33:28 -0500111 _LOG_DEBUG("Fib::updateFib Called");
akmhoque53353462014-04-22 08:43:45 -0500112 int startFace = 0;
113 int endFace = getNumberOfFacesForName(nextHopList,
akmhoque31d1d4b2014-05-05 22:08:14 -0500114 m_nlsr.getConfParameter().getMaxFacesPerPrefix());
akmhoque53353462014-04-22 08:43:45 -0500115 std::list<FibEntry>::iterator it = std::find_if(m_table.begin(),
116 m_table.end(),
117 bind(&fibEntryNameCompare, _1, name));
akmhoque157b0a42014-05-13 00:26:37 -0500118 if (it == m_table.end()) {
119 if (nextHopList.getSize() > 0) {
akmhoque53353462014-04-22 08:43:45 -0500120 nextHopList.sort();
121 FibEntry newEntry(name);
akmhoquefdbddb12014-05-02 18:35:19 -0500122 std::list<NextHop> nhl = nextHopList.getNextHops();
akmhoque53353462014-04-22 08:43:45 -0500123 std::list<NextHop>::iterator nhit = nhl.begin();
akmhoque157b0a42014-05-13 00:26:37 -0500124 for (int i = startFace; i < endFace && nhit != nhl.end(); ++nhit, i++) {
akmhoquefdbddb12014-05-02 18:35:19 -0500125 newEntry.getNexthopList().addNextHop((*nhit));
akmhoque53353462014-04-22 08:43:45 -0500126 //Add entry to NDN-FIB
akmhoque157b0a42014-05-13 00:26:37 -0500127 registerPrefix(name, nhit->getConnectingFaceUri(),
128 std::ceil(nhit->getRouteCost()), m_refreshTime);
akmhoque53353462014-04-22 08:43:45 -0500129 }
akmhoquefdbddb12014-05-02 18:35:19 -0500130 newEntry.getNexthopList().sort();
akmhoquec7a79b22014-05-26 08:06:19 -0500131 ndn::time::system_clock::TimePoint expirationTimePoint = ndn::time::system_clock::now();
132 expirationTimePoint = expirationTimePoint + ndn::time::seconds(m_refreshTime);
133 newEntry.setExpirationTimePoint(expirationTimePoint);
akmhoque53353462014-04-22 08:43:45 -0500134 newEntry.setSeqNo(1);
akmhoquec7a79b22014-05-26 08:06:19 -0500135 newEntry.setExpiringEventId(scheduleEntryRefreshing(name , 1,
136 ndn::time::seconds(m_refreshTime)));
akmhoque53353462014-04-22 08:43:45 -0500137 m_table.push_back(newEntry);
138 }
139 }
akmhoque157b0a42014-05-13 00:26:37 -0500140 else {
akmhoque53353462014-04-22 08:43:45 -0500141 std::cout << "Old FIB Entry" << std::endl;
akmhoque157b0a42014-05-13 00:26:37 -0500142 if (nextHopList.getSize() > 0) {
akmhoque53353462014-04-22 08:43:45 -0500143 nextHopList.sort();
akmhoque157b0a42014-05-13 00:26:37 -0500144 if (!it->isEqualNextHops(nextHopList)) {
akmhoquefdbddb12014-05-02 18:35:19 -0500145 std::list<NextHop> nhl = nextHopList.getNextHops();
akmhoque53353462014-04-22 08:43:45 -0500146 std::list<NextHop>::iterator nhit = nhl.begin();
147 // Add first Entry to NDN-FIB
akmhoque157b0a42014-05-13 00:26:37 -0500148 registerPrefix(name, nhit->getConnectingFaceUri(),
149 std::ceil(nhit->getRouteCost()), m_refreshTime);
150 removeHop(it->getNexthopList(), nhit->getConnectingFaceUri(), name);
akmhoquefdbddb12014-05-02 18:35:19 -0500151 it->getNexthopList().reset();
152 it->getNexthopList().addNextHop((*nhit));
akmhoque53353462014-04-22 08:43:45 -0500153 ++startFace;
154 ++nhit;
akmhoque157b0a42014-05-13 00:26:37 -0500155 for (int i = startFace; i < endFace && nhit != nhl.end(); ++nhit, i++) {
akmhoquefdbddb12014-05-02 18:35:19 -0500156 it->getNexthopList().addNextHop((*nhit));
akmhoque53353462014-04-22 08:43:45 -0500157 //Add Entry to NDN_FIB
akmhoque157b0a42014-05-13 00:26:37 -0500158 registerPrefix(name, nhit->getConnectingFaceUri(),
159 std::ceil(nhit->getRouteCost()), m_refreshTime);
akmhoque53353462014-04-22 08:43:45 -0500160 }
161 }
akmhoquec7a79b22014-05-26 08:06:19 -0500162 ndn::time::system_clock::TimePoint expirationTimePoint = ndn::time::system_clock::now();
163 expirationTimePoint = expirationTimePoint + ndn::time::seconds(m_refreshTime);
164 it->setExpirationTimePoint(expirationTimePoint);
akmhoquefdbddb12014-05-02 18:35:19 -0500165 std::cout << "Cancellling Scheduled event" << std::endl;
166 std::cout << "Name: " << name << "Seq num: " << it->getSeqNo() << std::endl;
akmhoque674b0b12014-05-20 14:33:28 -0500167 _LOG_DEBUG("Cancelling Scheduled event. Name: " << name);
akmhoque31d1d4b2014-05-05 22:08:14 -0500168 cancelScheduledExpiringEvent(it->getExpiringEventId());
akmhoque53353462014-04-22 08:43:45 -0500169 it->setSeqNo(it->getSeqNo() + 1);
akmhoque31d1d4b2014-05-05 22:08:14 -0500170 (*it).setExpiringEventId(scheduleEntryRefreshing(it->getName() ,
akmhoquec7a79b22014-05-26 08:06:19 -0500171 it->getSeqNo(),
172 ndn::time::seconds(m_refreshTime)));
akmhoque53353462014-04-22 08:43:45 -0500173 }
akmhoque157b0a42014-05-13 00:26:37 -0500174 else {
akmhoque31d1d4b2014-05-05 22:08:14 -0500175 remove(name);
akmhoque53353462014-04-22 08:43:45 -0500176 }
177 }
178}
179
180
181
182void
akmhoque31d1d4b2014-05-05 22:08:14 -0500183Fib::clean()
akmhoque53353462014-04-22 08:43:45 -0500184{
akmhoque674b0b12014-05-20 14:33:28 -0500185 _LOG_DEBUG("Fib::clean called");
akmhoque53353462014-04-22 08:43:45 -0500186 for (std::list<FibEntry>::iterator it = m_table.begin(); it != m_table.end();
akmhoque157b0a42014-05-13 00:26:37 -0500187 ++it) {
akmhoquefdbddb12014-05-02 18:35:19 -0500188 std::cout << "Cancellling Scheduled event" << std::endl;
akmhoque31d1d4b2014-05-05 22:08:14 -0500189 std::cout << "Name: " << it->getName() << "Seq num: " << it->getSeqNo() <<
190 std::endl;
akmhoque674b0b12014-05-20 14:33:28 -0500191 _LOG_DEBUG("Cancelling Scheduled event. Name: " << it->getName());
akmhoque31d1d4b2014-05-05 22:08:14 -0500192 cancelScheduledExpiringEvent((*it).getExpiringEventId());
akmhoque53353462014-04-22 08:43:45 -0500193 for (std::list<NextHop>::iterator nhit =
akmhoquefdbddb12014-05-02 18:35:19 -0500194 (*it).getNexthopList().getNextHops().begin();
akmhoque157b0a42014-05-13 00:26:37 -0500195 nhit != (*it).getNexthopList().getNextHops().end(); nhit++) {
akmhoque53353462014-04-22 08:43:45 -0500196 //Remove entry from NDN-FIB
akmhoque157b0a42014-05-13 00:26:37 -0500197 if (!m_nlsr.getAdjacencyList().isNeighbor(it->getName())) {
198 unregisterPrefix(it->getName(), nhit->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -0500199 }
akmhoque157b0a42014-05-13 00:26:37 -0500200 else {
201 if (m_nlsr.getAdjacencyList().getAdjacent(it->getName()).getConnectingFaceUri() !=
202 nhit->getConnectingFaceUri()) {
203 unregisterPrefix(it->getName(), nhit->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -0500204 }
205 }
akmhoque53353462014-04-22 08:43:45 -0500206 }
207 }
akmhoque157b0a42014-05-13 00:26:37 -0500208 if (m_table.size() > 0) {
akmhoque53353462014-04-22 08:43:45 -0500209 m_table.clear();
210 }
211}
212
213int
akmhoque31d1d4b2014-05-05 22:08:14 -0500214Fib::getNumberOfFacesForName(NexthopList& nextHopList,
215 uint32_t maxFacesPerPrefix)
akmhoque53353462014-04-22 08:43:45 -0500216{
217 int endFace = 0;
akmhoque157b0a42014-05-13 00:26:37 -0500218 if ((maxFacesPerPrefix == 0) || (nextHopList.getSize() <= maxFacesPerPrefix)) {
akmhoque53353462014-04-22 08:43:45 -0500219 return nextHopList.getSize();
220 }
akmhoque157b0a42014-05-13 00:26:37 -0500221 else {
akmhoque53353462014-04-22 08:43:45 -0500222 return maxFacesPerPrefix;
223 }
224 return endFace;
225}
226
227void
akmhoque157b0a42014-05-13 00:26:37 -0500228Fib::removeHop(NexthopList& nl, const std::string& doNotRemoveHopFaceUri,
akmhoque31d1d4b2014-05-05 22:08:14 -0500229 const ndn::Name& name)
akmhoque53353462014-04-22 08:43:45 -0500230{
akmhoquefdbddb12014-05-02 18:35:19 -0500231 for (std::list<NextHop>::iterator it = nl.getNextHops().begin();
akmhoque157b0a42014-05-13 00:26:37 -0500232 it != nl.getNextHops().end(); ++it) {
233 if (it->getConnectingFaceUri() != doNotRemoveHopFaceUri) {
akmhoque53353462014-04-22 08:43:45 -0500234 //Remove FIB Entry from NDN-FIB
akmhoque157b0a42014-05-13 00:26:37 -0500235 if (!m_nlsr.getAdjacencyList().isNeighbor(name)) {
236 unregisterPrefix(name, it->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -0500237 }
akmhoque157b0a42014-05-13 00:26:37 -0500238 else {
239 if (m_nlsr.getAdjacencyList().getAdjacent(name).getConnectingFaceUri() !=
240 it->getConnectingFaceUri()) {
241 unregisterPrefix(name, it->getConnectingFaceUri());
akmhoquefdbddb12014-05-02 18:35:19 -0500242 }
243 }
akmhoque53353462014-04-22 08:43:45 -0500244 }
245 }
246}
247
248void
akmhoque157b0a42014-05-13 00:26:37 -0500249Fib::registerPrefix(const ndn::Name& namePrefix, const std::string& faceUri,
250 uint64_t faceCost, uint64_t timeout)
251{
252 ndn::nfd::ControlParameters faceParameters;
253 faceParameters
254 .setUri(faceUri);
255
256 m_controller.start<ndn::nfd::FaceCreateCommand>(faceParameters,
257 ndn::bind(&Fib::registerPrefixInNfd, this,_1,
258 namePrefix, faceCost, timeout),
259 ndn::bind(&Fib::onFailure, this, _1, _2,
260 "Failed in name registration"));
261
262}
263
264void
265Fib::registerPrefixInNfd(const ndn::nfd::ControlParameters& faceCreateResult,
266 const ndn::Name& namePrefix, uint64_t faceCost, uint64_t timeout)
akmhoquefdbddb12014-05-02 18:35:19 -0500267{
268 ndn::nfd::ControlParameters controlParameters;
269 controlParameters
akmhoque157b0a42014-05-13 00:26:37 -0500270 .setName(namePrefix)
271 .setFaceId(faceCreateResult.getFaceId())
272 .setCost(faceCost)
273 .setExpirationPeriod(ndn::time::milliseconds(timeout * 1000))
274 .setOrigin(128);
akmhoquefdbddb12014-05-02 18:35:19 -0500275 m_controller.start<ndn::nfd::RibRegisterCommand>(controlParameters,
akmhoque157b0a42014-05-13 00:26:37 -0500276 ndn::bind(&Fib::onRegistration, this, _1,
277 "Successful in name registration",
278 faceCreateResult.getUri()),
akmhoquefdbddb12014-05-02 18:35:19 -0500279 ndn::bind(&Fib::onFailure, this, _1, _2,
280 "Failed in name registration"));
281}
akmhoque31d1d4b2014-05-05 22:08:14 -0500282
akmhoquefdbddb12014-05-02 18:35:19 -0500283void
akmhoque157b0a42014-05-13 00:26:37 -0500284Fib::unregisterPrefix(const ndn::Name& namePrefix, const std::string& faceUri)
akmhoquefdbddb12014-05-02 18:35:19 -0500285{
akmhoque157b0a42014-05-13 00:26:37 -0500286 uint32_t faceId = m_faceMap.getFaceId(faceUri);
287 if (faceId > 0) {
288 ndn::nfd::ControlParameters controlParameters;
289 controlParameters
290 .setName(namePrefix)
291 .setFaceId(faceId)
292 .setOrigin(128);
293 m_controller.start<ndn::nfd::RibUnregisterCommand>(controlParameters,
akmhoquefdbddb12014-05-02 18:35:19 -0500294 ndn::bind(&Fib::onSuccess, this, _1,
295 "Successful in unregistering name"),
296 ndn::bind(&Fib::onFailure, this, _1, _2,
297 "Failed in unregistering name"));
akmhoque157b0a42014-05-13 00:26:37 -0500298 }
akmhoquefdbddb12014-05-02 18:35:19 -0500299}
300
301void
akmhoque157b0a42014-05-13 00:26:37 -0500302Fib::setStrategy(const ndn::Name& name, const std::string& strategy)
303{
304 ndn::nfd::ControlParameters parameters;
305 parameters
306 .setName(name)
307 .setStrategy(strategy);
308
309 m_controller.start<ndn::nfd::StrategyChoiceSetCommand>(parameters,
310 bind(&Fib::onSuccess, this, _1,
311 "Successfully set strategy choice"),
312 bind(&Fib::onFailure, this, _1, _2,
313 "Failed to set strategy choice"));
314}
315
316void
317Fib::onRegistration(const ndn::nfd::ControlParameters& commandSuccessResult,
318 const std::string& message, const std::string& faceUri)
319{
320 //std::cout << message << ": " << commandSuccessResult << std::endl;
321 m_faceMap.update(faceUri, commandSuccessResult.getFaceId());
322 m_faceMap.print();
323}
324
325
326void
akmhoque31d1d4b2014-05-05 22:08:14 -0500327Fib::onSuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
328 const std::string& message)
akmhoquefdbddb12014-05-02 18:35:19 -0500329{
akmhoque157b0a42014-05-13 00:26:37 -0500330 //std::cout << message << ": " << commandSuccessResult << std::endl;
akmhoquefdbddb12014-05-02 18:35:19 -0500331}
332
333void
akmhoque31d1d4b2014-05-05 22:08:14 -0500334Fib::onFailure(uint32_t code, const std::string& error,
335 const std::string& message)
akmhoquefdbddb12014-05-02 18:35:19 -0500336{
337 std::cout << message << ": " << error << " (code: " << code << ")";
338}
339
akmhoque674b0b12014-05-20 14:33:28 -0500340void
341Fib::writeLog()
342{
343 _LOG_DEBUG("-------------------FIB-----------------------------");
344 for (std::list<FibEntry>::iterator it = m_table.begin(); it != m_table.end();
345 ++it) {
346 (*it).writeLog();
347 }
348}
akmhoquefdbddb12014-05-02 18:35:19 -0500349
350void
akmhoque53353462014-04-22 08:43:45 -0500351Fib::print()
352{
353 cout << "-------------------FIB-----------------------------" << endl;
354 for (std::list<FibEntry>::iterator it = m_table.begin(); it != m_table.end();
akmhoque157b0a42014-05-13 00:26:37 -0500355 ++it) {
akmhoque53353462014-04-22 08:43:45 -0500356 cout << (*it);
357 }
358}
359
360} //namespace nlsr