A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-variants-comparison.cc File Reference
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/enum.h"
#include "ns3/error-model.h"
#include "ns3/event-id.h"
#include "ns3/flow-monitor-helper.h"
#include "ns3/internet-module.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/tcp-header.h"
#include "ns3/traffic-control-module.h"
#include "ns3/udp-header.h"
#include <fstream>
#include <iostream>
#include <string>
+ Include dependency graph for tcp-variants-comparison.cc:

Go to the source code of this file.

Functions

static void CwndTracer (std::string context, uint32_t oldval, uint32_t newval)
 Congestion window tracer.
 
static uint32_t GetNodeIdFromContext (std::string context)
 Get the Node Id From Context.
 
static void InFlightTracer (std::string context, uint32_t old, uint32_t inFlight)
 In-flight tracer.
 
static void NextRxTracer (std::string context, SequenceNumber32 old, SequenceNumber32 nextRx)
 Next RX tracer.
 
static void NextTxTracer (std::string context, SequenceNumber32 old, SequenceNumber32 nextTx)
 Next TX tracer.
 
static void RtoTracer (std::string context, Time oldval, Time newval)
 RTO tracer.
 
static void RttTracer (std::string context, Time oldval, Time newval)
 RTT tracer.
 
static void SsThreshTracer (std::string context, uint32_t oldval, uint32_t newval)
 Slow start threshold tracer.
 
static void TraceCwnd (std::string cwnd_tr_file_name, uint32_t nodeId)
 Congestion window trace connection.
 
static void TraceInFlight (std::string &in_flight_file_name, uint32_t nodeId)
 In flight trace connection.
 
static void TraceNextRx (std::string &next_rx_seq_file_name, uint32_t nodeId)
 Next RX trace connection.
 
static void TraceNextTx (std::string &next_tx_seq_file_name, uint32_t nodeId)
 Next TX trace connection.
 
static void TraceRto (std::string rto_tr_file_name, uint32_t nodeId)
 RTO trace connection.
 
static void TraceRtt (std::string rtt_tr_file_name, uint32_t nodeId)
 RTT trace connection.
 
static void TraceSsThresh (std::string ssthresh_tr_file_name, uint32_t nodeId)
 Slow start threshold trace connection.
 

Variables

static std::map< uint32_t, Ptr< OutputStreamWrapper > > cWndStream
 Congstion window output stream.
 
static std::map< uint32_t, uint32_tcWndValue
 congestion window value.
 
static std::map< uint32_t, bool > firstCwnd
 First congestion window.
 
static std::map< uint32_t, bool > firstRto
 First RTO.
 
static std::map< uint32_t, bool > firstRtt
 First RTT.
 
static std::map< uint32_t, bool > firstSshThr
 First SlowStart threshold.
 
static std::map< uint32_t, Ptr< OutputStreamWrapper > > inFlightStream
 In flight output stream.
 
static std::map< uint32_t, Ptr< OutputStreamWrapper > > nextRxStream
 Next RX output stream.
 
static std::map< uint32_t, Ptr< OutputStreamWrapper > > nextTxStream
 Next TX output stream.
 
static std::map< uint32_t, Ptr< OutputStreamWrapper > > rtoStream
 RTO output stream.
 
static std::map< uint32_t, Ptr< OutputStreamWrapper > > rttStream
 RTT output stream.
 
static std::map< uint32_t, Ptr< OutputStreamWrapper > > ssThreshStream
 SlowStart threshold output stream.
 
static std::map< uint32_t, uint32_tssThreshValue
 SlowStart threshold value.
 

Function Documentation

◆ CwndTracer()

static void CwndTracer ( std::string context,
uint32_t oldval,
uint32_t newval )
static

Congestion window tracer.

Parameters
contextThe context.
oldvalOld value.
newvalNew value.

Definition at line 84 of file tcp-variants-comparison.cc.

References cWndStream, cWndValue, firstCwnd, firstSshThr, GetNodeIdFromContext(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), ssThreshStream, and ssThreshValue.

Referenced by TraceCwnd().

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

◆ GetNodeIdFromContext()

static uint32_t GetNodeIdFromContext ( std::string context)
static

Get the Node Id From Context.

Parameters
contextThe context.
Returns
the node ID.

Definition at line 69 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), InFlightTracer(), NextRxTracer(), NextTxTracer(), RtoTracer(), RttTracer(), and SsThreshTracer().

+ Here is the caller graph for this function:

◆ InFlightTracer()

static void InFlightTracer ( std::string context,
uint32_t old,
uint32_t inFlight )
static

In-flight tracer.

Parameters
contextThe context.
oldOld value.
inFlightIn flight value.

Definition at line 197 of file tcp-variants-comparison.cc.

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

Referenced by TraceInFlight().

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

◆ NextRxTracer()

static void NextRxTracer ( std::string context,
SequenceNumber32 old,
SequenceNumber32 nextRx )
static

Next RX tracer.

Parameters
contextThe context.
oldOld sequence number.
nextRxNext sequence number.

Definition at line 213 of file tcp-variants-comparison.cc.

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

Referenced by TraceNextRx().

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

◆ NextTxTracer()

static void NextTxTracer ( std::string context,
SequenceNumber32 old,
SequenceNumber32 nextTx )
static

Next TX tracer.

Parameters
contextThe context.
oldOld sequence number.
nextTxNext sequence number.

Definition at line 181 of file tcp-variants-comparison.cc.

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

Referenced by TraceNextTx().

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

◆ RtoTracer()

static void RtoTracer ( std::string context,
Time oldval,
Time newval )
static

RTO tracer.

Parameters
contextThe context.
oldvalOld value.
newvalNew value.

Definition at line 160 of file tcp-variants-comparison.cc.

References firstRto, GetNodeIdFromContext(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), and rtoStream.

Referenced by TraceRto().

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

◆ RttTracer()

static void RttTracer ( std::string context,
Time oldval,
Time newval )
static

RTT tracer.

Parameters
contextThe context.
oldvalOld value.
newvalNew value.

Definition at line 139 of file tcp-variants-comparison.cc.

References firstRtt, GetNodeIdFromContext(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), and rttStream.

Referenced by TraceRtt().

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

◆ SsThreshTracer()

static void SsThreshTracer ( std::string context,
uint32_t oldval,
uint32_t newval )
static

Slow start threshold tracer.

Parameters
contextThe context.
oldvalOld value.
newvalNew value.

Definition at line 111 of file tcp-variants-comparison.cc.

References cWndStream, cWndValue, firstCwnd, firstSshThr, GetNodeIdFromContext(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), ssThreshStream, and ssThreshValue.

Referenced by TraceSsThresh().

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

◆ TraceCwnd()

static void TraceCwnd ( std::string cwnd_tr_file_name,
uint32_t nodeId )
static

Congestion window trace connection.

Parameters
cwnd_tr_file_nameCongestion window trace file name.
nodeIdNode ID.

Definition at line 228 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), cWndStream, CwndTracer(), and ns3::MakeCallback().

+ Here is the call graph for this function:

◆ TraceInFlight()

static void TraceInFlight ( std::string & in_flight_file_name,
uint32_t nodeId )
static

In flight trace connection.

Parameters
in_flight_file_nameIn flight trace file name.
nodeIdNode ID.

Definition at line 306 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), inFlightStream, InFlightTracer(), and ns3::MakeCallback().

+ Here is the call graph for this function:

◆ TraceNextRx()

static void TraceNextRx ( std::string & next_rx_seq_file_name,
uint32_t nodeId )
static

Next RX trace connection.

Parameters
next_rx_seq_file_nameNext RX trace file name.
nodeIdNode ID.

Definition at line 322 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MakeCallback(), nextRxStream, and NextRxTracer().

+ Here is the call graph for this function:

◆ TraceNextTx()

static void TraceNextTx ( std::string & next_tx_seq_file_name,
uint32_t nodeId )
static

Next TX trace connection.

Parameters
next_tx_seq_file_nameNext TX trace file name.
nodeIdNode ID.

Definition at line 290 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MakeCallback(), nextTxStream, and NextTxTracer().

+ Here is the call graph for this function:

◆ TraceRto()

static void TraceRto ( std::string rto_tr_file_name,
uint32_t nodeId )
static

RTO trace connection.

Parameters
rto_tr_file_nameRTO trace file name.
nodeIdNode ID.

Definition at line 275 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MakeCallback(), rtoStream, and RtoTracer().

+ Here is the call graph for this function:

◆ TraceRtt()

static void TraceRtt ( std::string rtt_tr_file_name,
uint32_t nodeId )
static

RTT trace connection.

Parameters
rtt_tr_file_nameRTT trace file name.
nodeIdNode ID.

Definition at line 260 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MakeCallback(), rttStream, and RttTracer().

+ Here is the call graph for this function:

◆ TraceSsThresh()

static void TraceSsThresh ( std::string ssthresh_tr_file_name,
uint32_t nodeId )
static

Slow start threshold trace connection.

Parameters
ssthresh_tr_file_nameSlow start threshold trace file name.
nodeIdNode ID.

Definition at line 244 of file tcp-variants-comparison.cc.

References ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MakeCallback(), ssThreshStream, and SsThreshTracer().

+ Here is the call graph for this function:

Variable Documentation

◆ cWndStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > cWndStream
static

Congstion window output stream.

Definition at line 51 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), SsThreshTracer(), and TraceCwnd().

◆ cWndValue

std::map<uint32_t, uint32_t> cWndValue
static

congestion window value.

Definition at line 59 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), and SsThreshTracer().

◆ firstCwnd

std::map<uint32_t, bool> firstCwnd
static

First congestion window.

Definition at line 47 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), and SsThreshTracer().

◆ firstRto

std::map<uint32_t, bool> firstRto
static

First RTO.

Definition at line 50 of file tcp-variants-comparison.cc.

Referenced by RtoTracer().

◆ firstRtt

std::map<uint32_t, bool> firstRtt
static

First RTT.

Definition at line 49 of file tcp-variants-comparison.cc.

Referenced by RttTracer().

◆ firstSshThr

std::map<uint32_t, bool> firstSshThr
static

First SlowStart threshold.

Definition at line 48 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), and SsThreshTracer().

◆ inFlightStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > inFlightStream
static

In flight output stream.

Definition at line 58 of file tcp-variants-comparison.cc.

Referenced by InFlightTracer(), and TraceInFlight().

◆ nextRxStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > nextRxStream
static

Next RX output stream.

Definition at line 57 of file tcp-variants-comparison.cc.

Referenced by NextRxTracer(), and TraceNextRx().

◆ nextTxStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > nextTxStream
static

Next TX output stream.

Definition at line 56 of file tcp-variants-comparison.cc.

Referenced by NextTxTracer(), and TraceNextTx().

◆ rtoStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > rtoStream
static

RTO output stream.

Definition at line 55 of file tcp-variants-comparison.cc.

Referenced by RtoTracer(), and TraceRto().

◆ rttStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > rttStream
static

RTT output stream.

Definition at line 54 of file tcp-variants-comparison.cc.

Referenced by RttTracer(), and TraceRtt().

◆ ssThreshStream

std::map<uint32_t, Ptr<OutputStreamWrapper> > ssThreshStream
static

SlowStart threshold output stream.

Definition at line 53 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), SsThreshTracer(), and TraceSsThresh().

◆ ssThreshValue

std::map<uint32_t, uint32_t> ssThreshValue
static

SlowStart threshold value.

Definition at line 60 of file tcp-variants-comparison.cc.

Referenced by CwndTracer(), and SsThreshTracer().