A Discrete-Event Network Simulator
API
tcp-validation.cc File Reference
#include <iostream>
#include <fstream>
#include <string>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/traffic-control-module.h"
#include "ns3/internet-module.h"
#include "ns3/internet-apps-module.h"
#include "ns3/point-to-point-module.h"
+ Include dependency graph for tcp-validation.cc:

Go to the source code of this file.

Functions

void ScheduleFirstDctcpTraceConnection (std::ofstream *ofStream)
 
void ScheduleFirstPacketSinkConnection (void)
 
void ScheduleFirstTcpCwndTraceConnection (std::ofstream *ofStream)
 
void ScheduleFirstTcpRttTraceConnection (std::ofstream *ofStream)
 
void ScheduleSecondDctcpTraceConnection (std::ofstream *ofStream)
 
void ScheduleSecondPacketSinkConnection (void)
 
void ScheduleSecondTcpCwndTraceConnection (std::ofstream *ofStream)
 
void ScheduleSecondTcpRttTraceConnection (std::ofstream *ofStream)
 
void TraceFirstCwnd (std::ofstream *ofStream, uint32_t oldCwnd, uint32_t newCwnd)
 
void TraceFirstDctcp (std::ofstream *ofStream, uint32_t bytesMarked, uint32_t bytesAcked, double alpha)
 
void TraceFirstRtt (std::ofstream *ofStream, Time oldRtt, Time newRtt)
 
void TraceFirstRx (Ptr< const Packet > packet, const Address &address)
 
void TraceFirstThroughput (std::ofstream *ofStream, Time throughputInterval)
 
void TraceMarksFrequency (std::ofstream *ofStream, Time marksSamplingInterval)
 
void TracePingRtt (std::ofstream *ofStream, Time rtt)
 
void TraceQueueDrop (std::ofstream *ofStream, Ptr< const QueueDiscItem > item)
 
void TraceQueueLength (std::ofstream *ofStream, DataRate queueLinkRate, uint32_t oldVal, uint32_t newVal)
 
void TraceQueueMark (std::ofstream *ofStream, Ptr< const QueueDiscItem > item, const char *reason)
 
void TraceSecondCwnd (std::ofstream *ofStream, uint32_t oldCwnd, uint32_t newCwnd)
 
void TraceSecondDctcp (std::ofstream *ofStream, uint32_t bytesMarked, uint32_t bytesAcked, double alpha)
 
void TraceSecondRtt (std::ofstream *ofStream, Time oldRtt, Time newRtt)
 
void TraceSecondRx (Ptr< const Packet > packet, const Address &address)
 
void TraceSecondThroughput (std::ofstream *ofStream, Time throughputInterval)
 

Variables

uint32_t g_dropsObserved = 0
 
uint32_t g_firstBytesReceived = 0
 
uint32_t g_marksObserved = 0
 
uint32_t g_secondBytesReceived = 0
 
std::string g_validate = ""
 
bool g_validationFailed = false
 

Detailed Description

Usage

$ ./ns3 run "tcp-validation [Program Options]"

Program Options

--firstTcpType
first TCP type (cubic, dctcp, or reno) [cubic]
--secondTcpType
second TCP type (cubic, dctcp, or reno)
--queueType
bottleneck queue type (fq, codel, pie, or red) [codel]
--baseRtt
base RTT [+80ms]
--ceThreshold
CoDel CE threshold (for DCTCP) [+1ms]
--linkRate
data rate of bottleneck link [50000000bps]
--stopTime
simulation stop time [+1.16667min]
--queueUseEcn
use ECN on queue [false]
--enablePcap
enable Pcap [false]
--validate
validation case to run

Definition in file tcp-validation.cc.

Function Documentation

◆ ScheduleFirstDctcpTraceConnection()

void ScheduleFirstDctcpTraceConnection ( std::ofstream *  ofStream)

Definition at line 412 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceFirstDctcp().

+ Here is the call graph for this function:

◆ ScheduleFirstPacketSinkConnection()

void ScheduleFirstPacketSinkConnection ( void  )

Definition at line 424 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeCallback(), and TraceFirstRx().

+ Here is the call graph for this function:

◆ ScheduleFirstTcpCwndTraceConnection()

void ScheduleFirstTcpCwndTraceConnection ( std::ofstream *  ofStream)

Definition at line 400 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceFirstCwnd().

+ Here is the call graph for this function:

◆ ScheduleFirstTcpRttTraceConnection()

void ScheduleFirstTcpRttTraceConnection ( std::ofstream *  ofStream)

Definition at line 406 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceFirstRtt().

+ Here is the call graph for this function:

◆ ScheduleSecondDctcpTraceConnection()

void ScheduleSecondDctcpTraceConnection ( std::ofstream *  ofStream)

Definition at line 418 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContextFailSafe(), ns3::MakeBoundCallback(), and TraceSecondDctcp().

+ Here is the call graph for this function:

◆ ScheduleSecondPacketSinkConnection()

void ScheduleSecondPacketSinkConnection ( void  )

Definition at line 442 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContext(), ns3::MakeCallback(), and TraceSecondRx().

+ Here is the call graph for this function:

◆ ScheduleSecondTcpCwndTraceConnection()

void ScheduleSecondTcpCwndTraceConnection ( std::ofstream *  ofStream)

Definition at line 430 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContext(), ns3::MakeBoundCallback(), and TraceSecondCwnd().

+ Here is the call graph for this function:

◆ ScheduleSecondTcpRttTraceConnection()

void ScheduleSecondTcpRttTraceConnection ( std::ofstream *  ofStream)

Definition at line 436 of file tcp-validation.cc.

References ns3::Config::ConnectWithoutContext(), ns3::MakeBoundCallback(), and TraceSecondRtt().

+ Here is the call graph for this function:

◆ TraceFirstCwnd()

void TraceFirstCwnd ( std::ofstream *  ofStream,
uint32_t  oldCwnd,
uint32_t  newCwnd 
)

Definition at line 169 of file tcp-validation.cc.

References g_validate, g_validationFailed, ns3::Time::GetSeconds(), ns3::Now(), and NS_LOG_WARN.

Referenced by ScheduleFirstTcpCwndTraceConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceFirstDctcp()

void TraceFirstDctcp ( std::ofstream *  ofStream,
uint32_t  bytesMarked,
uint32_t  bytesAcked,
double  alpha 
)

Definition at line 206 of file tcp-validation.cc.

References sample-rng-plot::alpha, g_validate, g_validationFailed, ns3::Time::GetSeconds(), ns3::Now(), and NS_LOG_WARN.

Referenced by ScheduleFirstDctcpTraceConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceFirstRtt()

void TraceFirstRtt ( std::ofstream *  ofStream,
Time  oldRtt,
Time  newRtt 
)

Definition at line 249 of file tcp-validation.cc.

References g_validate, ns3::Time::GetSeconds(), and ns3::Now().

Referenced by ScheduleFirstTcpRttTraceConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceFirstRx()

void TraceFirstRx ( Ptr< const Packet packet,
const Address address 
)

Definition at line 296 of file tcp-validation.cc.

References g_firstBytesReceived, and ns3::Packet::GetSize().

Referenced by ScheduleFirstPacketSinkConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceFirstThroughput()

void TraceFirstThroughput ( std::ofstream *  ofStream,
Time  throughputInterval 
)

Definition at line 349 of file tcp-validation.cc.

References g_firstBytesReceived, g_validate, g_validationFailed, ns3::Time::GetSeconds(), ns3::Now(), NS_LOG_WARN, and TraceFirstThroughput().

Referenced by TraceFirstThroughput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceMarksFrequency()

void TraceMarksFrequency ( std::ofstream *  ofStream,
Time  marksSamplingInterval 
)

Definition at line 338 of file tcp-validation.cc.

References g_marksObserved, g_validate, ns3::Time::GetSeconds(), ns3::Now(), and TraceMarksFrequency().

Referenced by TraceMarksFrequency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TracePingRtt()

void TracePingRtt ( std::ofstream *  ofStream,
Time  rtt 
)

Definition at line 287 of file tcp-validation.cc.

References g_validate, ns3::Time::GetSeconds(), and ns3::Now().

+ Here is the call graph for this function:

◆ TraceQueueDrop()

void TraceQueueDrop ( std::ofstream *  ofStream,
Ptr< const QueueDiscItem item 
)

Definition at line 308 of file tcp-validation.cc.

References g_dropsObserved, g_validate, ns3::Time::GetSeconds(), and ns3::Now().

+ Here is the call graph for this function:

◆ TraceQueueLength()

void TraceQueueLength ( std::ofstream *  ofStream,
DataRate  queueLinkRate,
uint32_t  oldVal,
uint32_t  newVal 
)

Definition at line 328 of file tcp-validation.cc.

References g_validate, ns3::DataRate::GetBitRate(), ns3::Time::GetSeconds(), and ns3::Now().

+ Here is the call graph for this function:

◆ TraceQueueMark()

void TraceQueueMark ( std::ofstream *  ofStream,
Ptr< const QueueDiscItem item,
const char *  reason 
)

Definition at line 318 of file tcp-validation.cc.

References g_marksObserved, g_validate, ns3::Time::GetSeconds(), and ns3::Now().

+ Here is the call graph for this function:

◆ TraceSecondCwnd()

void TraceSecondCwnd ( std::ofstream *  ofStream,
uint32_t  oldCwnd,
uint32_t  newCwnd 
)

Definition at line 258 of file tcp-validation.cc.

References g_validate, ns3::Time::GetSeconds(), and ns3::Now().

Referenced by ScheduleSecondTcpCwndTraceConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceSecondDctcp()

void TraceSecondDctcp ( std::ofstream *  ofStream,
uint32_t  bytesMarked,
uint32_t  bytesAcked,
double  alpha 
)

Definition at line 278 of file tcp-validation.cc.

References sample-rng-plot::alpha, g_validate, ns3::Time::GetSeconds(), and ns3::Now().

Referenced by ScheduleSecondDctcpTraceConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceSecondRtt()

void TraceSecondRtt ( std::ofstream *  ofStream,
Time  oldRtt,
Time  newRtt 
)

Definition at line 269 of file tcp-validation.cc.

References g_validate, ns3::Time::GetSeconds(), and ns3::Now().

Referenced by ScheduleSecondTcpRttTraceConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceSecondRx()

void TraceSecondRx ( Ptr< const Packet packet,
const Address address 
)

Definition at line 302 of file tcp-validation.cc.

References g_secondBytesReceived, and ns3::Packet::GetSize().

Referenced by ScheduleSecondPacketSinkConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TraceSecondThroughput()

void TraceSecondThroughput ( std::ofstream *  ofStream,
Time  throughputInterval 
)

Definition at line 389 of file tcp-validation.cc.

References g_secondBytesReceived, g_validate, ns3::Time::GetSeconds(), ns3::Now(), and TraceSecondThroughput().

Referenced by TraceSecondThroughput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ g_dropsObserved

uint32_t g_dropsObserved = 0

Definition at line 164 of file tcp-validation.cc.

Referenced by TraceQueueDrop().

◆ g_firstBytesReceived

uint32_t g_firstBytesReceived = 0

Definition at line 161 of file tcp-validation.cc.

Referenced by TraceFirstRx(), and TraceFirstThroughput().

◆ g_marksObserved

uint32_t g_marksObserved = 0

Definition at line 163 of file tcp-validation.cc.

Referenced by TraceMarksFrequency(), and TraceQueueMark().

◆ g_secondBytesReceived

uint32_t g_secondBytesReceived = 0

Definition at line 162 of file tcp-validation.cc.

Referenced by TraceSecondRx(), and TraceSecondThroughput().

◆ g_validate

◆ g_validationFailed

bool g_validationFailed = false

Definition at line 166 of file tcp-validation.cc.

Referenced by TraceFirstCwnd(), TraceFirstDctcp(), and TraceFirstThroughput().