represents a RIB entry, which contains one or more Routes with the same prefix More...
#include <rib-entry.hpp>
Public Types | |
typedef std::list< Route > | RouteList |
typedef RouteList::iterator | iterator |
typedef RouteList::const_iterator | const_iterator |
Public Member Functions | |
RibEntry () | |
void | setName (const Name &prefix) |
const Name & | getName () const |
shared_ptr< RibEntry > | getParent () const |
bool | hasParent () const |
void | addChild (shared_ptr< RibEntry > child) |
void | removeChild (shared_ptr< RibEntry > child) |
const std::list< shared_ptr< RibEntry > > & | getChildren () const |
bool | hasChildren () const |
bool | insertRoute (const Route &route) |
inserts a new route into the entry's route list If another route already exists with the same faceId and origin, the new route is not inserted. More... | |
void | eraseRoute (const Route &route) |
erases a Route with the same faceId and origin More... | |
iterator | eraseRoute (RouteList::iterator route) |
erases a Route with the passed iterator More... | |
bool | hasFaceId (const uint64_t faceId) const |
RouteList & | getRoutes () |
size_t | getNRoutes () const |
iterator | findRoute (const Route &route) |
const_iterator | findRoute (const Route &route) const |
bool | hasRoute (const Route &route) |
void | addInheritedRoute (const Route &route) |
void | removeInheritedRoute (const Route &route) |
const RouteList & | getInheritedRoutes () const |
Returns the routes this namespace has inherited. More... | |
RouteList::const_iterator | findInheritedRoute (const Route &route) const |
Finds an inherited route with a matching face ID. More... | |
bool | hasInheritedRoute (const Route &route) const |
Determines if the entry has an inherited route with a matching face ID. More... | |
bool | hasCapture () const |
bool | hasChildInheritOnFaceId (uint64_t faceId) const |
Determines if the entry has an inherited route with the passed face ID and its child inherit flag set. More... | |
const Route * | getRouteWithLowestCostByFaceId (uint64_t faceId) const |
Returns the route with the lowest cost that has the passed face ID. More... | |
const Route * | getRouteWithSecondLowestCostByFaceId (uint64_t faceId) const |
const Route * | getRouteWithLowestCostAndChildInheritByFaceId (uint64_t faceId) const |
Returns the route with the lowest cost that has the passed face ID and its child inherit flag set. More... | |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
represents a RIB entry, which contains one or more Routes with the same prefix
Definition at line 36 of file rib-entry.hpp.
typedef std::list<Route> nfd::rib::RibEntry::RouteList |
Definition at line 39 of file rib-entry.hpp.
typedef RouteList::iterator nfd::rib::RibEntry::iterator |
Definition at line 40 of file rib-entry.hpp.
typedef RouteList::const_iterator nfd::rib::RibEntry::const_iterator |
Definition at line 41 of file rib-entry.hpp.
|
inline |
Definition at line 43 of file rib-entry.hpp.
References addChild(), addInheritedRoute(), begin(), end(), eraseRoute(), findInheritedRoute(), findRoute(), getChildren(), getInheritedRoutes(), getName(), getNRoutes(), getParent(), getRoutes(), getRouteWithLowestCostAndChildInheritByFaceId(), getRouteWithLowestCostByFaceId(), getRouteWithSecondLowestCostByFaceId(), hasCapture(), hasChildInheritOnFaceId(), hasChildren(), hasFaceId(), hasInheritedRoute(), hasParent(), hasRoute(), insertRoute(), removeChild(), removeInheritedRoute(), and setName().
|
inline |
Definition at line 196 of file rib-entry.hpp.
Referenced by RibEntry().
|
inline |
Definition at line 202 of file rib-entry.hpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), nfd::rib::RibStatusPublisher::generate(), nfd::rib::operator<<(), and RibEntry().
|
inline |
Definition at line 214 of file rib-entry.hpp.
Referenced by nfd::rib::Rib::findDescendantsForNonInsertedName(), and RibEntry().
bool nfd::rib::RibEntry::hasParent | ( | ) | const |
Referenced by RibEntry().
void nfd::rib::RibEntry::addChild | ( | shared_ptr< RibEntry > | child | ) |
Definition at line 98 of file rib-entry.cpp.
Referenced by RibEntry().
void nfd::rib::RibEntry::removeChild | ( | shared_ptr< RibEntry > | child | ) |
Definition at line 106 of file rib-entry.cpp.
Referenced by RibEntry().
|
inline |
Definition at line 220 of file rib-entry.hpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
bool nfd::rib::RibEntry::hasChildren | ( | ) | const |
Referenced by RibEntry().
bool nfd::rib::RibEntry::insertRoute | ( | const Route & | route | ) |
inserts a new route into the entry's route list If another route already exists with the same faceId and origin, the new route is not inserted.
Definition at line 50 of file rib-entry.cpp.
References end(), findRoute(), nfd::rib::Route::flags, and ndn::nfd::ROUTE_FLAG_CAPTURE.
Referenced by RibEntry().
void nfd::rib::RibEntry::eraseRoute | ( | const Route & | route | ) |
erases a Route with the same faceId and origin
Definition at line 69 of file rib-entry.cpp.
References findRoute().
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
RibEntry::RouteList::iterator nfd::rib::RibEntry::eraseRoute | ( | RouteList::iterator | route | ) |
erases a Route with the passed iterator
Definition at line 114 of file rib-entry.cpp.
References nfd::scheduler::cancel(), NFD_LOG_TRACE, and ndn::nfd::ROUTE_FLAG_CAPTURE.
bool nfd::rib::RibEntry::hasFaceId | ( | const uint64_t | faceId | ) | const |
Definition at line 84 of file rib-entry.cpp.
References begin(), nfd::rib::compareFaceId(), and end().
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
|
inline |
Definition at line 226 of file rib-entry.hpp.
Referenced by RibEntry().
size_t nfd::rib::RibEntry::getNRoutes | ( | ) | const |
Definition at line 92 of file rib-entry.cpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
RibEntry::RouteList::iterator nfd::rib::RibEntry::findRoute | ( | const Route & | route | ) |
Definition at line 38 of file rib-entry.cpp.
References begin(), nfd::rib::compareFaceIdAndOrigin(), and end().
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), eraseRoute(), hasRoute(), insertRoute(), and RibEntry().
RibEntry::RouteList::const_iterator nfd::rib::RibEntry::findRoute | ( | const Route & | route | ) | const |
Definition at line 44 of file rib-entry.cpp.
References begin(), nfd::rib::compareFaceIdAndOrigin(), and end().
bool nfd::rib::RibEntry::hasRoute | ( | const Route & | route | ) |
Definition at line 76 of file rib-entry.cpp.
References end(), and findRoute().
Referenced by RibEntry().
void nfd::rib::RibEntry::addInheritedRoute | ( | const Route & | route | ) |
Definition at line 132 of file rib-entry.cpp.
Referenced by RibEntry().
void nfd::rib::RibEntry::removeInheritedRoute | ( | const Route & | route | ) |
Definition at line 138 of file rib-entry.cpp.
References nfd::rib::compareFaceId(), and nfd::rib::Route::faceId.
Referenced by RibEntry().
|
inline |
Returns the routes this namespace has inherited.
The inherited routes returned represent inherited routes this namespace has in the FIB.
Definition at line 232 of file rib-entry.hpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
RibEntry::RouteList::const_iterator nfd::rib::RibEntry::findInheritedRoute | ( | const Route & | route | ) | const |
Finds an inherited route with a matching face ID.
Definition at line 146 of file rib-entry.cpp.
References nfd::rib::compareFaceId(), and nfd::rib::Route::faceId.
Referenced by hasInheritedRoute(), and RibEntry().
bool nfd::rib::RibEntry::hasInheritedRoute | ( | const Route & | route | ) | const |
Determines if the entry has an inherited route with a matching face ID.
Definition at line 153 of file rib-entry.cpp.
References findInheritedRoute().
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
bool nfd::rib::RibEntry::hasCapture | ( | ) | const |
Definition at line 161 of file rib-entry.cpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
bool nfd::rib::RibEntry::hasChildInheritOnFaceId | ( | uint64_t | faceId | ) | const |
Determines if the entry has an inherited route with the passed face ID and its child inherit flag set.
Definition at line 167 of file rib-entry.cpp.
References ndn::nfd::ROUTE_FLAG_CHILD_INHERIT.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
const Route * nfd::rib::RibEntry::getRouteWithLowestCostByFaceId | ( | uint64_t | faceId | ) | const |
Returns the route with the lowest cost that has the passed face ID.
Definition at line 179 of file rib-entry.cpp.
References nfd::rib::Route::cost.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
const Route * nfd::rib::RibEntry::getRouteWithSecondLowestCostByFaceId | ( | uint64_t | faceId | ) | const |
Definition at line 201 of file rib-entry.cpp.
References nfd::rib::Route::cost.
Referenced by RibEntry().
const Route * nfd::rib::RibEntry::getRouteWithLowestCostAndChildInheritByFaceId | ( | uint64_t | faceId | ) | const |
Returns the route with the lowest cost that has the passed face ID and its child inherit flag set.
Definition at line 222 of file rib-entry.cpp.
References nfd::rib::Route::cost, and ndn::nfd::ROUTE_FLAG_CHILD_INHERIT.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and RibEntry().
|
inline |
Definition at line 238 of file rib-entry.hpp.
Referenced by findRoute(), hasFaceId(), and RibEntry().
|
inline |
Definition at line 244 of file rib-entry.hpp.
Referenced by findRoute(), hasFaceId(), hasRoute(), insertRoute(), and RibEntry().
|
inline |
Definition at line 250 of file rib-entry.hpp.
|
inline |
Definition at line 256 of file rib-entry.hpp.
References nfd::rib::operator<<().