A Discrete-Event Network Simulator
API
ocb-wifi-mac.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 INRIA
3  * Copyright (c) 2013 Dalian University of Technology
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  * Junling Bu <linlinjavaer@gmail.com>
20  */
21 
22 #include "ocb-wifi-mac.h"
23 
24 #include "higher-tx-tag.h"
25 #include "vendor-specific-action.h"
27 
28 #include "ns3/channel-access-manager.h"
29 #include "ns3/event-id.h"
30 #include "ns3/ht-capabilities.h"
31 #include "ns3/log.h"
32 #include "ns3/mac-rx-middle.h"
33 #include "ns3/pointer.h"
34 #include "ns3/string.h"
35 #include "ns3/vht-capabilities.h"
36 
37 namespace ns3
38 {
39 
40 NS_LOG_COMPONENT_DEFINE("OcbWifiMac");
41 
42 NS_OBJECT_ENSURE_REGISTERED(OcbWifiMac);
43 
46 
47 TypeId
49 {
50  static TypeId tid = TypeId("ns3::OcbWifiMac")
51  .SetParent<WifiMac>()
52  .SetGroupName("Wave")
53  .AddConstructor<OcbWifiMac>();
54  return tid;
55 }
56 
58 {
59  NS_LOG_FUNCTION(this);
60  // Let the lower layers know that we are acting as an OCB node
62 }
63 
65 {
66  NS_LOG_FUNCTION(this);
67 }
68 
69 void
71 {
72  NS_LOG_FUNCTION(this << vsc << peer << oi);
73  WifiMacHeader hdr;
75  hdr.SetAddr1(peer);
76  hdr.SetAddr2(GetAddress());
78  hdr.SetDsNotFrom();
79  hdr.SetDsNotTo();
82  vsc->AddHeader(vsa);
83 
84  if (GetQosSupported())
85  {
86  uint8_t tid = QosUtilsGetTidForPacket(vsc);
87  tid = tid > 7 ? 0 : tid;
88  GetQosTxop(tid)->Queue(vsc, hdr);
89  }
90  else
91  {
92  GetTxop()->Queue(vsc, hdr);
93  }
94 }
95 
96 void
98 {
99  NS_LOG_FUNCTION(this << oi << &cb);
101 }
102 
103 void
105 {
106  NS_LOG_FUNCTION(this << oi);
108 }
109 
110 void
112 {
113  NS_LOG_WARN("in OCB mode we should not call SetSsid");
114 }
115 
116 Ssid
118 {
119  NS_LOG_WARN("in OCB mode we should not call GetSsid");
120  // we really do not want to return ssid, however we have to provide
121  return WifiMac::GetSsid();
122 }
123 
124 void
126 {
127  NS_LOG_WARN("in OCB mode we should not call SetBsid");
128 }
129 
131 OcbWifiMac::GetBssid(uint8_t /* linkId */) const
132 {
133  NS_LOG_WARN("in OCB mode we should not call GetBssid");
134  return WILDCARD_BSSID;
135 }
136 
137 void
139 {
140  NS_LOG_FUNCTION(this << &linkUp);
142 
143  // The approach taken here is that, from the point of view of a STA
144  // in OCB mode, the link is always up, so we immediately invoke the
145  // callback if one is set
146  linkUp();
147 }
148 
149 void
151 {
152  NS_LOG_FUNCTION(this << &linkDown);
154  NS_LOG_WARN("in OCB mode the like will never down, so linkDown will never be called");
155 }
156 
157 bool
159 {
160  return true;
161 }
162 
163 void
165 {
166  NS_LOG_FUNCTION(this << packet << to);
167  if (GetWifiRemoteStationManager()->IsBrandNew(to))
168  {
169  // In ad hoc mode, we assume that every destination supports all
170  // the rates we support.
172  {
175  to,
177  }
179  {
181  to,
183  }
186  }
187 
188  WifiMacHeader hdr;
189 
190  // If we are not a QoS STA then we definitely want to use AC_BE to
191  // transmit the packet. A TID of zero will map to AC_BE (through \c
192  // QosUtilsMapTidToAc()), so we use that as our default here.
193  uint8_t tid = 0;
194 
195  if (GetQosSupported())
196  {
199  hdr.SetQosNoEosp();
200  hdr.SetQosNoAmsdu();
201  // About transmission of multiple frames,
202  // in Ad-hoc mode TXOP is not supported for now, so TxopLimit=0;
203  // however in OCB mode, 802.11p do not allow transmit multiple frames
204  // so TxopLimit must equal 0
205  hdr.SetQosTxopLimit(0);
206 
207  // Fill in the QoS control field in the MAC header
208  tid = QosUtilsGetTidForPacket(packet);
209  // Any value greater than 7 is invalid and likely indicates that
210  // the packet had no QoS tag, so we revert to zero, which'll
211  // mean that AC_BE is used.
212  if (tid > 7)
213  {
214  tid = 0;
215  }
216  hdr.SetQosTid(tid);
217  }
218  else
219  {
220  hdr.SetType(WIFI_MAC_DATA);
221  }
222 
224  {
225  hdr.SetNoOrder(); // explicitly set to 0 for the time being since HT/VHT/HE control field is
226  // not yet implemented (set it to 1 when implemented)
227  }
228  hdr.SetAddr1(to);
229  hdr.SetAddr2(GetAddress());
231  hdr.SetDsNotFrom();
232  hdr.SetDsNotTo();
233 
234  if (GetQosSupported())
235  {
236  // Sanity check that the TID is valid
237  NS_ASSERT(tid < 8);
238  GetQosTxop(tid)->Queue(packet, hdr);
239  }
240  else
241  {
242  GetTxop()->Queue(packet, hdr);
243  }
244 }
245 
246 /*
247  * see 802.11p-2010 chapter 11.19
248  * here we only care about data packet and vsa management frame
249  */
250 void
252 {
253  NS_LOG_FUNCTION(this << *mpdu << +linkId);
254  const WifiMacHeader* hdr = &mpdu->GetHeader();
255  // Create a copy of the MPDU payload because non-const operations like RemovePacketTag
256  // and RemoveHeader may need to be performed.
257  Ptr<Packet> packet = mpdu->GetPacket()->Copy();
258  NS_ASSERT(!hdr->IsCtl());
259  NS_ASSERT(hdr->GetAddr3() == WILDCARD_BSSID);
260 
261  Mac48Address from = hdr->GetAddr2();
262  Mac48Address to = hdr->GetAddr1();
263 
264  if (GetWifiRemoteStationManager()->IsBrandNew(from))
265  {
266  // In ad hoc mode, we assume that every destination supports all
267  // the rates we support.
269  {
272  from,
274  }
276  {
278  from,
280  }
283  }
284 
285  if (hdr->IsData())
286  {
287  if (hdr->IsQosData() && hdr->IsQosAmsdu())
288  {
289  NS_LOG_DEBUG("Received A-MSDU from" << from);
291  }
292  else
293  {
294  ForwardUp(packet, from, to);
295  }
296  return;
297  }
298 
299  // why put check here, not before "if (hdr->IsData ())" ?
300  // because WifiNetDevice::ForwardUp needs to m_promiscRx data packet
301  // and will filter data packet for itself
302  // so we need to filter management frame
303  if (to != GetAddress() && !to.IsGroup())
304  {
305  NS_LOG_LOGIC("the management frame is not for us");
306  NotifyRxDrop(packet);
307  return;
308  }
309 
310  if (hdr->IsMgt() && hdr->IsAction())
311  {
312  // yes, we only care about VendorSpecificAction frame in OCB mode
313  // other management frames will be handled by WifiMac::Receive
315  packet->PeekHeader(vsaHdr);
316  if (vsaHdr.GetCategory() == CATEGORY_OF_VSA)
317  {
319  packet->RemoveHeader(vsa);
322 
323  if (cb.IsNull())
324  {
325  NS_LOG_DEBUG("cannot find VscCallback for OrganizationIdentifier=" << oi);
326  return;
327  }
328  bool succeed = cb(this, oi, packet, from);
329 
330  if (!succeed)
331  {
332  NS_LOG_DEBUG("vsc callback could not handle the packet successfully");
333  }
334 
335  return;
336  }
337  }
338  // Invoke the receive handler of our parent class to deal with any
339  // other frames. Specifically, this will handle Block Ack-related
340  // Management Action frames.
341  WifiMac::Receive(Create<WifiMpdu>(packet, *hdr), linkId);
342 }
343 
344 void
345 OcbWifiMac::ConfigureEdca(uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, AcIndex ac)
346 {
347  NS_LOG_FUNCTION(this << cwmin << cwmax << aifsn << ac);
348  Ptr<Txop> dcf;
349  switch (ac)
350  {
351  case AC_VO:
352  dcf = WifiMac::GetVOQueue();
353  dcf->SetWifiMac(this);
354  dcf->SetMinCw((cwmin + 1) / 4 - 1);
355  dcf->SetMaxCw((cwmin + 1) / 2 - 1);
356  dcf->SetAifsn(aifsn);
357  break;
358  case AC_VI:
359  dcf = WifiMac::GetVIQueue();
360  dcf->SetWifiMac(this);
361  dcf->SetMinCw((cwmin + 1) / 2 - 1);
362  dcf->SetMaxCw(cwmin);
363  dcf->SetAifsn(aifsn);
364  break;
365  case AC_BE:
366  dcf = WifiMac::GetBEQueue();
367  dcf->SetWifiMac(this);
368  dcf->SetMinCw(cwmin);
369  dcf->SetMaxCw(cwmax);
370  dcf->SetAifsn(aifsn);
371  break;
372  case AC_BK:
373  dcf = WifiMac::GetBKQueue();
374  dcf->SetWifiMac(this);
375  dcf->SetMinCw(cwmin);
376  dcf->SetMaxCw(cwmax);
377  dcf->SetAifsn(aifsn);
378  break;
379  case AC_BE_NQOS:
380  dcf = WifiMac::GetTxop();
381  dcf->SetWifiMac(this);
382  dcf->SetMinCw(cwmin);
383  dcf->SetMaxCw(cwmax);
384  dcf->SetAifsn(aifsn);
385  break;
386  case AC_BEACON:
387  // done by ApWifiMac
388  break;
389  case AC_UNDEF:
390  NS_FATAL_ERROR("I don't know what to do with this");
391  break;
392  }
393 
395 }
396 
397 void
399 {
400  NS_LOG_FUNCTION(this << phy);
402  NS_ABORT_MSG_IF(!phy->GetOperatingChannel().IsSet(),
403  "PHY operating channel must have been set");
404  auto& link = GetLink(SINGLE_LINK_OP_ID);
405  if (link.channelAccessManager != nullptr)
406  {
407  link.channelAccessManager->SetupPhyListener(phy);
408  }
409  if (link.feManager != nullptr)
410  {
411  link.feManager->SetWifiPhy(phy);
412  }
413 }
414 
415 void
417 {
418  NS_LOG_FUNCTION(this << standard);
419  NS_ASSERT(standard == WIFI_STANDARD_80211p);
420 
421  if (GetNLinks() == 0)
422  {
423  WifiMac::SetWifiPhys({nullptr}); // for the purpose of adding a link
424  }
425 
426  auto& link = GetLink(SINGLE_LINK_OP_ID);
427 
428  // Setup ChannelAccessManager
429  link.channelAccessManager = CreateObject<ChannelAccessManager>();
430 
431  uint32_t cwmin = 15;
432  uint32_t cwmax = 1023;
433 
434  if (!GetQosSupported())
435  {
436  // The special value of AC_BE_NQOS which exists in the Access
437  // Category enumeration allows us to configure plain old DCF.
438  ConfigureEdca(cwmin, cwmax, 2, AC_BE_NQOS);
439  }
440  else
441  {
442  // Now we configure the EDCA functions
443  // see IEEE802.11p-2010 section 7.3.2.29
444  // Wave CCH and SCHs set default 802.11p EDCA
445  ConfigureEdca(cwmin, cwmax, 2, AC_VO);
446  ConfigureEdca(cwmin, cwmax, 3, AC_VI);
447  ConfigureEdca(cwmin, cwmax, 6, AC_BE);
448  ConfigureEdca(cwmin, cwmax, 9, AC_BK);
449  }
450 
451  // Setup FrameExchangeManager
452  auto feManager = CreateObject<WaveFrameExchangeManager>();
453  feManager->SetWifiMac(this);
454  feManager->SetMacTxMiddle(m_txMiddle);
455  feManager->SetMacRxMiddle(m_rxMiddle);
456  feManager->SetAddress(GetAddress());
457  link.channelAccessManager->SetupFrameExchangeManager(feManager);
458  if (auto phy = GetWifiPhy(); phy != nullptr)
459  {
460  feManager->SetWifiPhy(phy);
461  link.channelAccessManager->SetupPhyListener(phy);
462  }
463  link.feManager = feManager;
464 }
465 
466 void
468 {
469  NS_LOG_FUNCTION(this);
471  GetLink(SINGLE_LINK_OP_ID).feManager->NotifySleepNow();
472 }
473 
474 void
476 {
477  NS_LOG_FUNCTION(this);
478  // wake-up operation is not required in m_low object
480 }
481 
482 void
484 {
485  NS_LOG_FUNCTION(this << duration);
488 }
489 
490 void
492 {
493  NS_LOG_FUNCTION(this << ac);
494  Ptr<QosTxop> queue = GetQosTxop(ac);
495  NS_ASSERT(queue);
496  // reset and flush queue
497  queue->GetWifiMacQueue()->Flush();
498 }
499 
500 void
502 {
503  NS_LOG_FUNCTION(this);
504  // The switching event is used to notify MAC entity reset its operation.
506  GetLink(SINGLE_LINK_OP_ID).feManager->NotifySwitchingStartNow(Time(0));
507 }
508 
509 void
511 {
512  NS_LOG_FUNCTION(this << device);
513  // To extend current OcbWifiMac for WAVE 1609.4, we shall use WaveFrameExchangeManager
514  StaticCast<WaveFrameExchangeManager>(GetLink(SINGLE_LINK_OP_ID).feManager)
515  ->SetWaveNetDevice(device);
516 }
517 
518 std::optional<uint8_t>
520 {
521  return 0;
522 }
523 
524 void
526 {
527  NS_LOG_FUNCTION(this);
529 }
530 
531 } // namespace ns3
Callback template class.
Definition: callback.h:443
bool IsNull() const
Check for null implementation.
Definition: callback.h:572
void NotifyWakeupNow()
Notify the Txop that the device has been resumed from sleep mode.
void NotifyCcaBusyStartNow(Time duration, WifiChannelListType channelType, const std::vector< Time > &per20MhzDurations)
void NotifySleepNow()
Notify the Txop that the device has been put in sleep mode.
void NotifySwitchingStartNow(Time duration)
an EUI-48 address
Definition: mac48-address.h:46
bool IsGroup() const
static Mac48Address GetBroadcast()
STAs communicate with each directly outside the context of a BSS.
Definition: ocb-wifi-mac.h:51
std::optional< uint8_t > GetLinkIdByAddress(const Mac48Address &address) const override
Get the ID of the link having the given MAC address, if any.
virtual Ssid GetSsid() const
virtual void SetBssid(Mac48Address bssid)
void ConfigureStandard(WifiStandard standard) override
void SetWifiPhy(Ptr< WifiPhy > phy)
Set the PHY.
VendorSpecificContentManager m_vscManager
VSC manager.
Definition: ocb-wifi-mac.h:195
void SetLinkUpCallback(Callback< void > linkUp) override
SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets d...
void Suspend()
To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity.
void AddReceiveVscCallback(OrganizationIdentifier oi, VscCallback cb)
Definition: ocb-wifi-mac.cc:97
virtual Mac48Address GetBssid(uint8_t) const
This method shall not be used in WAVE environment and here it will overloaded to log warn message.
virtual void SetSsid(Ssid ssid)
void EnableForWave(Ptr< WaveNetDevice > device)
void SendVsc(Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
Definition: ocb-wifi-mac.cc:70
void ConfigureEdca(uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, AcIndex ac)
void Enqueue(Ptr< Packet > packet, Mac48Address to) override
virtual void SetLinkDownCallback(Callback< void > linkDown)
void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId) override
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
void DoDispose() override
Destructor implementation.
void Resume()
To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity.
void MakeVirtualBusy(Time duration)
~OcbWifiMac() override
Definition: ocb-wifi-mac.cc:64
void RemoveReceiveVscCallback(OrganizationIdentifier oi)
static TypeId GetTypeId()
Get the type ID.
Definition: ocb-wifi-mac.cc:48
void CancleTx(AcIndex ac)
bool CanForwardPacketsTo(Mac48Address to) const override
Return true if packets can be forwarded to the given destination, false otherwise.
void Reset()
To support MAC extension for multiple channel operation, Reset current MAC entity and flush its inter...
the organization identifier is a public organizationally unique identifier assigned by the IEEE.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:294
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:268
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Definition: packet.cc:305
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
Definition: txop.cc:256
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
Definition: txop.cc:220
virtual void SetWifiMac(const Ptr< WifiMac > mac)
Set the wifi MAC this Txop is associated to.
Definition: txop.cc:195
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
Definition: txop.cc:353
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
Definition: txop.cc:227
virtual void Queue(Ptr< Packet > packet, const WifiMacHeader &hdr)
Definition: txop.cc:505
a unique identifier for an interface.
Definition: type-id.h:60
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:935
See IEEE 802.11-2007 chapter 7.3.1.11 and 7.4.5 also IEEE 802.11p-2010 chapter 7.4....
void SetOrganizationIdentifier(OrganizationIdentifier oi)
uint8_t GetCategory() const
Get the category field.
OrganizationIdentifier GetOrganizationIdentifier() const
void RegisterVscCallback(OrganizationIdentifier oi, VscCallback cb)
VscCallback FindVscCallback(OrganizationIdentifier &oi)
void DeregisterVscCallback(OrganizationIdentifier &oi)
Implements the IEEE 802.11 MAC header.
void SetQosAckPolicy(QosAckPolicy policy)
Set the QoS Ack policy in the QoS control field.
bool IsQosAmsdu() const
Check if the A-MSDU present bit is set in the QoS control field.
Mac48Address GetAddr3() const
Return the address in the Address 3 field.
Mac48Address GetAddr1() const
Return the address in the Address 1 field.
void SetQosTxopLimit(uint8_t txop)
Set TXOP limit in the QoS control field.
bool IsMgt() const
Return true if the Type is Management.
bool IsCtl() const
Return true if the Type is Control.
void SetNoOrder()
Unset order bit in the frame control field.
void SetDsNotFrom()
Un-set the From DS bit in the Frame Control field.
bool IsAction() const
Return true if the header is an Action header.
void SetAddr1(Mac48Address address)
Fill the Address 1 field with the given address.
void SetQosNoAmsdu()
Set that A-MSDU is not present.
void SetType(WifiMacType type, bool resetToDsFromDs=true)
Set Type/Subtype values with the correct values depending on the given type.
Mac48Address GetAddr2() const
Return the address in the Address 2 field.
void SetQosTid(uint8_t tid)
Set the TID for the QoS header.
bool IsData() const
Return true if the Type is DATA.
void SetQosNoEosp()
Un-set the end of service period (EOSP) bit in the QoS control field.
void SetAddr2(Mac48Address address)
Fill the Address 2 field with the given address.
bool IsQosData() const
Return true if the Type is DATA and Subtype is one of the possible values for QoS Data.
void SetAddr3(Mac48Address address)
Fill the Address 3 field with the given address.
void SetDsNotTo()
Un-set the To DS bit in the Frame Control field.
base class for all MAC-level wifi objects.
Definition: wifi-mac.h:94
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
Definition: wifi-mac.cc:524
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
Definition: wifi-mac.cc:484
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1590
bool GetQosSupported() const
Return whether the device supports QoS.
Definition: wifi-mac.cc:1006
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Definition: wifi-mac.cc:906
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition: wifi-mac.h:751
Ssid GetSsid() const
Definition: wifi-mac.cc:456
bool GetHtSupported() const
Return whether the device supports HT.
Definition: wifi-mac.cc:1365
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
Definition: wifi-mac.cc:512
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Definition: wifi-mac.cc:411
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
Definition: wifi-mac.cc:954
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
Definition: wifi-mac.cc:1533
virtual void SetWifiPhys(const std::vector< Ptr< WifiPhy >> &phys)
Definition: wifi-mac.cc:925
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Definition: wifi-mac.cc:1371
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition: wifi-mac.h:752
virtual void DeaggregateAmsduAndForward(Ptr< const WifiMpdu > mpdu)
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
Definition: wifi-mac.cc:1224
Ptr< QosTxop > GetVIQueue() const
Accessor for the AC_VI channel access function.
Definition: wifi-mac.cc:518
void SetLinkDownCallback(Callback< void > linkDown)
Definition: wifi-mac.cc:1082
Ptr< QosTxop > GetBKQueue() const
Accessor for the AC_BK channel access function.
Definition: wifi-mac.cc:530
void NotifyRxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:595
virtual void SetLinkUpCallback(Callback< void > linkUp)
Definition: wifi-mac.cc:1075
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
Definition: wifi-mac.cc:886
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition: wifi-mac.cc:1100
virtual void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
Definition: wifi-mac.cc:1107
Mac48Address GetAddress() const
Definition: wifi-mac.cc:443
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition: wifi-mac.cc:898
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition: wifi-mac.cc:490
void DoDispose() override
Destructor implementation.
Definition: wifi-mac.cc:369
void AddAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to store all of the MCS supported by a destination which is also supported loc...
void AddAllSupportedModes(Mac48Address address)
Invoked in a STA or AP to store all of the modes supported by a destination which is also supported l...
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:261
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
If a QoS tag is attached to the packet, returns a value < 8.
Definition: qos-utils.cc:160
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:72
@ WIFI_STANDARD_80211p
@ WIFI_CHANLIST_PRIMARY
@ AC_BE_NQOS
Non-QoS.
Definition: qos-utils.h:82
@ AC_BE
Best Effort.
Definition: qos-utils.h:74
@ AC_VO
Voice.
Definition: qos-utils.h:80
@ AC_VI
Video.
Definition: qos-utils.h:78
@ AC_BK
Background.
Definition: qos-utils.h:76
@ AC_UNDEF
Total number of ACs.
Definition: qos-utils.h:86
@ AC_BEACON
Beacon queue.
Definition: qos-utils.h:84
address
Definition: first.py:40
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:848
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ OCB
Definition: wifi-mac.h:66
static constexpr uint8_t SINGLE_LINK_OP_ID
Link ID for single link operations (helps tracking places where correct link ID is to be used to supp...
Definition: wifi-utils.h:140
@ WIFI_MAC_MGT_ACTION
@ WIFI_MAC_DATA
@ WIFI_MAC_QOSDATA
static const Mac48Address WILDCARD_BSSID
Wildcard BSSID.
Definition: ocb-wifi-mac.cc:45
static const uint8_t CATEGORY_OF_VSA
see IEEE 802.11-2007 chapter 7.3.1.11 Table 7-24—Category values
ssid
Definition: third.py:86
phy
Definition: third.py:82