A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
tcp-variants-comparison.cc File Reference
#include <iostream>
#include <fstream>
#include <string>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/error-model.h"
#include "ns3/tcp-header.h"
#include "ns3/udp-header.h"
#include "ns3/enum.h"
#include "ns3/event-id.h"
#include "ns3/flow-monitor-helper.h"
#include "ns3/ipv4-global-routing-helper.h"
+ Include dependency graph for tcp-variants-comparison.cc:

Go to the source code of this file.

Functions

static void CwndTracer (Ptr< OutputStreamWrapper >stream, uint32_t oldval, uint32_t newval)
 
int main (int argc, char *argv[])
 
static void OutputTrace ()
 
static void SsThreshTracer (Ptr< OutputStreamWrapper >stream, uint32_t oldval, uint32_t newval)
 
static void TraceCwnd (std::string cwnd_tr_file_name)
 
static void TraceSsThresh (std::string ssthresh_tr_file_name)
 

Variables

Time current = Time::FromInteger(3, Time::S)
 
bool first = true
 
double old_time = 0.0
 
EventId output
 

Function Documentation

static void CwndTracer ( Ptr< OutputStreamWrapper stream,
uint32_t  oldval,
uint32_t  newval 
)
static

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

References ns3::EventId::Cancel(), current, first, ns3::Time::GetSeconds(), ns3::OutputStreamWrapper::GetStream(), ns3::EventId::IsExpired(), ns3::Simulator::Now(), old_time, output, OutputTrace(), and ns3::Simulator::Schedule().

Referenced by TraceCwnd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

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

References ns3::Ipv4InterfaceContainer::Add(), first::address, ns3::CommandLine::AddValue(), ns3::Ipv4AddressHelper::Assign(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), first::devices, ns3::AsciiTraceHelperForIpv4::EnableAsciiIpv4All(), ns3::PcapHelperForDevice::EnablePcapAll(), ns3::RateErrorModel::ERROR_UNIT_PACKET, ns3::Ipv4InterfaceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::NodeContainer::GetN(), ns3::Header::GetSerializedSize(), ns3::TcpNewReno::GetTypeId(), ns3::TcpReno::GetTypeId(), ns3::TcpTahoe::GetTypeId(), ns3::TcpSocketFactory::GetTypeId(), ns3::TcpWestwood::GetTypeId(), ns3::PacketSinkHelper::Install(), ns3::BulkSendHelper::Install(), ns3::PointToPointHelper::Install(), ns3::FlowMonitorHelper::InstallAll(), ns3::InternetStackHelper::InstallAll(), first::interfaces, ns3::Ipv4AddressHelper::NewNetwork(), NS_LOG_DEBUG, NS_LOG_INFO, NS_LOG_LOGIC, ns3::CommandLine::Parse(), ns3::Ipv4GlobalRoutingHelper::PopulateRoutingTables(), port, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::FlowMonitorHelper::SerializeToXmlFile(), ns3::PacketSinkHelper::SetAttribute(), ns3::BulkSendHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::RateErrorModel::SetRandomVariable(), ns3::RateErrorModel::SetRate(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::RandomVariableStream::SetStream(), ns3::RateErrorModel::SetUnit(), first::stack, ns3::ApplicationContainer::Start(), ns3::Simulator::Stop(), ns3::ApplicationContainer::Stop(), TraceCwnd(), TraceSsThresh(), ns3::TcpWestwood::TUSTIN, and ns3::TcpWestwood::WESTWOODPLUS.

+ Here is the call graph for this function:

static void OutputTrace ( )
static

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

Referenced by CwndTracer(), and SsThreshTracer().

+ Here is the caller graph for this function:

static void SsThreshTracer ( Ptr< OutputStreamWrapper stream,
uint32_t  oldval,
uint32_t  newval 
)
static

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

References ns3::EventId::Cancel(), current, first, ns3::Time::GetSeconds(), ns3::OutputStreamWrapper::GetStream(), ns3::EventId::IsExpired(), ns3::Simulator::Now(), old_time, output, OutputTrace(), and ns3::Simulator::Schedule().

Referenced by TraceSsThresh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void TraceCwnd ( std::string  cwnd_tr_file_name)
static

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

References ns3::Config::ConnectWithoutContext(), ns3::AsciiTraceHelper::CreateFileStream(), CwndTracer(), ns3::MakeBoundCallback(), and NS_LOG_DEBUG.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void TraceSsThresh ( std::string  ssthresh_tr_file_name)
static

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

References ns3::Config::ConnectWithoutContext(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::MakeBoundCallback(), NS_LOG_DEBUG, and SsThreshTracer().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

double old_time = 0.0

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

Referenced by CwndTracer(), and SsThreshTracer().