A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
socket-bound-tcp-static-routing.cc File Reference
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/ipv4-list-routing-helper.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
#include <cassert>
#include <fstream>
#include <iostream>
#include <string>
+ Include dependency graph for socket-bound-tcp-static-routing.cc:

Go to the source code of this file.

Functions

void BindSock (Ptr< Socket > sock, Ptr< NetDevice > netdev)
 
void dstSocketRecv (Ptr< Socket > socket)
 
void SendStuff (Ptr< Socket > sock, Ipv4Address dstaddr, uint16_t port)
 
void srcSocketRecv (Ptr< Socket > socket)
 
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 = 20000
 
static const uint32_t writeSize = 1040
 

Function Documentation

◆ BindSock()

void BindSock ( Ptr< Socket > sock,
Ptr< NetDevice > netdev )

Definition at line 183 of file socket-bound-tcp-static-routing.cc.

◆ dstSocketRecv()

void dstSocketRecv ( Ptr< Socket > socket)

Definition at line 198 of file socket-bound-static-routing.cc.

References ns3::InetSocketAddress::ConvertFrom(), NS_LOG_INFO, and SendStuff().

+ Here is the call graph for this function:

◆ SendStuff()

void SendStuff ( Ptr< Socket > sock,
Ipv4Address dstaddr,
uint16_t port )

Definition at line 165 of file socket-bound-static-routing.cc.

References ns3::Create(), and port.

Referenced by dstSocketRecv().

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

◆ srcSocketRecv()

void srcSocketRecv ( Ptr< Socket > socket)

Definition at line 179 of file socket-bound-static-routing.cc.

References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ StartFlow()

void StartFlow ( Ptr< Socket > localSocket,
Ipv4Address servAddress,
uint16_t servPort )

Definition at line 189 of file socket-bound-tcp-static-routing.cc.

References currentTxBytes, ns3::MakeCallback(), ns3::Simulator::Now(), NS_LOG_INFO, and WriteUntilBufferFull().

+ Here is the call graph for this function:

◆ WriteUntilBufferFull()

void WriteUntilBufferFull ( Ptr< Socket > localSocket,
uint32_t txSpace )

Definition at line 203 of file socket-bound-tcp-static-routing.cc.

References currentTxBytes, data, totalTxBytes, and writeSize.

Referenced by StartFlow().

+ Here is the caller graph for this function:

Variable Documentation

◆ currentTxBytes

uint32_t currentTxBytes = 0
static

Definition at line 39 of file socket-bound-tcp-static-routing.cc.

Referenced by StartFlow(), and WriteUntilBufferFull().

◆ data

uint8_t data[writeSize]

Definition at line 41 of file socket-bound-tcp-static-routing.cc.

Referenced by ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot3dDataset::Add(), ns3::Gnuplot2dDataset::AddEmptyLine(), ns3::Gnuplot3dDataset::AddEmptyLine(), ns3::PropagationCache< T >::AddPathData(), ns3::PacketMetadata::AddToRaw(), ns3::PacketMetadata::AddToRawU16(), ns3::PacketMetadata::AddToRawU32(), ns3::PacketMetadata::AddToRawU64(), ns3::PacketMetadata::AddToRawU8(), ns3::Buffer::Allocate(), ns3::ByteTagList::Allocate(), ns3::PacketMetadata::Allocate(), ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::Ipv4FlowClassifier::Classify(), ns3::Ipv6FlowClassifier::Classify(), ns3::CRC32Calculate(), ns3::CRC8Calculate(), ns3::Buffer::Create(), ns3::PacketMetadata::Create(), ns3::Buffer::Deallocate(), ns3::ByteTagList::Deallocate(), ns3::PacketMetadata::Deallocate(), ns3::dsr::DsrFsHeader::Deserialize(), ns3::Ipv6ExtensionHeader::Deserialize(), ns3::Asn1Header::DeserializeBitset(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), ns3::Asn1Header::DeserializeBitstring(), PacketTest::DoCheckData(), DsrFsHeaderTest::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), ReadFileTestCase::DoRun(), TestEmptyOptionField::DoRun(), TestFulfilledAlignment::DoRun(), TestOptionWithAlignment::DoRun(), TestOptionWithoutAlignment::DoRun(), ns3::UanMacRcGw::EndCycle(), ns3::Icmpv6L4Protocol::ForgeEchoRequest(), ns3::Ipv4RawSocketImpl::ForwardUp(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::lrwpan::LrWpanMacTrailer::GenerateCrc16(), ns3::Ipv4ClickRouting::HandlePacketFromClick(), ns3::Hash::Function::Murmur3Implementation::MurmurHash3_x64_128(), ns3::Hash::Function::Murmur3Implementation::MurmurHash3_x86_128_incr(), ns3::Hash::Function::Murmur3Implementation::MurmurHash3_x86_32_incr(), ns3::OpenFlowSwitchNetDevice::OutputControl(), ns3::OpenFlowSwitchNetDevice::OutputPacket(), ns3::Buffer::Iterator::PeekU8(), ns3::dsr::DsrOptionRerr::Process(), ns3::dsr::DsrOptionSR::Process(), ns3::Ipv6Extension::ProcessOptions(), ns3::dsr::DsrRouting::PromiscReceive(), ns3::PcapFile::Read(), ns3::Ping::Read64(), ns3::PacketMetadata::ReadFromRawU16(), ns3::PacketMetadata::ReadFromRawU32(), ns3::PacketMetadata::ReadFromRawU64(), ns3::PacketMetadata::ReadFromRawU8(), ns3::Buffer::Iterator::ReadLsbtohU16(), ns3::Buffer::Iterator::ReadLsbtohU32(), ns3::Buffer::Iterator::ReadLsbtohU64(), ns3::Buffer::Iterator::ReadU16(), ns3::TagBuffer::ReadU16(), ns3::Buffer::Iterator::ReadU32(), ns3::TagBuffer::ReadU32(), ns3::Buffer::Iterator::ReadU64(), ns3::TagBuffer::ReadU64(), ns3::dsr::DsrRouting::Receive(), ns3::V4TraceRoute::Receive(), ns3::OpenFlowSwitchNetDevice::ReceiveFromDevice(), ns3::ofi::DropController::ReceiveFromSwitch(), ns3::ofi::LearningController::ReceiveFromSwitch(), ns3::Ipv4RawSocketImpl::RecvFrom(), ns3::Ipv6RawSocketImpl::RecvFrom(), ns3::Buffer::Recycle(), ns3::PacketMetadata::Recycle(), ns3::FdReader::Run(), ns3::OpenFlowSwitchNetDevice::RunThroughFlowTable(), ns3::Ping::Send(), ns3::Icmpv6L4Protocol::SendEchoReply(), ns3::OpenFlowSwitchNetDevice::SendErrorMsg(), ns3::OpenFlowSwitchNetDevice::SendFrom(), ns3::dsr::DsrRouting::SendPacketFromBuffer(), ns3::Ipv4ClickRouting::SendPacketToClick(), ns3::Asn1Header::SerializeBitset(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), ns3::Asn1Header::SerializeBitstring(), MyHeader::SetData(), ns3::Icmpv4DestinationUnreachable::SetData(), ns3::Icmpv4Echo::SetData(), ns3::Icmpv4TimeExceeded::SetData(), simclick_sim_send(), ns3::PcapFile::Write(), ns3::Ping::Write64(), ns3::Buffer::Iterator::WriteHtolsbU16(), ns3::Buffer::Iterator::WriteHtolsbU32(), ns3::Buffer::Iterator::WriteHtolsbU64(), ns3::Buffer::Iterator::WriteHtonU16(), ns3::Buffer::Iterator::WriteHtonU32(), ns3::GtpcIes::WriteHtonU40(), ns3::Buffer::Iterator::WriteHtonU64(), ns3::AnimationInterface::WriteN(), ns3::Buffer::Iterator::WriteU16(), ns3::TagBuffer::WriteU16(), ns3::Buffer::Iterator::WriteU32(), ns3::TagBuffer::WriteU32(), ns3::Buffer::Iterator::WriteU64(), ns3::TagBuffer::WriteU64(), ns3::Buffer::Iterator::WriteU8(), ns3::Buffer::Iterator::WriteU8(), and WriteUntilBufferFull().

◆ totalTxBytes

const uint32_t totalTxBytes = 20000
static

Definition at line 38 of file socket-bound-tcp-static-routing.cc.

Referenced by WriteUntilBufferFull().

◆ writeSize

const uint32_t writeSize = 1040
static

Definition at line 40 of file socket-bound-tcp-static-routing.cc.

Referenced by WriteUntilBufferFull().