29 #include <ndn-cxx/mgmt/nfd/status-dataset.hpp>
35 const std::function<
void()>& onSuccess,
36 const ndn::nfd::DatasetFailureCallback& onFailure,
37 const CommandOptions& options)
39 controller.fetch<ndn::nfd::FibDataset>(
40 [
this, onSuccess] (
const std::vector<FibEntry>& result) {
51 for (
const FibEntry& item : m_status) {
62 os <<
"<prefix>" <<
xml::Text{item.getPrefix().toUri()} <<
"</prefix>";
65 for (
const NextHopRecord& nh : item.getNextHopRecords()) {
67 <<
"<faceId>" << nh.getFaceId() <<
"</faceId>"
68 <<
"<cost>" << nh.getCost() <<
"</cost>"
80 for (
const FibEntry& item : m_status) {
88 os <<
" " << item.getPrefix() <<
" nexthops={";
91 for (
const NextHopRecord& nh : item.getNextHopRecords()) {
93 <<
"faceid=" << nh.getFaceId()
94 <<
" (cost=" << nh.getCost() <<
")";
Print different string on first and subsequent usage.