X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2b69a7b8aa79eb5297cc52fd2c364ee05de95f61..aa4c8eeb3051e5adfef317cda2ae590ca13e6f3e:/src/surf/network_ns3.cpp diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 9c1e8a0f5b..824a3bf606 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -111,7 +111,7 @@ static void initialize_ns3_wifi() { if (wifi_link) new WifiZone(wifi_link, host, host->get_netpoint()->extension()->ns3_node_, - wifiChannel.Create (), wifi_mcs ? atoi(wifi_mcs) : 3, wifi_nss ? atoi(wifi_nss) : 1, 0, 0); + wifiChannel.Create(), wifi_mcs ? atoi(wifi_mcs) : 3, wifi_nss ? atoi(wifi_nss) : 1, 0, 0); } } @@ -353,7 +353,6 @@ LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwid ns3::NetDeviceContainer netA; WifiZone* zone = WifiZone::by_name(name); xbt_assert(zone != 0, "Link name '%s' does not match the 'wifi_link' property of a host.", name.c_str()); - NetPointNs3* netpoint_ns3 = zone->get_host()->get_netpoint()->extension(); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "ControlMode", ns3::StringValue ("HtMcs0"), @@ -363,8 +362,8 @@ LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwid wifiPhy.Set("Antennas", ns3::UintegerValue(zone->get_nss())); wifiPhy.Set("MaxSupportedTxSpatialStreams", ns3::UintegerValue(zone->get_nss())); wifiPhy.Set("MaxSupportedRxSpatialStreams", ns3::UintegerValue(zone->get_nss())); - - wifiMac.SetType("ns3::ApWifiMac"); + wifiMac.SetType("ns3::ApWifiMac", + "Ssid", ns3::SsidValue(name)); netA.Add(wifi.Install (wifiPhy, wifiMac, zone->get_ap_node())); @@ -382,6 +381,7 @@ LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwid zone->set_network(number_of_networks); zone->set_link(number_of_links); + NetPointNs3* netpoint_ns3 = zone->get_host()->get_netpoint()->extension(); int nodeNum = netpoint_ns3->node_num; if (IPV4addr.size() <= (unsigned)nodeNum) IPV4addr.resize(nodeNum + 1); @@ -606,7 +606,9 @@ void ns3_add_direct_route(NetPointNs3* src, NetPointNs3* dst, double bw, double wifiPhy.Set("MaxSupportedTxSpatialStreams", ns3::UintegerValue(zone->get_nss())); wifiPhy.Set("MaxSupportedRxSpatialStreams", ns3::UintegerValue(zone->get_nss())); - wifiMac.SetType ("ns3::StaWifiMac"); + wifiMac.SetType ("ns3::StaWifiMac", + "Ssid", ns3::SsidValue(link_name), + "ActiveProbing", ns3::BooleanValue(false)); netA.Add(wifi.Install (wifiPhy, wifiMac, staNode));