|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
19 #ifndef TRAFFICCONTROLLAYER_H
20 #define TRAFFICCONTROLLAYER_H
22 #include "ns3/object.h"
23 #include "ns3/address.h"
24 #include "ns3/net-device.h"
26 #include "ns3/queue-item.h"
34 class NetDeviceQueueInterface;
129 uint16_t protocolType,
188 uint16_t protocol,
const Address &from,
261 #endif // TRAFFICCONTROLLAYER_H
a unique identifier for an interface.
Ptr< QueueDisc > m_rootQueueDisc
the root queue disc on the device
Ptr< Node > m_node
The node this TrafficControlLayer object is aggregated to.
std::map< Ptr< NetDevice >, NetDeviceInfo > m_netDevices
Map storing the required information for each device with a queue disc installed.
uint16_t protocol
the protocol number
virtual void SetRootQueueDiscOnDevice(Ptr< NetDevice > device, Ptr< QueueDisc > qDisc)
This method can be used to set the root queue disc installed on a device.
virtual void NotifyNewAggregate(void)
Notify all Objects aggregated to this one of a new Object being aggregated.
TrafficControlLayer()
Constructor.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Receive(Ptr< NetDevice > device, Ptr< const Packet > p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType)
Called by NetDevices, incoming packet.
Ptr< QueueDisc > GetRootQueueDiscOnDeviceByIndex(uint32_t index) const
Required by the object map accessor.
uint32_t GetNDevices(void) const
Required by the object map accessor.
Information to store for each device.
virtual void DoDispose(void)
Destructor implementation.
virtual void ScanDevices(void)
Collect information needed to determine how to handle packets destined to each of the NetDevices of t...
TrafficControlLayer(TrafficControlLayer const &)
Copy constructor Disable default implementation to avoid misuse.
QueueDiscVector m_queueDiscsToWake
the vector of queue discs to wake
void SetNode(Ptr< Node > node)
Set node associated with this stack.
bool promiscuous
true if it is a promiscuous handler
a polymophic address class
A base class which provides memory management and object aggregation.
virtual ~TrafficControlLayer()
TrafficControlLayer & operator=(TrafficControlLayer const &)
Assignment operator.
Introspection did not find any typical Config paths.
std::vector< struct ProtocolHandlerEntry > ProtocolHandlerList
Typedef for protocol handlers container.
virtual void Send(Ptr< NetDevice > device, Ptr< QueueDiscItem > item)
Called from upper layer to queue a packet for the transmission.
Node::ProtocolHandler handler
the protocol handler
virtual Ptr< QueueDisc > GetRootQueueDiscOnDevice(Ptr< NetDevice > device) const
This method can be used to get the root queue disc installed on a device.
std::vector< Ptr< QueueDisc > > QueueDiscVector
Typedef for queue disc vector.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID for the instance.
virtual void DeleteRootQueueDiscOnDevice(Ptr< NetDevice > device)
This method can be used to remove the root queue disc (and associated filters, classes and queues) in...
PacketType
Packet types are used as they are in Linux.
ProtocolHandlerList m_handlers
List of upper-layer handlers.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< NetDeviceQueueInterface > m_ndqi
the netdevice queue interface
void RegisterProtocolHandler(Node::ProtocolHandler handler, uint16_t protocolType, Ptr< NetDevice > device)
Register an IN handler.
virtual void DoInitialize(void)
Initialize() implementation.
Ptr< NetDevice > device
the NetDevice