A Discrete-Event Network Simulator
API
wifi-ac-mapping-test-suite.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 Universita' degli Studi di Napoli Federico II
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Stefano Avallone <stavallo@unina.it>
19  */
20 
21 #include "ns3/test.h"
22 #include "ns3/simulator.h"
23 #include "ns3/log.h"
24 #include "ns3/uinteger.h"
25 #include "ns3/boolean.h"
26 #include "ns3/string.h"
27 #include "ns3/double.h"
28 #include "ns3/pointer.h"
29 #include "ns3/ssid.h"
30 #include "ns3/data-rate.h"
31 #include "ns3/inet-socket-address.h"
32 #include "ns3/packet-sink.h"
33 #include "ns3/wifi-helper.h"
34 #include "ns3/wifi-net-device.h"
35 #include "ns3/wifi-mac.h"
36 #include "ns3/wifi-mac-queue.h"
37 #include "ns3/edca-txop-n.h"
38 #include "ns3/yans-wifi-helper.h"
39 #include "ns3/mobility-helper.h"
40 #include "ns3/internet-stack-helper.h"
41 #include "ns3/ipv4-address-helper.h"
42 #include "ns3/packet-sink-helper.h"
43 #include "ns3/on-off-helper.h"
44 #include "ns3/traffic-control-helper.h"
45 #include "ns3/traffic-control-layer.h"
46 #include "ns3/llc-snap-header.h"
47 
48 using namespace ns3;
49 
50 NS_LOG_COMPONENT_DEFINE ("WifiAcMappingTest");
51 
53 {
54 public:
55  WifiAcMappingTest (uint8_t tos, uint8_t expectedQueue);
56  virtual void DoRun (void);
57 
58 private:
59  static void PacketEnqueuedInQueueDisc (uint8_t tos, uint8_t* count, Ptr<const QueueDiscItem> item);
60  static void PacketEnqueuedInWifiMacQueue (uint8_t tos, uint8_t* count, Ptr<const WifiMacQueueItem> item);
61  uint8_t m_tos;
62  uint8_t m_expectedQueue;
63  uint8_t m_QueueDiscCount[4];
64  uint8_t m_WifiMacQueueCount[4];
65 };
66 
67 WifiAcMappingTest::WifiAcMappingTest (uint8_t tos, uint8_t expectedQueue)
68  : TestCase ("User priority to Access Category mapping test. Checks that packets are"
69  "enqueued in the correct child queue disc of the mq root queue disc and"
70  "in the correct wifi MAC queue"),
71  m_tos (tos),
72  m_expectedQueue (expectedQueue)
73 {
74  for (uint8_t i = 0; i < 4; i++)
75  {
76  m_QueueDiscCount[i] = 0;
77  m_WifiMacQueueCount[i] = 0;
78  }
79 }
80 
81 void
83 {
84  uint8_t val;
85  if (item->GetUint8Value (QueueItem::IP_DSFIELD, val) && val == tos)
86  {
87  (*count)++;
88  }
89 }
90 
91 void
93 {
94  LlcSnapHeader llc;
95  Ptr<Packet> packet = item->GetPacket ()->Copy ();
96  packet->RemoveHeader (llc);
97 
98  if (llc.GetType () == Ipv4L3Protocol::PROT_NUMBER)
99  {
100  Ipv4Header iph;
101  packet->PeekHeader (iph);
102  if (iph.GetTos () == tos)
103  {
104  (*count)++;
105  }
106  }
107 }
108 
109 void
111 {
113  WifiMacHelper wifiMac;
114  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
115  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
116  wifiPhy.SetChannel (wifiChannel.Create ());
117 
118  Ssid ssid = Ssid ("wifi-ac-mapping");
119  wifi.SetRemoteStationManager ("ns3::ArfWifiManager");
120 
121  // Setup the AP, which will be the source of traffic for this test
122  NodeContainer ap;
123  ap.Create (1);
124  wifiMac.SetType ("ns3::ApWifiMac",
125  "QosSupported", BooleanValue (true),
126  "Ssid", SsidValue (ssid));
127 
128  NetDeviceContainer apDev = wifi.Install (wifiPhy, wifiMac, ap);
129 
130  // Setup one STA, which will be the sink for traffic in this test.
131  NodeContainer sta;
132  sta.Create (1);
133  wifiMac.SetType ("ns3::StaWifiMac",
134  "QosSupported", BooleanValue (true),
135  "Ssid", SsidValue (ssid));
136  NetDeviceContainer staDev = wifi.Install (wifiPhy, wifiMac, sta);
137 
138  // Our devices will have fixed positions
140  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
141  mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
142  "MinX", DoubleValue (0.0),
143  "MinY", DoubleValue (0.0),
144  "DeltaX", DoubleValue (5.0),
145  "DeltaY", DoubleValue (10.0),
146  "GridWidth", UintegerValue (2),
147  "LayoutType", StringValue ("RowFirst"));
148  mobility.Install (sta);
149  mobility.Install (ap);
150 
151  // Now we install internet stacks on our devices
153  stack.Install (ap);
154  stack.Install (sta);
155 
157  uint16_t handle = tch.SetRootQueueDisc ("ns3::MqQueueDisc");
158  TrafficControlHelper::ClassIdList cls = tch.AddQueueDiscClasses (handle, 4, "ns3::QueueDiscClass");
159  TrafficControlHelper::HandleList hdl = tch.AddChildQueueDiscs (handle, cls, "ns3::FqCoDelQueueDisc");
160  for (auto h : hdl)
161  {
162  tch.AddPacketFilter (h, "ns3::FqCoDelIpv4PacketFilter");
163  }
164  tch.Install (apDev);
165  tch.Install (staDev);
166 
168  address.SetBase ("192.168.0.0", "255.255.255.0");
169  Ipv4InterfaceContainer staNodeInterface, apNodeInterface;
170  staNodeInterface = address.Assign (staDev);
171  apNodeInterface = address.Assign (apDev);
172 
173  uint16_t udpPort = 50000;
174 
175  PacketSinkHelper packetSink ("ns3::UdpSocketFactory",
176  InetSocketAddress (Ipv4Address::GetAny (), udpPort));
177  ApplicationContainer sinkApp = packetSink.Install (sta.Get (0));
178  sinkApp.Start (Seconds (0));
179  sinkApp.Stop (Seconds (4.0));
180 
181  // The packet source is an on-off application on the AP device
182  InetSocketAddress dest (staNodeInterface.GetAddress (0), udpPort);
183  dest.SetTos (m_tos);
184  OnOffHelper onoff ("ns3::UdpSocketFactory", dest);
185  onoff.SetConstantRate (DataRate ("5kbps"), 500);
186  ApplicationContainer sourceApp = onoff.Install (ap.Get (0));
187  sourceApp.Start (Seconds (1.0));
188  sourceApp.Stop (Seconds (4.0));
189 
190  // The first packet will be transmitted at time 1+(500*8)/5000 = 1.8s.
191  // The second packet will be transmitted at time 1.8+(500*8)/5000 = 2.6s.
192  // The third packet will be transmitted at time 2.6+(500*8)/5000 = 3.4s.
193 
194  Simulator::Stop (Seconds (5.0));
195 
196  Ptr<QueueDisc> root = ap.Get (0)->GetObject<TrafficControlLayer> ()->GetRootQueueDiscOnDevice (apDev.Get (0));
197  NS_TEST_ASSERT_MSG_EQ (root->GetNQueueDiscClasses (), 4, "The root queue disc should have 4 classes");
198  // Get the four child queue discs and connect their Enqueue trace to the PacketEnqueuedInQueueDisc
199  // method, which counts how many packets with the given ToS value have been enqueued
200  root->GetQueueDiscClass (0)->GetQueueDisc ()->TraceConnectWithoutContext ("Enqueue",
202 
203  root->GetQueueDiscClass (1)->GetQueueDisc ()->TraceConnectWithoutContext ("Enqueue",
205 
206  root->GetQueueDiscClass (2)->GetQueueDisc ()->TraceConnectWithoutContext ("Enqueue",
208 
209  root->GetQueueDiscClass (3)->GetQueueDisc ()->TraceConnectWithoutContext ("Enqueue",
211 
212  Ptr<WifiMac> apMac = DynamicCast<WifiNetDevice> (apDev.Get (0))->GetMac ();
213  PointerValue ptr;
214  // Get the four wifi mac queues and connect their Enqueue trace to the PacketEnqueuedInWifiMacQueue
215  // method, which counts how many packets with the given ToS value have been enqueued
216  apMac->GetAttribute ("BE_EdcaTxopN", ptr);
217  ptr.Get<EdcaTxopN> ()->GetQueue ()->TraceConnectWithoutContext ("Enqueue",
219 
220  apMac->GetAttribute ("BK_EdcaTxopN", ptr);
221  ptr.Get<EdcaTxopN> ()->GetQueue ()->TraceConnectWithoutContext ("Enqueue",
223 
224  apMac->GetAttribute ("VI_EdcaTxopN", ptr);
225  ptr.Get<EdcaTxopN> ()->GetQueue ()->TraceConnectWithoutContext ("Enqueue",
227 
228  apMac->GetAttribute ("VO_EdcaTxopN", ptr);
229  ptr.Get<EdcaTxopN> ()->GetQueue ()->TraceConnectWithoutContext ("Enqueue",
231 
232  Simulator::Run ();
233 
234  for (uint32_t i = 0; i < 4; i++)
235  {
236  if (i == m_expectedQueue)
237  {
238  NS_TEST_ASSERT_MSG_GT_OR_EQ (m_QueueDiscCount[i], 1, "There is no packet in the expected queue disc " << i);
239  NS_TEST_ASSERT_MSG_GT_OR_EQ (m_WifiMacQueueCount[i], 1, "There is no packet in the expected Wifi MAC queue " << i);
240  }
241  else
242  {
243  NS_TEST_ASSERT_MSG_EQ (m_QueueDiscCount[i], 0, "Unexpectedly, there is a packet in queue disc " << i);
244  NS_TEST_ASSERT_MSG_EQ (m_WifiMacQueueCount[i], 0, "Unexpectedly, there is a packet in Wifi MAC queue " << i);
245  }
246  }
247 
248  uint32_t totalOctetsThrough =
249  DynamicCast<PacketSink> (sinkApp.Get (0))->GetTotalRx ();
250 
251  // Check that the three packets have been received
252  NS_TEST_ASSERT_MSG_EQ (totalOctetsThrough, 1500, "Three packets should have been received");
253 
254  Simulator::Destroy ();
255 }
256 
257 
259 {
260 public:
262 };
263 
265  : TestSuite ("ns3-wifi-ac-mapping", SYSTEM)
266 {
267  AddTestCase (new WifiAcMappingTest (0xb8, 2), TestCase::QUICK); // EF in AC_VI
268  AddTestCase (new WifiAcMappingTest (0x28, 1), TestCase::QUICK); // AF11 in AC_BK
269  AddTestCase (new WifiAcMappingTest (0x70, 0), TestCase::QUICK); // AF32 in AC_BE
270  AddTestCase (new WifiAcMappingTest (0xc0, 3), TestCase::QUICK); // CS7 in AC_VO
271 }
272 
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:267
holds a vector of ns3::Application pointers.
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
WifiAcMappingTest(uint8_t tos, uint8_t expectedQueue)
Ptr< T > Get(void) const
Definition: pointer.h:194
an Inet address class
uint32_t GetNQueueDiscClasses(void) const
Get the number of queue disc classes.
Definition: queue-disc.cc:557
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
AttributeValue implementation for Boolean.
Definition: boolean.h:36
QueueDiscContainer Install(NetDeviceContainer c)
holds a vector of std::pair of Ptr and interface index.
Ptr< YansWifiChannel > Create(void) const
void SetRemoteStationManager(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:719
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
Hold variables of type string.
Definition: string.h:41
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Introspection did not find any typical Config paths.
Make it easy to create and manage PHY objects for the yans model.
A suite of tests to run.
Definition: test.h:1342
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Definition: callback.h:1686
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
encapsulates test code
Definition: test.h:1155
helps to create WifiNetDevice objects
Definition: wifi-helper.h:213
ClassIdList AddQueueDiscClasses(uint16_t handle, uint16_t count, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add the given number of queue disc classes (of the given type and with the gi...
void AddPacketFilter(uint16_t handle, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add a packet filter (of the given type and with the given attributes) to the ...
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:42
static void PacketEnqueuedInWifiMacQueue(uint8_t tos, uint8_t *count, Ptr< const WifiMacQueueItem > item)
Class for representing data rates.
Definition: data-rate.h:88
Packet header for IPv4.
Definition: ipv4-header.h:33
void SetChannel(Ptr< YansWifiChannel > channel)
This queue contains packets for a particular access class.
Definition: edca-txop-n.h:68
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
tuple mobility
Definition: third.py:101
uint16_t GetType(void)
Return the Ethertype.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
Hold an unsigned integer type.
Definition: uinteger.h:44
#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:168
holds a vector of ns3::NetDevice pointers
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer::Iterator first, NodeContainer::Iterator last) const
Definition: wifi-helper.cc:748
Build a set of QueueDisc objects.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
HandleList AddChildQueueDiscs(uint16_t handle, const ClassIdList &classes, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to attach a child queue disc (of the given type and with the given attributes) t...
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Definition: packet.cc:277
std::vector< uint16_t > ClassIdList
Container type for Class IDs.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:293
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetConstantRate(DataRate dataRate, uint32_t packetSize=512)
Helper function to set a constant rate source.
keep track of a set of node pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Hold objects of type Ptr.
Definition: pointer.h:36
uint16_t SetRootQueueDisc(std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to set a root queue disc of the given type and with the given attributes...
virtual bool GetUint8Value(Uint8Values field, uint8_t &value) const
Retrieve the value of a given field from the packet, if present.
Definition: queue-item.cc:57
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
tuple ssid
Definition: third.py:93
manage and create wifi channel objects for the yans model.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:223
create MAC layers for a ns3::WifiNetDevice.
tuple stack
Definition: first.py:34
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
static void PacketEnqueuedInQueueDisc(uint8_t tos, uint8_t *count, Ptr< const QueueDiscItem > item)
virtual void SetType(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue())
Helper class used to assign positions and mobility models to nodes.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
static WifiAcMappingTestSuite wifiAcMappingTestSuite
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:993
AttributeValue implementation for Ssid.
Definition: ssid.h:117
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
tuple wifi
Definition: third.py:89
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
uint8_t GetTos(void) const
Definition: ipv4-header.cc:194
tuple address
Definition: first.py:37
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Definition: double.h:41
#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:1018
ApplicationContainer Install(NodeContainer c) const
Install an ns3::OnOffApplication on each node of the input container configured with all the attribut...
std::vector< uint16_t > HandleList
Container type for Handlers.
Ptr< QueueDiscClass > GetQueueDiscClass(uint32_t i) const
Get the i-th queue disc class.
Definition: queue-disc.cc:550
Header for the LLC/SNAP encapsulation.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const