A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce the amount of implicit include directories
[simgrid.git]
/
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
3520683
..
49d05ce
100644
(file)
--- a/
teshsuite/simdag/platforms/is_router_test.c
+++ b/
teshsuite/simdag/platforms/is_router_test.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2008
, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2008
-2015
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-6,33
+6,42
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
-#include "surf/surf_private.h"
+#include "src/surf/surf_private.h"
-extern routing_
global_t global_routing
;
+extern routing_
platf_t routing_platf
;
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
- /*
initialisation of SD
*/
+ /*
SD initialization
*/
int size;
int size;
- xbt_dict_t eltms = xbt_dict_new();
+ xbt_lib_cursor_t cursor = NULL;
+ char *key, *data;
+
+#ifdef _XBT_WIN32
+ setbuf(stderr, NULL);
+ setbuf(stdout, NULL);
+#endif
+
SD_init(&argc, argv);
SD_init(&argc, argv);
- xbt_dict_cursor_t cursor=NULL;
- char *key,*data;
/* creation of the environment */
SD_create_environment(argv[1]);
/* 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);
+ 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) {
- printf(" - Seen: \"%s\" is type : %d\n",key,(int) global_routing->get_network_element_type(key));
+ xbt_lib_foreach(host_lib, cursor, key, data) {
+ printf(" - Seen: \"%s\" is type : %d\n", 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;
}
SD_exit();
return 0;
}