The Traffic Control layer aims at introducing an equivalent of the Linux Traffic Control infrastructure into ns-3. More...
Modules | |
traffic-control module tests | |
Classes | |
class | ns3::ArpQueueDiscItem |
ArpQueueDiscItem is a subclass of QueueDiscItem which stores ARP packets. More... | |
class | ns3::CobaltQueueDisc |
Cobalt packet queue disc. More... | |
class | ns3::CoDelQueueDisc |
A CoDel packet queue disc. More... | |
class | ns3::FifoQueueDisc |
Simple queue disc implementing the FIFO (First-In First-Out) policy. More... | |
class | ns3::FqCobaltFlow |
A flow queue used by the FqCobalt queue disc. More... | |
class | ns3::FqCobaltQueueDisc |
A FqCobalt packet queue disc. More... | |
class | ns3::FqCoDelFlow |
A flow queue used by the FqCoDel queue disc. More... | |
class | ns3::FqCoDelQueueDisc |
A FqCoDel packet queue disc. More... | |
class | ns3::FqPieFlow |
A flow queue used by the FqPie queue disc. More... | |
class | ns3::FqPieQueueDisc |
A FqPie packet queue disc. More... | |
class | ns3::Ipv4PacketFilter |
Ipv4PacketFilter is the abstract base class for filters defined for IPv4 packets. More... | |
class | ns3::Ipv4QueueDiscItem |
Ipv4QueueDiscItem is a subclass of QueueDiscItem which stores IPv4 packets. More... | |
class | ns3::Ipv6PacketFilter |
Ipv6PacketFilter is the abstract base class for filters defined for IPv6 packets. More... | |
class | ns3::Ipv6QueueDiscItem |
Ipv6QueueDiscItem is a subclass of QueueDiscItem which stores IPv6 packets. More... | |
class | ns3::MqQueueDisc |
mq is a classful multi-queue aware dummy scheduler. More... | |
class | ns3::PacketFilter |
PacketFilter is the abstract base class for filters used by queue discs to classify packets. More... | |
class | ns3::PfifoFastQueueDisc |
Linux pfifo_fast is the default priority queue enabled on Linux systems. More... | |
class | ns3::PieQueueDisc |
Implements PIE Active Queue Management discipline. More... | |
class | ns3::PrioQueueDisc |
The Prio qdisc is a simple classful queueing discipline that contains an arbitrary number of classes of differing priority. More... | |
class | ns3::QKDKMSQueueLogic |
Linux pfifo_fast is the default priority queue enabled on Linux systems. More... | |
class | ns3::QueueDisc |
QueueDisc is an abstract base class providing the interface and implementing the operations common to all the queueing disciplines. More... | |
class | ns3::QueueDiscClass |
QueueDiscClass is the base class for classes that are included in a queue disc. More... | |
class | ns3::QueueDiscContainer |
Holds a vector of ns3::QueueDisc pointers. More... | |
class | ns3::QueueDiscFactory |
This class stores object factories required to create a queue disc and all of its components (packet filters, internal queues, classes). More... | |
class | ns3::RedQueueDisc |
A RED packet queue disc. More... | |
class | ns3::TbfQueueDisc |
A TBF packet queue disc. More... | |
class | ns3::TrafficControlHelper |
Build a set of QueueDisc objects. More... | |
Enumerations | |
enum | ns3::QueueDiscSizePolicy { ns3::SINGLE_INTERNAL_QUEUE , ns3::SINGLE_CHILD_QUEUE_DISC , ns3::MULTIPLE_QUEUES , ns3::NO_LIMITS } |
Enumeration of the available policies to handle the queue disc size. More... | |
The Traffic Control layer aims at introducing an equivalent of the Linux Traffic Control infrastructure into ns-3.
The Traffic Control layer sits in between the NetDevices (L2) and any network protocol (e.g., IP). It is in charge of processing packets and performing actions on them: scheduling, dropping, marking, policing, etc.
Traffic control layer class
This object represents the main interface of the Traffic Control Module. Basically, we manage both IN and OUT directions (sometimes called RX and TX, respectively). The OUT direction is easy to follow, since it involves direct calls: upper layer (e.g. IP) calls the Send method on an instance of this class, which then calls the Enqueue method of the QueueDisc associated with the device. The Dequeue method of the QueueDisc finally calls the Send method of the NetDevice.
The IN direction uses a little trick to reduce dependencies between modules. In simple words, we use Callbacks to connect upper layer (which should register their Receive callback through RegisterProtocolHandler) and NetDevices.
An example of the IN connection between this layer and IP layer is the following:
Ptr<TrafficControlLayer> tc = m_node->GetObject<TrafficControlLayer> (); NS_ASSERT (tc != 0); m_node->RegisterProtocolHandler (MakeCallback (&TrafficControlLayer::Receive, tc), Ipv4L3Protocol::PROT_NUMBER, device); m_node->RegisterProtocolHandler (MakeCallback (&TrafficControlLayer::Receive, tc), ArpL3Protocol::PROT_NUMBER, device); tc->RegisterProtocolHandler (MakeCallback (&Ipv4L3Protocol::Receive, this), Ipv4L3Protocol::PROT_NUMBER, device); tc->RegisterProtocolHandler (MakeCallback (&ArpL3Protocol::Receive, PeekPointer (GetObject<ArpL3Protocol> ())), ArpL3Protocol::PROT_NUMBER, device);
On the node, for IPv4 and ARP packet, is registered the TrafficControlLayer::Receive callback. At the same time, on the TrafficControlLayer object, is registered the callbacks associated to the upper layers (IPv4 or ARP).
When the node receives an IPv4 or ARP packet, it calls the Receive method on TrafficControlLayer, that calls the right upper-layer callback once it finishes the operations on the packet received.
Discrimination through callbacks (in other words: what is the right upper-layer callback for this packet?) is done through checks over the device and the protocol number.
Enumeration of the available policies to handle the queue disc size.
Definition at line 103 of file queue-disc.h.