28 #include "core/version.hpp" 33 : m_forwarder(forwarder)
34 , m_dispatcher(dispatcher)
35 , m_startTimestamp(
time::system_clock::now())
38 std::bind(&ForwarderStatusManager::listGeneralStatus,
this, _1, _2, _3));
42 ForwarderStatusManager::collectGeneralStatus()
70 ForwarderStatusManager::listGeneralStatus(
const Name&,
const Interest&,
73 auto status = this->collectGeneralStatus();
74 const auto& wire = status.wireEncode();
76 for (
const auto& subblock : wire.elements()) {
ForwarderStatus & setNFibEntries(uint64_t nFibEntries)
const ForwarderCounters & getCounters() const
represents NFD General Status dataset
ForwarderStatus & setNOutNacks(uint64_t nOutNacks)
represents a dispatcher on server side of NFD Management protocol
ForwarderStatus & setNInData(uint64_t nInData)
ForwarderStatus & setNOutData(uint64_t nOutData)
ForwarderStatus & setNInNacks(uint64_t nInNacks)
Main class of NFD's forwarding engine.
Represents an Interest packet.
static time_point now() noexcept
Authorization makeAcceptAllAuthorization()
return an Authorization that accepts all Interests, with empty string as requester ...
ForwarderStatus & setNSatisfiedInterests(uint64_t nSatisfiedInterests)
size_t size() const
get number of stored packets
ForwarderStatus & setNInInterests(uint64_t nInInterests)
ForwarderStatus & setStartTimestamp(const time::system_clock::TimePoint &startTimestamp)
Copyright (c) 2011-2015 Regents of the University of California.
void end()
Finalizes the response successfully after appending zero or more blocks.
ForwarderStatus & setNfdVersion(const std::string &nfdVersion)
ForwarderStatus & setNOutInterests(uint64_t nOutInterests)
ForwarderStatus & setNUnsatisfiedInterests(uint64_t nUnsatisfiedInterests)
ForwarderStatus & setNMeasurementsEntries(uint64_t nMeasurementsEntries)
Represents an absolute name.
void append(span< const uint8_t > bytes)
Appends a sequence of bytes to the response.
ForwarderStatus & setNPitEntries(uint64_t nPitEntries)
ForwarderStatus & setNCsEntries(uint64_t nCsEntries)
Measurements & getMeasurements()
void addStatusDataset(const PartialName &relPrefix, Authorization authorize, StatusDatasetHandler handle)
register a StatusDataset or a prefix under which StatusDatasets can be requested
Provides a context for generating the response to a StatusDataset request.
ForwarderStatus & setNNameTreeEntries(uint64_t nNameTreeEntries)
ForwarderStatus & setCurrentTimestamp(const time::system_clock::TimePoint ¤tTimestamp)
ForwarderStatusManager(Forwarder &forwarder, Dispatcher &dispatcher)