{
route_t route = xbt_new0(s_route_t, 1);
route->link_list = link_list;
- xbt_assert1(generic_processing_units_exist(current_routing,src),"the \"%s\" processing units gateway does not exist",src);
- xbt_assert1(generic_processing_units_exist(current_routing,dst),"the \"%s\" processing units gateway does not exist",dst);
+ //xbt_assert1(generic_processing_units_exist(current_routing,src),"the \"%s\" processing units gateway does not exist",src);
+ //xbt_assert1(generic_processing_units_exist(current_routing,dst),"the \"%s\" processing units gateway does not exist",dst);
xbt_assert1(current_routing->set_route,
"no defined method \"set_route\" in \"%s\"",
current_routing->name);
char *route_name;
int *src_id, *dst_id;
_to_index = current_routing->to_index;
- //TODO
_parse_routes = current_routing->parse_routes;
+
src_id = xbt_dict_get_or_null(_to_index, src);
dst_id = xbt_dict_get_or_null(_to_index, dst);
xbt_dict_set(_parse_routes, route_name, e_route, NULL);
xbt_free(route_name);
+
+ unsigned long nb_links = xbt_dynar_length(e_route->generic_route.link_list);
+ if(A_surfxml_ASroute_symetrical == A_surfxml_ASroute_symetrical_YES)
+ {
+ int i;
+ route_extended_t route_sym = xbt_new0(s_route_extended_t, 1);
+ route_sym->generic_route.link_list = xbt_dynar_new(sizeof(char *),NULL);
+ for(i=nb_links ; i>0 ; i--)
+ {
+ char *link_name = xbt_new0(char,strlen(xbt_dynar_get_as(e_route->generic_route.link_list, i-1, char *)));
+ link_name = bprintf("%s",xbt_dynar_get_as(e_route->generic_route.link_list, i-1, char *));
+ xbt_dynar_push_as(route_sym->generic_route.link_list ,char *, link_name);
+ }
+ route_sym->src_gateway = xbt_new0( char,strlen(e_route->dst_gateway) );
+ route_sym->src_gateway = bprintf("%s",e_route->dst_gateway);
+ route_sym->dst_gateway = xbt_new0( char,strlen(e_route->src_gateway) );
+ route_sym->dst_gateway = bprintf("%s",e_route->src_gateway);
+ DEBUG4("Load ASroute from \"%s(%s)\" to \"%s(%s)\"",dst, route_sym->src_gateway,src,route_sym->dst_gateway);
+ xbt_dict_set(_parse_routes, bprintf("%d#%d", *dst_id, *src_id), route_sym, NULL);
+ }
}
static void generic_set_bypassroute(routing_component_t rc,
SURFXML_START_TAG(router);
SURFXML_END_TAG(router);
- DEBUG3("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id,cluster_bw, cluster_lat);
+ DEBUG3("<link\tid=\"%s\" bw=\"%s\" lat=\"%s\"/>", link_router,cluster_bw, cluster_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
SURFXML_START_TAG(link);
SURFXML_END_TAG(link);
- DEBUG3("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id,cluster_bw, cluster_lat);
+ DEBUG3("<link\tid=\"%s\" bw=\"%s\" lat=\"%s\"/>", link_backbone,cluster_bw, cluster_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
SURFXML_BUFFER_SET(link_id, link_backbone);
#ifdef HAVE_PCRE_LIB
- DEBUG2("<route\tsrc=\"%s\"\tdst=\"%s\">", route_src_dst, route_src_dst);
+ DEBUG2("<route\tsrc=\"%s\"\tdst=\"%s\"", route_src_dst, route_src_dst);
+ DEBUG0("symetrical=\"NO\">");
SURFXML_BUFFER_SET(route_src, route_src_dst);
SURFXML_BUFFER_SET(route_dst, route_src_dst);
+ A_surfxml_route_symetrical = A_surfxml_route_symetrical_NO;
SURFXML_START_TAG(route);
DEBUG1("<link_ctn\tid=\"%s_link_$1src\"/>", cluster_id);
cluster_suffix);
}
- DEBUG2("<route\tsrc=\"%s\"\tdst=\"%s\">", route_src, route_dst);
+ DEBUG2("<route\tsrc=\"%s\"\tdst=\"%s\"", route_src, route_dst);
+ DEBUG0("symetrical=\"NO\">");
SURFXML_BUFFER_SET(route_src, route_src);
SURFXML_BUFFER_SET(route_dst, route_dst);
+ A_surfxml_route_symetrical = A_surfxml_route_symetrical_NO;
SURFXML_START_TAG(route);
if (i == xbt_dynar_length(tab_elements_num)) {
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "simgrid.dtd">
- <platform version="2">
+ <platform version="3">
+ <config id="general">
+ <prop id="test" value="retest"></prop>
+ <prop id="test" value="retest"></prop>
+ <prop id="test" value="retest"></prop>
+ </config>
+
<AS id="AS0" routing="Full">
- <cluster id="bob_cluster" prefix="bob" suffix=".hamburger.edu"
- radical="0-4" power="1000000000" bw="125000000" lat="5E-5"
- bb_bw="2250000000" bb_lat="5E-4"/>
-
- <cluster id="alice_cluster" prefix="alice" suffix=".crepe.fr"
- radical="0-4" power="1000000000" bw="125000000" lat="5E-5"
- bb_bw="2250000000" bb_lat="5E-4"/>
-
-
- <link id="backbone" bandwidth="1250000000" latency="5E-4"/>
-
- <route:multi src="bob_cluster" dst="alice_cluster" symmetric="YES">
- <link_ctn id="backbone"/>
- <link_ctn id="$dst"/>
- </route:multi>
+
+ <cluster id="bob_cluster" prefix="bob" suffix=".hamburger.edu"
+ radical="0-1" power="1000000000" bw="125000000" lat="5E-5"
+ bb_bw="2250000000" bb_lat="5E-4"/>
+
+ <cluster id="alice_cluster" prefix="alice" suffix=".crepe.fr"
+ radical="0-1" power="1000000000" bw="125000000" lat="5E-5"
+ bb_bw="2250000000" bb_lat="5E-4"/>
+
+ <link id="backbone" bandwidth="1250000000" latency="5E-4"/>
+
+ <ASroute src="bob_cluster" dst="alice_cluster"
+ gw_src="bobbob_cluster_router.hamburger.edu"
+ gw_dst="alicealice_cluster_router.crepe.fr"
+ symetrical="YES">
+ <link_ctn id="backbone"/>
+ </ASroute>
</AS>
</platform>
+