20 #ifndef LOOPBACK_NET_DEVICE_H 21 #define LOOPBACK_NET_DEVICE_H 23 #include "ns3/net-device.h" 24 #include "ns3/mac48-address.h" 53 virtual void SetIfIndex (
const uint32_t index);
58 virtual bool SetMtu (
const uint16_t mtu);
59 virtual uint16_t
GetMtu (
void)
const;
virtual uint16_t GetMtu(void) const
virtual bool NeedsArp(void) const
virtual bool IsBroadcast(void) const
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
uint32_t m_ifIndex
interface index
Smart pointer class similar to boost::intrusive_ptr.
virtual void SetNode(Ptr< Node > node)
Mac48Address m_address
NetDevice MAC address.
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual Address GetAddress(void) const
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
NetDevice::ReceiveCallback m_rxCallback
The callback used to notify higher layers that a packet has been received.
a polymophic address class
virtual uint32_t GetIfIndex(void) const
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual bool IsLinkUp(void) const
NetDevice::PromiscReceiveCallback m_promiscCallback
The callback used to notify higher layers that a packet has been received in promiscuous mode...
virtual Ptr< Node > GetNode(void) const
virtual Address GetMulticast(Ipv4Address multicastGroup) const
Make and return a MAC multicast address using the provided multicast group.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< Channel > GetChannel(void) const
virtual bool SetMtu(const uint16_t mtu)
virtual Address GetBroadcast(void) const
Describes an IPv6 address.
virtual void DoDispose(void)
Destructor implementation.
Ipv4 addresses are stored in host order in this class.
Virtual network interface that loops back any data sent to it to be immediately received on the same ...
Network layer to device interface.
virtual void SetIfIndex(const uint32_t index)
Ptr< Node > m_node
the node this NetDevice is associated with
void Receive(Ptr< Packet > packet, uint16_t protocol, Mac48Address to, Mac48Address from)
Receive a packet from tge Loopback NetDevice.
virtual bool IsMulticast(void) const
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
virtual bool SupportsSendFrom(void) const
virtual void SetAddress(Address address)
Set the address of this interface.
virtual void AddLinkChangeCallback(Callback< void > callback)