A Discrete-Event Network Simulator
API
wifi-net-device.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #include "ns3/llc-snap-header.h"
22 #include "ns3/channel.h"
23 #include "ns3/pointer.h"
24 #include "ns3/log.h"
25 #include "ns3/node.h"
26 #include "ns3/uinteger.h"
27 #include "wifi-net-device.h"
28 #include "wifi-phy.h"
29 #include "wifi-mac.h"
30 #include "ns3/ht-configuration.h"
31 #include "ns3/vht-configuration.h"
32 #include "ns3/he-configuration.h"
33 
34 namespace ns3 {
35 
36 NS_LOG_COMPONENT_DEFINE ("WifiNetDevice");
37 
38 NS_OBJECT_ENSURE_REGISTERED (WifiNetDevice);
39 
40 TypeId
42 {
43  static TypeId tid = TypeId ("ns3::WifiNetDevice")
44  .SetParent<NetDevice> ()
45  .AddConstructor<WifiNetDevice> ()
46  .SetGroupName ("Wifi")
47  .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit",
51  MakeUintegerChecker<uint16_t> (1,MAX_MSDU_SIZE - LLC_SNAP_HEADER_LENGTH))
52  .AddAttribute ("Channel", "The channel attached to this device",
53  PointerValue (),
55  MakePointerChecker<Channel> ())
56  .AddAttribute ("Phy", "The PHY layer attached to this device.",
57  PointerValue (),
60  MakePointerChecker<WifiPhy> ())
61  .AddAttribute ("Mac", "The MAC layer attached to this device.",
62  PointerValue (),
65  MakePointerChecker<WifiMac> ())
66  .AddAttribute ("RemoteStationManager", "The station manager attached to this device.",
67  PointerValue (),
70  MakePointerChecker<WifiRemoteStationManager> ())
71  .AddAttribute ("HtConfiguration",
72  "The HtConfiguration object.",
73  PointerValue (),
75  MakePointerChecker<HtConfiguration> ())
76  .AddAttribute ("VhtConfiguration",
77  "The VhtConfiguration object.",
78  PointerValue (),
80  MakePointerChecker<VhtConfiguration> ())
81  .AddAttribute ("HeConfiguration",
82  "The HeConfiguration object.",
83  PointerValue (),
85  MakePointerChecker<HeConfiguration> ())
86  ;
87  return tid;
88 }
89 
91  : m_configComplete (false)
92 {
94 }
95 
97 {
99 }
100 
101 void
103 {
105  m_node = 0;
106  if (m_mac)
107  {
108  m_mac->Dispose ();
109  m_mac = 0;
110  }
111  if (m_phy)
112  {
113  m_phy->Dispose ();
114  m_phy = 0;
115  }
116  if (m_stationManager)
117  {
119  m_stationManager = 0;
120  }
121  if (m_htConfiguration)
122  {
123  m_htConfiguration->Dispose ();
124  m_htConfiguration = 0;
125  }
126  if (m_vhtConfiguration)
127  {
128  m_vhtConfiguration->Dispose ();
129  m_vhtConfiguration = 0;
130  }
131  if (m_heConfiguration)
132  {
133  m_heConfiguration->Dispose ();
134  m_heConfiguration = 0;
135  }
137 }
138 
139 void
141 {
143  if (m_phy)
144  {
145  m_phy->Initialize ();
146  }
147  if (m_mac)
148  {
149  m_mac->Initialize ();
150  }
151  if (m_stationManager)
152  {
154  }
156 }
157 
158 void
160 {
161  if (m_mac == 0
162  || m_phy == 0
163  || m_stationManager == 0
164  || m_node == 0
165  || m_configComplete)
166  {
167  return;
168  }
169  m_mac->SetWifiRemoteStationManager (m_stationManager);
170  m_mac->SetWifiPhy (m_phy);
171  m_mac->SetForwardUpCallback (MakeCallback (&WifiNetDevice::ForwardUp, this));
172  m_mac->SetLinkUpCallback (MakeCallback (&WifiNetDevice::LinkUp, this));
173  m_mac->SetLinkDownCallback (MakeCallback (&WifiNetDevice::LinkDown, this));
176  m_configComplete = true;
177 }
178 
179 void
181 {
182  m_mac = mac;
183  CompleteConfig ();
184 }
185 
186 void
188 {
189  m_phy = phy;
190  CompleteConfig ();
191 }
192 
193 void
195 {
196  m_stationManager = manager;
197  CompleteConfig ();
198 }
199 
202 {
203  return m_mac;
204 }
205 
208 {
209  return m_phy;
210 }
211 
214 {
215  return m_stationManager;
216 }
217 
218 void
219 WifiNetDevice::SetIfIndex (const uint32_t index)
220 {
221  m_ifIndex = index;
222 }
223 
224 uint32_t
226 {
227  return m_ifIndex;
228 }
229 
232 {
233  return m_phy->GetChannel ();
234 }
235 
236 void
238 {
239  m_mac->SetAddress (Mac48Address::ConvertFrom (address));
240 }
241 
242 Address
244 {
245  return m_mac->GetAddress ();
246 }
247 
248 bool
249 WifiNetDevice::SetMtu (const uint16_t mtu)
250 {
252  {
253  return false;
254  }
255  m_mtu = mtu;
256  return true;
257 }
258 
259 uint16_t
261 {
262  return m_mtu;
263 }
264 
265 bool
267 {
268  return m_phy != 0 && m_linkUp;
269 }
270 
271 void
273 {
275 }
276 
277 bool
279 {
280  return true;
281 }
282 
283 Address
285 {
286  return Mac48Address::GetBroadcast ();
287 }
288 
289 bool
291 {
292  return true;
293 }
294 
295 Address
297 {
298  return Mac48Address::GetMulticast (multicastGroup);
299 }
300 
302 {
303  return Mac48Address::GetMulticast (addr);
304 }
305 
306 bool
308 {
309  return false;
310 }
311 
312 bool
314 {
315  return false;
316 }
317 
318 bool
319 WifiNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
320 {
321  NS_LOG_FUNCTION (this << packet << dest << protocolNumber);
323 
324  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
325 
326  LlcSnapHeader llc;
327  llc.SetType (protocolNumber);
328  packet->AddHeader (llc);
329 
330  m_mac->NotifyTx (packet);
331  m_mac->Enqueue (packet, realTo);
332  return true;
333 }
334 
335 Ptr<Node>
337 {
338  return m_node;
339 }
340 
341 void
343 {
344  m_node = node;
345  CompleteConfig ();
346 }
347 
348 bool
350 {
351  return true;
352 }
353 
354 void
356 {
357  m_forwardUp = cb;
358 }
359 
360 void
362 {
363  NS_LOG_FUNCTION (this << packet << from << to);
364  LlcSnapHeader llc;
366  if (to.IsBroadcast ())
367  {
369  }
370  else if (to.IsGroup ())
371  {
373  }
374  else if (to == m_mac->GetAddress ())
375  {
376  type = NetDevice::PACKET_HOST;
377  }
378  else
379  {
381  }
382 
383  Ptr<Packet> copy = packet->Copy ();
384  if (type != NetDevice::PACKET_OTHERHOST)
385  {
386  m_mac->NotifyRx (packet);
387  copy->RemoveHeader (llc);
388  m_forwardUp (this, copy, llc.GetType (), from);
389  }
390  else
391  {
392  copy->RemoveHeader (llc);
393  }
394 
395  if (!m_promiscRx.IsNull ())
396  {
397  m_mac->NotifyPromiscRx (copy);
398  m_promiscRx (this, copy, llc.GetType (), from, to, type);
399  }
400 }
401 
402 void
404 {
405  m_linkUp = true;
406  m_linkChanges ();
407 }
408 
409 void
411 {
412  m_linkUp = false;
413  m_linkChanges ();
414 }
415 
416 bool
417 WifiNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber)
418 {
419  NS_LOG_FUNCTION (this << packet << source << dest << protocolNumber);
422 
423  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
424  Mac48Address realFrom = Mac48Address::ConvertFrom (source);
425 
426  LlcSnapHeader llc;
427  llc.SetType (protocolNumber);
428  packet->AddHeader (llc);
429 
430  m_mac->NotifyTx (packet);
431  m_mac->Enqueue (packet, realTo, realFrom);
432 
433  return true;
434 }
435 
436 void
438 {
439  m_promiscRx = cb;
440  m_mac->SetPromisc ();
441 }
442 
443 bool
445 {
446  return m_mac->SupportsSendFrom ();
447 }
448 
449 void
451 {
452  m_htConfiguration = htConfiguration;
453 }
454 
457 {
458  return m_htConfiguration;
459 }
460 
461 void
463 {
464  m_vhtConfiguration = vhtConfiguration;
465 }
466 
469 {
470  return m_vhtConfiguration;
471 }
472 
473 void
475 {
476  m_heConfiguration = heConfiguration;
477 }
478 
481 {
482  return m_heConfiguration;
483 }
484 
485 } //namespace ns3
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::NetDevice::PACKET_BROADCAST
@ PACKET_BROADCAST
Packet addressed to all.
Definition: net-device.h:300
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::Object::Dispose
void Dispose(void)
Dispose of this Object.
Definition: object.cc:214
ns3::WifiNetDevice::DoInitialize
void DoInitialize(void) override
Initialize() implementation.
Definition: wifi-net-device.cc:140
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:67
ns3::WifiNetDevice::SupportsSendFrom
bool SupportsSendFrom(void) const override
Definition: wifi-net-device.cc:444
ns3::WifiNetDevice::m_ifIndex
uint32_t m_ifIndex
IF index.
Definition: wifi-net-device.h:201
ns3::Mac48Address::GetMulticast
static Mac48Address GetMulticast(Ipv4Address address)
Definition: mac48-address.cc:191
ns3::WifiNetDevice::GetHtConfiguration
Ptr< HtConfiguration > GetHtConfiguration(void) const
Definition: wifi-net-device.cc:456
ns3::WifiNetDevice::CompleteConfig
void CompleteConfig(void)
Complete the configuration of this Wi-Fi device by connecting all lower components (e....
Definition: wifi-net-device.cc:159
ns3::WifiNetDevice::AddLinkChangeCallback
void AddLinkChangeCallback(Callback< void > callback) override
Definition: wifi-net-device.cc:272
ns3::Mac48Address::IsGroup
bool IsGroup(void) const
Definition: mac48-address.cc:164
ns3::Mac48Address::IsMatchingType
static bool IsMatchingType(const Address &address)
Definition: mac48-address.cc:110
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::Callback< void >
ns3::WifiNetDevice::m_configComplete
bool m_configComplete
configuration complete
Definition: wifi-net-device.h:205
ns3::WifiNetDevice::GetPhy
Ptr< WifiPhy > GetPhy(void) const
Definition: wifi-net-device.cc:207
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiNetDevice::SetMac
void SetMac(const Ptr< WifiMac > mac)
Definition: wifi-net-device.cc:180
ns3::WifiNetDevice::LinkDown
void LinkDown(void)
Set that the link is down (i.e.
Definition: wifi-net-device.cc:410
ns3::Callback::IsNull
bool IsNull(void) const
Check for null implementation.
Definition: callback.h:1386
ns3::WifiPhy::GetChannel
virtual Ptr< Channel > GetChannel(void) const =0
Return the Channel this WifiPhy is connected to.
ns3::TracedCallback::ConnectWithoutContext
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
Definition: traced-callback.h:135
ns3::WifiNetDevice::m_node
Ptr< Node > m_node
the node
Definition: wifi-net-device.h:188
ns3::WifiNetDevice::NeedsArp
bool NeedsArp(void) const override
Definition: wifi-net-device.cc:349
ns3::WifiNetDevice::SetHeConfiguration
void SetHeConfiguration(Ptr< HeConfiguration > heConfiguration)
Definition: wifi-net-device.cc:474
ns3::WifiNetDevice::WifiNetDevice
WifiNetDevice()
Definition: wifi-net-device.cc:90
ns3::WifiNetDevice::SetVhtConfiguration
void SetVhtConfiguration(Ptr< VhtConfiguration > vhtConfiguration)
Definition: wifi-net-device.cc:462
ns3::WifiNetDevice::m_phy
Ptr< WifiPhy > m_phy
the phy
Definition: wifi-net-device.h:189
ns3::WifiNetDevice::SetNode
void SetNode(const Ptr< Node > node) override
Definition: wifi-net-device.cc:342
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::Ipv6Address
Describes an IPv6 address.
Definition: ipv6-address.h:50
ns3::NetDevice::PACKET_HOST
@ PACKET_HOST
Packet addressed oo us.
Definition: net-device.h:298
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::WifiNetDevice::IsPointToPoint
bool IsPointToPoint(void) const override
Return true if the net device is on a point-to-point link.
Definition: wifi-net-device.cc:307
wifi-phy.h
ns3::WifiNetDevice::GetAddress
Address GetAddress(void) const override
Definition: wifi-net-device.cc:243
third.mac
mac
Definition: third.py:99
ns3::MAX_MSDU_SIZE
static const uint16_t MAX_MSDU_SIZE
This value conforms to the 802.11 specification.
Definition: wifi-net-device.h:37
ns3::LlcSnapHeader::SetType
void SetType(uint16_t type)
Set the Ethertype.
Definition: llc-snap-header.cc:38
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::WifiNetDevice::m_forwardUp
NetDevice::ReceiveCallback m_forwardUp
forward up callback
Definition: wifi-net-device.h:195
ns3::WifiNetDevice::m_vhtConfiguration
Ptr< VhtConfiguration > m_vhtConfiguration
the VhtConfiguration
Definition: wifi-net-device.h:193
ns3::WifiNetDevice::GetHeConfiguration
Ptr< HeConfiguration > GetHeConfiguration(void) const
Definition: wifi-net-device.cc:480
ns3::WifiNetDevice::SetHtConfiguration
void SetHtConfiguration(Ptr< HtConfiguration > htConfiguration)
Definition: wifi-net-device.cc:450
wifi-mac.h
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::WifiNetDevice::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-net-device.cc:41
ns3::Mac48Address::GetBroadcast
static Mac48Address GetBroadcast(void)
Definition: mac48-address.cc:170
ns3::WifiNetDevice::IsBridge
bool IsBridge(void) const override
Return true if the net device is acting as a bridge.
Definition: wifi-net-device.cc:313
ns3::WifiNetDevice::SetPromiscReceiveCallback
void SetPromiscReceiveCallback(PromiscReceiveCallback cb) override
Definition: wifi-net-device.cc:437
ns3::WifiNetDevice::GetMulticast
Address GetMulticast(Ipv4Address multicastGroup) const override
Make and return a MAC multicast address using the provided multicast group.
Definition: wifi-net-device.cc:296
ns3::NetDevice::PACKET_OTHERHOST
@ PACKET_OTHERHOST
Packet addressed to someone else.
Definition: net-device.h:304
ns3::WifiNetDevice::Send
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Definition: wifi-net-device.cc:319
ns3::WifiNetDevice::m_htConfiguration
Ptr< HtConfiguration > m_htConfiguration
the HtConfiguration
Definition: wifi-net-device.h:192
ns3::Address
a polymophic address class
Definition: address.h:91
ns3::Mac48Address::ConvertFrom
static Mac48Address ConvertFrom(const Address &address)
Definition: mac48-address.cc:126
wifi-net-device.h
ns3::WifiNetDevice::GetVhtConfiguration
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
Definition: wifi-net-device.cc:468
ns3::Mac48Address::IsBroadcast
bool IsBroadcast(void) const
Definition: mac48-address.cc:158
ns3::WifiNetDevice::ForwardUp
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Receive a packet from the lower layer and pass the packet up the stack.
Definition: wifi-net-device.cc:361
ns3::WifiNetDevice::GetNode
Ptr< Node > GetNode(void) const override
Definition: wifi-net-device.cc:336
ns3::WifiNetDevice::LinkUp
void LinkUp(void)
Set that the link is up.
Definition: wifi-net-device.cc:403
ns3::Packet::RemoveHeader
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
ns3::WifiNetDevice::DoDispose
void DoDispose(void) override
Destructor implementation.
Definition: wifi-net-device.cc:102
ns3::WifiNetDevice::GetRemoteStationManager
Ptr< WifiRemoteStationManager > GetRemoteStationManager(void) const
Definition: wifi-net-device.cc:213
ns3::WifiNetDevice::IsMulticast
bool IsMulticast(void) const override
Definition: wifi-net-device.cc:290
first.address
address
Definition: first.py:44
ns3::WifiNetDevice::IsLinkUp
bool IsLinkUp(void) const override
Definition: wifi-net-device.cc:266
ns3::WifiRemoteStationManager::SetupPhy
virtual void SetupPhy(const Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
Definition: wifi-remote-station-manager.cc:142
ns3::Object::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition: object.cc:353
ns3::WifiNetDevice::m_stationManager
Ptr< WifiRemoteStationManager > m_stationManager
the station manager
Definition: wifi-net-device.h:191
ns3::WifiNetDevice::GetMtu
uint16_t GetMtu(void) const override
Definition: wifi-net-device.cc:260
ns3::WifiNetDevice::SetAddress
void SetAddress(Address address) override
Set the address of this interface.
Definition: wifi-net-device.cc:237
ns3::WifiNetDevice::m_promiscRx
NetDevice::PromiscReceiveCallback m_promiscRx
promiscuous receive callback
Definition: wifi-net-device.h:196
ns3::MakeCallback
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
ns3::WifiNetDevice::GetIfIndex
uint32_t GetIfIndex(void) const override
Definition: wifi-net-device.cc:225
ns3::MakePointerAccessor
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: pointer.h:227
NS_LOG_FUNCTION_NOARGS
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition: log-macros-enabled.h:209
ns3::WifiNetDevice::m_linkChanges
TracedCallback m_linkChanges
link change callback
Definition: wifi-net-device.h:203
ns3::Packet::Copy
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
ns3::WifiNetDevice::SetRemoteStationManager
void SetRemoteStationManager(const Ptr< WifiRemoteStationManager > manager)
Definition: wifi-net-device.cc:194
ns3::WifiNetDevice::IsBroadcast
bool IsBroadcast(void) const override
Definition: wifi-net-device.cc:278
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition: log-macros-enabled.h:244
ns3::WifiNetDevice::~WifiNetDevice
virtual ~WifiNetDevice()
Definition: wifi-net-device.cc:96
ns3::NetDevice::PacketType
PacketType
Packet types are used as they are in Linux.
Definition: net-device.h:297
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::LlcSnapHeader
Header for the LLC/SNAP encapsulation.
Definition: llc-snap-header.h:43
ns3::LLC_SNAP_HEADER_LENGTH
static const uint16_t LLC_SNAP_HEADER_LENGTH
The length in octects of the LLC/SNAP header.
Definition: llc-snap-header.h:33
ns3::WifiNetDevice::SendFrom
bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override
Definition: wifi-net-device.cc:417
ns3::WifiNetDevice::m_linkUp
bool m_linkUp
link up
Definition: wifi-net-device.h:202
ns3::WifiNetDevice::m_mtu
uint16_t m_mtu
MTU.
Definition: wifi-net-device.h:204
ns3::MakeUintegerAccessor
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:45
ns3::Object::Initialize
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
Definition: object.cc:183
ns3::LlcSnapHeader::GetType
uint16_t GetType(void)
Return the Ethertype.
Definition: llc-snap-header.cc:44
ns3::WifiNetDevice::m_heConfiguration
Ptr< HeConfiguration > m_heConfiguration
the HeConfiguration
Definition: wifi-net-device.h:194
ns3::WifiNetDevice::GetBroadcast
Address GetBroadcast(void) const override
Definition: wifi-net-device.cc:284
ns3::WifiRemoteStationManager::SetupMac
virtual void SetupMac(const Ptr< WifiMac > mac)
Set up MAC associated with this device since it is the object that knows the full set of timing param...
Definition: wifi-remote-station-manager.cc:161
ns3::WifiNetDevice::SetIfIndex
void SetIfIndex(const uint32_t index) override
Definition: wifi-net-device.cc:219
ns3::Object::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: object.cc:346
ns3::WifiNetDevice::SetPhy
void SetPhy(const Ptr< WifiPhy > phy)
Definition: wifi-net-device.cc:187
third.phy
phy
Definition: third.py:93
ns3::WifiNetDevice::SetReceiveCallback
void SetReceiveCallback(NetDevice::ReceiveCallback cb) override
Definition: wifi-net-device.cc:355
ns3::NetDevice
Network layer to device interface.
Definition: net-device.h:96
ns3::WifiNetDevice::m_mac
Ptr< WifiMac > m_mac
the MAC
Definition: wifi-net-device.h:190
ns3::WifiNetDevice::SetMtu
bool SetMtu(const uint16_t mtu) override
Definition: wifi-net-device.cc:249
ns3::WifiNetDevice::GetMac
Ptr< WifiMac > GetMac(void) const
Definition: wifi-net-device.cc:201
ns3::WifiNetDevice::GetChannel
Ptr< Channel > GetChannel(void) const override
Definition: wifi-net-device.cc:231
ns3::NetDevice::PACKET_MULTICAST
@ PACKET_MULTICAST
Packet addressed to multicast group.
Definition: net-device.h:302