#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/internet-apps-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/traffic-control-module.h"
#include <fstream>
#include <iostream>
#include <string>
Go to the source code of this file.
Functions | |
void | ScheduleFirstDctcpTraceConnection (std::ofstream *ofStream) |
Schedule trace connection. More... | |
void | ScheduleFirstPacketSinkConnection () |
Schedule trace connection. More... | |
void | ScheduleFirstTcpCwndTraceConnection (std::ofstream *ofStream) |
Schedule trace connection. More... | |
void | ScheduleFirstTcpRttTraceConnection (std::ofstream *ofStream) |
Schedule trace connection. More... | |
void | ScheduleSecondDctcpTraceConnection (std::ofstream *ofStream) |
Schedule trace connection. More... | |
void | ScheduleSecondPacketSinkConnection () |
Schedule trace connection. More... | |
void | ScheduleSecondTcpCwndTraceConnection (std::ofstream *ofStream) |
Schedule trace connection. More... | |
void | ScheduleSecondTcpRttTraceConnection (std::ofstream *ofStream) |
Schedule trace connection. More... | |
void | TraceFirstCwnd (std::ofstream *ofStream, uint32_t oldCwnd, uint32_t newCwnd) |
Trace first congestion window. More... | |
void | TraceFirstDctcp (std::ofstream *ofStream, uint32_t bytesMarked, uint32_t bytesAcked, double alpha) |
Trace first TcpDctcp. More... | |
void | TraceFirstRtt (std::ofstream *ofStream, Time oldRtt, Time newRtt) |
Trace first RTT. More... | |
void | TraceFirstRx (Ptr< const Packet > packet, const Address &address) |
Trace first Rx. More... | |
void | TraceFirstThroughput (std::ofstream *ofStream, Time throughputInterval) |
Trace the first throughput. More... | |
void | TraceMarksFrequency (std::ofstream *ofStream, Time marksSamplingInterval) |
Trace marks frequency. More... | |
void | TracePingRtt (std::ofstream *ofStream, uint16_t, Time rtt) |
Trace ping RTT. More... | |
void | TraceQueueDrop (std::ofstream *ofStream, Ptr< const QueueDiscItem > item) |
Trace queue drop. More... | |
void | TraceQueueLength (std::ofstream *ofStream, DataRate queueLinkRate, uint32_t oldVal, uint32_t newVal) |
Trace queue length. More... | |
void | TraceQueueMark (std::ofstream *ofStream, Ptr< const QueueDiscItem > item, const char *reason) |
Trace queue marks. More... | |
void | TraceSecondCwnd (std::ofstream *ofStream, uint32_t oldCwnd, uint32_t newCwnd) |
Trace second congestion window. More... | |
void | TraceSecondDctcp (std::ofstream *ofStream, uint32_t bytesMarked, uint32_t bytesAcked, double alpha) |
Trace second TcpDctcp. More... | |
void | TraceSecondRtt (std::ofstream *ofStream, Time oldRtt, Time newRtt) |
Trace second RTT. More... | |
void | TraceSecondRx (Ptr< const Packet > packet, const Address &address) |
Trace second Rx. More... | |
void | TraceSecondThroughput (std::ofstream *ofStream, Time throughputInterval) |
Trace the second throughput. More... | |
Variables | |
uint32_t | g_dropsObserved = 0 |
Number of dropped packets observed. More... | |
uint32_t | g_firstBytesReceived = 0 |
First received packet size. More... | |
uint32_t | g_marksObserved = 0 |
Number of marked packets observed. More... | |
uint32_t | g_secondBytesReceived = 0 |
Second received packet size. More... | |
std::string | g_validate = "" |
Empty string disables validation. More... | |
bool | g_validationFailed = false |
True if validation failed. More... | |
void ScheduleFirstDctcpTraceConnection | ( | std::ofstream * | ofStream | ) |
Schedule trace connection.
ofStream | Output filestream. |
Definition at line 551 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceFirstDctcp().
void ScheduleFirstPacketSinkConnection | ( | ) |
Schedule trace connection.
Definition at line 575 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeCallback(), and TraceFirstRx().
void ScheduleFirstTcpCwndTraceConnection | ( | std::ofstream * | ofStream | ) |
Schedule trace connection.
ofStream | Output filestream. |
Definition at line 526 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceFirstCwnd().
void ScheduleFirstTcpRttTraceConnection | ( | std::ofstream * | ofStream | ) |
Schedule trace connection.
ofStream | Output filestream. |
Definition at line 539 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceFirstRtt().
void ScheduleSecondDctcpTraceConnection | ( | std::ofstream * | ofStream | ) |
Schedule trace connection.
ofStream | Output filestream. |
Definition at line 564 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceSecondDctcp().
void ScheduleSecondPacketSinkConnection | ( | ) |
Schedule trace connection.
Definition at line 609 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContext(), ns3::MakeCallback(), and TraceSecondRx().
void ScheduleSecondTcpCwndTraceConnection | ( | std::ofstream * | ofStream | ) |
Schedule trace connection.
ofStream | Output filestream. |
Definition at line 587 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContext(), ns3::MakeBoundCallback(), and TraceSecondCwnd().
void ScheduleSecondTcpRttTraceConnection | ( | std::ofstream * | ofStream | ) |
Schedule trace connection.
ofStream | Output filestream. |
Definition at line 599 of file tcp-validation.cc.
References ns3::Config::ConnectWithoutContext(), ns3::MakeBoundCallback(), and TraceSecondRtt().
void TraceFirstCwnd | ( | std::ofstream * | ofStream, |
uint32_t | oldCwnd, | ||
uint32_t | newCwnd | ||
) |
Trace first congestion window.
ofStream | Output filestream. |
oldCwnd | Old value. |
newCwnd | new value. |
Definition at line 180 of file tcp-validation.cc.
References g_validate, g_validationFailed, ns3::Time::GetSeconds(), ns3::Now(), ns3::Simulator::Now(), NS_LOG_WARN, and ns3::Time::S.
Referenced by ScheduleFirstTcpCwndTraceConnection().
void TraceFirstDctcp | ( | std::ofstream * | ofStream, |
uint32_t | bytesMarked, | ||
uint32_t | bytesAcked, | ||
double | alpha | ||
) |
Trace first TcpDctcp.
ofStream | Output filestream. |
bytesMarked | Bytes marked. |
bytesAcked | Bytes ACKed. |
alpha | Alpha. |
Definition at line 226 of file tcp-validation.cc.
References g_validate, g_validationFailed, ns3::Time::GetSeconds(), ns3::Now(), ns3::Simulator::Now(), NS_LOG_WARN, and ns3::Time::S.
Referenced by ScheduleFirstDctcpTraceConnection().
Trace first RTT.
ofStream | Output filestream. |
oldRtt | Old value. |
newRtt | New value. |
Definition at line 278 of file tcp-validation.cc.
References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by ScheduleFirstTcpRttTraceConnection().
Trace first Rx.
packet | The packet. |
address | The sender address. |
Definition at line 362 of file tcp-validation.cc.
References g_firstBytesReceived, and ns3::Packet::GetSize().
Referenced by ScheduleFirstPacketSinkConnection().
void TraceFirstThroughput | ( | std::ofstream * | ofStream, |
Time | throughputInterval | ||
) |
Trace the first throughput.
ofStream | Output filestream. |
throughputInterval | The throughput interval. |
Definition at line 459 of file tcp-validation.cc.
References g_firstBytesReceived, g_validate, g_validationFailed, ns3::Time::GetSeconds(), ns3::Now(), ns3::Simulator::Now(), NS_LOG_WARN, ns3::Time::S, ns3::Simulator::Schedule(), and throughput.
void TraceMarksFrequency | ( | std::ofstream * | ofStream, |
Time | marksSamplingInterval | ||
) |
Trace marks frequency.
ofStream | Output filestream. |
marksSamplingInterval | The mark sampling interval. |
Definition at line 439 of file tcp-validation.cc.
References g_marksObserved, g_validate, ns3::Time::GetSeconds(), ns3::Simulator::Now(), and ns3::Simulator::Schedule().
void TracePingRtt | ( | std::ofstream * | ofStream, |
uint16_t | , | ||
Time | rtt | ||
) |
Trace ping RTT.
ofStream | Output filestream. |
rtt | RTT value. |
Definition at line 347 of file tcp-validation.cc.
References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
void TraceQueueDrop | ( | std::ofstream * | ofStream, |
Ptr< const QueueDiscItem > | item | ||
) |
Trace queue drop.
ofStream | Output filestream. |
item | The dropped QueueDiscItem. |
Definition at line 386 of file tcp-validation.cc.
References g_dropsObserved, g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
void TraceQueueLength | ( | std::ofstream * | ofStream, |
DataRate | queueLinkRate, | ||
uint32_t | oldVal, | ||
uint32_t | newVal | ||
) |
Trace queue length.
ofStream | Output filestream. |
queueLinkRate | Queue link rate. |
oldVal | Old value. |
newVal | New value. |
Definition at line 421 of file tcp-validation.cc.
References g_validate, ns3::DataRate::GetBitRate(), ns3::Time::GetSeconds(), and ns3::Simulator::Now().
void TraceQueueMark | ( | std::ofstream * | ofStream, |
Ptr< const QueueDiscItem > | item, | ||
const char * | reason | ||
) |
Trace queue marks.
ofStream | Output filestream. |
item | The marked QueueDiscItem. |
reason | The reason. |
Definition at line 403 of file tcp-validation.cc.
References g_marksObserved, g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
void TraceSecondCwnd | ( | std::ofstream * | ofStream, |
uint32_t | oldCwnd, | ||
uint32_t | newCwnd | ||
) |
Trace second congestion window.
ofStream | Output filestream. |
oldCwnd | Old value. |
newCwnd | new value. |
Definition at line 295 of file tcp-validation.cc.
References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by ScheduleSecondTcpCwndTraceConnection().
void TraceSecondDctcp | ( | std::ofstream * | ofStream, |
uint32_t | bytesMarked, | ||
uint32_t | bytesAcked, | ||
double | alpha | ||
) |
Trace second TcpDctcp.
ofStream | Output filestream. |
bytesMarked | Bytes marked. |
bytesAcked | Bytes ACKed. |
alpha | Alpha. |
Definition at line 332 of file tcp-validation.cc.
References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by ScheduleSecondDctcpTraceConnection().
Trace second RTT.
ofStream | Output filestream. |
oldRtt | Old value. |
newRtt | New value. |
Definition at line 314 of file tcp-validation.cc.
References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by ScheduleSecondTcpRttTraceConnection().
Trace second Rx.
packet | The packet. |
address | The sender address. |
Definition at line 374 of file tcp-validation.cc.
References g_secondBytesReceived, and ns3::Packet::GetSize().
Referenced by ScheduleSecondPacketSinkConnection().
void TraceSecondThroughput | ( | std::ofstream * | ofStream, |
Time | throughputInterval | ||
) |
Trace the second throughput.
ofStream | Output filestream. |
throughputInterval | The throughput interval. |
Definition at line 509 of file tcp-validation.cc.
References g_secondBytesReceived, g_validate, ns3::Time::GetSeconds(), ns3::Simulator::Now(), and ns3::Simulator::Schedule().
uint32_t g_dropsObserved = 0 |
Number of dropped packets observed.
Definition at line 168 of file tcp-validation.cc.
Referenced by TraceQueueDrop().
uint32_t g_firstBytesReceived = 0 |
First received packet size.
Definition at line 165 of file tcp-validation.cc.
Referenced by TraceFirstRx(), and TraceFirstThroughput().
uint32_t g_marksObserved = 0 |
Number of marked packets observed.
Definition at line 167 of file tcp-validation.cc.
Referenced by TraceMarksFrequency(), and TraceQueueMark().
uint32_t g_secondBytesReceived = 0 |
Second received packet size.
Definition at line 166 of file tcp-validation.cc.
Referenced by TraceSecondRx(), and TraceSecondThroughput().
std::string g_validate = "" |
Empty string disables validation.
Definition at line 169 of file tcp-validation.cc.
Referenced by TraceFirstCwnd(), TraceFirstDctcp(), TraceFirstRtt(), TraceFirstThroughput(), TraceMarksFrequency(), TracePingRtt(), TraceQueueDrop(), TraceQueueLength(), TraceQueueMark(), TraceSecondCwnd(), TraceSecondDctcp(), TraceSecondRtt(), and TraceSecondThroughput().
bool g_validationFailed = false |
True if validation failed.
Definition at line 170 of file tcp-validation.cc.
Referenced by TraceFirstCwnd(), TraceFirstDctcp(), and TraceFirstThroughput().