The Traffic Control layer aims at introducing an equivalent of the Linux Traffic Control infrastructure into ns-3. More...
Classes | |
class | ns3::CoDelQueueDisc |
A CoDel 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::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::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::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::QueueDiscItem |
QueueDiscItem is the abstract base class for items that are stored in a queue disc. More... | |
class | ns3::RedQueueDisc |
A RED packet queue disc. More... | |
struct | ns3::RedQueueDisc::Stats |
Stats. More... | |
struct | ns3::PieQueueDisc::Stats |
Stats. More... | |
class | ns3::TrafficControlHelper |
Build a set of QueueDisc objects. More... | |
Enumerations | |
enum | { ns3::RedQueueDisc::DTYPE_NONE, ns3::RedQueueDisc::DTYPE_FORCED, ns3::RedQueueDisc::DTYPE_UNFORCED } |
Drop types. More... | |
enum | ns3::PieQueueDisc::BurstStateT { ns3::PieQueueDisc::NO_BURST, ns3::PieQueueDisc::IN_BURST, ns3::PieQueueDisc::IN_BURST_PROTECTING } |
Burst types. More... | |
enum | ns3::FqCoDelFlow::FlowStatus { ns3::FqCoDelFlow::INACTIVE, ns3::FqCoDelFlow::NEW_FLOW, ns3::FqCoDelFlow::OLD_FLOW } |
Used to determine the status of this flow queue. More... | |
enum | ns3::QueueDisc::WakeMode { ns3::QueueDisc::WAKE_ROOT = 0x00, ns3::QueueDisc::WAKE_CHILD = 0x01 } |
Used to determine whether the queue disc itself or its children must be activated when a netdevice wakes a transmission queue. 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.
anonymous enum |
Drop types.
Enumerator | |
---|---|
DTYPE_NONE |
Ok, no drop. |
DTYPE_FORCED |
A "forced" drop. |
DTYPE_UNFORCED |
An "unforced" (random) drop. |
Definition at line 116 of file red-queue-disc.h.
Burst types.
Enumerator | |
---|---|
NO_BURST | |
IN_BURST | |
IN_BURST_PROTECTING |
Definition at line 84 of file pie-queue-disc.h.
Used to determine the status of this flow queue.
Enumerator | |
---|---|
INACTIVE | |
NEW_FLOW | |
OLD_FLOW |
Definition at line 56 of file fq-codel-queue-disc.h.
Used to determine whether the queue disc itself or its children must be activated when a netdevice wakes a transmission queue.
Enumerator | |
---|---|
WAKE_ROOT | |
WAKE_CHILD |
Definition at line 405 of file queue-disc.h.