X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/52866f1c7d5c27d9cf2b8484058e4b60e027d5cb..39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f:/src/surf/network_ns3.cpp diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 999e63e3e3..1e512f3c62 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2021. 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. */ @@ -43,8 +43,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ns3, surf, "Logging specific to the SURF network * Crude globals * *****************/ -extern std::map flow_from_sock; -extern std::map sink_from_sock; +extern std::map> flow_from_sock; +extern std::map> sink_from_sock; static ns3::InternetStackHelper stack; @@ -91,6 +91,10 @@ static void zoneCreation_cb(simgrid::s4u::NetZone const& zone) { const char* nss = wifizone->get_property("nss"); int mcs_value = mcs ? atoi(mcs) : 3; int nss_value = nss ? atoi(nss) : 1; +#if NS3_MINOR_VERSION < 30 + if(nss_value != 1+(mcs_value/8)) + xbt_die("On NS3 < 3.30, NSS value has to satisfy NSS == 1+(MCS/8) constraint. Bailing out"); +#endif wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "ControlMode", ns3::StringValue("HtMcs0"), "DataMode", ns3::StringValue("HtMcs" + std::to_string(mcs_value)));