From: schnorr Date: Mon, 13 Dec 2010 16:44:55 +0000 (+0000) Subject: [trace] extracting routes among ASes X-Git-Tag: v3.6_beta2~736 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9bfa34d4a0fcbd5becf5659871f022cfef1a499f [trace] extracting routes among ASes git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9187 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/instr/instr_routing.c b/src/instr/instr_routing.c index f220220e9d..8678d4399c 100644 --- a/src/instr/instr_routing.c +++ b/src/instr/instr_routing.c @@ -217,6 +217,29 @@ static void recursiveGraphExtraction (container_t container) previous_entity_name = link_name; } linkContainers (container, previous_entity_name, child_name2); + }else if (child1->kind == INSTR_AS && + child2->kind == INSTR_AS && + strcmp(child_name1, child_name2) != 0){ + + //getting route + routing_component_t root = global_routing->root; + route_extended_t route; + xbt_ex_t exception; + TRY { + route = root->get_route (root, child_name1, child_name2); + }CATCH(exception) { + //no route between them, that's possible + continue; + } + unsigned int cpt; + void *link; + char *previous_entity_name = route->src_gateway; + xbt_dynar_foreach (route->generic_route.link_list, cpt, link) { + char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name; + linkContainers (container, previous_entity_name, link_name); + previous_entity_name = link_name; + } + linkContainers (container, previous_entity_name, route->dst_gateway); } } }