11#include "ns3/applications-module.h"
12#include "ns3/core-module.h"
13#include "ns3/internet-module.h"
14#include "ns3/ipv6-routing-table-entry.h"
15#include "ns3/ipv6-static-routing-helper.h"
16#include "ns3/network-module.h"
17#include "ns3/point-to-point-module.h"
18#include "ns3/tcp-header.h"
19#include "ns3/traffic-control-module.h"
32std::string
dir =
"MixTraffic/";
37 double qSize = queue->GetCurrentSize().GetValue();
42 std::ios::out | std::ios::app);
56 for (uint8_t
i = 0;
i < 5;
i++)
62 "/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow",
105 internet.InstallAll();
109 tchPfifo.AddInternalQueues(handle, 3,
"ns3::DropTailQueue",
"MaxSize",
StringValue(
"1000p"));
121 for (uint8_t
i = 0;
i < 5;
i++)
141 address.SetBase(
"10.0.0.0",
"255.255.255.0");
150 for (uint8_t
i = 0;
i < 5;
i++)
152 address.NewNetwork();
153 interfaces[
i] = address.Assign(devices[
i]);
156 for (uint8_t
i = 0;
i < 2;
i++)
159 address.NewNetwork();
163 address.NewNetwork();
166 address.NewNetwork();
171 uint16_t
port = 50000;
172 uint16_t
port1 = 50001;
182 ftp.SetAttribute(
"Remote", remoteAddress);
243 std::cout <<
"Simulation with COBALT QueueDisc: Start\n" << std::flush;
245 std::cout <<
"Simulation with COBALT QueueDisc: End\n" << std::flush;
246 std::cout <<
"------------------------------------------------\n";
247 std::cout <<
"Simulation with CoDel QueueDisc: Start\n";
249 std::cout <<
"Simulation with CoDel QueueDisc: End\n";
a polymophic address class
AttributeValue implementation for Address.
holds a vector of ns3::Application pointers.
void Start(Time start) const
Start all of the Applications in this container at the start time given as a parameter.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
Manage ASCII trace files for device models.
AttributeValue implementation for Boolean.
A helper to make it easier to instantiate an ns3::BulkSendApplication on a set of nodes.
Class for representing data rates.
AttributeValue implementation for DataRate.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
static Ipv4Address GetAny()
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
Smart pointer class similar to boost::intrusive_ptr.
Holds a vector of ns3::QueueDisc pointers.
Class for representing queue sizes.
AttributeValue implementation for QueueSize.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Hold variables of type string.
static TypeId GetTypeId()
Get the type ID.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
AttributeValue implementation for Time.
Build a set of QueueDisc objects.
uint16_t SetRootQueueDisc(const std::string &type, Args &&... args)
Helper function used to set a root queue disc of the given type and with the given attributes.
AttributeValue implementation for TypeId.
static TypeId GetTypeId()
Get the type ID.
Hold an unsigned integer type.
void CheckQueueSize(Ptr< QueueDisc > queue, std::string queue_disc_type)
void experiment(std::string queue_disc_type)
static void TraceCwnd(std::string queue_disc_type)
static void CwndTrace(Ptr< OutputStreamWrapper > stream, uint32_t oldCwnd, uint32_t newCwnd)
void SetDefault(std::string name, const AttributeValue &value)
void ConnectWithoutContext(std::string path, const CallbackBase &cb)
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< PacketSink > sink
Pointer to the packet sink application.