23 #include "ns3/cobalt-queue-disc.h"
24 #include "ns3/fq-cobalt-queue-disc.h"
25 #include "ns3/ipv4-address.h"
26 #include "ns3/ipv4-header.h"
27 #include "ns3/ipv4-packet-filter.h"
28 #include "ns3/ipv4-queue-disc-item.h"
29 #include "ns3/ipv6-header.h"
30 #include "ns3/ipv6-packet-filter.h"
31 #include "ns3/ipv6-queue-disc-item.h"
32 #include "ns3/pointer.h"
33 #include "ns3/simulator.h"
34 #include "ns3/string.h"
35 #include "ns3/tcp-header.h"
37 #include "ns3/udp-header.h"
80 static TypeId tid =
TypeId(
"ns3::Ipv4FqCobaltTestPacketFilter")
82 .SetGroupName(
"Internet")
119 void DoRun()
override;
123 :
TestCase(
"Test packets that are not classified by any filter")
136 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
StringValue(
"4p"));
138 queueDisc->AddPacketFilter(filter);
141 queueDisc->SetQuantum(1500);
142 queueDisc->Initialize();
145 p = Create<Packet>();
149 item = Create<Ipv6QueueDiscItem>(p, dest, 0, ipv6Header);
150 queueDisc->Enqueue(item);
153 "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);
160 "no flow queue should have been created");
162 Simulator::Destroy();
177 void DoRun()
override;
187 :
TestCase(
"Test IP flows separation and packet limit")
203 queue->Enqueue(item);
210 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
StringValue(
"4p"));
212 queueDisc->SetQuantum(1500);
213 queueDisc->Initialize();
227 "unexpected number of packets in the queue disc");
230 "unexpected number of packets in the flow queue");
238 "unexpected number of packets in the queue disc");
241 "unexpected number of packets in the flow queue");
244 "unexpected number of packets in the flow queue");
250 "unexpected number of packets in the queue disc");
253 "unexpected number of packets in the flow queue");
256 "unexpected number of packets in the flow queue");
258 Simulator::Destroy();
273 void DoRun()
override;
283 :
TestCase(
"Test credits and flows status")
297 queue->Enqueue(item);
305 queueDisc->SetQuantum(90);
306 queueDisc->Initialize();
318 "unexpected number of packets in the queue disc");
321 "unexpected number of packets in the first flow queue");
322 Ptr<FqCobaltFlow> flow1 = StaticCast<FqCobaltFlow>(queueDisc->GetQueueDiscClass(0));
324 static_cast<int32_t
>(queueDisc->GetQuantum()),
325 "the deficit of the first flow must equal the quantum");
327 FqCobaltFlow::NEW_FLOW,
328 "the first flow must be in the list of new queues");
330 queueDisc->Dequeue();
333 "unexpected number of packets in the queue disc");
336 "unexpected number of packets in the first flow queue");
345 "unexpected number of packets in the queue disc");
348 "unexpected number of packets in the first flow queue");
350 FqCobaltFlow::NEW_FLOW,
351 "the first flow must still be in the list of new queues");
359 "unexpected number of packets in the queue disc");
362 "unexpected number of packets in the first flow queue");
365 "unexpected number of packets in the second flow queue");
366 Ptr<FqCobaltFlow> flow2 = StaticCast<FqCobaltFlow>(queueDisc->GetQueueDiscClass(1));
368 static_cast<int32_t
>(queueDisc->GetQuantum()),
369 "the deficit of the second flow must equal the quantum");
371 FqCobaltFlow::NEW_FLOW,
372 "the second flow must be in the list of new queues");
375 queueDisc->Dequeue();
378 "unexpected number of packets in the queue disc");
381 "unexpected number of packets in the first flow queue");
384 "unexpected number of packets in the second flow queue");
389 FqCobaltFlow::OLD_FLOW,
390 "the first flow must be in the list of old queues");
394 FqCobaltFlow::NEW_FLOW,
395 "the second flow must be in the list of new queues");
398 queueDisc->Dequeue();
401 "unexpected number of packets in the queue disc");
404 "unexpected number of packets in the first flow queue");
407 "unexpected number of packets in the second flow queue");
411 FqCobaltFlow::OLD_FLOW,
412 "the first flow must be in the list of old queues");
417 FqCobaltFlow::OLD_FLOW,
418 "the second flow must be in the list of new queues");
421 queueDisc->Dequeue();
424 "unexpected number of packets in the queue disc");
427 "unexpected number of packets in the first flow queue");
430 "unexpected number of packets in the second flow queue");
435 FqCobaltFlow::OLD_FLOW,
436 "the first flow must be in the list of old queues");
440 FqCobaltFlow::OLD_FLOW,
441 "the second flow must be in the list of new queues");
444 queueDisc->Dequeue();
447 "unexpected number of packets in the queue disc");
450 "unexpected number of packets in the first flow queue");
453 "unexpected number of packets in the second flow queue");
457 FqCobaltFlow::OLD_FLOW,
458 "the first flow must be in the list of old queues");
463 FqCobaltFlow::OLD_FLOW,
464 "the second flow must be in the list of new queues");
467 queueDisc->Dequeue();
478 "the first flow must be inactive");
482 "the second flow must be inactive");
484 Simulator::Destroy();
499 void DoRun()
override;
510 :
TestCase(
"Test TCP flows separation")
527 queue->Enqueue(item);
534 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
StringValue(
"10p"));
536 queueDisc->SetQuantum(1500);
537 queueDisc->Initialize();
555 "unexpected number of packets in the queue disc");
558 "unexpected number of packets in the first flow queue");
565 "unexpected number of packets in the queue disc");
568 "unexpected number of packets in the first flow queue");
571 "unexpected number of packets in the second flow queue");
578 "unexpected number of packets in the queue disc");
581 "unexpected number of packets in the first flow queue");
584 "unexpected number of packets in the second flow queue");
587 "unexpected number of packets in the third flow queue");
595 "unexpected number of packets in the queue disc");
598 "unexpected number of packets in the first flow queue");
601 "unexpected number of packets in the second flow queue");
604 "unexpected number of packets in the third flow queue");
607 "unexpected number of packets in the third flow queue");
609 Simulator::Destroy();
624 void DoRun()
override;
635 :
TestCase(
"Test UDP flows separation")
652 queue->Enqueue(item);
659 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
StringValue(
"10p"));
661 queueDisc->SetQuantum(1500);
662 queueDisc->Initialize();
680 "unexpected number of packets in the queue disc");
683 "unexpected number of packets in the first flow queue");
690 "unexpected number of packets in the queue disc");
693 "unexpected number of packets in the first flow queue");
696 "unexpected number of packets in the second flow queue");
703 "unexpected number of packets in the queue disc");
706 "unexpected number of packets in the first flow queue");
709 "unexpected number of packets in the second flow queue");
712 "unexpected number of packets in the third flow queue");
720 "unexpected number of packets in the queue disc");
723 "unexpected number of packets in the first flow queue");
726 "unexpected number of packets in the second flow queue");
729 "unexpected number of packets in the third flow queue");
732 "unexpected number of packets in the third flow queue");
734 Simulator::Destroy();
764 void DoRun()
override;
776 uint32_t nPktEnqueued,
777 uint32_t nQueueFlows);
814 uint32_t nPktEnqueued,
815 uint32_t nQueueFlows)
819 for (uint32_t i = 0; i < nPkt; i++)
822 queue->Enqueue(item);
826 "unexpected number of flow queues");
829 "unexpected number of enqueued packets");
836 queue->GetQueueDiscClass(3)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
839 if (q3->GetNPackets() == 19)
841 q3->TraceConnectWithoutContext(
846 for (uint32_t i = 0; i < nPkt; i++)
857 for (uint32_t i = 0; i < nPkt; i++)
859 Simulator::Schedule(
Time(
Seconds((i + 1) * delay)),
883 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
892 queueDisc->SetQuantum(1514);
893 queueDisc->Initialize();
899 hdr.
SetEcn(Ipv4Header::ECN_ECT0);
935 hdr.
SetEcn(Ipv4Header::ECN_NotECT);
962 queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
964 queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
966 queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
968 queueDisc->GetQueueDiscClass(3)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
970 queueDisc->GetQueueDiscClass(4)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
975 "There should be 19 marked packets."
976 "As there is no CoDel minBytes parameter so all the packets apart from "
977 "the first one gets marked. As q3 and q4 have"
978 "NotEct packets and the queue delay is much higher than 5ms so the queue "
979 "gets empty pretty quickly so more"
980 "packets from q0 can be dequeued.");
983 "There should not be any dropped packets");
986 "There should be 16 marked packets"
987 "As there is no CoDel minBytes parameter so all the packets apart from "
988 "the first one until no more packets are dequeued"
992 "There should not be any dropped packets");
995 "There should be 12 marked packets"
996 "Each packet size is 120 bytes and the quantum is 1500 bytes so in the "
997 "first turn (1514/120 = 12.61) 13 packets are"
998 "dequeued and apart from the first one, all the packets are marked.");
1001 "There should not be any dropped packets");
1006 "The number of drops should"
1007 "be equal to the number of times m_dropNext is updated");
1010 "There should not be any marked packets");
1013 "The number of drops should"
1014 "be equal to the number of times m_dropNext is updated");
1017 "There should not be any marked packets");
1019 Simulator::Destroy();
1022 queueDisc = CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
1028 queueDisc->SetQuantum(1514);
1029 queueDisc->Initialize();
1033 hdr.
SetEcn(Ipv4Header::ECN_ECT0);
1067 hdr.
SetEcn(Ipv4Header::ECN_NotECT);
1092 Simulator::Stop(
Seconds(8.0));
1093 q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1094 q1 = queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1095 q2 = queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1096 q3 = queueDisc->GetQueueDiscClass(3)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1097 q4 = queueDisc->GetQueueDiscClass(4)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1102 "There should not be any dropped packets");
1104 q0->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1106 "There should not be any marked packets"
1107 "with quantum of 1514, 13 packets of size 120 bytes can be dequeued. sojourn time of 13th "
1108 "packet is 1.3ms which is"
1109 "less than CE threshold");
1112 "There should not be any dropped packets");
1114 q1->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1116 "There should be 6 marked packets"
1117 "with quantum of 1514, 13 packets of size 120 bytes can be dequeued. sojourn time of 8th "
1118 "packet is 2.1ms which is greater"
1119 "than CE threshold and subsequent packet also have sojourn time more 8th packet hence "
1120 "remaining packet are marked.");
1123 "There should not be any dropped packets");
1125 q2->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1127 "There should be 13 marked packets"
1128 "with quantum of 1514, 13 packets of size 120 bytes can be dequeued and all of them have "
1129 "sojourn time more than CE threshold");
1133 q3->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1135 "There should not be any marked packets");
1138 "There should not be any dropped packets");
1140 q4->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1142 "There should not be any marked packets");
1145 "There should 1 dropped packet. As the queue"
1146 "delay for the first dequeue is greater than the target (5ms), Cobalt "
1147 "overloads the m_dropNext field as an activity timeout"
1148 "and dropNext is to set to the current Time value so on the next dequeue "
1149 "a packet is dropped.");
1151 Simulator::Destroy();
1155 queueDisc = CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
1163 queueDisc->SetQuantum(1514);
1164 queueDisc->Initialize();
1168 hdr.
SetEcn(Ipv4Header::ECN_ECT0);
1202 hdr.
SetEcn(Ipv4Header::ECN_NotECT);
1230 Simulator::Stop(
Seconds(8.0));
1231 q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1232 q1 = queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1233 q2 = queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1234 q3 = queueDisc->GetQueueDiscClass(3)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1235 q4 = queueDisc->GetQueueDiscClass(4)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1240 "There should not be any dropped packets");
1242 q0->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK) +
1243 q0->GetStats().GetNMarkedPackets(CobaltQueueDisc::FORCED_MARK),
1244 20 - q0->GetNPackets(),
1245 "Number of CE threshold"
1246 " exceeded marks plus Number of Target exceeded marks should be equal to total number of "
1247 "packets dequeued");
1250 "There should not be any dropped packets");
1252 q1->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK) +
1253 q1->GetStats().GetNMarkedPackets(CobaltQueueDisc::FORCED_MARK),
1254 20 - q1->GetNPackets(),
1255 "Number of CE threshold"
1256 " exceeded marks plus Number of Target exceeded marks should be equal to total number of "
1257 "packets dequeued");
1260 "There should not be any dropped packets");
1262 q2->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK) +
1263 q2->GetStats().GetNMarkedPackets(CobaltQueueDisc::FORCED_MARK),
1264 20 - q2->GetNPackets(),
1265 "Number of CE threshold"
1266 " exceeded marks plus Number of Target exceeded marks should be equal to total number of "
1267 "packets dequeued");
1271 q3->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1273 "There should not be any marked packets");
1276 "The number of drops should"
1277 "be equal to the number of times m_dropNext is updated");
1279 q4->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1281 "There should not be any marked packets");
1284 "The number of drops should"
1285 "be equal to the number of times m_dropNext is updated");
1287 Simulator::Destroy();
1321 void DoRun()
override;
1331 :
TestCase(
"Test credits and flows status")
1345 queue->Enqueue(item);
1352 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"EnableSetAssociativeHash",
1354 queueDisc->SetQuantum(90);
1355 queueDisc->Initialize();
1358 queueDisc->AddPacketFilter(filter);
1389 "unexpected number of packets in the queue disc");
1392 "unexpected number of packets in the first flow queue of set one");
1395 "unexpected number of packets in the second flow queue of set one");
1398 "unexpected number of packets in the third flow queue of set one");
1401 "unexpected number of packets in the fourth flow queue of set one");
1404 "unexpected number of packets in the fifth flow queue of set one");
1407 "unexpected number of packets in the sixth flow queue of set one");
1410 "unexpected number of packets in the seventh flow queue of set one");
1413 "unexpected number of packets in the eighth flow queue of set one");
1418 "unexpected number of packets in the first flow of set one");
1423 "unexpected number of packets in the first flow of set two");
1424 Simulator::Destroy();
1449 void DoRun()
override;
1497 for (uint32_t i = 0; i < nPkt; i++)
1500 queue->Enqueue(item);
1510 for (uint32_t i = 0; i < nPkt; i++)
1512 Simulator::Schedule(
Time(
Seconds((i + 1) * delay)),
1524 for (uint32_t i = 0; i < nPkt; i++)
1535 for (uint32_t i = 0; i < nPkt; i++)
1537 Simulator::Schedule(
Time(
Seconds((i + 1) * delay)),
1554 CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
1565 queueDisc->SetQuantum(1514);
1566 queueDisc->Initialize();
1572 hdr.
SetEcn(Ipv4Header::ECN_ECT1);
1576 double delay = 0.0005;
1586 hdr.
SetEcn(Ipv4Header::ECN_ECT0);
1600 Simulator::Stop(
Seconds(8.0));
1602 queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1604 queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1607 q0->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1609 "There should be 66 marked packets"
1610 "4th packet is enqueued at 2ms and dequeued at 4ms hence the delay of 2ms which not "
1611 "greater than CE threshold"
1612 "5th packet is enqueued at 2.5ms and dequeued at 5ms hence the delay of 2.5ms and "
1613 "subsequent packet also do have delay"
1614 "greater than CE threshold so all the packets after 4th packet are marked");
1617 "There should not be any dropped packets");
1620 "There should not be any marked packets");
1623 "There should be 2 marked packets. Packets are dequeued"
1624 "from q0 first, which leads to delay greater than 5ms for the first "
1625 "dequeue from q1. Because of inactivity (started with high queue delay)"
1626 "Cobalt keeps drop_next as now and the next packet is marked. With "
1627 "second dequeue count increases to 2, drop_next becomes now plus around"
1628 "70ms which is less than the running time(140), and as the queue delay "
1629 "is persistently higher than 5ms, second packet is marked.");
1632 "There should not be any dropped packets");
1634 Simulator::Destroy();
1637 queueDisc = CreateObjectWithAttributes<FqCobaltQueueDisc>(
"MaxSize",
1648 queueDisc->SetQuantum(1514);
1649 queueDisc->Initialize();
1654 hdr.
SetEcn(Ipv4Header::ECN_ECT1);
1674 hdr.
SetEcn(Ipv4Header::ECN_ECT0);
1686 Simulator::Stop(
Seconds(8.0));
1687 q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1688 q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject<
CobaltQueueDisc>();
1691 q0->GetStats().GetNMarkedPackets(CobaltQueueDisc::CE_THRESHOLD_EXCEEDED_MARK),
1693 "There should be 68 marked packets"
1694 "2nd ECT1 packet is enqueued at 1.5ms and dequeued at 3ms hence the delay of 1.5ms which "
1695 "not greater than CE threshold"
1696 "3rd packet is enqueued at 2.5ms and dequeued at 5ms hence the delay of 2.5ms and "
1697 "subsequent packet also do have delay"
1698 "greater than CE threshold so all the packets after 2nd packet are marked");
1701 "There should not be any dropped packets");
1704 "There should be 1 marked packets");
1706 Simulator::Destroy();
1721 :
TestSuite(
"fq-cobalt-queue-disc", UNIT)
This class tests the deficit per flow.
void DoRun() override
Implementation to actually run this TestCase.
FqCobaltQueueDiscDeficit()
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header hdr)
Enqueue a packet.
~FqCobaltQueueDiscDeficit() override
This class tests ECN marking.
uint32_t m_dropNextCount
count the number of times m_dropNext is recalculated
void DequeueWithDelay(Ptr< FqCobaltQueueDisc > queue, double delay, uint32_t nPkt)
Dequeue the given number of packets at different times.
void Dequeue(Ptr< FqCobaltQueueDisc > queue, uint32_t nPkt)
Dequeue the given number of packets.
~FqCobaltQueueDiscEcnMarking() override
void DropNextTracer(int64_t oldVal, int64_t newVal)
Tracer for the DropNext attribute.
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header hdr, uint32_t nPkt, uint32_t nPktEnqueued, uint32_t nQueueFlows)
Enqueue the given number of packets.
FqCobaltQueueDiscEcnMarking()
void DoRun() override
Implementation to actually run this TestCase.
This class tests the IP flows separation and the packet limit.
~FqCobaltQueueDiscIPFlowsSeparationAndPacketLimit() override
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header hdr)
Enqueue a packet.
FqCobaltQueueDiscIPFlowsSeparationAndPacketLimit()
void DoRun() override
Implementation to actually run this TestCase.
This class tests L4S mode.
~FqCobaltQueueDiscL4sMode() override
void DequeueWithDelay(Ptr< FqCobaltQueueDisc > queue, double delay, uint32_t nPkt)
Dequeue the given number of packets at different times.
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header hdr, uint32_t nPkt)
Enqueue the given number of packets.
void DoRun() override
Implementation to actually run this TestCase.
void Dequeue(Ptr< FqCobaltQueueDisc > queue, uint32_t nPkt)
Dequeue the given number of packets.
void AddPacketWithDelay(Ptr< FqCobaltQueueDisc > queue, Ipv4Header hdr, double delay, uint32_t nPkt)
Enqueue the given number of packets at different times.
FqCobaltQueueDiscL4sMode()
This class tests packets for which there is no suitable filter.
void DoRun() override
Implementation to actually run this TestCase.
~FqCobaltQueueDiscNoSuitableFilter() override
FqCobaltQueueDiscNoSuitableFilter()
This class tests linear probing, collision response, and set creation capability of set associative h...
void DoRun() override
Implementation to actually run this TestCase.
~FqCobaltQueueDiscSetLinearProbing() override
FqCobaltQueueDiscSetLinearProbing()
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header hdr)
Enqueue a packet.
This class tests the TCP flows separation.
void DoRun() override
Implementation to actually run this TestCase.
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header ipHdr, TcpHeader tcpHdr)
Enqueue a packet.
~FqCobaltQueueDiscTCPFlowsSeparation() override
FqCobaltQueueDiscTCPFlowsSeparation()
FQ-COBALT queue disc test suite.
FqCobaltQueueDiscTestSuite()
This class tests the UDP flows separation.
~FqCobaltQueueDiscUDPFlowsSeparation() override
void AddPacket(Ptr< FqCobaltQueueDisc > queue, Ipv4Header ipHdr, UdpHeader udpHdr)
Enqueue a packet.
void DoRun() override
Implementation to actually run this TestCase.
FqCobaltQueueDiscUDPFlowsSeparation()
Simple test packet filter able to classify IPv4 packets.
int32_t DoClassify(Ptr< QueueDiscItem > item) const override
Classify a QueueDiscItem.
~Ipv4FqCobaltTestPacketFilter() override
bool CheckProtocol(Ptr< QueueDiscItem > item) const override
Check the protocol.
Ipv4FqCobaltTestPacketFilter()
static TypeId GetTypeId()
Get the type ID.
a polymophic address class
Cobalt packet queue disc.
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.
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.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
static FqCobaltQueueDiscTestSuite g_fqCobaltQueueDiscTestSuite
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.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
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...