NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::rib::FibUpdater Class Reference

computes FibUpdates based on updates to the RIB and sends them to NFD More...

#include <fib-updater.hpp>

Inheritance diagram for nfd::rib::FibUpdater:
Collaboration diagram for nfd::rib::FibUpdater:

Classes

class  Error
 

Public Types

using FibUpdateList = std::list< FibUpdate >
 
using FibUpdateSuccessCallback = std::function< void(RibUpdateList inheritedRoutes)>
 
using FibUpdateFailureCallback = std::function< void(uint32_t code, const std::string &error)>
 

Public Member Functions

 FibUpdater (Rib &rib, ndn::nfd::Controller &controller)
 
NFD_VIRTUAL_WITH_TESTS ~FibUpdater ()=default
 
void computeAndSendFibUpdates (const RibUpdateBatch &batch, const FibUpdateSuccessCallback &onSuccess, const FibUpdateFailureCallback &onFailure)
 computes FibUpdates using the provided RibUpdateBatch and then sends the updates to NFD's FIB More...
 

Detailed Description

computes FibUpdates based on updates to the RIB and sends them to NFD

Definition at line 41 of file fib-updater.hpp.

Member Typedef Documentation

◆ FibUpdateList

Definition at line 51 of file fib-updater.hpp.

◆ FibUpdateSuccessCallback

using nfd::rib::FibUpdater::FibUpdateSuccessCallback = std::function<void(RibUpdateList inheritedRoutes)>

Definition at line 52 of file fib-updater.hpp.

◆ FibUpdateFailureCallback

using nfd::rib::FibUpdater::FibUpdateFailureCallback = std::function<void(uint32_t code, const std::string& error)>

Definition at line 53 of file fib-updater.hpp.

Constructor & Destructor Documentation

◆ FibUpdater()

nfd::rib::FibUpdater::FibUpdater ( Rib rib,
ndn::nfd::Controller controller 
)

Definition at line 41 of file fib-updater.cpp.

References nfd::rib::Rib::setFibUpdater().

◆ ~FibUpdater()

NFD_VIRTUAL_WITH_TESTS nfd::rib::FibUpdater::~FibUpdater ( )
default

Member Function Documentation

◆ computeAndSendFibUpdates()

void nfd::rib::FibUpdater::computeAndSendFibUpdates ( const RibUpdateBatch batch,
const FibUpdateSuccessCallback onSuccess,
const FibUpdateFailureCallback onFailure 
)

computes FibUpdates using the provided RibUpdateBatch and then sends the updates to NFD's FIB

Note
Caller must guarantee that the previous batch has either succeeded or failed before calling this method

Definition at line 49 of file fib-updater.cpp.

References nfd::rib::FibUpdate::action, nfd::rib::FibUpdate::ADD_NEXTHOP, ndn::tlv::nfd::ControlParameters, nfd::rib::FibUpdate::cost, nfd::rib::Route::cost, nfd::rib::FibUpdate::createAddUpdate(), nfd::rib::FibUpdate::createRemoveUpdate(), nfd::rib::Rib::end(), nfd::rib::RibEntry::eraseRoute(), ndn::nfd::Controller::ERROR_TIMEOUT, nfd::rib::Route::expires, nfd::rib::FibUpdate::faceId, nfd::rib::Route::faceId, nfd::rib::Rib::find(), nfd::rib::Rib::findParent(), nfd::rib::RibEntry::findRoute(), nfd::rib::Route::flags, nfd::rib::RibEntry::getChildren(), ndn::mgmt::ControlResponse::getCode(), nfd::rib::RibUpdateBatch::getFaceId(), nfd::rib::RibEntry::getInheritedRoutes(), nfd::rib::RibEntry::getName(), nfd::rib::RibUpdate::getName(), nfd::rib::RibEntry::getNRoutes(), nfd::rib::RibUpdate::getRoute(), nfd::rib::RibEntry::getRouteWithLowestCostAndChildInheritByFaceId(), nfd::rib::RibEntry::getRouteWithLowestCostByFaceId(), ndn::mgmt::ControlResponse::getText(), nfd::rib::RibEntry::hasCapture(), nfd::rib::RibEntry::hasChildInheritOnFaceId(), nfd::rib::RibEntry::hasFaceId(), nfd::rib::RibEntry::hasInheritedRoute(), ndn::nfd::RouteFlagsTraits< T >::isChildInherit(), ndn::nfd::RouteFlagsTraits< T >::isRibCapture(), nfd::rib::FibUpdate::name, NDN_THROW, NFD_LOG_DEBUG, nfd::rib::RibUpdate::REGISTER, nfd::rib::RibUpdate::REMOVE_FACE, nfd::rib::FibUpdate::REMOVE_NEXTHOP, nfd::rib::RibUpdate::setAction(), nfd::rib::RibUpdate::setName(), nfd::rib::RibUpdate::setRoute(), ndn::nfd::Controller::start(), ndn::to_string(), and nfd::rib::RibUpdate::UNREGISTER.

Referenced by nfd::rib::Rib::beginRemoveFailedFaces().


The documentation for this class was generated from the following files: