26 #ifndef NFD_DAEMON_RIB_FIB_UPDATER_HPP 27 #define NFD_DAEMON_RIB_FIB_UPDATER_HPP 34 #include <ndn-cxx/mgmt/nfd/controller.hpp> 44 class Error :
public std::runtime_error
47 using std::runtime_error::runtime_error;
112 sendAddNextHopUpdate(
const FibUpdate& update,
115 uint32_t nTimeouts = 0);
123 sendRemoveNextHopUpdate(
const FibUpdate& update,
126 uint32_t nTimeouts = 0);
132 computeUpdatesForRegistration(
const RibUpdate& update);
137 computeUpdatesForUnregistration(
const RibUpdate& update);
175 const ndn::nfd::ControlResponse& response, uint32_t nTimeouts);
191 addInheritedRoutes(
const RibEntry& entry,
const Rib::RouteSet& routesToAdd);
197 addInheritedRoutes(
const Name& name,
const Rib::RouteSet& routesToAdd,
const Route& ignore);
202 removeInheritedRoutes(
const RibEntry& entry,
const Rib::RouteSet& routesToRemove);
207 createFibUpdatesForNewRibEntry(
const Name& name,
const Route& route,
213 createFibUpdatesForNewRoute(
const RibEntry& entry,
const Route& route,
214 const bool captureWasTurnedOn);
219 createFibUpdatesForUpdatedRoute(
const RibEntry& entry,
const Route& route,
220 const Route& existingRoute);
225 createFibUpdatesForErasedRoute(
const RibEntry& entry,
const Route& route,
226 const bool captureWasTurnedOff);
231 createFibUpdatesForErasedRibEntry(
const RibEntry& entry);
237 const Rib::RouteSet& routesToAdd,
238 const Rib::RouteSet& routesToRemove);
243 traverseSubTree(
const RibEntry& entry, Rib::RouteSet routesToAdd, Rib::RouteSet routesToRemove);
248 addInheritedRoute(
const Name& name,
const Route& route);
253 removeInheritedRoute(
const Name& name,
const Route& route);
257 ndn::nfd::Controller& m_controller;
258 uint64_t m_batchFaceId;
273 #endif // NFD_DAEMON_RIB_FIB_UPDATER_HPP
represents the Routing Information Base
std::function< void(RibUpdateList inheritedRoutes)> FibUpdateSuccessCallback
computes FibUpdates based on updates to the RIB and sends them to NFD
std::function< void(uint32_t code, const std::string &error)> FibUpdateFailureCallback
Represents a collection of RibUpdates to be applied to a single FaceId.
std::list< shared_ptr< RibEntry > > RibEntryList
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 ...
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
std::list< RibUpdate > RibUpdateList
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
represents a route for a name prefix
std::list< FibUpdate > FibUpdateList
FibUpdater(Rib &rib, ndn::nfd::Controller &controller)
#define VIRTUAL_WITH_TESTS
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
Represents a RIB entry, which contains one or more Routes with the same prefix.