From 16f7931992ab0a5c92277144ba9c7f6969d2f979 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:10:17 -0700 Subject: [PATCH 01/31] port to helper API --- tutorial/tutorial-linear-dumbbell.cc | 202 ++++++++++----------------- 1 file changed, 74 insertions(+), 128 deletions(-) diff --git a/tutorial/tutorial-linear-dumbbell.cc b/tutorial/tutorial-linear-dumbbell.cc index 76b91da21..017d15860 100644 --- a/tutorial/tutorial-linear-dumbbell.cc +++ b/tutorial/tutorial-linear-dumbbell.cc @@ -14,26 +14,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/point-to-point-channel.h" -#include "ns3/csma-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/csma-net-device.h" -#include "ns3/point-to-point-topology.h" -#include "ns3/csma-topology.h" -#include "ns3/csma-ipv4-topology.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" +#include + +#include "ns3/core-module.h" +#include "ns3/node-module.h" +#include "ns3/helper-module.h" +#include "ns3/simulator-module.h" #include "ns3/global-route-manager.h" -#include "ns3/inet-socket-address.h" -#include "ns3/uinteger.h" + NS_LOG_COMPONENT_DEFINE ("DumbbellSimulation"); @@ -58,65 +46,44 @@ main (int argc, char *argv[]) // // Create the lan on the left side of the dumbbell. // - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); + NodeContainer lan1; + lan1.Create (4); - Ptr lan1 = - CsmaTopology::CreateCsmaChannel (DataRate (10000000), MilliSeconds (2)); + InternetStackHelper internet; + internet.Build (lan1); - uint32_t nd0 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n0, lan1, - "08:00:2e:00:00:00"); + CsmaHelper csma; + csma.SetChannelParameter ("BitRate", DataRate (10000000)); + csma.SetChannelParameter ("Delay", MilliSeconds (2)); + NetDeviceContainer dev1 = csma.Build (lan1); + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.0"); + Ipv4InterfaceContainer i1 = ipv4.Allocate (dev1); - uint32_t nd1 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n1, lan1, - "08:00:2e:00:00:01"); - uint32_t nd2 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n2, lan1, - "08:00:2e:00:00:02"); - - uint32_t nd3 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n3, lan1, - "08:00:2e:00:00:03"); - - CsmaIpv4Topology::AddIpv4Address (n0, nd0, "10.1.1.1", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n1, nd1, "10.1.1.2", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n2, nd2, "10.1.1.3", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n3, nd3, "10.1.1.4", "255.255.255.0"); // // Create the lan on the right side of the dumbbell. // - Ptr n4 = CreateObject (); - Ptr n5 = CreateObject (); - Ptr n6 = CreateObject (); - Ptr n7 = CreateObject (); + NodeContainer lan2; + lan2.Create (4); + internet.Build (lan2); - Ptr lan2 = - CsmaTopology::CreateCsmaChannel (DataRate (10000000), MilliSeconds (2)); + NetDeviceContainer dev2 = csma.Build (lan2); + ipv4.SetBase ("10.1.2.0", "255.255.255.0"); + Ipv4InterfaceContainer i2 = ipv4.Allocate (dev2); - uint32_t nd4 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n4, lan2, - "08:00:2e:00:00:04"); - uint32_t nd5 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n5, lan2, - "08:00:2e:00:00:05"); - - uint32_t nd6 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n6, lan2, - "08:00:2e:00:00:06"); - - uint32_t nd7 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n7, lan2, - "08:00:2e:00:00:07"); - - CsmaIpv4Topology::AddIpv4Address (n4, nd4, "10.1.2.1", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n5, nd5, "10.1.2.2", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n6, nd6, "10.1.2.3", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n7, nd7, "10.1.2.4", "255.255.255.0"); // // Create the point-to-point link to connect the two lans. // - Ptr link = PointToPointTopology::AddPointToPointLink ( - n3, n4, DataRate (38400), MilliSeconds (20)); + NodeContainer backbone = NodeContainer (lan1.Get (3), lan2.Get (0)); + PointToPointHelper p2p; + p2p.SetChannelParameter ("BitRate", DataRate (38400)); + p2p.SetChannelParameter ("Delay", MilliSeconds (20)); + NetDeviceContainer dev3 = p2p.Build (backbone); + ipv4.SetBase ("10.1.3.0", "255.255.255.0"); + ipv4.Allocate (dev3); - PointToPointTopology::AddIpv4Addresses (link, n3, "10.1.3.1", - n4, "10.1.3.2"); // // Create data flows across the link: // n0 ==> n4 ==> n0 @@ -126,77 +93,56 @@ main (int argc, char *argv[]) // uint16_t port = 7; - Ptr client0 = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.2.1"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (100), - "Interval", Seconds (0.01), - "PacketSize", Uinteger (1024)); - n0->AddApplication (client0); - Ptr client1 = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.2.2"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (100), - "Interval", Seconds (0.01), - "PacketSize", Uinteger (1024)); - n1->AddApplication (client1); - Ptr client2 = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.2.3"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (100), - "Interval", Seconds (0.01), - "PacketSize", Uinteger (1024)); - n2->AddApplication (client2); - Ptr client3 = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.2.4"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (100), - "Interval", Seconds (0.01), - "PacketSize", Uinteger (1024)); - n3->AddApplication (client3); + UdpEchoClientHelper client; + client.SetRemote (i2.GetAddress (0), port); + client.SetAppAttribute ("MaxPackets", Uinteger (100)); + client.SetAppAttribute ("Interval", Seconds (0.01)); + client.SetAppAttribute ("PacketSize", Uinteger (1024)); + ApplicationContainer apps = client.Build (lan1.Get (0)); + apps.Start (Seconds(2.)); + apps.Stop (Seconds (10.0)); - Ptr server4 = - CreateObject ("Port", Uinteger (port)); - n4->AddApplication (server4); - Ptr server5 = - CreateObject ("Port", Uinteger (port)); - n5->AddApplication (server5); - Ptr server6 = - CreateObject ("Port", Uinteger (port)); - n6->AddApplication (server6); - Ptr server7 = - CreateObject ("Port", Uinteger (port)); - n7->AddApplication (server7); + client.SetRemote (i2.GetAddress (1), port); + apps = client.Build (lan1.Get (1)); + apps.Start (Seconds(2.1)); + apps.Stop (Seconds (10.0)); + + client.SetRemote (i2.GetAddress (2), port); + apps = client.Build (lan1.Get (2)); + apps.Start (Seconds(2.2)); + apps.Stop (Seconds (10.0)); - server4->Start(Seconds(1.)); - server5->Start(Seconds(1.)); - server6->Start(Seconds(1.)); - server7->Start(Seconds(1.)); + client.SetRemote (i2.GetAddress (3), port); + apps = client.Build (lan1.Get (3)); + apps.Start (Seconds(2.3)); + apps.Stop (Seconds (10.0)); - client0->Start(Seconds(2.)); - client1->Start(Seconds(2.1)); - client2->Start(Seconds(2.2)); - client3->Start(Seconds(2.3)); - server4->Stop (Seconds(10.)); - server5->Stop (Seconds(10.)); - server6->Stop (Seconds(10.)); - server7->Stop (Seconds(10.)); - - client0->Stop (Seconds(10.)); - client1->Stop (Seconds(10.)); - client2->Stop (Seconds(10.)); - client3->Stop (Seconds(10.)); - - AsciiTrace asciitrace ("tutorial.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); - - PcapTrace pcaptrace ("tutorial.pcap"); - pcaptrace.TraceAllIp (); + UdpEchoServerHelper server; + server.SetPort (port); + apps = server.Build (lan2.Get (0)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); + apps = server.Build (lan2.Get (1)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); + apps = server.Build (lan2.Get (2)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); + apps = server.Build (lan2.Get (3)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); GlobalRouteManager::PopulateRoutingTables (); + std::ofstream os; + os.open ("tutorial.tr"); + PointToPointHelper::EnableAscii (os); + CsmaHelper::EnableAscii (os); + + PointToPointHelper::EnablePcap ("tutorial.pcap"); + CsmaHelper::EnablePcap ("tutorial.pcap"); + Simulator::Run (); Simulator::Destroy (); } From 627813fe6cfc21a85cd0d27d86f49859b2fdd5b9 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:10:59 -0700 Subject: [PATCH 02/31] port to helper API. --- tutorial/hello-simulator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/hello-simulator.cc b/tutorial/hello-simulator.cc index a99b37f0c..691098071 100644 --- a/tutorial/hello-simulator.cc +++ b/tutorial/hello-simulator.cc @@ -14,7 +14,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" +#include "ns3/core-module.h" NS_LOG_COMPONENT_DEFINE ("HelloSimulator"); From c0d60678d9d25543264d892effbd4be952900520 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:18:31 -0700 Subject: [PATCH 03/31] port to helper API --- tutorial/tutorial-csma-echo.cc | 80 ++++++++++++---------------------- 1 file changed, 28 insertions(+), 52 deletions(-) diff --git a/tutorial/tutorial-csma-echo.cc b/tutorial/tutorial-csma-echo.cc index d3299c6d7..274208c82 100644 --- a/tutorial/tutorial-csma-echo.cc +++ b/tutorial/tutorial-csma-echo.cc @@ -14,20 +14,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/csma-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/csma-net-device.h" -#include "ns3/csma-topology.h" -#include "ns3/csma-ipv4-topology.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/uinteger.h" -#include "ns3/inet-socket-address.h" +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" NS_LOG_COMPONENT_DEFINE ("UdpEchoSimulation"); @@ -40,51 +29,38 @@ main (int argc, char *argv[]) NS_LOG_INFO ("UDP Echo Simulation"); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); + NodeContainer n; + n.Create (4); - Ptr lan = - CsmaTopology::CreateCsmaChannel (DataRate (5000000), MilliSeconds (2)); + InternetStackHelper internet; + internet.Build (n); - uint32_t nd0 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n0, lan, - "08:00:2e:00:00:00"); + CsmaHelper csma; + csma.SetChannelParameter ("BitRate", DataRate (5000000)); + csma.SetChannelParameter ("Delay", MilliSeconds (2)); + NetDeviceContainer nd = csma.Build (n); - uint32_t nd1 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n1, lan, - "08:00:2e:00:00:01"); - - uint32_t nd2 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n2, lan, - "08:00:2e:00:00:02"); - - uint32_t nd3 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n3, lan, - "08:00:2e:00:00:03"); - - CsmaIpv4Topology::AddIpv4Address (n0, nd0, "10.1.1.1", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n1, nd1, "10.1.1.2", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n2, nd2, "10.1.1.3", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n3, nd3, "10.1.1.4", "255.255.255.0"); + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.0"); + Ipv4InterfaceContainer i = ipv4.Allocate (nd); uint16_t port = 7; - Ptr client = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.1.2"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (1), - "Interval", Seconds(1.), - "PacketSize", Uinteger (1024)); - n0->AddApplication (client); - - Ptr server = - CreateObject ("Port", Uinteger (port)); - n1->AddApplication (server); - - server->Start(Seconds(1.)); - client->Start(Seconds(2.)); - - server->Stop (Seconds(10.)); - client->Stop (Seconds(10.)); + UdpEchoClientHelper client; + client.SetRemote (i.GetAddress (1), port); + client.SetAppAttribute ("MaxPackets", Uinteger (1)); + client.SetAppAttribute ("Interval", Seconds (1.0)); + client.SetAppAttribute ("PacketSize", Uinteger (1024)); + ApplicationContainer apps = client.Build (n.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); + UdpEchoServerHelper server; + server.SetPort (port); + apps = server.Build (n.Get (1)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); + Simulator::Run (); Simulator::Destroy (); } From 879b2cb91dcda19e2ac34e95660b1e2d0c24d4a0 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:20:26 -0700 Subject: [PATCH 04/31] port to helper API --- tutorial/tutorial-csma-echo-ascii-trace.cc | 89 ++++++++-------------- 1 file changed, 33 insertions(+), 56 deletions(-) diff --git a/tutorial/tutorial-csma-echo-ascii-trace.cc b/tutorial/tutorial-csma-echo-ascii-trace.cc index c34871dac..18ef56a29 100644 --- a/tutorial/tutorial-csma-echo-ascii-trace.cc +++ b/tutorial/tutorial-csma-echo-ascii-trace.cc @@ -14,21 +14,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/csma-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/csma-net-device.h" -#include "ns3/csma-topology.h" -#include "ns3/csma-ipv4-topology.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/ascii-trace.h" -#include "ns3/inet-socket-address.h" -#include "ns3/uinteger.h" +#include + +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" NS_LOG_COMPONENT_DEFINE ("UdpEchoSimulation"); @@ -41,55 +31,42 @@ main (int argc, char *argv[]) NS_LOG_INFO ("UDP Echo Simulation"); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); + NodeContainer n; + n.Create (4); - Ptr lan = - CsmaTopology::CreateCsmaChannel (DataRate (5000000), MilliSeconds (2)); + InternetStackHelper internet; + internet.Build (n); - uint32_t nd0 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n0, lan, - "08:00:2e:00:00:00"); + CsmaHelper csma; + csma.SetChannelParameter ("BitRate", DataRate (5000000)); + csma.SetChannelParameter ("Delay", MilliSeconds (2)); + NetDeviceContainer nd = csma.Build (n); - uint32_t nd1 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n1, lan, - "08:00:2e:00:00:01"); - - uint32_t nd2 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n2, lan, - "08:00:2e:00:00:02"); - - uint32_t nd3 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n3, lan, - "08:00:2e:00:00:03"); - - CsmaIpv4Topology::AddIpv4Address (n0, nd0, "10.1.1.1", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n1, nd1, "10.1.1.2", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n2, nd2, "10.1.1.3", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n3, nd3, "10.1.1.4", "255.255.255.0"); + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.0"); + Ipv4InterfaceContainer i = ipv4.Allocate (nd); uint16_t port = 7; - Ptr client = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.1.2"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (1), - "Interval", Seconds(1.), - "PacketSize", Uinteger (1024)); - n0->AddApplication (client); + UdpEchoClientHelper client; + client.SetRemote (i.GetAddress (1), port); + client.SetAppAttribute ("MaxPackets", Uinteger (1)); + client.SetAppAttribute ("Interval", Seconds (1.0)); + client.SetAppAttribute ("PacketSize", Uinteger (1024)); + ApplicationContainer apps = client.Build (n.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); - Ptr server = - CreateObject ("Port", Uinteger (port)); - n1->AddApplication (server); - - server->Start(Seconds(1.)); - client->Start(Seconds(2.)); - - server->Stop (Seconds(10.)); - client->Stop (Seconds(10.)); - - AsciiTrace asciitrace ("tutorial.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); + UdpEchoServerHelper server; + server.SetPort (port); + apps = server.Build (n.Get (1)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); + std::ofstream os; + os.open ("tutorial.tr"); + CsmaHelper::EnableAscii (os); + Simulator::Run (); Simulator::Destroy (); } From 537e375fe145ed3cfdc1733891f5bb9faed41ae2 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:21:22 -0700 Subject: [PATCH 05/31] port to helper API --- tutorial/tutorial-csma-echo-pcap-trace.cc | 91 ++++++++--------------- 1 file changed, 29 insertions(+), 62 deletions(-) diff --git a/tutorial/tutorial-csma-echo-pcap-trace.cc b/tutorial/tutorial-csma-echo-pcap-trace.cc index c54fe8de8..feca0d427 100644 --- a/tutorial/tutorial-csma-echo-pcap-trace.cc +++ b/tutorial/tutorial-csma-echo-pcap-trace.cc @@ -14,22 +14,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/csma-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/csma-net-device.h" -#include "ns3/csma-topology.h" -#include "ns3/csma-ipv4-topology.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" -#include "ns3/inet-socket-address.h" -#include "ns3/uinteger.h" +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" NS_LOG_COMPONENT_DEFINE ("UdpEchoSimulation"); @@ -42,60 +29,40 @@ main (int argc, char *argv[]) NS_LOG_INFO ("UDP Echo Simulation"); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); + NodeContainer n; + n.Create (4); - Ptr lan = - CsmaTopology::CreateCsmaChannel (DataRate (5000000), MilliSeconds (2)); + InternetStackHelper internet; + internet.Build (n); - uint32_t nd0 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n0, lan, - "08:00:2e:00:00:00"); + CsmaHelper csma; + csma.SetChannelParameter ("BitRate", DataRate (5000000)); + csma.SetChannelParameter ("Delay", MilliSeconds (2)); + NetDeviceContainer nd = csma.Build (n); - uint32_t nd1 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n1, lan, - "08:00:2e:00:00:01"); - - uint32_t nd2 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n2, lan, - "08:00:2e:00:00:02"); - - uint32_t nd3 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n3, lan, - "08:00:2e:00:00:03"); - - CsmaIpv4Topology::AddIpv4Address (n0, nd0, "10.1.1.1", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n1, nd1, "10.1.1.2", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n2, nd2, "10.1.1.3", "255.255.255.0"); - CsmaIpv4Topology::AddIpv4Address (n3, nd3, "10.1.1.4", "255.255.255.0"); + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.0"); + Ipv4InterfaceContainer i = ipv4.Allocate (nd); uint16_t port = 7; - Ptr client = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.1.2"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (1), - "Interval", Seconds(1.), - "PacketSize", Uinteger (1024)); - n0->AddApplication (client); + UdpEchoClientHelper client; + client.SetRemote (i.GetAddress (1), port); + client.SetAppAttribute ("MaxPackets", Uinteger (1)); + client.SetAppAttribute ("Interval", Seconds (1.0)); + client.SetAppAttribute ("PacketSize", Uinteger (1024)); + ApplicationContainer apps = client.Build (n.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); - Ptr server = - CreateObject ("Port", Uinteger (port)); - n1->AddApplication (server); - - server->Start(Seconds(1.)); - client->Start(Seconds(2.)); - - server->Stop (Seconds(10.)); - client->Stop (Seconds(10.)); - - AsciiTrace asciitrace ("tutorial.tr"); - asciitrace.TraceAllQueues (); -#if 0 - asciitrace.TraceAllNetDeviceRx (); -#endif - - PcapTrace pcaptrace ("tutorial.pcap"); - pcaptrace.TraceAllIp (); + UdpEchoServerHelper server; + server.SetPort (port); + apps = server.Build (n.Get (1)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); + CsmaHelper::EnablePcap ("tutorial.pcap"); + Simulator::Run (); Simulator::Destroy (); } From a053ff68969ebc2732e7595dc7eecf12e489a330 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:25:01 -0700 Subject: [PATCH 06/31] port to helper API --- tutorial/point-to-point-ipv4-topology.cc | 75 ---------- tutorial/point-to-point-ipv4-topology.h | 49 ------ tutorial/tutorial-star.cc | 181 +++++++---------------- tutorial/wscript | 6 +- 4 files changed, 58 insertions(+), 253 deletions(-) delete mode 100644 tutorial/point-to-point-ipv4-topology.cc delete mode 100644 tutorial/point-to-point-ipv4-topology.h diff --git a/tutorial/point-to-point-ipv4-topology.cc b/tutorial/point-to-point-ipv4-topology.cc deleted file mode 100644 index 8f4efd241..000000000 --- a/tutorial/point-to-point-ipv4-topology.cc +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "ns3/assert.h" -#include "ns3/log.h" -#include "ns3/nstime.h" -#include "ns3/internet-node.h" -#include "ns3/ipv4-address.h" -#include "ns3/ipv4.h" -#include "ns3/queue.h" -#include "ns3/drop-tail-queue.h" - -#include "ns3/point-to-point-channel.h" -#include "ns3/point-to-point-net-device.h" -#include "point-to-point-ipv4-topology.h" - -namespace ns3 { - - Ptr -PointToPointIpv4Topology::CreateChannel ( - const DataRate& bps, - const Time& delay) -{ - return CreateObject ("BitRate", bps, "Delay", delay); -} - - uint32_t -PointToPointIpv4Topology::AddNetDevice ( - Ptr node, - Ptr channel) -{ - NS_ASSERT (channel->GetNDevices () <= 1); - - Ptr nd = - CreateObject ("Address", Mac48Address::Allocate ()); - node->AddDevice (nd); - Ptr q = CreateObject (); - nd->AddQueue(q); - nd->Attach (channel); - - return nd->GetIfIndex (); -} - - uint32_t -PointToPointIpv4Topology::AddAddress ( - Ptr node, - uint32_t netDeviceNumber, - Ipv4Address address, - Ipv4Mask mask) -{ - Ptr nd = node->GetDevice(netDeviceNumber); - Ptr ipv4 = node->GetObject (); - uint32_t ifIndex = ipv4->AddInterface (nd); - - ipv4->SetAddress (ifIndex, address); - ipv4->SetNetworkMask (ifIndex, mask); - ipv4->SetUp (ifIndex); - - return ifIndex; -} - -} // namespace ns3 diff --git a/tutorial/point-to-point-ipv4-topology.h b/tutorial/point-to-point-ipv4-topology.h deleted file mode 100644 index c2a9a4391..000000000 --- a/tutorial/point-to-point-ipv4-topology.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef POINT_TO_POINT_IPV4_TOPOLOGY_H -#define POINT_TO_POINT_IPV4_TOPOLOGY_H - -#include "ns3/ptr.h" - -namespace ns3 { - -class PointToPointChannel; -class Node; -class Ipv4Address; -class Ipv4Mask; -class DataRate; - -class PointToPointIpv4Topology { -public: - static Ptr CreateChannel ( - const DataRate& dataRate, const Time& delay); - - static uint32_t AddNetDevice( - Ptr node, - Ptr channel); - - static uint32_t AddAddress( - Ptr node, - uint32_t ndIndex, - Ipv4Address address, - Ipv4Mask mask); -}; - -} // namespace ns3 - -#endif // POINT_TO_POINT_IPV4_TOPOLOGY_H - diff --git a/tutorial/tutorial-star.cc b/tutorial/tutorial-star.cc index 3cc4437f0..4c12fd91b 100644 --- a/tutorial/tutorial-star.cc +++ b/tutorial/tutorial-star.cc @@ -14,25 +14,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/point-to-point-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" -#include "ns3/global-route-manager.h" -#include "ns3/inet-socket-address.h" -#include "ns3/uinteger.h" +#include -#include "point-to-point-ipv4-topology.h" +#include "ns3/core-module.h" +#include "ns3/node-module.h" +#include "ns3/helper-module.h" +#include "ns3/simulator-module.h" -NS_LOG_COMPONENT_DEFINE ("StarSimulation"); +NS_LOG_COMPONENT_DEFINE ("StarRoutingSimulation"); using namespace ns3; @@ -49,125 +38,67 @@ using namespace ns3; int main (int argc, char *argv[]) { - LogComponentEnable ("StarSimulation", LOG_LEVEL_INFO); + LogComponentEnable ("StarRoutingSimulation", LOG_LEVEL_INFO); - NS_LOG_INFO ("Star Topology Simulation"); + NS_LOG_INFO ("Star Topology with Routing Simulation"); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); - Ptr n4 = CreateObject (); - Ptr n5 = CreateObject (); - Ptr n6 = CreateObject (); + NodeContainer n; + n.Create (7); + NodeContainer n01 = NodeContainer (n.Get (0), n.Get (1)); + NodeContainer n02 = NodeContainer (n.Get (0), n.Get (2)); + NodeContainer n03 = NodeContainer (n.Get (0), n.Get (3)); + NodeContainer n04 = NodeContainer (n.Get (0), n.Get (4)); + NodeContainer n05 = NodeContainer (n.Get (0), n.Get (5)); + NodeContainer n06 = NodeContainer (n.Get (0), n.Get (6)); - Ptr link01 = - PointToPointIpv4Topology::CreateChannel (DataRate (38400), - MilliSeconds (20)); + InternetStackHelper internet; + internet.Build (n); - uint32_t nd01 = PointToPointIpv4Topology::AddNetDevice (n0, - link01); + PointToPointHelper p2p; + p2p.SetChannelParameter ("BitRate", DataRate (38400)); + p2p.SetChannelParameter ("Delay", MilliSeconds (20)); - Ptr link02 = - PointToPointIpv4Topology::CreateChannel (DataRate (38400), - MilliSeconds (20)); + NetDeviceContainer d01 = p2p.Build (n01); + NetDeviceContainer d02 = p2p.Build (n02); + NetDeviceContainer d03 = p2p.Build (n03); + NetDeviceContainer d04 = p2p.Build (n04); + NetDeviceContainer d05 = p2p.Build (n05); + NetDeviceContainer d06 = p2p.Build (n06); - uint32_t nd02 = PointToPointIpv4Topology::AddNetDevice (n0, - link02); - - Ptr link03 = - PointToPointIpv4Topology::CreateChannel (DataRate (38400), - MilliSeconds (20)); - - uint32_t nd03 = PointToPointIpv4Topology::AddNetDevice (n0, - link03); - - Ptr link04 = - PointToPointIpv4Topology::CreateChannel (DataRate (38400), - MilliSeconds (20)); - - uint32_t nd04 = PointToPointIpv4Topology::AddNetDevice (n0, - link04); - - Ptr link05 = - PointToPointIpv4Topology::CreateChannel (DataRate (38400), - MilliSeconds (20)); - - uint32_t nd05 = PointToPointIpv4Topology::AddNetDevice (n0, - link05); - - Ptr link06 = - PointToPointIpv4Topology::CreateChannel (DataRate (38400), - MilliSeconds (20)); - - uint32_t nd06 = PointToPointIpv4Topology::AddNetDevice (n0, link06); - - uint32_t nd1 = PointToPointIpv4Topology::AddNetDevice (n1, link01); - uint32_t nd2 = PointToPointIpv4Topology::AddNetDevice (n2, link02); - uint32_t nd3 = PointToPointIpv4Topology::AddNetDevice (n3, link03); - uint32_t nd4 = PointToPointIpv4Topology::AddNetDevice (n4, link04); - uint32_t nd5 = PointToPointIpv4Topology::AddNetDevice (n5, link05); - uint32_t nd6 = PointToPointIpv4Topology::AddNetDevice (n6, link06); - - PointToPointIpv4Topology::AddAddress (n0, nd01, "10.1.1.1", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n1, nd1, "10.1.1.2", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n0, nd02, "10.1.2.1", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n2, nd2, "10.1.2.2", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n0, nd03, "10.1.3.1", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n3, nd3, "10.1.2.2", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n0, nd04, "10.1.4.1", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n4, nd4, "10.1.4.2", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n0, nd05, "10.1.5.1", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n5, nd5, "10.1.5.2", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n0, nd06, "10.1.6.1", - "255.255.255.252"); - - PointToPointIpv4Topology::AddAddress (n6, nd6, "10.1.6.2", - "255.255.255.252"); + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.252"); + Ipv4InterfaceContainer i01 = ipv4.Allocate (d01); + ipv4.SetBase ("10.1.2.0", "255.255.255.252"); + Ipv4InterfaceContainer i02 = ipv4.Allocate (d02); + ipv4.SetBase ("10.1.3.0", "255.255.255.252"); + Ipv4InterfaceContainer i03 = ipv4.Allocate (d03); + ipv4.SetBase ("10.1.4.0", "255.255.255.252"); + Ipv4InterfaceContainer i04 = ipv4.Allocate (d04); + ipv4.SetBase ("10.1.5.0", "255.255.255.252"); + Ipv4InterfaceContainer i05 = ipv4.Allocate (d05); + ipv4.SetBase ("10.1.6.0", "255.255.255.252"); + Ipv4InterfaceContainer i06 = ipv4.Allocate (d06); uint16_t port = 7; - Ptr client = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.1.2"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (1), - "Interval", Seconds(1.), - "PacketSize", Uinteger (1024)); - n0->AddApplication (client); + UdpEchoServerHelper server; + server.SetPort (port); + ApplicationContainer apps = server.Build (n.Get (1)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); - Ptr server = - CreateObject ("Port", Uinteger (port)); - n1->AddApplication (server); + UdpEchoClientHelper client; + client.SetRemote (i01.GetAddress (1), port); + client.SetAppAttribute ("MaxPackets", Uinteger (1)); + client.SetAppAttribute ("Interval", Seconds (1.0)); + client.SetAppAttribute ("PacketSize", Uinteger (1024)); + apps = client.Build (n.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); - server->Start(Seconds(1.)); - client->Start(Seconds(2.)); - - server->Stop (Seconds(10.)); - client->Stop (Seconds(10.)); - - AsciiTrace asciitrace ("tutorial.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); + std::ofstream ascii; + ascii.open ("tutorial.tr"); + PointToPointHelper::EnableAscii (ascii); Simulator::Run (); Simulator::Destroy (); diff --git a/tutorial/wscript b/tutorial/wscript index dc0afd09f..bc40b24fe 100644 --- a/tutorial/wscript +++ b/tutorial/wscript @@ -17,12 +17,10 @@ def build(bld): obj.source = 'tutorial-point-to-point.cc' obj = bld.create_ns3_program('tutorial-star', ['internet-node', 'point-to-point']) - obj.source = ['tutorial-star.cc', - 'point-to-point-ipv4-topology.cc'] + obj.source = ['tutorial-star.cc'] obj = bld.create_ns3_program('tutorial-star-routing', ['internet-node', 'point-to-point']) - obj.source = ['tutorial-star-routing.cc', - 'point-to-point-ipv4-topology.cc'] + obj.source = ['tutorial-star-routing.cc'] obj = bld.create_ns3_program('tutorial-linear-dumbbell', ['internet-node', 'point-to-point']) obj.source = 'tutorial-linear-dumbbell.cc' From c5ffe4c9dc99c2ff7d8130407d63655f4c18c71f Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:41:09 -0700 Subject: [PATCH 07/31] remove dead comment --- examples/simple-global-routing.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/simple-global-routing.cc b/examples/simple-global-routing.cc index 179a2faf8..64ba1d1d9 100644 --- a/examples/simple-global-routing.cc +++ b/examples/simple-global-routing.cc @@ -152,7 +152,6 @@ main (int argc, char *argv[]) apps.Stop (Seconds (10.0)); // Create a packet sink to receive these packets - // The last argument "true" disables output from the Receive callback PacketSinkHelper sink; sink.SetupUdp (Ipv4Address::GetAny (), port); apps = sink.Build (c.Get (3)); From e173bb868d377fa11972f5570950b88a9baf4a81 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:44:08 -0700 Subject: [PATCH 08/31] remove example of p2p static routing: this requires using the low-level API and we don't want to show how to do this. --- examples/simple-point-to-point.cc | 219 ------------------------------ examples/wscript | 4 - 2 files changed, 223 deletions(-) delete mode 100644 examples/simple-point-to-point.cc diff --git a/examples/simple-point-to-point.cc b/examples/simple-point-to-point.cc deleted file mode 100644 index 5ac493cef..000000000 --- a/examples/simple-point-to-point.cc +++ /dev/null @@ -1,219 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * ns-2 simple.tcl script (ported from ns-2) - * Originally authored by Steve McCanne, 12/19/1996 - */ - -// Port of ns-2/tcl/ex/simple.tcl to ns-3 -// -// Network topology -// -// n0 -// \ 5 Mb/s, 2ms -// \ 1.5Mb/s, 10ms -// n2 -------------------------n3 -// / -// / 5 Mb/s, 2ms -// n1 -// -// - all links are point-to-point links with indicated one-way BW/delay -// - CBR/UDP flows from n0 to n3, and from n3 to n1 -// - FTP/TCP flow from n0 to n3, starting at time 1.2 to time 1.35 sec. -// - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec. -// (i.e., DataRate of 448,000 bps) -// - DropTail queues -// - Tracing of queues and packet receptions to file -// "simple-point-to-point.tr" - -#include "ns3/log.h" -#include "ns3/command-line.h" -#include "ns3/ptr.h" -#include "ns3/random-variable.h" -#include "ns3/config.h" -#include "ns3/string.h" - -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/data-rate.h" - -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" -#include "ns3/internet-node.h" -#include "ns3/point-to-point-channel.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/ipv4-address.h" -#include "ns3/inet-socket-address.h" -#include "ns3/ipv4.h" -#include "ns3/socket.h" -#include "ns3/ipv4-route.h" -#include "ns3/point-to-point-topology.h" -#include "ns3/onoff-application.h" -#include "ns3/packet-sink.h" - -using namespace ns3; - -NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample"); - -int -main (int argc, char *argv[]) -{ - // Users may find it convenient to turn on explicit debugging - // for selected modules; the below lines suggest how to do this -#if 0 - LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_ALL); -#endif - - // Set up some default values for the simulation. - - Config::SetDefault ("ns3::OnOffApplication::PacketSize", String ("210")); - Config::SetDefault ("ns3::OnOffApplication::DataRate", String ("448kb/s")); - - // Allow the user to override any of the defaults and the above - // Bind()s at run-time, via command-line arguments - CommandLine cmd; - cmd.Parse (argc, argv); - - // Here, we will explicitly create four nodes. In more sophisticated - // topologies, we could configure a node factory. - NS_LOG_INFO ("Create nodes."); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); - - // We create the channels first without any IP addressing information - NS_LOG_INFO ("Create channels."); - Ptr channel0 = - PointToPointTopology::AddPointToPointLink ( - n0, n2, DataRate(5000000), MilliSeconds(2)); - - Ptr channel1 = - PointToPointTopology::AddPointToPointLink ( - n1, n2, DataRate(5000000), MilliSeconds(2)); - - Ptr channel2 = - PointToPointTopology::AddPointToPointLink ( - n2, n3, DataRate(1500000), MilliSeconds(10)); - - // Later, we add IP addresses. - NS_LOG_INFO ("Assign IP Addresses."); - PointToPointTopology::AddIpv4Addresses ( - channel0, n0, Ipv4Address("10.1.1.1"), - n2, Ipv4Address("10.1.1.2")); - - PointToPointTopology::AddIpv4Addresses ( - channel1, n1, Ipv4Address("10.1.2.1"), - n2, Ipv4Address("10.1.2.2")); - - PointToPointTopology::AddIpv4Addresses ( - channel2, n2, Ipv4Address("10.1.3.1"), - n3, Ipv4Address("10.1.3.2")); - - // Finally, we add static routes. These three steps (Channel and - // NetDevice creation, IP Address assignment, and routing) are - // separated because there may be a need to postpone IP Address - // assignment (emulation) or modify to use dynamic routing - NS_LOG_INFO ("Add Static Routes."); - PointToPointTopology::AddIpv4Routes(n0, n2, channel0); - PointToPointTopology::AddIpv4Routes(n1, n2, channel1); - PointToPointTopology::AddIpv4Routes(n2, n3, channel2); - - // Create the OnOff application to send UDP datagrams of size - // 210 bytes at a rate of 448 Kb/s - NS_LOG_INFO ("Create Applications."); - uint16_t port = 9; // Discard port (RFC 863) - Ptr ooff = - CreateObject ("Remote", Address (InetSocketAddress ("10.1.3.2", port)), - "Protocol", TypeId::LookupByName ("ns3::Udp"), - "OnTime", ConstantVariable(1), - "OffTime", ConstantVariable(0)); - n0->AddApplication (ooff); - // Start the application - ooff->Start (Seconds(1.0)); - - // Create an optional packet sink to receive these packets - Ptr sink = - CreateObject ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), - "Protocol", TypeId::LookupByName ("ns3::Udp")); - n3->AddApplication (sink); - // Start the sink - sink->Start (Seconds (1.0)); - - // Create a similar flow from n3 to n1, starting at time 1.1 seconds - ooff = CreateObject ("Remote", Address (InetSocketAddress ("10.1.2.1", port)), - "Protocol", TypeId::LookupByName ("ns3::Udp"), - "OnTime", ConstantVariable(1), - "OffTime", ConstantVariable(0)); - n3->AddApplication (ooff); - // Start the application - ooff->Start(Seconds(1.1)); - - // Create a packet sink to receive these packets - sink = CreateObject ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), - "Protocol", TypeId::LookupByName ("ns3::Udp")); - n1->AddApplication (sink); - // Start the sink - sink->Start (Seconds (1.1)); - - // TCP - // Create a file transfer from n0 to n3, starting at time 1.2 - uint16_t servPort = 500; - - ooff = CreateObject ("Remote", Address (InetSocketAddress ("10.1.3.2", servPort)), - "Protocol", TypeId::LookupByName ("ns3::Tcp"), - "OnTime", ConstantVariable(1), - "OffTime", ConstantVariable(0)); - n0->AddApplication (ooff); - // Start the application - ooff->Start (Seconds(1.2)); - ooff->Stop (Seconds(1.35)); - - // Create a packet sink to receive these TCP packets - sink = CreateObject ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)), - "Protocol", TypeId::LookupByName ("ns3::Tcp")); - n3->AddApplication (sink); - sink->Start (Seconds (1.2)); - - // Here, finish off packet routing configuration - // This will likely set by some global StaticRouting object in the future - NS_LOG_INFO ("Set Default Routes."); - Ptr ipv4; - ipv4 = n0->GetObject (); - ipv4->SetDefaultRoute (Ipv4Address ("10.1.1.2"), 1); - ipv4 = n3->GetObject (); - ipv4->SetDefaultRoute (Ipv4Address ("10.1.3.1"), 1); - - // Configure tracing of all enqueue, dequeue, and NetDevice receive events - // Trace output will be sent to the simple-point-to-point.tr file - NS_LOG_INFO ("Configure Tracing."); - AsciiTrace asciitrace ("simple-point-to-point.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); - - // Also configure some tcpdump traces; each interface will be traced - // The output files will be named - // simple-point-to-point.pcap-- - // and can be read by the "tcpdump -r" command (use "-tt" option to - // display timestamps correctly) - PcapTrace pcaptrace ("simple-point-to-point.pcap"); - pcaptrace.TraceAllIp (); - - NS_LOG_INFO ("Run Simulation."); - Simulator::StopAt (Seconds (3.0)); - Simulator::Run (); - Simulator::Destroy (); - NS_LOG_INFO ("Done."); -} diff --git a/examples/wscript b/examples/wscript index 32aa0732b..046950ce6 100644 --- a/examples/wscript +++ b/examples/wscript @@ -10,10 +10,6 @@ def build(bld): ['point-to-point', 'internet-node', 'global-routing']) obj.source = 'simple-alternate-routing.cc' - obj = bld.create_ns3_program('simple-point-to-point', - ['point-to-point', 'internet-node']) - obj.source = 'simple-point-to-point.cc' - obj = bld.create_ns3_program('simple-error-model', ['point-to-point', 'internet-node']) obj.source = 'simple-error-model.cc' From 0dfe8fa5df3386f628875ea1800766c81b3b0a26 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 13:49:45 -0700 Subject: [PATCH 09/31] use static method syntax to setup tracing --- examples/simple-global-routing.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/simple-global-routing.cc b/examples/simple-global-routing.cc index 64ba1d1d9..0e9652b50 100644 --- a/examples/simple-global-routing.cc +++ b/examples/simple-global-routing.cc @@ -93,9 +93,6 @@ main (int argc, char *argv[]) CommandLine cmd; cmd.Parse (argc, argv); - std::ofstream ascii; - ascii.open ("simple-global-routing.tr"); - // Here, we will explicitly create four nodes. In more sophisticated // topologies, we could configure a node factory. NS_LOG_INFO ("Create nodes."); @@ -111,8 +108,6 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.EnablePcap ("simple-global-routing.pcap"); - p2p.EnableAscii (ascii); p2p.SetChannelParameter ("BitRate", DataRate (5000000)); p2p.SetChannelParameter ("Delay", MilliSeconds (2)); NetDeviceContainer d0d2 = p2p.Build (n0n2); @@ -169,6 +164,10 @@ main (int argc, char *argv[]) apps.Start (Seconds (1.1)); apps.Stop (Seconds (10.0)); + std::ofstream ascii; + ascii.open ("simple-global-routing.tr"); + PointToPointHelper::EnablePcap ("simple-global-routing.pcap"); + PointToPointHelper::EnableAscii (ascii); NS_LOG_INFO ("Run Simulation."); Simulator::Run (); From 379c3d5390c1a78d12a5e77507678b97b3ba1c37 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:00:40 -0700 Subject: [PATCH 10/31] port to helper API --- examples/simple-point-to-point-olsr.cc | 183 ++++++++++--------------- 1 file changed, 71 insertions(+), 112 deletions(-) diff --git a/examples/simple-point-to-point-olsr.cc b/examples/simple-point-to-point-olsr.cc index ee538588e..f4717d7a2 100644 --- a/examples/simple-point-to-point-olsr.cc +++ b/examples/simple-point-to-point-olsr.cc @@ -35,38 +35,20 @@ // - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec. // (i.e., DataRate of 448,000 bps) // - DropTail queues -// - Tracing of queues and packet receptions to file -// "simple-point-to-point.tr" +// - Tracing of queues and packet receptions to file "simple-point-to-point-olsr.tr" -#include "ns3/log.h" -#include "ns3/command-line.h" -#include "ns3/ptr.h" -#include "ns3/random-variable.h" -#include "ns3/config.h" -#include "ns3/string.h" +#include +#include +#include +#include -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/data-rate.h" - -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" -#include "ns3/internet-node.h" -#include "ns3/point-to-point-channel.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/ipv4-address.h" -#include "ns3/inet-socket-address.h" -#include "ns3/ipv4.h" -#include "ns3/socket.h" -#include "ns3/ipv4-route.h" -#include "ns3/point-to-point-topology.h" -#include "ns3/onoff-application.h" -#include "ns3/packet-sink.h" -#include "ns3/olsr-helper.h" +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" using namespace ns3; -NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample"); +NS_LOG_COMPONENT_DEFINE ("SimpleGlobalRoutingExample"); int main (int argc, char *argv[]) @@ -74,7 +56,7 @@ main (int argc, char *argv[]) // Users may find it convenient to turn on explicit debugging // for selected modules; the below lines suggest how to do this #if 0 - LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_INFO); + LogComponentEnable ("SimpleGlobalRoutingExample", LOG_LEVEL_INFO); LogComponentEnable("Object", LOG_LEVEL_ALL); LogComponentEnable("Queue", LOG_LEVEL_ALL); @@ -98,125 +80,102 @@ main (int argc, char *argv[]) LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_ALL); LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL); #endif + // Set up some default values for the simulation. Use the - // Set up some default values for the simulation. - - Config::SetDefault ("ns3::OnOffApplication::PacketSize", String ("210")); - Config::SetDefault ("ns3::OnOffApplication::DataRate", String ("448kb/s")); + Config::SetDefault ("ns3::OnOffApplication::PacketSize", Uinteger (210)); + Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRate ("448kb/s")); //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); // Allow the user to override any of the defaults and the above - // Bind()s at run-time, via command-line arguments + // DefaultValue::Bind ()s at run-time, via command-line arguments CommandLine cmd; cmd.Parse (argc, argv); // Here, we will explicitly create four nodes. In more sophisticated // topologies, we could configure a node factory. NS_LOG_INFO ("Create nodes."); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - Ptr n2 = CreateObject (); - Ptr n3 = CreateObject (); - Ptr n4 = CreateObject (); + NodeContainer c; + c.Create (5); + NodeContainer n02 = NodeContainer (c.Get(0), c.Get (2)); + NodeContainer n12 = NodeContainer (c.Get(1), c.Get (2)); + NodeContainer n32 = NodeContainer (c.Get(3), c.Get (2)); + NodeContainer n34 = NodeContainer (c.Get (3), c.Get (4)); + + InternetStackHelper internet; + internet.Build (c); // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); - Ptr channel0 = - PointToPointTopology::AddPointToPointLink ( - n0, n2, DataRate(5000000), MilliSeconds(2)); - - Ptr channel1 = - PointToPointTopology::AddPointToPointLink ( - n1, n2, DataRate(5000000), MilliSeconds(2)); - - Ptr channel2 = - PointToPointTopology::AddPointToPointLink ( - n2, n3, DataRate(1500000), MilliSeconds(10)); - - Ptr channel3 = - PointToPointTopology::AddPointToPointLink ( - n3, n4, DataRate(1500000), MilliSeconds(10)); + PointToPointHelper p2p; + p2p.SetChannelParameter ("BitRate", DataRate (5000000)); + p2p.SetChannelParameter ("Delay", MilliSeconds (2)); + NetDeviceContainer nd02 = p2p.Build (n02); + NetDeviceContainer nd12 = p2p.Build (n12); + p2p.SetChannelParameter ("BitRate", DataRate (1500000)); + p2p.SetChannelParameter ("Delay", MilliSeconds (10)); + NetDeviceContainer nd32 = p2p.Build (n32); + NetDeviceContainer nd34 = p2p.Build (n34); // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); - PointToPointTopology::AddIpv4Addresses ( - channel0, n0, Ipv4Address("10.1.1.1"), - n2, Ipv4Address("10.1.1.2")); - - PointToPointTopology::AddIpv4Addresses ( - channel1, n1, Ipv4Address("10.1.2.1"), - n2, Ipv4Address("10.1.2.2")); - - PointToPointTopology::AddIpv4Addresses ( - channel2, n2, Ipv4Address("10.1.3.1"), - n3, Ipv4Address("10.1.3.2")); + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.0"); + Ipv4InterfaceContainer i02 = ipv4.Allocate (nd02); - PointToPointTopology::AddIpv4Addresses ( - channel3, n3, Ipv4Address("10.1.4.1"), - n4, Ipv4Address("10.1.4.2")); + ipv4.SetBase ("10.1.2.0", "255.255.255.0"); + Ipv4InterfaceContainer i12 = ipv4.Allocate (nd12); + + ipv4.SetBase ("10.1.3.0", "255.255.255.0"); + Ipv4InterfaceContainer i32 = ipv4.Allocate (nd32); + + ipv4.SetBase ("10.1.4.0", "255.255.255.0"); + Ipv4InterfaceContainer i34 = ipv4.Allocate (nd34); // Enable OLSR NS_LOG_INFO ("Enabling OLSR Routing."); OlsrHelper olsr; olsr.EnableAll (); - // Create the OnOff application to send UDP datagrams of size // 210 bytes at a rate of 448 Kb/s NS_LOG_INFO ("Create Applications."); uint16_t port = 9; // Discard port (RFC 863) - Ptr ooff = - CreateObject ("Remote", Address (InetSocketAddress ("10.1.4.2", port)), - "Protocol", TypeId::LookupByName ("ns3::Udp"), - "OnTime", ConstantVariable(1), - "OffTime", ConstantVariable(0)); - n0->AddApplication (ooff); - // Start the application - ooff->Start(Seconds(1.0)); - - // Create an optional packet sink to receive these packets - Ptr sink = - CreateObject ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), - "Protocol", TypeId::LookupByName ("ns3::Udp")); - n3->AddApplication (sink); - // Start the sink - sink->Start (Seconds (1.0)); - - // Create a similar flow from n3 to n1, starting at time 1.1 seconds - ooff = CreateObject ("Remote", Address (InetSocketAddress ("10.1.2.1", port)), - "Protocol", TypeId::LookupByName ("ns3::Udp"), - "OnTime", ConstantVariable(1), - "OffTime", ConstantVariable(0)); - n3->AddApplication (ooff); - // Start the application - ooff->Start (Seconds(1.1)); + OnOffHelper onoff; + onoff.SetAppAttribute ("OnTime", ConstantVariable (1)); + onoff.SetAppAttribute ("OffTime", ConstantVariable (0)); + onoff.SetUdpRemote (i34.GetAddress (1), port); + ApplicationContainer apps = onoff.Build (c.Get (0)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); // Create a packet sink to receive these packets - sink = CreateObject ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), - "Protocol", TypeId::LookupByName ("ns3::Udp")); - n1->AddApplication (sink); - // Start the sink - sink->Start (Seconds (1.1)); + PacketSinkHelper sink; + sink.SetupUdp (Ipv4Address::GetAny (), port); + apps = sink.Build (c.Get (3)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); - // Configure tracing of all enqueue, dequeue, and NetDevice receive events - // Trace output will be sent to the simple-point-to-point.tr file - NS_LOG_INFO ("Configure Tracing."); - AsciiTrace asciitrace ("simple-point-to-point-olsr.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); + // Create a similar flow from n3 to n1, starting at time 1.1 seconds + onoff.SetUdpRemote (i12.GetAddress (0), port); + apps = onoff.Build (c.Get (3)); + apps.Start (Seconds (1.1)); + apps.Stop (Seconds (10.0)); - // Also configure some tcpdump traces; each interface will be traced - // The output files will be named - // simple-point-to-point.pcap-- - // and can be read by the "tcpdump -r" command (use "-tt" option to - // display timestamps correctly) - PcapTrace pcaptrace ("simple-point-to-point-olsr.pcap"); - pcaptrace.TraceAllIp (); + // Create a packet sink to receive these packets + apps = sink.Build (c.Get (1)); + apps.Start (Seconds (1.1)); + apps.Stop (Seconds (10.0)); + + std::ofstream ascii; + ascii.open ("simple-point-to-point-olsr.tr"); + PointToPointHelper::EnablePcap ("simple-point-to-point-olsr.pcap"); + PointToPointHelper::EnableAscii (ascii); NS_LOG_INFO ("Run Simulation."); - Simulator::StopAt (Seconds (30)); Simulator::Run (); Simulator::Destroy (); NS_LOG_INFO ("Done."); + + return 0; } From 889e333a35e7aa317db6e39081acb144f6ab8871 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:09:46 -0700 Subject: [PATCH 11/31] add ns2's stupid prefix on each ascii line output. --- src/helper/wifi-helper.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helper/wifi-helper.cc b/src/helper/wifi-helper.cc index 275a96a75..aca4feffb 100644 --- a/src/helper/wifi-helper.cc +++ b/src/helper/wifi-helper.cc @@ -12,6 +12,7 @@ #include "ns3/wifi-mode.h" #include "ns3/wifi-preamble.h" #include "ns3/config.h" +#include "ns3/simulator.h" @@ -38,14 +39,14 @@ static void AsciiPhyTxEvent (std::ostream *os, std::string context, WifiMode mode, WifiPreamble preamble, uint8_t txLevel) { - *os << context << " " << *packet << std::endl; + *os << "+ " << Simulator::Now () << " " << context << " " << *packet << std::endl; } static void AsciiPhyRxOkEvent (std::ostream *os, std::string context, Ptr packet, double snr, WifiMode mode, enum WifiPreamble preamble) { - *os << context << " " << *packet << std::endl; + *os << "r " << Simulator::Now () << " " << context << " " << *packet << std::endl; } From d06c2b4faede1a19c972297c3f52ef0a132ffb34 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:23:07 -0700 Subject: [PATCH 12/31] add back max simulation time on olsr example --- examples/simple-point-to-point-olsr.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/simple-point-to-point-olsr.cc b/examples/simple-point-to-point-olsr.cc index f4717d7a2..71464b043 100644 --- a/examples/simple-point-to-point-olsr.cc +++ b/examples/simple-point-to-point-olsr.cc @@ -172,6 +172,8 @@ main (int argc, char *argv[]) PointToPointHelper::EnablePcap ("simple-point-to-point-olsr.pcap"); PointToPointHelper::EnableAscii (ascii); + Simulator::StopAt (Seconds (30)); + NS_LOG_INFO ("Run Simulation."); Simulator::Run (); Simulator::Destroy (); From 2b44913a70443ee73aebdf92aac7bd9e3a6ed700 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:34:06 -0700 Subject: [PATCH 13/31] convert to helper API --- tutorial/tutorial-point-to-point.cc | 77 +++++++++++++---------------- 1 file changed, 34 insertions(+), 43 deletions(-) diff --git a/tutorial/tutorial-point-to-point.cc b/tutorial/tutorial-point-to-point.cc index bfe5b4c4a..29695ee06 100644 --- a/tutorial/tutorial-point-to-point.cc +++ b/tutorial/tutorial-point-to-point.cc @@ -14,22 +14,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/point-to-point-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/point-to-point-topology.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" -#include "ns3/global-route-manager.h" -#include "ns3/inet-socket-address.h" -#include "ns3/uinteger.h" +#include + +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" NS_LOG_COMPONENT_DEFINE ("PointToPointSimulation"); @@ -49,38 +38,40 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Point to Point Topology Simulation"); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); + NodeContainer n; + n.Create (2); - Ptr link = PointToPointTopology::AddPointToPointLink ( - n0, n1, DataRate (38400), MilliSeconds (20)); + InternetStackHelper internet; + internet.Build (n); - PointToPointTopology::AddIpv4Addresses (link, n0, "10.1.1.1", - n1, "10.1.1.2"); + PointToPointHelper p2p; + p2p.SetChannelParameter ("BitRate", DataRate (38400)); + p2p.SetChannelParameter ("Delay", MilliSeconds (20)); + NetDeviceContainer nd = p2p.Build (n); + + Ipv4AddressHelper ipv4; + ipv4.SetBase ("10.1.1.0", "255.255.255.252"); + Ipv4InterfaceContainer i = ipv4.Allocate (nd); uint16_t port = 7; + UdpEchoClientHelper client; + client.SetRemote (i.GetAddress (1), port); + client.SetAppAttribute ("MaxPackets", Uinteger (1)); + client.SetAppAttribute ("Interval", Seconds (1.0)); + client.SetAppAttribute ("PacketSize", Uinteger (1024)); + ApplicationContainer apps = client.Build (n.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); + + UdpEchoServerHelper server; + server.SetPort (port); + apps = server.Build (n.Get (1)); + apps.Start (Seconds (1.0)); + apps.Stop (Seconds (10.0)); - Ptr client = - CreateObject ("RemoteIpv4", Ipv4Address ("10.1.1.2"), - "RemotePort", Uinteger (port), - "MaxPackets", Uinteger (1), - "Interval", Seconds(1.), - "PacketSize", Uinteger (1024)); - n0->AddApplication (client); - - Ptr server = - CreateObject ("Port", Uinteger (port)); - n1->AddApplication (server); - - server->Start(Seconds(1.)); - client->Start(Seconds(2.)); - - server->Stop (Seconds(10.)); - client->Stop (Seconds(10.)); - - AsciiTrace asciitrace ("tutorial.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); + std::ofstream ascii; + ascii.open ("tutorial.tr"); + PointToPointHelper::EnableAscii (ascii); Simulator::Run (); Simulator::Destroy (); From 41f6573c8d0ca71a5949e8dfe58f06c3722720ab Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:34:27 -0700 Subject: [PATCH 14/31] do not include internet-node.h --- src/routing/global-routing/global-router-interface.cc | 2 +- src/routing/olsr/olsr-agent-impl.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routing/global-routing/global-router-interface.cc b/src/routing/global-routing/global-router-interface.cc index 088865cfd..500aca863 100644 --- a/src/routing/global-routing/global-router-interface.cc +++ b/src/routing/global-routing/global-router-interface.cc @@ -22,7 +22,7 @@ #include "ns3/assert.h" #include "ns3/channel.h" #include "ns3/net-device.h" -#include "ns3/internet-node.h" +#include "ns3/node.h" #include "ns3/ipv4.h" #include "global-router-interface.h" diff --git a/src/routing/olsr/olsr-agent-impl.cc b/src/routing/olsr/olsr-agent-impl.cc index 4d79519ec..5b5d28e85 100644 --- a/src/routing/olsr/olsr-agent-impl.cc +++ b/src/routing/olsr/olsr-agent-impl.cc @@ -32,7 +32,6 @@ #include "olsr-agent-impl.h" #include "ns3/socket-factory.h" #include "ns3/udp.h" -#include "ns3/internet-node.h" #include "ns3/simulator.h" #include "ns3/log.h" #include "ns3/random-variable.h" From 6935a997e61eb6397ff00fbc7bf0abed09a9b844 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:34:38 -0700 Subject: [PATCH 15/31] do not use InternetNode --- src/internet-node/udp-socket.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/internet-node/udp-socket.cc b/src/internet-node/udp-socket.cc index e1da6bfec..fe86b455e 100644 --- a/src/internet-node/udp-socket.cc +++ b/src/internet-node/udp-socket.cc @@ -352,13 +352,13 @@ UdpSocket::ForwardUp (Ptr packet, Ipv4Address ipv4, uint16_t port) #ifdef RUN_SELF_TESTS #include "ns3/test.h" -#include "ns3/internet-node.h" #include "ns3/socket-factory.h" #include "ns3/udp.h" #include "ns3/simulator.h" #include "ns3/simple-channel.h" #include "ns3/simple-net-device.h" #include "ns3/drop-tail-queue.h" +#include "internet-stack.h" #include namespace ns3 { @@ -399,7 +399,8 @@ UdpSocketTest::RunTests (void) // Create topology // Receiver Node - Ptr rxNode = CreateObject (); + Ptr rxNode = CreateObject (); + AddInternetStack (rxNode); Ptr rxDev1, rxDev2; { // first interface rxDev1 = CreateObject (); @@ -424,7 +425,8 @@ UdpSocketTest::RunTests (void) } // Sender Node - Ptr txNode = CreateObject (); + Ptr txNode = CreateObject (); + AddInternetStack (txNode); Ptr txDev1; { txDev1 = CreateObject (); From 40349f92d824af1c178c24a6d6d398ddb5edfe79 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:36:15 -0700 Subject: [PATCH 16/31] do not include internet-node.h --- src/internet-node/internet-stack.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internet-node/internet-stack.cc b/src/internet-node/internet-stack.cc index b427243dd..542c3252d 100644 --- a/src/internet-node/internet-stack.cc +++ b/src/internet-node/internet-stack.cc @@ -21,9 +21,9 @@ #include "ns3/net-device.h" #include "ns3/callback.h" +#include "ns3/node.h" #include "ipv4-l4-demux.h" -#include "internet-node.h" #include "udp-l4-protocol.h" #include "tcp-l4-protocol.h" #include "ipv4-l3-protocol.h" From b41554c18f671b6ea6e50a0804e2b51a1ee8b962 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:36:21 -0700 Subject: [PATCH 17/31] kill dead code. --- src/devices/csma/csma-ipv4-topology.cc | 165 ------------ src/devices/csma/csma-ipv4-topology.h | 129 --------- src/devices/csma/csma-topology.cc | 102 ------- src/devices/csma/csma-topology.h | 123 --------- src/devices/csma/wscript | 4 - .../point-to-point/point-to-point-topology.cc | 252 ------------------ .../point-to-point/point-to-point-topology.h | 112 -------- src/devices/point-to-point/wscript | 2 - src/internet-node/internet-node.cc | 38 --- src/internet-node/internet-node.h | 65 ----- src/internet-node/wscript | 2 - 11 files changed, 994 deletions(-) delete mode 100644 src/devices/csma/csma-ipv4-topology.cc delete mode 100644 src/devices/csma/csma-ipv4-topology.h delete mode 100644 src/devices/csma/csma-topology.cc delete mode 100644 src/devices/csma/csma-topology.h delete mode 100644 src/devices/point-to-point/point-to-point-topology.cc delete mode 100644 src/devices/point-to-point/point-to-point-topology.h delete mode 100644 src/internet-node/internet-node.cc delete mode 100644 src/internet-node/internet-node.h diff --git a/src/devices/csma/csma-ipv4-topology.cc b/src/devices/csma/csma-ipv4-topology.cc deleted file mode 100644 index 1138c5334..000000000 --- a/src/devices/csma/csma-ipv4-topology.cc +++ /dev/null @@ -1,165 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -// -// Copyright (c) 2007 Emmanuelle Laprise -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: Emmanuelle Laprise -// - -#include -#include "ns3/assert.h" -#include "ns3/fatal-error.h" -#include "ns3/nstime.h" -#include "ns3/internet-node.h" -#include "ns3/ipv4-address.h" -#include "ns3/ipv4.h" -#include "ns3/queue.h" -#include "ns3/drop-tail-queue.h" -#include "ns3/string.h" - -#include "csma-channel.h" -#include "csma-net-device.h" -#include "csma-ipv4-topology.h" - -namespace ns3 { - -uint32_t -CsmaIpv4Topology::AddIpv4CsmaNetDevice( - Ptr node, - Ptr channel, - Mac48Address addr) -{ - Ptr q = CreateObject (); - - // assume full-duplex - Ptr nd = CreateObject ("Address", addr, - "EncapsulationMode", String ("IpArp")); - node->AddDevice (nd); - - nd->AddQueue(q); - nd->Attach (channel); - return nd->GetIfIndex (); -} - - -void -CsmaIpv4Topology::AddIpv4LlcCsmaNode(Ptr n1, - Ptr ch, - Mac48Address addr) -{ - Ptr q = CreateObject (); - - Ptr nd0 = CreateObject ("Address", addr, - "EncapsulationMode", String ("Llc")); - n1->AddDevice (nd0); - nd0->SetSendEnable (true); - nd0->SetReceiveEnable (false); - nd0->AddQueue(q); - nd0->Attach (ch); - - Ptr nd1 = CreateObject ("Address", addr, - "EncapsulationMode", String ("Llc")); - n1->AddDevice (nd1); - nd1->SetSendEnable (false); - nd1->SetReceiveEnable (true); - nd1->AddQueue(q); - nd1->Attach (ch); -} - -void -CsmaIpv4Topology::AddIpv4RawCsmaNode(Ptr n1, - Ptr ch, - Mac48Address addr) -{ - Ptr q = CreateObject (); - - Ptr nd0 = CreateObject ("Address", addr, - "EncapsulationMode", String ("Raw")); - n1->AddDevice (nd0); - nd0->SetSendEnable (true); - nd0->SetReceiveEnable (false); - nd0->AddQueue(q); - nd0->Attach (ch); - - Ptr nd1 = CreateObject ("Address", addr, - "EncapsulationMode", String ("Raw")); - n1->AddDevice (nd1); - nd1->SetSendEnable (false); - nd1->SetReceiveEnable (true); - - nd1->AddQueue(q); - nd1->Attach (ch); -} - -uint32_t -CsmaIpv4Topology::AddIpv4Address( - Ptr node, - uint32_t netDeviceNumber, - const Ipv4Address address, - const Ipv4Mask mask, - uint16_t metric) -{ - Ptr nd = node->GetDevice(netDeviceNumber); - - Ptr ipv4 = node->GetObject (); - uint32_t ifIndex = ipv4->AddInterface (nd); - - ipv4->SetAddress (ifIndex, address); - ipv4->SetNetworkMask (ifIndex, mask); - ipv4->SetMetric (ifIndex, metric); - ipv4->SetUp (ifIndex); - return ifIndex; -} - -void -CsmaIpv4Topology::AddIpv4Routes ( - Ptr nd1, Ptr nd2) -{ - // Assert that both are Ipv4 nodes - Ptr ip1 = nd1->GetNode ()->GetObject (); - Ptr ip2 = nd2->GetNode ()->GetObject (); - NS_ASSERT(ip1 != 0 && ip2 != 0); - - // Get interface indexes for both nodes corresponding to the right channel - uint32_t index1 = 0; - bool found = false; - for (uint32_t i = 0; i < ip1->GetNInterfaces (); i++) - { - if (ip1 ->GetNetDevice (i) == nd1) - { - index1 = i; - found = true; - } - } - NS_ASSERT (found); - - uint32_t index2 = 0; - found = false; - for (uint32_t i = 0; i < ip2->GetNInterfaces (); i++) - { - if (ip2 ->GetNetDevice (i) == nd2) - { - index2 = i; - found = true; - } - } - NS_ASSERT (found); - - ip1->AddHostRouteTo (ip2-> GetAddress (index2), index1); - ip2->AddHostRouteTo (ip1-> GetAddress (index1), index2); -} - -} // namespace ns3 - diff --git a/src/devices/csma/csma-ipv4-topology.h b/src/devices/csma/csma-ipv4-topology.h deleted file mode 100644 index 2da75ac66..000000000 --- a/src/devices/csma/csma-ipv4-topology.h +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -// -// Copyright (c) 2007 Emmanuelle Laprise -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: Emmanuelle Laprise -// - -#ifndef __CSMA_IPV4_TOPOLOGY_H__ -#define __CSMA_IPV4_TOPOLOGY_H__ - -#include "ns3/ptr.h" -#include "ns3/ipv4-address.h" -#include "ns3/ipv4.h" -#include "ns3/ipv4-route.h" -#include "ns3/internet-node.h" -#include "ns3/csma-net-device.h" - -// The topology class consists of only static methods thar are used to -// create the topology and data flows for an ns3 simulation - -namespace ns3 { - -class CsmaIpv4Channel; -class Node; -class IPAddr; -class DataRate; -class Queue; - -/** - * \brief A helper class to create Topologies based on the - * InternetNodes and CsmaChannels. Either the - * SimpleCsmaNetDevice or the LLCCsmaNetDevice can be used - * when constructing these topologies. - */ -class CsmaIpv4Topology { -public: - - /** - * \param node Node to be attached to the Csma channel - * \param channel CsmaChannel to which node n1 should be attached - * \param addr Mac address of the node - * - * Add a Csma node to a Csma channel. This function adds - * a EthernetCsmaNetDevice to the nodes so that they can - * connect to a CsmaChannel. This means that Ethernet headers - * and trailers will be added to the packet before sending out on - * the net device. - * - * \return ifIndex of the device - */ - static uint32_t AddIpv4CsmaNetDevice(Ptr node, - Ptr channel, - Mac48Address addr); - - /** - * \param n1 Node to be attached to the Csma channel - * \param ch CsmaChannel to which node n1 should be attached - * \param addr Mac address of the node - * - * Add a Csma node to a Csma channel. This function adds - * a RawCsmaNetDevice to the nodes so that they can connect - * to a CsmaChannel. - */ - static void AddIpv4RawCsmaNode( Ptr n1, - Ptr ch, - Mac48Address addr); - - /** - * \param n1 Node to be attached to the Csma channel - * \param ch CsmaChannel to which node n1 should be attached - * \param addr Mac address of the node - * - * Add a Csma node to a Csma channel. This function adds - * a LlcCsmaNetDevice to the nodes so that they can connect - * to a CsmaChannel. - */ - static void AddIpv4LlcCsmaNode( Ptr n1, - Ptr ch, - Mac48Address addr); - - - - /** - * \brief Create an Ipv4 interface for a net device and assign an - * Ipv4Address to that interface. - * - * \param node The node to which to add the new address and corresponding - * interface. - * \param netDeviceNumber The NetDevice index number with which to associate - * the address. - * \param address The Ipv4 Address for the interface. - * \param mask The network mask for the interface - * \param metric (optional) metric (cost) to assign for routing calculations - * - * Add an Ipv4Address to the Ipv4 interface associated with the - * ndNum CsmaIpv4NetDevices on the provided CsmaIpv4Channel - */ - static uint32_t AddIpv4Address(Ptr node, - uint32_t netDeviceNumber, - const Ipv4Address address, - const Ipv4Mask mask, - uint16_t metric = 1); - - /** - * \param nd1 Node - * \param nd2 Node - * - * Add an IPV4 host route between the two specified net devices - */ - static void AddIpv4Routes (Ptr nd1, Ptr nd2); -}; - -} // namespace ns3 - -#endif - diff --git a/src/devices/csma/csma-topology.cc b/src/devices/csma/csma-topology.cc deleted file mode 100644 index c03ef68a9..000000000 --- a/src/devices/csma/csma-topology.cc +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -// -// Copyright (c) 2007 Emmanuelle Laprise -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: Emmanuelle Laprise -// - -// -// Topology helper for Csma channels in ns3. - -#include "ns3/assert.h" -#include "ns3/queue.h" - -#include "csma-channel.h" -#include "csma-net-device.h" -#include "csma-topology.h" -#include "ns3/socket-factory.h" - -namespace ns3 { - -Ptr -CsmaTopology::CreateCsmaChannel( - const DataRate& bps, - const Time& delay) -{ - Ptr channel = CreateObject ("BitRate", bps, "Delay", delay); - - return channel; -} - -#if 0 -Ptr -CsmaTopology::AddCsmaEthernetNode( - Ptr n1, - Ptr ch, - Mac48Address addr) -{ - Ptr nd1 = CreateObject ("Address", addr, - "EncapsulationMode", "EthernetV1"); - - Ptr q = Queue::CreateDefault (); - nd1->AddQueue(q); - nd1->Attach (ch); - - return nd1; -} - -Ptr -CsmaTopology::ConnectPacketSocket(Ptr app, - Ptr ndSrc, - Ptr ndDest) -{ - Ptr socket = CreateObject (); - socket->Bind(ndSrc); - socket->Connect(ndDest->GetAddress()); - app->Connect(socket); - - return socket; -} - -Ptr -CsmaTopology::ConnectPacketSocket(Ptr app, - Ptr ndSrc, - MacAddress macAddr) -{ - Ptr socket = CreateObject (); - socket->Bind(ndSrc); - socket->Connect(macAddr); - app->Connect(socket); - - return socket; -} - -Ptr -CsmaTopology::CreatePacketSocket(Ptr n1, std::string tid_name) -{ - TypeId tid = TypeId::LookupByName (tid_name); - - Ptr socketFactory = - n1->GetObject (tid); - - Ptr socket = socketFactory->CreateSocket (); - - return socket; -} -#endif - -} // namespace ns3 - diff --git a/src/devices/csma/csma-topology.h b/src/devices/csma/csma-topology.h deleted file mode 100644 index e7e2fe065..000000000 --- a/src/devices/csma/csma-topology.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -// -// Copyright (c) 2007 Emmanuelle Laprise -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: Emmanuelle Laprise -// -// Topology helper for multipoint channels in ns3. -// -#ifndef CSMA_TOPOLOGY_H -#define CSMA_TOPOLOGY_H - -#include "ns3/ptr.h" -#include "ns3/csma-net-device.h" -#include "ns3/node.h" - -// The topology class consists of only static methods thar are used to -// create the topology and data flows for an ns3 simulation - -namespace ns3 { - -class CsmaChannel; -class Node; -class DataRate; -class Queue; - -/** - * \brief A helper class to create Csma Topologies - * - * Csma topologies are created based on the - * ns3::CsmaNetDevice subclasses and ns3::CsmaChannel - * objects. This class uses the EthernetNetDevice and - * PacketSocket classes in order to create logical connections between - * net devices. The PacketSocket class generates the data and the - * EthernetNetDevice class creates ethernet packets from the - * data, filling in source and destination addresses. The - * EthernetNetDevice class filters received data packets - * according to its destination Mac addresses. - */ -class CsmaTopology { -public: - /** - * \param dataRate Maximum transmission link rate - * \param delay propagation delay between any two nodes - * \return Pointer to the created CsmaChannel - * - * Create a CsmaChannel. All nodes connected to a multipoint - * channels will receive all packets written to that channel - */ - static Ptr CreateCsmaChannel( - const DataRate& dataRate, const Time& delay); - -#if 0 - /** - * \param n1 Node to be attached to the multipoint channel - * \param ch CsmaChannel to which node n1 should be attached - * \param addr MacAddress that should be assigned to the - * EthernetNetDevice that will be added to the node. - * - * Add a multipoint node to a multipoint channel - */ - static Ptr AddCsmaEthernetNode(Ptr n1, - Ptr ch, - MacAddress addr); - - /** - * \param app Application that will be sending data to the agent - * \param ndSrc Net Device that will be sending the packets onto the - * network - * \param ndDest Net Device to which ndSrc will be sending the packets - * \return A pointer to the PacketSocket - * - * Creates an PacketSocket and configure it to send packets between - * two net devices - */ -static Ptr ConnectPacketSocket(Ptr app, - Ptr ndSrc, - Ptr ndDest); - - /** - * \param app Application that will be sending data to the agent - * \param ndSrc Net Device that will be sending the packets onto the - * network - * \param macAddr Mac destination address for the packets send by - * the ndSrc net device \return a Pointer to the created - * PacketSocket - * - * Creates an PacketSocket and configure it to send packets from a - * net device to a destination MacAddress - */ -static Ptr ConnectPacketSocket(Ptr app, - Ptr ndSrc, - MacAddress macAddr); - - /** - * \param n1 Node from which socketfactory should be tested. - * \param tid_name Interface identifier ("ns3::PacketSocketFactory", in this case) - * - * This is a test function to make sure that a socket can be created - * by using the socketfactory interface provided in the - * netdevicenode. - */ -static Ptr CreatePacketSocket(Ptr n1, - std::string tid_name); -#endif - -}; -} // namespace ns3 - -#endif - diff --git a/src/devices/csma/wscript b/src/devices/csma/wscript index 60d8e6a8f..a90ac5bd3 100644 --- a/src/devices/csma/wscript +++ b/src/devices/csma/wscript @@ -6,8 +6,6 @@ def build(bld): 'backoff.cc', 'csma-net-device.cc', 'csma-channel.cc', - 'csma-topology.cc', - 'csma-ipv4-topology.cc', ] headers = bld.create_obj('ns3header') headers.module = 'csma' @@ -15,6 +13,4 @@ def build(bld): 'backoff.h', 'csma-net-device.h', 'csma-channel.h', - 'csma-topology.h', - 'csma-ipv4-topology.h', ] diff --git a/src/devices/point-to-point/point-to-point-topology.cc b/src/devices/point-to-point/point-to-point-topology.cc deleted file mode 100644 index 65aa1e649..000000000 --- a/src/devices/point-to-point/point-to-point-topology.cc +++ /dev/null @@ -1,252 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -// -// Copyright (c) 2006 Georgia Tech Research Corporation -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: George F. Riley -// - -// -// Topology helper for ns3. -// George F. Riley, Georgia Tech, Spring 2007 - -#include -#include "ns3/assert.h" -#include "ns3/log.h" -#include "ns3/fatal-error.h" -#include "ns3/nstime.h" -#include "ns3/internet-node.h" -#include "ns3/ipv4-address.h" -#include "ns3/ipv4.h" -#include "ns3/queue.h" -#include "ns3/drop-tail-queue.h" - -#include "point-to-point-channel.h" -#include "point-to-point-net-device.h" -#include "point-to-point-topology.h" - -namespace ns3 { - -Ptr -PointToPointTopology::AddPointToPointLink( - Ptr n1, - Ptr n2, - const DataRate& bps, - const Time& delay) -{ - Ptr channel = CreateObject ("BitRate", bps, "Delay", delay); - - Ptr net1 = CreateObject ("Address", Mac48Address::Allocate ()); - n1->AddDevice (net1); - - Ptr q = CreateObject (); - net1->AddQueue(q); - net1->Attach (channel); - - Ptr net2 = CreateObject ("Address", Mac48Address::Allocate ()); - n2->AddDevice (net2); - - q = CreateObject (); - net2->AddQueue(q); - net2->Attach (channel); - - return channel; -} - -Ptr -PointToPointTopology::GetNetDevice (Ptr n, Ptr chan) -{ - Ptr found = 0; - - // The PointToPoint channel is used to find the relevant NetDevice - NS_ASSERT (chan->GetNDevices () == 2); - Ptr nd1 = chan->GetPointToPointDevice (0); - Ptr nd2 = chan->GetPointToPointDevice (1); - if ( nd1->GetNode ()->GetId () == n->GetId () ) - { - found = nd1; - } - else if ( nd2->GetNode ()->GetId () == n->GetId () ) - { - found = nd2; - } - else - { - NS_ASSERT (found); - } - return found; -} - -void -PointToPointTopology::AddIpv4Addresses( - Ptr chan, - Ptr n1, const Ipv4Address& addr1, - Ptr n2, const Ipv4Address& addr2) -{ - - // Duplex link is assumed to be subnetted as a /30 - // May run this unnumbered in the future? - Ipv4Mask netmask("255.255.255.252"); - NS_ASSERT (netmask.IsMatch(addr1,addr2)); - - // The PointToPoint channel is used to find the relevant NetDevices - NS_ASSERT (chan->GetNDevices () == 2); - Ptr nd1 = chan->GetDevice (0); - Ptr nd2 = chan->GetDevice (1); - // Make sure that nd1 belongs to n1 and nd2 to n2 - if ( (nd1->GetNode ()->GetId () == n2->GetId () ) && - (nd2->GetNode ()->GetId () == n1->GetId () ) ) - { - std::swap(nd1, nd2); - } - NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ()); - NS_ASSERT (nd2->GetNode ()->GetId () == n2->GetId ()); - - Ptr ip1 = n1->GetObject (); - uint32_t index1 = ip1->AddInterface (nd1); - - ip1->SetAddress (index1, addr1); - ip1->SetNetworkMask (index1, netmask); - ip1->SetUp (index1); - - Ptr ip2 = n2->GetObject (); - uint32_t index2 = ip2->AddInterface (nd2); - - ip2->SetAddress (index2, addr2); - ip2->SetNetworkMask (index2, netmask); - ip2->SetUp (index2); - -} - -void -PointToPointTopology::SetIpv4Metric( - Ptr chan, - Ptr n1, Ptr n2, uint16_t metric) -{ - - // The PointToPoint channel is used to find the relevant NetDevices - NS_ASSERT (chan->GetNDevices () == 2); - Ptr nd1 = chan->GetDevice (0); - Ptr nd2 = chan->GetDevice (1); - // Make sure that nd1 belongs to n1 and nd2 to n2 - if ( (nd1->GetNode ()->GetId () == n2->GetId () ) && - (nd2->GetNode ()->GetId () == n1->GetId () ) ) - { - std::swap(nd1, nd2); - } - NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ()); - NS_ASSERT (nd2->GetNode ()->GetId () == n2->GetId ()); - - // The NetDevice ifIndex does not correspond to the - // ifIndex used by Ipv4. Therefore, we have to iterate - // through the NetDevices until we find the Ipv4 ifIndex - // that corresponds to NetDevice nd1 - // Get interface indexes for both nodes corresponding to the right channel - uint32_t index = 0; - bool found = false; - Ptr ip1 = n1->GetObject (); - for (uint32_t i = 0; i < ip1->GetNInterfaces (); i++) - { - if (ip1 ->GetNetDevice (i) == nd1) - { - index = i; - found = true; - } - } - NS_ASSERT(found); - ip1->SetMetric (index, metric); - - index = 0; - found = false; - Ptr ip2 = n2->GetObject (); - for (uint32_t i = 0; i < ip2->GetNInterfaces (); i++) - { - if (ip2 ->GetNetDevice (i) == nd2) - { - index = i; - found = true; - } - } - NS_ASSERT(found); - ip2->SetMetric (index, metric); -} - -void -PointToPointTopology::AddIpv4Routes ( - Ptr n1, Ptr n2, Ptr chan) -{ - // The PointToPoint channel is used to find the relevant NetDevices - NS_ASSERT (chan->GetNDevices () == 2); - Ptr nd1 = chan->GetDevice (0); - Ptr nd2 = chan->GetDevice (1); - - // Assert that n1 is the Node owning one of the two NetDevices - // and make sure that nd1 corresponds to it - if (nd1->GetNode ()->GetId () == n1->GetId ()) - { - ; // Do nothing - } - else if (nd2->GetNode ()->GetId () == n1->GetId ()) - { - std::swap(nd1, nd2); - } - else - { - NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel"); - } - - // Assert that n2 is the Node owning one of the two NetDevices - // and make sure that nd2 corresponds to it - if (nd2->GetNode ()->GetId () != n2->GetId ()) - { - NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel"); - } - - // Assert that both are Ipv4 nodes - Ptr ip1 = nd1->GetNode ()->GetObject (); - Ptr ip2 = nd2->GetNode ()->GetObject (); - NS_ASSERT(ip1 != 0 && ip2 != 0); - - // Get interface indexes for both nodes corresponding to the right channel - uint32_t index1 = 0; - bool found = false; - for (uint32_t i = 0; i < ip1->GetNInterfaces (); i++) - { - if (ip1 ->GetNetDevice (i) == nd1) - { - index1 = i; - found = true; - } - } - NS_ASSERT(found); - - uint32_t index2 = 0; - found = false; - for (uint32_t i = 0; i < ip2->GetNInterfaces (); i++) - { - if (ip2 ->GetNetDevice (i) == nd2) - { - index2 = i; - found = true; - } - } - NS_ASSERT(found); - - ip1->AddHostRouteTo (ip2-> GetAddress (index2), index1); - ip2->AddHostRouteTo (ip1-> GetAddress (index1), index2); -} - -} // namespace ns3 - diff --git a/src/devices/point-to-point/point-to-point-topology.h b/src/devices/point-to-point/point-to-point-topology.h deleted file mode 100644 index c5b364a0e..000000000 --- a/src/devices/point-to-point/point-to-point-topology.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -// -// Copyright (c) 2006 Georgia Tech Research Corporation -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: George F. Riley -// -// Topology helper for ns3. -// George F. Riley, Georgia Tech, Spring 2007 -#ifndef __POINT_TO_POINT_TOPOLOGY_H__ -#define __POINT_TO_POINT_TOPOLOGY_H__ - -#include "ns3/ptr.h" - -// The topology class consists of only static methods thar are used to -// create the topology and data flows for an ns3 simulation - -namespace ns3 { - -class PointToPointChannel; -class Node; -class IPAddr; -class DataRate; -class Queue; - -/** - * \brief A helper class to create Topologies based on the - * ns3::PointToPointNetDevice and ns3::PointToPointChannel objects. - */ -class PointToPointTopology { -public: - /** - * \param n1 Node - * \param n2 Node - * \param dataRate Maximum transmission link rate - * \param delay one-way propagation delay - * \return Pointer to the underlying PointToPointChannel - * - * Add a full-duplex point-to-point link between two nodes - * and attach PointToPointNetDevices to the resulting - * PointToPointChannel. - */ - static Ptr AddPointToPointLink( - Ptr n1, Ptr n2, const DataRate& dataRate, const Time& delay); - - /** - * \param n Node - * \param chan PointToPointChannel connected to node n - * \return Pointer to the corresponding PointToPointNetDevice - * - * Utility function to retrieve a PointToPointNetDevice pointer - * corresponding to the input parameters - */ - static Ptr GetNetDevice( - Ptr n, Ptr chan); - - /** - * \param chan PointToPointChannel to use - * \param n1 Node - * \param addr1 Ipv4 Address for n1 - * \param n2 Node - * \param addr2 Ipv4 Address for n2 - * - * Add Ipv4Addresses to the Ipv4 interfaces associated with the - * two PointToPointNetDevices on the provided PointToPointChannel - */ - static void AddIpv4Addresses( - Ptr chan, - Ptr n1, const Ipv4Address& addr1, - Ptr n2, const Ipv4Address& addr2); - - /** - * \param chan PointToPointChannel to use - * \param n1 Node - * \param n2 Node - * \param metric link metric to assign on Ipv4Link on chan between n1 and n2 - * - * Add a non-unit-cost link metric (bidirectionally) to the Ipv4 - * interfaces associated with the two PointToPointNetDevices on the - * provided PointToPointChannel - */ - static void SetIpv4Metric( - Ptr chan, - Ptr n1, Ptr n2, uint16_t metric); - - /** - * \param channel PointToPointChannel to use - * \param n1 Node - * \param n2 Node - * - * For the given PointToPointChannel, for each Node, add an - * IPv4 host route to the IPv4 address of the peer node. - */ - static void AddIpv4Routes (Ptr n1, Ptr n2, Ptr channel); -}; - -} // namespace ns3 - -#endif - diff --git a/src/devices/point-to-point/wscript b/src/devices/point-to-point/wscript index 7ca9c15df..d7ad3005b 100644 --- a/src/devices/point-to-point/wscript +++ b/src/devices/point-to-point/wscript @@ -6,7 +6,6 @@ def build(bld): module.source = [ 'point-to-point-net-device.cc', 'point-to-point-channel.cc', - 'point-to-point-topology.cc', 'point-to-point-test.cc', ] headers = bld.create_obj('ns3header') @@ -14,6 +13,5 @@ def build(bld): headers.source = [ 'point-to-point-net-device.h', 'point-to-point-channel.h', - 'point-to-point-topology.h', ] diff --git a/src/internet-node/internet-node.cc b/src/internet-node/internet-node.cc deleted file mode 100644 index 02b296065..000000000 --- a/src/internet-node/internet-node.cc +++ /dev/null @@ -1,38 +0,0 @@ -// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- -// -// Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: George F. Riley -// -// Implementation of the InternetNode class for ns3. -// George F. Riley, Georgia Tech, Fall 2006 - -#include "ns3/net-device.h" -#include "ns3/callback.h" -#include "internet-node.h" -#include "internet-stack.h" - - -namespace ns3 { - -InternetNode::InternetNode() -{ - AddInternetStack (this); -} - - -}//namespace ns3 diff --git a/src/internet-node/internet-node.h b/src/internet-node/internet-node.h deleted file mode 100644 index 85ca02a84..000000000 --- a/src/internet-node/internet-node.h +++ /dev/null @@ -1,65 +0,0 @@ -// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- -// -// Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation; -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Author: George F. Riley -// -// Define a basic "Internet" node, with a protocol stack (l3 and l4), -// network device list, process list, and routing. - -#ifndef INTERNET_NODE_H -#define INTERNET_NODE_H - -#include -#include - -#include "ns3/node.h" - -namespace ns3 { - -/** - * \ingroup internetNode - * - * \section InternetNode Overview - * - * The InternetNode module contains an implementation of TCP, UDP, and - * IPv4. ns-3 Applications sit above this module, and ns-3 NetDevices - * sit below it... - * - * InternetNode is implemented as a subclass of Node but this may be - * refactored in the future to - */ - -/* - * \brief Container class for various TCP/IP objects and interfaces - * aggregated to a Node. - * - * This class exists primarily to assemble the layer-3/4 stack of a Node - * from constituent parts, including implementations of TCP, IPv4, UDP, - * and ARP. It provides only constructors and destructors as its public - * API. Internally, the various protocols are instantiated, aggregated - * to a Node, and plumbed together. - */ -class InternetNode : public Node -{ -public: - InternetNode(); -}; - -}//namespace ns3 - -#endif /* INTERNET_NODE_H */ diff --git a/src/internet-node/wscript b/src/internet-node/wscript index c48d3910d..2d03561ff 100644 --- a/src/internet-node/wscript +++ b/src/internet-node/wscript @@ -4,7 +4,6 @@ def build(bld): obj = bld.create_ns3_module('internet-node', ['node']) obj.source = [ - 'internet-node.cc', 'internet-stack.cc', 'ipv4-l4-demux.cc', 'ipv4-l4-protocol.cc', @@ -39,7 +38,6 @@ def build(bld): headers = bld.create_obj('ns3header') headers.module = 'internet-node' headers.source = [ - 'internet-node.h', 'internet-stack.h', 'ascii-trace.h', 'pcap-trace.h', From 2c1c5afe9172ac858d8e1efafb41d482feaac09f Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:43:38 -0700 Subject: [PATCH 18/31] get rid of channel during dispose --- src/node/simple-net-device.cc | 8 ++++++++ src/node/simple-net-device.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/node/simple-net-device.cc b/src/node/simple-net-device.cc index 43d57b643..82fda974d 100644 --- a/src/node/simple-net-device.cc +++ b/src/node/simple-net-device.cc @@ -153,6 +153,14 @@ SimpleNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb) m_rxCallback = cb; } +void +SimpleNetDevice::DoDispose (void) +{ + m_channel = 0; + m_node = 0; + NetDevice::DoDispose (); +} + } // namespace ns3 diff --git a/src/node/simple-net-device.h b/src/node/simple-net-device.h index 76f3d6b82..ddb85694a 100644 --- a/src/node/simple-net-device.h +++ b/src/node/simple-net-device.h @@ -44,6 +44,8 @@ public: virtual bool NeedsArp (void) const; virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); +protected: + virtual void DoDispose (void); private: Ptr m_channel; NetDevice::ReceiveCallback m_rxCallback; From ae4529b819133e960803e6792c455fb0906c1842 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:44:13 -0700 Subject: [PATCH 19/31] fix typo --- src/node/simple-net-device.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node/simple-net-device.h b/src/node/simple-net-device.h index ddb85694a..85e63b1d1 100644 --- a/src/node/simple-net-device.h +++ b/src/node/simple-net-device.h @@ -1,5 +1,5 @@ -#ifndef TEST_NET_DEVICE_H -#define TEST_NET_DEVICE_H +#ifndef SIMPLE_NET_DEVICE_H +#define SIMPLE_NET_DEVICE_H #include "net-device.h" #include "mac48-address.h" @@ -58,4 +58,4 @@ private: } // namespace ns3 -#endif /* TEST_NET_DEVICE_H */ +#endif /* SIMPLE_NET_DEVICE_H */ From 812fc3be7552629341f2822818a379af0a9cc72b Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:50:25 -0700 Subject: [PATCH 20/31] add missing license headers --- src/helper/application-container.cc | 20 ++++++++++++++++++++ src/helper/application-container.h | 20 ++++++++++++++++++++ src/helper/csma-helper.cc | 20 ++++++++++++++++++++ src/helper/csma-helper.h | 20 ++++++++++++++++++++ src/helper/internet-stack-helper.cc | 20 ++++++++++++++++++++ src/helper/internet-stack-helper.h | 20 ++++++++++++++++++++ src/helper/mobility-helper.cc | 20 ++++++++++++++++++++ src/helper/mobility-helper.h | 20 ++++++++++++++++++++ src/helper/net-device-container.cc | 20 ++++++++++++++++++++ src/helper/net-device-container.h | 20 ++++++++++++++++++++ src/helper/node-container.cc | 20 ++++++++++++++++++++ src/helper/node-container.h | 20 ++++++++++++++++++++ src/helper/olsr-helper.cc | 20 ++++++++++++++++++++ src/helper/olsr-helper.h | 20 ++++++++++++++++++++ src/helper/on-off-helper.cc | 20 ++++++++++++++++++++ src/helper/on-off-helper.h | 20 ++++++++++++++++++++ src/helper/packet-sink-helper.cc | 20 ++++++++++++++++++++ src/helper/packet-sink-helper.h | 20 ++++++++++++++++++++ src/helper/point-to-point-helper.cc | 20 ++++++++++++++++++++ src/helper/point-to-point-helper.h | 20 ++++++++++++++++++++ src/helper/static-multicast-route-helper.cc | 19 +++++++++++++++++++ src/helper/static-multicast-route-helper.h | 19 +++++++++++++++++++ src/helper/udp-echo-helper.cc | 20 ++++++++++++++++++++ src/helper/udp-echo-helper.h | 20 ++++++++++++++++++++ src/helper/wifi-helper.cc | 20 ++++++++++++++++++++ src/helper/wifi-helper.h | 20 ++++++++++++++++++++ src/node/simple-net-device.cc | 20 ++++++++++++++++++++ src/node/simple-net-device.h | 20 ++++++++++++++++++++ 28 files changed, 558 insertions(+) diff --git a/src/helper/application-container.cc b/src/helper/application-container.cc index e96d35977..2a7f439f6 100644 --- a/src/helper/application-container.cc +++ b/src/helper/application-container.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "application-container.h" namespace ns3 { diff --git a/src/helper/application-container.h b/src/helper/application-container.h index 64195f969..7dbb9da68 100644 --- a/src/helper/application-container.h +++ b/src/helper/application-container.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef APPLICATION_CONTAINER_H #define APPLICATION_CONTAINER_H diff --git a/src/helper/csma-helper.cc b/src/helper/csma-helper.cc index 8da9b1722..78563c0d8 100644 --- a/src/helper/csma-helper.cc +++ b/src/helper/csma-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "csma-helper.h" #include "ns3/simulator.h" #include "ns3/object-factory.h" diff --git a/src/helper/csma-helper.h b/src/helper/csma-helper.h index 94c94261c..dd35f7dce 100644 --- a/src/helper/csma-helper.h +++ b/src/helper/csma-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef CSMA_HELPER_H #define CSMA_HELPER_H diff --git a/src/helper/internet-stack-helper.cc b/src/helper/internet-stack-helper.cc index 34c999ddd..c501f9d81 100644 --- a/src/helper/internet-stack-helper.cc +++ b/src/helper/internet-stack-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "internet-stack-helper.h" #include "ns3/internet-stack.h" #include "ns3/packet-socket-factory.h" diff --git a/src/helper/internet-stack-helper.h b/src/helper/internet-stack-helper.h index f5a16b72e..ad75c493d 100644 --- a/src/helper/internet-stack-helper.h +++ b/src/helper/internet-stack-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef INTERNET_STACK_HELPER_H #define INTERNET_STACK_HELPER_H diff --git a/src/helper/mobility-helper.cc b/src/helper/mobility-helper.cc index 221d92d0f..cf6f74c81 100644 --- a/src/helper/mobility-helper.cc +++ b/src/helper/mobility-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "ns3/mobility-helper.h" #include "ns3/mobility-model.h" #include "ns3/mobility-model-notifier.h" diff --git a/src/helper/mobility-helper.h b/src/helper/mobility-helper.h index b0242c8f8..0d26e67d7 100644 --- a/src/helper/mobility-helper.h +++ b/src/helper/mobility-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef MOBILITY_HELPER_H #define MOBILITY_HELPER_H diff --git a/src/helper/net-device-container.cc b/src/helper/net-device-container.cc index 65509960c..297cc0bb9 100644 --- a/src/helper/net-device-container.cc +++ b/src/helper/net-device-container.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "net-device-container.h" namespace ns3 { diff --git a/src/helper/net-device-container.h b/src/helper/net-device-container.h index cf9a690aa..a07434a40 100644 --- a/src/helper/net-device-container.h +++ b/src/helper/net-device-container.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef NET_DEVICE_CONTAINER_H #define NET_DEVICE_CONTAINER_H diff --git a/src/helper/node-container.cc b/src/helper/node-container.cc index 601c649a0..dbaaf0348 100644 --- a/src/helper/node-container.cc +++ b/src/helper/node-container.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "node-container.h" #include "ns3/node-list.h" diff --git a/src/helper/node-container.h b/src/helper/node-container.h index 9f3321c03..5124daa79 100644 --- a/src/helper/node-container.h +++ b/src/helper/node-container.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef NODE_CONTAINER_H #define NODE_CONTAINER_H diff --git a/src/helper/olsr-helper.cc b/src/helper/olsr-helper.cc index f27cb08c7..98bafabb1 100644 --- a/src/helper/olsr-helper.cc +++ b/src/helper/olsr-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "olsr-helper.h" #include "ns3/olsr-agent.h" #include "ns3/node-list.h" diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index 80df120af..9d1f99aac 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef OLSR_HELPER_H #define OLSR_HELPER_H diff --git a/src/helper/on-off-helper.cc b/src/helper/on-off-helper.cc index 38848a90c..3a94f03a1 100644 --- a/src/helper/on-off-helper.cc +++ b/src/helper/on-off-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "on-off-helper.h" #include "ns3/inet-socket-address.h" #include "ns3/packet-socket-address.h" diff --git a/src/helper/on-off-helper.h b/src/helper/on-off-helper.h index 7720d7468..73a4fc0c7 100644 --- a/src/helper/on-off-helper.h +++ b/src/helper/on-off-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef ON_OFF_HELPER_H #define ON_OFF_HELPER_H diff --git a/src/helper/packet-sink-helper.cc b/src/helper/packet-sink-helper.cc index 659b8f664..4e1d340a0 100644 --- a/src/helper/packet-sink-helper.cc +++ b/src/helper/packet-sink-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "packet-sink-helper.h" #include "ns3/string.h" #include "ns3/inet-socket-address.h" diff --git a/src/helper/packet-sink-helper.h b/src/helper/packet-sink-helper.h index a295674fb..7f8b1eafc 100644 --- a/src/helper/packet-sink-helper.h +++ b/src/helper/packet-sink-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef PACKET_SINK_HELPER_H #define PACKET_SINK_HELPER_H diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index ff85d689f..53ee7fcbb 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "point-to-point-helper.h" #include "ns3/simulator.h" #include "ns3/point-to-point-net-device.h" diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index b3268a3c7..2bc5fedba 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef POINT_TO_POINT_HELPER_H #define POINT_TO_POINT_HELPER_H diff --git a/src/helper/static-multicast-route-helper.cc b/src/helper/static-multicast-route-helper.cc index 0b63b6204..316fc6c3c 100644 --- a/src/helper/static-multicast-route-helper.cc +++ b/src/helper/static-multicast-route-helper.cc @@ -1,3 +1,22 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 University of Washington + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Tom Henderson + */ #include #include "ns3/ptr.h" diff --git a/src/helper/static-multicast-route-helper.h b/src/helper/static-multicast-route-helper.h index dc27b894b..05d5e3b65 100644 --- a/src/helper/static-multicast-route-helper.h +++ b/src/helper/static-multicast-route-helper.h @@ -1,3 +1,22 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 University of Washington + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Tom Henderson + */ #ifndef STATIC_MULTICAST_ROUTE_HELPER_H #define STATIC_MULTICAST_ROUTE_HELPER_H diff --git a/src/helper/udp-echo-helper.cc b/src/helper/udp-echo-helper.cc index d30a647b0..e375b74d8 100644 --- a/src/helper/udp-echo-helper.cc +++ b/src/helper/udp-echo-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "udp-echo-helper.h" #include "ns3/udp-echo-server.h" #include "ns3/udp-echo-client.h" diff --git a/src/helper/udp-echo-helper.h b/src/helper/udp-echo-helper.h index 70ece7b4f..da88ab07f 100644 --- a/src/helper/udp-echo-helper.h +++ b/src/helper/udp-echo-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef UDP_ECHO_HELPER_H #define UDP_ECHO_HELPER_H diff --git a/src/helper/wifi-helper.cc b/src/helper/wifi-helper.cc index aca4feffb..3125f9bb6 100644 --- a/src/helper/wifi-helper.cc +++ b/src/helper/wifi-helper.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "wifi-helper.h" #include "ns3/wifi-net-device.h" #include "ns3/wifi-mac.h" diff --git a/src/helper/wifi-helper.h b/src/helper/wifi-helper.h index 61a374a20..de766e643 100644 --- a/src/helper/wifi-helper.h +++ b/src/helper/wifi-helper.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef WIFI_HELPER_H #define WIFI_HELPER_H diff --git a/src/node/simple-net-device.cc b/src/node/simple-net-device.cc index 82fda974d..540beb844 100644 --- a/src/node/simple-net-device.cc +++ b/src/node/simple-net-device.cc @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #include "simple-net-device.h" #include "simple-channel.h" #include "node.h" diff --git a/src/node/simple-net-device.h b/src/node/simple-net-device.h index 85e63b1d1..fbd3e66e4 100644 --- a/src/node/simple-net-device.h +++ b/src/node/simple-net-device.h @@ -1,3 +1,23 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ #ifndef SIMPLE_NET_DEVICE_H #define SIMPLE_NET_DEVICE_H From d1d683ee21f52267f015d803d89922c4ad04a553 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:56:41 -0700 Subject: [PATCH 21/31] remove 'All rigts reserved' keyword per tom's suggestion --- samples/main-packet-printer.cc | 1 - samples/main-tw.cc | 1 - src/common/data-rate.cc | 1 - src/common/data-rate.h | 1 - src/common/data-writer.cc | 1 - src/common/data-writer.h | 1 - src/common/header.h | 1 - src/common/packet-metadata.h | 1 - src/common/packet.cc | 1 - src/common/packet.h | 1 - src/common/pcap-writer.cc | 1 - src/common/pcap-writer.h | 1 - src/common/tag-registry.cc | 1 - src/common/tag-registry.h | 1 - src/common/tag.h | 1 - src/common/tags.cc | 1 - src/common/tags.h | 1 - src/common/trailer.h | 1 - src/core/assert.h | 1 - src/core/attribute-list.cc | 1 - src/core/attribute-list.h | 1 - src/core/breakpoint.cc | 1 - src/core/breakpoint.h | 1 - src/core/callback-test.cc | 1 - src/core/callback.h | 1 - src/core/fatal-error.h | 1 - src/core/ptr.cc | 1 - src/core/ptr.h | 1 - src/core/singleton.h | 1 - src/core/system-wall-clock-ms.h | 1 - src/core/test.cc | 1 - src/core/test.h | 1 - src/core/traced-callback.cc | 1 - src/core/traced-callback.h | 1 - src/core/type-id.cc | 1 - src/core/type-id.h | 1 - src/core/uid-manager.cc | 1 - src/core/uid-manager.h | 1 - src/core/unix-system-wall-clock-ms.cc | 1 - src/core/win32-system-wall-clock-ms.cc | 1 - src/devices/csma/backoff.cc | 1 - src/devices/csma/csma-channel.cc | 1 - src/devices/csma/csma-net-device.cc | 1 - src/devices/point-to-point/point-to-point-channel.cc | 1 - src/devices/point-to-point/point-to-point-net-device.cc | 1 - src/devices/wifi/wifi-trace.cc | 1 - src/devices/wifi/wifi-trace.h | 1 - src/helper/application-container.cc | 1 - src/helper/application-container.h | 1 - src/helper/csma-helper.cc | 1 - src/helper/csma-helper.h | 1 - src/helper/internet-stack-helper.cc | 1 - src/helper/internet-stack-helper.h | 1 - src/helper/mobility-helper.cc | 1 - src/helper/mobility-helper.h | 1 - src/helper/net-device-container.cc | 1 - src/helper/net-device-container.h | 1 - src/helper/node-container.cc | 1 - src/helper/node-container.h | 1 - src/helper/ns2-mobility-helper.cc | 1 - src/helper/ns2-mobility-helper.h | 1 - src/helper/olsr-helper.cc | 1 - src/helper/olsr-helper.h | 1 - src/helper/on-off-helper.cc | 1 - src/helper/on-off-helper.h | 1 - src/helper/packet-sink-helper.cc | 1 - src/helper/packet-sink-helper.h | 1 - src/helper/point-to-point-helper.cc | 1 - src/helper/point-to-point-helper.h | 1 - src/helper/udp-echo-helper.cc | 1 - src/helper/udp-echo-helper.h | 1 - src/helper/wifi-helper.cc | 1 - src/helper/wifi-helper.h | 1 - src/internet-node/arp-cache.cc | 1 - src/internet-node/arp-cache.h | 1 - src/internet-node/arp-header.cc | 1 - src/internet-node/arp-header.h | 1 - src/internet-node/arp-ipv4-interface.cc | 1 - src/internet-node/arp-ipv4-interface.h | 1 - src/internet-node/arp-l3-protocol.cc | 1 - src/internet-node/arp-l3-protocol.h | 1 - src/internet-node/ascii-trace.cc | 1 - src/internet-node/ascii-trace.h | 1 - src/internet-node/internet-stack.cc | 1 - src/internet-node/internet-stack.h | 1 - src/internet-node/ipv4-checksum.cc | 1 - src/internet-node/ipv4-checksum.h | 1 - src/internet-node/ipv4-end-point-demux.cc | 1 - src/internet-node/ipv4-end-point-demux.h | 1 - src/internet-node/ipv4-end-point.cc | 1 - src/internet-node/ipv4-end-point.h | 1 - src/internet-node/ipv4-header.cc | 1 - src/internet-node/ipv4-header.h | 1 - src/internet-node/ipv4-impl.cc | 1 - src/internet-node/ipv4-impl.h | 1 - src/internet-node/ipv4-interface.cc | 1 - src/internet-node/ipv4-interface.h | 1 - src/internet-node/ipv4-l3-protocol.cc | 1 - src/internet-node/ipv4-l3-protocol.h | 1 - src/internet-node/ipv4-l4-demux.cc | 1 - src/internet-node/ipv4-l4-demux.h | 1 - src/internet-node/ipv4-l4-protocol.cc | 1 - src/internet-node/ipv4-l4-protocol.h | 1 - src/internet-node/ipv4-loopback-interface.cc | 1 - src/internet-node/ipv4-loopback-interface.h | 1 - src/internet-node/ipv4-static-routing.cc | 1 - src/internet-node/ipv4-static-routing.h | 1 - src/internet-node/pcap-trace.cc | 1 - src/internet-node/pcap-trace.h | 1 - src/internet-node/pending-data.cc | 1 - src/internet-node/pending-data.h | 1 - src/internet-node/sequence-number.cc | 1 - src/internet-node/sequence-number.h | 1 - src/internet-node/udp-header.cc | 1 - src/internet-node/udp-header.h | 1 - src/internet-node/udp-impl.cc | 1 - src/internet-node/udp-impl.h | 1 - src/internet-node/udp-l4-protocol.cc | 1 - src/internet-node/udp-l4-protocol.h | 1 - src/internet-node/udp-socket.cc | 1 - src/internet-node/udp-socket.h | 1 - src/mobility/random-direction-2d-mobility-model.cc | 1 - src/mobility/random-direction-2d-mobility-model.h | 1 - src/mobility/random-walk-2d-mobility-model.cc | 1 - src/mobility/random-walk-2d-mobility-model.h | 1 - src/mobility/random-waypoint-mobility-model.h | 1 - src/node/address-utils.cc | 1 - src/node/address-utils.h | 1 - src/node/drop-tail-queue.cc | 1 - src/node/drop-tail-queue.h | 1 - src/node/ethernet-header.cc | 1 - src/node/ethernet-header.h | 1 - src/node/ethernet-trailer.cc | 1 - src/node/ethernet-trailer.h | 1 - src/node/inet-socket-address.cc | 1 - src/node/inet-socket-address.h | 1 - src/node/ipv4-address.cc | 1 - src/node/ipv4-address.h | 1 - src/node/ipv4-route.cc | 1 - src/node/ipv4-route.h | 1 - src/node/ipv4.cc | 1 - src/node/ipv4.h | 1 - src/node/llc-snap-header.cc | 1 - src/node/llc-snap-header.h | 1 - src/node/net-device.cc | 1 - src/node/net-device.h | 1 - src/node/node-list.cc | 1 - src/node/node-list.h | 1 - src/node/packet-socket-factory.cc | 1 - src/node/packet-socket-factory.h | 1 - src/node/queue.cc | 1 - src/node/queue.h | 1 - src/node/simple-net-device.cc | 1 - src/node/simple-net-device.h | 1 - src/node/socket-factory.cc | 1 - src/node/socket-factory.h | 1 - src/node/udp.cc | 1 - src/node/udp.h | 1 - utils/bench-packets.cc | 1 - utils/bench-simulator.cc | 1 - utils/mobility-generator.cc | 1 - utils/replay-simulation.cc | 1 - utils/run-tests.cc | 1 - 163 files changed, 163 deletions(-) diff --git a/samples/main-packet-printer.cc b/samples/main-packet-printer.cc index f056e523b..c1bc488d7 100644 --- a/samples/main-packet-printer.cc +++ b/samples/main-packet-printer.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/samples/main-tw.cc b/samples/main-tw.cc index 4fcb8b94b..1167dcb67 100644 --- a/samples/main-tw.cc +++ b/samples/main-tw.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 University of Washington - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/data-rate.cc b/src/common/data-rate.cc index eda2ac454..e7727dda0 100644 --- a/src/common/data-rate.cc +++ b/src/common/data-rate.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/common/data-rate.h b/src/common/data-rate.h index e55a0b64a..595565bf1 100644 --- a/src/common/data-rate.h +++ b/src/common/data-rate.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/common/data-writer.cc b/src/common/data-writer.cc index 40b0cad68..fc4d0b13f 100644 --- a/src/common/data-writer.cc +++ b/src/common/data-writer.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/data-writer.h b/src/common/data-writer.h index ee9b1f8b3..28496c489 100644 --- a/src/common/data-writer.h +++ b/src/common/data-writer.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/header.h b/src/common/header.h index af4e14e04..42e0bc9aa 100644 --- a/src/common/header.h +++ b/src/common/header.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/packet-metadata.h b/src/common/packet-metadata.h index 5ba229853..80a5402f4 100644 --- a/src/common/packet-metadata.h +++ b/src/common/packet-metadata.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/packet.cc b/src/common/packet.cc index 95bc61e9d..0ad8fb508 100644 --- a/src/common/packet.cc +++ b/src/common/packet.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/packet.h b/src/common/packet.h index 629d7cf2c..6d6d3f8d6 100644 --- a/src/common/packet.h +++ b/src/common/packet.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/pcap-writer.cc b/src/common/pcap-writer.cc index 7e35b3bee..991675441 100644 --- a/src/common/pcap-writer.cc +++ b/src/common/pcap-writer.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/pcap-writer.h b/src/common/pcap-writer.h index 69a62352a..87ba8c2c2 100644 --- a/src/common/pcap-writer.h +++ b/src/common/pcap-writer.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/tag-registry.cc b/src/common/tag-registry.cc index 93778a9f7..01ae31fbc 100644 --- a/src/common/tag-registry.cc +++ b/src/common/tag-registry.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/tag-registry.h b/src/common/tag-registry.h index 47cb29128..52d16f281 100644 --- a/src/common/tag-registry.h +++ b/src/common/tag-registry.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/tag.h b/src/common/tag.h index f85e797ab..b07f78206 100644 --- a/src/common/tag.h +++ b/src/common/tag.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/tags.cc b/src/common/tags.cc index fe7e5befc..a719417a4 100644 --- a/src/common/tags.cc +++ b/src/common/tags.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/tags.h b/src/common/tags.h index f901117b5..a88b6a6e0 100644 --- a/src/common/tags.h +++ b/src/common/tags.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/common/trailer.h b/src/common/trailer.h index 59342945d..e3771605b 100644 --- a/src/common/trailer.h +++ b/src/common/trailer.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/assert.h b/src/core/assert.h index 155d2ed6f..54c460549 100644 --- a/src/core/assert.h +++ b/src/core/assert.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/attribute-list.cc b/src/core/attribute-list.cc index 50b96b4ab..c32ad4d91 100644 --- a/src/core/attribute-list.cc +++ b/src/core/attribute-list.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/attribute-list.h b/src/core/attribute-list.h index 98b1d71a3..3531c5ed3 100644 --- a/src/core/attribute-list.h +++ b/src/core/attribute-list.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/breakpoint.cc b/src/core/breakpoint.cc index 35eab171e..521628cab 100644 --- a/src/core/breakpoint.cc +++ b/src/core/breakpoint.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006,2007 INRIA, INESC Porto - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/breakpoint.h b/src/core/breakpoint.h index c2f541ad8..32b343d98 100644 --- a/src/core/breakpoint.h +++ b/src/core/breakpoint.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006,2007 INESC Porto, INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/callback-test.cc b/src/core/callback-test.cc index 5493eab29..776bdf41f 100644 --- a/src/core/callback-test.cc +++ b/src/core/callback-test.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/callback.h b/src/core/callback.h index 8fd6d7ef6..40afbd1a6 100644 --- a/src/core/callback.h +++ b/src/core/callback.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/fatal-error.h b/src/core/fatal-error.h index cbef1f671..9b72b77f0 100644 --- a/src/core/fatal-error.h +++ b/src/core/fatal-error.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/ptr.cc b/src/core/ptr.cc index 3474d40ca..3c852821a 100644 --- a/src/core/ptr.cc +++ b/src/core/ptr.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/ptr.h b/src/core/ptr.h index a0b3fa202..ea0f67aca 100644 --- a/src/core/ptr.h +++ b/src/core/ptr.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/singleton.h b/src/core/singleton.h index b221161e7..722d93a62 100644 --- a/src/core/singleton.h +++ b/src/core/singleton.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/system-wall-clock-ms.h b/src/core/system-wall-clock-ms.h index 47564c10f..0c512d3ad 100644 --- a/src/core/system-wall-clock-ms.h +++ b/src/core/system-wall-clock-ms.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/test.cc b/src/core/test.cc index 8c8e2b120..6f0a7a7dd 100644 --- a/src/core/test.cc +++ b/src/core/test.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/test.h b/src/core/test.h index 809c44f0d..e28196af0 100644 --- a/src/core/test.h +++ b/src/core/test.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/traced-callback.cc b/src/core/traced-callback.cc index 7f9fa3833..b85e50827 100644 --- a/src/core/traced-callback.cc +++ b/src/core/traced-callback.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/traced-callback.h b/src/core/traced-callback.h index 0967ee9fa..5357625c6 100644 --- a/src/core/traced-callback.h +++ b/src/core/traced-callback.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/type-id.cc b/src/core/type-id.cc index dc23275a2..819b8ec97 100644 --- a/src/core/type-id.cc +++ b/src/core/type-id.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/type-id.h b/src/core/type-id.h index cd284813a..159479168 100644 --- a/src/core/type-id.h +++ b/src/core/type-id.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/uid-manager.cc b/src/core/uid-manager.cc index 364ab769c..494845b4b 100644 --- a/src/core/uid-manager.cc +++ b/src/core/uid-manager.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/uid-manager.h b/src/core/uid-manager.h index e4648e31a..bc4b47ddc 100644 --- a/src/core/uid-manager.h +++ b/src/core/uid-manager.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/unix-system-wall-clock-ms.cc b/src/core/unix-system-wall-clock-ms.cc index 09f342074..14f1fbb5b 100644 --- a/src/core/unix-system-wall-clock-ms.cc +++ b/src/core/unix-system-wall-clock-ms.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/core/win32-system-wall-clock-ms.cc b/src/core/win32-system-wall-clock-ms.cc index 8043d2589..1cc9fc2c5 100644 --- a/src/core/win32-system-wall-clock-ms.cc +++ b/src/core/win32-system-wall-clock-ms.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/csma/backoff.cc b/src/devices/csma/backoff.cc index 8f6dd1ee0..e01355efa 100644 --- a/src/devices/csma/backoff.cc +++ b/src/devices/csma/backoff.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007, Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/csma/csma-channel.cc b/src/devices/csma/csma-channel.cc index e4da61d49..c381f36a1 100644 --- a/src/devices/csma/csma-channel.cc +++ b/src/devices/csma/csma-channel.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/csma/csma-net-device.cc b/src/devices/csma/csma-net-device.cc index b5ca25279..8553dc618 100644 --- a/src/devices/csma/csma-net-device.cc +++ b/src/devices/csma/csma-net-device.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/point-to-point/point-to-point-channel.cc b/src/devices/point-to-point/point-to-point-channel.cc index 9503ae11a..5a055000d 100644 --- a/src/devices/point-to-point/point-to-point-channel.cc +++ b/src/devices/point-to-point/point-to-point-channel.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 University of Washington - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/point-to-point/point-to-point-net-device.cc b/src/devices/point-to-point/point-to-point-net-device.cc index d52a01381..49bbd8551 100644 --- a/src/devices/point-to-point/point-to-point-net-device.cc +++ b/src/devices/point-to-point/point-to-point-net-device.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/wifi/wifi-trace.cc b/src/devices/wifi/wifi-trace.cc index c51312992..7a03784e1 100644 --- a/src/devices/wifi/wifi-trace.cc +++ b/src/devices/wifi/wifi-trace.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/devices/wifi/wifi-trace.h b/src/devices/wifi/wifi-trace.h index a043b4386..ee9a3626e 100644 --- a/src/devices/wifi/wifi-trace.h +++ b/src/devices/wifi/wifi-trace.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/application-container.cc b/src/helper/application-container.cc index 2a7f439f6..0d4d86432 100644 --- a/src/helper/application-container.cc +++ b/src/helper/application-container.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/application-container.h b/src/helper/application-container.h index 7dbb9da68..2fc14db76 100644 --- a/src/helper/application-container.h +++ b/src/helper/application-container.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/csma-helper.cc b/src/helper/csma-helper.cc index 78563c0d8..95f28face 100644 --- a/src/helper/csma-helper.cc +++ b/src/helper/csma-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/csma-helper.h b/src/helper/csma-helper.h index dd35f7dce..f3707e036 100644 --- a/src/helper/csma-helper.h +++ b/src/helper/csma-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/internet-stack-helper.cc b/src/helper/internet-stack-helper.cc index c501f9d81..1003dceba 100644 --- a/src/helper/internet-stack-helper.cc +++ b/src/helper/internet-stack-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/internet-stack-helper.h b/src/helper/internet-stack-helper.h index ad75c493d..828d11879 100644 --- a/src/helper/internet-stack-helper.h +++ b/src/helper/internet-stack-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/mobility-helper.cc b/src/helper/mobility-helper.cc index cf6f74c81..e2d3b758e 100644 --- a/src/helper/mobility-helper.cc +++ b/src/helper/mobility-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/mobility-helper.h b/src/helper/mobility-helper.h index 0d26e67d7..420742ff9 100644 --- a/src/helper/mobility-helper.h +++ b/src/helper/mobility-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/net-device-container.cc b/src/helper/net-device-container.cc index 297cc0bb9..e2a963e84 100644 --- a/src/helper/net-device-container.cc +++ b/src/helper/net-device-container.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/net-device-container.h b/src/helper/net-device-container.h index a07434a40..477da54a6 100644 --- a/src/helper/net-device-container.h +++ b/src/helper/net-device-container.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/node-container.cc b/src/helper/node-container.cc index dbaaf0348..f26c9cba6 100644 --- a/src/helper/node-container.cc +++ b/src/helper/node-container.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/node-container.h b/src/helper/node-container.h index 5124daa79..6d5ba31b9 100644 --- a/src/helper/node-container.h +++ b/src/helper/node-container.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/ns2-mobility-helper.cc b/src/helper/ns2-mobility-helper.cc index 704fb2897..761dfaae0 100644 --- a/src/helper/ns2-mobility-helper.cc +++ b/src/helper/ns2-mobility-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/ns2-mobility-helper.h b/src/helper/ns2-mobility-helper.h index 5270ed4b4..b75a3221a 100644 --- a/src/helper/ns2-mobility-helper.h +++ b/src/helper/ns2-mobility-helper.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/olsr-helper.cc b/src/helper/olsr-helper.cc index 98bafabb1..4032f387c 100644 --- a/src/helper/olsr-helper.cc +++ b/src/helper/olsr-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index 9d1f99aac..4afb6cd9a 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/on-off-helper.cc b/src/helper/on-off-helper.cc index 3a94f03a1..60a842a59 100644 --- a/src/helper/on-off-helper.cc +++ b/src/helper/on-off-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/on-off-helper.h b/src/helper/on-off-helper.h index 73a4fc0c7..cc5b5517f 100644 --- a/src/helper/on-off-helper.h +++ b/src/helper/on-off-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/packet-sink-helper.cc b/src/helper/packet-sink-helper.cc index 4e1d340a0..6bdf884d7 100644 --- a/src/helper/packet-sink-helper.cc +++ b/src/helper/packet-sink-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/packet-sink-helper.h b/src/helper/packet-sink-helper.h index 7f8b1eafc..8343a9b18 100644 --- a/src/helper/packet-sink-helper.h +++ b/src/helper/packet-sink-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index 53ee7fcbb..4a2902cc5 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index 2bc5fedba..aa892f371 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/udp-echo-helper.cc b/src/helper/udp-echo-helper.cc index e375b74d8..ec030d0fb 100644 --- a/src/helper/udp-echo-helper.cc +++ b/src/helper/udp-echo-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/udp-echo-helper.h b/src/helper/udp-echo-helper.h index da88ab07f..aa3ca90d9 100644 --- a/src/helper/udp-echo-helper.h +++ b/src/helper/udp-echo-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/wifi-helper.cc b/src/helper/wifi-helper.cc index 3125f9bb6..8fd048dd7 100644 --- a/src/helper/wifi-helper.cc +++ b/src/helper/wifi-helper.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/helper/wifi-helper.h b/src/helper/wifi-helper.h index de766e643..a7dc4170e 100644 --- a/src/helper/wifi-helper.h +++ b/src/helper/wifi-helper.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-cache.cc b/src/internet-node/arp-cache.cc index 4ab94a2d3..3d3694336 100644 --- a/src/internet-node/arp-cache.cc +++ b/src/internet-node/arp-cache.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-cache.h b/src/internet-node/arp-cache.h index 1ae92db5e..021761820 100644 --- a/src/internet-node/arp-cache.h +++ b/src/internet-node/arp-cache.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-header.cc b/src/internet-node/arp-header.cc index 5bf781c24..073de046f 100644 --- a/src/internet-node/arp-header.cc +++ b/src/internet-node/arp-header.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-header.h b/src/internet-node/arp-header.h index 96b368b0b..cb6167d67 100644 --- a/src/internet-node/arp-header.h +++ b/src/internet-node/arp-header.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-ipv4-interface.cc b/src/internet-node/arp-ipv4-interface.cc index c40ad37fa..bd52d676d 100644 --- a/src/internet-node/arp-ipv4-interface.cc +++ b/src/internet-node/arp-ipv4-interface.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-ipv4-interface.h b/src/internet-node/arp-ipv4-interface.h index 35a503cfe..8f7f080d9 100644 --- a/src/internet-node/arp-ipv4-interface.h +++ b/src/internet-node/arp-ipv4-interface.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-l3-protocol.cc b/src/internet-node/arp-l3-protocol.cc index b1ee3c691..6dc017623 100644 --- a/src/internet-node/arp-l3-protocol.cc +++ b/src/internet-node/arp-l3-protocol.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/arp-l3-protocol.h b/src/internet-node/arp-l3-protocol.h index 8b7d91847..889966255 100644 --- a/src/internet-node/arp-l3-protocol.h +++ b/src/internet-node/arp-l3-protocol.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ascii-trace.cc b/src/internet-node/ascii-trace.cc index 85fe6f82b..10c8fbc5f 100644 --- a/src/internet-node/ascii-trace.cc +++ b/src/internet-node/ascii-trace.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ascii-trace.h b/src/internet-node/ascii-trace.h index 18b436cd6..05c505947 100644 --- a/src/internet-node/ascii-trace.h +++ b/src/internet-node/ascii-trace.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/internet-stack.cc b/src/internet-node/internet-stack.cc index 542c3252d..916f436ac 100644 --- a/src/internet-node/internet-stack.cc +++ b/src/internet-node/internet-stack.cc @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/internet-stack.h b/src/internet-node/internet-stack.h index e5d8c9191..9997d862f 100644 --- a/src/internet-node/internet-stack.h +++ b/src/internet-node/internet-stack.h @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-checksum.cc b/src/internet-node/ipv4-checksum.cc index 6e832ecf0..5e93b4a7d 100644 --- a/src/internet-node/ipv4-checksum.cc +++ b/src/internet-node/ipv4-checksum.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-checksum.h b/src/internet-node/ipv4-checksum.h index 613549271..98bbed5c2 100644 --- a/src/internet-node/ipv4-checksum.h +++ b/src/internet-node/ipv4-checksum.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-end-point-demux.cc b/src/internet-node/ipv4-end-point-demux.cc index a06b02369..9c305ccf2 100644 --- a/src/internet-node/ipv4-end-point-demux.cc +++ b/src/internet-node/ipv4-end-point-demux.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-end-point-demux.h b/src/internet-node/ipv4-end-point-demux.h index 5ffff86bd..271325164 100644 --- a/src/internet-node/ipv4-end-point-demux.h +++ b/src/internet-node/ipv4-end-point-demux.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-end-point.cc b/src/internet-node/ipv4-end-point.cc index 50abdb7ae..18b7d9930 100644 --- a/src/internet-node/ipv4-end-point.cc +++ b/src/internet-node/ipv4-end-point.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-end-point.h b/src/internet-node/ipv4-end-point.h index eac324c86..35f0f04bc 100644 --- a/src/internet-node/ipv4-end-point.h +++ b/src/internet-node/ipv4-end-point.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-header.cc b/src/internet-node/ipv4-header.cc index 916ef4fba..01690b785 100644 --- a/src/internet-node/ipv4-header.cc +++ b/src/internet-node/ipv4-header.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-header.h b/src/internet-node/ipv4-header.h index 6ea749046..29fd7e9c3 100644 --- a/src/internet-node/ipv4-header.h +++ b/src/internet-node/ipv4-header.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-impl.cc b/src/internet-node/ipv4-impl.cc index 587bd4d3c..3fd0884a5 100644 --- a/src/internet-node/ipv4-impl.cc +++ b/src/internet-node/ipv4-impl.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-impl.h b/src/internet-node/ipv4-impl.h index 8685458fb..094884caf 100644 --- a/src/internet-node/ipv4-impl.h +++ b/src/internet-node/ipv4-impl.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-interface.cc b/src/internet-node/ipv4-interface.cc index 11cd674df..aead13ad0 100644 --- a/src/internet-node/ipv4-interface.cc +++ b/src/internet-node/ipv4-interface.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-interface.h b/src/internet-node/ipv4-interface.h index d02afb23b..b802ea1e4 100644 --- a/src/internet-node/ipv4-interface.h +++ b/src/internet-node/ipv4-interface.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-l3-protocol.cc b/src/internet-node/ipv4-l3-protocol.cc index 6c3147a84..105995369 100644 --- a/src/internet-node/ipv4-l3-protocol.cc +++ b/src/internet-node/ipv4-l3-protocol.cc @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-l3-protocol.h b/src/internet-node/ipv4-l3-protocol.h index a85120edf..b869d1f2d 100644 --- a/src/internet-node/ipv4-l3-protocol.h +++ b/src/internet-node/ipv4-l3-protocol.h @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-l4-demux.cc b/src/internet-node/ipv4-l4-demux.cc index 510f520f3..693cbbd59 100644 --- a/src/internet-node/ipv4-l4-demux.cc +++ b/src/internet-node/ipv4-l4-demux.cc @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-l4-demux.h b/src/internet-node/ipv4-l4-demux.h index b92a9b758..02b5df900 100644 --- a/src/internet-node/ipv4-l4-demux.h +++ b/src/internet-node/ipv4-l4-demux.h @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-l4-protocol.cc b/src/internet-node/ipv4-l4-protocol.cc index 518fd09a1..d3d6b0036 100644 --- a/src/internet-node/ipv4-l4-protocol.cc +++ b/src/internet-node/ipv4-l4-protocol.cc @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-l4-protocol.h b/src/internet-node/ipv4-l4-protocol.h index 67f25d156..e8e0b12be 100644 --- a/src/internet-node/ipv4-l4-protocol.h +++ b/src/internet-node/ipv4-l4-protocol.h @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-loopback-interface.cc b/src/internet-node/ipv4-loopback-interface.cc index d26baaef1..b97dd7923 100644 --- a/src/internet-node/ipv4-loopback-interface.cc +++ b/src/internet-node/ipv4-loopback-interface.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-loopback-interface.h b/src/internet-node/ipv4-loopback-interface.h index 318527e0e..098de027b 100644 --- a/src/internet-node/ipv4-loopback-interface.h +++ b/src/internet-node/ipv4-loopback-interface.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-static-routing.cc b/src/internet-node/ipv4-static-routing.cc index ab9626ced..454fe950e 100644 --- a/src/internet-node/ipv4-static-routing.cc +++ b/src/internet-node/ipv4-static-routing.cc @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/ipv4-static-routing.h b/src/internet-node/ipv4-static-routing.h index 19980f4ed..a3b10c049 100644 --- a/src/internet-node/ipv4-static-routing.h +++ b/src/internet-node/ipv4-static-routing.h @@ -1,7 +1,6 @@ // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/pcap-trace.cc b/src/internet-node/pcap-trace.cc index 181882a00..f5d712df2 100644 --- a/src/internet-node/pcap-trace.cc +++ b/src/internet-node/pcap-trace.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/pcap-trace.h b/src/internet-node/pcap-trace.h index 39ad89fc6..3ab644684 100644 --- a/src/internet-node/pcap-trace.h +++ b/src/internet-node/pcap-trace.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/pending-data.cc b/src/internet-node/pending-data.cc index 1c7fa1b8c..650c9c6c8 100644 --- a/src/internet-node/pending-data.cc +++ b/src/internet-node/pending-data.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/pending-data.h b/src/internet-node/pending-data.h index 51cc59f3a..fc7ccc621 100644 --- a/src/internet-node/pending-data.h +++ b/src/internet-node/pending-data.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/sequence-number.cc b/src/internet-node/sequence-number.cc index 9d24e4dd0..26316f013 100644 --- a/src/internet-node/sequence-number.cc +++ b/src/internet-node/sequence-number.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/sequence-number.h b/src/internet-node/sequence-number.h index 81f635816..bca46e7a3 100644 --- a/src/internet-node/sequence-number.h +++ b/src/internet-node/sequence-number.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // // Copyright (c) 2006 Georgia Tech Research Corporation -// All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-header.cc b/src/internet-node/udp-header.cc index 08a2962a0..df3cae153 100644 --- a/src/internet-node/udp-header.cc +++ b/src/internet-node/udp-header.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-header.h b/src/internet-node/udp-header.h index c0e5a023e..140684986 100644 --- a/src/internet-node/udp-header.h +++ b/src/internet-node/udp-header.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-impl.cc b/src/internet-node/udp-impl.cc index 385093572..9de5259e5 100644 --- a/src/internet-node/udp-impl.cc +++ b/src/internet-node/udp-impl.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-impl.h b/src/internet-node/udp-impl.h index d9f0a8acf..114edfdbb 100644 --- a/src/internet-node/udp-impl.h +++ b/src/internet-node/udp-impl.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-l4-protocol.cc b/src/internet-node/udp-l4-protocol.cc index 8f7a64555..2259cd632 100644 --- a/src/internet-node/udp-l4-protocol.cc +++ b/src/internet-node/udp-l4-protocol.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-l4-protocol.h b/src/internet-node/udp-l4-protocol.h index 99b659db9..34f686ffc 100644 --- a/src/internet-node/udp-l4-protocol.h +++ b/src/internet-node/udp-l4-protocol.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-socket.cc b/src/internet-node/udp-socket.cc index fe86b455e..383870c34 100644 --- a/src/internet-node/udp-socket.cc +++ b/src/internet-node/udp-socket.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/internet-node/udp-socket.h b/src/internet-node/udp-socket.h index 00c99c7cd..0b662926e 100644 --- a/src/internet-node/udp-socket.h +++ b/src/internet-node/udp-socket.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/mobility/random-direction-2d-mobility-model.cc b/src/mobility/random-direction-2d-mobility-model.cc index ad9633bc6..d49bd7a62 100644 --- a/src/mobility/random-direction-2d-mobility-model.cc +++ b/src/mobility/random-direction-2d-mobility-model.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/mobility/random-direction-2d-mobility-model.h b/src/mobility/random-direction-2d-mobility-model.h index 161e842c2..8c8621ace 100644 --- a/src/mobility/random-direction-2d-mobility-model.h +++ b/src/mobility/random-direction-2d-mobility-model.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/mobility/random-walk-2d-mobility-model.cc b/src/mobility/random-walk-2d-mobility-model.cc index 274b8b101..41ea8d654 100644 --- a/src/mobility/random-walk-2d-mobility-model.cc +++ b/src/mobility/random-walk-2d-mobility-model.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/mobility/random-walk-2d-mobility-model.h b/src/mobility/random-walk-2d-mobility-model.h index c28f13ccd..42948a15c 100644 --- a/src/mobility/random-walk-2d-mobility-model.h +++ b/src/mobility/random-walk-2d-mobility-model.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006,2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/mobility/random-waypoint-mobility-model.h b/src/mobility/random-waypoint-mobility-model.h index 66d50cd53..b6a5de1f4 100644 --- a/src/mobility/random-waypoint-mobility-model.h +++ b/src/mobility/random-waypoint-mobility-model.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/address-utils.cc b/src/node/address-utils.cc index da436e4cd..8a63dae20 100644 --- a/src/node/address-utils.cc +++ b/src/node/address-utils.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/address-utils.h b/src/node/address-utils.h index db9f08064..6b15c9947 100644 --- a/src/node/address-utils.h +++ b/src/node/address-utils.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/drop-tail-queue.cc b/src/node/drop-tail-queue.cc index 85bcf0009..0002e2339 100644 --- a/src/node/drop-tail-queue.cc +++ b/src/node/drop-tail-queue.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 University of Washington - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/drop-tail-queue.h b/src/node/drop-tail-queue.h index 9fef02e1d..4905a25af 100644 --- a/src/node/drop-tail-queue.h +++ b/src/node/drop-tail-queue.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 University of Washington - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ethernet-header.cc b/src/node/ethernet-header.cc index ef9c40956..f1f46d27f 100644 --- a/src/node/ethernet-header.cc +++ b/src/node/ethernet-header.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ethernet-header.h b/src/node/ethernet-header.h index 8434a3fca..a006205f0 100644 --- a/src/node/ethernet-header.h +++ b/src/node/ethernet-header.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ethernet-trailer.cc b/src/node/ethernet-trailer.cc index a2cb27583..d6ce8ddcf 100644 --- a/src/node/ethernet-trailer.cc +++ b/src/node/ethernet-trailer.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ethernet-trailer.h b/src/node/ethernet-trailer.h index 5a21523b0..6e9eb77bc 100644 --- a/src/node/ethernet-trailer.h +++ b/src/node/ethernet-trailer.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/inet-socket-address.cc b/src/node/inet-socket-address.cc index d4b7453a9..4b0665496 100644 --- a/src/node/inet-socket-address.cc +++ b/src/node/inet-socket-address.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/inet-socket-address.h b/src/node/inet-socket-address.h index d6727342f..35a5cc83c 100644 --- a/src/node/inet-socket-address.h +++ b/src/node/inet-socket-address.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ipv4-address.cc b/src/node/ipv4-address.cc index 9b76ab3c9..64ab763fb 100644 --- a/src/node/ipv4-address.cc +++ b/src/node/ipv4-address.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ipv4-address.h b/src/node/ipv4-address.h index 8b00c5414..669f8904a 100644 --- a/src/node/ipv4-address.h +++ b/src/node/ipv4-address.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ipv4-route.cc b/src/node/ipv4-route.cc index 1c56c972e..001039060 100644 --- a/src/node/ipv4-route.cc +++ b/src/node/ipv4-route.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ipv4-route.h b/src/node/ipv4-route.h index 933e3534e..f0badc2a0 100644 --- a/src/node/ipv4-route.h +++ b/src/node/ipv4-route.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ipv4.cc b/src/node/ipv4.cc index d30c1b5de..6bc054c9e 100644 --- a/src/node/ipv4.cc +++ b/src/node/ipv4.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/ipv4.h b/src/node/ipv4.h index 27ac209fd..461c297d9 100644 --- a/src/node/ipv4.h +++ b/src/node/ipv4.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/llc-snap-header.cc b/src/node/llc-snap-header.cc index 7b079d158..28c116d81 100644 --- a/src/node/llc-snap-header.cc +++ b/src/node/llc-snap-header.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/llc-snap-header.h b/src/node/llc-snap-header.h index 1d70d4740..f5cec7ebe 100644 --- a/src/node/llc-snap-header.h +++ b/src/node/llc-snap-header.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/net-device.cc b/src/node/net-device.cc index dee14b84e..410cc3f49 100644 --- a/src/node/net-device.cc +++ b/src/node/net-device.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/net-device.h b/src/node/net-device.h index e29c11750..ef6dc69d8 100644 --- a/src/node/net-device.h +++ b/src/node/net-device.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/node-list.cc b/src/node/node-list.cc index 7d9ba0771..0c76d3799 100644 --- a/src/node/node-list.cc +++ b/src/node/node-list.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/node-list.h b/src/node/node-list.h index 873a29951..85395b414 100644 --- a/src/node/node-list.h +++ b/src/node/node-list.h @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/packet-socket-factory.cc b/src/node/packet-socket-factory.cc index 8bc3cbb1c..409654cfe 100644 --- a/src/node/packet-socket-factory.cc +++ b/src/node/packet-socket-factory.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/packet-socket-factory.h b/src/node/packet-socket-factory.h index df6ea9fbc..e33a4bdb4 100644 --- a/src/node/packet-socket-factory.h +++ b/src/node/packet-socket-factory.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 Emmanuelle Laprise - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/queue.cc b/src/node/queue.cc index bb7dc16b4..5b1852d8b 100644 --- a/src/node/queue.cc +++ b/src/node/queue.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 University of Washington - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/queue.h b/src/node/queue.h index 56c14bd56..5603245c4 100644 --- a/src/node/queue.h +++ b/src/node/queue.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 University of Washington - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/simple-net-device.cc b/src/node/simple-net-device.cc index 540beb844..50e4c3611 100644 --- a/src/node/simple-net-device.cc +++ b/src/node/simple-net-device.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/simple-net-device.h b/src/node/simple-net-device.h index fbd3e66e4..84a255002 100644 --- a/src/node/simple-net-device.h +++ b/src/node/simple-net-device.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/socket-factory.cc b/src/node/socket-factory.cc index 5ff15aacc..8cb24401c 100644 --- a/src/node/socket-factory.cc +++ b/src/node/socket-factory.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/socket-factory.h b/src/node/socket-factory.h index 106b8b53f..6062760ce 100644 --- a/src/node/socket-factory.h +++ b/src/node/socket-factory.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/udp.cc b/src/node/udp.cc index 4f9a6959b..989dd95f8 100644 --- a/src/node/udp.cc +++ b/src/node/udp.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/src/node/udp.h b/src/node/udp.h index 630db0f79..a539eb94a 100644 --- a/src/node/udp.h +++ b/src/node/udp.h @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/utils/bench-packets.cc b/utils/bench-packets.cc index 099882085..348454829 100644 --- a/utils/bench-packets.cc +++ b/utils/bench-packets.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/utils/bench-simulator.cc b/utils/bench-simulator.cc index 92b3ee742..2bfdd686f 100644 --- a/utils/bench-simulator.cc +++ b/utils/bench-simulator.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/utils/mobility-generator.cc b/utils/mobility-generator.cc index 7cb62c2bf..3d1651b49 100644 --- a/utils/mobility-generator.cc +++ b/utils/mobility-generator.cc @@ -1,7 +1,6 @@ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2007 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/utils/replay-simulation.cc b/utils/replay-simulation.cc index 04daa0d64..00fb6d1d3 100644 --- a/utils/replay-simulation.cc +++ b/utils/replay-simulation.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2006 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/utils/run-tests.cc b/utils/run-tests.cc index ce3b38c00..150e73c31 100644 --- a/utils/run-tests.cc +++ b/utils/run-tests.cc @@ -1,7 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005 INRIA - * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as From 27d2380327a5ef5ddac5b500abf519cedf0a9fdd Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 14:57:30 -0700 Subject: [PATCH 22/31] remove unused code. --- tutorial/energy-model.cc | 132 --------------------------------------- tutorial/energy-model.h | 62 ------------------ tutorial/energy.cc | 124 ------------------------------------ 3 files changed, 318 deletions(-) delete mode 100644 tutorial/energy-model.cc delete mode 100644 tutorial/energy-model.h delete mode 100644 tutorial/energy.cc diff --git a/tutorial/energy-model.cc b/tutorial/energy-model.cc deleted file mode 100644 index 3f8629bf1..000000000 --- a/tutorial/energy-model.cc +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 University of Washington - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "ns3/log.h" -#include "energy-model.h" - -NS_LOG_COMPONENT_DEFINE("EnergyModel"); - -namespace ns3 { - -// -// Some dimensional analysis ... -// -// 1 [watt] = 1 [joule] / [second] -// 1 [watt] = 1 [volt] * 1 [amp] -// 1 [amp] = 1 [coulomb] / 1 [second] -// 1 [watt-second] = 1 [joule] / [second] * [second] = 1 [joule] -// -// A watt has dimensions of energy per second. A watt-second has dimensions -// of energy. -// -// 1 [amp-hour] = 1 [coulomb] / 1 [second] * 1 [hour] -// 1 [amp-hour] = 1 [coulomb] / 1 [second] * 3600 [seconds] -// 1 [amp-hour] = 3600 [amp-seconds] -// 1 [watt-second] = 1 [amp-seconds] * 1 [volt] -// -// To get the energy capacity of your battery in watt-seconds from its -// amp-hour rating, multiply by 3600 and then the voltage. For example, your -// Alkaline AAA battery may be rated at 1.5 volts and 900 milli-amp-hours; -// so the energy capacity will be .9 * 3600 * 1.5 = 4860 watt-seconds. -// -// In a very simple battery model, we'll take this naively to mean that this -// battery can supply one watt continuously for 4860 seconds and then will die -// instantaneously. -// -// We'll assume our transmitter is measured in watts. When it is turned on -// it draws some amount of power, 100 milliwatts for example. If it transmits -// for one second, it will suck up .1 watt-seconds of our precious energy. -// - -const InterfaceId EnergyModel::iid = - MakeInterfaceId ("EnergyModel", Object::iid); - - -EnergyModel::EnergyModel ( - double ampHours, - double volts, - double idlePower, - double receivePower, - double transmitPower) -: - m_capacity (ampHours * 3600. * volts), - m_idlePower (idlePower), - m_receivePower (receivePower), - m_transmitPower (transmitPower), - m_totalTransmitPower (0.), - m_totalReceivePower (0.) -{ - NS_LOG_FUNCTION; - SetInterfaceId (EnergyModel::iid); -} - -EnergyModel::~EnergyModel () -{ - NS_LOG_FUNCTION; -} - - double -EnergyModel::GetCapacity (Time t) -{ - NS_LOG_FUNCTION; - double c = m_capacity - m_idlePower * t.GetSeconds (); - return c >= 0. ? c : 0.; -} - - double -EnergyModel::GetTotalIdlePower (Time t) -{ - NS_LOG_FUNCTION; - return m_idlePower * t.GetSeconds (); -} - - double -EnergyModel::GetTotalReceivePower (void) -{ - NS_LOG_FUNCTION; - return m_totalReceivePower; -} - - double -EnergyModel::GetTotalTransmitPower (void) -{ - NS_LOG_FUNCTION; - return m_totalTransmitPower; -} - - bool -EnergyModel::DrawTransmitPower (Time t) -{ - NS_LOG_FUNCTION; - double power = m_transmitPower * t.GetSeconds (); - m_totalTransmitPower += power; - m_capacity -= power; - return m_capacity - m_idlePower * t.GetSeconds () >= 0. ? true : false; -} - - bool -EnergyModel::DrawReceivePower (Time t) -{ - NS_LOG_FUNCTION; - double power = m_receivePower * t.GetSeconds (); - m_totalReceivePower += power; - m_capacity -= power; - return m_capacity - m_idlePower * t.GetSeconds () >= 0. ? true : false; -} - -}; // namespace ns3 diff --git a/tutorial/energy-model.h b/tutorial/energy-model.h deleted file mode 100644 index 3ef2fd44a..000000000 --- a/tutorial/energy-model.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 University of Washington - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef ENERGY_MODEL_H -#define ENERGY_MODEL_H - -#include "ns3/object.h" -#include "ns3/ptr.h" -#include "ns3/nstime.h" - -namespace ns3 { - -class EnergyModel : public Object -{ -public: - static const InterfaceId iid; - - EnergyModel ( - double ampHours, - double volts, - double idlePower, - double receivePower, - double transmitPower); - - virtual ~EnergyModel (); - - double GetCapacity (Time t); - - double GetTotalIdlePower (Time t); - double GetTotalTransmitPower (void); - double GetTotalReceivePower (void); - - bool DrawTransmitPower (Time t); - bool DrawReceivePower (Time t); - -private: - double m_capacity; - double m_idlePower; - double m_receivePower; - double m_transmitPower; - double m_totalTransmitPower; - double m_totalReceivePower; -}; - -}; // namespace ns3 - -#endif /* ENERGY_MODEL_H */ diff --git a/tutorial/energy.cc b/tutorial/energy.cc deleted file mode 100644 index 6604131be..000000000 --- a/tutorial/energy.cc +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "ns3/log.h" -#include "ns3/ptr.h" -#include "ns3/internet-node.h" -#include "ns3/point-to-point-channel.h" -#include "ns3/mac48-address.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/point-to-point-topology.h" -#include "ns3/udp-echo-client.h" -#include "ns3/udp-echo-server.h" -#include "ns3/simulator.h" -#include "ns3/nstime.h" -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" -#include "ns3/global-route-manager.h" - -#include "energy-model.h" - -NS_LOG_COMPONENT_DEFINE ("EnergyModelInterfaceExample"); - -using namespace ns3; - -// Network topology -// -// point to point -// +--------------+ -// | | -// n0 n1 -// -int -main (int argc, char *argv[]) -{ - LogComponentEnable ("EnergyModelInterfaceExample", LOG_LEVEL_ALL); - // LogComponentEnable ("EnergyModel", LOG_LEVEL_ALL); - - NS_LOG_INFO ("Energy Model Interface Example"); - - NS_LOG_INFO ("Creating Nodes"); - Ptr n0 = CreateObject (); - Ptr n1 = CreateObject (); - - NS_LOG_INFO ("Creating Channel"); - Ptr link = PointToPointTopology::AddPointToPointLink ( - n0, n1, DataRate (38400), MilliSeconds (20)); - - PointToPointTopology::AddIpv4Addresses (link, n0, "10.1.1.1", - n1, "10.1.1.2"); - - NS_LOG_INFO ("Creating Applications"); - uint16_t port = 7; - - Ptr client = CreateObject (n0, "10.1.1.2", - port, 1, Seconds(1.), 1024); - - Ptr server = CreateObject (n1, port); - - server->Start(Seconds(1.)); - client->Start(Seconds(2.)); - - server->Stop (Seconds(10.)); - client->Stop (Seconds(10.)); - - NS_LOG_INFO ("Initializing Tracing"); - AsciiTrace asciitrace ("energy.tr"); - asciitrace.TraceAllQueues (); - asciitrace.TraceAllNetDeviceRx (); -// -// Pick a battery out of the air and use some somewhat real numbers found on -// data sheets on the web. -// -// 2 AAA battery (900 mAh * 2, with imaginary wireless device that uses -// 0.350 W at idle power, 0.025 W additional during receive, and 0.2 W -// additional power during transmission (10 mW TX power). -// - NS_LOG_INFO ("Initializing Energy Models"); - Ptr e0 = CreateObject (1.8, 1.5, 0.35, 0.025, 0.2); - n0->AddInterface (e0); - - Ptr e1 = CreateObject (1.8, 1.5, 0.35, 0.025, 0.2); - n1->AddInterface (e1); - -#if 0 -// -// As simulation progresses, the battereis draw idle power. Down in the -// net device, we will want to call DrawTransmitPower and DrawReceivePower -// as required. -// -// This is just some example code showing how to draw power and check -// consumption. -// - NS_LOG_INFO("Node zero energy: " << e0->GetCapacity (Seconds (0.)) << - " watt-seconds"); - NS_LOG_INFO("Node one energy: " << e1->GetCapacity (Seconds (0.)) << - " watt-seconds"); - - e0->DrawTransmitPower (Seconds (0.1)); - e1->DrawReceivePower (Seconds (0.1)); - e1->DrawTransmitPower (Seconds (0.1)); - e0->DrawReceivePower (Seconds (0.1)); - - NS_LOG_INFO("Node zero energy: " << e0->GetCapacity (Seconds (10.)) << - " watt-seconds"); - NS_LOG_INFO("Node one energy: " << e1->GetCapacity (Seconds (10.)) << - " watt-seconds"); -#endif - - Simulator::Run (); - Simulator::Destroy (); -} From 5a614715eaa6cc9a3a54a17e5d3d91fcc7d9d32e Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:00:39 -0700 Subject: [PATCH 23/31] quiet dox warning --- src/helper/application-container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helper/application-container.h b/src/helper/application-container.h index 2fc14db76..1a7dac1ea 100644 --- a/src/helper/application-container.h +++ b/src/helper/application-container.h @@ -61,7 +61,7 @@ public: */ void Add (ApplicationContainer other); /** - * \param device another netdevice pointer. + * \param application another netdevice pointer. * * Append to the end of this container the input netdevice pointer. */ From a87eed74c2537843c1cbfe4899d74311049b6c86 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:19:08 -0700 Subject: [PATCH 24/31] change pcap filename template to be slightly more coherent. --- tutorial/tutorial-csma-echo-pcap-trace.cc | 2 +- tutorial/tutorial-linear-dumbbell.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorial/tutorial-csma-echo-pcap-trace.cc b/tutorial/tutorial-csma-echo-pcap-trace.cc index feca0d427..7748dd5bd 100644 --- a/tutorial/tutorial-csma-echo-pcap-trace.cc +++ b/tutorial/tutorial-csma-echo-pcap-trace.cc @@ -61,7 +61,7 @@ main (int argc, char *argv[]) apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); - CsmaHelper::EnablePcap ("tutorial.pcap"); + CsmaHelper::EnablePcap ("tutorial"); Simulator::Run (); Simulator::Destroy (); diff --git a/tutorial/tutorial-linear-dumbbell.cc b/tutorial/tutorial-linear-dumbbell.cc index 017d15860..723df6145 100644 --- a/tutorial/tutorial-linear-dumbbell.cc +++ b/tutorial/tutorial-linear-dumbbell.cc @@ -140,8 +140,8 @@ main (int argc, char *argv[]) PointToPointHelper::EnableAscii (os); CsmaHelper::EnableAscii (os); - PointToPointHelper::EnablePcap ("tutorial.pcap"); - CsmaHelper::EnablePcap ("tutorial.pcap"); + PointToPointHelper::EnablePcap ("tutorial"); + CsmaHelper::EnablePcap ("tutorial"); Simulator::Run (); Simulator::Destroy (); From a4a18943f7cd513760d302814b5f205b2668d390 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:19:11 -0700 Subject: [PATCH 25/31] change pcap filename template to be slightly more coherent. --- examples/csma-broadcast.cc | 2 +- examples/csma-multicast.cc | 2 +- examples/csma-one-subnet.cc | 2 +- examples/mixed-global-routing.cc | 4 ++-- examples/simple-alternate-routing.cc | 2 +- examples/simple-error-model.cc | 2 +- examples/simple-global-routing.cc | 2 +- examples/simple-point-to-point-olsr.cc | 2 +- examples/tcp-large-transfer.cc | 2 +- examples/udp-echo.cc | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/csma-broadcast.cc b/examples/csma-broadcast.cc index 2b00a5a44..2f9b57442 100644 --- a/examples/csma-broadcast.cc +++ b/examples/csma-broadcast.cc @@ -133,7 +133,7 @@ main (int argc, char *argv[]) // The output files will be named // csma-broadcast.pcap-- // and can be read by the "tcpdump -tt -r" command - CsmaHelper::EnablePcap ("csma-broadcast.pcap"); + CsmaHelper::EnablePcap ("csma-broadcast"); std::ofstream ascii; ascii.open ("csma-broadcast.tr"); CsmaHelper::EnableAscii (ascii); diff --git a/examples/csma-multicast.cc b/examples/csma-multicast.cc index 6ea56a214..e85bc7c04 100644 --- a/examples/csma-multicast.cc +++ b/examples/csma-multicast.cc @@ -173,7 +173,7 @@ main (int argc, char *argv[]) // csma-multicast.pcap-- // and can be read by the "tcpdump -r" command (use "-tt" option to // display timestamps correctly) - CsmaHelper::EnablePcap ("csma-multicast.pcap"); + CsmaHelper::EnablePcap ("csma-multicast"); // // Now, do the actual simulation. // diff --git a/examples/csma-one-subnet.cc b/examples/csma-one-subnet.cc index edd692cfa..5432258a8 100644 --- a/examples/csma-one-subnet.cc +++ b/examples/csma-one-subnet.cc @@ -131,7 +131,7 @@ main (int argc, char *argv[]) // and can be read by the "tcpdump -r" command (use "-tt" option to // display timestamps correctly) // - CsmaHelper::EnablePcap ("csma-one-subnet.pcap"); + CsmaHelper::EnablePcap ("csma-one-subnet"); // // Now, do the actual simulation. // diff --git a/examples/mixed-global-routing.cc b/examples/mixed-global-routing.cc index d875da8a8..e6930109c 100644 --- a/examples/mixed-global-routing.cc +++ b/examples/mixed-global-routing.cc @@ -154,9 +154,9 @@ main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("mixed-global-routing.tr"); - PointToPointHelper::EnablePcap ("mixed-global-routing.pcap"); + PointToPointHelper::EnablePcap ("mixed-global-routing"); PointToPointHelper::EnableAscii (ascii); - CsmaHelper::EnablePcap ("mixed-global-routing.pcap"); + CsmaHelper::EnablePcap ("mixed-global-routing"); CsmaHelper::EnableAscii (ascii); diff --git a/examples/simple-alternate-routing.cc b/examples/simple-alternate-routing.cc index c843b6944..c13bb3e89 100644 --- a/examples/simple-alternate-routing.cc +++ b/examples/simple-alternate-routing.cc @@ -177,7 +177,7 @@ main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("simple-alternate-routing.tr"); - PointToPointHelper::EnablePcap ("simple-alternate-routing.pcap"); + PointToPointHelper::EnablePcap ("simple-alternate-routing"); PointToPointHelper::EnableAscii (ascii); diff --git a/examples/simple-error-model.cc b/examples/simple-error-model.cc index ee2fbfdd9..acea35e77 100644 --- a/examples/simple-error-model.cc +++ b/examples/simple-error-model.cc @@ -163,7 +163,7 @@ main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("simple-error-model.tr"); - PointToPointHelper::EnablePcap ("simple-error-model.pcap"); + PointToPointHelper::EnablePcap ("simple-error-model"); PointToPointHelper::EnableAscii (ascii); NS_LOG_INFO ("Run Simulation."); diff --git a/examples/simple-global-routing.cc b/examples/simple-global-routing.cc index 0e9652b50..210492eb0 100644 --- a/examples/simple-global-routing.cc +++ b/examples/simple-global-routing.cc @@ -166,7 +166,7 @@ main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("simple-global-routing.tr"); - PointToPointHelper::EnablePcap ("simple-global-routing.pcap"); + PointToPointHelper::EnablePcap ("simple-global-routing"); PointToPointHelper::EnableAscii (ascii); NS_LOG_INFO ("Run Simulation."); diff --git a/examples/simple-point-to-point-olsr.cc b/examples/simple-point-to-point-olsr.cc index 71464b043..0bf13625d 100644 --- a/examples/simple-point-to-point-olsr.cc +++ b/examples/simple-point-to-point-olsr.cc @@ -169,7 +169,7 @@ main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("simple-point-to-point-olsr.tr"); - PointToPointHelper::EnablePcap ("simple-point-to-point-olsr.pcap"); + PointToPointHelper::EnablePcap ("simple-point-to-point-olsr"); PointToPointHelper::EnableAscii (ascii); Simulator::StopAt (Seconds (30)); diff --git a/examples/tcp-large-transfer.cc b/examples/tcp-large-transfer.cc index 509676b0a..9c92e3dd9 100644 --- a/examples/tcp-large-transfer.cc +++ b/examples/tcp-large-transfer.cc @@ -182,7 +182,7 @@ int main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("tcp-large-transfer.tr"); - PointToPointHelper::EnablePcap ("tcp-large-transfer.pcap"); + PointToPointHelper::EnablePcap ("tcp-large-transfer"); PointToPointHelper::EnableAscii (ascii); diff --git a/examples/udp-echo.cc b/examples/udp-echo.cc index 291ff6574..4207cd77d 100644 --- a/examples/udp-echo.cc +++ b/examples/udp-echo.cc @@ -128,7 +128,7 @@ main (int argc, char *argv[]) std::ofstream ascii; ascii.open ("udp-echo.tr"); - CsmaHelper::EnablePcap ("udp-echo.pcap"); + CsmaHelper::EnablePcap ("udp-echo"); CsmaHelper::EnableAscii (ascii); // From dc96b531b1c891e9b46dcf20fbc6602126a006b9 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:19:31 -0700 Subject: [PATCH 26/31] generate .pcap postfix for pcap filenames --- src/helper/csma-helper.cc | 2 +- src/helper/csma-helper.h | 2 +- src/helper/point-to-point-helper.cc | 2 +- src/helper/point-to-point-helper.h | 2 +- src/helper/wifi-helper.cc | 2 +- src/helper/wifi-helper.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/helper/csma-helper.cc b/src/helper/csma-helper.cc index 95f28face..a57fed3d4 100644 --- a/src/helper/csma-helper.cc +++ b/src/helper/csma-helper.cc @@ -67,7 +67,7 @@ void CsmaHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid) { std::ostringstream oss; - oss << filename << "-" << nodeid << "-" << deviceid; + oss << filename << "-" << nodeid << "-" << deviceid << ".pcap"; Ptr pcap = Create (); pcap->Open (oss.str ()); pcap->WriteEthernetHeader (); diff --git a/src/helper/csma-helper.h b/src/helper/csma-helper.h index f3707e036..c0d055b53 100644 --- a/src/helper/csma-helper.h +++ b/src/helper/csma-helper.h @@ -86,7 +86,7 @@ public: * * Generate a pcap file which contains the link-level data observed * by the specified deviceid within the specified nodeid. The pcap - * data is stored in the file prefix-nodeid-deviceid. + * data is stored in the file prefix-nodeid-deviceid.pcap. * * This method should be invoked after the network topology has * been fully constructed. diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index 4a2902cc5..a0fe3581a 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -67,7 +67,7 @@ void PointToPointHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid) { std::ostringstream oss; - oss << filename << "-" << nodeid << "-" << deviceid; + oss << filename << "-" << nodeid << "-" << deviceid << ".pcap"; Ptr pcap = Create (); pcap->Open (oss.str ()); pcap->WriteEthernetHeader (); diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index aa892f371..a8cfa6efb 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -85,7 +85,7 @@ public: * * Generate a pcap file which contains the link-level data observed * by the specified deviceid within the specified nodeid. The pcap - * data is stored in the file prefix-nodeid-deviceid. + * data is stored in the file prefix-nodeid-deviceid.pcap. * * This method should be invoked after the network topology has * been fully constructed. diff --git a/src/helper/wifi-helper.cc b/src/helper/wifi-helper.cc index 8fd048dd7..d88be65ae 100644 --- a/src/helper/wifi-helper.cc +++ b/src/helper/wifi-helper.cc @@ -149,7 +149,7 @@ void WifiHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid) { std::ostringstream oss; - oss << filename << "-" << nodeid << "-" << deviceid; + oss << filename << "-" << nodeid << "-" << deviceid << ".pcap"; Ptr pcap = Create (); pcap->Open (oss.str ()); pcap->WriteWifiHeader (); diff --git a/src/helper/wifi-helper.h b/src/helper/wifi-helper.h index a7dc4170e..60d9baa11 100644 --- a/src/helper/wifi-helper.h +++ b/src/helper/wifi-helper.h @@ -147,7 +147,7 @@ public: * * Generate a pcap file which contains the link-level data observed * by the specified deviceid within the specified nodeid. The pcap - * data is stored in the file prefix-nodeid-deviceid. + * data is stored in the file prefix-nodeid-deviceid.pcap. * * This method should be invoked after the network topology has * been fully constructed. From cb1e1d00238b38055673cd5fe7ba2c7c34ad8d51 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:32:46 -0700 Subject: [PATCH 27/31] bump up version number. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 778bf95c0..f93fc9f42 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.11 +3.0.12 From e4fa093d5f2a7edd363d45fc20c3b891bf0b41bb Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:33:05 -0700 Subject: [PATCH 28/31] update platform build matrix and example program. --- README | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README b/README index 01d2c2ccf..8d47aca69 100644 --- a/README +++ b/README @@ -81,14 +81,15 @@ build/debug or build/optimized. The current codebase is expected to build and run on the following set of platforms: - - linux x86 gcc 4.2, 4.1, and, 3.4. - - linux x86_64 gcc 4.0 + - linux x86 gcc 4.2, 4.1, and, 3.4.6. + - linux x86_64 gcc 4.1.3, 4.2.1, 3.4.6 - MacOS X ppc and x86 - - cygwin + - cygwin gcc 3.4.4 (debug only) The current codebase is expected to fail to build on the following platforms: - gcc 3.3 and earlier + - optimized builds on gcc 3.4.4 and 3.4.5 - optimized builds on linux x86 gcc 4.0 Other platforms may or may not work: we welcome @@ -102,11 +103,11 @@ On recent Linux systems, once you have built ns-3, it should be easy to run the sample programs with the following command: -./waf --run simple-point-to-point +./waf --run simple-global-routing -That program should generate a simple-point-to-point.tr text -trace file and a set of simple-point-to-point-xx-xx.pcap binary -pcap trace files, which can be read by tcpdump. +That program should generate a simple-global-routing.tr text +trace file and a set of simple-global-routing-xx-xx.pcap binary +pcap trace files, which can be read by tcpdump -tt -r filename.pcap 5) Getting access to the ns-3 documentation ------------------------------------------- From 766efc6d0e7f3a28ebae8174f595f45dc0036837 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:33:19 -0700 Subject: [PATCH 29/31] initial draft of release notes. --- RELEASE_NOTES | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 029027ccc..2498529e0 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -3,6 +3,17 @@ This file contains ns-3 release notes (most recent releases first). +Release 3.0.12 (2008/03/31) +======================== + - Add Attribute support to the TypeId metadata system and add +attribute support to all in-tree models + - Add a mid-level helper API to build simulation topologies +and perform simple ascii and pcap link-level tracing. + - Large amount of structural changes to accomodate the needs +of the upcoming python bindings + - new rate control algorithm (RRAA) and a jakes propagation model +in the 802.11 model (Federico Maguolo). + Release 3.0.11 (2008/02/15) ======================== - Initial port of GTNetS TCP implementation (initial version From e103bc0ded9dc92812fb712ea5e053377631d8bb Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:38:44 -0700 Subject: [PATCH 30/31] add Federico to author list. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 4fd3febb7..a0713df8b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,4 +5,5 @@ Tom Henderson (tomhend@u.washington.edu) Joe Kopena (tjkopena@cs.drexel.edu) Mathieu Lacage (mathieu.lacage@sophia.inria.fr) Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca) +Federico Maguolo (maguolof@dei.unipd.it) George F. Riley (riley@ece.gatech.edu) From 24863d53686757ea85302159a3cf9b30d8de165f Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Mar 2008 15:39:50 -0700 Subject: [PATCH 31/31] add guillaume vu-brugier to author list --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index a0713df8b..4f0da03d7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,3 +7,4 @@ Mathieu Lacage (mathieu.lacage@sophia.inria.fr) Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca) Federico Maguolo (maguolof@dei.unipd.it) George F. Riley (riley@ece.gatech.edu) +Guillaume Vu-Brugier (gvubrugier@gmail.com)