X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4a6b0a991a67e6f2f67c03fed43529e078da7115..e488b6ea7ff323238c3211c1f17f610196806cc9:/teshsuite/simdag/platforms/is_router_test.cpp diff --git a/teshsuite/simdag/platforms/is_router_test.cpp b/teshsuite/simdag/platforms/is_router_test.cpp index fbe96d08ae..41e4be8024 100644 --- a/teshsuite/simdag/platforms/is_router_test.cpp +++ b/teshsuite/simdag/platforms/is_router_test.cpp @@ -5,9 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include #include "simgrid/simdag.h" -#include "surf/surf.h" #include "src/surf/surf_routing.hpp" int main(int argc, char **argv) @@ -24,13 +22,17 @@ int main(int argc, char **argv) size = xbt_dict_length(host_list) + xbt_lib_length(as_router_lib); - printf("Workstation number: %zu, link number: %d, elmts number: %d\n", sg_host_count(), sg_link_count(), size); + printf("Host number: %zu, link number: %d, elmts number: %d\n", sg_host_count(), sg_link_count(), size); - xbt_dict_foreach(host_list, cursor, key, data) - printf(" - Seen: \"%s\" is type : %d\n", key, (int) sg_netcard_by_name_or_null(key)->getRcType()); + xbt_dict_foreach(host_list, cursor, key, data) { + simgrid::surf::NetCard * nc = sg_netcard_by_name_or_null(key); + printf(" - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host")); + } - xbt_lib_foreach(as_router_lib, cursor, key, data) - printf(" - Seen: \"%s\" is type : %d\n", key, (int) sg_netcard_by_name_or_null(key)->getRcType()); + xbt_lib_foreach(as_router_lib, cursor, key, data) { + simgrid::surf::NetCard * nc = sg_netcard_by_name_or_null(key); + printf(" - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host")); + } SD_exit(); return 0;