Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2014-2018, Regents of the University of California, |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 4 | * Arizona Board of Regents, |
| 5 | * Colorado State University, |
| 6 | * University Pierre & Marie Curie, Sorbonne University, |
| 7 | * Washington University in St. Louis, |
| 8 | * Beijing Institute of Technology, |
| 9 | * The University of Memphis. |
| 10 | * |
| 11 | * This file is part of NFD (Named Data Networking Forwarding Daemon). |
| 12 | * See AUTHORS.md for complete list of NFD authors and contributors. |
| 13 | * |
| 14 | * NFD is free software: you can redistribute it and/or modify it under the terms |
| 15 | * of the GNU General Public License as published by the Free Software Foundation, |
| 16 | * either version 3 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 19 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 20 | * PURPOSE. See the GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License along with |
| 23 | * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 24 | */ |
| 25 | |
| 26 | #include "rib-module.hpp" |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 27 | #include "find-face.hpp" |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 28 | #include "format-helpers.hpp" |
| 29 | |
| 30 | namespace nfd { |
| 31 | namespace tools { |
Junxiao Shi | 331ade7 | 2016-08-19 14:07:19 +0000 | [diff] [blame] | 32 | namespace nfdc { |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 33 | |
| 34 | void |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 35 | RibModule::registerCommands(CommandParser& parser) |
| 36 | { |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 37 | CommandDefinition defRouteList("route", "list"); |
| 38 | defRouteList |
| 39 | .setTitle("print RIB routes") |
| 40 | .addArg("nexthop", ArgValueType::FACE_ID_OR_URI, Required::NO, Positional::YES) |
Junxiao Shi | 8eda682 | 2017-04-12 02:53:14 +0000 | [diff] [blame] | 41 | .addArg("origin", ArgValueType::ROUTE_ORIGIN, Required::NO, Positional::NO); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 42 | parser.addCommand(defRouteList, &RibModule::list); |
Davide Pesavento | d214744 | 2018-02-19 23:58:17 -0500 | [diff] [blame] | 43 | parser.addAlias("route", "list", ""); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 44 | |
| 45 | CommandDefinition defRouteShow("route", "show"); |
| 46 | defRouteShow |
| 47 | .setTitle("show routes toward a prefix") |
| 48 | .addArg("prefix", ArgValueType::NAME, Required::YES, Positional::YES); |
| 49 | parser.addCommand(defRouteShow, &RibModule::show); |
| 50 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 51 | CommandDefinition defRouteAdd("route", "add"); |
| 52 | defRouteAdd |
| 53 | .setTitle("add a route") |
| 54 | .addArg("prefix", ArgValueType::NAME, Required::YES, Positional::YES) |
| 55 | .addArg("nexthop", ArgValueType::FACE_ID_OR_URI, Required::YES, Positional::YES) |
Junxiao Shi | 8eda682 | 2017-04-12 02:53:14 +0000 | [diff] [blame] | 56 | .addArg("origin", ArgValueType::ROUTE_ORIGIN, Required::NO, Positional::NO) |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 57 | .addArg("cost", ArgValueType::UNSIGNED, Required::NO, Positional::NO) |
| 58 | .addArg("no-inherit", ArgValueType::NONE, Required::NO, Positional::NO) |
| 59 | .addArg("capture", ArgValueType::NONE, Required::NO, Positional::NO) |
| 60 | .addArg("expires", ArgValueType::UNSIGNED, Required::NO, Positional::NO); |
| 61 | parser.addCommand(defRouteAdd, &RibModule::add); |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 62 | |
| 63 | CommandDefinition defRouteRemove("route", "remove"); |
| 64 | defRouteRemove |
| 65 | .setTitle("remove a route") |
| 66 | .addArg("prefix", ArgValueType::NAME, Required::YES, Positional::YES) |
| 67 | .addArg("nexthop", ArgValueType::FACE_ID_OR_URI, Required::YES, Positional::YES) |
Junxiao Shi | 8eda682 | 2017-04-12 02:53:14 +0000 | [diff] [blame] | 68 | .addArg("origin", ArgValueType::ROUTE_ORIGIN, Required::NO, Positional::NO); |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 69 | parser.addCommand(defRouteRemove, &RibModule::remove); |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | void |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 73 | RibModule::list(ExecuteContext& ctx) |
| 74 | { |
| 75 | auto nexthopIt = ctx.args.find("nexthop"); |
| 76 | std::set<uint64_t> nexthops; |
Junxiao Shi | 8eda682 | 2017-04-12 02:53:14 +0000 | [diff] [blame] | 77 | auto origin = ctx.args.getOptional<RouteOrigin>("origin"); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 78 | |
| 79 | if (nexthopIt != ctx.args.end()) { |
| 80 | FindFace findFace(ctx); |
| 81 | FindFace::Code res = findFace.execute(nexthopIt->second, true); |
| 82 | |
| 83 | ctx.exitCode = static_cast<int>(res); |
| 84 | switch (res) { |
| 85 | case FindFace::Code::OK: |
| 86 | break; |
| 87 | case FindFace::Code::ERROR: |
| 88 | case FindFace::Code::CANONIZE_ERROR: |
| 89 | case FindFace::Code::NOT_FOUND: |
| 90 | ctx.err << findFace.getErrorReason() << '\n'; |
| 91 | return; |
| 92 | default: |
| 93 | BOOST_ASSERT_MSG(false, "unexpected FindFace result"); |
| 94 | return; |
| 95 | } |
| 96 | |
| 97 | nexthops = findFace.getFaceIds(); |
| 98 | } |
| 99 | |
| 100 | listRoutesImpl(ctx, [&] (const RibEntry& entry, const Route& route) { |
| 101 | return (nexthops.empty() || nexthops.count(route.getFaceId()) > 0) && |
| 102 | (!origin || route.getOrigin() == *origin); |
| 103 | }); |
| 104 | } |
| 105 | |
| 106 | void |
| 107 | RibModule::show(ExecuteContext& ctx) |
| 108 | { |
| 109 | auto prefix = ctx.args.get<Name>("prefix"); |
| 110 | |
| 111 | listRoutesImpl(ctx, [&] (const RibEntry& entry, const Route& route) { |
| 112 | return entry.getName() == prefix; |
| 113 | }); |
| 114 | } |
| 115 | |
| 116 | void |
| 117 | RibModule::listRoutesImpl(ExecuteContext& ctx, const RoutePredicate& filter) |
| 118 | { |
| 119 | ctx.controller.fetch<ndn::nfd::RibDataset>( |
| 120 | [&] (const std::vector<RibEntry>& dataset) { |
| 121 | bool hasRoute = false; |
| 122 | for (const RibEntry& entry : dataset) { |
| 123 | for (const Route& route : entry.getRoutes()) { |
| 124 | if (filter(entry, route)) { |
| 125 | hasRoute = true; |
| 126 | formatRouteText(ctx.out, entry, route, true); |
| 127 | ctx.out << '\n'; |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | if (!hasRoute) { |
| 133 | ctx.exitCode = 6; |
| 134 | ctx.err << "Route not found\n"; |
| 135 | } |
| 136 | }, |
| 137 | ctx.makeDatasetFailureHandler("RIB dataset"), |
| 138 | ctx.makeCommandOptions()); |
| 139 | |
| 140 | ctx.face.processEvents(); |
| 141 | } |
| 142 | |
| 143 | void |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 144 | RibModule::add(ExecuteContext& ctx) |
| 145 | { |
| 146 | auto prefix = ctx.args.get<Name>("prefix"); |
| 147 | const boost::any& nexthop = ctx.args.at("nexthop"); |
Junxiao Shi | 8eda682 | 2017-04-12 02:53:14 +0000 | [diff] [blame] | 148 | auto origin = ctx.args.get<RouteOrigin>("origin", ndn::nfd::ROUTE_ORIGIN_STATIC); |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 149 | auto cost = ctx.args.get<uint64_t>("cost", 0); |
| 150 | bool wantChildInherit = !ctx.args.get<bool>("no-inherit", false); |
| 151 | bool wantCapture = ctx.args.get<bool>("capture", false); |
| 152 | auto expiresMillis = ctx.args.getOptional<uint64_t>("expires"); |
| 153 | |
| 154 | FindFace findFace(ctx); |
| 155 | FindFace::Code res = findFace.execute(nexthop); |
| 156 | |
| 157 | ctx.exitCode = static_cast<int>(res); |
| 158 | switch (res) { |
| 159 | case FindFace::Code::OK: |
| 160 | break; |
| 161 | case FindFace::Code::ERROR: |
| 162 | case FindFace::Code::CANONIZE_ERROR: |
| 163 | case FindFace::Code::NOT_FOUND: |
| 164 | ctx.err << findFace.getErrorReason() << '\n'; |
| 165 | return; |
| 166 | case FindFace::Code::AMBIGUOUS: |
| 167 | ctx.err << "Multiple faces match specified remote FaceUri. Re-run the command with a FaceId:"; |
| 168 | findFace.printDisambiguation(ctx.err, FindFace::DisambiguationStyle::LOCAL_URI); |
| 169 | ctx.err << '\n'; |
| 170 | return; |
| 171 | default: |
| 172 | BOOST_ASSERT_MSG(false, "unexpected FindFace result"); |
| 173 | return; |
| 174 | } |
| 175 | |
| 176 | ControlParameters registerParams; |
| 177 | registerParams |
| 178 | .setName(prefix) |
| 179 | .setFaceId(findFace.getFaceId()) |
| 180 | .setOrigin(origin) |
| 181 | .setCost(cost) |
Ashlesh Gawande | f7bf409 | 2017-03-04 03:06:26 +0000 | [diff] [blame] | 182 | .setFlags((wantChildInherit ? ndn::nfd::ROUTE_FLAG_CHILD_INHERIT : ndn::nfd::ROUTE_FLAGS_NONE) | |
| 183 | (wantCapture ? ndn::nfd::ROUTE_FLAG_CAPTURE : ndn::nfd::ROUTE_FLAGS_NONE)); |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 184 | if (expiresMillis) { |
| 185 | registerParams.setExpirationPeriod(time::milliseconds(*expiresMillis)); |
| 186 | } |
| 187 | |
| 188 | ctx.controller.start<ndn::nfd::RibRegisterCommand>( |
| 189 | registerParams, |
| 190 | [&] (const ControlParameters& resp) { |
| 191 | ctx.out << "route-add-accepted "; |
| 192 | text::ItemAttributes ia; |
| 193 | ctx.out << ia("prefix") << resp.getName() |
| 194 | << ia("nexthop") << resp.getFaceId() |
Davide Pesavento | 22db539 | 2017-04-14 00:56:43 -0400 | [diff] [blame] | 195 | << ia("origin") << resp.getOrigin() |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 196 | << ia("cost") << resp.getCost() |
| 197 | << ia("flags") << static_cast<ndn::nfd::RouteFlags>(resp.getFlags()); |
| 198 | if (resp.hasExpirationPeriod()) { |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 199 | ctx.out << ia("expires") << text::formatDuration<time::milliseconds>(resp.getExpirationPeriod()) << "\n"; |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 200 | } |
| 201 | else { |
| 202 | ctx.out<< ia("expires") << "never\n"; |
| 203 | } |
| 204 | }, |
| 205 | ctx.makeCommandFailureHandler("adding route"), |
| 206 | ctx.makeCommandOptions()); |
| 207 | |
| 208 | ctx.face.processEvents(); |
| 209 | } |
| 210 | |
| 211 | void |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 212 | RibModule::remove(ExecuteContext& ctx) |
| 213 | { |
| 214 | auto prefix = ctx.args.get<Name>("prefix"); |
| 215 | const boost::any& nexthop = ctx.args.at("nexthop"); |
Junxiao Shi | 8eda682 | 2017-04-12 02:53:14 +0000 | [diff] [blame] | 216 | auto origin = ctx.args.get<RouteOrigin>("origin", ndn::nfd::ROUTE_ORIGIN_STATIC); |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 217 | |
| 218 | FindFace findFace(ctx); |
| 219 | FindFace::Code res = findFace.execute(nexthop, true); |
| 220 | |
| 221 | ctx.exitCode = static_cast<int>(res); |
| 222 | switch (res) { |
| 223 | case FindFace::Code::OK: |
| 224 | break; |
| 225 | case FindFace::Code::ERROR: |
| 226 | case FindFace::Code::CANONIZE_ERROR: |
| 227 | case FindFace::Code::NOT_FOUND: |
| 228 | ctx.err << findFace.getErrorReason() << '\n'; |
| 229 | return; |
| 230 | default: |
| 231 | BOOST_ASSERT_MSG(false, "unexpected FindFace result"); |
| 232 | return; |
| 233 | } |
| 234 | |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 235 | for (uint64_t faceId : findFace.getFaceIds()) { |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 236 | ControlParameters unregisterParams; |
| 237 | unregisterParams |
| 238 | .setName(prefix) |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 239 | .setFaceId(faceId) |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 240 | .setOrigin(origin); |
| 241 | |
| 242 | ctx.controller.start<ndn::nfd::RibUnregisterCommand>( |
| 243 | unregisterParams, |
| 244 | [&] (const ControlParameters& resp) { |
| 245 | ctx.out << "route-removed "; |
| 246 | text::ItemAttributes ia; |
| 247 | ctx.out << ia("prefix") << resp.getName() |
| 248 | << ia("nexthop") << resp.getFaceId() |
Davide Pesavento | 22db539 | 2017-04-14 00:56:43 -0400 | [diff] [blame] | 249 | << ia("origin") << resp.getOrigin() |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 250 | << '\n'; |
| 251 | }, |
| 252 | ctx.makeCommandFailureHandler("removing route"), |
| 253 | ctx.makeCommandOptions()); |
| 254 | } |
| 255 | |
| 256 | ctx.face.processEvents(); |
| 257 | } |
| 258 | |
| 259 | void |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 260 | RibModule::fetchStatus(Controller& controller, |
| 261 | const function<void()>& onSuccess, |
Junxiao Shi | 29b4128 | 2016-08-22 03:47:02 +0000 | [diff] [blame] | 262 | const Controller::DatasetFailCallback& onFailure, |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 263 | const CommandOptions& options) |
| 264 | { |
| 265 | controller.fetch<ndn::nfd::RibDataset>( |
| 266 | [this, onSuccess] (const std::vector<RibEntry>& result) { |
| 267 | m_status = result; |
| 268 | onSuccess(); |
| 269 | }, |
| 270 | onFailure, options); |
| 271 | } |
| 272 | |
| 273 | void |
| 274 | RibModule::formatStatusXml(std::ostream& os) const |
| 275 | { |
| 276 | os << "<rib>"; |
| 277 | for (const RibEntry& item : m_status) { |
| 278 | this->formatItemXml(os, item); |
| 279 | } |
| 280 | os << "</rib>"; |
| 281 | } |
| 282 | |
| 283 | void |
| 284 | RibModule::formatItemXml(std::ostream& os, const RibEntry& item) const |
| 285 | { |
| 286 | os << "<ribEntry>"; |
| 287 | |
| 288 | os << "<prefix>" << xml::Text{item.getName().toUri()} << "</prefix>"; |
| 289 | |
| 290 | os << "<routes>"; |
| 291 | for (const Route& route : item.getRoutes()) { |
| 292 | os << "<route>" |
| 293 | << "<faceId>" << route.getFaceId() << "</faceId>" |
Davide Pesavento | 22db539 | 2017-04-14 00:56:43 -0400 | [diff] [blame] | 294 | << "<origin>" << route.getOrigin() << "</origin>" |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 295 | << "<cost>" << route.getCost() << "</cost>"; |
| 296 | if (route.getFlags() == ndn::nfd::ROUTE_FLAGS_NONE) { |
| 297 | os << "<flags/>"; |
| 298 | } |
| 299 | else { |
| 300 | os << "<flags>"; |
| 301 | if (route.isChildInherit()) { |
| 302 | os << "<childInherit/>"; |
| 303 | } |
| 304 | if (route.isRibCapture()) { |
| 305 | os << "<ribCapture/>"; |
| 306 | } |
| 307 | os << "</flags>"; |
| 308 | } |
Davide Pesavento | 26cbdbd | 2017-02-19 21:37:43 -0500 | [diff] [blame] | 309 | if (route.hasExpirationPeriod()) { |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 310 | os << "<expirationPeriod>" |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 311 | << xml::formatDuration(time::duration_cast<time::seconds>(route.getExpirationPeriod())) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 312 | << "</expirationPeriod>"; |
| 313 | } |
| 314 | os << "</route>"; |
| 315 | } |
| 316 | os << "</routes>"; |
| 317 | |
| 318 | os << "</ribEntry>"; |
| 319 | } |
| 320 | |
| 321 | void |
| 322 | RibModule::formatStatusText(std::ostream& os) const |
| 323 | { |
| 324 | os << "RIB:\n"; |
| 325 | for (const RibEntry& item : m_status) { |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 326 | os << " "; |
| 327 | formatEntryText(os, item); |
| 328 | os << '\n'; |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 329 | } |
| 330 | } |
| 331 | |
| 332 | void |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 333 | RibModule::formatEntryText(std::ostream& os, const RibEntry& entry) |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 334 | { |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 335 | os << entry.getName() << " routes={"; |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 336 | |
| 337 | text::Separator sep(", "); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 338 | for (const Route& route : entry.getRoutes()) { |
| 339 | os << sep; |
| 340 | formatRouteText(os, entry, route, false); |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 341 | } |
| 342 | |
| 343 | os << "}"; |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 344 | } |
| 345 | |
| 346 | void |
| 347 | RibModule::formatRouteText(std::ostream& os, const RibEntry& entry, const Route& route, |
| 348 | bool includePrefix) |
| 349 | { |
| 350 | text::ItemAttributes ia; |
| 351 | |
| 352 | if (includePrefix) { |
| 353 | os << ia("prefix") << entry.getName(); |
| 354 | } |
| 355 | os << ia("nexthop") << route.getFaceId(); |
Davide Pesavento | 22db539 | 2017-04-14 00:56:43 -0400 | [diff] [blame] | 356 | os << ia("origin") << route.getOrigin(); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 357 | os << ia("cost") << route.getCost(); |
| 358 | os << ia("flags") << static_cast<ndn::nfd::RouteFlags>(route.getFlags()); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 359 | if (route.hasExpirationPeriod()) { |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 360 | os << ia("expires") << text::formatDuration<time::seconds>(route.getExpirationPeriod()); |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 361 | } |
| 362 | else { |
| 363 | os << ia("expires") << "never"; |
| 364 | } |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 365 | } |
| 366 | |
Junxiao Shi | 331ade7 | 2016-08-19 14:07:19 +0000 | [diff] [blame] | 367 | } // namespace nfdc |
Junxiao Shi | 38f4ce9 | 2016-08-04 10:01:52 +0000 | [diff] [blame] | 368 | } // namespace tools |
| 369 | } // namespace nfd |