20 #ifndef NON_COMMUNICATING_NET_DEVICE_H
21 #define NON_COMMUNICATING_NET_DEVICE_H
23 #include <ns3/address.h>
24 #include <ns3/callback.h>
25 #include <ns3/net-device.h>
27 #include <ns3/packet.h>
29 #include <ns3/traced-callback.h>
36 class SpectrumChannel;
38 class SpectrumErrorModel;
89 void SetIfIndex(
const uint32_t index)
override;
92 bool SetMtu(
const uint16_t mtu)
override;
93 uint16_t
GetMtu()
const override;
107 uint16_t protocolNumber)
override;
a polymophic address class
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
Network layer to device interface.
This class implements a device which does not communicate, in the sense that it does not interact wit...
Ptr< Object > GetPhy() const
Ptr< Node > m_node
node this NetDevice is associated to
NonCommunicatingNetDevice()
void SetIfIndex(const uint32_t index) override
void SetReceiveCallback(NetDevice::ReceiveCallback cb) override
void AddLinkChangeCallback(Callback< void > callback) override
bool IsLinkUp() const override
~NonCommunicatingNetDevice() override
bool NeedsArp() const override
Ptr< Channel > GetChannel() const override
Address GetMulticast(Ipv4Address addr) const override
Make and return a MAC multicast address using the provided multicast group.
Address GetAddress() const override
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
void SetAddress(Address address) override
Set the address of this interface.
Ptr< Channel > m_channel
Channel used by the NetDevice.
bool SetMtu(const uint16_t mtu) override
void SetPromiscReceiveCallback(PromiscReceiveCallback cb) override
uint16_t GetMtu() const override
bool SupportsSendFrom() const override
void SetChannel(Ptr< Channel > c)
This class doesn't talk directly with the underlying channel (a dedicated PHY class is expected to do...
bool IsPointToPoint() const override
Return true if the net device is on a point-to-point link.
Address GetBroadcast() const override
Ptr< Object > m_phy
Phy object.
void SetPhy(Ptr< Object > phy)
Set the Phy object which is attached to this device.
uint32_t m_ifIndex
Interface index.
void SetNode(Ptr< Node > node) override
bool IsBroadcast() const override
bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override
Ptr< Node > GetNode() const override
uint32_t GetIfIndex() const override
void DoDispose() override
Destructor implementation.
static TypeId GetTypeId()
Get the type ID.
bool IsMulticast() const override
bool IsBridge() const override
Return true if the net device is acting as a bridge.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.