24 #include "ns3/object-vector.h" 25 #include "ns3/packet.h" 26 #include "ns3/queue-disc.h" 27 #include "ns3/qkd-queue-disc-item.h" 28 #include "ns3/ipv4-header.h" 29 #include "ns3/qkd-l4-pfifo-fast-queue-disc.h" 40 static TypeId tid =
TypeId (
"ns3::QKDL4TrafficControlLayer")
42 .SetGroupName (
"TrafficControl")
44 .AddAttribute (
"RootQueueDiscList",
"The list of root queue discs associated to this QKD Traffic Control layer.",
47 MakeObjectVectorChecker<QueueDisc> ())
123 <<
" installed on node " <<
m_node);
161 Ptr<Node> node = this->GetObject<Node> ();
208 m_downTarget (p, source, destination, protocol, route );
virtual void DoInitialize(void)
Initialize() implementation.
virtual void SetRootQueueDisc(Ptr< QueueDisc > qDisc)
This method can be used to set the root queue disc installed on a device.
virtual void DoInitialize(void)
Initialize() implementation.
IpL4Protocol::DownTargetCallback m_downTarget
Callback to send packets over IPv4.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual void DeleteRootQueueDisc()
This method can be used to remove the root queue disc (and associated filters, classes and queues) in...
void Send(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t protocol, Ptr< Ipv4Route > route)
Called from upper layer (L4) to queue a packet for the transmission.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
IpL4Protocol::DownTargetCallback GetDownTarget(void) const
uint64_t GetUid(void) const
Returns the packet's Uid.
bool IsNull(void) const
Check for null implementation.
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void DoDispose(void)
Destructor implementation.
virtual void DoDispose(void)
Destructor implementation.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
static TypeId GetTypeId(void)
Get the type ID.
NS_ASSERT_MSG(false,"Ipv4AddressGenerator::MaskToIndex(): Impossible")
Ptr< Node > GetNode()
Set node associated with this stack.
QueueDiscVector m_rootQueueDiscs
This vector stores the root queue discs installed on all the devices of the node. ...
void SetDownTarget(IpL4Protocol::DownTargetCallback cb)
Define Down target which can be IPv4 or Virtual IPv4.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ProtocolHandlerList m_handlers
This map plays the role of the qdisc field of the netdev_queue struct in Linux.
Ptr< Node > m_node
The node this QKDL4TrafficControlLayer object is aggregated to.
virtual Ptr< QueueDisc > GetRootQueueDisc(uint32_t index)
This method can be used to get the root queue disc installed on a device.
Ipv4 addresses are stored in host order in this class.
uint32_t GetId(void) const
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void DeliverToL3(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t protocol, Ptr< Ipv4Route > route)
FORWARD FROM QUEUE TO LOWER LAERS.
A base class which provides memory management and object aggregation.
virtual void NotifyNewAggregate(void)
Notify all Objects aggregated to this one of a new Object being aggregated.
Container for a set of ns3::Object pointers.
virtual TypeId GetInstanceTypeId(void) const
Get the type ID for the instance.
virtual void NotifyNewAggregate(void)
Notify all Objects aggregated to this one of a new Object being aggregated.
a unique identifier for an interface.
void SetNode(Ptr< Node > node)
Set node associated with this stack.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
QKDL4TrafficControlLayer()
Constructor.
QKD Traffic control layer definition.