28 #include "ns3/callback.h"
29 #include "ns3/object.h"
32 #include "ns3/ipv4-address.h"
33 #include "ns3/ipv6-address.h"
85 virtual void Print (std::ostream &os)
const;
153 virtual void Start (
void);
159 virtual void Stop (
void);
166 virtual void Wake (
void);
358 virtual void SetIfIndex (
const uint32_t index) = 0;
391 virtual bool SetMtu (
const uint16_t mtu) = 0;
398 virtual uint16_t
GetMtu (
void)
const = 0;
402 virtual bool IsLinkUp (
void)
const = 0;
478 virtual bool IsBridge (
void)
const = 0;
536 virtual bool NeedsArp (
void)
const = 0;
virtual void SetIfIndex(const uint32_t index)=0
virtual bool HasWakeCallbackSet(void) const
Check whether a wake callback has been set on this device queue.
Base class to represent items of packet Queues.
virtual Address GetBroadcast(void) const =0
Packet addressed to someone else.
virtual Address GetMulticast(Ipv4Address multicastGroup) const =0
Make and return a MAC multicast address using the provided multicast group.
QueueItem()
Default constructor.
Callback< bool, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address & > ReceiveCallback
Forward calls to a chain of Callback.
virtual void SetNode(Ptr< Node > node)=0
virtual Ptr< Node > GetNode(void) const =0
WakeCallback m_wakeCallback
Wake callback.
Ptr< Packet > m_packet
The packet contained in the queue item.
void SetSelectQueueCallback(SelectQueueCallback cb)
Set the select queue callback.
virtual bool IsBroadcast(void) const =0
a polymophic address class
void(* LinkChangeTracedCallback)(void)
TracedCallback signature for link changed event.
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)=0
Callback< void > WakeCallback
Callback invoked by netdevices to wake upper layers.
virtual void SetReceiveCallback(ReceiveCallback cb)=0
Callback< uint8_t, Ptr< QueueItem > > SelectQueueCallback
Callback invoked to determine the tx queue selected for a given packet.
virtual void Start(void)
Called by the device to start this (hardware) transmission queue.
virtual bool SupportsSendFrom(void) const =0
bool IsStopped(void) const
Get the status of the device transmission queue.
virtual uint16_t GetMtu(void) const =0
virtual bool IsMulticast(void) const =0
virtual uint32_t GetPacketSize(void) const
Use this method (instead of GetPacket ()->GetSize ()) to get the packet size.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t GetSelectedQueue(Ptr< QueueItem > item) const
Get the id of the transmission queue selected for the given packet.
static TypeId GetTypeId(void)
Get the type ID.
SelectQueueCallback m_selectQueueCallback
Select queue callback.
Network device transmission queue interface.
virtual bool IsBridge(void) const =0
Return true if the net device is acting as a bridge.
virtual bool NeedsArp(void) const =0
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Callback< bool, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address &, const Address &, enum PacketType > PromiscReceiveCallback
virtual void Stop(void)
Called by the device to stop this (hardware) transmission queue.
std::vector< Ptr< NetDeviceQueue > > m_txQueuesVector
Device transmission queues.
uint8_t GetTxQueuesN(void) const
Get the number of device transmission queues.
virtual void DoDispose(void)
Dispose of the object.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)=0
virtual Ptr< Channel > GetChannel(void) const =0
QueueItem & operator=(const QueueItem &)
Assignment operator.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)=0
virtual uint32_t GetIfIndex(void) const =0
virtual void Print(std::ostream &os) const
Print the item contents.
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
NetDeviceQueueInterface()
Constructor.
virtual void Wake(void)
Called by the device to wake the queue disc associated with this (hardware) transmission queue...
Network layer to device interface.
virtual bool IsPointToPoint(void) const =0
Return true if the net device is on a point-to-point link.
Ptr< NetDeviceQueue > GetTxQueue(uint8_t i) const
Get the i-th transmission queue of the device.
virtual void SetWakeCallback(WakeCallback cb)
Set the wake callback.
virtual ~NetDeviceQueueInterface()
A base class which provides memory management and object aggregation.
virtual void SetAddress(Address address)=0
Set the address of this interface.
PacketType
Packet types are used as they are in Linux.
virtual void AddLinkChangeCallback(Callback< void > callback)=0
virtual ~NetDeviceQueue()
virtual bool IsLinkUp(void) const =0
virtual bool SetMtu(const uint16_t mtu)=0
bool m_stopped
Status of the transmission queue.
Packet addressed to multicast group.
Network device transmission queue.
A template-based reference counting class.
a unique identifier for an interface.
virtual Address GetAddress(void) const =0
void SetTxQueuesN(uint8_t numTxQueues)
Set the number of device transmission queues.
Ptr< Packet > GetPacket(void) const