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 42 of file rib-module.hpp.

Member Function Documentation

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

the 'route add' command

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

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 260 of file rib-module.cpp.

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 322 of file rib-module.cpp.

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 274 of file rib-module.cpp.

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

the 'route list' command

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

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

register 'route list', 'route show', 'route add', 'route remove' commands

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

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

the 'route remove' command

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

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

the 'route show' command

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