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;
150 virtual void Start (
void);
156 virtual void Stop (
void);
163 virtual void Wake (
void);
350 virtual void SetIfIndex (
const uint32_t index) = 0;
383 virtual bool SetMtu (
const uint16_t mtu) = 0;
390 virtual uint16_t
GetMtu (
void)
const = 0;
394 virtual bool IsLinkUp (
void)
const = 0;
470 virtual bool IsBridge (
void)
const = 0;
528 virtual bool NeedsArp (
void)
const = 0;
584 typedef Callback< bool, Ptr<NetDevice>, Ptr<const Packet>, uint16_t,
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
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
PacketType
Packet types are used as they are in Linux.
virtual Ptr< Node > GetNode(void) const =0
WakeCallback m_wakeCallback
Wake callback.
void SetSelectQueueCallback(SelectQueueCallback cb)
Set the select queue callback.
Packet addressed to multicast group.
virtual bool IsBroadcast(void) const =0
a polymophic address class
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.
void(* LinkChangeTracedCallback)(void)
TracedCallback signature for link changed event.
static TypeId GetTypeId(void)
Get the type ID.
SelectQueueCallback m_selectQueueCallback
Select queue callback.
Network device transmission queue interface.
void SetQueueDiscInstalled(bool installed)
Set the member variable indicating whether a queue disc is installed or not.
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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.
Packet addressed to someone else.
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
bool m_queueDiscInstalled
Boolean value indicating whether a queue disc is installed or not.
virtual Ptr< Channel > GetChannel(void) const =0
bool IsQueueDiscInstalled(void) const
Return true if a queue disc is installed on the device.
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.
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.
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