[ndnSIM] ndnsim FIB add nexthop and delete
费小罗
feixiaoluo202 at gmail.com
Tue Nov 27 19:42:16 PST 2018
hi all
now i want to add a nexthop in FIB and set a timer to delete it
automatically, during simulating. but there are some problems
1)i get the specific node and add a nexthop ,and in the structure i defined
another attribution to show the nexthop node id. Is this effective? and can
it have some side effect ?
void Entry::addNextHop(Face& face, uint64_t cost,std::string nexthopmac) {
auto it = this->findNextHop(face); if (it == m_nextHops.end()) {
m_nextHops.emplace_back(face); it = std::prev(m_nextHops.end()); }
it->setNextHopMac(nexthopmac); it->setCost(cost); this->sortNextHops(); }
2)i also want to set a timer to delete nexthop, i do like following in
forwarder.cpp onIncomingData function. i run sudo ./waf , there is no
error ,but when i run scenarios it shutdown suddenly. Is this because i
have done some work in 1)
nfd::scheduler::schedule(time::seconds(1),[&]{thisNode->GetObject<ns3::ndn::L3Protocol>()->getForwarder()->getFib().removeNextHop(*(fibEntry_bool.f
irst),inFace);});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20181128/371d828b/attachment.html>
More information about the ndnSIM
mailing list