static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoint* src,
simgrid::kernel::routing::NetPoint* dst, simgrid::kernel::routing::NetPoint* gw_src,
simgrid::kernel::routing::NetPoint* gw_dst,
- std::vector<simgrid::surf::LinkImpl*>* link_list)
+ std::vector<simgrid::surf::LinkImpl*>& link_list)
{
- if (link_list->size() == 1) {
- simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list->at(0));
+ if (link_list.size() == 1) {
+ simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list[0]);
XBT_DEBUG("Route from '%s' to '%s' with link '%s' %s", src->getCname(), dst->getCname(), link->getCname(),
(symmetrical ? "(symmetrical)" : "(not symmetrical)"));
"of length 1.\n"
"WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently "
"ignored.",
- src->getCname(), dst->getCname(), link_list->size());
+ src->getCname(), dst->getCname(), link_list.size());
warned_about_long_routes = true;
}
}
all_existing_models->push_back(surf_network_model);
}
-static simgrid::config::Flag<std::string> ns3_tcp_model("ns3/TcpModel",
- "The ns3 tcp model can be : NewReno or Reno or Tahoe", "NewReno");
+static simgrid::config::Flag<std::string>
+ ns3_tcp_model("ns3/TcpModel", "The ns3 tcp model can be : NewReno or Reno or Tahoe", "default");
namespace simgrid {
namespace surf {
simgrid::surf::on_cluster.connect(&clusterCreation_cb);
simgrid::s4u::onPlatformCreated.connect(&postparse_cb);
simgrid::s4u::NetZone::onRouteCreation.connect(&routeCreation_cb);
-
- LogComponentEnable("PacketSink", ns3::LOG_LEVEL_INFO);
- LogComponentEnable("UdpEchoClientApplication", ns3::LOG_LEVEL_INFO);
- LogComponentEnable("UdpEchoServerApplication", ns3::LOG_LEVEL_INFO);
}
NetworkNS3Model::~NetworkNS3Model() {
std::vector<LinkImpl*> route = std::vector<LinkImpl*>();
- action->src_->routeTo(action->dst_, &route, nullptr);
+ action->src_->routeTo(action->dst_, route, nullptr);
for (auto const& link : route)
TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(), (data_delta_sent) / delta, now - delta,
delta);