nfd::tools::nfdc::RibModule Class Reference

Provides access to NFD RIB management. More...

#include <tools/nfdc/rib-module.hpp>

+ Inheritance diagram for nfd::tools::nfdc::RibModule:
+ Collaboration diagram for nfd::tools::nfdc::RibModule:

Public Member Functions

void fetchStatus (ndn::nfd::Controller &controller, const std::function< void()> &onSuccess, const ndn::nfd::DatasetFailureCallback &onFailure, const CommandOptions &options) override
 Collect status from NFD. More...
 
void formatStatusText (std::ostream &os) const override
 Format collected status as text. More...
 
void formatStatusXml (std::ostream &os) const override
 Format collected status as XML. More...
 

Static Public Member Functions

static void add (ExecuteContext &ctx)
 The 'route add' command. More...
 
static void list (ExecuteContext &ctx)
 The 'route list' command. More...
 
static void registerCommands (CommandParser &parser)
 Register 'route list', 'route show', 'route add', 'route remove' commands. More...
 
static void remove (ExecuteContext &ctx)
 The 'route remove' command. More...
 
static void show (ExecuteContext &ctx)
 The 'route show' command. More...
 

Detailed Description

Provides access to NFD RIB management.

See also
https://redmine.named-data.net/projects/nfd/wiki/RibMgmt

Definition at line 43 of file rib-module.hpp.

Member Function Documentation

◆ add()

void nfd::tools::nfdc::RibModule::add ( ExecuteContext ctx)
static

The 'route add' command.

Definition at line 145 of file rib-module.cpp.

◆ fetchStatus()

void nfd::tools::nfdc::RibModule::fetchStatus ( ndn::nfd::Controller &  controller,
const std::function< void()> &  onSuccess,
const ndn::nfd::DatasetFailureCallback &  onFailure,
const CommandOptions &  options 
)
overridevirtual

Collect status from NFD.

Precondition
no other fetchStatus is in progress
Parameters
controllera controller through which StatusDataset can be requested
onSuccessinvoked when status has been collected into this instance
onFailurepassed to controller.fetch
optionspassed to controller.fetch

Implements nfd::tools::nfdc::Module.

Definition at line 305 of file rib-module.cpp.

◆ formatStatusText()

void nfd::tools::nfdc::RibModule::formatStatusText ( std::ostream &  os) const
overridevirtual

Format collected status as text.

Precondition
fetchStatus has been successful
Parameters
osoutput stream

Implements nfd::tools::nfdc::Module.

Definition at line 367 of file rib-module.cpp.

◆ formatStatusXml()

void nfd::tools::nfdc::RibModule::formatStatusXml ( std::ostream &  os) const
overridevirtual

Format collected status as XML.

Precondition
fetchStatus has been successful
Parameters
osoutput stream

Implements nfd::tools::nfdc::Module.

Definition at line 319 of file rib-module.cpp.

◆ list()

void nfd::tools::nfdc::RibModule::list ( ExecuteContext ctx)
static

The 'route list' command.

Definition at line 74 of file rib-module.cpp.

◆ registerCommands()

void nfd::tools::nfdc::RibModule::registerCommands ( CommandParser parser)
static

Register 'route list', 'route show', 'route add', 'route remove' commands.

Definition at line 36 of file rib-module.cpp.

◆ remove()

void nfd::tools::nfdc::RibModule::remove ( ExecuteContext ctx)
static

The 'route remove' command.

Definition at line 257 of file rib-module.cpp.

◆ show()

void nfd::tools::nfdc::RibModule::show ( ExecuteContext ctx)
static

The 'route show' command.

Definition at line 108 of file rib-module.cpp.