+ std::free(links);
+}
+
+static void dump_routers()
+{
+ std::vector<simgrid::kernel::routing::NetPoint*> netpoints =
+ simgrid::s4u::Engine::get_instance()->get_all_netpoints();
+ std::sort(netpoints.begin(), netpoints.end(),
+ [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
+ return a->get_name() < b->get_name();
+ });
+
+ for (auto const& src : netpoints)
+ if (src->is_router())
+ std::printf(" <router id=\"%s\"/>\n", src->get_cname());
+}
+
+static void dump_routes()
+{
+ unsigned int totalHosts = sg_host_count();
+ sg_host_t* hosts = sg_host_list();
+ std::sort(hosts, hosts + totalHosts,
+ [](sg_host_t a, sg_host_t b) { return strcmp(sg_host_get_name(a), sg_host_get_name(b)) < 0; });
+ std::vector<simgrid::kernel::routing::NetPoint*> netpoints =
+ simgrid::s4u::Engine::get_instance()->get_all_netpoints();
+ std::sort(netpoints.begin(), netpoints.end(),
+ [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
+ return a->get_name() < b->get_name();
+ });
+