29 #include <ndn-cxx/mgmt/nfd/command-options.hpp> 30 #include <ndn-cxx/mgmt/nfd/control-command.hpp> 31 #include <ndn-cxx/mgmt/nfd/control-parameters.hpp> 32 #include <ndn-cxx/mgmt/nfd/control-response.hpp> 44 const Name& commandPrefix,
46 : m_controller(controller)
47 , m_commandPrefix(commandPrefix)
50 std::bind(&NfdRibReadvertiseDestination::handleRibInsert,
this, _1));
52 std::bind(&NfdRibReadvertiseDestination::handleRibErase,
this, _1));
57 std::function<
void()> successCb,
58 std::function<
void(
const std::string&)> failureCb)
71 std::function<
void()> successCb,
72 std::function<
void(
const std::string&)> failureCb)
84 NfdRibReadvertiseDestination::handleRibInsert(
const ndn::Name&
name)
92 NfdRibReadvertiseDestination::handleRibErase(
const ndn::Name& name)
void start(const ControlParameters ¶meters, const CommandSucceedCallback &onSuccess, const CommandFailCallback &onFailure, const CommandOptions &options=CommandOptions())
start command execution
represents the Routing Information Base
represents parameters in a ControlCommand request or response
void withdraw(const ReadvertisedRoute &rr, std::function< void()> successCb, std::function< void(const std::string &)> failureCb) override
remove a name prefix from NFD RIB
#define NFD_LOG_DEBUG(expression)
void advertise(const ReadvertisedRoute &rr, std::function< void()> successCb, std::function< void(const std::string &)> failureCb) override
add a name prefix into NFD RIB
void setAvailability(bool isAvailable)
mgmt::ControlResponse ControlResponse
contains options for ControlCommand execution
Copyright (c) 2011-2015 Regents of the University of California.
state of a readvertised route
ndn::security::SigningInfo signer
signer for commands
Name prefix
readvertised prefix
NFD Management protocol client.
Represents an absolute name.
bool isPrefixOf(const Name &other) const
Check if this name is a prefix of another name.
represents a rib/unregister command
CommandOptions & setSigningInfo(const security::SigningInfo &signingInfo)
sets signing parameters
represents a rib/register command
ndn::util::signal::Signal< Rib, Name > afterInsertEntry
signals after a RIB entry is inserted
ndn::util::signal::Signal< Rib, Name > afterEraseEntry
signals after a RIB entry is erased
NfdRibReadvertiseDestination(ndn::nfd::Controller &controller, const Name &commandPrefix, Rib &rib)
#define NFD_LOG_INIT(name)
CommandOptions & setPrefix(const Name &prefix)
sets command prefix