43 : m_controller(controller)
44 , m_commandOptions(options)
45 , m_controlParameters(parameters)
48 std::bind(&NfdRibReadvertiseDestination::handleRibInsert,
this, _1));
50 std::bind(&NfdRibReadvertiseDestination::handleRibErase,
this, _1));
55 std::function<
void()> successCb,
56 std::function<
void(
const std::string&)> failureCb)
69 std::function<
void()> successCb,
70 std::function<
void(
const std::string&)> failureCb)
84 return m_controlParameters;
90 return m_commandOptions;
94 NfdRibReadvertiseDestination::handleRibInsert(
const ndn::Name&
name)
102 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
void advertise(const ReadvertisedRoute &rr, std::function< void()> successCb, std::function< void(const std::string &)> failureCb) override
add a name prefix into NFD RIB
a readvertise destination using NFD RIB management protocol
void setAvailability(bool isAvailable)
ndn::nfd::ControlParameters getControlParameters()
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.
represents a rib/unregister command
CommandOptions & setSigningInfo(const security::SigningInfo &signingInfo)
sets signing parameters
NfdRibReadvertiseDestination(ndn::nfd::Controller &controller, Rib &rib, const ndn::nfd::CommandOptions &options=ndn::nfd::CommandOptions(), const ndn::nfd::ControlParameters ¶meters=ndn::nfd::ControlParameters() .setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT))
represents a rib/register command
ndn::util::signal::Signal< Rib, Name > afterInsertEntry
signals after a RIB entry is inserted
const Name & getPrefix() const
ndn::util::signal::Signal< Rib, Name > afterEraseEntry
signals after a RIB entry is erased
ControlParameters & setName(const Name &name)
#define NFD_LOG_INIT(name)
ndn::nfd::CommandOptions getCommandOptions()