45#include "ns3/applications-module.h"
46#include "ns3/core-module.h"
47#include "ns3/flow-monitor-module.h"
48#include "ns3/internet-apps-module.h"
49#include "ns3/internet-module.h"
50#include "ns3/network-module.h"
51#include "ns3/point-to-point-module.h"
52#include "ns3/traffic-control-module.h"
110 std::cout << context <<
"=" <<
rtt.GetMilliSeconds() <<
" ms" << std::endl;
116 std::string bandwidth =
"10Mbps";
117 std::string delay =
"5ms";
126 float startTime = 0.1F;
131 cmd.AddValue(
"bandwidth",
"Bottleneck bandwidth", bandwidth);
132 cmd.AddValue(
"delay",
"Bottleneck delay", delay);
133 cmd.AddValue(
"queueDiscType",
134 "Bottleneck queue disc type in {PfifoFast, ARED, CoDel, FqCoDel, PIE, prio}",
136 cmd.AddValue(
"queueDiscSize",
"Bottleneck queue disc size in packets",
queueDiscSize);
137 cmd.AddValue(
"netdevicesQueueSize",
138 "Bottleneck netdevices queue size in packets",
140 cmd.AddValue(
"bql",
"Enable byte queue limits on bottleneck netdevices",
bql);
141 cmd.AddValue(
"flowsDatarate",
"Upload and download flows datarate",
flowsDatarate);
142 cmd.AddValue(
"flowsPacketsSize",
"Upload and download flows packets sizes",
flowsPacketsSize);
143 cmd.AddValue(
"startTime",
"Simulation start time", startTime);
144 cmd.AddValue(
"simDuration",
"Simulation duration in seconds",
simDuration);
145 cmd.AddValue(
"samplingPeriod",
"Goodput sampling period in seconds",
samplingPeriod);
184 "ns3::PfifoFastQueueDisc",
220 tchBottleneck.AddQueueDiscClasses(handle, 2,
"ns3::QueueDiscClass");
237 address.SetBase(
"192.168.0.0",
"255.255.255.0");
267 queue->TraceConnectWithoutContext(
"BytesInQueue",
a polymophic address class
AttributeValue implementation for Address.
holds a vector of ns3::Application pointers.
Manage ASCII trace files for device models.
AttributeValue implementation for Boolean.
Parse command-line arguments.
Hold variables of type enum.
Helper to enable IP flow monitoring on a set of Nodes.
Ptr< FlowMonitor > InstallAll()
Enable flow monitoring on all nodes.
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.
void Add(const Ipv4InterfaceContainer &other)
Concatenate the entries in the other container with ours.
holds a vector of ns3::NetDevice pointers
Network device transmission queue interface.
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.
Create a ping application and associate it to a node.
@ QUIET
Quiet output (similar to real 'ping -q' output)
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 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.
Simulation virtual time values and global simulation resolution.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
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.
std::vector< uint16_t > ClassIdList
Container type for Class IDs.
AttributeValue implementation for TypeId.
Hold an unsigned integer type.
void SetDefault(std::string name, const AttributeValue &value)
void Connect(std::string path, const CallbackBase &cb)
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
void BytesInQueueTrace(Ptr< OutputStreamWrapper > stream, uint32_t oldVal, uint32_t newVal)
Print the bytes in the queue.
static void PingRtt(std::string context, uint16_t, Time rtt)
Print the ping RTT.
static void GoodputSampling(ApplicationContainer app, Ptr< OutputStreamWrapper > stream, float period)
Sample and print the queue goodput.
void LimitsTrace(Ptr< OutputStreamWrapper > stream, uint32_t oldVal, uint32_t newVal)
Print the queue limits.