26 #ifndef NFD_RIB_FIB_UPDATER_HPP 27 #define NFD_RIB_FIB_UPDATER_HPP 34 #include <ndn-cxx/mgmt/nfd/controller.hpp> 44 class Error :
public std::runtime_error
49 :
std::runtime_error(what)
70 const FibUpdateSuccessCallback& onSuccess,
71 const FibUpdateFailureCallback& onFailure);
89 sendUpdates(
const FibUpdateList& updates,
90 const FibUpdateSuccessCallback& onSuccess,
91 const FibUpdateFailureCallback& onFailure);
97 sendUpdatesForBatchFaceId(
const FibUpdateSuccessCallback& onSuccess,
98 const FibUpdateFailureCallback& onFailure);
104 sendUpdatesForNonBatchFaceId(
const FibUpdateSuccessCallback& onSuccess,
105 const FibUpdateFailureCallback& onFailure);
113 sendAddNextHopUpdate(
const FibUpdate& update,
114 const FibUpdateSuccessCallback& onSuccess,
115 const FibUpdateFailureCallback& onFailure,
116 uint32_t nTimeouts = 0);
124 sendRemoveNextHopUpdate(
const FibUpdate& update,
125 const FibUpdateSuccessCallback& onSuccess,
126 const FibUpdateFailureCallback& onFailure,
127 uint32_t nTimeouts = 0);
133 computeUpdatesForRegistration(
const RibUpdate& update);
138 computeUpdatesForUnregistration(
const RibUpdate& update);
154 const FibUpdateSuccessCallback& onSuccess,
155 const FibUpdateFailureCallback& onFailure);
174 const FibUpdateSuccessCallback& onSuccess,
175 const FibUpdateFailureCallback& onFailure,
176 const ndn::nfd::ControlResponse& response, uint32_t nTimeouts);
198 addInheritedRoutes(
const Name& name,
const Rib::RouteSet& routesToAdd,
const Route& ignore);
208 createFibUpdatesForNewRibEntry(
const Name& name,
const Route& route,
214 createFibUpdatesForNewRoute(
const RibEntry& entry,
const Route& route,
215 const bool captureWasTurnedOn);
220 createFibUpdatesForUpdatedRoute(
const RibEntry& entry,
const Route& route,
221 const Route& existingRoute);
226 createFibUpdatesForErasedRoute(
const RibEntry& entry,
const Route& route,
227 const bool captureWasTurnedOff);
232 createFibUpdatesForErasedRibEntry(
const RibEntry& entry);
250 addInheritedRoute(
const Name& name,
const Route& route);
255 removeInheritedRoute(
const Name& name,
const Route& route);
259 ndn::nfd::Controller& m_controller;
260 uint64_t m_batchFaceId;
263 FibUpdateList m_updatesForBatchFaceId;
264 FibUpdateList m_updatesForNonBatchFaceId;
272 static const unsigned int MAX_NUM_TIMEOUTS;
273 static const uint32_t ERROR_FACE_NOT_FOUND;
279 #endif // NFD_RIB_FIB_UPDATER_HPP std::list< FibUpdate > FibUpdateList
represents the Routing Information Base
std::set< Route, RouteComparePredicate > RouteSet
computes FibUpdates based on updates to the RIB and sends them to NFD
function< void(RibUpdateList inheritedRoutes)> FibUpdateSuccessCallback
represents a collection of RibUpdates to be applied to a single FaceId
Error(const std::string &what)
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 ...
std::list< RibUpdate > RibUpdateList
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
std::list< shared_ptr< RibEntry > > RibEntryList
represents a route for a name prefix
FibUpdater(Rib &rib, ndn::nfd::Controller &controller)
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
represents a RIB entry, which contains one or more Routes with the same prefix
function< void(uint32_t code, const std::string &error)> FibUpdateFailureCallback