- route->gw_src = s4u::Engine::get_instance()->netpoint_by_name_or_null(srcName);
- route->gw_dst = s4u::Engine::get_instance()->netpoint_by_name_or_null(dstName);
- }
-
- /* Retrieve the private links */
- auto src_link = private_links_.find(src->id());
- if (src_link != private_links_.end()) {
- std::pair<resource::LinkImpl*, resource::LinkImpl*> info = src_link->second;
- if (info.first) {
- route->link_list.push_back(info.first);
- if (lat)
- *lat += info.first->get_latency();
- }
- } else {
- XBT_DEBUG("Source of private link (%u) doesn't exist", src->id());
- }
-
- auto dst_link = private_links_.find(dst->id());
- if (dst_link != private_links_.end()) {
- std::pair<resource::LinkImpl*, resource::LinkImpl*> info = dst_link->second;
- if (info.second) {
- route->link_list.push_back(info.second);
- if (lat)
- *lat += info.second->get_latency();
- }
- } else {
- XBT_DEBUG("Destination of private link (%u) doesn't exist", dst->id());
+ route->gw_src_ = engine->netpoint_by_name_or_null(srcName);
+ route->gw_dst_ = engine->netpoint_by_name_or_null(dstName);