X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc01c6a871dbbfd0cc84e26eb9f94aeb539e613e..221538a27f21e52c182ae7fcc08c78c1175395b9:/teshsuite/simdag/platforms/is_router_test.c diff --git a/teshsuite/simdag/platforms/is_router_test.c b/teshsuite/simdag/platforms/is_router_test.c index 60f3b5bdb0..d6bf9b1056 100644 --- a/teshsuite/simdag/platforms/is_router_test.c +++ b/teshsuite/simdag/platforms/is_router_test.c @@ -9,32 +9,34 @@ #include "simdag/simdag.h" #include "surf/surf_private.h" -extern routing_global_t global_routing; +extern routing_platf_t routing_platf; int main(int argc, char **argv) { /* initialisation of SD */ int size; - xbt_dict_t eltms = xbt_dict_new(); SD_init(&argc, argv); - xbt_dict_cursor_t cursor = NULL; + xbt_lib_cursor_t cursor = NULL; char *key, *data; /* creation of the environment */ SD_create_environment(argv[1]); - eltms = global_routing->where_network_elements; - size = xbt_dict_size(eltms); + size = xbt_lib_length(host_lib) + xbt_lib_length(as_router_lib); printf("Workstation number: %d, link number: %d, elmts number: %d\n", SD_workstation_get_number(), SD_link_get_number(), size); - xbt_dict_foreach(eltms, cursor, key, data) { + xbt_lib_foreach(host_lib, cursor, key, data) { printf(" - Seen: \"%s\" is type : %d\n", key, - (int) global_routing->get_network_element_type(key)); + (int) routing_get_network_element_type(key)); } - //printf("%s is router : %d\n",name1,global_routing->is_router(name1)); - xbt_dict_free(&eltms); + + xbt_lib_foreach(as_router_lib, cursor, key, data) { + printf(" - Seen: \"%s\" is type : %d\n", key, + (int) routing_get_network_element_type(key)); + } + SD_exit(); return 0; }