30 #include <ndn-cxx/management/nfd-rib-entry.hpp> 31 #include <ndn-cxx/face.hpp> 41 ndn::KeyChain& keyChain)
54 size_t totalLength = 0;
61 size_t ribEntryLength = 0;
65 for (
const Route& route : entry)
73 if (route.expires < time::steady_clock::TimePoint::max()) {
82 ribEntryLength += tlvEntry.
wireEncode(outBuffer);
84 NFD_LOG_DEBUG(
"generate: rib entry length = " << ribEntryLength);
86 totalLength += ribEntryLength;
provides a publisher of Status Dataset or other segmented octet stream
Copyright (c) 2011-2015 Regents of the University of California.
#define NFD_LOG_DEBUG(expression)
static time_point now() noexcept
RibEntry & setName(const Name &prefix)
virtual size_t generate(ndn::EncodingBuffer &outBuffer)
In a derived class, write the octets into outBuffer.
Data abstraction for Route.
Route & setFaceId(uint64_t faceId)
Route & setExpirationPeriod(const time::milliseconds &expirationPeriod)
Route & setFlags(uint64_t flags)
set route inheritance flags
EncodingImpl< EncoderTag > EncodingBuffer
Copyright (c) 2011-2015 Regents of the University of California.
size_t wireEncode(EncodingImpl< TAG > &block) const
represents a RIB entry, which contains one or more Routes with the same prefix
represents a route for a name prefix
Abstraction to communicate with local or remote NDN forwarder.
RibStatusPublisher(const Rib &rib, ndn::Face &face, const Name &prefix, ndn::KeyChain &keyChain)
Name abstraction to represent an absolute name.
RibTable::const_iterator const_iterator
const Name & getName() const
RibEntry & addRoute(const Route &route)
const_iterator end() const
virtual ~RibStatusPublisher()
#define NFD_LOG_INIT(name)
Route & setCost(uint64_t cost)
const_iterator begin() const
Route & setOrigin(uint64_t origin)
set Origin
Data abstraction for RIB entry.