1.1 --- a/AUTHORS Mon Mar 31 16:22:06 2008 -0700
1.2 +++ b/AUTHORS Mon Mar 31 16:22:24 2008 -0700
1.3 @@ -5,4 +5,6 @@
1.4 Joe Kopena (tjkopena@cs.drexel.edu)
1.5 Mathieu Lacage (mathieu.lacage@sophia.inria.fr)
1.6 Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
1.7 +Federico Maguolo (maguolof@dei.unipd.it)
1.8 George F. Riley (riley@ece.gatech.edu)
1.9 +Guillaume Vu-Brugier (gvubrugier@gmail.com)
2.1 --- a/README Mon Mar 31 16:22:06 2008 -0700
2.2 +++ b/README Mon Mar 31 16:22:24 2008 -0700
2.3 @@ -81,14 +81,15 @@
2.4
2.5 The current codebase is expected to build and run on the
2.6 following set of platforms:
2.7 - - linux x86 gcc 4.2, 4.1, and, 3.4.
2.8 - - linux x86_64 gcc 4.0
2.9 + - linux x86 gcc 4.2, 4.1, and, 3.4.6.
2.10 + - linux x86_64 gcc 4.1.3, 4.2.1, 3.4.6
2.11 - MacOS X ppc and x86
2.12 - - cygwin
2.13 + - cygwin gcc 3.4.4 (debug only)
2.14
2.15 The current codebase is expected to fail to build on
2.16 the following platforms:
2.17 - gcc 3.3 and earlier
2.18 + - optimized builds on gcc 3.4.4 and 3.4.5
2.19 - optimized builds on linux x86 gcc 4.0
2.20
2.21 Other platforms may or may not work: we welcome
2.22 @@ -102,11 +103,11 @@
2.23 should be easy to run the sample programs with the
2.24 following command:
2.25
2.26 -./waf --run simple-point-to-point
2.27 +./waf --run simple-global-routing
2.28
2.29 -That program should generate a simple-point-to-point.tr text
2.30 -trace file and a set of simple-point-to-point-xx-xx.pcap binary
2.31 -pcap trace files, which can be read by tcpdump.
2.32 +That program should generate a simple-global-routing.tr text
2.33 +trace file and a set of simple-global-routing-xx-xx.pcap binary
2.34 +pcap trace files, which can be read by tcpdump -tt -r filename.pcap
2.35
2.36 5) Getting access to the ns-3 documentation
2.37 -------------------------------------------
3.1 --- a/RELEASE_NOTES Mon Mar 31 16:22:06 2008 -0700
3.2 +++ b/RELEASE_NOTES Mon Mar 31 16:22:24 2008 -0700
3.3 @@ -3,6 +3,17 @@
3.4
3.5 This file contains ns-3 release notes (most recent releases first).
3.6
3.7 +Release 3.0.12 (2008/03/31)
3.8 +========================
3.9 + - Add Attribute support to the TypeId metadata system and add
3.10 +attribute support to all in-tree models
3.11 + - Add a mid-level helper API to build simulation topologies
3.12 +and perform simple ascii and pcap link-level tracing.
3.13 + - Large amount of structural changes to accomodate the needs
3.14 +of the upcoming python bindings
3.15 + - new rate control algorithm (RRAA) and a jakes propagation model
3.16 +in the 802.11 model (Federico Maguolo).
3.17 +
3.18 Release 3.0.11 (2008/02/15)
3.19 ========================
3.20 - Initial port of GTNetS TCP implementation (initial version
4.1 --- a/VERSION Mon Mar 31 16:22:06 2008 -0700
4.2 +++ b/VERSION Mon Mar 31 16:22:24 2008 -0700
4.3 @@ -1,1 +1,1 @@
4.4 -3.0.11
4.5 +3.0.12
5.1 --- a/examples/csma-broadcast.cc Mon Mar 31 16:22:06 2008 -0700
5.2 +++ b/examples/csma-broadcast.cc Mon Mar 31 16:22:24 2008 -0700
5.3 @@ -133,7 +133,7 @@
5.4 // The output files will be named
5.5 // csma-broadcast.pcap-<nodeId>-<interfaceId>
5.6 // and can be read by the "tcpdump -tt -r" command
5.7 - CsmaHelper::EnablePcap ("csma-broadcast.pcap");
5.8 + CsmaHelper::EnablePcap ("csma-broadcast");
5.9 std::ofstream ascii;
5.10 ascii.open ("csma-broadcast.tr");
5.11 CsmaHelper::EnableAscii (ascii);
6.1 --- a/examples/csma-multicast.cc Mon Mar 31 16:22:06 2008 -0700
6.2 +++ b/examples/csma-multicast.cc Mon Mar 31 16:22:24 2008 -0700
6.3 @@ -173,7 +173,7 @@
6.4 // csma-multicast.pcap-<nodeId>-<interfaceId>
6.5 // and can be read by the "tcpdump -r" command (use "-tt" option to
6.6 // display timestamps correctly)
6.7 - CsmaHelper::EnablePcap ("csma-multicast.pcap");
6.8 + CsmaHelper::EnablePcap ("csma-multicast");
6.9 //
6.10 // Now, do the actual simulation.
6.11 //
7.1 --- a/examples/csma-one-subnet.cc Mon Mar 31 16:22:06 2008 -0700
7.2 +++ b/examples/csma-one-subnet.cc Mon Mar 31 16:22:24 2008 -0700
7.3 @@ -131,7 +131,7 @@
7.4 // and can be read by the "tcpdump -r" command (use "-tt" option to
7.5 // display timestamps correctly)
7.6 //
7.7 - CsmaHelper::EnablePcap ("csma-one-subnet.pcap");
7.8 + CsmaHelper::EnablePcap ("csma-one-subnet");
7.9 //
7.10 // Now, do the actual simulation.
7.11 //
8.1 --- a/examples/mixed-global-routing.cc Mon Mar 31 16:22:06 2008 -0700
8.2 +++ b/examples/mixed-global-routing.cc Mon Mar 31 16:22:24 2008 -0700
8.3 @@ -154,9 +154,9 @@
8.4
8.5 std::ofstream ascii;
8.6 ascii.open ("mixed-global-routing.tr");
8.7 - PointToPointHelper::EnablePcap ("mixed-global-routing.pcap");
8.8 + PointToPointHelper::EnablePcap ("mixed-global-routing");
8.9 PointToPointHelper::EnableAscii (ascii);
8.10 - CsmaHelper::EnablePcap ("mixed-global-routing.pcap");
8.11 + CsmaHelper::EnablePcap ("mixed-global-routing");
8.12 CsmaHelper::EnableAscii (ascii);
8.13
8.14
9.1 --- a/examples/simple-alternate-routing.cc Mon Mar 31 16:22:06 2008 -0700
9.2 +++ b/examples/simple-alternate-routing.cc Mon Mar 31 16:22:24 2008 -0700
9.3 @@ -177,7 +177,7 @@
9.4
9.5 std::ofstream ascii;
9.6 ascii.open ("simple-alternate-routing.tr");
9.7 - PointToPointHelper::EnablePcap ("simple-alternate-routing.pcap");
9.8 + PointToPointHelper::EnablePcap ("simple-alternate-routing");
9.9 PointToPointHelper::EnableAscii (ascii);
9.10
9.11
10.1 --- a/examples/simple-error-model.cc Mon Mar 31 16:22:06 2008 -0700
10.2 +++ b/examples/simple-error-model.cc Mon Mar 31 16:22:24 2008 -0700
10.3 @@ -163,7 +163,7 @@
10.4
10.5 std::ofstream ascii;
10.6 ascii.open ("simple-error-model.tr");
10.7 - PointToPointHelper::EnablePcap ("simple-error-model.pcap");
10.8 + PointToPointHelper::EnablePcap ("simple-error-model");
10.9 PointToPointHelper::EnableAscii (ascii);
10.10
10.11 NS_LOG_INFO ("Run Simulation.");
11.1 --- a/examples/simple-global-routing.cc Mon Mar 31 16:22:06 2008 -0700
11.2 +++ b/examples/simple-global-routing.cc Mon Mar 31 16:22:24 2008 -0700
11.3 @@ -93,9 +93,6 @@
11.4 CommandLine cmd;
11.5 cmd.Parse (argc, argv);
11.6
11.7 - std::ofstream ascii;
11.8 - ascii.open ("simple-global-routing.tr");
11.9 -
11.10 // Here, we will explicitly create four nodes. In more sophisticated
11.11 // topologies, we could configure a node factory.
11.12 NS_LOG_INFO ("Create nodes.");
11.13 @@ -111,8 +108,6 @@
11.14 // We create the channels first without any IP addressing information
11.15 NS_LOG_INFO ("Create channels.");
11.16 PointToPointHelper p2p;
11.17 - p2p.EnablePcap ("simple-global-routing.pcap");
11.18 - p2p.EnableAscii (ascii);
11.19 p2p.SetChannelParameter ("BitRate", DataRate (5000000));
11.20 p2p.SetChannelParameter ("Delay", MilliSeconds (2));
11.21 NetDeviceContainer d0d2 = p2p.Build (n0n2);
11.22 @@ -152,7 +147,6 @@
11.23 apps.Stop (Seconds (10.0));
11.24
11.25 // Create a packet sink to receive these packets
11.26 - // The last argument "true" disables output from the Receive callback
11.27 PacketSinkHelper sink;
11.28 sink.SetupUdp (Ipv4Address::GetAny (), port);
11.29 apps = sink.Build (c.Get (3));
11.30 @@ -170,6 +164,10 @@
11.31 apps.Start (Seconds (1.1));
11.32 apps.Stop (Seconds (10.0));
11.33
11.34 + std::ofstream ascii;
11.35 + ascii.open ("simple-global-routing.tr");
11.36 + PointToPointHelper::EnablePcap ("simple-global-routing");
11.37 + PointToPointHelper::EnableAscii (ascii);
11.38
11.39 NS_LOG_INFO ("Run Simulation.");
11.40 Simulator::Run ();
12.1 --- a/examples/simple-point-to-point-olsr.cc Mon Mar 31 16:22:06 2008 -0700
12.2 +++ b/examples/simple-point-to-point-olsr.cc Mon Mar 31 16:22:24 2008 -0700
12.3 @@ -35,38 +35,20 @@
12.4 // - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec.
12.5 // (i.e., DataRate of 448,000 bps)
12.6 // - DropTail queues
12.7 -// - Tracing of queues and packet receptions to file
12.8 -// "simple-point-to-point.tr"
12.9 +// - Tracing of queues and packet receptions to file "simple-point-to-point-olsr.tr"
12.10
12.11 -#include "ns3/log.h"
12.12 -#include "ns3/command-line.h"
12.13 -#include "ns3/ptr.h"
12.14 -#include "ns3/random-variable.h"
12.15 -#include "ns3/config.h"
12.16 -#include "ns3/string.h"
12.17 +#include <iostream>
12.18 +#include <fstream>
12.19 +#include <string>
12.20 +#include <cassert>
12.21
12.22 -#include "ns3/simulator.h"
12.23 -#include "ns3/nstime.h"
12.24 -#include "ns3/data-rate.h"
12.25 -
12.26 -#include "ns3/ascii-trace.h"
12.27 -#include "ns3/pcap-trace.h"
12.28 -#include "ns3/internet-node.h"
12.29 -#include "ns3/point-to-point-channel.h"
12.30 -#include "ns3/point-to-point-net-device.h"
12.31 -#include "ns3/ipv4-address.h"
12.32 -#include "ns3/inet-socket-address.h"
12.33 -#include "ns3/ipv4.h"
12.34 -#include "ns3/socket.h"
12.35 -#include "ns3/ipv4-route.h"
12.36 -#include "ns3/point-to-point-topology.h"
12.37 -#include "ns3/onoff-application.h"
12.38 -#include "ns3/packet-sink.h"
12.39 -#include "ns3/olsr-helper.h"
12.40 +#include "ns3/core-module.h"
12.41 +#include "ns3/simulator-module.h"
12.42 +#include "ns3/helper-module.h"
12.43
12.44 using namespace ns3;
12.45
12.46 -NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample");
12.47 +NS_LOG_COMPONENT_DEFINE ("SimpleGlobalRoutingExample");
12.48
12.49 int
12.50 main (int argc, char *argv[])
12.51 @@ -74,7 +56,7 @@
12.52 // Users may find it convenient to turn on explicit debugging
12.53 // for selected modules; the below lines suggest how to do this
12.54 #if 0
12.55 - LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_INFO);
12.56 + LogComponentEnable ("SimpleGlobalRoutingExample", LOG_LEVEL_INFO);
12.57
12.58 LogComponentEnable("Object", LOG_LEVEL_ALL);
12.59 LogComponentEnable("Queue", LOG_LEVEL_ALL);
12.60 @@ -98,125 +80,104 @@
12.61 LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_ALL);
12.62 LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL);
12.63 #endif
12.64 + // Set up some default values for the simulation. Use the
12.65
12.66 - // Set up some default values for the simulation.
12.67 -
12.68 - Config::SetDefault ("ns3::OnOffApplication::PacketSize", String ("210"));
12.69 - Config::SetDefault ("ns3::OnOffApplication::DataRate", String ("448kb/s"));
12.70 + Config::SetDefault ("ns3::OnOffApplication::PacketSize", Uinteger (210));
12.71 + Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRate ("448kb/s"));
12.72
12.73 //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30);
12.74
12.75 // Allow the user to override any of the defaults and the above
12.76 - // Bind()s at run-time, via command-line arguments
12.77 + // DefaultValue::Bind ()s at run-time, via command-line arguments
12.78 CommandLine cmd;
12.79 cmd.Parse (argc, argv);
12.80
12.81 // Here, we will explicitly create four nodes. In more sophisticated
12.82 // topologies, we could configure a node factory.
12.83 NS_LOG_INFO ("Create nodes.");
12.84 - Ptr<Node> n0 = CreateObject<InternetNode> ();
12.85 - Ptr<Node> n1 = CreateObject<InternetNode> ();
12.86 - Ptr<Node> n2 = CreateObject<InternetNode> ();
12.87 - Ptr<Node> n3 = CreateObject<InternetNode> ();
12.88 - Ptr<Node> n4 = CreateObject<InternetNode> ();
12.89 + NodeContainer c;
12.90 + c.Create (5);
12.91 + NodeContainer n02 = NodeContainer (c.Get(0), c.Get (2));
12.92 + NodeContainer n12 = NodeContainer (c.Get(1), c.Get (2));
12.93 + NodeContainer n32 = NodeContainer (c.Get(3), c.Get (2));
12.94 + NodeContainer n34 = NodeContainer (c.Get (3), c.Get (4));
12.95 +
12.96 + InternetStackHelper internet;
12.97 + internet.Build (c);
12.98
12.99 // We create the channels first without any IP addressing information
12.100 NS_LOG_INFO ("Create channels.");
12.101 - Ptr<PointToPointChannel> channel0 =
12.102 - PointToPointTopology::AddPointToPointLink (
12.103 - n0, n2, DataRate(5000000), MilliSeconds(2));
12.104 -
12.105 - Ptr<PointToPointChannel> channel1 =
12.106 - PointToPointTopology::AddPointToPointLink (
12.107 - n1, n2, DataRate(5000000), MilliSeconds(2));
12.108 -
12.109 - Ptr<PointToPointChannel> channel2 =
12.110 - PointToPointTopology::AddPointToPointLink (
12.111 - n2, n3, DataRate(1500000), MilliSeconds(10));
12.112 -
12.113 - Ptr<PointToPointChannel> channel3 =
12.114 - PointToPointTopology::AddPointToPointLink (
12.115 - n3, n4, DataRate(1500000), MilliSeconds(10));
12.116 + PointToPointHelper p2p;
12.117 + p2p.SetChannelParameter ("BitRate", DataRate (5000000));
12.118 + p2p.SetChannelParameter ("Delay", MilliSeconds (2));
12.119 + NetDeviceContainer nd02 = p2p.Build (n02);
12.120 + NetDeviceContainer nd12 = p2p.Build (n12);
12.121 + p2p.SetChannelParameter ("BitRate", DataRate (1500000));
12.122 + p2p.SetChannelParameter ("Delay", MilliSeconds (10));
12.123 + NetDeviceContainer nd32 = p2p.Build (n32);
12.124 + NetDeviceContainer nd34 = p2p.Build (n34);
12.125
12.126 // Later, we add IP addresses.
12.127 NS_LOG_INFO ("Assign IP Addresses.");
12.128 - PointToPointTopology::AddIpv4Addresses (
12.129 - channel0, n0, Ipv4Address("10.1.1.1"),
12.130 - n2, Ipv4Address("10.1.1.2"));
12.131 + Ipv4AddressHelper ipv4;
12.132 + ipv4.SetBase ("10.1.1.0", "255.255.255.0");
12.133 + Ipv4InterfaceContainer i02 = ipv4.Allocate (nd02);
12.134 +
12.135 + ipv4.SetBase ("10.1.2.0", "255.255.255.0");
12.136 + Ipv4InterfaceContainer i12 = ipv4.Allocate (nd12);
12.137
12.138 - PointToPointTopology::AddIpv4Addresses (
12.139 - channel1, n1, Ipv4Address("10.1.2.1"),
12.140 - n2, Ipv4Address("10.1.2.2"));
12.141 -
12.142 - PointToPointTopology::AddIpv4Addresses (
12.143 - channel2, n2, Ipv4Address("10.1.3.1"),
12.144 - n3, Ipv4Address("10.1.3.2"));
12.145 + ipv4.SetBase ("10.1.3.0", "255.255.255.0");
12.146 + Ipv4InterfaceContainer i32 = ipv4.Allocate (nd32);
12.147
12.148 - PointToPointTopology::AddIpv4Addresses (
12.149 - channel3, n3, Ipv4Address("10.1.4.1"),
12.150 - n4, Ipv4Address("10.1.4.2"));
12.151 + ipv4.SetBase ("10.1.4.0", "255.255.255.0");
12.152 + Ipv4InterfaceContainer i34 = ipv4.Allocate (nd34);
12.153
12.154 // Enable OLSR
12.155 NS_LOG_INFO ("Enabling OLSR Routing.");
12.156 OlsrHelper olsr;
12.157 olsr.EnableAll ();
12.158
12.159 -
12.160 // Create the OnOff application to send UDP datagrams of size
12.161 // 210 bytes at a rate of 448 Kb/s
12.162 NS_LOG_INFO ("Create Applications.");
12.163 uint16_t port = 9; // Discard port (RFC 863)
12.164 - Ptr<OnOffApplication> ooff =
12.165 - CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.4.2", port)),
12.166 - "Protocol", TypeId::LookupByName ("ns3::Udp"),
12.167 - "OnTime", ConstantVariable(1),
12.168 - "OffTime", ConstantVariable(0));
12.169 - n0->AddApplication (ooff);
12.170 - // Start the application
12.171 - ooff->Start(Seconds(1.0));
12.172 + OnOffHelper onoff;
12.173 + onoff.SetAppAttribute ("OnTime", ConstantVariable (1));
12.174 + onoff.SetAppAttribute ("OffTime", ConstantVariable (0));
12.175 + onoff.SetUdpRemote (i34.GetAddress (1), port);
12.176 + ApplicationContainer apps = onoff.Build (c.Get (0));
12.177 + apps.Start (Seconds (1.0));
12.178 + apps.Stop (Seconds (10.0));
12.179
12.180 - // Create an optional packet sink to receive these packets
12.181 - Ptr<PacketSink> sink =
12.182 - CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
12.183 - "Protocol", TypeId::LookupByName ("ns3::Udp"));
12.184 - n3->AddApplication (sink);
12.185 - // Start the sink
12.186 - sink->Start (Seconds (1.0));
12.187 + // Create a packet sink to receive these packets
12.188 + PacketSinkHelper sink;
12.189 + sink.SetupUdp (Ipv4Address::GetAny (), port);
12.190 + apps = sink.Build (c.Get (3));
12.191 + apps.Start (Seconds (1.0));
12.192 + apps.Stop (Seconds (10.0));
12.193
12.194 // Create a similar flow from n3 to n1, starting at time 1.1 seconds
12.195 - ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)),
12.196 - "Protocol", TypeId::LookupByName ("ns3::Udp"),
12.197 - "OnTime", ConstantVariable(1),
12.198 - "OffTime", ConstantVariable(0));
12.199 - n3->AddApplication (ooff);
12.200 - // Start the application
12.201 - ooff->Start (Seconds(1.1));
12.202 + onoff.SetUdpRemote (i12.GetAddress (0), port);
12.203 + apps = onoff.Build (c.Get (3));
12.204 + apps.Start (Seconds (1.1));
12.205 + apps.Stop (Seconds (10.0));
12.206
12.207 // Create a packet sink to receive these packets
12.208 - sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
12.209 - "Protocol", TypeId::LookupByName ("ns3::Udp"));
12.210 - n1->AddApplication (sink);
12.211 - // Start the sink
12.212 - sink->Start (Seconds (1.1));
12.213 + apps = sink.Build (c.Get (1));
12.214 + apps.Start (Seconds (1.1));
12.215 + apps.Stop (Seconds (10.0));
12.216
12.217 - // Configure tracing of all enqueue, dequeue, and NetDevice receive events
12.218 - // Trace output will be sent to the simple-point-to-point.tr file
12.219 - NS_LOG_INFO ("Configure Tracing.");
12.220 - AsciiTrace asciitrace ("simple-point-to-point-olsr.tr");
12.221 - asciitrace.TraceAllQueues ();
12.222 - asciitrace.TraceAllNetDeviceRx ();
12.223 + std::ofstream ascii;
12.224 + ascii.open ("simple-point-to-point-olsr.tr");
12.225 + PointToPointHelper::EnablePcap ("simple-point-to-point-olsr");
12.226 + PointToPointHelper::EnableAscii (ascii);
12.227
12.228 - // Also configure some tcpdump traces; each interface will be traced
12.229 - // The output files will be named
12.230 - // simple-point-to-point.pcap-<nodeId>-<interfaceId>
12.231 - // and can be read by the "tcpdump -r" command (use "-tt" option to
12.232 - // display timestamps correctly)
12.233 - PcapTrace pcaptrace ("simple-point-to-point-olsr.pcap");
12.234 - pcaptrace.TraceAllIp ();
12.235 + Simulator::StopAt (Seconds (30));
12.236
12.237 NS_LOG_INFO ("Run Simulation.");
12.238 - Simulator::StopAt (Seconds (30));
12.239 Simulator::Run ();
12.240 Simulator::Destroy ();
12.241 NS_LOG_INFO ("Done.");
12.242 +
12.243 + return 0;
12.244 }
13.1 --- a/examples/simple-point-to-point.cc Mon Mar 31 16:22:06 2008 -0700
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,219 +0,0 @@
13.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
13.5 -/*
13.6 - * This program is free software; you can redistribute it and/or modify
13.7 - * it under the terms of the GNU General Public License version 2 as
13.8 - * published by the Free Software Foundation;
13.9 - *
13.10 - * This program is distributed in the hope that it will be useful,
13.11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13.12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13.13 - * GNU General Public License for more details.
13.14 - *
13.15 - * You should have received a copy of the GNU General Public License
13.16 - * along with this program; if not, write to the Free Software
13.17 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
13.18 - *
13.19 - * ns-2 simple.tcl script (ported from ns-2)
13.20 - * Originally authored by Steve McCanne, 12/19/1996
13.21 - */
13.22 -
13.23 -// Port of ns-2/tcl/ex/simple.tcl to ns-3
13.24 -//
13.25 -// Network topology
13.26 -//
13.27 -// n0
13.28 -// \ 5 Mb/s, 2ms
13.29 -// \ 1.5Mb/s, 10ms
13.30 -// n2 -------------------------n3
13.31 -// /
13.32 -// / 5 Mb/s, 2ms
13.33 -// n1
13.34 -//
13.35 -// - all links are point-to-point links with indicated one-way BW/delay
13.36 -// - CBR/UDP flows from n0 to n3, and from n3 to n1
13.37 -// - FTP/TCP flow from n0 to n3, starting at time 1.2 to time 1.35 sec.
13.38 -// - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec.
13.39 -// (i.e., DataRate of 448,000 bps)
13.40 -// - DropTail queues
13.41 -// - Tracing of queues and packet receptions to file
13.42 -// "simple-point-to-point.tr"
13.43 -
13.44 -#include "ns3/log.h"
13.45 -#include "ns3/command-line.h"
13.46 -#include "ns3/ptr.h"
13.47 -#include "ns3/random-variable.h"
13.48 -#include "ns3/config.h"
13.49 -#include "ns3/string.h"
13.50 -
13.51 -#include "ns3/simulator.h"
13.52 -#include "ns3/nstime.h"
13.53 -#include "ns3/data-rate.h"
13.54 -
13.55 -#include "ns3/ascii-trace.h"
13.56 -#include "ns3/pcap-trace.h"
13.57 -#include "ns3/internet-node.h"
13.58 -#include "ns3/point-to-point-channel.h"
13.59 -#include "ns3/point-to-point-net-device.h"
13.60 -#include "ns3/ipv4-address.h"
13.61 -#include "ns3/inet-socket-address.h"
13.62 -#include "ns3/ipv4.h"
13.63 -#include "ns3/socket.h"
13.64 -#include "ns3/ipv4-route.h"
13.65 -#include "ns3/point-to-point-topology.h"
13.66 -#include "ns3/onoff-application.h"
13.67 -#include "ns3/packet-sink.h"
13.68 -
13.69 -using namespace ns3;
13.70 -
13.71 -NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample");
13.72 -
13.73 -int
13.74 -main (int argc, char *argv[])
13.75 -{
13.76 - // Users may find it convenient to turn on explicit debugging
13.77 - // for selected modules; the below lines suggest how to do this
13.78 -#if 0
13.79 - LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_ALL);
13.80 -#endif
13.81 -
13.82 - // Set up some default values for the simulation.
13.83 -
13.84 - Config::SetDefault ("ns3::OnOffApplication::PacketSize", String ("210"));
13.85 - Config::SetDefault ("ns3::OnOffApplication::DataRate", String ("448kb/s"));
13.86 -
13.87 - // Allow the user to override any of the defaults and the above
13.88 - // Bind()s at run-time, via command-line arguments
13.89 - CommandLine cmd;
13.90 - cmd.Parse (argc, argv);
13.91 -
13.92 - // Here, we will explicitly create four nodes. In more sophisticated
13.93 - // topologies, we could configure a node factory.
13.94 - NS_LOG_INFO ("Create nodes.");
13.95 - Ptr<Node> n0 = CreateObject<InternetNode> ();
13.96 - Ptr<Node> n1 = CreateObject<InternetNode> ();
13.97 - Ptr<Node> n2 = CreateObject<InternetNode> ();
13.98 - Ptr<Node> n3 = CreateObject<InternetNode> ();
13.99 -
13.100 - // We create the channels first without any IP addressing information
13.101 - NS_LOG_INFO ("Create channels.");
13.102 - Ptr<PointToPointChannel> channel0 =
13.103 - PointToPointTopology::AddPointToPointLink (
13.104 - n0, n2, DataRate(5000000), MilliSeconds(2));
13.105 -
13.106 - Ptr<PointToPointChannel> channel1 =
13.107 - PointToPointTopology::AddPointToPointLink (
13.108 - n1, n2, DataRate(5000000), MilliSeconds(2));
13.109 -
13.110 - Ptr<PointToPointChannel> channel2 =
13.111 - PointToPointTopology::AddPointToPointLink (
13.112 - n2, n3, DataRate(1500000), MilliSeconds(10));
13.113 -
13.114 - // Later, we add IP addresses.
13.115 - NS_LOG_INFO ("Assign IP Addresses.");
13.116 - PointToPointTopology::AddIpv4Addresses (
13.117 - channel0, n0, Ipv4Address("10.1.1.1"),
13.118 - n2, Ipv4Address("10.1.1.2"));
13.119 -
13.120 - PointToPointTopology::AddIpv4Addresses (
13.121 - channel1, n1, Ipv4Address("10.1.2.1"),
13.122 - n2, Ipv4Address("10.1.2.2"));
13.123 -
13.124 - PointToPointTopology::AddIpv4Addresses (
13.125 - channel2, n2, Ipv4Address("10.1.3.1"),
13.126 - n3, Ipv4Address("10.1.3.2"));
13.127 -
13.128 - // Finally, we add static routes. These three steps (Channel and
13.129 - // NetDevice creation, IP Address assignment, and routing) are
13.130 - // separated because there may be a need to postpone IP Address
13.131 - // assignment (emulation) or modify to use dynamic routing
13.132 - NS_LOG_INFO ("Add Static Routes.");
13.133 - PointToPointTopology::AddIpv4Routes(n0, n2, channel0);
13.134 - PointToPointTopology::AddIpv4Routes(n1, n2, channel1);
13.135 - PointToPointTopology::AddIpv4Routes(n2, n3, channel2);
13.136 -
13.137 - // Create the OnOff application to send UDP datagrams of size
13.138 - // 210 bytes at a rate of 448 Kb/s
13.139 - NS_LOG_INFO ("Create Applications.");
13.140 - uint16_t port = 9; // Discard port (RFC 863)
13.141 - Ptr<OnOffApplication> ooff =
13.142 - CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", port)),
13.143 - "Protocol", TypeId::LookupByName ("ns3::Udp"),
13.144 - "OnTime", ConstantVariable(1),
13.145 - "OffTime", ConstantVariable(0));
13.146 - n0->AddApplication (ooff);
13.147 - // Start the application
13.148 - ooff->Start (Seconds(1.0));
13.149 -
13.150 - // Create an optional packet sink to receive these packets
13.151 - Ptr<PacketSink> sink =
13.152 - CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
13.153 - "Protocol", TypeId::LookupByName ("ns3::Udp"));
13.154 - n3->AddApplication (sink);
13.155 - // Start the sink
13.156 - sink->Start (Seconds (1.0));
13.157 -
13.158 - // Create a similar flow from n3 to n1, starting at time 1.1 seconds
13.159 - ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)),
13.160 - "Protocol", TypeId::LookupByName ("ns3::Udp"),
13.161 - "OnTime", ConstantVariable(1),
13.162 - "OffTime", ConstantVariable(0));
13.163 - n3->AddApplication (ooff);
13.164 - // Start the application
13.165 - ooff->Start(Seconds(1.1));
13.166 -
13.167 - // Create a packet sink to receive these packets
13.168 - sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
13.169 - "Protocol", TypeId::LookupByName ("ns3::Udp"));
13.170 - n1->AddApplication (sink);
13.171 - // Start the sink
13.172 - sink->Start (Seconds (1.1));
13.173 -
13.174 - // TCP
13.175 - // Create a file transfer from n0 to n3, starting at time 1.2
13.176 - uint16_t servPort = 500;
13.177 -
13.178 - ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", servPort)),
13.179 - "Protocol", TypeId::LookupByName ("ns3::Tcp"),
13.180 - "OnTime", ConstantVariable(1),
13.181 - "OffTime", ConstantVariable(0));
13.182 - n0->AddApplication (ooff);
13.183 - // Start the application
13.184 - ooff->Start (Seconds(1.2));
13.185 - ooff->Stop (Seconds(1.35));
13.186 -
13.187 - // Create a packet sink to receive these TCP packets
13.188 - sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
13.189 - "Protocol", TypeId::LookupByName ("ns3::Tcp"));
13.190 - n3->AddApplication (sink);
13.191 - sink->Start (Seconds (1.2));
13.192 -
13.193 - // Here, finish off packet routing configuration
13.194 - // This will likely set by some global StaticRouting object in the future
13.195 - NS_LOG_INFO ("Set Default Routes.");
13.196 - Ptr<Ipv4> ipv4;
13.197 - ipv4 = n0->GetObject<Ipv4> ();
13.198 - ipv4->SetDefaultRoute (Ipv4Address ("10.1.1.2"), 1);
13.199 - ipv4 = n3->GetObject<Ipv4> ();
13.200 - ipv4->SetDefaultRoute (Ipv4Address ("10.1.3.1"), 1);
13.201 -
13.202 - // Configure tracing of all enqueue, dequeue, and NetDevice receive events
13.203 - // Trace output will be sent to the simple-point-to-point.tr file
13.204 - NS_LOG_INFO ("Configure Tracing.");
13.205 - AsciiTrace asciitrace ("simple-point-to-point.tr");
13.206 - asciitrace.TraceAllQueues ();
13.207 - asciitrace.TraceAllNetDeviceRx ();
13.208 -
13.209 - // Also configure some tcpdump traces; each interface will be traced
13.210 - // The output files will be named
13.211 - // simple-point-to-point.pcap-<nodeId>-<interfaceId>
13.212 - // and can be read by the "tcpdump -r" command (use "-tt" option to
13.213 - // display timestamps correctly)
13.214 - PcapTrace pcaptrace ("simple-point-to-point.pcap");
13.215 - pcaptrace.TraceAllIp ();
13.216 -
13.217 - NS_LOG_INFO ("Run Simulation.");
13.218 - Simulator::StopAt (Seconds (3.0));
13.219 - Simulator::Run ();
13.220 - Simulator::Destroy ();
13.221 - NS_LOG_INFO ("Done.");
13.222 -}
14.1 --- a/examples/tcp-large-transfer.cc Mon Mar 31 16:22:06 2008 -0700
14.2 +++ b/examples/tcp-large-transfer.cc Mon Mar 31 16:22:24 2008 -0700
14.3 @@ -182,7 +182,7 @@
14.4
14.5 std::ofstream ascii;
14.6 ascii.open ("tcp-large-transfer.tr");
14.7 - PointToPointHelper::EnablePcap ("tcp-large-transfer.pcap");
14.8 + PointToPointHelper::EnablePcap ("tcp-large-transfer");
14.9 PointToPointHelper::EnableAscii (ascii);
14.10
14.11
15.1 --- a/examples/udp-echo.cc Mon Mar 31 16:22:06 2008 -0700
15.2 +++ b/examples/udp-echo.cc Mon Mar 31 16:22:24 2008 -0700
15.3 @@ -128,7 +128,7 @@
15.4
15.5 std::ofstream ascii;
15.6 ascii.open ("udp-echo.tr");
15.7 - CsmaHelper::EnablePcap ("udp-echo.pcap");
15.8 + CsmaHelper::EnablePcap ("udp-echo");
15.9 CsmaHelper::EnableAscii (ascii);
15.10
15.11 //
16.1 --- a/examples/wscript Mon Mar 31 16:22:06 2008 -0700
16.2 +++ b/examples/wscript Mon Mar 31 16:22:24 2008 -0700
16.3 @@ -10,10 +10,6 @@
16.4 ['point-to-point', 'internet-node', 'global-routing'])
16.5 obj.source = 'simple-alternate-routing.cc'
16.6
16.7 - obj = bld.create_ns3_program('simple-point-to-point',
16.8 - ['point-to-point', 'internet-node'])
16.9 - obj.source = 'simple-point-to-point.cc'
16.10 -
16.11 obj = bld.create_ns3_program('simple-error-model',
16.12 ['point-to-point', 'internet-node'])
16.13 obj.source = 'simple-error-model.cc'
17.1 --- a/samples/main-packet-printer.cc Mon Mar 31 16:22:06 2008 -0700
17.2 +++ b/samples/main-packet-printer.cc Mon Mar 31 16:22:24 2008 -0700
17.3 @@ -1,7 +1,6 @@
17.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
17.5 /*
17.6 * Copyright (c) 2006,2007 INRIA
17.7 - * All rights reserved.
17.8 *
17.9 * This program is free software; you can redistribute it and/or modify
17.10 * it under the terms of the GNU General Public License version 2 as
18.1 --- a/samples/main-tw.cc Mon Mar 31 16:22:06 2008 -0700
18.2 +++ b/samples/main-tw.cc Mon Mar 31 16:22:24 2008 -0700
18.3 @@ -1,7 +1,6 @@
18.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
18.5 /*
18.6 * Copyright (c) 2007 University of Washington
18.7 - * All rights reserved.
18.8 *
18.9 * This program is free software; you can redistribute it and/or modify
18.10 * it under the terms of the GNU General Public License version 2 as
19.1 --- a/src/common/data-rate.cc Mon Mar 31 16:22:06 2008 -0700
19.2 +++ b/src/common/data-rate.cc Mon Mar 31 16:22:24 2008 -0700
19.3 @@ -1,7 +1,6 @@
19.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
19.5 //
19.6 // Copyright (c) 2006 Georgia Tech Research Corporation
19.7 -// All rights reserved.
19.8 //
19.9 // This program is free software; you can redistribute it and/or modify
19.10 // it under the terms of the GNU General Public License version 2 as
20.1 --- a/src/common/data-rate.h Mon Mar 31 16:22:06 2008 -0700
20.2 +++ b/src/common/data-rate.h Mon Mar 31 16:22:24 2008 -0700
20.3 @@ -1,7 +1,6 @@
20.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20.5 //
20.6 // Copyright (c) 2006 Georgia Tech Research Corporation
20.7 -// All rights reserved.
20.8 //
20.9 // This program is free software; you can redistribute it and/or modify
20.10 // it under the terms of the GNU General Public License version 2 as
21.1 --- a/src/common/data-writer.cc Mon Mar 31 16:22:06 2008 -0700
21.2 +++ b/src/common/data-writer.cc Mon Mar 31 16:22:24 2008 -0700
21.3 @@ -1,7 +1,6 @@
21.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
21.5 /*
21.6 * Copyright (c) 2005 INRIA
21.7 - * All rights reserved.
21.8 *
21.9 * This program is free software; you can redistribute it and/or modify
21.10 * it under the terms of the GNU General Public License version 2 as
22.1 --- a/src/common/data-writer.h Mon Mar 31 16:22:06 2008 -0700
22.2 +++ b/src/common/data-writer.h Mon Mar 31 16:22:24 2008 -0700
22.3 @@ -1,7 +1,6 @@
22.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22.5 /*
22.6 * Copyright (c) 2005 INRIA
22.7 - * All rights reserved.
22.8 *
22.9 * This program is free software; you can redistribute it and/or modify
22.10 * it under the terms of the GNU General Public License version 2 as
23.1 --- a/src/common/header.h Mon Mar 31 16:22:06 2008 -0700
23.2 +++ b/src/common/header.h Mon Mar 31 16:22:24 2008 -0700
23.3 @@ -1,7 +1,6 @@
23.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
23.5 /*
23.6 * Copyright (c) 2005 INRIA
23.7 - * All rights reserved.
23.8 *
23.9 * This program is free software; you can redistribute it and/or modify
23.10 * it under the terms of the GNU General Public License version 2 as
24.1 --- a/src/common/packet-metadata.h Mon Mar 31 16:22:06 2008 -0700
24.2 +++ b/src/common/packet-metadata.h Mon Mar 31 16:22:24 2008 -0700
24.3 @@ -1,7 +1,6 @@
24.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24.5 /*
24.6 * Copyright (c) 2006,2007 INRIA
24.7 - * All rights reserved.
24.8 *
24.9 * This program is free software; you can redistribute it and/or modify
24.10 * it under the terms of the GNU General Public License version 2 as
25.1 --- a/src/common/packet.cc Mon Mar 31 16:22:06 2008 -0700
25.2 +++ b/src/common/packet.cc Mon Mar 31 16:22:24 2008 -0700
25.3 @@ -1,7 +1,6 @@
25.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25.5 /*
25.6 * Copyright (c) 2005,2006 INRIA
25.7 - * All rights reserved.
25.8 *
25.9 * This program is free software; you can redistribute it and/or modify
25.10 * it under the terms of the GNU General Public License version 2 as
26.1 --- a/src/common/packet.h Mon Mar 31 16:22:06 2008 -0700
26.2 +++ b/src/common/packet.h Mon Mar 31 16:22:24 2008 -0700
26.3 @@ -1,7 +1,6 @@
26.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26.5 /*
26.6 * Copyright (c) 2005,2006 INRIA
26.7 - * All rights reserved.
26.8 *
26.9 * This program is free software; you can redistribute it and/or modify
26.10 * it under the terms of the GNU General Public License version 2 as
27.1 --- a/src/common/pcap-writer.cc Mon Mar 31 16:22:06 2008 -0700
27.2 +++ b/src/common/pcap-writer.cc Mon Mar 31 16:22:24 2008 -0700
27.3 @@ -1,7 +1,6 @@
27.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
27.5 /*
27.6 * Copyright (c) 2005,2006 INRIA
27.7 - * All rights reserved.
27.8 *
27.9 * This program is free software; you can redistribute it and/or modify
27.10 * it under the terms of the GNU General Public License version 2 as
28.1 --- a/src/common/pcap-writer.h Mon Mar 31 16:22:06 2008 -0700
28.2 +++ b/src/common/pcap-writer.h Mon Mar 31 16:22:24 2008 -0700
28.3 @@ -1,7 +1,6 @@
28.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
28.5 /*
28.6 * Copyright (c) 2005,2006 INRIA
28.7 - * All rights reserved.
28.8 *
28.9 * This program is free software; you can redistribute it and/or modify
28.10 * it under the terms of the GNU General Public License version 2 as
29.1 --- a/src/common/tag-registry.cc Mon Mar 31 16:22:06 2008 -0700
29.2 +++ b/src/common/tag-registry.cc Mon Mar 31 16:22:24 2008 -0700
29.3 @@ -1,7 +1,6 @@
29.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
29.5 /*
29.6 * Copyright (c) 2006 INRIA
29.7 - * All rights reserved.
29.8 *
29.9 * This program is free software; you can redistribute it and/or modify
29.10 * it under the terms of the GNU General Public License version 2 as
30.1 --- a/src/common/tag-registry.h Mon Mar 31 16:22:06 2008 -0700
30.2 +++ b/src/common/tag-registry.h Mon Mar 31 16:22:24 2008 -0700
30.3 @@ -1,7 +1,6 @@
30.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
30.5 /*
30.6 * Copyright (c) 2006 INRIA
30.7 - * All rights reserved.
30.8 *
30.9 * This program is free software; you can redistribute it and/or modify
30.10 * it under the terms of the GNU General Public License version 2 as
31.1 --- a/src/common/tag.h Mon Mar 31 16:22:06 2008 -0700
31.2 +++ b/src/common/tag.h Mon Mar 31 16:22:24 2008 -0700
31.3 @@ -1,7 +1,6 @@
31.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
31.5 /*
31.6 * Copyright (c) 2006 INRIA
31.7 - * All rights reserved.
31.8 *
31.9 * This program is free software; you can redistribute it and/or modify
31.10 * it under the terms of the GNU General Public License version 2 as
32.1 --- a/src/common/tags.cc Mon Mar 31 16:22:06 2008 -0700
32.2 +++ b/src/common/tags.cc Mon Mar 31 16:22:24 2008 -0700
32.3 @@ -1,7 +1,6 @@
32.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
32.5 /*
32.6 * Copyright (c) 2006 INRIA
32.7 - * All rights reserved.
32.8 *
32.9 * This program is free software; you can redistribute it and/or modify
32.10 * it under the terms of the GNU General Public License version 2 as
33.1 --- a/src/common/tags.h Mon Mar 31 16:22:06 2008 -0700
33.2 +++ b/src/common/tags.h Mon Mar 31 16:22:24 2008 -0700
33.3 @@ -1,7 +1,6 @@
33.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
33.5 /*
33.6 * Copyright (c) 2006 INRIA
33.7 - * All rights reserved.
33.8 *
33.9 * This program is free software; you can redistribute it and/or modify
33.10 * it under the terms of the GNU General Public License version 2 as
34.1 --- a/src/common/trailer.h Mon Mar 31 16:22:06 2008 -0700
34.2 +++ b/src/common/trailer.h Mon Mar 31 16:22:24 2008 -0700
34.3 @@ -1,7 +1,6 @@
34.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
34.5 /*
34.6 * Copyright (c) 2005 INRIA
34.7 - * All rights reserved.
34.8 *
34.9 * This program is free software; you can redistribute it and/or modify
34.10 * it under the terms of the GNU General Public License version 2 as
35.1 --- a/src/core/assert.h Mon Mar 31 16:22:06 2008 -0700
35.2 +++ b/src/core/assert.h Mon Mar 31 16:22:24 2008 -0700
35.3 @@ -1,7 +1,6 @@
35.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
35.5 /*
35.6 * Copyright (c) 2006 INRIA
35.7 - * All rights reserved.
35.8 *
35.9 * This program is free software; you can redistribute it and/or modify
35.10 * it under the terms of the GNU General Public License version 2 as
36.1 --- a/src/core/attribute-list.cc Mon Mar 31 16:22:06 2008 -0700
36.2 +++ b/src/core/attribute-list.cc Mon Mar 31 16:22:24 2008 -0700
36.3 @@ -1,7 +1,6 @@
36.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
36.5 /*
36.6 * Copyright (c) 2008 INRIA
36.7 - * All rights reserved.
36.8 *
36.9 * This program is free software; you can redistribute it and/or modify
36.10 * it under the terms of the GNU General Public License version 2 as
37.1 --- a/src/core/attribute-list.h Mon Mar 31 16:22:06 2008 -0700
37.2 +++ b/src/core/attribute-list.h Mon Mar 31 16:22:24 2008 -0700
37.3 @@ -1,7 +1,6 @@
37.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
37.5 /*
37.6 * Copyright (c) 2008 INRIA
37.7 - * All rights reserved.
37.8 *
37.9 * This program is free software; you can redistribute it and/or modify
37.10 * it under the terms of the GNU General Public License version 2 as
38.1 --- a/src/core/breakpoint.cc Mon Mar 31 16:22:06 2008 -0700
38.2 +++ b/src/core/breakpoint.cc Mon Mar 31 16:22:24 2008 -0700
38.3 @@ -1,7 +1,6 @@
38.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
38.5 /*
38.6 * Copyright (c) 2006,2007 INRIA, INESC Porto
38.7 - * All rights reserved.
38.8 *
38.9 * This program is free software; you can redistribute it and/or modify
38.10 * it under the terms of the GNU General Public License version 2 as
39.1 --- a/src/core/breakpoint.h Mon Mar 31 16:22:06 2008 -0700
39.2 +++ b/src/core/breakpoint.h Mon Mar 31 16:22:24 2008 -0700
39.3 @@ -1,7 +1,6 @@
39.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
39.5 /*
39.6 * Copyright (c) 2006,2007 INESC Porto, INRIA
39.7 - * All rights reserved.
39.8 *
39.9 * This program is free software; you can redistribute it and/or modify
39.10 * it under the terms of the GNU General Public License version 2 as
40.1 --- a/src/core/callback-test.cc Mon Mar 31 16:22:06 2008 -0700
40.2 +++ b/src/core/callback-test.cc Mon Mar 31 16:22:24 2008 -0700
40.3 @@ -1,7 +1,6 @@
40.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
40.5 /*
40.6 * Copyright (c) 2005,2006 INRIA
40.7 - * All rights reserved.
40.8 *
40.9 * This program is free software; you can redistribute it and/or modify
40.10 * it under the terms of the GNU General Public License version 2 as
41.1 --- a/src/core/callback.h Mon Mar 31 16:22:06 2008 -0700
41.2 +++ b/src/core/callback.h Mon Mar 31 16:22:24 2008 -0700
41.3 @@ -1,7 +1,6 @@
41.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
41.5 /*
41.6 * Copyright (c) 2005,2006 INRIA
41.7 - * All rights reserved.
41.8 *
41.9 * This program is free software; you can redistribute it and/or modify
41.10 * it under the terms of the GNU General Public License version 2 as
42.1 --- a/src/core/fatal-error.h Mon Mar 31 16:22:06 2008 -0700
42.2 +++ b/src/core/fatal-error.h Mon Mar 31 16:22:24 2008 -0700
42.3 @@ -1,7 +1,6 @@
42.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
42.5 /*
42.6 * Copyright (c) 2006 INRIA
42.7 - * All rights reserved.
42.8 *
42.9 * This program is free software; you can redistribute it and/or modify
42.10 * it under the terms of the GNU General Public License version 2 as
43.1 --- a/src/core/ptr.cc Mon Mar 31 16:22:06 2008 -0700
43.2 +++ b/src/core/ptr.cc Mon Mar 31 16:22:24 2008 -0700
43.3 @@ -1,7 +1,6 @@
43.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
43.5 /*
43.6 * Copyright (c) 2005,2006 INRIA
43.7 - * All rights reserved.
43.8 *
43.9 * This program is free software; you can redistribute it and/or modify
43.10 * it under the terms of the GNU General Public License version 2 as
44.1 --- a/src/core/ptr.h Mon Mar 31 16:22:06 2008 -0700
44.2 +++ b/src/core/ptr.h Mon Mar 31 16:22:24 2008 -0700
44.3 @@ -1,7 +1,6 @@
44.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
44.5 /*
44.6 * Copyright (c) 2005,2006 INRIA
44.7 - * All rights reserved.
44.8 *
44.9 * This program is free software; you can redistribute it and/or modify
44.10 * it under the terms of the GNU General Public License version 2 as
45.1 --- a/src/core/singleton.h Mon Mar 31 16:22:06 2008 -0700
45.2 +++ b/src/core/singleton.h Mon Mar 31 16:22:24 2008 -0700
45.3 @@ -1,7 +1,6 @@
45.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
45.5 /*
45.6 * Copyright (c) 2007 INRIA
45.7 - * All rights reserved.
45.8 *
45.9 * This program is free software; you can redistribute it and/or modify
45.10 * it under the terms of the GNU General Public License version 2 as
46.1 --- a/src/core/system-wall-clock-ms.h Mon Mar 31 16:22:06 2008 -0700
46.2 +++ b/src/core/system-wall-clock-ms.h Mon Mar 31 16:22:24 2008 -0700
46.3 @@ -1,7 +1,6 @@
46.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
46.5 /*
46.6 * Copyright (c) 2005 INRIA
46.7 - * All rights reserved.
46.8 *
46.9 * This program is free software; you can redistribute it and/or modify
46.10 * it under the terms of the GNU General Public License version 2 as
47.1 --- a/src/core/test.cc Mon Mar 31 16:22:06 2008 -0700
47.2 +++ b/src/core/test.cc Mon Mar 31 16:22:24 2008 -0700
47.3 @@ -1,7 +1,6 @@
47.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
47.5 /*
47.6 * Copyright (c) 2005 INRIA
47.7 - * All rights reserved.
47.8 *
47.9 * This program is free software; you can redistribute it and/or modify
47.10 * it under the terms of the GNU General Public License version 2 as
48.1 --- a/src/core/test.h Mon Mar 31 16:22:06 2008 -0700
48.2 +++ b/src/core/test.h Mon Mar 31 16:22:24 2008 -0700
48.3 @@ -1,7 +1,6 @@
48.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
48.5 /*
48.6 * Copyright (c) 2005 INRIA
48.7 - * All rights reserved.
48.8 *
48.9 * This program is free software; you can redistribute it and/or modify
48.10 * it under the terms of the GNU General Public License version 2 as
49.1 --- a/src/core/traced-callback.cc Mon Mar 31 16:22:06 2008 -0700
49.2 +++ b/src/core/traced-callback.cc Mon Mar 31 16:22:24 2008 -0700
49.3 @@ -1,7 +1,6 @@
49.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
49.5 /*
49.6 * Copyright (c) 2007 INRIA
49.7 - * All rights reserved.
49.8 *
49.9 * This program is free software; you can redistribute it and/or modify
49.10 * it under the terms of the GNU General Public License version 2 as
50.1 --- a/src/core/traced-callback.h Mon Mar 31 16:22:06 2008 -0700
50.2 +++ b/src/core/traced-callback.h Mon Mar 31 16:22:24 2008 -0700
50.3 @@ -1,7 +1,6 @@
50.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
50.5 /*
50.6 * Copyright (c) 2005,2006,2007 INRIA
50.7 - * All rights reserved.
50.8 *
50.9 * This program is free software; you can redistribute it and/or modify
50.10 * it under the terms of the GNU General Public License version 2 as
51.1 --- a/src/core/type-id.cc Mon Mar 31 16:22:06 2008 -0700
51.2 +++ b/src/core/type-id.cc Mon Mar 31 16:22:24 2008 -0700
51.3 @@ -1,7 +1,6 @@
51.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
51.5 /*
51.6 * Copyright (c) 2008 INRIA
51.7 - * All rights reserved.
51.8 *
51.9 * This program is free software; you can redistribute it and/or modify
51.10 * it under the terms of the GNU General Public License version 2 as
52.1 --- a/src/core/type-id.h Mon Mar 31 16:22:06 2008 -0700
52.2 +++ b/src/core/type-id.h Mon Mar 31 16:22:24 2008 -0700
52.3 @@ -1,7 +1,6 @@
52.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
52.5 /*
52.6 * Copyright (c) 2008 INRIA
52.7 - * All rights reserved.
52.8 *
52.9 * This program is free software; you can redistribute it and/or modify
52.10 * it under the terms of the GNU General Public License version 2 as
53.1 --- a/src/core/uid-manager.cc Mon Mar 31 16:22:06 2008 -0700
53.2 +++ b/src/core/uid-manager.cc Mon Mar 31 16:22:24 2008 -0700
53.3 @@ -1,7 +1,6 @@
53.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
53.5 /*
53.6 * Copyright (c) 2007 INRIA
53.7 - * All rights reserved.
53.8 *
53.9 * This program is free software; you can redistribute it and/or modify
53.10 * it under the terms of the GNU General Public License version 2 as
54.1 --- a/src/core/uid-manager.h Mon Mar 31 16:22:06 2008 -0700
54.2 +++ b/src/core/uid-manager.h Mon Mar 31 16:22:24 2008 -0700
54.3 @@ -1,7 +1,6 @@
54.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
54.5 /*
54.6 * Copyright (c) 2007 INRIA
54.7 - * All rights reserved.
54.8 *
54.9 * This program is free software; you can redistribute it and/or modify
54.10 * it under the terms of the GNU General Public License version 2 as
55.1 --- a/src/core/unix-system-wall-clock-ms.cc Mon Mar 31 16:22:06 2008 -0700
55.2 +++ b/src/core/unix-system-wall-clock-ms.cc Mon Mar 31 16:22:24 2008 -0700
55.3 @@ -1,7 +1,6 @@
55.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
55.5 /*
55.6 * Copyright (c) 2005 INRIA
55.7 - * All rights reserved.
55.8 *
55.9 * This program is free software; you can redistribute it and/or modify
55.10 * it under the terms of the GNU General Public License version 2 as
56.1 --- a/src/core/win32-system-wall-clock-ms.cc Mon Mar 31 16:22:06 2008 -0700
56.2 +++ b/src/core/win32-system-wall-clock-ms.cc Mon Mar 31 16:22:24 2008 -0700
56.3 @@ -1,7 +1,6 @@
56.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
56.5 /*
56.6 * Copyright (c) 2005 INRIA
56.7 - * All rights reserved.
56.8 *
56.9 * This program is free software; you can redistribute it and/or modify
56.10 * it under the terms of the GNU General Public License version 2 as
57.1 --- a/src/devices/csma/backoff.cc Mon Mar 31 16:22:06 2008 -0700
57.2 +++ b/src/devices/csma/backoff.cc Mon Mar 31 16:22:24 2008 -0700
57.3 @@ -1,7 +1,6 @@
57.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
57.5 /*
57.6 * Copyright (c) 2007, Emmanuelle Laprise
57.7 - * All rights reserved.
57.8 *
57.9 * This program is free software; you can redistribute it and/or modify
57.10 * it under the terms of the GNU General Public License version 2 as
58.1 --- a/src/devices/csma/csma-channel.cc Mon Mar 31 16:22:06 2008 -0700
58.2 +++ b/src/devices/csma/csma-channel.cc Mon Mar 31 16:22:24 2008 -0700
58.3 @@ -1,7 +1,6 @@
58.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
58.5 /*
58.6 * Copyright (c) 2007 Emmanuelle Laprise
58.7 - * All rights reserved.
58.8 *
58.9 * This program is free software; you can redistribute it and/or modify
58.10 * it under the terms of the GNU General Public License version 2 as
59.1 --- a/src/devices/csma/csma-ipv4-topology.cc Mon Mar 31 16:22:06 2008 -0700
59.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59.3 @@ -1,165 +0,0 @@
59.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
59.5 -//
59.6 -// Copyright (c) 2007 Emmanuelle Laprise
59.7 -//
59.8 -// This program is free software; you can redistribute it and/or modify
59.9 -// it under the terms of the GNU General Public License version 2 as
59.10 -// published by the Free Software Foundation;
59.11 -//
59.12 -// This program is distributed in the hope that it will be useful,
59.13 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
59.14 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59.15 -// GNU General Public License for more details.
59.16 -//
59.17 -// You should have received a copy of the GNU General Public License
59.18 -// along with this program; if not, write to the Free Software
59.19 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
59.20 -//
59.21 -// Author: Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
59.22 -//
59.23 -
59.24 -#include <algorithm>
59.25 -#include "ns3/assert.h"
59.26 -#include "ns3/fatal-error.h"
59.27 -#include "ns3/nstime.h"
59.28 -#include "ns3/internet-node.h"
59.29 -#include "ns3/ipv4-address.h"
59.30 -#include "ns3/ipv4.h"
59.31 -#include "ns3/queue.h"
59.32 -#include "ns3/drop-tail-queue.h"
59.33 -#include "ns3/string.h"
59.34 -
59.35 -#include "csma-channel.h"
59.36 -#include "csma-net-device.h"
59.37 -#include "csma-ipv4-topology.h"
59.38 -
59.39 -namespace ns3 {
59.40 -
59.41 -uint32_t
59.42 -CsmaIpv4Topology::AddIpv4CsmaNetDevice(
59.43 - Ptr<Node> node,
59.44 - Ptr<CsmaChannel> channel,
59.45 - Mac48Address addr)
59.46 -{
59.47 - Ptr<Queue> q = CreateObject<DropTailQueue> ();
59.48 -
59.49 - // assume full-duplex
59.50 - Ptr<CsmaNetDevice> nd = CreateObject<CsmaNetDevice> ("Address", addr,
59.51 - "EncapsulationMode", String ("IpArp"));
59.52 - node->AddDevice (nd);
59.53 -
59.54 - nd->AddQueue(q);
59.55 - nd->Attach (channel);
59.56 - return nd->GetIfIndex ();
59.57 -}
59.58 -
59.59 -
59.60 -void
59.61 -CsmaIpv4Topology::AddIpv4LlcCsmaNode(Ptr<Node> n1,
59.62 - Ptr<CsmaChannel> ch,
59.63 - Mac48Address addr)
59.64 -{
59.65 - Ptr<Queue> q = CreateObject<DropTailQueue> ();
59.66 -
59.67 - Ptr<CsmaNetDevice> nd0 = CreateObject<CsmaNetDevice> ("Address", addr,
59.68 - "EncapsulationMode", String ("Llc"));
59.69 - n1->AddDevice (nd0);
59.70 - nd0->SetSendEnable (true);
59.71 - nd0->SetReceiveEnable (false);
59.72 - nd0->AddQueue(q);
59.73 - nd0->Attach (ch);
59.74 -
59.75 - Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Address", addr,
59.76 - "EncapsulationMode", String ("Llc"));
59.77 - n1->AddDevice (nd1);
59.78 - nd1->SetSendEnable (false);
59.79 - nd1->SetReceiveEnable (true);
59.80 - nd1->AddQueue(q);
59.81 - nd1->Attach (ch);
59.82 -}
59.83 -
59.84 -void
59.85 -CsmaIpv4Topology::AddIpv4RawCsmaNode(Ptr<Node> n1,
59.86 - Ptr<CsmaChannel> ch,
59.87 - Mac48Address addr)
59.88 -{
59.89 - Ptr<Queue> q = CreateObject<DropTailQueue> ();
59.90 -
59.91 - Ptr<CsmaNetDevice> nd0 = CreateObject<CsmaNetDevice> ("Address", addr,
59.92 - "EncapsulationMode", String ("Raw"));
59.93 - n1->AddDevice (nd0);
59.94 - nd0->SetSendEnable (true);
59.95 - nd0->SetReceiveEnable (false);
59.96 - nd0->AddQueue(q);
59.97 - nd0->Attach (ch);
59.98 -
59.99 - Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Address", addr,
59.100 - "EncapsulationMode", String ("Raw"));
59.101 - n1->AddDevice (nd1);
59.102 - nd1->SetSendEnable (false);
59.103 - nd1->SetReceiveEnable (true);
59.104 -
59.105 - nd1->AddQueue(q);
59.106 - nd1->Attach (ch);
59.107 -}
59.108 -
59.109 -uint32_t
59.110 -CsmaIpv4Topology::AddIpv4Address(
59.111 - Ptr<Node> node,
59.112 - uint32_t netDeviceNumber,
59.113 - const Ipv4Address address,
59.114 - const Ipv4Mask mask,
59.115 - uint16_t metric)
59.116 -{
59.117 - Ptr<NetDevice> nd = node->GetDevice(netDeviceNumber);
59.118 -
59.119 - Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
59.120 - uint32_t ifIndex = ipv4->AddInterface (nd);
59.121 -
59.122 - ipv4->SetAddress (ifIndex, address);
59.123 - ipv4->SetNetworkMask (ifIndex, mask);
59.124 - ipv4->SetMetric (ifIndex, metric);
59.125 - ipv4->SetUp (ifIndex);
59.126 - return ifIndex;
59.127 -}
59.128 -
59.129 -void
59.130 -CsmaIpv4Topology::AddIpv4Routes (
59.131 - Ptr<NetDevice> nd1, Ptr<NetDevice> nd2)
59.132 -{
59.133 - // Assert that both are Ipv4 nodes
59.134 - Ptr<Ipv4> ip1 = nd1->GetNode ()->GetObject<Ipv4> ();
59.135 - Ptr<Ipv4> ip2 = nd2->GetNode ()->GetObject<Ipv4> ();
59.136 - NS_ASSERT(ip1 != 0 && ip2 != 0);
59.137 -
59.138 - // Get interface indexes for both nodes corresponding to the right channel
59.139 - uint32_t index1 = 0;
59.140 - bool found = false;
59.141 - for (uint32_t i = 0; i < ip1->GetNInterfaces (); i++)
59.142 - {
59.143 - if (ip1 ->GetNetDevice (i) == nd1)
59.144 - {
59.145 - index1 = i;
59.146 - found = true;
59.147 - }
59.148 - }
59.149 - NS_ASSERT (found);
59.150 -
59.151 - uint32_t index2 = 0;
59.152 - found = false;
59.153 - for (uint32_t i = 0; i < ip2->GetNInterfaces (); i++)
59.154 - {
59.155 - if (ip2 ->GetNetDevice (i) == nd2)
59.156 - {
59.157 - index2 = i;
59.158 - found = true;
59.159 - }
59.160 - }
59.161 - NS_ASSERT (found);
59.162 -
59.163 - ip1->AddHostRouteTo (ip2-> GetAddress (index2), index1);
59.164 - ip2->AddHostRouteTo (ip1-> GetAddress (index1), index2);
59.165 -}
59.166 -
59.167 -} // namespace ns3
59.168 -
60.1 --- a/src/devices/csma/csma-ipv4-topology.h Mon Mar 31 16:22:06 2008 -0700
60.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
60.3 @@ -1,129 +0,0 @@
60.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
60.5 -//
60.6 -// Copyright (c) 2007 Emmanuelle Laprise
60.7 -//
60.8 -// This program is free software; you can redistribute it and/or modify
60.9 -// it under the terms of the GNU General Public License version 2 as
60.10 -// published by the Free Software Foundation;
60.11 -//
60.12 -// This program is distributed in the hope that it will be useful,
60.13 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
60.14 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60.15 -// GNU General Public License for more details.
60.16 -//
60.17 -// You should have received a copy of the GNU General Public License
60.18 -// along with this program; if not, write to the Free Software
60.19 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
60.20 -//
60.21 -// Author: Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
60.22 -//
60.23 -
60.24 -#ifndef __CSMA_IPV4_TOPOLOGY_H__
60.25 -#define __CSMA_IPV4_TOPOLOGY_H__
60.26 -
60.27 -#include "ns3/ptr.h"
60.28 -#include "ns3/ipv4-address.h"
60.29 -#include "ns3/ipv4.h"
60.30 -#include "ns3/ipv4-route.h"
60.31 -#include "ns3/internet-node.h"
60.32 -#include "ns3/csma-net-device.h"
60.33 -
60.34 -// The topology class consists of only static methods thar are used to
60.35 -// create the topology and data flows for an ns3 simulation
60.36 -
60.37 -namespace ns3 {
60.38 -
60.39 -class CsmaIpv4Channel;
60.40 -class Node;
60.41 -class IPAddr;
60.42 -class DataRate;
60.43 -class Queue;
60.44 -
60.45 -/**
60.46 - * \brief A helper class to create Topologies based on the
60.47 - * InternetNodes and CsmaChannels. Either the
60.48 - * SimpleCsmaNetDevice or the LLCCsmaNetDevice can be used
60.49 - * when constructing these topologies.
60.50 - */
60.51 -class CsmaIpv4Topology {
60.52 -public:
60.53 -
60.54 - /**
60.55 - * \param node Node to be attached to the Csma channel
60.56 - * \param channel CsmaChannel to which node n1 should be attached
60.57 - * \param addr Mac address of the node
60.58 - *
60.59 - * Add a Csma node to a Csma channel. This function adds
60.60 - * a EthernetCsmaNetDevice to the nodes so that they can
60.61 - * connect to a CsmaChannel. This means that Ethernet headers
60.62 - * and trailers will be added to the packet before sending out on
60.63 - * the net device.
60.64 - *
60.65 - * \return ifIndex of the device
60.66 - */
60.67 - static uint32_t AddIpv4CsmaNetDevice(Ptr<Node> node,
60.68 - Ptr<CsmaChannel> channel,
60.69 - Mac48Address addr);
60.70 -
60.71 - /**
60.72 - * \param n1 Node to be attached to the Csma channel
60.73 - * \param ch CsmaChannel to which node n1 should be attached
60.74 - * \param addr Mac address of the node
60.75 - *
60.76 - * Add a Csma node to a Csma channel. This function adds
60.77 - * a RawCsmaNetDevice to the nodes so that they can connect
60.78 - * to a CsmaChannel.
60.79 - */
60.80 - static void AddIpv4RawCsmaNode( Ptr<Node> n1,
60.81 - Ptr<CsmaChannel> ch,
60.82 - Mac48Address addr);
60.83 -
60.84 - /**
60.85 - * \param n1 Node to be attached to the Csma channel
60.86 - * \param ch CsmaChannel to which node n1 should be attached
60.87 - * \param addr Mac address of the node
60.88 - *
60.89 - * Add a Csma node to a Csma channel. This function adds
60.90 - * a LlcCsmaNetDevice to the nodes so that they can connect
60.91 - * to a CsmaChannel.
60.92 - */
60.93 - static void AddIpv4LlcCsmaNode( Ptr<Node> n1,
60.94 - Ptr<CsmaChannel> ch,
60.95 - Mac48Address addr);
60.96 -
60.97 -
60.98 -
60.99 - /**
60.100 - * \brief Create an Ipv4 interface for a net device and assign an
60.101 - * Ipv4Address to that interface.
60.102 - *
60.103 - * \param node The node to which to add the new address and corresponding
60.104 - * interface.
60.105 - * \param netDeviceNumber The NetDevice index number with which to associate
60.106 - * the address.
60.107 - * \param address The Ipv4 Address for the interface.
60.108 - * \param mask The network mask for the interface
60.109 - * \param metric (optional) metric (cost) to assign for routing calculations
60.110 - *
60.111 - * Add an Ipv4Address to the Ipv4 interface associated with the
60.112 - * ndNum CsmaIpv4NetDevices on the provided CsmaIpv4Channel
60.113 - */
60.114 - static uint32_t AddIpv4Address(Ptr<Node> node,
60.115 - uint32_t netDeviceNumber,
60.116 - const Ipv4Address address,
60.117 - const Ipv4Mask mask,
60.118 - uint16_t metric = 1);
60.119 -
60.120 - /**
60.121 - * \param nd1 Node
60.122 - * \param nd2 Node
60.123 - *
60.124 - * Add an IPV4 host route between the two specified net devices
60.125 - */
60.126 - static void AddIpv4Routes (Ptr<NetDevice> nd1, Ptr<NetDevice> nd2);
60.127 -};
60.128 -
60.129 -} // namespace ns3
60.130 -
60.131 -#endif
60.132 -
61.1 --- a/src/devices/csma/csma-net-device.cc Mon Mar 31 16:22:06 2008 -0700
61.2 +++ b/src/devices/csma/csma-net-device.cc Mon Mar 31 16:22:24 2008 -0700
61.3 @@ -1,7 +1,6 @@
61.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
61.5 /*
61.6 * Copyright (c) 2007 Emmanuelle Laprise
61.7 - * All rights reserved.
61.8 *
61.9 * This program is free software; you can redistribute it and/or modify
61.10 * it under the terms of the GNU General Public License version 2 as
62.1 --- a/src/devices/csma/csma-topology.cc Mon Mar 31 16:22:06 2008 -0700
62.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
62.3 @@ -1,102 +0,0 @@
62.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
62.5 -//
62.6 -// Copyright (c) 2007 Emmanuelle Laprise
62.7 -//
62.8 -// This program is free software; you can redistribute it and/or modify
62.9 -// it under the terms of the GNU General Public License version 2 as
62.10 -// published by the Free Software Foundation;
62.11 -//
62.12 -// This program is distributed in the hope that it will be useful,
62.13 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
62.14 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62.15 -// GNU General Public License for more details.
62.16 -//
62.17 -// You should have received a copy of the GNU General Public License
62.18 -// along with this program; if not, write to the Free Software
62.19 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
62.20 -//
62.21 -// Author: Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
62.22 -//
62.23 -
62.24 -//
62.25 -// Topology helper for Csma channels in ns3.
62.26 -
62.27 -#include "ns3/assert.h"
62.28 -#include "ns3/queue.h"
62.29 -
62.30 -#include "csma-channel.h"
62.31 -#include "csma-net-device.h"
62.32 -#include "csma-topology.h"
62.33 -#include "ns3/socket-factory.h"
62.34 -
62.35 -namespace ns3 {
62.36 -
62.37 -Ptr<CsmaChannel>
62.38 -CsmaTopology::CreateCsmaChannel(
62.39 - const DataRate& bps,
62.40 - const Time& delay)
62.41 -{
62.42 - Ptr<CsmaChannel> channel = CreateObject<CsmaChannel> ("BitRate", bps, "Delay", delay);
62.43 -
62.44 - return channel;
62.45 -}
62.46 -
62.47 -#if 0
62.48 -Ptr<CsmaNetDevice>
62.49 -CsmaTopology::AddCsmaEthernetNode(
62.50 - Ptr<Node> n1,
62.51 - Ptr<CsmaChannel> ch,
62.52 - Mac48Address addr)
62.53 -{
62.54 - Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Address", addr,
62.55 - "EncapsulationMode", "EthernetV1");
62.56 -
62.57 - Ptr<Queue> q = Queue::CreateDefault ();
62.58 - nd1->AddQueue(q);
62.59 - nd1->Attach (ch);
62.60 -
62.61 - return nd1;
62.62 -}
62.63 -
62.64 -Ptr<PacketSocket>
62.65 -CsmaTopology::ConnectPacketSocket(Ptr<PacketSocketApp> app,
62.66 - Ptr<CsmaNetDevice> ndSrc,
62.67 - Ptr<CsmaNetDevice> ndDest)
62.68 -{
62.69 - Ptr<PacketSocket> socket = CreateObject<PacketSocket> ();
62.70 - socket->Bind(ndSrc);
62.71 - socket->Connect(ndDest->GetAddress());
62.72 - app->Connect(socket);
62.73 -
62.74 - return socket;
62.75 -}
62.76 -
62.77 -Ptr<PacketSocket>
62.78 -CsmaTopology::ConnectPacketSocket(Ptr<PacketSocketApp> app,
62.79 - Ptr<CsmaNetDevice> ndSrc,
62.80 - MacAddress macAddr)
62.81 -{
62.82 - Ptr<PacketSocket> socket = CreateObject<PacketSocket> ();
62.83 - socket->Bind(ndSrc);
62.84 - socket->Connect(macAddr);
62.85 - app->Connect(socket);
62.86 -
62.87 - return socket;
62.88 -}
62.89 -
62.90 -Ptr<Socket>
62.91 -CsmaTopology::CreatePacketSocket(Ptr<Node> n1, std::string tid_name)
62.92 -{
62.93 - TypeId tid = TypeId::LookupByName (tid_name);
62.94 -
62.95 - Ptr<SocketFactory> socketFactory =
62.96 - n1->GetObject<SocketFactory> (tid);
62.97 -
62.98 - Ptr<Socket> socket = socketFactory->CreateSocket ();
62.99 -
62.100 - return socket;
62.101 -}
62.102 -#endif
62.103 -
62.104 -} // namespace ns3
62.105 -
63.1 --- a/src/devices/csma/csma-topology.h Mon Mar 31 16:22:06 2008 -0700
63.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
63.3 @@ -1,123 +0,0 @@
63.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
63.5 -//
63.6 -// Copyright (c) 2007 Emmanuelle Laprise
63.7 -//
63.8 -// This program is free software; you can redistribute it and/or modify
63.9 -// it under the terms of the GNU General Public License version 2 as
63.10 -// published by the Free Software Foundation;
63.11 -//
63.12 -// This program is distributed in the hope that it will be useful,
63.13 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
63.14 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63.15 -// GNU General Public License for more details.
63.16 -//
63.17 -// You should have received a copy of the GNU General Public License
63.18 -// along with this program; if not, write to the Free Software
63.19 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
63.20 -//
63.21 -// Author: Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
63.22 -//
63.23 -// Topology helper for multipoint channels in ns3.
63.24 -//
63.25 -#ifndef CSMA_TOPOLOGY_H
63.26 -#define CSMA_TOPOLOGY_H
63.27 -
63.28 -#include "ns3/ptr.h"
63.29 -#include "ns3/csma-net-device.h"
63.30 -#include "ns3/node.h"
63.31 -
63.32 -// The topology class consists of only static methods thar are used to
63.33 -// create the topology and data flows for an ns3 simulation
63.34 -
63.35 -namespace ns3 {
63.36 -
63.37 -class CsmaChannel;
63.38 -class Node;
63.39 -class DataRate;
63.40 -class Queue;
63.41 -
63.42 -/**
63.43 - * \brief A helper class to create Csma Topologies
63.44 - *
63.45 - * Csma topologies are created based on the
63.46 - * ns3::CsmaNetDevice subclasses and ns3::CsmaChannel
63.47 - * objects. This class uses the EthernetNetDevice and
63.48 - * PacketSocket classes in order to create logical connections between
63.49 - * net devices. The PacketSocket class generates the data and the
63.50 - * EthernetNetDevice class creates ethernet packets from the
63.51 - * data, filling in source and destination addresses. The
63.52 - * EthernetNetDevice class filters received data packets
63.53 - * according to its destination Mac addresses.
63.54 - */
63.55 -class CsmaTopology {
63.56 -public:
63.57 - /**
63.58 - * \param dataRate Maximum transmission link rate
63.59 - * \param delay propagation delay between any two nodes
63.60 - * \return Pointer to the created CsmaChannel
63.61 - *
63.62 - * Create a CsmaChannel. All nodes connected to a multipoint
63.63 - * channels will receive all packets written to that channel
63.64 - */
63.65 - static Ptr<CsmaChannel> CreateCsmaChannel(
63.66 - const DataRate& dataRate, const Time& delay);
63.67 -
63.68 -#if 0
63.69 - /**
63.70 - * \param n1 Node to be attached to the multipoint channel
63.71 - * \param ch CsmaChannel to which node n1 should be attached
63.72 - * \param addr MacAddress that should be assigned to the
63.73 - * EthernetNetDevice that will be added to the node.
63.74 - *
63.75 - * Add a multipoint node to a multipoint channel
63.76 - */
63.77 - static Ptr<CsmaNetDevice> AddCsmaEthernetNode(Ptr<Node> n1,
63.78 - Ptr<CsmaChannel> ch,
63.79 - MacAddress addr);
63.80 -
63.81 - /**
63.82 - * \param app Application that will be sending data to the agent
63.83 - * \param ndSrc Net Device that will be sending the packets onto the
63.84 - * network
63.85 - * \param ndDest Net Device to which ndSrc will be sending the packets
63.86 - * \return A pointer to the PacketSocket
63.87 - *
63.88 - * Creates an PacketSocket and configure it to send packets between
63.89 - * two net devices
63.90 - */
63.91 -static Ptr<PacketSocket> ConnectPacketSocket(Ptr<PacketSocketApp> app,
63.92 - Ptr<CsmaNetDevice> ndSrc,
63.93 - Ptr<CsmaNetDevice> ndDest);
63.94 -
63.95 - /**
63.96 - * \param app Application that will be sending data to the agent
63.97 - * \param ndSrc Net Device that will be sending the packets onto the
63.98 - * network
63.99 - * \param macAddr Mac destination address for the packets send by
63.100 - * the ndSrc net device \return a Pointer to the created
63.101 - * PacketSocket
63.102 - *
63.103 - * Creates an PacketSocket and configure it to send packets from a
63.104 - * net device to a destination MacAddress
63.105 - */
63.106 -static Ptr<PacketSocket> ConnectPacketSocket(Ptr<PacketSocketApp> app,
63.107 - Ptr<CsmaNetDevice> ndSrc,
63.108 - MacAddress macAddr);
63.109 -
63.110 - /**
63.111 - * \param n1 Node from which socketfactory should be tested.
63.112 - * \param tid_name Interface identifier ("ns3::PacketSocketFactory", in this case)
63.113 - *
63.114 - * This is a test function to make sure that a socket can be created
63.115 - * by using the socketfactory interface provided in the
63.116 - * netdevicenode.
63.117 - */
63.118 -static Ptr<Socket> CreatePacketSocket(Ptr<Node> n1,
63.119 - std::string tid_name);
63.120 -#endif
63.121 -
63.122 -};
63.123 -} // namespace ns3
63.124 -
63.125 -#endif
63.126 -
64.1 --- a/src/devices/csma/wscript Mon Mar 31 16:22:06 2008 -0700
64.2 +++ b/src/devices/csma/wscript Mon Mar 31 16:22:24 2008 -0700
64.3 @@ -6,8 +6,6 @@
64.4 'backoff.cc',
64.5 'csma-net-device.cc',
64.6 'csma-channel.cc',
64.7 - 'csma-topology.cc',
64.8 - 'csma-ipv4-topology.cc',
64.9 ]
64.10 headers = bld.create_obj('ns3header')
64.11 headers.module = 'csma'
64.12 @@ -15,6 +13,4 @@
64.13 'backoff.h',
64.14 'csma-net-device.h',
64.15 'csma-channel.h',
64.16 - 'csma-topology.h',
64.17 - 'csma-ipv4-topology.h',
64.18 ]
65.1 --- a/src/devices/point-to-point/point-to-point-channel.cc Mon Mar 31 16:22:06 2008 -0700
65.2 +++ b/src/devices/point-to-point/point-to-point-channel.cc Mon Mar 31 16:22:24 2008 -0700
65.3 @@ -1,7 +1,6 @@
65.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
65.5 /*
65.6 * Copyright (c) 2007 University of Washington
65.7 - * All rights reserved.
65.8 *
65.9 * This program is free software; you can redistribute it and/or modify
65.10 * it under the terms of the GNU General Public License version 2 as
66.1 --- a/src/devices/point-to-point/point-to-point-net-device.cc Mon Mar 31 16:22:06 2008 -0700
66.2 +++ b/src/devices/point-to-point/point-to-point-net-device.cc Mon Mar 31 16:22:24 2008 -0700
66.3 @@ -1,7 +1,6 @@
66.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
66.5 /*
66.6 * Copyright (c) 2005,2006 INRIA
66.7 - * All rights reserved.
66.8 *
66.9 * This program is free software; you can redistribute it and/or modify
66.10 * it under the terms of the GNU General Public License version 2 as
67.1 --- a/src/devices/point-to-point/point-to-point-topology.cc Mon Mar 31 16:22:06 2008 -0700
67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
67.3 @@ -1,252 +0,0 @@
67.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
67.5 -//
67.6 -// Copyright (c) 2006 Georgia Tech Research Corporation
67.7 -//
67.8 -// This program is free software; you can redistribute it and/or modify
67.9 -// it under the terms of the GNU General Public License version 2 as
67.10 -// published by the Free Software Foundation;
67.11 -//
67.12 -// This program is distributed in the hope that it will be useful,
67.13 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
67.14 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67.15 -// GNU General Public License for more details.
67.16 -//
67.17 -// You should have received a copy of the GNU General Public License
67.18 -// along with this program; if not, write to the Free Software
67.19 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
67.20 -//
67.21 -// Author: George F. Riley<riley@ece.gatech.edu>
67.22 -//
67.23 -
67.24 -//
67.25 -// Topology helper for ns3.
67.26 -// George F. Riley, Georgia Tech, Spring 2007
67.27 -
67.28 -#include <algorithm>
67.29 -#include "ns3/assert.h"
67.30 -#include "ns3/log.h"
67.31 -#include "ns3/fatal-error.h"
67.32 -#include "ns3/nstime.h"
67.33 -#include "ns3/internet-node.h"
67.34 -#include "ns3/ipv4-address.h"
67.35 -#include "ns3/ipv4.h"
67.36 -#include "ns3/queue.h"
67.37 -#include "ns3/drop-tail-queue.h"
67.38 -
67.39 -#include "point-to-point-channel.h"
67.40 -#include "point-to-point-net-device.h"
67.41 -#include "point-to-point-topology.h"
67.42 -
67.43 -namespace ns3 {
67.44 -
67.45 -Ptr<PointToPointChannel>
67.46 -PointToPointTopology::AddPointToPointLink(
67.47 - Ptr<Node> n1,
67.48 - Ptr<Node> n2,
67.49 - const DataRate& bps,
67.50 - const Time& delay)
67.51 -{
67.52 - Ptr<PointToPointChannel> channel = CreateObject<PointToPointChannel> ("BitRate", bps, "Delay", delay);
67.53 -
67.54 - Ptr<PointToPointNetDevice> net1 = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
67.55 - n1->AddDevice (net1);
67.56 -
67.57 - Ptr<Queue> q = CreateObject<DropTailQueue> ();
67.58 - net1->AddQueue(q);
67.59 - net1->Attach (channel);
67.60 -
67.61 - Ptr<PointToPointNetDevice> net2 = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
67.62 - n2->AddDevice (net2);
67.63 -
67.64 - q = CreateObject<DropTailQueue> ();
67.65 - net2->AddQueue(q);
67.66 - net2->Attach (channel);
67.67 -
67.68 - return channel;
67.69 -}
67.70 -
67.71 -Ptr<PointToPointNetDevice>
67.72 -PointToPointTopology::GetNetDevice (Ptr<Node> n, Ptr<PointToPointChannel> chan)
67.73 -{
67.74 - Ptr<PointToPointNetDevice> found = 0;
67.75 -
67.76 - // The PointToPoint channel is used to find the relevant NetDevice
67.77 - NS_ASSERT (chan->GetNDevices () == 2);
67.78 - Ptr<PointToPointNetDevice> nd1 = chan->GetPointToPointDevice (0);
67.79 - Ptr<PointToPointNetDevice> nd2 = chan->GetPointToPointDevice (1);
67.80 - if ( nd1->GetNode ()->GetId () == n->GetId () )
67.81 - {
67.82 - found = nd1;
67.83 - }
67.84 - else if ( nd2->GetNode ()->GetId () == n->GetId () )
67.85 - {
67.86 - found = nd2;
67.87 - }
67.88 - else
67.89 - {
67.90 - NS_ASSERT (found);
67.91 - }
67.92 - return found;
67.93 -}
67.94 -
67.95 -void
67.96 -PointToPointTopology::AddIpv4Addresses(
67.97 - Ptr<const PointToPointChannel> chan,
67.98 - Ptr<Node> n1, const Ipv4Address& addr1,
67.99 - Ptr<Node> n2, const Ipv4Address& addr2)
67.100 -{
67.101 -
67.102 - // Duplex link is assumed to be subnetted as a /30
67.103 - // May run this unnumbered in the future?
67.104 - Ipv4Mask netmask("255.255.255.252");
67.105 - NS_ASSERT (netmask.IsMatch(addr1,addr2));
67.106 -
67.107 - // The PointToPoint channel is used to find the relevant NetDevices
67.108 - NS_ASSERT (chan->GetNDevices () == 2);
67.109 - Ptr<NetDevice> nd1 = chan->GetDevice (0);
67.110 - Ptr<NetDevice> nd2 = chan->GetDevice (1);
67.111 - // Make sure that nd1 belongs to n1 and nd2 to n2
67.112 - if ( (nd1->GetNode ()->GetId () == n2->GetId () ) &&
67.113 - (nd2->GetNode ()->GetId () == n1->GetId () ) )
67.114 - {
67.115 - std::swap(nd1, nd2);
67.116 - }
67.117 - NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ());
67.118 - NS_ASSERT (nd2->GetNode ()->GetId () == n2->GetId ());
67.119 -
67.120 - Ptr<Ipv4> ip1 = n1->GetObject<Ipv4> ();
67.121 - uint32_t index1 = ip1->AddInterface (nd1);
67.122 -
67.123 - ip1->SetAddress (index1, addr1);
67.124 - ip1->SetNetworkMask (index1, netmask);
67.125 - ip1->SetUp (index1);
67.126 -
67.127 - Ptr<Ipv4> ip2 = n2->GetObject<Ipv4> ();
67.128 - uint32_t index2 = ip2->AddInterface (nd2);
67.129 -
67.130 - ip2->SetAddress (index2, addr2);
67.131 - ip2->SetNetworkMask (index2, netmask);
67.132 - ip2->SetUp (index2);
67.133 -
67.134 -}
67.135 -
67.136 -void
67.137 -PointToPointTopology::SetIpv4Metric(
67.138 - Ptr<const PointToPointChannel> chan,
67.139 - Ptr<Node> n1, Ptr<Node> n2, uint16_t metric)
67.140 -{
67.141 -
67.142 - // The PointToPoint channel is used to find the relevant NetDevices
67.143 - NS_ASSERT (chan->GetNDevices () == 2);
67.144 - Ptr<NetDevice> nd1 = chan->GetDevice (0);
67.145 - Ptr<NetDevice> nd2 = chan->GetDevice (1);
67.146 - // Make sure that nd1 belongs to n1 and nd2 to n2
67.147 - if ( (nd1->GetNode ()->GetId () == n2->GetId () ) &&
67.148 - (nd2->GetNode ()->GetId () == n1->GetId () ) )
67.149 - {
67.150 - std::swap(nd1, nd2);
67.151 - }
67.152 - NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ());
67.153 - NS_ASSERT (nd2->GetNode ()->GetId () == n2->GetId ());
67.154 -
67.155 - // The NetDevice ifIndex does not correspond to the
67.156 - // ifIndex used by Ipv4. Therefore, we have to iterate
67.157 - // through the NetDevices until we find the Ipv4 ifIndex
67.158 - // that corresponds to NetDevice nd1
67.159 - // Get interface indexes for both nodes corresponding to the right channel
67.160 - uint32_t index = 0;
67.161 - bool found = false;
67.162 - Ptr<Ipv4> ip1 = n1->GetObject<Ipv4> ();
67.163 - for (uint32_t i = 0; i < ip1->GetNInterfaces (); i++)
67.164 - {
67.165 - if (ip1 ->GetNetDevice (i) == nd1)
67.166 - {
67.167 - index = i;
67.168 - found = true;
67.169 - }
67.170 - }
67.171 - NS_ASSERT(found);
67.172 - ip1->SetMetric (index, metric);
67.173 -
67.174 - index = 0;
67.175 - found = false;
67.176 - Ptr<Ipv4> ip2 = n2->GetObject<Ipv4> ();
67.177 - for (uint32_t i = 0; i < ip2->GetNInterfaces (); i++)
67.178 - {
67.179 - if (ip2 ->GetNetDevice (i) == nd2)
67.180 - {
67.181 - index = i;
67.182 - found = true;
67.183 - }
67.184 - }
67.185 - NS_ASSERT(found);
67.186 - ip2->SetMetric (index, metric);
67.187 -}
67.188 -
67.189 -void
67.190 -PointToPointTopology::AddIpv4Routes (
67.191 - Ptr<Node> n1, Ptr<Node> n2, Ptr<const PointToPointChannel> chan)
67.192 -{
67.193 - // The PointToPoint channel is used to find the relevant NetDevices
67.194 - NS_ASSERT (chan->GetNDevices () == 2);
67.195 - Ptr<NetDevice> nd1 = chan->GetDevice (0);
67.196 - Ptr<NetDevice> nd2 = chan->GetDevice (1);
67.197 -
67.198 - // Assert that n1 is the Node owning one of the two NetDevices
67.199 - // and make sure that nd1 corresponds to it
67.200 - if (nd1->GetNode ()->GetId () == n1->GetId ())
67.201 - {
67.202 - ; // Do nothing
67.203 - }
67.204 - else if (nd2->GetNode ()->GetId () == n1->GetId ())
67.205 - {
67.206 - std::swap(nd1, nd2);
67.207 - }
67.208 - else
67.209 - {
67.210 - NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel");
67.211 - }
67.212 -
67.213 - // Assert that n2 is the Node owning one of the two NetDevices
67.214 - // and make sure that nd2 corresponds to it
67.215 - if (nd2->GetNode ()->GetId () != n2->GetId ())
67.216 - {
67.217 - NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel");
67.218 - }
67.219 -
67.220 - // Assert that both are Ipv4 nodes
67.221 - Ptr<Ipv4> ip1 = nd1->GetNode ()->GetObject<Ipv4> ();
67.222 - Ptr<Ipv4> ip2 = nd2->GetNode ()->GetObject<Ipv4> ();
67.223 - NS_ASSERT(ip1 != 0 && ip2 != 0);
67.224 -
67.225 - // Get interface indexes for both nodes corresponding to the right channel
67.226 - uint32_t index1 = 0;
67.227 - bool found = false;
67.228 - for (uint32_t i = 0; i < ip1->GetNInterfaces (); i++)
67.229 - {
67.230 - if (ip1 ->GetNetDevice (i) == nd1)
67.231 - {
67.232 - index1 = i;
67.233 - found = true;
67.234 - }
67.235 - }
67.236 - NS_ASSERT(found);
67.237 -
67.238 - uint32_t index2 = 0;
67.239 - found = false;
67.240 - for (uint32_t i = 0; i < ip2->GetNInterfaces (); i++)
67.241 - {
67.242 - if (ip2 ->GetNetDevice (i) == nd2)
67.243 - {
67.244 - index2 = i;
67.245 - found = true;
67.246 - }
67.247 - }
67.248 - NS_ASSERT(found);
67.249 -
67.250 - ip1->AddHostRouteTo (ip2-> GetAddress (index2), index1);
67.251 - ip2->AddHostRouteTo (ip1-> GetAddress (index1), index2);
67.252 -}
67.253 -
67.254 -} // namespace ns3
67.255 -
68.1 --- a/src/devices/point-to-point/point-to-point-topology.h Mon Mar 31 16:22:06 2008 -0700
68.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
68.3 @@ -1,112 +0,0 @@
68.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
68.5 -//
68.6 -// Copyright (c) 2006 Georgia Tech Research Corporation
68.7 -//
68.8 -// This program is free software; you can redistribute it and/or modify
68.9 -// it under the terms of the GNU General Public License version 2 as
68.10 -// published by the Free Software Foundation;
68.11 -//
68.12 -// This program is distributed in the hope that it will be useful,
68.13 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
68.14 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68.15 -// GNU General Public License for more details.
68.16 -//
68.17 -// You should have received a copy of the GNU General Public License
68.18 -// along with this program; if not, write to the Free Software
68.19 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
68.20 -//
68.21 -// Author: George F. Riley<riley@ece.gatech.edu>
68.22 -//
68.23 -// Topology helper for ns3.
68.24 -// George F. Riley, Georgia Tech, Spring 2007
68.25 -#ifndef __POINT_TO_POINT_TOPOLOGY_H__
68.26 -#define __POINT_TO_POINT_TOPOLOGY_H__
68.27 -
68.28 -#include "ns3/ptr.h"
68.29 -
68.30 -// The topology class consists of only static methods thar are used to
68.31 -// create the topology and data flows for an ns3 simulation
68.32 -
68.33 -namespace ns3 {
68.34 -
68.35 -class PointToPointChannel;
68.36 -class Node;
68.37 -class IPAddr;
68.38 -class DataRate;
68.39 -class Queue;
68.40 -
68.41 -/**
68.42 - * \brief A helper class to create Topologies based on the
68.43 - * ns3::PointToPointNetDevice and ns3::PointToPointChannel objects.
68.44 - */
68.45 -class PointToPointTopology {
68.46 -public:
68.47 - /**
68.48 - * \param n1 Node
68.49 - * \param n2 Node
68.50 - * \param dataRate Maximum transmission link rate
68.51 - * \param delay one-way propagation delay
68.52 - * \return Pointer to the underlying PointToPointChannel
68.53 - *
68.54 - * Add a full-duplex point-to-point link between two nodes
68.55 - * and attach PointToPointNetDevices to the resulting
68.56 - * PointToPointChannel.
68.57 - */
68.58 - static Ptr<PointToPointChannel> AddPointToPointLink(
68.59 - Ptr<Node> n1, Ptr<Node> n2, const DataRate& dataRate, const Time& delay);
68.60 -
68.61 - /**
68.62 - * \param n Node
68.63 - * \param chan PointToPointChannel connected to node n
68.64 - * \return Pointer to the corresponding PointToPointNetDevice
68.65 - *
68.66 - * Utility function to retrieve a PointToPointNetDevice pointer
68.67 - * corresponding to the input parameters
68.68 - */
68.69 - static Ptr<PointToPointNetDevice> GetNetDevice(
68.70 - Ptr<Node> n, Ptr<PointToPointChannel> chan);
68.71 -
68.72 - /**
68.73 - * \param chan PointToPointChannel to use
68.74 - * \param n1 Node
68.75 - * \param addr1 Ipv4 Address for n1
68.76 - * \param n2 Node
68.77 - * \param addr2 Ipv4 Address for n2
68.78 - *
68.79 - * Add Ipv4Addresses to the Ipv4 interfaces associated with the
68.80 - * two PointToPointNetDevices on the provided PointToPointChannel
68.81 - */
68.82 - static void AddIpv4Addresses(
68.83 - Ptr<const PointToPointChannel> chan,
68.84 - Ptr<Node> n1, const Ipv4Address& addr1,
68.85 - Ptr<Node> n2, const Ipv4Address& addr2);
68.86 -
68.87 - /**
68.88 - * \param chan PointToPointChannel to use
68.89 - * \param n1 Node
68.90 - * \param n2 Node
68.91 - * \param metric link metric to assign on Ipv4Link on chan between n1 and n2
68.92 - *
68.93 - * Add a non-unit-cost link metric (bidirectionally) to the Ipv4
68.94 - * interfaces associated with the two PointToPointNetDevices on the
68.95 - * provided PointToPointChannel
68.96 - */
68.97 - static void SetIpv4Metric(
68.98 - Ptr<const PointToPointChannel> chan,
68.99 - Ptr<Node> n1, Ptr<Node> n2, uint16_t metric);
68.100 -
68.101 - /**
68.102 - * \param channel PointToPointChannel to use
68.103 - * \param n1 Node
68.104 - * \param n2 Node
68.105 - *
68.106 - * For the given PointToPointChannel, for each Node, add an
68.107 - * IPv4 host route to the IPv4 address of the peer node.
68.108 - */
68.109 - static void AddIpv4Routes (Ptr<Node> n1, Ptr<Node> n2, Ptr<const PointToPointChannel> channel);
68.110 -};
68.111 -
68.112 -} // namespace ns3
68.113 -
68.114 -#endif
68.115 -
69.1 --- a/src/devices/point-to-point/wscript Mon Mar 31 16:22:06 2008 -0700
69.2 +++ b/src/devices/point-to-point/wscript Mon Mar 31 16:22:24 2008 -0700
69.3 @@ -6,7 +6,6 @@
69.4 module.source = [
69.5 'point-to-point-net-device.cc',
69.6 'point-to-point-channel.cc',
69.7 - 'point-to-point-topology.cc',
69.8 'point-to-point-test.cc',
69.9 ]
69.10 headers = bld.create_obj('ns3header')
69.11 @@ -14,6 +13,5 @@
69.12 headers.source = [
69.13 'point-to-point-net-device.h',
69.14 'point-to-point-channel.h',
69.15 - 'point-to-point-topology.h',
69.16 ]
69.17
70.1 --- a/src/devices/wifi/wifi-trace.cc Mon Mar 31 16:22:06 2008 -0700
70.2 +++ b/src/devices/wifi/wifi-trace.cc Mon Mar 31 16:22:24 2008 -0700
70.3 @@ -1,7 +1,6 @@
70.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
70.5 /*
70.6 * Copyright (c) 2007 INRIA
70.7 - * All rights reserved.
70.8 *
70.9 * This program is free software; you can redistribute it and/or modify
70.10 * it under the terms of the GNU General Public License version 2 as
71.1 --- a/src/devices/wifi/wifi-trace.h Mon Mar 31 16:22:06 2008 -0700
71.2 +++ b/src/devices/wifi/wifi-trace.h Mon Mar 31 16:22:24 2008 -0700
71.3 @@ -1,7 +1,6 @@
71.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
71.5 /*
71.6 * Copyright (c) 2007 INRIA
71.7 - * All rights reserved.
71.8 *
71.9 * This program is free software; you can redistribute it and/or modify
71.10 * it under the terms of the GNU General Public License version 2 as
72.1 --- a/src/helper/application-container.cc Mon Mar 31 16:22:06 2008 -0700
72.2 +++ b/src/helper/application-container.cc Mon Mar 31 16:22:24 2008 -0700
72.3 @@ -1,3 +1,22 @@
72.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
72.5 +/*
72.6 + * Copyright (c) 2008 INRIA
72.7 + *
72.8 + * This program is free software; you can redistribute it and/or modify
72.9 + * it under the terms of the GNU General Public License version 2 as
72.10 + * published by the Free Software Foundation;
72.11 + *
72.12 + * This program is distributed in the hope that it will be useful,
72.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
72.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72.15 + * GNU General Public License for more details.
72.16 + *
72.17 + * You should have received a copy of the GNU General Public License
72.18 + * along with this program; if not, write to the Free Software
72.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
72.20 + *
72.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
72.22 + */
72.23 #include "application-container.h"
72.24
72.25 namespace ns3 {
73.1 --- a/src/helper/application-container.h Mon Mar 31 16:22:06 2008 -0700
73.2 +++ b/src/helper/application-container.h Mon Mar 31 16:22:24 2008 -0700
73.3 @@ -1,3 +1,22 @@
73.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
73.5 +/*
73.6 + * Copyright (c) 2008 INRIA
73.7 + *
73.8 + * This program is free software; you can redistribute it and/or modify
73.9 + * it under the terms of the GNU General Public License version 2 as
73.10 + * published by the Free Software Foundation;
73.11 + *
73.12 + * This program is distributed in the hope that it will be useful,
73.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
73.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73.15 + * GNU General Public License for more details.
73.16 + *
73.17 + * You should have received a copy of the GNU General Public License
73.18 + * along with this program; if not, write to the Free Software
73.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
73.20 + *
73.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
73.22 + */
73.23 #ifndef APPLICATION_CONTAINER_H
73.24 #define APPLICATION_CONTAINER_H
73.25
73.26 @@ -42,7 +61,7 @@
73.27 */
73.28 void Add (ApplicationContainer other);
73.29 /**
73.30 - * \param device another netdevice pointer.
73.31 + * \param application another netdevice pointer.
73.32 *
73.33 * Append to the end of this container the input netdevice pointer.
73.34 */
74.1 --- a/src/helper/csma-helper.cc Mon Mar 31 16:22:06 2008 -0700
74.2 +++ b/src/helper/csma-helper.cc Mon Mar 31 16:22:24 2008 -0700
74.3 @@ -1,3 +1,22 @@
74.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
74.5 +/*
74.6 + * Copyright (c) 2008 INRIA
74.7 + *
74.8 + * This program is free software; you can redistribute it and/or modify
74.9 + * it under the terms of the GNU General Public License version 2 as
74.10 + * published by the Free Software Foundation;
74.11 + *
74.12 + * This program is distributed in the hope that it will be useful,
74.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
74.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74.15 + * GNU General Public License for more details.
74.16 + *
74.17 + * You should have received a copy of the GNU General Public License
74.18 + * along with this program; if not, write to the Free Software
74.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
74.20 + *
74.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
74.22 + */
74.23 #include "csma-helper.h"
74.24 #include "ns3/simulator.h"
74.25 #include "ns3/object-factory.h"
74.26 @@ -48,7 +67,7 @@
74.27 CsmaHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
74.28 {
74.29 std::ostringstream oss;
74.30 - oss << filename << "-" << nodeid << "-" << deviceid;
74.31 + oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
74.32 Ptr<PcapWriter> pcap = Create<PcapWriter> ();
74.33 pcap->Open (oss.str ());
74.34 pcap->WriteEthernetHeader ();
75.1 --- a/src/helper/csma-helper.h Mon Mar 31 16:22:06 2008 -0700
75.2 +++ b/src/helper/csma-helper.h Mon Mar 31 16:22:24 2008 -0700
75.3 @@ -1,3 +1,22 @@
75.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
75.5 +/*
75.6 + * Copyright (c) 2008 INRIA
75.7 + *
75.8 + * This program is free software; you can redistribute it and/or modify
75.9 + * it under the terms of the GNU General Public License version 2 as
75.10 + * published by the Free Software Foundation;
75.11 + *
75.12 + * This program is distributed in the hope that it will be useful,
75.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
75.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.15 + * GNU General Public License for more details.
75.16 + *
75.17 + * You should have received a copy of the GNU General Public License
75.18 + * along with this program; if not, write to the Free Software
75.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
75.20 + *
75.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
75.22 + */
75.23 #ifndef CSMA_HELPER_H
75.24 #define CSMA_HELPER_H
75.25
75.26 @@ -67,7 +86,7 @@
75.27 *
75.28 * Generate a pcap file which contains the link-level data observed
75.29 * by the specified deviceid within the specified nodeid. The pcap
75.30 - * data is stored in the file prefix-nodeid-deviceid.
75.31 + * data is stored in the file prefix-nodeid-deviceid.pcap.
75.32 *
75.33 * This method should be invoked after the network topology has
75.34 * been fully constructed.
76.1 --- a/src/helper/internet-stack-helper.cc Mon Mar 31 16:22:06 2008 -0700
76.2 +++ b/src/helper/internet-stack-helper.cc Mon Mar 31 16:22:24 2008 -0700
76.3 @@ -1,3 +1,22 @@
76.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
76.5 +/*
76.6 + * Copyright (c) 2008 INRIA
76.7 + *
76.8 + * This program is free software; you can redistribute it and/or modify
76.9 + * it under the terms of the GNU General Public License version 2 as
76.10 + * published by the Free Software Foundation;
76.11 + *
76.12 + * This program is distributed in the hope that it will be useful,
76.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
76.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76.15 + * GNU General Public License for more details.
76.16 + *
76.17 + * You should have received a copy of the GNU General Public License
76.18 + * along with this program; if not, write to the Free Software
76.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
76.20 + *
76.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
76.22 + */
76.23 #include "internet-stack-helper.h"
76.24 #include "ns3/internet-stack.h"
76.25 #include "ns3/packet-socket-factory.h"
77.1 --- a/src/helper/internet-stack-helper.h Mon Mar 31 16:22:06 2008 -0700
77.2 +++ b/src/helper/internet-stack-helper.h Mon Mar 31 16:22:24 2008 -0700
77.3 @@ -1,3 +1,22 @@
77.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
77.5 +/*
77.6 + * Copyright (c) 2008 INRIA
77.7 + *
77.8 + * This program is free software; you can redistribute it and/or modify
77.9 + * it under the terms of the GNU General Public License version 2 as
77.10 + * published by the Free Software Foundation;
77.11 + *
77.12 + * This program is distributed in the hope that it will be useful,
77.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
77.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77.15 + * GNU General Public License for more details.
77.16 + *
77.17 + * You should have received a copy of the GNU General Public License
77.18 + * along with this program; if not, write to the Free Software
77.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
77.20 + *
77.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
77.22 + */
77.23 #ifndef INTERNET_STACK_HELPER_H
77.24 #define INTERNET_STACK_HELPER_H
77.25
78.1 --- a/src/helper/mobility-helper.cc Mon Mar 31 16:22:06 2008 -0700
78.2 +++ b/src/helper/mobility-helper.cc Mon Mar 31 16:22:24 2008 -0700
78.3 @@ -1,3 +1,22 @@
78.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
78.5 +/*
78.6 + * Copyright (c) 2008 INRIA
78.7 + *
78.8 + * This program is free software; you can redistribute it and/or modify
78.9 + * it under the terms of the GNU General Public License version 2 as
78.10 + * published by the Free Software Foundation;
78.11 + *
78.12 + * This program is distributed in the hope that it will be useful,
78.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
78.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78.15 + * GNU General Public License for more details.
78.16 + *
78.17 + * You should have received a copy of the GNU General Public License
78.18 + * along with this program; if not, write to the Free Software
78.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
78.20 + *
78.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
78.22 + */
78.23 #include "ns3/mobility-helper.h"
78.24 #include "ns3/mobility-model.h"
78.25 #include "ns3/mobility-model-notifier.h"
79.1 --- a/src/helper/mobility-helper.h Mon Mar 31 16:22:06 2008 -0700
79.2 +++ b/src/helper/mobility-helper.h Mon Mar 31 16:22:24 2008 -0700
79.3 @@ -1,3 +1,22 @@
79.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
79.5 +/*
79.6 + * Copyright (c) 2008 INRIA
79.7 + *
79.8 + * This program is free software; you can redistribute it and/or modify
79.9 + * it under the terms of the GNU General Public License version 2 as
79.10 + * published by the Free Software Foundation;
79.11 + *
79.12 + * This program is distributed in the hope that it will be useful,
79.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
79.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79.15 + * GNU General Public License for more details.
79.16 + *
79.17 + * You should have received a copy of the GNU General Public License
79.18 + * along with this program; if not, write to the Free Software
79.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
79.20 + *
79.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
79.22 + */
79.23 #ifndef MOBILITY_HELPER_H
79.24 #define MOBILITY_HELPER_H
79.25
80.1 --- a/src/helper/net-device-container.cc Mon Mar 31 16:22:06 2008 -0700
80.2 +++ b/src/helper/net-device-container.cc Mon Mar 31 16:22:24 2008 -0700
80.3 @@ -1,3 +1,22 @@
80.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
80.5 +/*
80.6 + * Copyright (c) 2008 INRIA
80.7 + *
80.8 + * This program is free software; you can redistribute it and/or modify
80.9 + * it under the terms of the GNU General Public License version 2 as
80.10 + * published by the Free Software Foundation;
80.11 + *
80.12 + * This program is distributed in the hope that it will be useful,
80.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
80.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80.15 + * GNU General Public License for more details.
80.16 + *
80.17 + * You should have received a copy of the GNU General Public License
80.18 + * along with this program; if not, write to the Free Software
80.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
80.20 + *
80.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
80.22 + */
80.23 #include "net-device-container.h"
80.24
80.25 namespace ns3 {
81.1 --- a/src/helper/net-device-container.h Mon Mar 31 16:22:06 2008 -0700
81.2 +++ b/src/helper/net-device-container.h Mon Mar 31 16:22:24 2008 -0700
81.3 @@ -1,3 +1,22 @@
81.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
81.5 +/*
81.6 + * Copyright (c) 2008 INRIA
81.7 + *
81.8 + * This program is free software; you can redistribute it and/or modify
81.9 + * it under the terms of the GNU General Public License version 2 as
81.10 + * published by the Free Software Foundation;
81.11 + *
81.12 + * This program is distributed in the hope that it will be useful,
81.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
81.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81.15 + * GNU General Public License for more details.
81.16 + *
81.17 + * You should have received a copy of the GNU General Public License
81.18 + * along with this program; if not, write to the Free Software
81.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
81.20 + *
81.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
81.22 + */
81.23 #ifndef NET_DEVICE_CONTAINER_H
81.24 #define NET_DEVICE_CONTAINER_H
81.25
82.1 --- a/src/helper/node-container.cc Mon Mar 31 16:22:06 2008 -0700
82.2 +++ b/src/helper/node-container.cc Mon Mar 31 16:22:24 2008 -0700
82.3 @@ -1,3 +1,22 @@
82.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
82.5 +/*
82.6 + * Copyright (c) 2008 INRIA
82.7 + *
82.8 + * This program is free software; you can redistribute it and/or modify
82.9 + * it under the terms of the GNU General Public License version 2 as
82.10 + * published by the Free Software Foundation;
82.11 + *
82.12 + * This program is distributed in the hope that it will be useful,
82.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
82.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82.15 + * GNU General Public License for more details.
82.16 + *
82.17 + * You should have received a copy of the GNU General Public License
82.18 + * along with this program; if not, write to the Free Software
82.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
82.20 + *
82.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
82.22 + */
82.23 #include "node-container.h"
82.24 #include "ns3/node-list.h"
82.25
83.1 --- a/src/helper/node-container.h Mon Mar 31 16:22:06 2008 -0700
83.2 +++ b/src/helper/node-container.h Mon Mar 31 16:22:24 2008 -0700
83.3 @@ -1,3 +1,22 @@
83.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
83.5 +/*
83.6 + * Copyright (c) 2008 INRIA
83.7 + *
83.8 + * This program is free software; you can redistribute it and/or modify
83.9 + * it under the terms of the GNU General Public License version 2 as
83.10 + * published by the Free Software Foundation;
83.11 + *
83.12 + * This program is distributed in the hope that it will be useful,
83.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
83.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83.15 + * GNU General Public License for more details.
83.16 + *
83.17 + * You should have received a copy of the GNU General Public License
83.18 + * along with this program; if not, write to the Free Software
83.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
83.20 + *
83.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
83.22 + */
83.23 #ifndef NODE_CONTAINER_H
83.24 #define NODE_CONTAINER_H
83.25
84.1 --- a/src/helper/ns2-mobility-helper.cc Mon Mar 31 16:22:06 2008 -0700
84.2 +++ b/src/helper/ns2-mobility-helper.cc Mon Mar 31 16:22:24 2008 -0700
84.3 @@ -1,7 +1,6 @@
84.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
84.5 /*
84.6 * Copyright (c) 2007 INRIA
84.7 - * All rights reserved.
84.8 *
84.9 * This program is free software; you can redistribute it and/or modify
84.10 * it under the terms of the GNU General Public License version 2 as
85.1 --- a/src/helper/ns2-mobility-helper.h Mon Mar 31 16:22:06 2008 -0700
85.2 +++ b/src/helper/ns2-mobility-helper.h Mon Mar 31 16:22:24 2008 -0700
85.3 @@ -1,7 +1,6 @@
85.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
85.5 /*
85.6 * Copyright (c) 2007 INRIA
85.7 - * All rights reserved.
85.8 *
85.9 * This program is free software; you can redistribute it and/or modify
85.10 * it under the terms of the GNU General Public License version 2 as
86.1 --- a/src/helper/olsr-helper.cc Mon Mar 31 16:22:06 2008 -0700
86.2 +++ b/src/helper/olsr-helper.cc Mon Mar 31 16:22:24 2008 -0700
86.3 @@ -1,3 +1,22 @@
86.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
86.5 +/*
86.6 + * Copyright (c) 2008 INRIA
86.7 + *
86.8 + * This program is free software; you can redistribute it and/or modify
86.9 + * it under the terms of the GNU General Public License version 2 as
86.10 + * published by the Free Software Foundation;
86.11 + *
86.12 + * This program is distributed in the hope that it will be useful,
86.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
86.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86.15 + * GNU General Public License for more details.
86.16 + *
86.17 + * You should have received a copy of the GNU General Public License
86.18 + * along with this program; if not, write to the Free Software
86.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
86.20 + *
86.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
86.22 + */
86.23 #include "olsr-helper.h"
86.24 #include "ns3/olsr-agent.h"
86.25 #include "ns3/node-list.h"
87.1 --- a/src/helper/olsr-helper.h Mon Mar 31 16:22:06 2008 -0700
87.2 +++ b/src/helper/olsr-helper.h Mon Mar 31 16:22:24 2008 -0700
87.3 @@ -1,3 +1,22 @@
87.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
87.5 +/*
87.6 + * Copyright (c) 2008 INRIA
87.7 + *
87.8 + * This program is free software; you can redistribute it and/or modify
87.9 + * it under the terms of the GNU General Public License version 2 as
87.10 + * published by the Free Software Foundation;
87.11 + *
87.12 + * This program is distributed in the hope that it will be useful,
87.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
87.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87.15 + * GNU General Public License for more details.
87.16 + *
87.17 + * You should have received a copy of the GNU General Public License
87.18 + * along with this program; if not, write to the Free Software
87.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
87.20 + *
87.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
87.22 + */
87.23 #ifndef OLSR_HELPER_H
87.24 #define OLSR_HELPER_H
87.25
88.1 --- a/src/helper/on-off-helper.cc Mon Mar 31 16:22:06 2008 -0700
88.2 +++ b/src/helper/on-off-helper.cc Mon Mar 31 16:22:24 2008 -0700
88.3 @@ -1,3 +1,22 @@
88.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
88.5 +/*
88.6 + * Copyright (c) 2008 INRIA
88.7 + *
88.8 + * This program is free software; you can redistribute it and/or modify
88.9 + * it under the terms of the GNU General Public License version 2 as
88.10 + * published by the Free Software Foundation;
88.11 + *
88.12 + * This program is distributed in the hope that it will be useful,
88.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
88.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88.15 + * GNU General Public License for more details.
88.16 + *
88.17 + * You should have received a copy of the GNU General Public License
88.18 + * along with this program; if not, write to the Free Software
88.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
88.20 + *
88.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
88.22 + */
88.23 #include "on-off-helper.h"
88.24 #include "ns3/inet-socket-address.h"
88.25 #include "ns3/packet-socket-address.h"
89.1 --- a/src/helper/on-off-helper.h Mon Mar 31 16:22:06 2008 -0700
89.2 +++ b/src/helper/on-off-helper.h Mon Mar 31 16:22:24 2008 -0700
89.3 @@ -1,3 +1,22 @@
89.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
89.5 +/*
89.6 + * Copyright (c) 2008 INRIA
89.7 + *
89.8 + * This program is free software; you can redistribute it and/or modify
89.9 + * it under the terms of the GNU General Public License version 2 as
89.10 + * published by the Free Software Foundation;
89.11 + *
89.12 + * This program is distributed in the hope that it will be useful,
89.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
89.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89.15 + * GNU General Public License for more details.
89.16 + *
89.17 + * You should have received a copy of the GNU General Public License
89.18 + * along with this program; if not, write to the Free Software
89.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
89.20 + *
89.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
89.22 + */
89.23 #ifndef ON_OFF_HELPER_H
89.24 #define ON_OFF_HELPER_H
89.25
90.1 --- a/src/helper/packet-sink-helper.cc Mon Mar 31 16:22:06 2008 -0700
90.2 +++ b/src/helper/packet-sink-helper.cc Mon Mar 31 16:22:24 2008 -0700
90.3 @@ -1,3 +1,22 @@
90.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
90.5 +/*
90.6 + * Copyright (c) 2008 INRIA
90.7 + *
90.8 + * This program is free software; you can redistribute it and/or modify
90.9 + * it under the terms of the GNU General Public License version 2 as
90.10 + * published by the Free Software Foundation;
90.11 + *
90.12 + * This program is distributed in the hope that it will be useful,
90.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
90.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90.15 + * GNU General Public License for more details.
90.16 + *
90.17 + * You should have received a copy of the GNU General Public License
90.18 + * along with this program; if not, write to the Free Software
90.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
90.20 + *
90.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
90.22 + */
90.23 #include "packet-sink-helper.h"
90.24 #include "ns3/string.h"
90.25 #include "ns3/inet-socket-address.h"
91.1 --- a/src/helper/packet-sink-helper.h Mon Mar 31 16:22:06 2008 -0700
91.2 +++ b/src/helper/packet-sink-helper.h Mon Mar 31 16:22:24 2008 -0700
91.3 @@ -1,3 +1,22 @@
91.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
91.5 +/*
91.6 + * Copyright (c) 2008 INRIA
91.7 + *
91.8 + * This program is free software; you can redistribute it and/or modify
91.9 + * it under the terms of the GNU General Public License version 2 as
91.10 + * published by the Free Software Foundation;
91.11 + *
91.12 + * This program is distributed in the hope that it will be useful,
91.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
91.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
91.15 + * GNU General Public License for more details.
91.16 + *
91.17 + * You should have received a copy of the GNU General Public License
91.18 + * along with this program; if not, write to the Free Software
91.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
91.20 + *
91.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
91.22 + */
91.23 #ifndef PACKET_SINK_HELPER_H
91.24 #define PACKET_SINK_HELPER_H
91.25
92.1 --- a/src/helper/point-to-point-helper.cc Mon Mar 31 16:22:06 2008 -0700
92.2 +++ b/src/helper/point-to-point-helper.cc Mon Mar 31 16:22:24 2008 -0700
92.3 @@ -1,3 +1,22 @@
92.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
92.5 +/*
92.6 + * Copyright (c) 2008 INRIA
92.7 + *
92.8 + * This program is free software; you can redistribute it and/or modify
92.9 + * it under the terms of the GNU General Public License version 2 as
92.10 + * published by the Free Software Foundation;
92.11 + *
92.12 + * This program is distributed in the hope that it will be useful,
92.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
92.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
92.15 + * GNU General Public License for more details.
92.16 + *
92.17 + * You should have received a copy of the GNU General Public License
92.18 + * along with this program; if not, write to the Free Software
92.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
92.20 + *
92.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
92.22 + */
92.23 #include "point-to-point-helper.h"
92.24 #include "ns3/simulator.h"
92.25 #include "ns3/point-to-point-net-device.h"
92.26 @@ -48,7 +67,7 @@
92.27 PointToPointHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
92.28 {
92.29 std::ostringstream oss;
92.30 - oss << filename << "-" << nodeid << "-" << deviceid;
92.31 + oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
92.32 Ptr<PcapWriter> pcap = Create<PcapWriter> ();
92.33 pcap->Open (oss.str ());
92.34 pcap->WriteEthernetHeader ();
93.1 --- a/src/helper/point-to-point-helper.h Mon Mar 31 16:22:06 2008 -0700
93.2 +++ b/src/helper/point-to-point-helper.h Mon Mar 31 16:22:24 2008 -0700
93.3 @@ -1,3 +1,22 @@
93.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
93.5 +/*
93.6 + * Copyright (c) 2008 INRIA
93.7 + *
93.8 + * This program is free software; you can redistribute it and/or modify
93.9 + * it under the terms of the GNU General Public License version 2 as
93.10 + * published by the Free Software Foundation;
93.11 + *
93.12 + * This program is distributed in the hope that it will be useful,
93.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
93.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93.15 + * GNU General Public License for more details.
93.16 + *
93.17 + * You should have received a copy of the GNU General Public License
93.18 + * along with this program; if not, write to the Free Software
93.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
93.20 + *
93.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
93.22 + */
93.23 #ifndef POINT_TO_POINT_HELPER_H
93.24 #define POINT_TO_POINT_HELPER_H
93.25
93.26 @@ -66,7 +85,7 @@
93.27 *
93.28 * Generate a pcap file which contains the link-level data observed
93.29 * by the specified deviceid within the specified nodeid. The pcap
93.30 - * data is stored in the file prefix-nodeid-deviceid.
93.31 + * data is stored in the file prefix-nodeid-deviceid.pcap.
93.32 *
93.33 * This method should be invoked after the network topology has
93.34 * been fully constructed.
94.1 --- a/src/helper/static-multicast-route-helper.cc Mon Mar 31 16:22:06 2008 -0700
94.2 +++ b/src/helper/static-multicast-route-helper.cc Mon Mar 31 16:22:24 2008 -0700
94.3 @@ -1,3 +1,22 @@
94.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
94.5 +/*
94.6 + * Copyright (c) 2008 University of Washington
94.7 + *
94.8 + * This program is free software; you can redistribute it and/or modify
94.9 + * it under the terms of the GNU General Public License version 2 as
94.10 + * published by the Free Software Foundation;
94.11 + *
94.12 + * This program is distributed in the hope that it will be useful,
94.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
94.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94.15 + * GNU General Public License for more details.
94.16 + *
94.17 + * You should have received a copy of the GNU General Public License
94.18 + * along with this program; if not, write to the Free Software
94.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
94.20 + *
94.21 + * Author: Tom Henderson <tomhend@u.washington.edu>
94.22 + */
94.23
94.24 #include <vector>
94.25 #include "ns3/ptr.h"
95.1 --- a/src/helper/static-multicast-route-helper.h Mon Mar 31 16:22:06 2008 -0700
95.2 +++ b/src/helper/static-multicast-route-helper.h Mon Mar 31 16:22:24 2008 -0700
95.3 @@ -1,3 +1,22 @@
95.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
95.5 +/*
95.6 + * Copyright (c) 2008 University of Washington
95.7 + *
95.8 + * This program is free software; you can redistribute it and/or modify
95.9 + * it under the terms of the GNU General Public License version 2 as
95.10 + * published by the Free Software Foundation;
95.11 + *
95.12 + * This program is distributed in the hope that it will be useful,
95.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
95.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95.15 + * GNU General Public License for more details.
95.16 + *
95.17 + * You should have received a copy of the GNU General Public License
95.18 + * along with this program; if not, write to the Free Software
95.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
95.20 + *
95.21 + * Author: Tom Henderson <tomhend@u.washington.edu>
95.22 + */
95.23 #ifndef STATIC_MULTICAST_ROUTE_HELPER_H
95.24 #define STATIC_MULTICAST_ROUTE_HELPER_H
95.25
96.1 --- a/src/helper/udp-echo-helper.cc Mon Mar 31 16:22:06 2008 -0700
96.2 +++ b/src/helper/udp-echo-helper.cc Mon Mar 31 16:22:24 2008 -0700
96.3 @@ -1,3 +1,22 @@
96.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
96.5 +/*
96.6 + * Copyright (c) 2008 INRIA
96.7 + *
96.8 + * This program is free software; you can redistribute it and/or modify
96.9 + * it under the terms of the GNU General Public License version 2 as
96.10 + * published by the Free Software Foundation;
96.11 + *
96.12 + * This program is distributed in the hope that it will be useful,
96.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
96.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96.15 + * GNU General Public License for more details.
96.16 + *
96.17 + * You should have received a copy of the GNU General Public License
96.18 + * along with this program; if not, write to the Free Software
96.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
96.20 + *
96.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
96.22 + */
96.23 #include "udp-echo-helper.h"
96.24 #include "ns3/udp-echo-server.h"
96.25 #include "ns3/udp-echo-client.h"
97.1 --- a/src/helper/udp-echo-helper.h Mon Mar 31 16:22:06 2008 -0700
97.2 +++ b/src/helper/udp-echo-helper.h Mon Mar 31 16:22:24 2008 -0700
97.3 @@ -1,3 +1,22 @@
97.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
97.5 +/*
97.6 + * Copyright (c) 2008 INRIA
97.7 + *
97.8 + * This program is free software; you can redistribute it and/or modify
97.9 + * it under the terms of the GNU General Public License version 2 as
97.10 + * published by the Free Software Foundation;
97.11 + *
97.12 + * This program is distributed in the hope that it will be useful,
97.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
97.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97.15 + * GNU General Public License for more details.
97.16 + *
97.17 + * You should have received a copy of the GNU General Public License
97.18 + * along with this program; if not, write to the Free Software
97.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
97.20 + *
97.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
97.22 + */
97.23 #ifndef UDP_ECHO_HELPER_H
97.24 #define UDP_ECHO_HELPER_H
97.25
98.1 --- a/src/helper/wifi-helper.cc Mon Mar 31 16:22:06 2008 -0700
98.2 +++ b/src/helper/wifi-helper.cc Mon Mar 31 16:22:24 2008 -0700
98.3 @@ -1,3 +1,22 @@
98.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
98.5 +/*
98.6 + * Copyright (c) 2008 INRIA
98.7 + *
98.8 + * This program is free software; you can redistribute it and/or modify
98.9 + * it under the terms of the GNU General Public License version 2 as
98.10 + * published by the Free Software Foundation;
98.11 + *
98.12 + * This program is distributed in the hope that it will be useful,
98.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
98.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98.15 + * GNU General Public License for more details.
98.16 + *
98.17 + * You should have received a copy of the GNU General Public License
98.18 + * along with this program; if not, write to the Free Software
98.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
98.20 + *
98.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
98.22 + */
98.23 #include "wifi-helper.h"
98.24 #include "ns3/wifi-net-device.h"
98.25 #include "ns3/wifi-mac.h"
98.26 @@ -12,6 +31,7 @@
98.27 #include "ns3/wifi-mode.h"
98.28 #include "ns3/wifi-preamble.h"
98.29 #include "ns3/config.h"
98.30 +#include "ns3/simulator.h"
98.31
98.32
98.33
98.34 @@ -38,14 +58,14 @@
98.35 WifiMode mode, WifiPreamble preamble,
98.36 uint8_t txLevel)
98.37 {
98.38 - *os << context << " " << *packet << std::endl;
98.39 + *os << "+ " << Simulator::Now () << " " << context << " " << *packet << std::endl;
98.40 }
98.41
98.42 static void AsciiPhyRxOkEvent (std::ostream *os, std::string context,
98.43 Ptr<const Packet> packet, double snr, WifiMode mode,
98.44 enum WifiPreamble preamble)
98.45 {
98.46 - *os << context << " " << *packet << std::endl;
98.47 + *os << "r " << Simulator::Now () << " " << context << " " << *packet << std::endl;
98.48 }
98.49
98.50
98.51 @@ -129,7 +149,7 @@
98.52 WifiHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
98.53 {
98.54 std::ostringstream oss;
98.55 - oss << filename << "-" << nodeid << "-" << deviceid;
98.56 + oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
98.57 Ptr<PcapWriter> pcap = Create<PcapWriter> ();
98.58 pcap->Open (oss.str ());
98.59 pcap->WriteWifiHeader ();
99.1 --- a/src/helper/wifi-helper.h Mon Mar 31 16:22:06 2008 -0700
99.2 +++ b/src/helper/wifi-helper.h Mon Mar 31 16:22:24 2008 -0700
99.3 @@ -1,3 +1,22 @@
99.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
99.5 +/*
99.6 + * Copyright (c) 2008 INRIA
99.7 + *
99.8 + * This program is free software; you can redistribute it and/or modify
99.9 + * it under the terms of the GNU General Public License version 2 as
99.10 + * published by the Free Software Foundation;
99.11 + *
99.12 + * This program is distributed in the hope that it will be useful,
99.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
99.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
99.15 + * GNU General Public License for more details.
99.16 + *
99.17 + * You should have received a copy of the GNU General Public License
99.18 + * along with this program; if not, write to the Free Software
99.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
99.20 + *
99.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
99.22 + */
99.23 #ifndef WIFI_HELPER_H
99.24 #define WIFI_HELPER_H
99.25
99.26 @@ -128,7 +147,7 @@
99.27 *
99.28 * Generate a pcap file which contains the link-level data observed
99.29 * by the specified deviceid within the specified nodeid. The pcap
99.30 - * data is stored in the file prefix-nodeid-deviceid.
99.31 + * data is stored in the file prefix-nodeid-deviceid.pcap.
99.32 *
99.33 * This method should be invoked after the network topology has
99.34 * been fully constructed.
100.1 --- a/src/internet-node/arp-cache.cc Mon Mar 31 16:22:06 2008 -0700
100.2 +++ b/src/internet-node/arp-cache.cc Mon Mar 31 16:22:24 2008 -0700
100.3 @@ -1,7 +1,6 @@
100.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
100.5 /*
100.6 * Copyright (c) 2006 INRIA
100.7 - * All rights reserved.
100.8 *
100.9 * This program is free software; you can redistribute it and/or modify
100.10 * it under the terms of the GNU General Public License version 2 as
101.1 --- a/src/internet-node/arp-cache.h Mon Mar 31 16:22:06 2008 -0700
101.2 +++ b/src/internet-node/arp-cache.h Mon Mar 31 16:22:24 2008 -0700
101.3 @@ -1,7 +1,6 @@
101.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
101.5 /*
101.6 * Copyright (c) 2006 INRIA
101.7 - * All rights reserved.
101.8 *
101.9 * This program is free software; you can redistribute it and/or modify
101.10 * it under the terms of the GNU General Public License version 2 as
102.1 --- a/src/internet-node/arp-header.cc Mon Mar 31 16:22:06 2008 -0700
102.2 +++ b/src/internet-node/arp-header.cc Mon Mar 31 16:22:24 2008 -0700
102.3 @@ -1,7 +1,6 @@
102.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
102.5 /*
102.6 * Copyright (c) 2005 INRIA
102.7 - * All rights reserved.
102.8 *
102.9 * This program is free software; you can redistribute it and/or modify
102.10 * it under the terms of the GNU General Public License version 2 as
103.1 --- a/src/internet-node/arp-header.h Mon Mar 31 16:22:06 2008 -0700
103.2 +++ b/src/internet-node/arp-header.h Mon Mar 31 16:22:24 2008 -0700
103.3 @@ -1,7 +1,6 @@
103.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
103.5 /*
103.6 * Copyright (c) 2005 INRIA
103.7 - * All rights reserved.
103.8 *
103.9 * This program is free software; you can redistribute it and/or modify
103.10 * it under the terms of the GNU General Public License version 2 as
104.1 --- a/src/internet-node/arp-ipv4-interface.cc Mon Mar 31 16:22:06 2008 -0700
104.2 +++ b/src/internet-node/arp-ipv4-interface.cc Mon Mar 31 16:22:24 2008 -0700
104.3 @@ -1,7 +1,6 @@
104.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
104.5 /*
104.6 * Copyright (c) 2007 INRIA
104.7 - * All rights reserved.
104.8 *
104.9 * This program is free software; you can redistribute it and/or modify
104.10 * it under the terms of the GNU General Public License version 2 as
105.1 --- a/src/internet-node/arp-ipv4-interface.h Mon Mar 31 16:22:06 2008 -0700
105.2 +++ b/src/internet-node/arp-ipv4-interface.h Mon Mar 31 16:22:24 2008 -0700
105.3 @@ -1,7 +1,6 @@
105.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
105.5 /*
105.6 * Copyright (c) 2007 INRIA
105.7 - * All rights reserved.
105.8 *
105.9 * This program is free software; you can redistribute it and/or modify
105.10 * it under the terms of the GNU General Public License version 2 as
106.1 --- a/src/internet-node/arp-l3-protocol.cc Mon Mar 31 16:22:06 2008 -0700
106.2 +++ b/src/internet-node/arp-l3-protocol.cc Mon Mar 31 16:22:24 2008 -0700
106.3 @@ -1,7 +1,6 @@
106.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
106.5 /*
106.6 * Copyright (c) 2006 INRIA
106.7 - * All rights reserved.
106.8 *
106.9 * This program is free software; you can redistribute it and/or modify
106.10 * it under the terms of the GNU General Public License version 2 as
107.1 --- a/src/internet-node/arp-l3-protocol.h Mon Mar 31 16:22:06 2008 -0700
107.2 +++ b/src/internet-node/arp-l3-protocol.h Mon Mar 31 16:22:24 2008 -0700
107.3 @@ -1,7 +1,6 @@
107.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
107.5 /*
107.6 * Copyright (c) 2006 INRIA
107.7 - * All rights reserved.
107.8 *
107.9 * This program is free software; you can redistribute it and/or modify
107.10 * it under the terms of the GNU General Public License version 2 as
108.1 --- a/src/internet-node/ascii-trace.cc Mon Mar 31 16:22:06 2008 -0700
108.2 +++ b/src/internet-node/ascii-trace.cc Mon Mar 31 16:22:24 2008 -0700
108.3 @@ -1,7 +1,6 @@
108.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
108.5 /*
108.6 * Copyright (c) 2007 INRIA
108.7 - * All rights reserved.
108.8 *
108.9 * This program is free software; you can redistribute it and/or modify
108.10 * it under the terms of the GNU General Public License version 2 as
109.1 --- a/src/internet-node/ascii-trace.h Mon Mar 31 16:22:06 2008 -0700
109.2 +++ b/src/internet-node/ascii-trace.h Mon Mar 31 16:22:24 2008 -0700
109.3 @@ -1,7 +1,6 @@
109.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
109.5 /*
109.6 * Copyright (c) 2007 INRIA
109.7 - * All rights reserved.
109.8 *
109.9 * This program is free software; you can redistribute it and/or modify
109.10 * it under the terms of the GNU General Public License version 2 as
110.1 --- a/src/internet-node/internet-node.cc Mon Mar 31 16:22:06 2008 -0700
110.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
110.3 @@ -1,38 +0,0 @@
110.4 -// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
110.5 -//
110.6 -// Copyright (c) 2006 Georgia Tech Research Corporation
110.7 -// All rights reserved.
110.8 -//
110.9 -// This program is free software; you can redistribute it and/or modify
110.10 -// it under the terms of the GNU General Public License version 2 as
110.11 -// published by the Free Software Foundation;
110.12 -//
110.13 -// This program is distributed in the hope that it will be useful,
110.14 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
110.15 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
110.16 -// GNU General Public License for more details.
110.17 -//
110.18 -// You should have received a copy of the GNU General Public License
110.19 -// along with this program; if not, write to the Free Software
110.20 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
110.21 -//
110.22 -// Author: George F. Riley<riley@ece.gatech.edu>
110.23 -//
110.24 -// Implementation of the InternetNode class for ns3.
110.25 -// George F. Riley, Georgia Tech, Fall 2006
110.26 -
110.27 -#include "ns3/net-device.h"
110.28 -#include "ns3/callback.h"
110.29 -#include "internet-node.h"
110.30 -#include "internet-stack.h"
110.31 -
110.32 -
110.33 -namespace ns3 {
110.34 -
110.35 -InternetNode::InternetNode()
110.36 -{
110.37 - AddInternetStack (this);
110.38 -}
110.39 -
110.40 -
110.41 -}//namespace ns3
111.1 --- a/src/internet-node/internet-node.h Mon Mar 31 16:22:06 2008 -0700
111.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
111.3 @@ -1,65 +0,0 @@
111.4 -// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
111.5 -//
111.6 -// Copyright (c) 2006 Georgia Tech Research Corporation
111.7 -// All rights reserved.
111.8 -//
111.9 -// This program is free software; you can redistribute it and/or modify
111.10 -// it under the terms of the GNU General Public License version 2 as
111.11 -// published by the Free Software Foundation;
111.12 -//
111.13 -// This program is distributed in the hope that it will be useful,
111.14 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
111.15 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111.16 -// GNU General Public License for more details.
111.17 -//
111.18 -// You should have received a copy of the GNU General Public License
111.19 -// along with this program; if not, write to the Free Software
111.20 -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
111.21 -//
111.22 -// Author: George F. Riley<riley@ece.gatech.edu>
111.23 -//
111.24 -// Define a basic "Internet" node, with a protocol stack (l3 and l4),
111.25 -// network device list, process list, and routing.
111.26 -
111.27 -#ifndef INTERNET_NODE_H
111.28 -#define INTERNET_NODE_H
111.29 -
111.30 -#include <list>
111.31 -#include <string>
111.32 -
111.33 -#include "ns3/node.h"
111.34 -
111.35 -namespace ns3 {
111.36 -
111.37 -/**
111.38 - * \ingroup internetNode
111.39 - *
111.40 - * \section InternetNode Overview
111.41 - *
111.42 - * The InternetNode module contains an implementation of TCP, UDP, and
111.43 - * IPv4. ns-3 Applications sit above this module, and ns-3 NetDevices
111.44 - * sit below it...
111.45 - *
111.46 - * InternetNode is implemented as a subclass of Node but this may be
111.47 - * refactored in the future to
111.48 - */
111.49 -
111.50 -/*
111.51 - * \brief Container class for various TCP/IP objects and interfaces
111.52 - * aggregated to a Node.
111.53 - *
111.54 - * This class exists primarily to assemble the layer-3/4 stack of a Node
111.55 - * from constituent parts, including implementations of TCP, IPv4, UDP,
111.56 - * and ARP. It provides only constructors and destructors as its public
111.57 - * API. Internally, the various protocols are instantiated, aggregated
111.58 - * to a Node, and plumbed together.
111.59 - */
111.60 -class InternetNode : public Node
111.61 -{
111.62 -public:
111.63 - InternetNode();
111.64 -};
111.65 -
111.66 -}//namespace ns3
111.67 -
111.68 -#endif /* INTERNET_NODE_H */
112.1 --- a/src/internet-node/internet-stack.cc Mon Mar 31 16:22:06 2008 -0700
112.2 +++ b/src/internet-node/internet-stack.cc Mon Mar 31 16:22:24 2008 -0700
112.3 @@ -1,7 +1,6 @@
112.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
112.5 //
112.6 // Copyright (c) 2006 Georgia Tech Research Corporation
112.7 -// All rights reserved.
112.8 //
112.9 // This program is free software; you can redistribute it and/or modify
112.10 // it under the terms of the GNU General Public License version 2 as
112.11 @@ -21,9 +20,9 @@
112.12
112.13 #include "ns3/net-device.h"
112.14 #include "ns3/callback.h"
112.15 +#include "ns3/node.h"
112.16
112.17 #include "ipv4-l4-demux.h"
112.18 -#include "internet-node.h"
112.19 #include "udp-l4-protocol.h"
112.20 #include "tcp-l4-protocol.h"
112.21 #include "ipv4-l3-protocol.h"
113.1 --- a/src/internet-node/internet-stack.h Mon Mar 31 16:22:06 2008 -0700
113.2 +++ b/src/internet-node/internet-stack.h Mon Mar 31 16:22:24 2008 -0700
113.3 @@ -1,7 +1,6 @@
113.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
113.5 //
113.6 // Copyright (c) 2006 Georgia Tech Research Corporation
113.7 -// All rights reserved.
113.8 //
113.9 // This program is free software; you can redistribute it and/or modify
113.10 // it under the terms of the GNU General Public License version 2 as
114.1 --- a/src/internet-node/ipv4-checksum.cc Mon Mar 31 16:22:06 2008 -0700
114.2 +++ b/src/internet-node/ipv4-checksum.cc Mon Mar 31 16:22:24 2008 -0700
114.3 @@ -1,7 +1,6 @@
114.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
114.5 /*
114.6 * Copyright (c) 2005,2006,2007 INRIA
114.7 - * All rights reserved.
114.8 *
114.9 * This program is free software; you can redistribute it and/or modify
114.10 * it under the terms of the GNU General Public License version 2 as
115.1 --- a/src/internet-node/ipv4-checksum.h Mon Mar 31 16:22:06 2008 -0700
115.2 +++ b/src/internet-node/ipv4-checksum.h Mon Mar 31 16:22:24 2008 -0700
115.3 @@ -1,7 +1,6 @@
115.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
115.5 /*
115.6 * Copyright (c) 2005,2006,2007 INRIA
115.7 - * All rights reserved.
115.8 *
115.9 * This program is free software; you can redistribute it and/or modify
115.10 * it under the terms of the GNU General Public License version 2 as
116.1 --- a/src/internet-node/ipv4-end-point-demux.cc Mon Mar 31 16:22:06 2008 -0700
116.2 +++ b/src/internet-node/ipv4-end-point-demux.cc Mon Mar 31 16:22:24 2008 -0700
116.3 @@ -1,7 +1,6 @@
116.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
116.5 /*
116.6 * Copyright (c) 2005 INRIA
116.7 - * All rights reserved.
116.8 *
116.9 * This program is free software; you can redistribute it and/or modify
116.10 * it under the terms of the GNU General Public License version 2 as
117.1 --- a/src/internet-node/ipv4-end-point-demux.h Mon Mar 31 16:22:06 2008 -0700
117.2 +++ b/src/internet-node/ipv4-end-point-demux.h Mon Mar 31 16:22:24 2008 -0700
117.3 @@ -1,7 +1,6 @@
117.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
117.5 /*
117.6 * Copyright (c) 2005 INRIA
117.7 - * All rights reserved.
117.8 *
117.9 * This program is free software; you can redistribute it and/or modify
117.10 * it under the terms of the GNU General Public License version 2 as
118.1 --- a/src/internet-node/ipv4-end-point.cc Mon Mar 31 16:22:06 2008 -0700
118.2 +++ b/src/internet-node/ipv4-end-point.cc Mon Mar 31 16:22:24 2008 -0700
118.3 @@ -1,7 +1,6 @@
118.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
118.5 /*
118.6 * Copyright (c) 2005 INRIA
118.7 - * All rights reserved.
118.8 *
118.9 * This program is free software; you can redistribute it and/or modify
118.10 * it under the terms of the GNU General Public License version 2 as
119.1 --- a/src/internet-node/ipv4-end-point.h Mon Mar 31 16:22:06 2008 -0700
119.2 +++ b/src/internet-node/ipv4-end-point.h Mon Mar 31 16:22:24 2008 -0700
119.3 @@ -1,7 +1,6 @@
119.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
119.5 /*
119.6 * Copyright (c) 2005 INRIA
119.7 - * All rights reserved.
119.8 *
119.9 * This program is free software; you can redistribute it and/or modify
119.10 * it under the terms of the GNU General Public License version 2 as
120.1 --- a/src/internet-node/ipv4-header.cc Mon Mar 31 16:22:06 2008 -0700
120.2 +++ b/src/internet-node/ipv4-header.cc Mon Mar 31 16:22:24 2008 -0700
120.3 @@ -1,7 +1,6 @@
120.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
120.5 /*
120.6 * Copyright (c) 2005 INRIA
120.7 - * All rights reserved.
120.8 *
120.9 * This program is free software; you can redistribute it and/or modify
120.10 * it under the terms of the GNU General Public License version 2 as
121.1 --- a/src/internet-node/ipv4-header.h Mon Mar 31 16:22:06 2008 -0700
121.2 +++ b/src/internet-node/ipv4-header.h Mon Mar 31 16:22:24 2008 -0700
121.3 @@ -1,7 +1,6 @@
121.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
121.5 /*
121.6 * Copyright (c) 2005 INRIA
121.7 - * All rights reserved.
121.8 *
121.9 * This program is free software; you can redistribute it and/or modify
121.10 * it under the terms of the GNU General Public License version 2 as
122.1 --- a/src/internet-node/ipv4-impl.cc Mon Mar 31 16:22:06 2008 -0700
122.2 +++ b/src/internet-node/ipv4-impl.cc Mon Mar 31 16:22:24 2008 -0700
122.3 @@ -1,7 +1,6 @@
122.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
122.5 /*
122.6 * Copyright (c) 2007 INRIA
122.7 - * All rights reserved.
122.8 *
122.9 * This program is free software; you can redistribute it and/or modify
122.10 * it under the terms of the GNU General Public License version 2 as
123.1 --- a/src/internet-node/ipv4-impl.h Mon Mar 31 16:22:06 2008 -0700
123.2 +++ b/src/internet-node/ipv4-impl.h Mon Mar 31 16:22:24 2008 -0700
123.3 @@ -1,7 +1,6 @@
123.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
123.5 /*
123.6 * Copyright (c) 2007 INRIA
123.7 - * All rights reserved.
123.8 *
123.9 * This program is free software; you can redistribute it and/or modify
123.10 * it under the terms of the GNU General Public License version 2 as
124.1 --- a/src/internet-node/ipv4-interface.cc Mon Mar 31 16:22:06 2008 -0700
124.2 +++ b/src/internet-node/ipv4-interface.cc Mon Mar 31 16:22:24 2008 -0700
124.3 @@ -1,7 +1,6 @@
124.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
124.5 /*
124.6 * Copyright (c) 2005,2006,2007 INRIA
124.7 - * All rights reserved.
124.8 *
124.9 * This program is free software; you can redistribute it and/or modify
124.10 * it under the terms of the GNU General Public License version 2 as
125.1 --- a/src/internet-node/ipv4-interface.h Mon Mar 31 16:22:06 2008 -0700
125.2 +++ b/src/internet-node/ipv4-interface.h Mon Mar 31 16:22:24 2008 -0700
125.3 @@ -1,7 +1,6 @@
125.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
125.5 /*
125.6 * Copyright (c) 2005,2006,2007 INRIA
125.7 - * All rights reserved.
125.8 *
125.9 * This program is free software; you can redistribute it and/or modify
125.10 * it under the terms of the GNU General Public License version 2 as
126.1 --- a/src/internet-node/ipv4-l3-protocol.cc Mon Mar 31 16:22:06 2008 -0700
126.2 +++ b/src/internet-node/ipv4-l3-protocol.cc Mon Mar 31 16:22:24 2008 -0700
126.3 @@ -1,7 +1,6 @@
126.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
126.5 //
126.6 // Copyright (c) 2006 Georgia Tech Research Corporation
126.7 -// All rights reserved.
126.8 //
126.9 // This program is free software; you can redistribute it and/or modify
126.10 // it under the terms of the GNU General Public License version 2 as
127.1 --- a/src/internet-node/ipv4-l3-protocol.h Mon Mar 31 16:22:06 2008 -0700
127.2 +++ b/src/internet-node/ipv4-l3-protocol.h Mon Mar 31 16:22:24 2008 -0700
127.3 @@ -1,7 +1,6 @@
127.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
127.5 //
127.6 // Copyright (c) 2006 Georgia Tech Research Corporation
127.7 -// All rights reserved.
127.8 //
127.9 // This program is free software; you can redistribute it and/or modify
127.10 // it under the terms of the GNU General Public License version 2 as
128.1 --- a/src/internet-node/ipv4-l4-demux.cc Mon Mar 31 16:22:06 2008 -0700
128.2 +++ b/src/internet-node/ipv4-l4-demux.cc Mon Mar 31 16:22:24 2008 -0700
128.3 @@ -1,7 +1,6 @@
128.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
128.5 //
128.6 // Copyright (c) 2006 Georgia Tech Research Corporation
128.7 -// All rights reserved.
128.8 //
128.9 // This program is free software; you can redistribute it and/or modify
128.10 // it under the terms of the GNU General Public License version 2 as
129.1 --- a/src/internet-node/ipv4-l4-demux.h Mon Mar 31 16:22:06 2008 -0700
129.2 +++ b/src/internet-node/ipv4-l4-demux.h Mon Mar 31 16:22:24 2008 -0700
129.3 @@ -1,7 +1,6 @@
129.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
129.5 //
129.6 // Copyright (c) 2006 Georgia Tech Research Corporation
129.7 -// All rights reserved.
129.8 //
129.9 // This program is free software; you can redistribute it and/or modify
129.10 // it under the terms of the GNU General Public License version 2 as
130.1 --- a/src/internet-node/ipv4-l4-protocol.cc Mon Mar 31 16:22:06 2008 -0700
130.2 +++ b/src/internet-node/ipv4-l4-protocol.cc Mon Mar 31 16:22:24 2008 -0700
130.3 @@ -1,7 +1,6 @@
130.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
130.5 //
130.6 // Copyright (c) 2006 Georgia Tech Research Corporation
130.7 -// All rights reserved.
130.8 //
130.9 // This program is free software; you can redistribute it and/or modify
130.10 // it under the terms of the GNU General Public License version 2 as
131.1 --- a/src/internet-node/ipv4-l4-protocol.h Mon Mar 31 16:22:06 2008 -0700
131.2 +++ b/src/internet-node/ipv4-l4-protocol.h Mon Mar 31 16:22:24 2008 -0700
131.3 @@ -1,7 +1,6 @@
131.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
131.5 //
131.6 // Copyright (c) 2006 Georgia Tech Research Corporation
131.7 -// All rights reserved.
131.8 //
131.9 // This program is free software; you can redistribute it and/or modify
131.10 // it under the terms of the GNU General Public License version 2 as
132.1 --- a/src/internet-node/ipv4-loopback-interface.cc Mon Mar 31 16:22:06 2008 -0700
132.2 +++ b/src/internet-node/ipv4-loopback-interface.cc Mon Mar 31 16:22:24 2008 -0700
132.3 @@ -1,7 +1,6 @@
132.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
132.5 /*
132.6 * Copyright (c) 2007 INRIA
132.7 - * All rights reserved.
132.8 *
132.9 * This program is free software; you can redistribute it and/or modify
132.10 * it under the terms of the GNU General Public License version 2 as
133.1 --- a/src/internet-node/ipv4-loopback-interface.h Mon Mar 31 16:22:06 2008 -0700
133.2 +++ b/src/internet-node/ipv4-loopback-interface.h Mon Mar 31 16:22:24 2008 -0700
133.3 @@ -1,7 +1,6 @@
133.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
133.5 /*
133.6 * Copyright (c) 2007 INRIA
133.7 - * All rights reserved.
133.8 *
133.9 * This program is free software; you can redistribute it and/or modify
133.10 * it under the terms of the GNU General Public License version 2 as
134.1 --- a/src/internet-node/ipv4-static-routing.cc Mon Mar 31 16:22:06 2008 -0700
134.2 +++ b/src/internet-node/ipv4-static-routing.cc Mon Mar 31 16:22:24 2008 -0700
134.3 @@ -1,7 +1,6 @@
134.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
134.5 //
134.6 // Copyright (c) 2006 Georgia Tech Research Corporation
134.7 -// All rights reserved.
134.8 //
134.9 // This program is free software; you can redistribute it and/or modify
134.10 // it under the terms of the GNU General Public License version 2 as
135.1 --- a/src/internet-node/ipv4-static-routing.h Mon Mar 31 16:22:06 2008 -0700
135.2 +++ b/src/internet-node/ipv4-static-routing.h Mon Mar 31 16:22:24 2008 -0700
135.3 @@ -1,7 +1,6 @@
135.4 // -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
135.5 //
135.6 // Copyright (c) 2006 Georgia Tech Research Corporation
135.7 -// All rights reserved.
135.8 //
135.9 // This program is free software; you can redistribute it and/or modify
135.10 // it under the terms of the GNU General Public License version 2 as
136.1 --- a/src/internet-node/pcap-trace.cc Mon Mar 31 16:22:06 2008 -0700
136.2 +++ b/src/internet-node/pcap-trace.cc Mon Mar 31 16:22:24 2008 -0700
136.3 @@ -1,7 +1,6 @@
136.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
136.5 /*
136.6 * Copyright (c) 2007 INRIA
136.7 - * All rights reserved.
136.8 *
136.9 * This program is free software; you can redistribute it and/or modify
136.10 * it under the terms of the GNU General Public License version 2 as
137.1 --- a/src/internet-node/pcap-trace.h Mon Mar 31 16:22:06 2008 -0700
137.2 +++ b/src/internet-node/pcap-trace.h Mon Mar 31 16:22:24 2008 -0700
137.3 @@ -1,7 +1,6 @@
137.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
137.5 /*
137.6 * Copyright (c) 2007 INRIA
137.7 - * All rights reserved.
137.8 *
137.9 * This program is free software; you can redistribute it and/or modify
137.10 * it under the terms of the GNU General Public License version 2 as
138.1 --- a/src/internet-node/pending-data.cc Mon Mar 31 16:22:06 2008 -0700
138.2 +++ b/src/internet-node/pending-data.cc Mon Mar 31 16:22:24 2008 -0700
138.3 @@ -1,7 +1,6 @@
138.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
138.5 //
138.6 // Copyright (c) 2006 Georgia Tech Research Corporation
138.7 -// All rights reserved.
138.8 //
138.9 // This program is free software; you can redistribute it and/or modify
138.10 // it under the terms of the GNU General Public License version 2 as
139.1 --- a/src/internet-node/pending-data.h Mon Mar 31 16:22:06 2008 -0700
139.2 +++ b/src/internet-node/pending-data.h Mon Mar 31 16:22:24 2008 -0700
139.3 @@ -1,7 +1,6 @@
139.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
139.5 //
139.6 // Copyright (c) 2006 Georgia Tech Research Corporation
139.7 -// All rights reserved.
139.8 //
139.9 // This program is free software; you can redistribute it and/or modify
139.10 // it under the terms of the GNU General Public License version 2 as
140.1 --- a/src/internet-node/sequence-number.cc Mon Mar 31 16:22:06 2008 -0700
140.2 +++ b/src/internet-node/sequence-number.cc Mon Mar 31 16:22:24 2008 -0700
140.3 @@ -1,7 +1,6 @@
140.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
140.5 //
140.6 // Copyright (c) 2006 Georgia Tech Research Corporation
140.7 -// All rights reserved.
140.8 //
140.9 // This program is free software; you can redistribute it and/or modify
140.10 // it under the terms of the GNU General Public License version 2 as
141.1 --- a/src/internet-node/sequence-number.h Mon Mar 31 16:22:06 2008 -0700
141.2 +++ b/src/internet-node/sequence-number.h Mon Mar 31 16:22:24 2008 -0700
141.3 @@ -1,7 +1,6 @@
141.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
141.5 //
141.6 // Copyright (c) 2006 Georgia Tech Research Corporation
141.7 -// All rights reserved.
141.8 //
141.9 // This program is free software; you can redistribute it and/or modify
141.10 // it under the terms of the GNU General Public License version 2 as
142.1 --- a/src/internet-node/udp-header.cc Mon Mar 31 16:22:06 2008 -0700
142.2 +++ b/src/internet-node/udp-header.cc Mon Mar 31 16:22:24 2008 -0700
142.3 @@ -1,7 +1,6 @@
142.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
142.5 /*
142.6 * Copyright (c) 2005 INRIA
142.7 - * All rights reserved.
142.8 *
142.9 * This program is free software; you can redistribute it and/or modify
142.10 * it under the terms of the GNU General Public License version 2 as
143.1 --- a/src/internet-node/udp-header.h Mon Mar 31 16:22:06 2008 -0700
143.2 +++ b/src/internet-node/udp-header.h Mon Mar 31 16:22:24 2008 -0700
143.3 @@ -1,7 +1,6 @@
143.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
143.5 /*
143.6 * Copyright (c) 2005 INRIA
143.7 - * All rights reserved.
143.8 *
143.9 * This program is free software; you can redistribute it and/or modify
143.10 * it under the terms of the GNU General Public License version 2 as
144.1 --- a/src/internet-node/udp-impl.cc Mon Mar 31 16:22:06 2008 -0700
144.2 +++ b/src/internet-node/udp-impl.cc Mon Mar 31 16:22:24 2008 -0700
144.3 @@ -1,7 +1,6 @@
144.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
144.5 /*
144.6 * Copyright (c) 2007 INRIA
144.7 - * All rights reserved.
144.8 *
144.9 * This program is free software; you can redistribute it and/or modify
144.10 * it under the terms of the GNU General Public License version 2 as
145.1 --- a/src/internet-node/udp-impl.h Mon Mar 31 16:22:06 2008 -0700
145.2 +++ b/src/internet-node/udp-impl.h Mon Mar 31 16:22:24 2008 -0700
145.3 @@ -1,7 +1,6 @@
145.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
145.5 /*
145.6 * Copyright (c) 2007 INRIA
145.7 - * All rights reserved.
145.8 *
145.9 * This program is free software; you can redistribute it and/or modify
145.10 * it under the terms of the GNU General Public License version 2 as
146.1 --- a/src/internet-node/udp-l4-protocol.cc Mon Mar 31 16:22:06 2008 -0700
146.2 +++ b/src/internet-node/udp-l4-protocol.cc Mon Mar 31 16:22:24 2008 -0700
146.3 @@ -1,7 +1,6 @@
146.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
146.5 /*
146.6 * Copyright (c) 2005 INRIA
146.7 - * All rights reserved.
146.8 *
146.9 * This program is free software; you can redistribute it and/or modify
146.10 * it under the terms of the GNU General Public License version 2 as
147.1 --- a/src/internet-node/udp-l4-protocol.h Mon Mar 31 16:22:06 2008 -0700
147.2 +++ b/src/internet-node/udp-l4-protocol.h Mon Mar 31 16:22:24 2008 -0700
147.3 @@ -1,7 +1,6 @@
147.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
147.5 /*
147.6 * Copyright (c) 2005,2006,2007 INRIA
147.7 - * All rights reserved.
147.8 *
147.9 * This program is free software; you can redistribute it and/or modify
147.10 * it under the terms of the GNU General Public License version 2 as
148.1 --- a/src/internet-node/udp-socket.cc Mon Mar 31 16:22:06 2008 -0700
148.2 +++ b/src/internet-node/udp-socket.cc Mon Mar 31 16:22:24 2008 -0700
148.3 @@ -1,7 +1,6 @@
148.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
148.5 /*
148.6 * Copyright (c) 2007 INRIA
148.7 - * All rights reserved.
148.8 *
148.9 * This program is free software; you can redistribute it and/or modify
148.10 * it under the terms of the GNU General Public License version 2 as
148.11 @@ -352,13 +351,13 @@
148.12 #ifdef RUN_SELF_TESTS
148.13
148.14 #include "ns3/test.h"
148.15 -#include "ns3/internet-node.h"
148.16 #include "ns3/socket-factory.h"
148.17 #include "ns3/udp.h"
148.18 #include "ns3/simulator.h"
148.19 #include "ns3/simple-channel.h"
148.20 #include "ns3/simple-net-device.h"
148.21 #include "ns3/drop-tail-queue.h"
148.22 +#include "internet-stack.h"
148.23 #include <string>
148.24
148.25 namespace ns3 {
148.26 @@ -399,7 +398,8 @@
148.27 // Create topology
148.28
148.29 // Receiver Node
148.30 - Ptr<Node> rxNode = CreateObject<InternetNode> ();
148.31 + Ptr<Node> rxNode = CreateObject<Node> ();
148.32 + AddInternetStack (rxNode);
148.33 Ptr<SimpleNetDevice> rxDev1, rxDev2;
148.34 { // first interface
148.35 rxDev1 = CreateObject<SimpleNetDevice> ();
148.36 @@ -424,7 +424,8 @@
148.37 }
148.38
148.39 // Sender Node
148.40 - Ptr<Node> txNode = CreateObject<InternetNode> ();
148.41 + Ptr<Node> txNode = CreateObject<Node> ();
148.42 + AddInternetStack (txNode);
148.43 Ptr<SimpleNetDevice> txDev1;
148.44 {
148.45 txDev1 = CreateObject<SimpleNetDevice> ();
149.1 --- a/src/internet-node/udp-socket.h Mon Mar 31 16:22:06 2008 -0700
149.2 +++ b/src/internet-node/udp-socket.h Mon Mar 31 16:22:24 2008 -0700
149.3 @@ -1,7 +1,6 @@
149.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
149.5 /*
149.6 * Copyright (c) 2007 INRIA
149.7 - * All rights reserved.
149.8 *
149.9 * This program is free software; you can redistribute it and/or modify
149.10 * it under the terms of the GNU General Public License version 2 as
150.1 --- a/src/internet-node/wscript Mon Mar 31 16:22:06 2008 -0700
150.2 +++ b/src/internet-node/wscript Mon Mar 31 16:22:24 2008 -0700
150.3 @@ -4,7 +4,6 @@
150.4 def build(bld):
150.5 obj = bld.create_ns3_module('internet-node', ['node'])
150.6 obj.source = [
150.7 - 'internet-node.cc',
150.8 'internet-stack.cc',
150.9 'ipv4-l4-demux.cc',
150.10 'ipv4-l4-protocol.cc',
150.11 @@ -39,7 +38,6 @@
150.12 headers = bld.create_obj('ns3header')
150.13 headers.module = 'internet-node'
150.14 headers.source = [
150.15 - 'internet-node.h',
150.16 'internet-stack.h',
150.17 'ascii-trace.h',
150.18 'pcap-trace.h',
151.1 --- a/src/mobility/random-direction-2d-mobility-model.cc Mon Mar 31 16:22:06 2008 -0700
151.2 +++ b/src/mobility/random-direction-2d-mobility-model.cc Mon Mar 31 16:22:24 2008 -0700
151.3 @@ -1,7 +1,6 @@
151.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
151.5 /*
151.6 * Copyright (c) 2007 INRIA
151.7 - * All rights reserved.
151.8 *
151.9 * This program is free software; you can redistribute it and/or modify
151.10 * it under the terms of the GNU General Public License version 2 as
152.1 --- a/src/mobility/random-direction-2d-mobility-model.h Mon Mar 31 16:22:06 2008 -0700
152.2 +++ b/src/mobility/random-direction-2d-mobility-model.h Mon Mar 31 16:22:24 2008 -0700
152.3 @@ -1,7 +1,6 @@
152.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
152.5 /*
152.6 * Copyright (c) 2007 INRIA
152.7 - * All rights reserved.
152.8 *
152.9 * This program is free software; you can redistribute it and/or modify
152.10 * it under the terms of the GNU General Public License version 2 as
153.1 --- a/src/mobility/random-walk-2d-mobility-model.cc Mon Mar 31 16:22:06 2008 -0700
153.2 +++ b/src/mobility/random-walk-2d-mobility-model.cc Mon Mar 31 16:22:24 2008 -0700
153.3 @@ -1,7 +1,6 @@
153.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
153.5 /*
153.6 * Copyright (c) 2006,2007 INRIA
153.7 - * All rights reserved.
153.8 *
153.9 * This program is free software; you can redistribute it and/or modify
153.10 * it under the terms of the GNU General Public License version 2 as
154.1 --- a/src/mobility/random-walk-2d-mobility-model.h Mon Mar 31 16:22:06 2008 -0700
154.2 +++ b/src/mobility/random-walk-2d-mobility-model.h Mon Mar 31 16:22:24 2008 -0700
154.3 @@ -1,7 +1,6 @@
154.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
154.5 /*
154.6 * Copyright (c) 2006,2007 INRIA
154.7 - * All rights reserved.
154.8 *
154.9 * This program is free software; you can redistribute it and/or modify
154.10 * it under the terms of the GNU General Public License version 2 as
155.1 --- a/src/mobility/random-waypoint-mobility-model.h Mon Mar 31 16:22:06 2008 -0700
155.2 +++ b/src/mobility/random-waypoint-mobility-model.h Mon Mar 31 16:22:24 2008 -0700
155.3 @@ -1,7 +1,6 @@
155.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
155.5 /*
155.6 * Copyright (c) 2007 INRIA
155.7 - * All rights reserved.
155.8 *
155.9 * This program is free software; you can redistribute it and/or modify
155.10 * it under the terms of the GNU General Public License version 2 as
156.1 --- a/src/node/address-utils.cc Mon Mar 31 16:22:06 2008 -0700
156.2 +++ b/src/node/address-utils.cc Mon Mar 31 16:22:24 2008 -0700
156.3 @@ -1,7 +1,6 @@
156.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
156.5 /*
156.6 * Copyright (c) 2006 INRIA
156.7 - * All rights reserved.
156.8 *
156.9 * This program is free software; you can redistribute it and/or modify
156.10 * it under the terms of the GNU General Public License version 2 as
157.1 --- a/src/node/address-utils.h Mon Mar 31 16:22:06 2008 -0700
157.2 +++ b/src/node/address-utils.h Mon Mar 31 16:22:24 2008 -0700
157.3 @@ -1,7 +1,6 @@
157.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
157.5 /*
157.6 * Copyright (c) 2006 INRIA
157.7 - * All rights reserved.
157.8 *
157.9 * This program is free software; you can redistribute it and/or modify
157.10 * it under the terms of the GNU General Public License version 2 as
158.1 --- a/src/node/drop-tail-queue.cc Mon Mar 31 16:22:06 2008 -0700
158.2 +++ b/src/node/drop-tail-queue.cc Mon Mar 31 16:22:24 2008 -0700
158.3 @@ -1,7 +1,6 @@
158.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
158.5 /*
158.6 * Copyright (c) 2007 University of Washington
158.7 - * All rights reserved.
158.8 *
158.9 * This program is free software; you can redistribute it and/or modify
158.10 * it under the terms of the GNU General Public License version 2 as
159.1 --- a/src/node/drop-tail-queue.h Mon Mar 31 16:22:06 2008 -0700
159.2 +++ b/src/node/drop-tail-queue.h Mon Mar 31 16:22:24 2008 -0700
159.3 @@ -1,7 +1,6 @@
159.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
159.5 /*
159.6 * Copyright (c) 2007 University of Washington
159.7 - * All rights reserved.
159.8 *
159.9 * This program is free software; you can redistribute it and/or modify
159.10 * it under the terms of the GNU General Public License version 2 as
160.1 --- a/src/node/ethernet-header.cc Mon Mar 31 16:22:06 2008 -0700
160.2 +++ b/src/node/ethernet-header.cc Mon Mar 31 16:22:24 2008 -0700
160.3 @@ -1,7 +1,6 @@
160.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
160.5 /*
160.6 * Copyright (c) 2005 INRIA
160.7 - * All rights reserved.
160.8 *
160.9 * This program is free software; you can redistribute it and/or modify
160.10 * it under the terms of the GNU General Public License version 2 as
161.1 --- a/src/node/ethernet-header.h Mon Mar 31 16:22:06 2008 -0700
161.2 +++ b/src/node/ethernet-header.h Mon Mar 31 16:22:24 2008 -0700
161.3 @@ -1,7 +1,6 @@
161.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
161.5 /*
161.6 * Copyright (c) 2007 Emmanuelle Laprise
161.7 - * All rights reserved.
161.8 *
161.9 * This program is free software; you can redistribute it and/or modify
161.10 * it under the terms of the GNU General Public License version 2 as
162.1 --- a/src/node/ethernet-trailer.cc Mon Mar 31 16:22:06 2008 -0700
162.2 +++ b/src/node/ethernet-trailer.cc Mon Mar 31 16:22:24 2008 -0700
162.3 @@ -1,7 +1,6 @@
162.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
162.5 /*
162.6 * Copyright (c) 2005 INRIA
162.7 - * All rights reserved.
162.8 *
162.9 * This program is free software; you can redistribute it and/or modify
162.10 * it under the terms of the GNU General Public License version 2 as
163.1 --- a/src/node/ethernet-trailer.h Mon Mar 31 16:22:06 2008 -0700
163.2 +++ b/src/node/ethernet-trailer.h Mon Mar 31 16:22:24 2008 -0700
163.3 @@ -1,7 +1,6 @@
163.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
163.5 /*
163.6 * Copyright (c) 2007 Emmanuelle Laprise
163.7 - * All rights reserved.
163.8 *
163.9 * This program is free software; you can redistribute it and/or modify
163.10 * it under the terms of the GNU General Public License version 2 as
164.1 --- a/src/node/inet-socket-address.cc Mon Mar 31 16:22:06 2008 -0700
164.2 +++ b/src/node/inet-socket-address.cc Mon Mar 31 16:22:24 2008 -0700
164.3 @@ -1,7 +1,6 @@
164.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
164.5 /*
164.6 * Copyright (c) 2005 INRIA
164.7 - * All rights reserved.
164.8 *
164.9 * This program is free software; you can redistribute it and/or modify
164.10 * it under the terms of the GNU General Public License version 2 as
165.1 --- a/src/node/inet-socket-address.h Mon Mar 31 16:22:06 2008 -0700
165.2 +++ b/src/node/inet-socket-address.h Mon Mar 31 16:22:24 2008 -0700
165.3 @@ -1,7 +1,6 @@
165.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
165.5 /*
165.6 * Copyright (c) 2005 INRIA
165.7 - * All rights reserved.
165.8 *
165.9 * This program is free software; you can redistribute it and/or modify
165.10 * it under the terms of the GNU General Public License version 2 as
166.1 --- a/src/node/ipv4-address.cc Mon Mar 31 16:22:06 2008 -0700
166.2 +++ b/src/node/ipv4-address.cc Mon Mar 31 16:22:24 2008 -0700
166.3 @@ -1,7 +1,6 @@
166.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
166.5 /*
166.6 * Copyright (c) 2005 INRIA
166.7 - * All rights reserved.
166.8 *
166.9 * This program is free software; you can redistribute it and/or modify
166.10 * it under the terms of the GNU General Public License version 2 as
167.1 --- a/src/node/ipv4-address.h Mon Mar 31 16:22:06 2008 -0700
167.2 +++ b/src/node/ipv4-address.h Mon Mar 31 16:22:24 2008 -0700
167.3 @@ -1,7 +1,6 @@
167.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
167.5 /*
167.6 * Copyright (c) 2005 INRIA
167.7 - * All rights reserved.
167.8 *
167.9 * This program is free software; you can redistribute it and/or modify
167.10 * it under the terms of the GNU General Public License version 2 as
168.1 --- a/src/node/ipv4-route.cc Mon Mar 31 16:22:06 2008 -0700
168.2 +++ b/src/node/ipv4-route.cc Mon Mar 31 16:22:24 2008 -0700
168.3 @@ -1,7 +1,6 @@
168.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
168.5 /*
168.6 * Copyright (c) 2005 INRIA
168.7 - * All rights reserved.
168.8 *
168.9 * This program is free software; you can redistribute it and/or modify
168.10 * it under the terms of the GNU General Public License version 2 as
169.1 --- a/src/node/ipv4-route.h Mon Mar 31 16:22:06 2008 -0700
169.2 +++ b/src/node/ipv4-route.h Mon Mar 31 16:22:24 2008 -0700
169.3 @@ -1,7 +1,6 @@
169.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
169.5 /*
169.6 * Copyright (c) 2005 INRIA
169.7 - * All rights reserved.
169.8 *
169.9 * This program is free software; you can redistribute it and/or modify
169.10 * it under the terms of the GNU General Public License version 2 as
170.1 --- a/src/node/ipv4.cc Mon Mar 31 16:22:06 2008 -0700
170.2 +++ b/src/node/ipv4.cc Mon Mar 31 16:22:24 2008 -0700
170.3 @@ -1,7 +1,6 @@
170.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
170.5 /*
170.6 * Copyright (c) 2007 INRIA
170.7 - * All rights reserved.
170.8 *
170.9 * This program is free software; you can redistribute it and/or modify
170.10 * it under the terms of the GNU General Public License version 2 as
171.1 --- a/src/node/ipv4.h Mon Mar 31 16:22:06 2008 -0700
171.2 +++ b/src/node/ipv4.h Mon Mar 31 16:22:24 2008 -0700
171.3 @@ -1,7 +1,6 @@
171.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
171.5 /*
171.6 * Copyright (c) 2007 INRIA
171.7 - * All rights reserved.
171.8 *
171.9 * This program is free software; you can redistribute it and/or modify
171.10 * it under the terms of the GNU General Public License version 2 as
172.1 --- a/src/node/llc-snap-header.cc Mon Mar 31 16:22:06 2008 -0700
172.2 +++ b/src/node/llc-snap-header.cc Mon Mar 31 16:22:24 2008 -0700
172.3 @@ -1,7 +1,6 @@
172.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
172.5 /*
172.6 * Copyright (c) 2005 INRIA
172.7 - * All rights reserved.
172.8 *
172.9 * This program is free software; you can redistribute it and/or modify
172.10 * it under the terms of the GNU General Public License version 2 as
173.1 --- a/src/node/llc-snap-header.h Mon Mar 31 16:22:06 2008 -0700
173.2 +++ b/src/node/llc-snap-header.h Mon Mar 31 16:22:24 2008 -0700
173.3 @@ -1,7 +1,6 @@
173.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
173.5 /*
173.6 * Copyright (c) 2005 INRIA
173.7 - * All rights reserved.
173.8 *
173.9 * This program is free software; you can redistribute it and/or modify
173.10 * it under the terms of the GNU General Public License version 2 as
174.1 --- a/src/node/net-device.cc Mon Mar 31 16:22:06 2008 -0700
174.2 +++ b/src/node/net-device.cc Mon Mar 31 16:22:24 2008 -0700
174.3 @@ -1,7 +1,6 @@
174.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
174.5 /*
174.6 * Copyright (c) 2005,2006 INRIA
174.7 - * All rights reserved.
174.8 *
174.9 * This program is free software; you can redistribute it and/or modify
174.10 * it under the terms of the GNU General Public License version 2 as
175.1 --- a/src/node/net-device.h Mon Mar 31 16:22:06 2008 -0700
175.2 +++ b/src/node/net-device.h Mon Mar 31 16:22:24 2008 -0700
175.3 @@ -1,7 +1,6 @@
175.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
175.5 /*
175.6 * Copyright (c) 2005,2006 INRIA
175.7 - * All rights reserved.
175.8 *
175.9 * This program is free software; you can redistribute it and/or modify
175.10 * it under the terms of the GNU General Public License version 2 as
176.1 --- a/src/node/node-list.cc Mon Mar 31 16:22:06 2008 -0700
176.2 +++ b/src/node/node-list.cc Mon Mar 31 16:22:24 2008 -0700
176.3 @@ -1,7 +1,6 @@
176.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
176.5 /*
176.6 * Copyright (c) 2007 INRIA
176.7 - * All rights reserved.
176.8 *
176.9 * This program is free software; you can redistribute it and/or modify
176.10 * it under the terms of the GNU General Public License version 2 as
177.1 --- a/src/node/node-list.h Mon Mar 31 16:22:06 2008 -0700
177.2 +++ b/src/node/node-list.h Mon Mar 31 16:22:24 2008 -0700
177.3 @@ -1,7 +1,6 @@
177.4 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
177.5 /*
177.6 * Copyright (c) 2007 INRIA
177.7 - * All rights reserved.
177.8 *
177.9 * This program is free software; you can redistribute it and/or modify
177.10 * it under the terms of the GNU General Public License version 2 as
178.1 --- a/src/node/packet-socket-factory.cc Mon Mar 31 16:22:06 2008 -0700
178.2 +++ b/src/node/packet-socket-factory.cc Mon Mar 31 16:22:24 2008 -0700
178.3 @@ -1,7 +1,6 @@
178.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
178.5 /*
178.6 * Copyright (c) 2007 Emmanuelle Laprise
178.7 - * All rights reserved.
178.8 *
178.9 * This program is free software; you can redistribute it and/or modify
178.10 * it under the terms of the GNU General Public License version 2 as
179.1 --- a/src/node/packet-socket-factory.h Mon Mar 31 16:22:06 2008 -0700
179.2 +++ b/src/node/packet-socket-factory.h Mon Mar 31 16:22:24 2008 -0700
179.3 @@ -1,7 +1,6 @@
179.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
179.5 /*
179.6 * Copyright (c) 2007 Emmanuelle Laprise
179.7 - * All rights reserved.
179.8 *
179.9 * This program is free software; you can redistribute it and/or modify
179.10 * it under the terms of the GNU General Public License version 2 as
180.1 --- a/src/node/queue.cc Mon Mar 31 16:22:06 2008 -0700
180.2 +++ b/src/node/queue.cc Mon Mar 31 16:22:24 2008 -0700
180.3 @@ -1,7 +1,6 @@
180.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
180.5 /*
180.6 * Copyright (c) 2007 University of Washington
180.7 - * All rights reserved.
180.8 *
180.9 * This program is free software; you can redistribute it and/or modify
180.10 * it under the terms of the GNU General Public License version 2 as
181.1 --- a/src/node/queue.h Mon Mar 31 16:22:06 2008 -0700
181.2 +++ b/src/node/queue.h Mon Mar 31 16:22:24 2008 -0700
181.3 @@ -1,7 +1,6 @@
181.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
181.5 /*
181.6 * Copyright (c) 2007 University of Washington
181.7 - * All rights reserved.
181.8 *
181.9 * This program is free software; you can redistribute it and/or modify
181.10 * it under the terms of the GNU General Public License version 2 as
182.1 --- a/src/node/simple-net-device.cc Mon Mar 31 16:22:06 2008 -0700
182.2 +++ b/src/node/simple-net-device.cc Mon Mar 31 16:22:24 2008 -0700
182.3 @@ -1,3 +1,22 @@
182.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
182.5 +/*
182.6 + * Copyright (c) 2008 INRIA
182.7 + *
182.8 + * This program is free software; you can redistribute it and/or modify
182.9 + * it under the terms of the GNU General Public License version 2 as
182.10 + * published by the Free Software Foundation;
182.11 + *
182.12 + * This program is distributed in the hope that it will be useful,
182.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
182.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
182.15 + * GNU General Public License for more details.
182.16 + *
182.17 + * You should have received a copy of the GNU General Public License
182.18 + * along with this program; if not, write to the Free Software
182.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
182.20 + *
182.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
182.22 + */
182.23 #include "simple-net-device.h"
182.24 #include "simple-channel.h"
182.25 #include "node.h"
182.26 @@ -153,6 +172,14 @@
182.27 m_rxCallback = cb;
182.28 }
182.29
182.30 +void
182.31 +SimpleNetDevice::DoDispose (void)
182.32 +{
182.33 + m_channel = 0;
182.34 + m_node = 0;
182.35 + NetDevice::DoDispose ();
182.36 +}
182.37 +
182.38
182.39
182.40 } // namespace ns3
183.1 --- a/src/node/simple-net-device.h Mon Mar 31 16:22:06 2008 -0700
183.2 +++ b/src/node/simple-net-device.h Mon Mar 31 16:22:24 2008 -0700
183.3 @@ -1,5 +1,24 @@
183.4 -#ifndef TEST_NET_DEVICE_H
183.5 -#define TEST_NET_DEVICE_H
183.6 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
183.7 +/*
183.8 + * Copyright (c) 2008 INRIA
183.9 + *
183.10 + * This program is free software; you can redistribute it and/or modify
183.11 + * it under the terms of the GNU General Public License version 2 as
183.12 + * published by the Free Software Foundation;
183.13 + *
183.14 + * This program is distributed in the hope that it will be useful,
183.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
183.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
183.17 + * GNU General Public License for more details.
183.18 + *
183.19 + * You should have received a copy of the GNU General Public License
183.20 + * along with this program; if not, write to the Free Software
183.21 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
183.22 + *
183.23 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
183.24 + */
183.25 +#ifndef SIMPLE_NET_DEVICE_H
183.26 +#define SIMPLE_NET_DEVICE_H
183.27
183.28 #include "net-device.h"
183.29 #include "mac48-address.h"
183.30 @@ -44,6 +63,8 @@
183.31 virtual bool NeedsArp (void) const;
183.32 virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
183.33
183.34 +protected:
183.35 + virtual void DoDispose (void);
183.36 private:
183.37 Ptr<SimpleChannel> m_channel;
183.38 NetDevice::ReceiveCallback m_rxCallback;
183.39 @@ -56,4 +77,4 @@
183.40
183.41 } // namespace ns3
183.42
183.43 -#endif /* TEST_NET_DEVICE_H */
183.44 +#endif /* SIMPLE_NET_DEVICE_H */
184.1 --- a/src/node/socket-factory.cc Mon Mar 31 16:22:06 2008 -0700
184.2 +++ b/src/node/socket-factory.cc Mon Mar 31 16:22:24 2008 -0700
184.3 @@ -1,7 +1,6 @@
184.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
184.5 /*
184.6 * Copyright (c) 2007 INRIA
184.7 - * All rights reserved.
184.8 *
184.9 * This program is free software; you can redistribute it and/or modify
184.10 * it under the terms of the GNU General Public License version 2 as
185.1 --- a/src/node/socket-factory.h Mon Mar 31 16:22:06 2008 -0700
185.2 +++ b/src/node/socket-factory.h Mon Mar 31 16:22:24 2008 -0700
185.3 @@ -1,7 +1,6 @@
185.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
185.5 /*
185.6 * Copyright (c) 2007 INRIA
185.7 - * All rights reserved.
185.8 *
185.9 * This program is free software; you can redistribute it and/or modify
185.10 * it under the terms of the GNU General Public License version 2 as
186.1 --- a/src/node/udp.cc Mon Mar 31 16:22:06 2008 -0700
186.2 +++ b/src/node/udp.cc Mon Mar 31 16:22:24 2008 -0700
186.3 @@ -1,7 +1,6 @@
186.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
186.5 /*
186.6 * Copyright (c) 2007 INRIA
186.7 - * All rights reserved.
186.8 *
186.9 * This program is free software; you can redistribute it and/or modify
186.10 * it under the terms of the GNU General Public License version 2 as
187.1 --- a/src/node/udp.h Mon Mar 31 16:22:06 2008 -0700
187.2 +++ b/src/node/udp.h Mon Mar 31 16:22:24 2008 -0700
187.3 @@ -1,7 +1,6 @@
187.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
187.5 /*
187.6 * Copyright (c) 2007 INRIA
187.7 - * All rights reserved.
187.8 *
187.9 * This program is free software; you can redistribute it and/or modify
187.10 * it under the terms of the GNU General Public License version 2 as
188.1 --- a/src/routing/global-routing/global-router-interface.cc Mon Mar 31 16:22:06 2008 -0700
188.2 +++ b/src/routing/global-routing/global-router-interface.cc Mon Mar 31 16:22:24 2008 -0700
188.3 @@ -22,7 +22,7 @@
188.4 #include "ns3/assert.h"
188.5 #include "ns3/channel.h"
188.6 #include "ns3/net-device.h"
188.7 -#include "ns3/internet-node.h"
188.8 +#include "ns3/node.h"
188.9 #include "ns3/ipv4.h"
188.10 #include "global-router-interface.h"
188.11
189.1 --- a/src/routing/olsr/olsr-agent-impl.cc Mon Mar 31 16:22:06 2008 -0700
189.2 +++ b/src/routing/olsr/olsr-agent-impl.cc Mon Mar 31 16:22:24 2008 -0700
189.3 @@ -32,7 +32,6 @@
189.4 #include "olsr-agent-impl.h"
189.5 #include "ns3/socket-factory.h"
189.6 #include "ns3/udp.h"
189.7 -#include "ns3/internet-node.h"
189.8 #include "ns3/simulator.h"
189.9 #include "ns3/log.h"
189.10 #include "ns3/random-variable.h"
190.1 --- a/tutorial/energy-model.cc Mon Mar 31 16:22:06 2008 -0700
190.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
190.3 @@ -1,132 +0,0 @@
190.4 -/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
190.5 -/*
190.6 - * Copyright (c) 2007 University of Washington
190.7 - *
190.8 - * This program is free software; you can redistribute it and/or modify
190.9 - * it under the terms of the GNU General Public License version 2 as
190.10 - * published by the Free Software Foundation;
190.11 - *
190.12 - * This program is distributed in the hope that it will be useful,
190.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
190.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
190.15 - * GNU General Public License for more details.
190.16 - *
190.17 - * You should have received a copy of the GNU General Public License
190.18 - * along with this program; if not, write to the Free Software
190.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
190.20 - */
190.21 -
190.22 -#include "ns3/log.h"
190.23 -#include "energy-model.h"
190.24 -
190.25 -NS_LOG_COMPONENT_DEFINE("EnergyModel");
190.26 -
190.27 -namespace ns3 {
190.28 -
190.29 -//
190.30 -// Some dimensional analysis ...
190.31 -//
190.32 -// 1 [watt] = 1 [joule] / [second]
190.33 -// 1 [watt] = 1 [volt] * 1 [amp]
190.34 -// 1 [amp] = 1 [coulomb] / 1 [second]
190.35 -// 1 [watt-second] = 1 [joule] / [second] * [second] = 1 [joule]
190.36 -//
190.37 -// A watt has dimensions of energy per second. A watt-second has dimensions
190.38 -// of energy.
190.39 -//
190.40 -// 1 [amp-hour] = 1 [coulomb] / 1 [second] * 1 [hour]
190.41 -// 1 [amp-hour] = 1 [coulomb] / 1 [second] * 3600 [seconds]
190.42 -// 1 [amp-hour] = 3600 [amp-seconds]
190.43 -// 1 [watt-second] = 1 [amp-seconds] * 1 [volt]
190.44 -//
190.45 -// To get the energy capacity of your battery in watt-seconds from its
190.46 -// amp-hour rating, multiply by 3600 and then the voltage. For example, your
190.47 -// Alkaline AAA battery may be rated at 1.5 volts and 900 milli-amp-hours;
190.48 -// so the energy capacity will be .9 * 3600 * 1.5 = 4860 watt-seconds.
190.49 -//
190.50 -// In a very simple battery model, we'll take this naively to mean that this
190.51 -// battery can supply one watt continuously for 4860 seconds and then will die
190.52 -// instantaneously.
190.53 -//
190.54 -// We'll assume our transmitter is measured in watts. When it is turned on
190.55 -// it draws some amount of power, 100 milliwatts for example. If it transmits
190.56 -// for one second, it will suck up .1 watt-seconds of our precious energy.
190.57 -//
190.58 -
190.59 -const InterfaceId EnergyModel::iid =
190.60 - MakeInterfaceId ("EnergyModel", Object::iid);
190.61 -
190.62 -
190.63 -EnergyModel::EnergyModel (
190.64 - double ampHours,
190.65 - double volts,
190.66 - double idlePower,
190.67 - double receivePower,
190.68 - double transmitPower)
190.69 -:
190.70 - m_capacity (ampHours * 3600. * volts),
190.71 - m_idlePower (idlePower),
190.72 - m_receivePower (receivePower),
190.73 - m_transmitPower (transmitPower),
190.74 - m_totalTransmitPower (0.),