-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
s4u::Engine::on_platform_created_cb([]() {
/* Create the ns3 topology based on routing strategy */
+ ns3::GlobalRouteManager::DeleteGlobalRoutes(); // just in case this callback is called twice
ns3::GlobalRouteManager::BuildGlobalRoutingDatabase();
ns3::GlobalRouteManager::InitializeRoutes();
});
s4u::NetZone::on_seal_cb(&zoneCreation_cb);
}
+NetworkNS3Model::~NetworkNS3Model()
+{
+ ns3::Simulator::Destroy();
+}
+
StandardLinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
{
xbt_assert(bandwidths.size() == 1, "ns-3 links must use only 1 bandwidth.");