- if(dst->rc_type != SURF_NETWORK_ELEMENT_ROUTER){ // No specific link for router
- info = xbt_dynar_get_as(as->link_up_down_list,dst->id,s_surf_parsing_link_up_down_t);
- if(info.link_down) { // link down
- xbt_dynar_push_as(route->link_list,void*,info.link_down);
- if (lat)
- *lat += surf_network_model->extension.network.get_link_latency(info.link_down);
+ new_xbt_graph_edge(graph, routerNode, backboneNode, edges);
+ }
+
+ for (isrc = 0; isrc < table_size; isrc++) {
+ src = xbt_dynar_get_as(rc->index_network_elm, isrc, sg_routing_edge_t);
+
+ if (src->rc_type != SURF_NETWORK_ELEMENT_ROUTER) {
+ previous = new_xbt_graph_node(graph, src->name, nodes);
+
+ info = xbt_dynar_get_as(rc->link_up_down_list, src->id,
+ s_surf_parsing_link_up_down_t);
+
+ if (info.link_up) { // link up
+
+ char *link_name = ((surf_resource_t) info.link_up)->name;
+ current = new_xbt_graph_node(graph, link_name, nodes);
+ new_xbt_graph_edge(graph, previous, current, edges);
+
+ if (((as_cluster_t) rc)->backbone) {
+ new_xbt_graph_edge(graph, current, backboneNode, edges);
+ } else {
+ new_xbt_graph_edge(graph, current, routerNode, edges);
+ }
+
+ }
+
+ if (info.link_down) { // link down
+ char *link_name = ((surf_resource_t) info.link_down)->name;
+ current = new_xbt_graph_node(graph, link_name, nodes);
+ new_xbt_graph_edge(graph, previous, current, edges);
+
+ if (((as_cluster_t) rc)->backbone) {
+ new_xbt_graph_edge(graph, current, backboneNode, edges);
+ } else {
+ new_xbt_graph_edge(graph, current, routerNode, edges);