X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/abc6c695d534ee87fe91c84038ebbf6b9226575d..c93a420f2f61da48ace7828257e97b593ae76251:/src/surf/surf_routing_rulebased.c diff --git a/src/surf/surf_routing_rulebased.c b/src/surf/surf_routing_rulebased.c index 0932e04d40..2b2ab9ae0f 100644 --- a/src/surf/surf_routing_rulebased.c +++ b/src/surf/surf_routing_rulebased.c @@ -348,22 +348,30 @@ static void rulebased_get_route_and_latency(AS_t rc, (rule_route_extended_t) ruleroute; char *gw_src_name = remplace(ruleroute_extended->re_src_gateway, list_src, rc_src, list_dst, rc_dst); - route->src_gateway = (network_element_t)xbt_lib_get_or_null(host_lib, gw_src_name, ROUTING_HOST_LEVEL); - route->src_gateway = (network_element_t)xbt_lib_get_or_null(host_lib, gw_src_name, ROUTING_HOST_LEVEL); - if(!route->src_gateway) - route->src_gateway = (network_element_t)xbt_lib_get_or_null(as_router_lib, gw_src_name, ROUTING_ASR_LEVEL); - if(!route->src_gateway) - route->src_gateway = (network_element_t)xbt_lib_get_or_null(as_router_lib, gw_src_name, ROUTING_ASR_LEVEL); + route->src_gateway = xbt_lib_get_or_null(host_lib, gw_src_name, + ROUTING_HOST_LEVEL); + route->src_gateway = xbt_lib_get_or_null(host_lib, gw_src_name, + ROUTING_HOST_LEVEL); + if (!route->src_gateway) + route->src_gateway = xbt_lib_get_or_null(as_router_lib, gw_src_name, + ROUTING_ASR_LEVEL); + if (!route->src_gateway) + route->src_gateway = xbt_lib_get_or_null(as_router_lib, gw_src_name, + ROUTING_ASR_LEVEL); xbt_free(gw_src_name); char *gw_dst_name = remplace(ruleroute_extended->re_dst_gateway, list_src, rc_src, list_dst, rc_dst); - route->dst_gateway = (network_element_t)xbt_lib_get_or_null(host_lib, gw_dst_name, ROUTING_HOST_LEVEL); - route->dst_gateway = (network_element_t)xbt_lib_get_or_null(host_lib, gw_dst_name, ROUTING_HOST_LEVEL); - if(!route->dst_gateway) - route->dst_gateway = (network_element_t)xbt_lib_get_or_null(as_router_lib, gw_dst_name, ROUTING_ASR_LEVEL); - if(!route->dst_gateway) - route->dst_gateway = (network_element_t)xbt_lib_get_or_null(as_router_lib, gw_dst_name, ROUTING_ASR_LEVEL); + route->dst_gateway = xbt_lib_get_or_null(host_lib, gw_dst_name, + ROUTING_HOST_LEVEL); + route->dst_gateway = xbt_lib_get_or_null(host_lib, gw_dst_name, + ROUTING_HOST_LEVEL); + if (!route->dst_gateway) + route->dst_gateway = xbt_lib_get_or_null(as_router_lib, gw_dst_name, + ROUTING_ASR_LEVEL); + if (!route->dst_gateway) + route->dst_gateway = xbt_lib_get_or_null(as_router_lib, gw_dst_name, + ROUTING_ASR_LEVEL); xbt_free(gw_dst_name); } @@ -373,7 +381,7 @@ static void rulebased_get_route_and_latency(AS_t rc, pcre_free_substring_list(list_dst); } -static route_t rulebased_get_bypass_route(AS_t rc, network_element_t src, network_element_t dst) { +static route_t rulebased_get_bypass_route(AS_t rc, network_element_t src, network_element_t dst, double *lat) { return NULL; }