A Discrete-Event Network Simulator
API
tcp-rate-ops-test.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 NITK Surathkal
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Authors: Vivek Jain <jain.vivek.anand@gmail.com>
18  * Viyom Mittal <viyommittal@gmail.com>
19  * Mohit P. Tahiliani <tahiliani@nitk.edu.in>
20  */
21 
22 #include "tcp-error-model.h"
23 #include "tcp-general-test.h"
24 
25 #include "ns3/config.h"
26 #include "ns3/log.h"
27 #include "ns3/tcp-rate-ops.h"
28 #include "ns3/tcp-tx-buffer.h"
29 #include "ns3/tcp-tx-item.h"
30 #include "ns3/test.h"
31 
32 using namespace ns3;
33 
34 NS_LOG_COMPONENT_DEFINE("TcpRateOpsTestSuite");
35 
36 class MimicCongControl;
37 
45 {
46  public:
55  TcpRateLinuxBasicTest(uint32_t cWnd,
56  SequenceNumber32 tailSeq,
57  SequenceNumber32 nextTx,
58  uint32_t testCase,
59  std::string testName);
60 
61  private:
62  void DoRun() override;
63 
68  void SendSkb(TcpTxItem* skb);
73  void SkbDelivered(TcpTxItem* skb);
74 
76  uint32_t m_cWnd;
77  uint32_t m_inFlight;
78  uint32_t m_segmentSize;
79  uint32_t m_delivered;
83  uint32_t m_testCase;
84  std::vector<TcpTxItem*> m_skbs;
85 };
86 
88  SequenceNumber32 tailSeq,
89  SequenceNumber32 nextTx,
90  uint32_t testCase,
91  std::string testName)
92  : TestCase(testName),
93  m_cWnd(cWnd),
94  m_inFlight(0),
95  m_segmentSize(1),
96  m_delivered(0),
97  m_deliveredTime(Seconds(0)),
98  m_tailSeq(tailSeq),
99  m_nextTx(nextTx),
100  m_testCase(testCase)
101 {
102 }
103 
104 void
106 {
107  for (uint8_t i = 0; i < 100; ++i)
108  {
109  m_skbs.push_back(new TcpTxItem());
110  Simulator::Schedule(Time(Seconds(i * 0.01)),
112  this,
113  m_skbs[i]);
114  }
115 
116  for (uint8_t i = 0; i < 100; ++i)
117  {
118  Simulator::Schedule(Time(Seconds((i + 1) * 0.1)),
120  this,
121  m_skbs[i]);
122  }
123 
124  Simulator::Run();
125  Simulator::Destroy();
126 
127  for (uint8_t i = 0; i < 100; ++i)
128  {
129  delete m_skbs[i];
130  }
131 }
132 
133 void
135 {
136  bool isStartOfTransmission = m_inFlight == 0;
138  m_rateOps.SkbSent(skb, isStartOfTransmission);
139  m_inFlight += skb->GetSeqSize();
140 
142  m_delivered,
143  "SKB should have delivered equal to current value of total delivered");
144 
145  if (isStartOfTransmission)
146  {
148  Simulator::Now(),
149  "SKB should have updated the delivered time to current value");
150  }
151  else
152  {
155  "SKB should have updated the delivered time to current value");
156  }
157 }
158 
159 void
161 {
162  m_rateOps.SkbDelivered(skb);
163  m_inFlight -= skb->GetSeqSize();
164  m_delivered += skb->GetSeqSize();
166 
168  Time::Max(),
169  "SKB should have delivered time as Time::Max ()");
170 
171  if (m_testCase == 1)
172  {
174  false,
175  "Socket should not be applimited");
176  }
177  else if (m_testCase == 2)
178  {
180  true,
181  "Socket should be applimited");
182  }
183 }
184 
191 {
192  public:
197  static TypeId GetTypeId();
198 
200  {
201  }
202 
203  bool HasCongControl() const override
204  {
205  return true;
206  }
207 };
208 
209 TypeId
211 {
212  static TypeId tid = TypeId("ns3::MimicCongControl")
214  .AddConstructor<MimicCongControl>()
215  .SetGroupName("Internet");
216  return tid;
217 }
218 
231 {
232  public:
239  TcpRateLinuxWithSocketsTest(const std::string& desc,
240  bool sackEnabled,
241  std::vector<uint32_t>& toDrop);
242 
243  protected:
250 
256 
263  void Rx(const Ptr<const Packet> p, const TcpHeader& h, SocketWho who) override;
264 
270  void BytesInFlightTrace(uint32_t oldValue, uint32_t newValue) override;
271 
278  void PktDropped(const Ipv4Header& ipH, const TcpHeader& tcpH, Ptr<const Packet> p);
279 
283  void ConfigureEnvironment() override;
284 
288  void FinalChecks() override;
289 
294  void RateUpdatedTrace(const TcpRateLinux::TcpRateConnection& rate) override;
295 
300  void RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample& sample) override;
301 
302  private:
305  std::vector<uint32_t> m_toDrop;
306  uint32_t m_bytesInFlight{0};
308  bool m_isDupAck;
309  TcpRateLinux::TcpRateConnection m_prevRate;
310  TcpRateLinux::TcpRateSample m_prevRateSample;
311 };
312 
314  bool sackEnabled,
315  std::vector<uint32_t>& toDrop)
316  : TcpGeneralTest(desc),
317  m_sackEnabled(sackEnabled),
318  m_toDrop(toDrop)
319 {
320 }
321 
324 {
325  Ptr<TcpSocketMsgBase> s = TcpGeneralTest::CreateSenderSocket(node);
326  m_congCtl = CreateObject<MimicCongControl>();
327  s->SetCongestionControlAlgorithm(m_congCtl);
328  return s;
329 }
330 
331 void
333 {
334  TcpGeneralTest::ConfigureEnvironment();
335  SetAppPktCount(300);
338 
339  Config::SetDefault("ns3::TcpSocketBase::Sack", BooleanValue(m_sackEnabled));
340 }
341 
344 {
345  Ptr<TcpSeqErrorModel> m_errorModel = CreateObject<TcpSeqErrorModel>();
346  for (auto it = m_toDrop.begin(); it != m_toDrop.end(); ++it)
347  {
348  m_errorModel->AddSeqToKill(SequenceNumber32(*it));
349  }
350 
352 
353  return m_errorModel;
354 }
355 
356 void
358  const TcpHeader& tcpH,
360 {
361  NS_LOG_DEBUG("Drop seq= " << tcpH.GetSequenceNumber() << " size " << p->GetSize());
362 }
363 
364 void
366 {
367  if (who == SENDER)
368  {
370  (h.GetFlags() & TcpHeader::FIN) == 0)
371  {
372  m_isDupAck = true;
373  }
374  else
375  {
376  m_isDupAck = false;
378  }
379  }
380 }
381 
382 void
383 TcpRateLinuxWithSocketsTest::BytesInFlightTrace(uint32_t /* oldValue */, uint32_t newValue)
384 {
385  m_bytesInFlight = newValue;
386 }
387 
388 void
389 TcpRateLinuxWithSocketsTest::RateUpdatedTrace(const TcpRateLinux::TcpRateConnection& rate)
390 {
391  NS_LOG_DEBUG("Rate updated " << rate);
392  if (m_bytesInFlight == 0)
393  {
394  NS_TEST_ASSERT_MSG_EQ(rate.m_firstSentTime,
395  Simulator::Now(),
396  "FirstSentTime should be current time when bytes inflight is zero");
397  NS_TEST_ASSERT_MSG_EQ(rate.m_deliveredTime,
398  Simulator::Now(),
399  "Delivered time should be current time when bytes inflight is zero");
400  }
401  NS_TEST_ASSERT_MSG_GT_OR_EQ(rate.m_delivered,
402  m_prevRate.m_delivered,
403  "Total delivered should not be lesser than previous values");
404  m_prevRate = rate;
405 }
406 
407 void
408 TcpRateLinuxWithSocketsTest::RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample& sample)
409 {
410  NS_LOG_DEBUG("Rate sample updated " << sample);
411  if (m_isDupAck)
412  {
413  if (!m_sackEnabled)
414  {
416  sample,
417  "RateSample should not update due to DupAcks");
418  }
419  else
420  {
421  if (sample.m_ackedSacked == 0)
422  {
424  sample,
425  "RateSample should not update as nothing is acked or sacked");
426  }
427  }
428  }
429  m_prevRateSample = sample;
430 }
431 
432 void
434 {
435 }
436 
445 {
446  public:
452  TcpRateLinuxWithBufferTest(uint32_t segmentSize, std::string desc);
453 
454  private:
455  void DoRun() override;
456  void DoTeardown() override;
457 
462  virtual void RateUpdatedTrace(const TcpRateLinux::TcpRateConnection& rate);
463 
468  virtual void RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample& sample);
469 
472 
474  void TestWithSackBlocks();
475 
476  uint32_t m_expectedDelivered{0};
477  uint32_t m_expectedAckedSacked{0};
478  uint32_t m_segmentSize;
481 };
482 
484  : TestCase(testString),
485  m_segmentSize(segmentSize)
486 {
487  m_rateOps = CreateObject<TcpRateLinux>();
489  "TcpRateUpdated",
492  "TcpRateSampleUpdated",
494 }
495 
496 void
498 {
499  Simulator::Schedule(Seconds(0.0), &TcpRateLinuxWithBufferTest::TestWithSackBlocks, this);
500  Simulator::Run();
501  Simulator::Destroy();
502 }
503 
504 void
505 TcpRateLinuxWithBufferTest::RateUpdatedTrace(const TcpRateLinux::TcpRateConnection& rate)
506 {
507  NS_LOG_DEBUG("Rate updated " << rate);
508  NS_TEST_ASSERT_MSG_EQ(rate.m_delivered,
510  "Delivered data is not equal to expected delivered");
511 }
512 
513 void
514 TcpRateLinuxWithBufferTest::RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample& sample)
515 {
516  NS_LOG_DEBUG("Rate sample updated " << sample);
517  NS_TEST_ASSERT_MSG_EQ(sample.m_ackedSacked,
519  "AckedSacked bytes is not equal to expected AckedSacked bytes");
520 }
521 
522 void
524 {
525  SequenceNumber32 head(1);
526  m_txBuf.SetHeadSequence(head);
527  SequenceNumber32 ret;
528  Ptr<TcpOptionSack> sack = CreateObject<TcpOptionSack>();
531 
532  m_txBuf.Add(Create<Packet>(10 * m_segmentSize));
533 
534  // Send 10 Segments
535  for (uint8_t i = 0; i < 10; ++i)
536  {
537  bool isStartOfTransmission = m_txBuf.BytesInFlight() == 0;
538  TcpTxItem* outItem =
540  m_rateOps->SkbSent(outItem, isStartOfTransmission);
541  }
542 
543  uint32_t priorInFlight = m_txBuf.BytesInFlight();
544  // ACK 2 Segments
545  for (uint8_t i = 1; i <= 2; ++i)
546  {
547  priorInFlight = m_txBuf.BytesInFlight();
550  MakeCallback(&TcpRateOps::SkbDelivered, m_rateOps));
552  m_rateOps->GenerateSample(m_segmentSize, 0, false, priorInFlight, Seconds(0));
553  }
554 
555  priorInFlight = m_txBuf.BytesInFlight();
556  sack->AddSackBlock(TcpOptionSack::SackBlock(SequenceNumber32(m_segmentSize * 4 + 1),
557  SequenceNumber32(m_segmentSize * 5 + 1)));
559  m_txBuf.Update(sack->GetSackList(), MakeCallback(&TcpRateOps::SkbDelivered, m_rateOps));
561  m_rateOps->GenerateSample(m_segmentSize, 0, false, priorInFlight, Seconds(0));
562 
563  priorInFlight = m_txBuf.BytesInFlight();
564  sack->AddSackBlock(TcpOptionSack::SackBlock(SequenceNumber32(m_segmentSize * 3 + 1),
565  SequenceNumber32(m_segmentSize * 4 + 1)));
567  m_txBuf.Update(sack->GetSackList(), MakeCallback(&TcpRateOps::SkbDelivered, m_rateOps));
568  m_rateOps->GenerateSample(m_segmentSize, 0, false, priorInFlight, Seconds(0));
569 
570  priorInFlight = m_txBuf.BytesInFlight();
571  // Actual delivered should be increased by one segment even multiple blocks are acked.
574  MakeCallback(&TcpRateOps::SkbDelivered, m_rateOps));
575  m_rateOps->GenerateSample(m_segmentSize, 0, false, priorInFlight, Seconds(0));
576 
577  priorInFlight = m_txBuf.BytesInFlight();
578  // ACK rest of the segments
579  for (uint8_t i = 6; i <= 10; ++i)
580  {
583  MakeCallback(&TcpRateOps::SkbDelivered, m_rateOps));
584  }
586  TcpRateOps::TcpRateSample rateSample =
587  m_rateOps->GenerateSample(5 * m_segmentSize, 0, false, priorInFlight, Seconds(0));
588 }
589 
590 void
592 {
593 }
594 
601 {
602  public:
604  : TestSuite("tcp-rate-ops", UNIT)
605  {
607  SequenceNumber32(20),
608  SequenceNumber32(11),
609  1,
610  "Testing SkbDelivered and SkbSent"),
611  TestCase::QUICK);
612  AddTestCase(
613  new TcpRateLinuxBasicTest(1000,
614  SequenceNumber32(11),
615  SequenceNumber32(11),
616  2,
617  "Testing SkbDelivered and SkbSent with app limited data"),
618  TestCase::QUICK);
619 
620  std::vector<uint32_t> toDrop;
621  toDrop.push_back(4001);
622  AddTestCase(
623  new TcpRateLinuxWithSocketsTest("Checking Rate sample value without SACK, one drop",
624  false,
625  toDrop),
626  TestCase::QUICK);
627 
628  AddTestCase(
629  new TcpRateLinuxWithSocketsTest("Checking Rate sample value with SACK, one drop",
630  true,
631  toDrop),
632  TestCase::QUICK);
633  toDrop.push_back(4001);
634  AddTestCase(
635  new TcpRateLinuxWithSocketsTest("Checking Rate sample value without SACK, two drop",
636  false,
637  toDrop),
638  TestCase::QUICK);
639 
640  AddTestCase(
641  new TcpRateLinuxWithSocketsTest("Checking Rate sample value with SACK, two drop",
642  true,
643  toDrop),
644  TestCase::QUICK);
645 
646  AddTestCase(
648  "Checking rate sample values with arbitrary SACK Block"),
649  TestCase::QUICK);
650 
651  AddTestCase(
653  "Checking rate sample values with arbitrary SACK Block"),
654  TestCase::QUICK);
655  }
656 };
657 
#define Max(a, b)
Behaves as NewReno except HasCongControl returns true.
static TypeId GetTypeId()
Get the type ID.
bool HasCongControl() const override
Returns true when Congestion Control Algorithm implements CongControl.
The TcpRateLinux Basic Test.
void SkbDelivered(TcpTxItem *skb)
Deliver an application packet.
uint32_t m_delivered
Number of segments delivered.
void SendSkb(TcpTxItem *skb)
Send an application packet.
uint32_t m_segmentSize
Segment size.
TcpRateLinux m_rateOps
Rate information for TCP.
Time m_deliveredTime
Last time of a delivery.
uint32_t m_testCase
Test case type.
uint32_t m_inFlight
Number of packets in-flight.
uint32_t m_cWnd
Congestion window size.
TcpRateLinuxBasicTest(uint32_t cWnd, SequenceNumber32 tailSeq, SequenceNumber32 nextTx, uint32_t testCase, std::string testName)
Constructor.
SequenceNumber32 m_tailSeq
Tail sequence number.
void DoRun() override
Implementation to actually run this TestCase.
std::vector< TcpTxItem * > m_skbs
Application packets.
SequenceNumber32 m_nextTx
Tx next sequence number.
The TcpRateLinuxWithBufferTest tests rate sample functionality with arbitrary SACK scenario.
uint32_t m_expectedAckedSacked
Amount of expected acked sacked data.
void DoRun() override
Implementation to actually run this TestCase.
void TestWithStraightAcks()
Test with acks without drop.
TcpTxBuffer m_txBuf
Tcp Tx buffer.
virtual void RateUpdatedTrace(const TcpRateLinux::TcpRateConnection &rate)
Track the rate value of TcpRateLinux.
TcpRateLinuxWithBufferTest(uint32_t segmentSize, std::string desc)
Constructor.
virtual void RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample &sample)
Track the rate sample value of TcpRateLinux.
void TestWithSackBlocks()
Test with arbitrary SACK scenario.
Ptr< TcpRateOps > m_rateOps
Rate operations.
uint32_t m_expectedDelivered
Amount of expected delivered data.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
uint32_t m_segmentSize
Segment size.
The TcpRateLinux Test uses sender-receiver model to test its functionality.
void PktDropped(const Ipv4Header &ipH, const TcpHeader &tcpH, Ptr< const Packet > p)
Called when a packet is dropped.
TcpRateLinuxWithSocketsTest(const std::string &desc, bool sackEnabled, std::vector< uint32_t > &toDrop)
Constructor.
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Receive a packet.
Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node) override
Create and install the socket to install on the sender.
bool m_isDupAck
Whether ACK is DupAck.
void BytesInFlightTrace(uint32_t oldValue, uint32_t newValue) override
Track the bytes in flight.
void ConfigureEnvironment() override
Configure the test.
void FinalChecks() override
Do the final checks.
void RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample &sample) override
Track the rate sample value of TcpRateLinux.
SequenceNumber32 m_lastAckRecv
Last ACK received.
TcpRateLinux::TcpRateSample m_prevRateSample
Previous rate sample.
std::vector< uint32_t > m_toDrop
List of SequenceNumber to drop.
Ptr< ErrorModel > CreateReceiverErrorModel() override
Create a receiver error model.
uint32_t m_bytesInFlight
Bytes inflight.
bool m_sackEnabled
Sack Variable.
void RateUpdatedTrace(const TcpRateLinux::TcpRateConnection &rate) override
Track the rate value of TcpRateLinux.
TcpRateLinux::TcpRateConnection m_prevRate
Previous rate.
Ptr< MimicCongControl > m_congCtl
Dummy congestion control.
the TestSuite for the TcpRateLinux test case
Packet header for IPv4.
Definition: ipv4-header.h:34
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:315
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:861
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
void SetDropCallback(Callback< void, const Ipv4Header &, const TcpHeader &, Ptr< const Packet >> cb)
Set the drop callback.
General infrastructure for TCP testing.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
Header for the Transmission Control Protocol.
Definition: tcp-header.h:47
SequenceNumber32 GetSequenceNumber() const
Get the sequence number.
Definition: tcp-header.cc:118
uint8_t GetFlags() const
Get the flags.
Definition: tcp-header.cc:148
SequenceNumber32 GetAckNumber() const
Get the ACK number.
Definition: tcp-header.cc:124
The NewReno implementation.
std::pair< SequenceNumber32, SequenceNumber32 > SackBlock
SACK block definition.
Linux management and generation of Rate information for TCP.
Definition: tcp-rate-ops.h:196
void SkbDelivered(TcpTxItem *skb) override
Update the Rate information after an item is received.
void SkbSent(TcpTxItem *skb, bool isStartOfTransmission) override
Put the rate information inside the sent skb.
void CalculateAppLimited(uint32_t cWnd, uint32_t in_flight, uint32_t segmentSize, const SequenceNumber32 &tailSeq, const SequenceNumber32 &nextTx, const uint32_t lostOut, const uint32_t retransOut) override
If a gap is detected between sends, it means we are app-limited.
virtual void SkbSent(TcpTxItem *skb, bool isStartOfTransmission)=0
Put the rate information inside the sent skb.
virtual const TcpRateSample & GenerateSample(uint32_t delivered, uint32_t lost, bool is_sack_reneg, uint32_t priorInFlight, const Time &minRtt)=0
Generate a TcpRateSample to feed a congestion avoidance algorithm.
void AddSeqToKill(const SequenceNumber32 &seq)
Add the sequence number to the list of segments to be killed.
Tcp sender buffer.
bool Add(Ptr< Packet > p)
Append a data packet to the end of the buffer.
void SetSegmentSize(uint32_t segmentSize)
Set the segment size.
void SetDupAckThresh(uint32_t dupAckThresh)
Set the DupAckThresh.
TcpTxItem * CopyFromSequence(uint32_t numBytes, const SequenceNumber32 &seq)
Copy data from the range [seq, seq+numBytes) into a packet.
uint32_t Update(const TcpOptionSack::SackList &list, const Callback< void, TcpTxItem * > &sackedCb=m_nullCb)
Update the scoreboard.
uint32_t BytesInFlight() const
Return total bytes in flight.
void DiscardUpTo(const SequenceNumber32 &seq, const Callback< void, TcpTxItem * > &beforeDelCb=m_nullCb)
Discard data up to but not including this sequence number.
void SetHeadSequence(const SequenceNumber32 &seq)
Set the head sequence of the buffer.
Item that encloses the application packet and some flags for it.
Definition: tcp-tx-item.h:33
uint32_t GetSeqSize() const
Get the size in the sequence number space.
Definition: tcp-tx-item.cc:61
RateInformation & GetRateInformation()
Get (to modify) the Rate Information of this item.
Definition: tcp-tx-item.cc:97
encapsulates test code
Definition: test.h:1060
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
A suite of tests to run.
Definition: test.h:1256
@ UNIT
This test suite implements a Unit Test.
Definition: test.h:1265
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:931
uint32_t segmentSize
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:890
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number.
Time Now()
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:305
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition: test.h:144
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to a limit and report and abort if not.
Definition: test.h:915
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:839
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:704
Rate Sample structure.
Definition: tcp-rate-ops.h:140
bool m_isAppLimited
Connection's app limited at the time the packet was sent.
Definition: tcp-tx-item.h:94
uint64_t m_delivered
Connection's delivered data at the time the packet was sent.
Definition: tcp-tx-item.h:89
Time m_deliveredTime
Connection's delivered time at the time the packet was sent.
Definition: tcp-tx-item.h:90
static TcpRateOpsTestSuite g_TcpRateOpsTestSuite
Static variable for test initialization.