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