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 (Controller &controller, const std::function< void()> &onSuccess, const Controller::DatasetFailCallback &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 40 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 143 of file rib-module.cpp.

◆ fetchStatus()

void nfd::tools::nfdc::RibModule::fetchStatus ( Controller &  controller,
const std::function< void()> &  onSuccess,
const Controller::DatasetFailCallback &  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 303 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 365 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 317 of file rib-module.cpp.

◆ list()

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

The 'route list' command.

Definition at line 72 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 34 of file rib-module.cpp.

◆ remove()

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

The 'route remove' command.

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

◆ show()

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

The 'route show' command.

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