xbt_assert(dst_as, "Host %s must be in an AS", dst->name());
/* (2) find the path to the root routing component */
xbt_assert(dst_as, "Host %s must be in an AS", dst->name());
/* (2) find the path to the root routing component */
xbt_assert(index_src < ROUTING_HIERARCHY_MAXDEPTH, "ROUTING_HIERARCHY_MAXDEPTH should be increased for element %s", src->name());
path_src[index_src++] = current;
}
xbt_assert(index_src < ROUTING_HIERARCHY_MAXDEPTH, "ROUTING_HIERARCHY_MAXDEPTH should be increased for element %s", src->name());
path_src[index_src++] = current;
}
xbt_assert(index_dst < ROUTING_HIERARCHY_MAXDEPTH,"ROUTING_HIERARCHY_MAXDEPTH should be increased for path_dst");
path_dst[index_dst++] = current;
}
/* (3) find the common father.
xbt_assert(index_dst < ROUTING_HIERARCHY_MAXDEPTH,"ROUTING_HIERARCHY_MAXDEPTH should be increased for path_dst");
path_dst[index_dst++] = current;
}
/* (3) find the common father.
- * Before that, index_src and index_dst may be different, they both point to NULL in path_src/path_dst
+ * Before that, index_src and index_dst may be different, they both point to nullptr in path_src/path_dst
XBT_DEBUG("generic_get_bypassroute from %s to %s", src->name(), dst->name());
if (bypassRoutes_.empty())
return nullptr;
XBT_DEBUG("generic_get_bypassroute from %s to %s", src->name(), dst->name());
if (bypassRoutes_.empty())
return nullptr;
/* (2) find the path to the root routing component */
std::vector<As*> path_src;
As *current = src->containingAS();
/* (2) find the path to the root routing component */
std::vector<As*> path_src;
As *current = src->containingAS();
path_src.push_back(current);
current = current->father_;
}
std::vector<As*> path_dst;
current = dst->containingAS();
path_src.push_back(current);
current = current->father_;
}
std::vector<As*> path_dst;
current = dst->containingAS();
* \param src the source host
* \param dst the destination host
* \param links Where to store the links and the gw information
* \param src the source host
* \param dst the destination host
* \param links Where to store the links and the gw information
/* OUT */ std::vector<surf::Link*> * links, double *latency)
{
s_sg_platf_route_cbarg_t route;
/* OUT */ std::vector<surf::Link*> * links, double *latency)
{
s_sg_platf_route_cbarg_t route;
route.link_list = new std::vector<surf::Link*>();
common_ancestor->getRouteAndLatency(src_ancestor->netcard_, dst_ancestor->netcard_, &route, latency);
route.link_list = new std::vector<surf::Link*>();
common_ancestor->getRouteAndLatency(src_ancestor->netcard_, dst_ancestor->netcard_, &route, latency);
"bad gateways for route from \"%s\" to \"%s\"", src->name(), dst->name());
/* If source gateway is not our source, we have to recursively find our way up to this point */
"bad gateways for route from \"%s\" to \"%s\"", src->name(), dst->name());
/* If source gateway is not our source, we have to recursively find our way up to this point */
getRouteRecursive(src, route.gw_src, links, latency);
for (auto link: *route.link_list)
links->push_back(link);
getRouteRecursive(src, route.gw_src, links, latency);
for (auto link: *route.link_list)
links->push_back(link);