1 /* Copyright (c) 2008, 2009, 2010. 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 "simdag/simdag.h"
10 #include "surf/surf_private.h"
12 extern routing_platf_t routing_platf;
14 int main(int argc, char **argv)
16 /* initialisation of SD */
19 xbt_lib_cursor_t cursor = NULL;
22 /* creation of the environment */
23 SD_create_environment(argv[1]);
25 size = xbt_lib_length(host_lib) + xbt_lib_length(as_router_lib);
27 printf("Workstation number: %d, link number: %d, elmts number: %d\n",
28 SD_workstation_get_number(), SD_link_get_number(), size);
30 xbt_lib_foreach(host_lib, cursor, key, data) {
31 printf(" - Seen: \"%s\" is type : %d\n", key,
32 (int) routing_get_network_element_type(key));
35 xbt_lib_foreach(as_router_lib, cursor, key, data) {
36 printf(" - Seen: \"%s\" is type : %d\n", key,
37 (int) routing_get_network_element_type(key));