30 #include "ns3/simulator.h"
31 #include "ns3/fq-pie-queue-disc.h"
32 #include "ns3/pie-queue-disc.h"
33 #include "ns3/ipv4-header.h"
34 #include "ns3/ipv4-packet-filter.h"
35 #include "ns3/ipv4-queue-disc-item.h"
36 #include "ns3/ipv4-address.h"
37 #include "ns3/ipv6-header.h"
38 #include "ns3/ipv6-packet-filter.h"
39 #include "ns3/ipv6-queue-disc-item.h"
40 #include "ns3/tcp-header.h"
41 #include "ns3/udp-header.h"
42 #include "ns3/string.h"
43 #include "ns3/pointer.h"
62 static TypeId GetTypeId (
void);
86 static TypeId tid =
TypeId (
"ns3::Ipv4FqPieTestPacketFilter")
88 .SetGroupName (
"Internet")
124 virtual void DoRun (
void);
128 :
TestCase (
"Test packets that are not classified by any filter")
140 queueDisc->AddPacketFilter (filter);
143 queueDisc->SetQuantum (1500);
144 queueDisc->Initialize ();
147 p = Create<Packet> ();
151 item = Create<Ipv6QueueDiscItem> (p, dest, 0, ipv6Header);
152 queueDisc->Enqueue (item);
153 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetNQueueDiscClasses (), 0,
"no flow queue should have been created");
155 p = Create<Packet> (
reinterpret_cast<const uint8_t*
> (
"hello, world"), 12);
156 item = Create<Ipv6QueueDiscItem> (p, dest, 0, ipv6Header);
157 queueDisc->Enqueue (item);
158 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetNQueueDiscClasses (), 0,
"no flow queue should have been created");
160 Simulator::Destroy ();
175 virtual void DoRun (
void);
185 :
TestCase (
"Test IP flows separation and packet limit")
197 queue->Enqueue (item);
205 queueDisc->SetQuantum (1500);
206 queueDisc->Initialize ();
218 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
219 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the flow queue");
225 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
226 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the flow queue");
227 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the flow queue");
230 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
231 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the flow queue");
232 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the flow queue");
234 Simulator::Destroy ();
249 virtual void DoRun (
void);
259 :
TestCase (
"Test credits and flows status")
271 queue->Enqueue (item);
279 queueDisc->SetQuantum (90);
280 queueDisc->Initialize ();
290 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 1,
"unexpected number of packets in the queue disc");
291 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the first flow queue");
292 Ptr<FqPieFlow> flow1 = StaticCast<FqPieFlow> (queueDisc->GetQueueDiscClass (0));
293 NS_TEST_ASSERT_MSG_EQ (flow1->GetDeficit (),
static_cast<int32_t
> (queueDisc->GetQuantum ()),
"the deficit of the first flow must equal the quantum");
294 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::NEW_FLOW,
"the first flow must be in the list of new queues");
296 queueDisc->Dequeue ();
297 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 0,
"unexpected number of packets in the queue disc");
298 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the first flow queue");
305 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 2,
"unexpected number of packets in the queue disc");
306 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the first flow queue");
307 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::NEW_FLOW,
"the first flow must still be in the list of new queues");
313 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
314 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the first flow queue");
315 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the second flow queue");
316 Ptr<FqPieFlow> flow2 = StaticCast<FqPieFlow> (queueDisc->GetQueueDiscClass (1));
317 NS_TEST_ASSERT_MSG_EQ (flow2->GetDeficit (),
static_cast<int32_t
> (queueDisc->GetQuantum ()),
"the deficit of the second flow must equal the quantum");
318 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::NEW_FLOW,
"the second flow must be in the list of new queues");
321 queueDisc->Dequeue ();
322 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
323 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the first flow queue");
324 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
327 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
330 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::NEW_FLOW,
"the second flow must be in the list of new queues");
333 queueDisc->Dequeue ();
334 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 2,
"unexpected number of packets in the queue disc");
335 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the first flow queue");
336 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
339 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
342 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::OLD_FLOW,
"the second flow must be in the list of new queues");
345 queueDisc->Dequeue ();
346 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 1,
"unexpected number of packets in the queue disc");
347 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the first flow queue");
348 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the second flow queue");
351 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
354 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::OLD_FLOW,
"the second flow must be in the list of new queues");
357 queueDisc->Dequeue ();
358 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 0,
"unexpected number of packets in the queue disc");
359 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the first flow queue");
360 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the second flow queue");
363 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
366 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::OLD_FLOW,
"the second flow must be in the list of new queues");
369 queueDisc->Dequeue ();
381 Simulator::Destroy ();
396 virtual void DoRun (
void);
407 :
TestCase (
"Test TCP flows separation")
420 queue->Enqueue (item);
428 queueDisc->SetQuantum (1500);
429 queueDisc->Initialize ();
445 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
446 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
451 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
452 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
453 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
458 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 5,
"unexpected number of packets in the queue disc");
459 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
460 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
461 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
467 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 7,
"unexpected number of packets in the queue disc");
468 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
469 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
470 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
471 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (3)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the third flow queue");
473 Simulator::Destroy ();
488 virtual void DoRun (
void);
499 :
TestCase (
"Test UDP flows separation")
512 queue->Enqueue (item);
520 queueDisc->SetQuantum (1500);
521 queueDisc->Initialize ();
537 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
538 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
543 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
544 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
545 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
550 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 5,
"unexpected number of packets in the queue disc");
551 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
552 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
553 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
559 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 7,
"unexpected number of packets in the queue disc");
560 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
561 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
562 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
563 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (3)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the third flow queue");
565 Simulator::Destroy ();
602 virtual void DoRun (
void);
612 :
TestCase (
"Test credits and flows status")
624 queue->Enqueue (item);
631 queueDisc->SetQuantum (90);
632 queueDisc->Initialize ();
635 queueDisc->AddPacketFilter (filter);
665 "unexpected number of packets in the queue disc");
667 "unexpected number of packets in the first flow queue of set one");
669 "unexpected number of packets in the second flow queue of set one");
671 "unexpected number of packets in the third flow queue of set one");
673 "unexpected number of packets in the fourth flow queue of set one");
675 "unexpected number of packets in the fifth flow queue of set one");
677 "unexpected number of packets in the sixth flow queue of set one");
679 "unexpected number of packets in the seventh flow queue of set one");
681 "unexpected number of packets in the eighth flow queue of set one");
685 "unexpected number of packets in the first flow of set one");
689 "unexpected number of packets in the first flow of set two");
690 Simulator::Destroy ();
716 virtual void DoRun (
void);
759 for (uint32_t i = 0; i < nPkt; i++)
762 queue->Enqueue (item);
769 for (uint32_t i = 0; i < nPkt; i++)
778 for (uint32_t i = 0; i < nPkt; i++)
787 for (uint32_t i = 0; i < nPkt; i++)
805 queueDisc->SetQuantum (1514);
806 queueDisc->Initialize ();
812 hdr.
SetEcn (Ipv4Header::ECN_ECT1);
816 double delay = 0.0005;
820 hdr.
SetEcn (Ipv4Header::ECN_ECT0);
827 Simulator::Stop (
Seconds (10.0));
833 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::CE_THRESHOLD_EXCEEDED_MARK), 66,
"There should be 66 marked packets"
834 "4th packet is enqueued at 2ms and dequeued at 4ms hence the delay of 2ms which not greater than CE threshold"
835 "5th packet is enqueued at 2.5ms and dequeued at 5ms hence the delay of 2.5ms and subsequent packet also do have delay"
836 "greater than CE threshold so all the packets after 4th packet are marked");
837 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP), 0,
"Queue delay is less than max burst allowance so"
838 "There should not be any dropped packets");
839 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::UNFORCED_MARK), 0,
"There should not be any marked packets");
840 NS_TEST_EXPECT_MSG_EQ (q1->GetStats ().GetNMarkedPackets (PieQueueDisc::UNFORCED_MARK), 0,
"There should not be marked packets.");
841 NS_TEST_EXPECT_MSG_EQ (q1->GetStats ().GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP), 0,
"There should not be any dropped packets");
843 Simulator::Destroy ();
846 queueDisc = CreateObjectWithAttributes<FqPieQueueDisc> (
"MaxSize",
StringValue (
"10240p"),
850 queueDisc->SetQuantum (1514);
851 queueDisc->Initialize ();
856 hdr.
SetEcn (Ipv4Header::ECN_ECT1);
865 hdr.
SetEcn (Ipv4Header::ECN_ECT0);
870 Simulator::Stop (
Seconds (1.0));
872 q0 = queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetObject <
PieQueueDisc> ();
873 q0 = queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetObject <
PieQueueDisc> ();
875 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::CE_THRESHOLD_EXCEEDED_MARK), 68,
"There should be 68 marked packets"
876 "2nd ECT1 packet is enqueued at 1.5ms and dequeued at 3ms hence the delay of 1.5ms which not greater than CE threshold"
877 "3rd packet is enqueued at 2.5ms and dequeued at 5ms hence the delay of 2.5ms and subsequent packet also do have delay"
878 "greater than CE threshold so all the packets after 2nd packet are marked");
879 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP), 0,
"Queue delay is less than max burst allowance so"
880 "There should not be any dropped packets");
881 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::UNFORCED_MARK), 0,
"There should not be any marked packets");
883 Simulator::Destroy ();
This class tests the deficit per flow.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~FqPieQueueDiscDeficit()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr)
Enqueue a packet.
This class tests the IP flows separation and the packet limit.
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr)
Enqueue a packet.
FqPieQueueDiscIPFlowsSeparationAndPacketLimit()
virtual ~FqPieQueueDiscIPFlowsSeparationAndPacketLimit()
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class tests L4S mode.
void AddPacketWithDelay(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr, double delay, uint32_t nPkt)
Enqueue the given number of packets at different times.
void DequeueWithDelay(Ptr< FqPieQueueDisc > queue, double delay, uint32_t nPkt)
Dequeue the given number of packets at different times.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr, uint32_t nPkt)
Enqueue the given number of packets.
void Dequeue(Ptr< FqPieQueueDisc > queue, uint32_t nPkt)
Dequeue the given number of packets.
virtual ~FqPieQueueDiscL4sMode()
This class tests packets for which there is no suitable filter.
FqPieQueueDiscNoSuitableFilter()
virtual ~FqPieQueueDiscNoSuitableFilter()
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class tests linear probing, collision response, and set creation capability of set associative h...
FqPieQueueDiscSetLinearProbing()
virtual ~FqPieQueueDiscSetLinearProbing()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr)
Enqueue a packet.
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class tests the TCP flows separation.
virtual void DoRun(void)
Implementation to actually run this TestCase.
FqPieQueueDiscTCPFlowsSeparation()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header ipHdr, TcpHeader tcpHdr)
Enqueue a packet.
virtual ~FqPieQueueDiscTCPFlowsSeparation()
FQ-PIE queue disc test suite.
FqPieQueueDiscTestSuite()
This class tests the UDP flows separation.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~FqPieQueueDiscUDPFlowsSeparation()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header ipHdr, UdpHeader udpHdr)
Enqueue a packet.
FqPieQueueDiscUDPFlowsSeparation()
Simple test packet filter able to classify IPv4 packets.
Ipv4FqPieTestPacketFilter()
virtual int32_t DoClassify(Ptr< QueueDiscItem > item) const
Classify a QueueDiscItem.
virtual bool CheckProtocol(Ptr< QueueDiscItem > item) const
Check the protocol.
virtual ~Ipv4FqPieTestPacketFilter()
static TypeId GetTypeId(void)
Get the type ID.
a polymophic address class
AttributeValue implementation for Boolean.
Ipv4 addresses are stored in host order in this class.
Ipv4PacketFilter is the abstract base class for filters defined for IPv4 packets.
void AddHeader(const Header &header)
Add header to this packet.
Implements PIE Active Queue Management discipline.
Smart pointer class similar to boost::intrusive_ptr.
Hold variables of type string.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
static FqPieQueueDiscTestSuite g_fqPieQueueDiscTestSuite
Do not forget to allocate an instance of this TestSuite.
static int32_t g_hash
Variable to assign g_hash to a new packet's flow.
@ INACTIVE
Inactive Period or unslotted CSMA-CA.
#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.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.