Skip to content

Commit

Permalink
Update to ns-3.32 API
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhenderson authored and teto committed Nov 22, 2020
1 parent 1d88fea commit 94de508
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions example/ccnx/dce-wifi-ccnx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ ManetCcnx::ConfigureTopology ()
wifi.EnableLogComponents ();
}

YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
YansWifiPhyHelper wifiPhy;
// set it to zero; otherwise, gain will be added
wifiPhy.Set ("RxGain", DoubleValue (-10));
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
Expand All @@ -373,7 +373,7 @@ ManetCcnx::ConfigureTopology ()

// Add a non-QoS upper mac, and disable rate control
WifiMacHelper wifiMac;
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
wifi.SetStandard (WIFI_STANDARD_80211b);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode", StringValue (phyMode),
"ControlMode", StringValue (phyMode));
Expand Down
4 changes: 2 additions & 2 deletions example/dce-freebsd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ int main (int argc, char *argv[])
mobility.Install (nodes);

WifiHelper wifi;
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
YansWifiPhyHelper phy;
YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
WifiMacHelper mac;
phy.SetChannel (phyChannel.Create ());
mac.SetType ("ns3::AdhocWifiMac");
wifi.SetStandard (WIFI_PHY_STANDARD_80211a);
wifi.SetStandard (WIFI_STANDARD_80211a);
devices = wifi.Install (phy, mac, nodes);
phy.EnablePcapAll ("process-freebsd");
}
Expand Down
4 changes: 2 additions & 2 deletions example/dce-linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ int main (int argc, char *argv[])
mobility.Install (nodes);

WifiHelper wifi;
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
YansWifiPhyHelper phy;
YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
WifiMacHelper mac;
phy.SetChannel (phyChannel.Create ());
mac.SetType ("ns3::AdhocWifiMac");
wifi.SetStandard (WIFI_PHY_STANDARD_80211a);
wifi.SetStandard (WIFI_STANDARD_80211a);
devices = wifi.Install (phy, mac, nodes);
phy.EnablePcapAll ("process-linux");
}
Expand Down
2 changes: 1 addition & 1 deletion example/dce-mptcp-handoff-v4v6.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int main (int argc, char *argv[])

WifiHelper wifi;
WifiMacHelper mac;
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
YansWifiPhyHelper phy;
YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ArfWifiManager");

Expand Down
2 changes: 1 addition & 1 deletion example/dce-mptcp-handoff-v6.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int main (int argc, char *argv[])

WifiHelper wifi;
WifiMacHelper mac;
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
YansWifiPhyHelper phy;
YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ArfWifiManager");

Expand Down
2 changes: 1 addition & 1 deletion example/dce-mptcp-lte-wifi-v6.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main (int argc, char *argv[])
// Wi-Fi
WifiHelper wifi;
WifiMacHelper mac;
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
YansWifiPhyHelper phy;
YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ArfWifiManager");
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
Expand Down
3 changes: 1 addition & 2 deletions example/dce-mptcp-lte-wifi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,11 @@ int main (int argc, char *argv[])
{
// Left link: H1 <-> WiFi-R
WifiHelper wifi;
phy = YansWifiPhyHelper::Default ();
YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
WifiMacHelper mac;
phy.SetChannel (phyChannel.Create ());
mac.SetType ("ns3::AdhocWifiMac");
wifi.SetStandard (WIFI_PHY_STANDARD_80211a);
wifi.SetStandard (WIFI_STANDARD_80211a);
devices1 = wifi.Install (phy, mac, NodeContainer (nodes.Get (0), routers.Get (0)));
// Assign ip addresses
if1 = address1.Assign (devices1);
Expand Down
2 changes: 1 addition & 1 deletion myscripts/dce-mpi-udp/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ns3waf

def configure(conf):
ns3waf.check_modules(conf, ['core', 'internet', 'point-to-point', 'mpi'], mandatory = True)
pass

def build(bld):
if bld.env['MPI']:
Expand Down
2 changes: 1 addition & 1 deletion myscripts/mt3/dce-mt3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ main (int argc, char *argv[])
WifiMacHelper mac;
phy.SetChannel (phyChannel.Create ());
mac.SetType ("ns3::AdhocWifiMac");
wifi.SetStandard (WIFI_PHY_STANDARD_80211a);
wifi.SetStandard (WIFI_STANDARD_80211a);
devices = wifi.Install (phy, mac, dt);
address.SetBase ("10.1.3.0", "255.255.255.0");
interfaces = address.Assign (devices);
Expand Down
6 changes: 3 additions & 3 deletions netlink/netlink-socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ NetlinkSocket::BuildInterfaceAddressDumpMessages (uint32_t received_seq)
uint8_t mask_len = prefix.GetPrefixLength ();

//loopback address's prefix is wrong... FIXME
if (addri.IsEqual (Ipv6Address::GetLoopback ()))
if (addri == Ipv6Address::GetLoopback ())
{
mask_len = 128;
}
Expand Down Expand Up @@ -1521,7 +1521,7 @@ NetlinkSocket::DoRouteMessage (const NetlinkMessage &nlmsg, uint16_t type, uint8
{
Ipv4RoutingTableEntry route = m_ipv4Routing->GetRoute (i);
//find the route entry with same dest address and send unicast to user space
if (dest.IsEqual (route.GetDest ()))
if (dest == route.GetDest ())
{
// Ptr<Ipv4>ipv4 = m_node->GetObject<Ipv4> ();
NetlinkMessage nlmsg_route;
Expand Down Expand Up @@ -1562,7 +1562,7 @@ NetlinkSocket::DoRouteMessage (const NetlinkMessage &nlmsg, uint16_t type, uint8
{
Ipv6RoutingTableEntry route = ipv6Static->GetRoute (i);
//find the route entry with same dest address and send unicast to user space
if (dest6.IsEqual (route.GetDest ()))
if (dest6 == route.GetDest ())
{
NetlinkMessage nlmsg_route;
NetlinkMessageHeader nhr = NetlinkMessageHeader (NETLINK_RTM_NEWROUTE, 0,
Expand Down

0 comments on commit 94de508

Please sign in to comment.