|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
26 #ifndef NFD_DAEMON_RIB_RIB_HPP
27 #define NFD_DAEMON_RIB_RIB_HPP
59 class Rib : noncopyable
63 using RibTable = std::map<Name, shared_ptr<RibEntry>>;
138 enqueueRemoveFace(
const RibEntry& entry, uint64_t faceId);
145 addUpdateToQueue(
const RibUpdate& update,
152 sendBatchFromQueue();
161 uint32_t code,
const std::string& error);
165 erase(
const Name& prefix,
const Route& route);
168 using RouteComparePredicate = bool (*)(
const Route&,
const Route&);
169 using RouteSet = std::set<Route, RouteComparePredicate>;
174 std::list<shared_ptr<RibEntry>>
175 findDescendants(
const Name& prefix)
const;
180 std::list<shared_ptr<RibEntry>>
181 findDescendantsForNonInsertedName(
const Name& prefix)
const;
184 eraseEntry(RibTable::iterator it);
194 getAncestorRoutes(
const RibEntry& entry)
const;
203 getAncestorRoutes(
const Name&
name)
const;
236 std::multimap<uint64_t, shared_ptr<RibEntry>> m_faceEntries;
240 struct UpdateQueueItem
247 using UpdateQueue = std::list<UpdateQueueItem>;
248 UpdateQueue m_updateBatches;
249 bool m_isUpdateInProgress =
false;
260 #endif // NFD_DAEMON_RIB_RIB_HPP
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
Represents a RIB entry, which contains one or more Routes with the same prefix.
RibTable::const_iterator const_iterator
const_iterator find(const Name &prefix) const
std::map< Name, shared_ptr< RibEntry > > RibTable
computes FibUpdates based on updates to the RIB and sends them to NFD
RibEntry::const_iterator route
void onRouteExpiration(const Name &prefix, const Route &route)
signal::Signal< Rib, Name > afterInsertEntry
signals after a RIB entry is inserted
provides a lightweight signal / event system
std::list< RibUpdate > RibUpdateList
bool operator<(const ReadvertisedRoute &lhs, const ReadvertisedRoute &rhs)
Represents an absolute name.
std::function< void(uint32_t code, const std::string &error)> UpdateFailureCallback
signal::Signal< Rib, RibRouteRef > beforeRemoveRoute
signals before a route is removed
Copyright (c) 2011-2015 Regents of the University of California.
signal::Signal< Rib, Name > afterEraseEntry
signals after a RIB entry is erased
shared_ptr< RibEntry > findParent(const Name &prefix) const
RouteList::const_iterator const_iterator
Route * findLongestPrefix(const Name &prefix, const Route &route) const
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
represents the Routing Information Base
const_iterator end() const
void insert(const Name &prefix, const Route &route)
void setFibUpdater(FibUpdater *updater)
shared_ptr< RibEntry > entry
signal::Signal< Rib, RibRouteRef > afterAddRoute
signals after a Route is added
void beginRemoveFailedFaces(const std::set< uint64_t > &activeFaceIds)
const_iterator begin() const
std::function< void()> UpdateSuccessCallback
represents a route for a name prefix
void beginRemoveFace(uint64_t faceId)
starts the FIB update process when a face has been destroyed
Represents a collection of RibUpdates to be applied to a single FaceId.
std::list< shared_ptr< RibEntry > > RibEntryList
void beginApplyUpdate(const RibUpdate &update, const UpdateSuccessCallback &onSuccess, const UpdateFailureCallback &onFailure)
passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates.