25 #include "ns3/llc-snap-header.h"
26 #include "ns3/packet.h"
27 #include "ns3/uinteger.h"
28 #include "ns3/pointer.h"
30 #include "ns3/trace-source-accessor.h"
44 .AddConstructor<WifiNetDevice> ()
45 .AddAttribute (
"Mtu",
"The MAC-level Maximum Transmission Unit",
50 .AddAttribute (
"Channel",
"The channel attached to this device",
53 MakePointerChecker<WifiChannel> ())
54 .AddAttribute (
"Phy",
"The PHY layer attached to this device.",
58 MakePointerChecker<WifiPhy> ())
59 .AddAttribute (
"Mac",
"The MAC layer attached to this device.",
63 MakePointerChecker<WifiMac> ())
64 .AddAttribute (
"RemoteStationManager",
"The station manager attached to this device.",
68 MakePointerChecker<WifiRemoteStationManager> ())
74 : m_configComplete (false)
102 m_mac->Initialize ();
189 return m_mac->GetAddress ();
261 m_mac->NotifyTx (packet);
262 m_mac->Enqueue (packet, realTo);
301 else if (to ==
m_mac->GetAddress ())
312 m_mac->NotifyRx (packet);
318 m_mac->NotifyPromiscRx (packet);
349 m_mac->NotifyTx (packet);
350 m_mac->Enqueue (packet, realTo, realFrom);
365 return m_mac->SupportsSendFrom ();
virtual void SetNode(Ptr< Node > node)
uint32_t RemoveHeader(Header &header)
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
static bool IsMatchingType(const Address &address)
virtual Ptr< WifiChannel > GetChannel(void) const =0
virtual bool SetMtu(const uint16_t mtu)
smart pointer class similar to boost::intrusive_ptr
virtual uint16_t GetMtu(void) const
virtual Address GetAddress(void) const
Ptr< WifiRemoteStationManager > m_stationManager
#define NS_ASSERT(condition)
bool IsBroadcast(void) const
virtual Address GetMulticast(Ipv4Address multicastGroup) const
Make and return a MAC multicast address using the provided multicast group.
virtual void DoDispose(void)
#define NS_LOG_FUNCTION_NOARGS()
void ForwardUp(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
virtual Ptr< Channel > GetChannel(void) const
virtual bool IsBroadcast(void) const
a polymophic address class
void SetMac(Ptr< WifiMac > mac)
virtual bool IsMulticast(void) const
Ptr< WifiPhy > GetPhy(void) const
virtual void DoDispose(void)
Ptr< WifiRemoteStationManager > GetRemoteStationManager(void) const
static Mac48Address GetMulticast(Ipv4Address address)
void SetPhy(Ptr< WifiPhy > phy)
Hold an unsigned integer type.
Ptr< WifiChannel > DoGetChannel(void) const
virtual bool SupportsSendFrom(void) const
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
static Mac48Address GetBroadcast(void)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void SetRemoteStationManager(Ptr< WifiRemoteStationManager > manager)
static Mac48Address ConvertFrom(const Address &address)
static const uint16_t LLC_SNAP_HEADER_LENGTH
virtual Ptr< Node > GetNode(void) const
TracedCallback m_linkChanges
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual uint32_t GetIfIndex(void) const
static const uint16_t MAX_MSDU_SIZE
virtual void DoInitialize(void)
virtual bool NeedsArp(void) const
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual Address GetBroadcast(void) const
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
virtual void SetIfIndex(const uint32_t index)
NetDevice::ReceiveCallback m_forwardUp
void ConnectWithoutContext(const CallbackBase &callback)
Network layer to device interface.
virtual bool IsLinkUp(void) const
virtual void AddLinkChangeCallback(Callback< void > callback)
void CompleteConfig(void)
Ptr< WifiMac > GetMac(void) const
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
NS_LOG_COMPONENT_DEFINE("WifiNetDevice")
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
static TypeId GetTypeId(void)
NetDevice::PromiscReceiveCallback m_promiscRx
void AddHeader(const Header &header)
virtual void DoInitialize(void)
virtual void SetAddress(Address address)