A Discrete-Event Network Simulator
API
hwmp-protocol-mac.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008,2009 IITP RAS
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: Kirill Andreev <andreev@iitp.ru>
19  */
20 
21 #include "ns3/mesh-wifi-interface-mac.h"
22 #include "ns3/packet.h"
23 #include "ns3/simulator.h"
24 #include "ns3/nstime.h"
25 #include "ns3/log.h"
26 #include "ns3/mgt-headers.h"
27 #include "dot11s-mac-header.h"
28 #include "hwmp-protocol-mac.h"
29 #include "hwmp-tag.h"
30 #include "ie-dot11s-preq.h"
31 #include "ie-dot11s-prep.h"
32 #include "ie-dot11s-rann.h"
33 #include "ie-dot11s-perr.h"
34 
35 namespace ns3 {
36 
37 NS_LOG_COMPONENT_DEFINE ("HwmpProtocolMac");
38 
39 namespace dot11s {
40 
42  m_ifIndex (ifIndex), m_protocol (protocol)
43 {
44  NS_LOG_FUNCTION (this << ifIndex << protocol);
45 }
47 {
48 }
49 void
51 {
52  NS_LOG_FUNCTION (this << parent);
53  m_parent = parent;
54 }
55 
56 bool
58 {
59  NS_LOG_FUNCTION (this << packet << header);
60  NS_ASSERT (header.IsData ());
61 
62  MeshHeader meshHdr;
63  HwmpTag tag;
64  if (packet->PeekPacketTag (tag))
65  {
66  NS_FATAL_ERROR ("HWMP tag is not supposed to be received by network");
67  }
68 
69  packet->RemoveHeader (meshHdr);
70  m_stats.rxData++;
71  m_stats.rxDataBytes += packet->GetSize ();
72 
74  Mac48Address destination;
75  Mac48Address source;
76  switch (meshHdr.GetAddressExt ())
77  {
78  case 0:
79  source = header.GetAddr4 ();
80  destination = header.GetAddr3 ();
81  break;
82  default:
84  "6-address scheme is not yet supported and 4-address extension is not supposed to be used for data frames.");
85  }
86  tag.SetSeqno (meshHdr.GetMeshSeqno ());
87  tag.SetTtl (meshHdr.GetMeshTtl ());
88  packet->AddPacketTag (tag);
89 
90  if ((destination == Mac48Address::GetBroadcast ()) && (m_protocol->DropDataFrame (meshHdr.GetMeshSeqno (),
91  source)))
92  {
93  return false;
94  }
95  return true;
96 }
97 
98 bool
100 {
101  NS_LOG_FUNCTION (this << packet << header);
102  m_stats.rxMgt++;
103  m_stats.rxMgtBytes += packet->GetSize ();
104  WifiActionHeader actionHdr;
105  packet->RemoveHeader (actionHdr);
106  if (actionHdr.GetCategory () != WifiActionHeader::MESH)
107  {
108  return true;
109  }
111  packet->RemoveHeader (elements);
112  std::vector<HwmpProtocol::FailedDestination> failedDestinations;
113  for (MeshInformationElementVector::Iterator i = elements.Begin (); i != elements.End (); i++)
114  {
115  if ((*i)->ElementId () == IE_RANN)
116  {
117  NS_LOG_WARN ("RANN is not supported!");
118  }
119  if ((*i)->ElementId () == IE_PREQ)
120  {
121  Ptr<IePreq> preq = DynamicCast<IePreq> (*i);
122  NS_ASSERT (preq != 0);
123  m_stats.rxPreq++;
124  if (preq->GetOriginatorAddress () == m_protocol->GetAddress ())
125  {
126  continue;
127  }
128  if (preq->GetTtl () == 0)
129  {
130  continue;
131  }
132  preq->DecrementTtl ();
133  m_protocol->ReceivePreq (*preq, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (),
134  m_parent->GetLinkMetric (header.GetAddr2 ()));
135  }
136  if ((*i)->ElementId () == IE_PREP)
137  {
138  Ptr<IePrep> prep = DynamicCast<IePrep> (*i);
139  NS_ASSERT (prep != 0);
140  m_stats.rxPrep++;
141  if (prep->GetTtl () == 0)
142  {
143  continue;
144  }
145  prep->DecrementTtl ();
146  m_protocol->ReceivePrep (*prep, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (),
147  m_parent->GetLinkMetric (header.GetAddr2 ()));
148  }
149  if ((*i)->ElementId () == IE_PERR)
150  {
151  Ptr<IePerr> perr = DynamicCast<IePerr> (*i);
152  NS_ASSERT (perr != 0);
153  m_stats.rxPerr++;
154  std::vector<HwmpProtocol::FailedDestination> destinations = perr->GetAddressUnitVector ();
155  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = destinations.begin (); i
156  != destinations.end (); i++)
157  {
158  failedDestinations.push_back (*i);
159  }
160  }
161  }
162  if (failedDestinations.size () > 0)
163  {
164  m_protocol->ReceivePerr (failedDestinations, header.GetAddr2 (), m_ifIndex, header.GetAddr3 ());
165  }
166  NS_ASSERT (packet->GetSize () == 0);
167  return false;
168 }
169 
170 bool
172 {
173  NS_LOG_FUNCTION (this << packet << header);
174  if (header.IsData ())
175  {
176  return ReceiveData (packet, header);
177  }
178  else
179  {
180  if (header.IsAction ())
181  {
182  return ReceiveAction (packet, header);
183  }
184  else
185  {
186  return true; // don't care
187  }
188  }
189 }
190 bool
192  Mac48Address to)
193 {
194  NS_LOG_FUNCTION (this << packet << header << from << to);
195  if (!header.IsData ())
196  {
197  return true;
198  }
199  HwmpTag tag;
200  bool tagExists = packet->RemovePacketTag (tag);
201  if (!tagExists)
202  {
203  NS_FATAL_ERROR ("HWMP tag must exist at this point");
204  }
205  m_stats.txData++;
206  m_stats.txDataBytes += packet->GetSize ();
207  MeshHeader meshHdr;
208  meshHdr.SetMeshSeqno (tag.GetSeqno ());
209  meshHdr.SetMeshTtl (tag.GetTtl ());
210  packet->AddHeader (meshHdr);
211  header.SetAddr1 (tag.GetAddress ());
212  header.SetQosMeshControlPresent ();
213  return true;
214 }
217 {
218  WifiActionHeader actionHdr;
221  actionHdr.SetAction (WifiActionHeader::MESH, action);
222  return actionHdr;
223 }
224 void
226 {
227  NS_LOG_FUNCTION (this);
228  std::vector<IePreq> preq_vector;
229  preq_vector.push_back (preq);
230  SendPreq (preq_vector);
231 }
232 void
233 HwmpProtocolMac::SendPreq (std::vector<IePreq> preq)
234 {
235  NS_LOG_FUNCTION (this);
236  Ptr<Packet> packet = Create<Packet> ();
238  for (std::vector<IePreq>::iterator i = preq.begin (); i != preq.end (); i++)
239  {
240  elements.AddInformationElement (Ptr<IePreq> (&(*i)));
241  }
242  packet->AddHeader (elements);
243  packet->AddHeader (GetWifiActionHeader ());
244  //create 802.11 header:
245  WifiMacHeader hdr;
246  hdr.SetAction ();
247  hdr.SetDsNotFrom ();
248  hdr.SetDsNotTo ();
249  hdr.SetAddr2 (m_parent->GetAddress ());
250  hdr.SetAddr3 (m_protocol->GetAddress ());
251  //Send Management frame
252  std::vector<Mac48Address> receivers = m_protocol->GetPreqReceivers (m_ifIndex);
253  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
254  {
255  hdr.SetAddr1 (*i);
256  m_stats.txPreq++;
257  m_stats.txMgt++;
258  m_stats.txMgtBytes += packet->GetSize ();
259  m_parent->SendManagementFrame (packet, hdr);
260  }
261 }
262 void
263 HwmpProtocolMac::RequestDestination (Mac48Address dst, uint32_t originator_seqno, uint32_t dst_seqno)
264 {
265  NS_LOG_FUNCTION (this << dst << originator_seqno << dst_seqno);
266  for (std::vector<IePreq>::iterator i = m_myPreq.begin (); i != m_myPreq.end (); i++)
267  {
268  if (i->IsFull ())
269  {
270  continue;
271  }
272  NS_ASSERT (i->GetDestCount () > 0);
273  i->AddDestinationAddressElement (m_protocol->GetDoFlag (), m_protocol->GetRfFlag (), dst, dst_seqno);
274  }
275  IePreq preq;
276  preq.SetHopcount (0);
277  preq.SetTTL (m_protocol->GetMaxTtl ());
278  preq.SetPreqID (m_protocol->GetNextPreqId ());
279  preq.SetOriginatorAddress (m_protocol->GetAddress ());
280  preq.SetOriginatorSeqNumber (originator_seqno);
281  preq.SetLifetime (m_protocol->GetActivePathLifetime ());
282  preq.AddDestinationAddressElement (m_protocol->GetDoFlag (), m_protocol->GetRfFlag (), dst, dst_seqno);
283  m_myPreq.push_back (preq);
284  SendMyPreq ();
285 }
286 void
288 {
289  NS_LOG_FUNCTION (this);
290  if (m_preqTimer.IsRunning ())
291  {
292  return;
293  }
294  if (m_myPreq.size () == 0)
295  {
296  return;
297  }
298  //reschedule sending PREQ
300  m_preqTimer = Simulator::Schedule (m_protocol->GetPreqMinInterval (), &HwmpProtocolMac::SendMyPreq, this);
301  SendPreq (m_myPreq);
302  m_myPreq.clear ();
303 }
304 void
306 {
307  NS_LOG_FUNCTION (this << receiver);
308  //Create packet
309  Ptr<Packet> packet = Create<Packet> ();
311  elements.AddInformationElement (Ptr<IePrep> (&prep));
312  packet->AddHeader (elements);
313  packet->AddHeader (GetWifiActionHeader ());
314  //create 802.11 header:
315  WifiMacHeader hdr;
316  hdr.SetAction ();
317  hdr.SetDsNotFrom ();
318  hdr.SetDsNotTo ();
319  hdr.SetAddr1 (receiver);
320  hdr.SetAddr2 (m_parent->GetAddress ());
321  hdr.SetAddr3 (m_protocol->GetAddress ());
322  //Send Management frame
323  m_stats.txPrep++;
324  m_stats.txMgt++;
325  m_stats.txMgtBytes += packet->GetSize ();
326  m_parent->SendManagementFrame (packet, hdr);
327 }
328 void
329 HwmpProtocolMac::ForwardPerr (std::vector<HwmpProtocol::FailedDestination> failedDestinations, std::vector<
330  Mac48Address> receivers)
331 {
332  NS_LOG_FUNCTION (this);
333  Ptr<Packet> packet = Create<Packet> ();
334  Ptr<IePerr> perr = Create <IePerr> ();
336  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i
337  != failedDestinations.end (); i++)
338  {
339  if (!perr->IsFull ())
340  {
341  perr->AddAddressUnit (*i);
342  }
343  else
344  {
345  elements.AddInformationElement (perr);
346  perr->ResetPerr ();
347  }
348  }
349  if (perr->GetNumOfDest () > 0)
350  {
351  elements.AddInformationElement (perr);
352  }
353  packet->AddHeader (elements);
354  packet->AddHeader (GetWifiActionHeader ());
355  //create 802.11 header:
356  WifiMacHeader hdr;
357  hdr.SetAction ();
358  hdr.SetDsNotFrom ();
359  hdr.SetDsNotTo ();
360  hdr.SetAddr2 (m_parent->GetAddress ());
361  hdr.SetAddr3 (m_protocol->GetAddress ());
362  if (receivers.size () >= m_protocol->GetUnicastPerrThreshold ())
363  {
364  receivers.clear ();
365  receivers.push_back (Mac48Address::GetBroadcast ());
366  }
367  //Send Management frame
368  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
369  {
370  //
371  // 64-bit Intel valgrind complains about hdr.SetAddr1 (*i). It likes this
372  // just fine.
373  //
374  Mac48Address address = *i;
375  hdr.SetAddr1 (address);
376  m_stats.txPerr++;
377  m_stats.txMgt++;
378  m_stats.txMgtBytes += packet->GetSize ();
379  m_parent->SendManagementFrame (packet, hdr);
380  }
381 }
382 void
383 HwmpProtocolMac::InitiatePerr (std::vector<HwmpProtocol::FailedDestination> failedDestinations, std::vector<
384  Mac48Address> receivers)
385 {
386  NS_LOG_FUNCTION (this);
387  //All duplicates in PERR are checked here, and there is no reason to
388  //check it at any other place
389  {
390  std::vector<Mac48Address>::const_iterator end = receivers.end ();
391  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != end; i++)
392  {
393  bool should_add = true;
394  for (std::vector<Mac48Address>::const_iterator j = m_myPerr.receivers.begin (); j
395  != m_myPerr.receivers.end (); j++)
396  {
397  if ((*i) == (*j))
398  {
399  should_add = false;
400  }
401  }
402  if (should_add)
403  {
404  m_myPerr.receivers.push_back (*i);
405  NS_LOG_DEBUG ("Initiate PERR: Adding receiver: " << (*i));
406  }
407  }
408  }
409  {
410  std::vector<HwmpProtocol::FailedDestination>::const_iterator end = failedDestinations.end ();
411  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i != end; i++)
412  {
413  bool should_add = true;
414  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator j = m_myPerr.destinations.begin (); j
415  != m_myPerr.destinations.end (); j++)
416  {
417  if (((*i).destination == (*j).destination) && ((*j).seqnum > (*i).seqnum))
418  {
419  should_add = false;
420  }
421  }
422  if (should_add)
423  {
424  m_myPerr.destinations.push_back (*i);
425  NS_LOG_DEBUG ("Initiate PERR: Adding failed destination: " << (*i).destination);
426  }
427  }
428  }
429  SendMyPerr ();
430 }
431 void
433 {
434  NS_LOG_FUNCTION (this);
435  if (m_perrTimer.IsRunning ())
436  {
437  return;
438  }
439  m_perrTimer = Simulator::Schedule (m_protocol->GetPerrMinInterval (), &HwmpProtocolMac::SendMyPerr, this);
441  m_myPerr.destinations.clear ();
442  m_myPerr.receivers.clear ();
443 }
444 uint32_t
446 {
447  return m_parent->GetLinkMetric (peerAddress);
448 }
449 uint16_t
451 {
452  return m_parent->GetFrequencyChannel ();
453 }
455  txPreq (0), rxPreq (0), txPrep (0), rxPrep (0), txPerr (0), rxPerr (0), txMgt (0), txMgtBytes (0),
456  rxMgt (0), rxMgtBytes (0), txData (0), txDataBytes (0), rxData (0), rxDataBytes (0)
457 {
458 }
459 void
460 HwmpProtocolMac::Statistics::Print (std::ostream & os) const
461 {
462  os << "<Statistics "
463  "txPreq= \"" << txPreq << "\"" << std::endl <<
464  "txPrep=\"" << txPrep << "\"" << std::endl <<
465  "txPerr=\"" << txPerr << "\"" << std::endl <<
466  "rxPreq=\"" << rxPreq << "\"" << std::endl <<
467  "rxPrep=\"" << rxPrep << "\"" << std::endl <<
468  "rxPerr=\"" << rxPerr << "\"" << std::endl <<
469  "txMgt=\"" << txMgt << "\"" << std::endl <<
470  "txMgtBytes=\"" << txMgtBytes << "\"" << std::endl <<
471  "rxMgt=\"" << rxMgt << "\"" << std::endl <<
472  "rxMgtBytes=\"" << rxMgtBytes << "\"" << std::endl <<
473  "txData=\"" << txData << "\"" << std::endl <<
474  "txDataBytes=\"" << txDataBytes << "\"" << std::endl <<
475  "rxData=\"" << rxData << "\"" << std::endl <<
476  "rxDataBytes=\"" << rxDataBytes << "\"/>" << std::endl;
477 }
478 void
479 HwmpProtocolMac::Report (std::ostream & os) const
480 {
481  os << "<HwmpProtocolMac" << std::endl <<
482  "address =\"" << m_parent->GetAddress () << "\">" << std::endl;
483  m_stats.Print (os);
484  os << "</HwmpProtocolMac>" << std::endl;
485 }
486 void
488 {
489  NS_LOG_FUNCTION (this);
490  m_stats = Statistics ();
491 }
492 
493 int64_t
495 {
496  return m_protocol->AssignStreams (stream);
497 }
498 
499 
500 } // namespace dot11s
501 } // namespace ns3
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:267
void SetAction()
Set Type/Subtype values for an action header.
bool ReceiveAction(Ptr< Packet > packet, const WifiMacHeader &header)
Receive action management frame.
void SetPreqID(uint32_t id)
Set path discovery id field.
uint32_t GetLinkMetric(Mac48Address peerAddress) const
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SendMyPerr()
Send PERR function.
void SetParent(Ptr< MeshWifiInterfaceMac > parent)
Update beacon is empty, because HWMP does not know anything about beacons.
void SendMyPreq()
Sends one PREQ when PreqMinInterval after last PREQ expires (if any PREQ exists in rhe queue) ...
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
Definition: hwmp-tag.h:48
void SetTTL(uint8_t ttl)
Set remaining number of hops allowed for this element.
void SendPrep(IePrep prep, Mac48Address receiver)
Send PREP function.
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:625
bool IsAction() const
Return true if the header is an Action header.
void RequestDestination(Mac48Address dest, uint32_t originator_seqno, uint32_t dst_seqno)
Request a destination.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Definition: packet.cc:814
Mac48Address GetAddr3(void) const
Return the address in the Address 3 field.
Mac48Address GetAddr4(void) const
Return the address in the Address 4 field.
#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
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
See 7.3.2.97 of 802.11s draft 2.07.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:796
std::vector< IePreq > m_myPreq
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Definition: event-id.cc:65
void SetMeshSeqno(uint32_t seqno)
Set four-byte mesh sequence number.
CategoryValue GetCategory()
Return the category value.
Definition: mgt-headers.cc:888
uint32_t GetSeqno()
Get the sequence number.
Definition: hwmp-tag.cc:81
void SetTtl(uint8_t ttl)
Set the TTL value.
Definition: hwmp-tag.cc:51
bool AddInformationElement(Ptr< WifiInformationElement > element)
add an IE, if maxSize has exceeded, returns false
void SetLifetime(uint32_t lifetime)
Set lifetime in TUs for the forwarding information to be considered valid.
void SendPreq(IePreq preq)
Send PREQ function.
Mac48Address GetAddress()
Get address from tag.
Definition: hwmp-tag.cc:45
void Report(std::ostream &os) const
Report statistics.
void SetMeshTtl(uint8_t TTL)
Set mesh TTL subfield corresponding to the remaining number of hops the MSDU/MMPDU is forwarded...
Iterator End()
Returns End of the vector.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
Definition: packet.cc:836
static WifiActionHeader GetWifiActionHeader()
void ResetStats()
Reset statistics.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1375
void SetAddr1(Mac48Address address)
Fill the Address 1 field with the given address.
void SetDsNotTo(void)
Un-set the To DS bit in the Frame Control field.
void SetAddr3(Mac48Address address)
Fill the Address 3 field with the given address.
See 7.3.2.96 of 802.11s draft 2.07.
uint32_t txDataBytes
transmit data bytes
std::vector< Ptr< WifiInformationElement > >::iterator Iterator
As soon as this is a vector, we define an Iterator.
#define IE_PREP
uint32_t rxMgtBytes
receive management bytes
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:698
Ptr< MeshWifiInterfaceMac > m_parent
parent
#define IE_RANN
static Mac48Address GetBroadcast(void)
std::vector< Mac48Address > receivers
receivers
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address value.
uint32_t txMgtBytes
transmit management bytes
Iterator Begin()
Returns Begin of the vector.
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void AddDestinationAddressElement(bool doFlag, bool rfFlag, Mac48Address dest_address, uint32_t dest_seq_number)
Add a destination address unit: flags, destination and sequence number.
void SetAddr2(Mac48Address address)
Fill the Address 2 field with the given address.
void Print(std::ostream &os) const
Print function.
an EUI-48 address
Definition: mac48-address.h:43
std::vector< HwmpProtocol::FailedDestination > destinations
destinations
uint32_t rxDataBytes
receive data bytes
Introspection did not find any typical Config paths.
HwmpProtocolMac(uint32_t ifIndex, Ptr< HwmpProtocol > protocol)
Constructor.
bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
Update beacon is empty, because HWMP does not know anything about beacons.
Ptr< HwmpProtocol > m_protocol
protocol
#define IE_PREQ
uint8_t GetTtl()
Get the TTL value.
Definition: hwmp-tag.cc:57
int64_t AssignStreams(int64_t stream)
Update beacon is empty, because HWMP does not know anything about beacons.
bool ReceiveData(Ptr< Packet > packet, const WifiMacHeader &header)
Receive data frame.
bool IsData(void) const
Return true if the Type is DATA.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:261
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
Definition: packet.cc:821
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:269
void ForwardPerr(std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
Forward a path error.
typedef for union of different ActionValues
Definition: mgt-headers.h:696
bool Receive(Ptr< Packet > packet, const WifiMacHeader &header)
Update beacon is empty, because HWMP does not know anything about beacons.
Mesh Control field, see Section 8.2.4.7.3 IEEE 802.11-2012.
void InitiatePerr(std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
initiate my own path error
Statistics m_stats
statistics
tuple address
Definition: first.py:37
void SetSeqno(uint32_t seqno)
Set sequence number.
Definition: hwmp-tag.cc:75
void SetQosMeshControlPresent()
Set the Mesh Control Present flag for the QoS header.
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
Definition: mgt-headers.cc:854
void SetHopcount(uint8_t hopcount)
Set number of hops from originator to mesh STA transmitting this element.
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
Implements the IEEE 802.11 MAC header.
Mac48Address GetAddr2(void) const
Return the address in the Address 2 field.
uint16_t GetChannelId() const
Get the channel ID.
#define IE_PERR
void SetDsNotFrom(void)
Un-set the From DS bit in the Frame Control field.