35 const function<
void()>& onSuccess,
36 const Controller::DatasetFailCallback& onFailure,
37 const CommandOptions& options)
39 controller.fetch<ndn::nfd::RibDataset>(
40 [
this, onSuccess] (
const std::vector<RibEntry>& result) {
51 for (
const RibEntry& item : m_status) {
62 os <<
"<prefix>" <<
xml::Text{item.getName().toUri()} <<
"</prefix>";
65 for (
const Route& route : item.getRoutes()) {
67 <<
"<faceId>" << route.getFaceId() <<
"</faceId>"
68 <<
"<origin>" << route.getOrigin() <<
"</origin>"
69 <<
"<cost>" << route.getCost() <<
"</cost>";
70 if (route.getFlags() == ndn::nfd::ROUTE_FLAGS_NONE) {
75 if (route.isChildInherit()) {
76 os <<
"<childInherit/>";
78 if (route.isRibCapture()) {
79 os <<
"<ribCapture/>";
83 if (!route.hasInfiniteExpirationPeriod()) {
84 os <<
"<expirationPeriod>"
86 <<
"</expirationPeriod>";
99 for (
const RibEntry& item : m_status) {
107 os <<
" " << item.getName() <<
" route={";
110 for (
const Route& route : item.getRoutes()) {
112 <<
"faceid=" << route.getFaceId()
113 <<
" (origin=" << route.getOrigin()
114 <<
" cost=" << route.getCost();
115 if (!route.hasInfiniteExpirationPeriod()) {
118 if (route.isChildInherit()) {
119 os <<
" ChildInherit";
121 if (route.isRibCapture()) {
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
std::string formatDuration(DURATION d, bool isLong=false)
print different string on first and subsequent usage