在NS-3中实现支持OpenFlow的Wifi网络

时间:2016-02-09 18:19:29

标签: c++ wifi ns-3 openflow

我目前正在使用NS-3网络模拟器来实现使用OpenFlow的Wifi网络802.11b。 我试图链接我的节点和我的交换机设备。如openflow-switch.cc文件所示,使用csma:

进行如下操作
 // Create the csma links, from each terminal to the switch

NetDeviceContainer terminalDevices;
NetDeviceContainer switchDevices;
for (int i = 0; i < 4; i++)
{
  NetDeviceContainer link = csma.Install (NodeContainer (terminals.Get(i), csmaSwitch));
  terminalDevices.Add (link.Get (0));
  switchDevices.Add (link.Get (1));
}

我使用WifiHelper wifi作为我的脚本,但不能简单地使用:

 NetDeviceContainer link = wifi.Install(NodeContainer (staDevices.Get (i), Switch));

因为wifi.Install方法需要参数:

wifi.Install (phy, mac, wifiStaNodes);

我试图像这样传递节点:

NetDeviceContainer link = wifi.Install(phy, mac, (NodeContainer (wifiStaNodes.Get (i), Switch)));

terminals.Add (link.Get(2));
switchDevices.Add (link.Get(3));

但是在运行脚本时,我收到的信号是SIGSEGV&#39;错误和调试没有提供有关错误返回原因的进一步信息。

有没有关于如何克服这个问题的建议,因为我尝试了各种方法来创建链接,但没有一个有效。 感谢任何建议, 肖恩

0 个答案:

没有答案
相关问题