27 #include <ndn-cxx/mgmt/nfd/cs-info.hpp> 37 registerCommandHandler<ndn::nfd::CsConfigCommand>(
"config",
38 bind(&CsManager::changeConfig,
this, _4, _5));
69 CsManager::serveInfo(
const Name& topPrefix,
const Interest& interest,
CsInfo & setNHits(uint64_t nHits)
counters provided by Forwarder
represents parameters in a ControlCommand request or response
represents a dispatcher on server side of NFD Management protocol
size_t getLimit() const
get capacity (in number of packets)
CsManager(Cs &cs, const ForwarderCounters &fwCnt, Dispatcher &dispatcher, CommandAuthenticator &authenticator)
bool shouldAdmit() const
get CS_ENABLE_ADMIT flag
CsInfo & setNEntries(uint64_t nEntries)
bool shouldServe() const
get CS_ENABLE_SERVE flag
void enableAdmit(bool shouldAdmit)
set CS_ENABLE_ADMIT flag
CsInfo & setEnableAdmit(bool enableAdmit)
uint64_t getCapacity() const
size_t size() const
get number of stored packets
mgmt::ControlResponse ControlResponse
Copyright (c) 2011-2015 Regents of the University of California.
CsInfo & setEnableServe(bool enableServe)
void end()
end the response successfully after appending zero or more blocks
enables the CS to satisfy Interests using cached Data
void setLimit(size_t nMaxPackets)
change capacity (in number of packets)
enables the CS to admit new Data
represents the CS Information dataset
bool hasFlagBit(size_t bit) const
std::function< void(const ControlResponse &resp)> CommandContinuation
a function to be called after ControlCommandHandler completes
represents the ContentStore
size_t wireEncode(EncodingImpl< TAG > &encoder) const
CsInfo & setCapacity(uint64_t capacity)
provides ControlCommand authorization according to NFD configuration file
void append(const Block &block)
append a Block to the response
bool getFlagBit(size_t bit) const
provides a context for generating response to a StatusDataset request
a collection of common functions shared by all NFD managers, such as communicating with the dispatche...
CsFlagBit
CS enablement flags.
void registerStatusDatasetHandler(const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler)
CsInfo & setNMisses(uint64_t nMisses)
void enableServe(bool shouldServe)
set CS_ENABLE_SERVE flag