11#include "ns3/boolean.h"
12#include "ns3/channel.h"
15#include "ns3/pointer.h"
16#include "ns3/simulator.h"
17#include "ns3/uinteger.h"
29 static TypeId tid =
TypeId(
"ns3::NonCommunicatingNetDevice")
31 .SetGroupName(
"Spectrum")
34 "The PHY layer attached to this device.",
245 uint16_t protocolNumber)
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.
virtual void DoDispose()
Destructor implementation.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.