A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sta-wifi-mac.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2006, 2009 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Author: Mirko Banchi <mk.banchi@gmail.com>
21  */
22 #include "sta-wifi-mac.h"
23 
24 #include "ns3/log.h"
25 #include "ns3/simulator.h"
26 #include "ns3/string.h"
27 #include "ns3/pointer.h"
28 #include "ns3/boolean.h"
29 #include "ns3/trace-source-accessor.h"
30 
31 #include "qos-tag.h"
32 #include "mac-low.h"
33 #include "dcf-manager.h"
34 #include "mac-rx-middle.h"
35 #include "mac-tx-middle.h"
36 #include "wifi-mac-header.h"
37 #include "msdu-aggregator.h"
38 #include "amsdu-subframe-header.h"
39 #include "mgt-headers.h"
40 #include "ht-capabilities.h"
41 
42 NS_LOG_COMPONENT_DEFINE ("StaWifiMac");
43 
44 
45 /*
46  * The state machine for this STA is:
47  -------------- -----------
48  | Associated | <-------------------- -------> | Refused |
49  -------------- \ / -----------
50  \ \ /
51  \ ----------------- -----------------------------
52  \-> | Beacon Missed | --> | Wait Association Response |
53  ----------------- -----------------------------
54  \ ^
55  \ |
56  \ -----------------------
57  \-> | Wait Probe Response |
58  -----------------------
59  */
60 
61 namespace ns3 {
62 
63 NS_OBJECT_ENSURE_REGISTERED (StaWifiMac);
64 
65 TypeId
67 {
68  static TypeId tid = TypeId ("ns3::StaWifiMac")
70  .AddConstructor<StaWifiMac> ()
71  .AddAttribute ("ProbeRequestTimeout", "The interval between two consecutive probe request attempts.",
72  TimeValue (Seconds (0.05)),
73  MakeTimeAccessor (&StaWifiMac::m_probeRequestTimeout),
74  MakeTimeChecker ())
75  .AddAttribute ("AssocRequestTimeout", "The interval between two consecutive assoc request attempts.",
76  TimeValue (Seconds (0.5)),
77  MakeTimeAccessor (&StaWifiMac::m_assocRequestTimeout),
78  MakeTimeChecker ())
79  .AddAttribute ("MaxMissedBeacons",
80  "Number of beacons which much be consecutively missed before "
81  "we attempt to restart association.",
82  UintegerValue (10),
83  MakeUintegerAccessor (&StaWifiMac::m_maxMissedBeacons),
84  MakeUintegerChecker<uint32_t> ())
85  .AddAttribute ("ActiveProbing", "If true, we send probe requests. If false, we don't. NOTE: if more than one STA in your simulation is using active probing, you should enable it at a different simulation time for each STA, otherwise all the STAs will start sending probes at the same time resulting in collisions. See bug 1060 for more info.",
86  BooleanValue (false),
87  MakeBooleanAccessor (&StaWifiMac::SetActiveProbing),
88  MakeBooleanChecker ())
89  .AddTraceSource ("Assoc", "Associated with an access point.",
91  .AddTraceSource ("DeAssoc", "Association with an access point lost.",
93  ;
94  return tid;
95 }
96 
98  : m_state (BEACON_MISSED),
99  m_probeRequestEvent (),
100  m_assocRequestEvent (),
101  m_beaconWatchdogEnd (Seconds (0.0))
102 {
103  NS_LOG_FUNCTION (this);
104 
105  // Let the lower layers know that we are acting as a non-AP STA in
106  // an infrastructure BSS.
108 }
109 
111 {
112  NS_LOG_FUNCTION (this);
113 }
114 
115 void
117 {
118  NS_LOG_FUNCTION (this << missed);
119  m_maxMissedBeacons = missed;
120 }
121 
122 void
124 {
125  NS_LOG_FUNCTION (this << timeout);
127 }
128 
129 void
131 {
132  NS_LOG_FUNCTION (this << timeout);
134 }
135 
136 void
138 {
139  NS_LOG_FUNCTION (this);
141 }
142 
143 void
145 {
146  NS_LOG_FUNCTION (this << enable);
147  if (enable)
148  {
150  }
151  else
152  {
154  }
155 }
156 
157 void
159 {
160  NS_LOG_FUNCTION (this);
161  WifiMacHeader hdr;
162  hdr.SetProbeReq ();
164  hdr.SetAddr2 (GetAddress ());
166  hdr.SetDsNotFrom ();
167  hdr.SetDsNotTo ();
168  Ptr<Packet> packet = Create<Packet> ();
169  MgtProbeRequestHeader probe;
170  probe.SetSsid (GetSsid ());
171  probe.SetSupportedRates (GetSupportedRates ());
172  if (m_htSupported)
173  {
174  probe.SetHtCapabilities (GetHtCapabilities());
175  hdr.SetNoOrder();
176  }
177 
178  packet->AddHeader (probe);
179 
180  // The standard is not clear on the correct queue for management
181  // frames if we are a QoS AP. The approach taken here is to always
182  // use the DCF for these regardless of whether we have a QoS
183  // association or not.
184  m_dca->Queue (packet, hdr);
185 
187  {
189  }
192 }
193 
194 void
196 {
197  NS_LOG_FUNCTION (this << GetBssid ());
198  WifiMacHeader hdr;
199  hdr.SetAssocReq ();
200  hdr.SetAddr1 (GetBssid ());
201  hdr.SetAddr2 (GetAddress ());
202  hdr.SetAddr3 (GetBssid ());
203  hdr.SetDsNotFrom ();
204  hdr.SetDsNotTo ();
205  Ptr<Packet> packet = Create<Packet> ();
206  MgtAssocRequestHeader assoc;
207  assoc.SetSsid (GetSsid ());
208  assoc.SetSupportedRates (GetSupportedRates ());
209  if (m_htSupported)
210  {
211  assoc.SetHtCapabilities (GetHtCapabilities());
212  hdr.SetNoOrder();
213  }
214 
215  packet->AddHeader (assoc);
216 
217  // The standard is not clear on the correct queue for management
218  // frames if we are a QoS AP. The approach taken here is to always
219  // use the DCF for these regardless of whether we have a QoS
220  // association or not.
221  m_dca->Queue (packet, hdr);
222 
224  {
226  }
229 }
230 
231 void
233 {
234  NS_LOG_FUNCTION (this);
235  switch (m_state)
236  {
237  case ASSOCIATED:
238  return;
239  break;
240  case WAIT_PROBE_RESP:
241  /* we have sent a probe request earlier so we
242  do not need to re-send a probe request immediately.
243  We just need to wait until probe-request-timeout
244  or until we get a probe response
245  */
246  break;
247  case BEACON_MISSED:
248  /* we were associated but we missed a bunch of beacons
249  * so we should assume we are not associated anymore.
250  * We try to initiate a probe request now.
251  */
252  m_linkDown ();
254  SendProbeRequest ();
255  break;
256  case WAIT_ASSOC_RESP:
257  /* we have sent an assoc request so we do not need to
258  re-send an assoc request right now. We just need to
259  wait until either assoc-request-timeout or until
260  we get an assoc response.
261  */
262  break;
263  case REFUSED:
264  /* we have sent an assoc request and received a negative
265  assoc resp. We wait until someone restarts an
266  association with a given ssid.
267  */
268  break;
269  }
270 }
271 
272 void
274 {
275  NS_LOG_FUNCTION (this);
278 }
279 
280 void
282 {
283  NS_LOG_FUNCTION (this);
285  SendProbeRequest ();
286 }
287 
288 void
290 {
291  NS_LOG_FUNCTION (this);
293  {
295  {
297  }
300  return;
301  }
302  NS_LOG_DEBUG ("beacon missed");
305 }
306 
307 void
309 {
310  NS_LOG_FUNCTION (this << delay);
311  m_beaconWatchdogEnd = std::max (Simulator::Now () + delay, m_beaconWatchdogEnd);
314  {
315  NS_LOG_DEBUG ("really restart watchdog.");
317  }
318 }
319 
320 bool
322 {
323  return m_state == ASSOCIATED;
324 }
325 
326 bool
328 {
329  return m_state == WAIT_ASSOC_RESP;
330 }
331 
332 void
334 {
335  NS_LOG_FUNCTION (this << packet << to);
336  if (!IsAssociated ())
337  {
338  NotifyTxDrop (packet);
340  return;
341  }
342  WifiMacHeader hdr;
343 
344  // If we are not a QoS AP then we definitely want to use AC_BE to
345  // transmit the packet. A TID of zero will map to AC_BE (through \c
346  // QosUtilsMapTidToAc()), so we use that as our default here.
347  uint8_t tid = 0;
348 
349  // For now, an AP that supports QoS does not support non-QoS
350  // associations, and vice versa. In future the AP model should
351  // support simultaneously associated QoS and non-QoS STAs, at which
352  // point there will need to be per-association QoS state maintained
353  // by the association state machine, and consulted here.
354  if (m_qosSupported)
355  {
358  hdr.SetQosNoEosp ();
359  hdr.SetQosNoAmsdu ();
360  // Transmission of multiple frames in the same TXOP is not
361  // supported for now
362  hdr.SetQosTxopLimit (0);
363 
364  // Fill in the QoS control field in the MAC header
365  tid = QosUtilsGetTidForPacket (packet);
366  // Any value greater than 7 is invalid and likely indicates that
367  // the packet had no QoS tag, so we revert to zero, which'll
368  // mean that AC_BE is used.
369  if (tid >= 7)
370  {
371  tid = 0;
372  }
373  hdr.SetQosTid (tid);
374  }
375  else
376  {
377  hdr.SetTypeData ();
378  }
379 if (m_htSupported)
380  {
381  hdr.SetNoOrder();
382  }
383 
384  hdr.SetAddr1 (GetBssid ());
385  hdr.SetAddr2 (m_low->GetAddress ());
386  hdr.SetAddr3 (to);
387  hdr.SetDsNotFrom ();
388  hdr.SetDsTo ();
389 
390  if (m_qosSupported)
391  {
392  // Sanity check that the TID is valid
393  NS_ASSERT (tid < 8);
394  m_edca[QosUtilsMapTidToAc (tid)]->Queue (packet, hdr);
395  }
396  else
397  {
398  m_dca->Queue (packet, hdr);
399  }
400 }
401 
402 void
404 {
405  NS_LOG_FUNCTION (this << packet << hdr);
406  NS_ASSERT (!hdr->IsCtl ());
407  if (hdr->GetAddr3 () == GetAddress ())
408  {
409  NS_LOG_LOGIC ("packet sent by us.");
410  return;
411  }
412  else if (hdr->GetAddr1 () != GetAddress ()
413  && !hdr->GetAddr1 ().IsGroup ())
414  {
415  NS_LOG_LOGIC ("packet is not for us");
416  NotifyRxDrop (packet);
417  return;
418  }
419  else if (hdr->IsData ())
420  {
421  if (!IsAssociated ())
422  {
423  NS_LOG_LOGIC ("Received data frame while not associated: ignore");
424  NotifyRxDrop (packet);
425  return;
426  }
427  if (!(hdr->IsFromDs () && !hdr->IsToDs ()))
428  {
429  NS_LOG_LOGIC ("Received data frame not from the DS: ignore");
430  NotifyRxDrop (packet);
431  return;
432  }
433  if (hdr->GetAddr2 () != GetBssid ())
434  {
435  NS_LOG_LOGIC ("Received data frame not from the BSS we are associated with: ignore");
436  NotifyRxDrop (packet);
437  return;
438  }
439 
440  if (hdr->IsQosData ())
441  {
442  if (hdr->IsQosAmsdu ())
443  {
444  NS_ASSERT (hdr->GetAddr3 () == GetBssid ());
445  DeaggregateAmsduAndForward (packet, hdr);
446  packet = 0;
447  }
448  else
449  {
450  ForwardUp (packet, hdr->GetAddr3 (), hdr->GetAddr1 ());
451  }
452  }
453  else
454  {
455  ForwardUp (packet, hdr->GetAddr3 (), hdr->GetAddr1 ());
456  }
457  return;
458  }
459  else if (hdr->IsProbeReq ()
460  || hdr->IsAssocReq ())
461  {
462  // This is a frame aimed at an AP, so we can safely ignore it.
463  NotifyRxDrop (packet);
464  return;
465  }
466  else if (hdr->IsBeacon ())
467  {
468  MgtBeaconHeader beacon;
469  packet->RemoveHeader (beacon);
470  bool goodBeacon = false;
471  if (GetSsid ().IsBroadcast ()
472  || beacon.GetSsid ().IsEqual (GetSsid ()))
473  {
474  goodBeacon = true;
475  }
476  SupportedRates rates = beacon.GetSupportedRates ();
477  for (uint32_t i = 0; i < m_phy->GetNBssMembershipSelectors (); i++)
478  {
479  uint32_t selector = m_phy->GetBssMembershipSelector (i);
480  if (!rates.IsSupportedRate (selector))
481  {
482  goodBeacon = false;
483  }
484  }
485  if ((IsWaitAssocResp () || IsAssociated ()) && hdr->GetAddr3 () != GetBssid ())
486  {
487  goodBeacon = false;
488  }
489  if (goodBeacon)
490  {
491  Time delay = MicroSeconds (beacon.GetBeaconIntervalUs () * m_maxMissedBeacons);
492  RestartBeaconWatchdog (delay);
493  SetBssid (hdr->GetAddr3 ());
494  }
495  if (goodBeacon && m_state == BEACON_MISSED)
496  {
499  }
500  return;
501  }
502  else if (hdr->IsProbeResp ())
503  {
504  if (m_state == WAIT_PROBE_RESP)
505  {
506  MgtProbeResponseHeader probeResp;
507  packet->RemoveHeader (probeResp);
508  if (!probeResp.GetSsid ().IsEqual (GetSsid ()))
509  {
510  //not a probe resp for our ssid.
511  return;
512  }
513  SupportedRates rates = probeResp.GetSupportedRates ();
514  for (uint32_t i = 0; i < m_phy->GetNBssMembershipSelectors (); i++)
515  {
516  uint32_t selector = m_phy->GetBssMembershipSelector (i);
517  if (!rates.IsSupportedRate (selector))
518  {
519  return;
520  }
521  }
522  SetBssid (hdr->GetAddr3 ());
523  Time delay = MicroSeconds (probeResp.GetBeaconIntervalUs () * m_maxMissedBeacons);
524  RestartBeaconWatchdog (delay);
526  {
528  }
531  }
532  return;
533  }
534  else if (hdr->IsAssocResp ())
535  {
536  if (m_state == WAIT_ASSOC_RESP)
537  {
538  MgtAssocResponseHeader assocResp;
539  packet->RemoveHeader (assocResp);
541  {
543  }
544  if (assocResp.GetStatusCode ().IsSuccess ())
545  {
547  NS_LOG_DEBUG ("assoc completed");
548  SupportedRates rates = assocResp.GetSupportedRates ();
549  if (m_htSupported)
550  {
551  HtCapabilities htcapabilities = assocResp.GetHtCapabilities ();
552  m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (),htcapabilities);
553  }
554 
555  for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
556  {
557  WifiMode mode = m_phy->GetMode (i);
558  if (rates.IsSupportedRate (mode.GetDataRate ()))
559  {
560  m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode);
561  if (rates.IsBasicRate (mode.GetDataRate ()))
562  {
563  m_stationManager->AddBasicMode (mode);
564  }
565  }
566  }
567  if(m_htSupported)
568  {
569  HtCapabilities htcapabilities = assocResp.GetHtCapabilities ();
570  for (uint32_t i = 0; i < m_phy->GetNMcs(); i++)
571  {
572  uint8_t mcs=m_phy->GetMcs(i);
573  if (htcapabilities.IsSupportedMcs (mcs))
574  {
575  m_stationManager->AddSupportedMcs (hdr->GetAddr2 (), mcs);
576  //here should add a control to add basic MCS when it is implemented
577  }
578  }
579  }
580  if (!m_linkUp.IsNull ())
581  {
582  m_linkUp ();
583  }
584  }
585  else
586  {
587  NS_LOG_DEBUG ("assoc refused");
588  SetState (REFUSED);
589  }
590  }
591  return;
592  }
593 
594  // Invoke the receive handler of our parent class to deal with any
595  // other frames. Specifically, this will handle Block Ack-related
596  // Management Action frames.
597  RegularWifiMac::Receive (packet, hdr);
598 }
599 
602 {
603  SupportedRates rates;
604  if(m_htSupported)
605  {
606  for (uint32_t i = 0; i < m_phy->GetNBssMembershipSelectors(); i++)
607  {
609  }
610  }
611  for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
612  {
613  WifiMode mode = m_phy->GetMode (i);
614  rates.AddSupportedRate (mode.GetDataRate ());
615  }
616  return rates;
617 }
620 {
621  HtCapabilities capabilities;
622  capabilities.SetHtSupported(1);
623  capabilities.SetLdpc (m_phy->GetLdpc());
625  capabilities.SetGreenfield (m_phy->GetGreenfield());
626 for (uint8_t i =0 ; i < m_phy->GetNMcs();i++)
627  {
628  capabilities.SetRxMcsBitmask(m_phy->GetMcs(i));
629  }
630  return capabilities;
631 }
632 void
634 {
635  if (value == ASSOCIATED
636  && m_state != ASSOCIATED)
637  {
638  m_assocLogger (GetBssid ());
639  }
640  else if (value != ASSOCIATED
641  && m_state == ASSOCIATED)
642  {
644  }
645  m_state = value;
646 }
647 
648 } // namespace ns3
static Time GetDelayLeft(const EventId &id)
Definition: simulator.cc:189
bool IsWaitAssocResp(void) const
bool IsBeacon(void) const
uint32_t RemoveHeader(Header &header)
Definition: packet.cc:268
NS_LOG_COMPONENT_DEFINE("StaWifiMac")
TracedCallback< Mac48Address > m_deAssocLogger
Definition: sta-wifi-mac.h:124
void AddSupportedRate(uint32_t bs)
SupportedRates GetSupportedRates(void) const
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
Time m_assocRequestTimeout
Definition: sta-wifi-mac.h:116
SupportedRates GetSupportedRates(void) const
Definition: mgt-headers.cc:149
virtual void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:311
Hold a bool native type.
Definition: boolean.h:38
void SendAssociationRequest(void)
void SetGreenfield(uint8_t greenfield)
Ssid GetSsid(void) const
Definition: mgt-headers.cc:139
void SetHtSupported(uint8_t htsupported)
virtual uint32_t GetNModes(void) const =0
uint64_t GetBeaconIntervalUs(void) const
Definition: mgt-headers.cc:144
void SetRxMcsBitmask(uint8_t index)
void AssocRequestTimeout(void)
Time m_probeRequestTimeout
Definition: sta-wifi-mac.h:115
void SetProbeRequestTimeout(Time timeout)
Mac48Address GetAddr3(void) const
virtual uint8_t GetNMcs(void) const =0
bool IsNull(void) const
Definition: callback.h:1014
#define NS_ASSERT(condition)
Definition: assert.h:64
Callback< void > m_linkUp
The Ht Capabilities Information ElementThis class knows how to serialise and deserialise the Ht Capab...
bool IsAssocReq(void) const
void NotifyRxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:268
virtual bool GetLdpc(void) const =0
bool IsRunning(void) const
Definition: event-id.cc:59
virtual uint8_t GetMcs(uint8_t mcs) const =0
virtual void DeaggregateAmsduAndForward(Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr)
TracedCallback< Mac48Address > m_assocLogger
Definition: sta-wifi-mac.h:123
EventId m_assocRequestEvent
Definition: sta-wifi-mac.h:118
bool IsAssocResp(void) const
Ptr< WifiPhy > m_phy
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Definition: simulator.h:824
bool IsCtl(void) const
ns3::Time timeout
bool IsEqual(const Ssid &o) const
Definition: ssid.cc:69
virtual Ssid GetSsid(void) const
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:91
bool IsQosAmsdu(void) const
bool IsProbeResp(void) const
void SetAssocRequestTimeout(Time timeout)
virtual void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
Definition: qos-utils.cc:60
void SetQosAckPolicy(enum QosAckPolicy)
virtual void SetBssid(Mac48Address bssid)
void SendProbeRequest(void)
void ForwardUp(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
base class for all MAC-level wifi objects.This class encapsulates all the low-level MAC functionality...
void ProbeRequestTimeout(void)
void SetAddr1(Mac48Address address)
void SetTypeOfStation(TypeOfStation type)
void SetShortGuardInterval20(uint8_t shortguardinterval)
hold objects of type ns3::Time
Definition: nstime.h:828
Ptr< DcaTxop > m_dca
void SetAddr3(Mac48Address address)
void NotifyTxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:250
bool IsProbeReq(void) const
Hold an unsigned integer type.
Definition: uinteger.h:46
void MissedBeacons(void)
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Definition: qos-utils.cc:27
static Mac48Address GetBroadcast(void)
bool IsSupportedMcs(uint8_t mcs)
virtual bool GetGuardInterval(void) const =0
void SetState(enum MacState value)
virtual uint32_t GetNBssMembershipSelectors(void) const =0
#define NS_LOG_LOGIC(msg)
Definition: log.h:334
SupportedRates GetSupportedRates(void)
Definition: mgt-headers.cc:386
void SetBasicRate(uint32_t bs)
HtCapabilities GetHtCapabilities(void) const
Callback< void > m_linkDown
void SetQosTid(uint8_t tid)
bool IsBasicRate(uint32_t bs) const
uint32_t m_maxMissedBeacons
Definition: sta-wifi-mac.h:121
void StartActiveAssociation(void)
void SetMaxMissedBeacons(uint32_t missed)
EventId m_beaconWatchdog
Definition: sta-wifi-mac.h:119
virtual ~StaWifiMac()
bool IsToDs(void) const
bool IsGroup(void) const
virtual uint32_t GetBssMembershipSelector(uint32_t selector) const =0
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
void SetAddr2(Mac48Address address)
static TypeId GetTypeId(void)
Definition: sta-wifi-mac.cc:66
an EUI-48 address
Definition: mac48-address.h:41
virtual WifiMode GetMode(uint32_t mode) const =0
void RestartBeaconWatchdog(Time delay)
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Definition: simulator.h:985
void TryToEnsureAssociated(void)
static Time Now(void)
Definition: simulator.cc:180
void SetActiveProbing(bool enable)
virtual Mac48Address GetBssid(void) const
void SetQosTxopLimit(uint8_t txop)
bool IsData(void) const
bool IsQosData(void) const
#define NS_LOG_DEBUG(msg)
Definition: log.h:255
virtual Mac48Address GetAddress(void) const
bool IsSuccess(void) const
Definition: status-code.cc:42
virtual void Enqueue(Ptr< const Packet > packet, Mac48Address to)
void Cancel(void)
Definition: event-id.cc:47
void SetLdpc(uint8_t ldpc)
bool IsFromDs(void) const
bool IsSupportedRate(uint32_t bs) const
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. Both limits are inclusive.
Definition: time.cc:404
void SetSsid(Ssid ssid)
Definition: mgt-headers.cc:39
void SetType(enum WifiMacType type)
enum MacState m_state
Definition: sta-wifi-mac.h:114
Mac48Address GetAddr1(void) const
Time m_beaconWatchdogEnd
Definition: sta-wifi-mac.h:120
EventId m_probeRequestEvent
Definition: sta-wifi-mac.h:117
Ptr< WifiRemoteStationManager > m_stationManager
bool IsAssociated(void) const
bool IsExpired(void) const
Definition: event-id.cc:53
a unique identifier for an interface.
Definition: type-id.h:49
uint64_t GetDataRate(void) const
Definition: wifi-mode.cc:57
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
virtual bool GetGreenfield(void) const =0
void AddHeader(const Header &header)
Definition: packet.cc:253
Mac48Address GetAddr2(void) const
StatusCode GetStatusCode(void)
Definition: mgt-headers.cc:381
HtCapabilities GetHtCapabilities(void) const
Definition: mgt-headers.cc:407