A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-validation.cc File Reference
#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>
+ Include dependency graph for tcp-validation.cc:

Go to the source code of this file.

Functions

void ScheduleFirstDctcpTraceConnection (std::ofstream *ofStream)
 Schedule trace connection.
 
void ScheduleFirstPacketSinkConnection ()
 Schedule trace connection.
 
void ScheduleFirstTcpCwndTraceConnection (std::ofstream *ofStream)
 Schedule trace connection.
 
void ScheduleFirstTcpRttTraceConnection (std::ofstream *ofStream)
 Schedule trace connection.
 
void ScheduleSecondDctcpTraceConnection (std::ofstream *ofStream)
 Schedule trace connection.
 
void ScheduleSecondPacketSinkConnection ()
 Schedule trace connection.
 
void ScheduleSecondTcpCwndTraceConnection (std::ofstream *ofStream)
 Schedule trace connection.
 
void ScheduleSecondTcpRttTraceConnection (std::ofstream *ofStream)
 Schedule trace connection.
 
void TraceFirstCwnd (std::ofstream *ofStream, uint32_t oldCwnd, uint32_t newCwnd)
 Trace first congestion window.
 
void TraceFirstDctcp (std::ofstream *ofStream, uint32_t bytesMarked, uint32_t bytesAcked, double alpha)
 Trace first TcpDctcp.
 
void TraceFirstRtt (std::ofstream *ofStream, Time oldRtt, Time newRtt)
 Trace first RTT.
 
void TraceFirstRx (Ptr< const Packet > packet, const Address &address)
 Trace first Rx.
 
void TraceFirstThroughput (std::ofstream *ofStream, Time throughputInterval)
 Trace the first throughput.
 
void TraceMarksFrequency (std::ofstream *ofStream, Time marksSamplingInterval)
 Trace marks frequency.
 
void TracePingRtt (std::ofstream *ofStream, uint16_t, Time rtt)
 Trace ping RTT.
 
void TraceQueueDrop (std::ofstream *ofStream, Ptr< const QueueDiscItem > item)
 Trace queue drop.
 
void TraceQueueLength (std::ofstream *ofStream, DataRate queueLinkRate, uint32_t oldVal, uint32_t newVal)
 Trace queue length.
 
void TraceQueueMark (std::ofstream *ofStream, Ptr< const QueueDiscItem > item, const char *reason)
 Trace queue marks.
 
void TraceSecondCwnd (std::ofstream *ofStream, uint32_t oldCwnd, uint32_t newCwnd)
 Trace second congestion window.
 
void TraceSecondDctcp (std::ofstream *ofStream, uint32_t bytesMarked, uint32_t bytesAcked, double alpha)
 Trace second TcpDctcp.
 
void TraceSecondRtt (std::ofstream *ofStream, Time oldRtt, Time newRtt)
 Trace second RTT.
 
void TraceSecondRx (Ptr< const Packet > packet, const Address &address)
 Trace second Rx.
 
void TraceSecondThroughput (std::ofstream *ofStream, Time throughputInterval)
 Trace the second throughput.
 

Variables

uint32_t g_dropsObserved = 0
 Number of dropped packets observed.
 
uint32_t g_firstBytesReceived = 0
 First received packet size.
 
uint32_t g_marksObserved = 0
 Number of marked packets observed.
 
uint32_t g_secondBytesReceived = 0
 Second received packet size.
 
std::string g_validate = ""
 Empty string disables validation.
 
bool g_validationFailed = false
 True if validation failed.
 

Function Documentation

◆ ScheduleFirstDctcpTraceConnection()

void ScheduleFirstDctcpTraceConnection ( std::ofstream * ofStream)

Schedule trace connection.

Parameters
ofStreamOutput filestream.

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

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

+ Here is the call graph for this function:

◆ ScheduleFirstPacketSinkConnection()

void ScheduleFirstPacketSinkConnection ( )

Schedule trace connection.

Definition at line 548 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)

Schedule trace connection.

Parameters
ofStreamOutput filestream.

Definition at line 499 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)

Schedule trace connection.

Parameters
ofStreamOutput filestream.

Definition at line 512 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)

Schedule trace connection.

Parameters
ofStreamOutput filestream.

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

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

+ Here is the call graph for this function:

◆ ScheduleSecondPacketSinkConnection()

void ScheduleSecondPacketSinkConnection ( )

Schedule trace connection.

Definition at line 582 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)

Schedule trace connection.

Parameters
ofStreamOutput filestream.

Definition at line 560 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)

Schedule trace connection.

Parameters
ofStreamOutput filestream.

Definition at line 572 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 )

Trace first congestion window.

Parameters
ofStreamOutput filestream.
oldCwndOld value.
newCwndnew value.

Definition at line 153 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().

+ 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 )

Trace first TcpDctcp.

Parameters
ofStreamOutput filestream.
bytesMarkedBytes marked.
bytesAckedBytes ACKed.
alphaAlpha.

Definition at line 199 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().

+ 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 )

Trace first RTT.

Parameters
ofStreamOutput filestream.
oldRttOld value.
newRttNew value.

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

References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::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 )

Trace first Rx.

Parameters
packetThe packet.
addressThe sender address.

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

References g_firstBytesReceived.

Referenced by ScheduleFirstPacketSinkConnection().

+ Here is the caller graph for this function:

◆ TraceFirstThroughput()

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

Trace the first throughput.

Parameters
ofStreamOutput filestream.
throughputIntervalThe throughput interval.

Definition at line 432 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(), throughput, 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 )

Trace marks frequency.

Parameters
ofStreamOutput filestream.
marksSamplingIntervalThe mark sampling interval.

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

References g_marksObserved, g_validate, ns3::Time::GetSeconds(), ns3::Simulator::Now(), ns3::Simulator::Schedule(), 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,
uint16_t ,
Time rtt )

Trace ping RTT.

Parameters
ofStreamOutput filestream.
rttRTT value.

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

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

+ Here is the call graph for this function:

◆ TraceQueueDrop()

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

Trace queue drop.

Parameters
ofStreamOutput filestream.
itemThe dropped QueueDiscItem.

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

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

+ Here is the call graph for this function:

◆ TraceQueueLength()

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

Trace queue length.

Parameters
ofStreamOutput filestream.
queueLinkRateQueue link rate.
oldValOld value.
newValNew value.

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

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

+ Here is the call graph for this function:

◆ TraceQueueMark()

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

Trace queue marks.

Parameters
ofStreamOutput filestream.
itemThe marked QueueDiscItem.
reasonThe reason.

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

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

+ Here is the call graph for this function:

◆ TraceSecondCwnd()

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

Trace second congestion window.

Parameters
ofStreamOutput filestream.
oldCwndOld value.
newCwndnew value.

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

References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::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 )

Trace second TcpDctcp.

Parameters
ofStreamOutput filestream.
bytesMarkedBytes marked.
bytesAckedBytes ACKed.
alphaAlpha.

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

References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::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 )

Trace second RTT.

Parameters
ofStreamOutput filestream.
oldRttOld value.
newRttNew value.

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

References g_validate, ns3::Time::GetSeconds(), and ns3::Simulator::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 )

Trace second Rx.

Parameters
packetThe packet.
addressThe sender address.

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

References g_secondBytesReceived.

Referenced by ScheduleSecondPacketSinkConnection().

+ Here is the caller graph for this function:

◆ TraceSecondThroughput()

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

Trace the second throughput.

Parameters
ofStreamOutput filestream.
throughputIntervalThe throughput interval.

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

References g_secondBytesReceived, g_validate, ns3::Time::GetSeconds(), ns3::Simulator::Now(), ns3::Simulator::Schedule(), 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

Number of dropped packets observed.

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

Referenced by TraceQueueDrop().

◆ g_firstBytesReceived

uint32_t g_firstBytesReceived = 0

First received packet size.

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

Referenced by TraceFirstRx(), and TraceFirstThroughput().

◆ g_marksObserved

uint32_t g_marksObserved = 0

Number of marked packets observed.

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

Referenced by TraceMarksFrequency(), and TraceQueueMark().

◆ g_secondBytesReceived

uint32_t g_secondBytesReceived = 0

Second received packet size.

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

Referenced by TraceSecondRx(), and TraceSecondThroughput().

◆ g_validate

◆ g_validationFailed

bool g_validationFailed = false

True if validation failed.

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

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