26 #include "ns3/llc-snap-header.h" 
   27 #include "ns3/packet.h" 
   28 #include "ns3/uinteger.h" 
   29 #include "ns3/pointer.h" 
   31 #include "ns3/trace-source-accessor.h" 
   45     .AddConstructor<WifiNetDevice> ()
 
   46     .SetGroupName (
"Wifi")
 
   47     .AddAttribute (
"Mtu", 
"The MAC-level Maximum Transmission Unit",
 
   52     .AddAttribute (
"Channel", 
"The channel attached to this device",
 
   55                    MakePointerChecker<WifiChannel> ())
 
   56     .AddAttribute (
"Phy", 
"The PHY layer attached to this device.",
 
   60                    MakePointerChecker<WifiPhy> ())
 
   61     .AddAttribute (
"Mac", 
"The MAC layer attached to this device.",
 
   65                    MakePointerChecker<WifiMac> ())
 
   66     .AddAttribute (
"RemoteStationManager", 
"The station manager attached to this device.",
 
   70                    MakePointerChecker<WifiRemoteStationManager> ())
 
   76   : m_configComplete (false)
 
  104   m_mac->Initialize ();
 
  202   return m_mac->GetAddress ();
 
  286   m_mac->NotifyTx (packet);
 
  287   m_mac->Enqueue (packet, realTo);
 
  330   else if (to == 
m_mac->GetAddress ())
 
  341       m_mac->NotifyRx (packet);
 
  347       m_mac->NotifyPromiscRx (packet);
 
  379   m_mac->NotifyTx (packet);
 
  380   m_mac->Enqueue (packet, realTo, realFrom);
 
  389   m_mac->SetPromisc ();
 
  395   return m_mac->SupportsSendFrom ();
 
virtual void SetNode(Ptr< Node > node)
 
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer. 
 
void Dispose(void)
Dispose of this Object. 
 
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
Return the WifiChannel this WifiPhy is connected to. 
 
virtual void DoInitialize(void)
Initialize() implementation. 
 
virtual bool SetMtu(const uint16_t mtu)
 
Smart pointer class similar to boost::intrusive_ptr. 
 
void LinkUp(void)
Set that the link is up. 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
virtual uint16_t GetMtu(void) const 
 
virtual Address GetAddress(void) const 
 
Ptr< WifiRemoteStationManager > m_stationManager
 
bool IsNull(void) const 
Check for null implementation. 
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
 
PacketType
Packet types are used as they are in Linux. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
bool IsBroadcast(void) const 
 
virtual Address GetMulticast(Ipv4Address multicastGroup) const 
Make and return a MAC multicast address using the provided multicast group. 
 
Packet addressed to multicast group. 
 
virtual void DoDispose(void)
Destructor implementation. 
 
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function. 
 
void ForwardUp(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Receive a packet from the lower layer and pass the packet up the stack. 
 
virtual void SetupPhy(Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
 
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)
Destructor implementation. 
 
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
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 
Return the WifiChannel this device is connected to. 
 
virtual bool SupportsSendFrom(void) const 
 
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
The length in octects of the LLC/SNAP header. 
 
virtual Ptr< Node > GetNode(void) const 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
TracedCallback m_linkChanges
 
Hold objects of type Ptr. 
 
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
 
Packet addressed to someone else. 
 
virtual uint32_t GetIfIndex(void) const 
 
static const uint16_t MAX_MSDU_SIZE
 
virtual void DoInitialize(void)
Initialize() implementation. 
 
virtual bool NeedsArp(void) const 
 
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
 
virtual void SetupMac(Ptr< WifiMac > mac)
Set up MAC associated with this device since it is the object that knows the full set of timing param...
 
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)
Append a Callback to the chain (without a context). 
 
Network layer to device interface. 
 
virtual bool IsLinkUp(void) const 
 
virtual void AddLinkChangeCallback(Callback< void > callback)
 
void CompleteConfig(void)
Complete the configuration of this Wi-Fi device by connecting all lower components (e...
 
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. 
 
void LinkDown(void)
Set that the link is down (i.e. 
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
 
static TypeId GetTypeId(void)
 
NetDevice::PromiscReceiveCallback m_promiscRx
 
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one. 
 
void AddHeader(const Header &header)
Add header to this packet. 
 
virtual void SetAddress(Address address)
Set the address of this interface.