- if (m_cached && !p_routeCache)
- p_routeCache = xbt_dict_new_homogeneous(&route_cache_elem_free);
-
- /* Add the loopback if needed */
- if (routing_platf->p_loopback && p_hierarchy == SURF_ROUTING_BASE)
- addLoopback();
-
- /* initialize graph indexes in nodes after graph has been built */
- nodes = xbt_graph_get_nodes(p_routeGraph);
-
- xbt_dynar_foreach(nodes, cursor2, node) {
- graph_node_data_t data = (graph_node_data_t) xbt_graph_node_get_data(node);
- data->graph_id = cursor2;
- }
-
-}
-
-void AsDijkstra::parseASroute(sg_platf_route_cbarg_t route)
-{
- parseRoute(route);
-}
-
-void AsDijkstra::parseRoute(sg_platf_route_cbarg_t route)
-{
- char *src = (char*)(route->src);
- char *dst = (char*)(route->dst);
-
- int as_route = 0;
- if(!route->gw_dst && !route->gw_src)
- XBT_DEBUG("Load Route from \"%s\" to \"%s\"", src, dst);
- else{
- XBT_DEBUG("Load ASroute from \"%s(%s)\" to \"%s(%s)\"", src,
- route->gw_src->p_name, dst, route->gw_dst->p_name);
- as_route = 1;
- if(route->gw_dst->p_rcType == SURF_NETWORK_ELEMENT_NULL)
- xbt_die("The gw_dst '%s' does not exist!",route->gw_dst->p_name);
- if(route->gw_src->p_rcType == SURF_NETWORK_ELEMENT_NULL)
- xbt_die("The gw_src '%s' does not exist!",route->gw_src->p_name);
- }
-
- RoutingEdgePtr src_net_elm, dst_net_elm;
-
- src_net_elm = sg_routing_edge_by_name_or_null(src);
- dst_net_elm = sg_routing_edge_by_name_or_null(dst);
-
- xbt_assert(src_net_elm, "Network elements %s not found", src);
- xbt_assert(dst_net_elm, "Network elements %s not found", dst);