1 /* Copyright (c) 2008-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "simgrid/simdag.h"
10 #include "surf/surf.h"
12 int main(int argc, char **argv)
14 /* SD initialization */
16 xbt_lib_cursor_t cursor = NULL;
26 /* creation of the environment */
27 SD_create_environment(argv[1]);
29 size = xbt_dict_length(host_list) + xbt_lib_length(as_router_lib);
31 printf("Workstation number: %zu, link number: %d, elmts number: %d\n",
32 sg_host_count(), sg_link_count(), size);
34 xbt_dict_foreach(host_list, cursor, key, data) {
35 printf(" - Seen: \"%s\" is type : %d\n", key,
36 (int) routing_get_network_element_type(key));
39 xbt_lib_foreach(as_router_lib, cursor, key, data) {
40 printf(" - Seen: \"%s\" is type : %d\n", key,
41 (int) routing_get_network_element_type(key));