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 "src/surf/surf_private.h"
11 extern routing_platf_t routing_platf;
13 int main(int argc, char **argv)
15 /* SD initialization */
17 xbt_lib_cursor_t cursor = NULL;
27 /* creation of the environment */
28 SD_create_environment(argv[1]);
30 size = xbt_lib_length(host_lib) + xbt_lib_length(as_router_lib);
32 printf("Workstation number: %d, link number: %d, elmts number: %d\n",
33 SD_workstation_get_number(), SD_link_get_number(), size);
35 xbt_lib_foreach(host_lib, cursor, key, data) {
36 printf(" - Seen: \"%s\" is type : %d\n", key,
37 (int) routing_get_network_element_type(key));
40 xbt_lib_foreach(as_router_lib, cursor, key, data) {
41 printf(" - Seen: \"%s\" is type : %d\n", key,
42 (int) routing_get_network_element_type(key));