#include "simgrid/kernel/routing/NetPoint.hpp"
#include "simgrid/kernel/routing/RoutedZone.hpp"
#include "src/surf/network_interface.hpp"
-#if SIMGRID_HAVE_NS3
-#include "src/surf/network_ns3.hpp"
-#endif
#include "xbt/string.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_star, surf, "Routing part of surf");
void StarZone::do_seal()
{
-#if SIMGRID_HAVE_NS3
- xbt_assert(not dynamic_cast<resource::NetworkNS3Model*>(get_network_model().get()),
- "StarZone are not supported by NS-3 right now");
-#endif
/* add default empty links if nothing was configured by user */
for (auto const& node : get_vertices()) {
auto route = routes_.emplace(node->id(), StarRoute());
simgrid::kernel::routing::NetPoint* /*gw_dst*/,
std::vector<simgrid::kernel::resource::LinkImpl*> const& link_list)
{
- xbt_assert(src && dst, "NS-3: add_route, invalid src or destination");
+ /* ignoring routes from StarZone, not supported */
+ if (not src || not dst)
+ return;
+
if (link_list.size() == 1) {
auto const* link = static_cast<simgrid::kernel::resource::LinkNS3*>(link_list[0]);
auto* router = zone->create_router(cluster->router_id);
zone->add_route(router, nullptr, nullptr, nullptr, {});
+ zone->seal();
simgrid::kernel::routing::on_cluster_creation(*cluster);
}