NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::ConsumerPcon Class Reference

NDN consumer application with more advanced congestion control options. More...

#include <ndn-consumer-pcon.hpp>

Inheritance diagram for ns3::ndn::ConsumerPcon:
Collaboration diagram for ns3::ndn::ConsumerPcon:

Public Member Functions

 ConsumerPcon ()
 
virtual void OnData (shared_ptr< const Data > data) override
 Method that will be called every time new Data arrives. More...
 
virtual void OnTimeout (uint32_t sequenceNum) override
 Timeout event. More...
 
- Public Member Functions inherited from ns3::ndn::ConsumerWindow
 ConsumerWindow ()
 Default constructor. More...
 
virtual void WillSendOutInterest (uint32_t sequenceNumber)
 An event that is fired just before an Interest packet is actually send out (send is inevitable) More...
 
- Public Member Functions inherited from ns3::ndn::Consumer
 Consumer ()
 Default constructor Sets up randomizer function and packet sequence number. More...
 
virtual ~Consumer ()
 
virtual void OnNack (shared_ptr< const lp::Nack > nack)
 Method that will be called every time new Nack arrives. More...
 
void SendPacket ()
 Actually send packet. More...
 
- Public Member Functions inherited from ns3::ndn::App
 App ()
 Default constructor. More...
 
virtual ~App ()
 
uint32_t GetId () const
 Get application ID (ID of applications face) More...
 
virtual void OnInterest (shared_ptr< const Interest > interest)
 Method that will be called every time new Interest arrives. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::ndn::ConsumerWindow
static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::ndn::Consumer
static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::ndn::App
static TypeId GetTypeId ()
 

Additional Inherited Members

- Public Types inherited from ns3::ndn::ConsumerWindow
typedef std::function< void(double)> WindowTraceCallback
 
- Public Types inherited from ns3::ndn::Consumer
typedef void(* LastRetransmittedInterestDataDelayCallback) (Ptr< App > app, uint32_t seqno, Time delay, int32_t hopCount)
 
typedef void(* FirstInterestDataDelayCallback) (Ptr< App > app, uint32_t seqno, Time delay, uint32_t retxCount, int32_t hopCount)
 
- Public Types inherited from ns3::ndn::App
typedef void(* InterestTraceCallback) (shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face >)
 
typedef void(* DataTraceCallback) (shared_ptr< const Data >, Ptr< App >, shared_ptr< Face >)
 
typedef void(* NackTraceCallback) (shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face >)
 
- Protected Member Functions inherited from ns3::ndn::ConsumerWindow
virtual void ScheduleNextPacket ()
 Constructs the Interest packet and sends it using a callback to the underlying NDN protocol. More...
 
- Protected Member Functions inherited from ns3::ndn::Consumer
virtual void StartApplication ()
 Called at time specified by Start. More...
 
virtual void StopApplication ()
 Called at time specified by Stop. More...
 
void CheckRetxTimeout ()
 Checks if the packet need to be retransmitted becuase of retransmission timer expiration. More...
 
void SetRetxTimer (Time retxTimer)
 Modifies the frequency of checking the retransmission timeouts. More...
 
Time GetRetxTimer () const
 Returns the frequency of checking the retransmission timeouts. More...
 
- Protected Member Functions inherited from ns3::ndn::App
virtual void DoInitialize ()
 
virtual void DoDispose ()
 
- Protected Attributes inherited from ns3::ndn::ConsumerWindow
uint32_t m_payloadSize
 
double m_maxSize
 
uint32_t m_initialWindow
 
bool m_setInitialWindowOnTimeout
 
TracedValue< double > m_window
 
TracedValue< uint32_t > m_inFlight
 
- Protected Attributes inherited from ns3::ndn::Consumer
Ptr< UniformRandomVariablem_rand
 nonce generator More...
 
uint32_t m_seq
 currently requested sequence number More...
 
uint32_t m_seqMax
 maximum number of sequence number More...
 
EventId m_sendEvent
 EventId of pending "send packet" event. More...
 
Time m_retxTimer
 Currently estimated retransmission timer. More...
 
EventId m_retxEvent
 Event to check whether or not retransmission should be performed. More...
 
Ptr< RttEstimatorm_rtt
 RTT estimator. More...
 
Time m_offTime
 Time interval between packets. More...
 
Name m_interestName
 NDN Name of the Interest (use Name) More...
 
Time m_interestLifeTime
 LifeTime for interest packet. More...
 
- Protected Attributes inherited from ns3::ndn::App
bool m_active
 Flag to indicate that application is active (set by StartApplication and StopApplication) More...
 
shared_ptr< Facem_face
 
AppLinkServicem_appLink
 
uint32_t m_appId
 
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_receivedInterests
 App-level trace of received Interests. More...
 
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_receivedDatas
 App-level trace of received Data. More...
 
TracedCallback< shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face > > m_receivedNacks
 App-level trace of received Nacks. More...
 
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_transmittedInterests
 App-level trace of transmitted Interests. More...
 
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_transmittedDatas
 App-level trace of transmitted Data. More...
 
TracedCallback< shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face > > m_transmittedNacks
 App-level trace of transmitted Nacks. More...
 

Detailed Description

NDN consumer application with more advanced congestion control options.

This app uses the algorithms from "A Practical Congestion Control Scheme for Named Data Networking" (https://dl.acm.org/citation.cfm?id=2984369).

It implements slow start, conservative window adaptation (RFC 6675), and 3 different TCP algorithms: AIMD, BIC, and CUBIC (RFC 8312).

Config Paths

ns3::ndn::ConsumerPcon is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::App/$ns3::ndn::Consumer/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::App/$ns3::ndn::Consumer/$ns3::ndn::ConsumerWindow/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::App/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::App/$ns3::ndn::ConsumerWindow/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::Consumer/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::Consumer/$ns3::ndn::ConsumerWindow/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::ConsumerPcon"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::ConsumerWindow/$ns3::ndn::ConsumerPcon"

Attributes

  • CcAlgorithm: Specify which window adaptation algorithm to use (AIMD, BIC, or CUBIC)
    • Set with class: ns3::EnumValue
    • Underlying type:
    • Initial value: AIMD
    • Flags: construct write read
  • Beta: TCP Multiplicative Decrease factor
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.5
    • Flags: construct write read
  • CubicBeta: TCP CUBIC Multiplicative Decrease factor
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.8
    • Flags: construct write read
  • AddRttSuppress: Minimum number of RTTs (1 + this factor) between window decreases
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.5
    • Flags: construct write read
  • ReactToCongestionMarks: If true, process received congestion marks
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • UseCwa: If true, use Conservative Window Adaptation
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • UseCubicFastConvergence: If true, use TCP CUBIC Fast Convergence
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read

Attributes defined in parent class ns3::ndn::ConsumerWindow

  • Window: Initial size of the window
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 1
    • Flags: construct write read
  • PayloadSize: Average size of content object size (to calculate interest generation rate)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 1040
    • Flags: construct write read
  • Size: Amount of data in megabytes to request, relying on PayloadSize parameter (alternative to MaxSeq attribute)
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -1
    • Flags: construct write read
  • MaxSeq: Maximum sequence number to request (alternative to Size attribute, would activate only if Size is -1). The parameter is activated only if Size negative (not set)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 4294967295
    • Flags: construct write read
  • InitialWindowOnTimeout: Set window to initial value when timeout occurs
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read

Attributes defined in parent class ns3::ndn::Consumer

  • StartSeq: Initial sequence number
    • Set with class: ns3::IntegerValue
    • Underlying type: int32_t -2147483648:2147483647
    • Initial value: 0
    • Flags: construct write read
  • Prefix: Name of the Interest
    • Set with class: NameValue
    • Underlying type: Name
    • Initial value: /
    • Flags: construct write read
  • LifeTime: LifeTime for interest packet
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: 2s
    • Flags: construct write read
  • RetxTimer: Timeout defining how frequent retransmission timeouts should be checked
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: 50ms
    • Flags: construct write read

Attributes defined in parent class ns3::Application

  • StartTime: Time at which the application will start
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read
  • StopTime: Time at which the application will stop
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::ndn::ConsumerWindow

TraceSources defined in parent class ns3::ndn::Consumer

TraceSources defined in parent class ns3::ndn::App

Size of this type is 944 bytes (on a 64-bit architecture).

Definition at line 46 of file ndn-consumer-pcon.hpp.

Constructor & Destructor Documentation

◆ ConsumerPcon()

ns3::ndn::ConsumerPcon::ConsumerPcon ( )

Definition at line 88 of file ndn-consumer-pcon.cpp.

Member Function Documentation

◆ GetTypeId()

TypeId ns3::ndn::ConsumerPcon::GetTypeId ( void  )
static

Definition at line 34 of file ndn-consumer-pcon.cpp.

References ns3::ndn::AIMD, ns3::ndn::BIC, and ns3::ndn::CUBIC.

◆ OnData()

void ns3::ndn::ConsumerPcon::OnData ( shared_ptr< const Data >  data)
overridevirtual

Method that will be called every time new Data arrives.

Reimplemented from ns3::ndn::ConsumerWindow.

Definition at line 105 of file ndn-consumer-pcon.cpp.

References ns3::ndn::ConsumerWindow::m_inFlight, ns3::ndn::ConsumerWindow::m_window, ns3::ndn::Consumer::OnData(), and ns3::ndn::ConsumerWindow::ScheduleNextPacket().

◆ OnTimeout()

void ns3::ndn::ConsumerPcon::OnTimeout ( uint32_t  sequenceNumber)
overridevirtual

The documentation for this class was generated from the following files: