Fix clang-tidy readability-static-accessed-through-instance warnings
This commit is contained in:
@@ -186,7 +186,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents();
|
||||
WifiHelper::EnableLogComponents();
|
||||
}
|
||||
wifi.SetStandard(WIFI_STANDARD_80211b);
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents();
|
||||
WifiHelper::EnableLogComponents();
|
||||
}
|
||||
wifi.SetStandard(WIFI_STANDARD_80211b);
|
||||
|
||||
|
||||
@@ -120,9 +120,8 @@ main(int argc, char** argv)
|
||||
i3.SetForwarding(0, true);
|
||||
i3.SetDefaultRouteInAllNodes(0);
|
||||
|
||||
Ipv6StaticRoutingHelper routingHelper;
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(0), r1, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(0), r1, routingStream);
|
||||
|
||||
// Create an UDP Echo server on n2
|
||||
UdpEchoServerHelper echoServer(42);
|
||||
|
||||
@@ -95,9 +95,8 @@ main(int argc, char** argv)
|
||||
i2.SetForwarding(0, true);
|
||||
i2.SetDefaultRouteInAllNodes(0);
|
||||
|
||||
Ipv6StaticRoutingHelper routingHelper;
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(0), n0, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(0), n0, routingStream);
|
||||
|
||||
/* Create a UdpEchoClient and UdpEchoServer application to send packets from n0 to n1 via r */
|
||||
uint32_t packetSize = 4096;
|
||||
|
||||
@@ -92,9 +92,8 @@ main(int argc, char** argv)
|
||||
i2.SetForwarding(0, true);
|
||||
i2.SetDefaultRouteInAllNodes(0);
|
||||
|
||||
Ipv6StaticRoutingHelper routingHelper;
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(0), n0, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(0), n0, routingStream);
|
||||
|
||||
/* Create a UdpEchoClient and UdpEchoServer application to send packets from n0 to n1 via r */
|
||||
uint32_t packetSize = 4096;
|
||||
|
||||
@@ -114,8 +114,8 @@ main(int argc, char** argv)
|
||||
iic1.GetInterfaceIndex(1));
|
||||
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(0.0), r1, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(3.0), sta1, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(0.0), r1, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(3.0), sta1, routingStream);
|
||||
|
||||
NS_LOG_INFO("Create Applications.");
|
||||
uint32_t packetSize = 1024;
|
||||
|
||||
@@ -203,10 +203,9 @@ main(int argc, char** argv)
|
||||
apps.Start(Seconds(2.0));
|
||||
apps.Stop(Seconds(5.0));
|
||||
|
||||
Ipv6StaticRoutingHelper routingHelper;
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(2.0), n0, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(10.0), n0, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(2.0), n0, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(10.0), n0, routingStream);
|
||||
|
||||
IpAddressHelper ipAddressHelper;
|
||||
/* RA should be received, two prefixes + routes + default route should be present */
|
||||
|
||||
@@ -210,10 +210,9 @@ main(int argc, char* argv[])
|
||||
Simulator::Schedule(Seconds(14), &Ipv4::SetUp, ipv41, ipv4ifIndex1);
|
||||
|
||||
// Trace routing tables
|
||||
Ipv4GlobalRoutingHelper g;
|
||||
Ptr<OutputStreamWrapper> routingStream =
|
||||
Create<OutputStreamWrapper>("dynamic-global-routing.routes", std::ios::out);
|
||||
g.PrintRoutingTableAllAt(Seconds(12), routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAllAt(Seconds(12), routingStream);
|
||||
|
||||
NS_LOG_INFO("Run Simulation.");
|
||||
Simulator::Run();
|
||||
|
||||
@@ -710,8 +710,7 @@ main(int argc, char* argv[])
|
||||
Create<OutputStreamWrapper>("global-routing-multi-switch-plus-router.routes",
|
||||
std::ios::out);
|
||||
|
||||
Ipv4GlobalRoutingHelper g;
|
||||
g.PrintRoutingTableAllAt(Seconds(0.1), routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAllAt(Seconds(0.1), routingStream);
|
||||
|
||||
// ======================================================================
|
||||
// Configure PCAP traces
|
||||
|
||||
@@ -213,24 +213,22 @@ main(int argc, char** argv)
|
||||
|
||||
if (printRoutingTables)
|
||||
{
|
||||
RipHelper routingHelper;
|
||||
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), a, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), b, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), c, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), d, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), a, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), b, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), c, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), d, routingStream);
|
||||
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), a, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), b, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), c, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), d, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), a, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), b, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), c, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), d, routingStream);
|
||||
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), a, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), b, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), c, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), d, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), a, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), b, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), c, routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), d, routingStream);
|
||||
}
|
||||
|
||||
NS_LOG_INFO("Create Applications.");
|
||||
|
||||
@@ -218,24 +218,22 @@ main(int argc, char** argv)
|
||||
|
||||
if (printRoutingTables)
|
||||
{
|
||||
RipNgHelper routingHelper;
|
||||
|
||||
Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper>(&std::cout);
|
||||
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), a, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), b, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), c, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(30.0), d, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), a, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), b, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), c, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), d, routingStream);
|
||||
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), a, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), b, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), c, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(60.0), d, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), a, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), b, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), c, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), d, routingStream);
|
||||
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), a, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), b, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), c, routingStream);
|
||||
routingHelper.PrintRoutingTableAt(Seconds(90.0), d, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), a, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), b, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), c, routingStream);
|
||||
Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), d, routingStream);
|
||||
}
|
||||
|
||||
NS_LOG_INFO("Create Applications.");
|
||||
|
||||
@@ -168,7 +168,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents(); // Turn on all Wifi logging
|
||||
WifiHelper::EnableLogComponents(); // Turn on all Wifi logging
|
||||
}
|
||||
|
||||
YansWifiPhyHelper wifiPhy;
|
||||
@@ -246,10 +246,10 @@ main(int argc, char* argv[])
|
||||
// Trace routing tables
|
||||
Ptr<OutputStreamWrapper> routingStream =
|
||||
Create<OutputStreamWrapper>("wifi-simple-adhoc-grid.routes", std::ios::out);
|
||||
olsr.PrintRoutingTableAllEvery(Seconds(2), routingStream);
|
||||
Ipv4RoutingHelper::PrintRoutingTableAllEvery(Seconds(2), routingStream);
|
||||
Ptr<OutputStreamWrapper> neighborStream =
|
||||
Create<OutputStreamWrapper>("wifi-simple-adhoc-grid.neighbors", std::ios::out);
|
||||
olsr.PrintNeighborCacheAllEvery(Seconds(2), neighborStream);
|
||||
Ipv4RoutingHelper::PrintNeighborCacheAllEvery(Seconds(2), neighborStream);
|
||||
|
||||
// To do-- enable an IP-level trace that shows forwarding events only
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents(); // Turn on all Wifi logging
|
||||
WifiHelper::EnableLogComponents(); // Turn on all Wifi logging
|
||||
}
|
||||
wifi.SetStandard(WIFI_STANDARD_80211b);
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents(); // Turn on all Wifi logging
|
||||
WifiHelper::EnableLogComponents(); // Turn on all Wifi logging
|
||||
}
|
||||
wifi.SetStandard(WIFI_STANDARD_80211b);
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents(); // Turn on all Wifi logging
|
||||
WifiHelper::EnableLogComponents(); // Turn on all Wifi logging
|
||||
}
|
||||
wifi.SetStandard(WIFI_STANDARD_80211b);
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ main(int argc, char* argv[])
|
||||
WifiHelper wifi;
|
||||
if (verbose)
|
||||
{
|
||||
wifi.EnableLogComponents(); // Turn on all Wifi logging
|
||||
WifiHelper::EnableLogComponents(); // Turn on all Wifi logging
|
||||
}
|
||||
wifi.SetStandard(WIFI_STANDARD_80211b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user