#include <iostream>
#include <fstream>
#include <string>
#include "ns3/core-module.h"
#include "ns3/applications-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/ipv4-global-routing-helper.h"
Go to the source code of this file.
Functions | |
static void | CwndTracer (uint32_t oldval, uint32_t newval) |
int | main (int argc, char *argv[]) |
NS_LOG_COMPONENT_DEFINE ("TcpLargeTransfer") | |
void | StartFlow (Ptr< Socket >, Ipv4Address, uint16_t) |
void | WriteUntilBufferFull (Ptr< Socket >, uint32_t) |
Variables | |
static uint32_t | currentTxBytes = 0 |
uint8_t | data [writeSize] |
static const uint32_t | totalTxBytes = 2000000 |
static const uint32_t | writeSize = 1040 |
|
static |
Definition at line 65 of file tcp-large-transfer.cc.
References NS_LOG_INFO.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 70 of file tcp-large-transfer.cc.
References ns3::NodeContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), ns3::Config::ConnectWithoutContext(), ns3::NodeContainer::Create(), ns3::Socket::CreateSocket(), CwndTracer(), data, ns3::Simulator::Destroy(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::PcapHelperForDevice::EnablePcapAll(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::TcpSocketFactory::GetTypeId(), ns3::PacketSinkHelper::Install(), ns3::PointToPointHelper::Install(), ns3::InternetStackHelper::InstallAll(), ns3::MakeCallback(), n1n2, ns3::CommandLine::Parse(), ns3::Ipv4GlobalRoutingHelper::PopulateRoutingTables(), ns3::Simulator::Run(), ns3::Simulator::ScheduleNow(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::ApplicationContainer::Start(), StartFlow(), ns3::Simulator::Stop(), ns3::ApplicationContainer::Stop(), and writeSize.
NS_LOG_COMPONENT_DEFINE | ( | "TcpLargeTransfer" | ) |
void StartFlow | ( | Ptr< Socket > | localSocket, |
Ipv4Address | servAddress, | ||
uint16_t | servPort | ||
) |
Definition at line 186 of file tcp-large-transfer.cc.
References ns3::Socket::Connect(), ns3::Socket::GetTxAvailable(), ns3::MakeCallback(), ns3::Simulator::Now(), NS_LOG_LOGIC, ns3::Socket::SetSendCallback(), and WriteUntilBufferFull().
Referenced by main().
Definition at line 199 of file tcp-large-transfer.cc.
References ns3::Socket::Close(), currentTxBytes, data, ns3::Socket::GetTxAvailable(), ns3::Socket::Send(), totalTxBytes, and writeSize.
Referenced by StartFlow().
|
static |
Definition at line 50 of file tcp-large-transfer.cc.
Referenced by WriteUntilBufferFull().
uint8_t data[writeSize] |
Definition at line 54 of file tcp-large-transfer.cc.
Referenced by main(), and WriteUntilBufferFull().
|
static |
Definition at line 49 of file tcp-large-transfer.cc.
Referenced by WriteUntilBufferFull().
|
static |
Definition at line 53 of file tcp-large-transfer.cc.
Referenced by main(), and WriteUntilBufferFull().