Represents the Routing Information Base. More...
#include <daemon/rib/rib.hpp>
Public Types | |
using | const_iterator = RibTable::const_iterator |
using | RibEntryList = std::list< shared_ptr< RibEntry > > |
using | RibTable = std::map< Name, shared_ptr< RibEntry > > |
using | UpdateFailureCallback = std::function< void(uint32_t code, const std::string &error)> |
using | UpdateSuccessCallback = std::function< void()> |
Public Member Functions | |
const_iterator | begin () const |
void | beginApplyUpdate (const RibUpdate &update, const UpdateSuccessCallback &onSuccess, const UpdateFailureCallback &onFailure) |
Passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates. More... | |
void | beginRemoveFace (uint64_t faceId) |
Starts the FIB update process when a face has been destroyed. More... | |
void | beginRemoveFailedFaces (const std::set< uint64_t > &activeFaceIds) |
bool | empty () const noexcept |
const_iterator | end () const |
const_iterator | find (const Name &prefix) const |
Route * | find (const Name &prefix, const Route &route) const |
Route * | findLongestPrefix (const Name &prefix, const Route &route) const |
shared_ptr< RibEntry > | findParent (const Name &prefix) const |
void | insert (const Name &prefix, const Route &route) |
void | onRouteExpiration (const Name &prefix, const Route &route) |
void | setFibUpdater (FibUpdater *updater) |
size_t | size () const noexcept |
Public Attributes | |
signal::Signal< Rib, RibRouteRef > | afterAddRoute |
Signals after a Route is added. More... | |
signal::Signal< Rib, Name > | afterEraseEntry |
Signals after a RIB entry is erased. More... | |
signal::Signal< Rib, Name > | afterInsertEntry |
Signals after a RIB entry is inserted. More... | |
signal::Signal< Rib, RibRouteRef > | beforeRemoveRoute |
Signals before a route is removed. More... | |
Represents the Routing Information Base.
The Routing Information Base (RIB) contains a collection of Route objects, each representing a piece of static or dynamic routing information registered by applications, operators, or NFD itself. Routes associated with the same namespace are collected into a RIB entry.
using nfd::rib::Rib::const_iterator = RibTable::const_iterator |
using nfd::rib::Rib::RibEntryList = std::list<shared_ptr<RibEntry> > |
using nfd::rib::Rib::RibTable = std::map<Name, shared_ptr<RibEntry> > |
using nfd::rib::Rib::UpdateFailureCallback = std::function<void(uint32_t code, const std::string& error)> |
using nfd::rib::Rib::UpdateSuccessCallback = std::function<void()> |
|
inline |
void nfd::rib::Rib::beginApplyUpdate | ( | const RibUpdate & | update, |
const UpdateSuccessCallback & | onSuccess, | ||
const UpdateFailureCallback & | onFailure | ||
) |
Passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates.
If the FIB is updated successfully, onFibUpdateSuccess() will be called, and the RIB will be updated
If the FIB update fails, onFibUpdateFailure() will be called, and the RIB will not be updated.
void nfd::rib::Rib::beginRemoveFace | ( | uint64_t | faceId | ) |
void nfd::rib::Rib::beginRemoveFailedFaces | ( | const std::set< uint64_t > & | activeFaceIds | ) |
|
inline |
Rib::const_iterator nfd::rib::Rib::find | ( | const Name & | prefix | ) | const |
shared_ptr< RibEntry > nfd::rib::Rib::findParent | ( | const Name & | prefix | ) | const |
void nfd::rib::Rib::insert | ( | const Name & | prefix, |
const Route & | route | ||
) |
void nfd::rib::Rib::onRouteExpiration | ( | const Name & | prefix, |
const Route & | route | ||
) |
void nfd::rib::Rib::setFibUpdater | ( | FibUpdater * | updater | ) |
signal::Signal<Rib, RibRouteRef> nfd::rib::Rib::afterAddRoute |
signal::Signal<Rib, Name> nfd::rib::Rib::afterEraseEntry |
signal::Signal<Rib, Name> nfd::rib::Rib::afterInsertEntry |
signal::Signal<Rib, RibRouteRef> nfd::rib::Rib::beforeRemoveRoute |