QKDQueueDiscItem is a subclass of QueueDiscItem which stores IPv4 packets. More...
#include "qkd-queue-disc-item.h"
Public Member Functions | |
QKDQueueDiscItem (Ptr< Packet > p, const Ipv4Address &source, const Ipv4Address &destination, uint8_t protocol, Ptr< Ipv4Route > route) | |
Create an QKD queue disc item containing a packet. More... | |
virtual | ~QKDQueueDiscItem () |
virtual void | AddHeader (void) |
Add the header to the packet. More... | |
Ipv4Address | GetDestination (void) const |
Ptr< Ipv4Route > | GetRoute (void) const |
virtual uint32_t | GetSize (void) const |
Ipv4Address | GetSource (void) const |
virtual bool | Mark (void) |
Marks the packet as a substitute for dropping it, such as for Explicit Congestion Notification. More... | |
virtual void | Print (std::ostream &os) const |
Print the item contents. More... | |
![]() | |
QueueDiscItem (Ptr< Packet > p, const Address &addr, uint16_t protocol) | |
Create a queue disc item. More... | |
virtual | ~QueueDiscItem () |
Address | GetAddress (void) const |
Get the MAC address included in this item. More... | |
uint16_t | GetProtocol (void) const |
Get the L3 protocol included in this item. More... | |
Time | GetTimeStamp (void) const |
Get the timestamp included in this item. More... | |
uint8_t | GetTxQueueIndex (void) const |
Get the transmission queue index included in this item. More... | |
virtual uint32_t | Hash (uint32_t perturbation=0) const |
Computes the hash of various fields of the packet header. More... | |
void | SetTimeStamp (Time t) |
Set the timestamp included in this item. More... | |
void | SetTxQueueIndex (uint8_t txq) |
Set the transmission queue index to store in this item. More... | |
![]() | |
QueueItem (Ptr< Packet > p) | |
Create a queue item containing a packet. More... | |
virtual | ~QueueItem () |
Ptr< Packet > | GetPacket (void) const |
virtual bool | GetUint8Value (Uint8Values field, uint8_t &value) const |
Retrieve the value of a given field from the packet, if present. More... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Member Functions | |
QKDQueueDiscItem () | |
Default constructor. More... | |
QKDQueueDiscItem (const QKDQueueDiscItem &) | |
Copy constructor. More... | |
QKDQueueDiscItem & | operator= (const QKDQueueDiscItem &) |
Assignment operator. More... | |
Private Attributes | |
Ipv4Address | m_destination |
Ptr< Ipv4Route > | m_route |
Ipv4Address | m_source |
Additional Inherited Members | |
![]() | |
typedef void(* | TracedCallback) (Ptr< const QueueItem > item) |
TracedCallback signature for Ptr<QueueItem> More... | |
enum | Uint8Values { IP_DSFIELD } |
1-byte fields of the packet whose value can be retrieved, if present More... | |
QKDQueueDiscItem is a subclass of QueueDiscItem which stores IPv4 packets.
Header and payload are kept separate to allow the queue disc to manipulate the header, which is added to the packet when the packet is dequeued.
Definition at line 44 of file qkd-queue-disc-item.h.
ns3::QKDQueueDiscItem::QKDQueueDiscItem | ( | Ptr< Packet > | p, |
const Ipv4Address & | source, | ||
const Ipv4Address & | destination, | ||
uint8_t | protocol, | ||
Ptr< Ipv4Route > | route | ||
) |
Create an QKD queue disc item containing a packet.
p | the packet included in the created item. |
addr | the IP source address |
addr | the IP destination address |
protocol | the protocol number |
IPv4 | Route (if any) |
Definition at line 28 of file qkd-queue-disc-item.cc.
|
virtual |
Definition at line 41 of file qkd-queue-disc-item.cc.
References NS_LOG_FUNCTION.
|
private |
Default constructor.
Defined and unimplemented to avoid misuse
|
private |
Copy constructor.
Defined and unimplemented to avoid misuse
|
virtual |
Add the header to the packet.
Subclasses may keep header and payload separate to allow manipulating the header, so this method allows to add the header to the packet before sending the packet to the device.
Implements ns3::QueueDiscItem.
Definition at line 47 of file qkd-queue-disc-item.cc.
Ipv4Address ns3::QKDQueueDiscItem::GetDestination | ( | void | ) | const |
Definition at line 64 of file qkd-queue-disc-item.cc.
References m_destination.
Definition at line 70 of file qkd-queue-disc-item.cc.
References m_route.
|
virtual |
Reimplemented from ns3::QueueItem.
Definition at line 49 of file qkd-queue-disc-item.cc.
References ns3::QueueItem::GetPacket(), ns3::Packet::GetSize(), and NS_ASSERT.
Ipv4Address ns3::QKDQueueDiscItem::GetSource | ( | void | ) | const |
Definition at line 58 of file qkd-queue-disc-item.cc.
References m_source.
|
virtual |
Marks the packet as a substitute for dropping it, such as for Explicit Congestion Notification.
Implements ns3::QueueDiscItem.
Definition at line 86 of file qkd-queue-disc-item.cc.
|
private |
Assignment operator.
Defined and unimplemented to avoid misuse
|
virtual |
Print the item contents.
os | output stream in which the data should be printed. |
Reimplemented from ns3::QueueDiscItem.
Definition at line 76 of file qkd-queue-disc-item.cc.
References ns3::QueueDiscItem::GetAddress(), ns3::QueueItem::GetPacket(), ns3::QueueDiscItem::GetProtocol(), and ns3::QueueDiscItem::GetTxQueueIndex().
|
private |
Definition at line 107 of file qkd-queue-disc-item.h.
Referenced by GetDestination().
Definition at line 108 of file qkd-queue-disc-item.h.
Referenced by GetRoute().
|
private |
Definition at line 106 of file qkd-queue-disc-item.h.
Referenced by GetSource().