X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3b3874b095c1a645006649b8a7445f81d816f01d..0d7b205e2b6bcee058760225d0bebc0da0ecaefb:/src/surf/network_ns3.cpp?ds=inline diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 2982843b05..4494cd21e1 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -58,11 +58,6 @@ static int number_of_links = 1; static int number_of_networks = 1; /* wifi globals */ - -/* This vector store the tuple for the different wifi zones: - * zone name, ptr to AP node, channel, network, link, nb station nodes -*/ -static std::vector , ns3::Ptr , int, int, int> > wifi_zones; static ns3::WifiHelper wifi; static ns3::YansWifiPhyHelper wifiPhy = ns3::YansWifiPhyHelper::Default (); static ns3::YansWifiChannelHelper wifiChannel = ns3::YansWifiChannelHelper::Default (); @@ -116,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); } } @@ -368,8 +363,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())); @@ -611,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));